Skip to content
This repository was archived by the owner on Oct 11, 2024. It is now read-only.
This repository was archived by the owner on Oct 11, 2024. It is now read-only.

Regex based applicability detection #55

Description

@nuest

Right now, the detection whether a transformer is suitable for a given document is based on XPath only. This severly limits transformers to only support XML input documents. Example:

{
   "transformationDescription":{
      "name":"transformerSML10",
      "applicabilityPath":"boolean(//*[local-name()='SensorML'][@version='1.0.1'])",

A new property should be added to the transformationDescription called applicabilityRegex, which contains a regex to be compiled in Java (http://docs.oracle.com/javase/8/docs/api/java/util/regex/Pattern.html) to match the input document. This would also allow simple string comparison, and also a "matches everything" configuration:

{
   "transformationDescription":{
      "name":"transformerMySensorDoc",
      "applicabilityRegex":"<SensorML>*<System>",

Implementation steps:

  • Add method TransformationDescription.isApplicable()
  • use that method within updateGeoLabel()
  • Add tests and demo for string-based applicabiilty configuration

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions