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

Regex based applicability detection #55

Open
3 tasks
nuest opened this issue Jan 26, 2015 · 0 comments
Open
3 tasks

Regex based applicability detection #55

nuest opened this issue Jan 26, 2015 · 0 comments

Comments

@nuest
Copy link
Contributor

nuest commented Jan 26, 2015

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
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant