Class SMLHelper

java.lang.Object
org.vast.swe.SWEHelper
org.vast.sensorML.SMLHelper

public class SMLHelper extends SWEHelper

Helper class for creating SensorML process and system components and dealing with process input/output structures.

Since:
May 16, 2017
  • Field Details

    • DEFAULT_SML_FACTORY

      public static final SMLFactory DEFAULT_SML_FACTORY
    • DEFAULT_SWE_FACTORY

      public static final SWEFactory DEFAULT_SWE_FACTORY
    • DEFAULT_GML_FACTORY

      public static final Factory DEFAULT_GML_FACTORY
    • DEFAULT_GMD_FACTORY

      public static final org.isotc211.v2005.gmd.Factory DEFAULT_GMD_FACTORY
    • DEFAULT_GCO_FACTORY

      public static final org.isotc211.v2005.gco.Factory DEFAULT_GCO_FACTORY
    • fac

      protected final SMLFactory fac
    • identifiers

      public final CommonIdentifiers identifiers
    • classifiers

      public final CommonClassifiers classifiers
    • characteristics

      public final CommonCharacteristics characteristics
    • capabilities

      public final CommonCapabilities capabilities
    • conditions

      public final CommonConditions conditions
  • Constructor Details

    • SMLHelper

      public SMLHelper()
      Create a SML helper with the default factory
    • SMLHelper

      public SMLHelper(SMLFactory fac)
      Create a SML helper with the provided factory
      Parameters:
      fac - SML process object factory
    • SMLHelper

      @Deprecated public SMLHelper(AbstractProcess process)
      Deprecated.
      Use #edit(AbstractProcess) that returns a builder
  • Method Details

    • createSimpleProcess

      public SMLBuilders.SimpleProcessBuilder createSimpleProcess()
      Returns:
      A builder to create a new SimpleProcess
    • createAggregateProcess

      public SMLBuilders.AggregateProcessBuilder createAggregateProcess()
      Returns:
      A builder to create a new AggregateProcess
    • createPhysicalComponent

      public SMLBuilders.PhysicalComponentBuilder createPhysicalComponent()
      Returns:
      A builder to create a new PhysicalComponent
    • createPhysicalSystem

      public SMLBuilders.PhysicalSystemBuilder createPhysicalSystem()
      Returns:
      A builder to create a new PhysicalSystem
    • createDeployment

      public SMLBuilders.DeploymentBuilder createDeployment()
      Returns:
      A builder to create a new Deployment
    • createMode

      public SMLBuilders.ModeBuilder createMode()
      Returns:
      A builder to create a new Mode
    • edit

      Helper method to edit a SimpleProcess description in-place using a builder
      Parameters:
      sml - SensorML instance to edit
      Returns:
      A builder initialized with the provided instance
    • edit

      Helper method to edit a AggregateProcess description in-place using a builder
      Parameters:
      sml - SensorML instance to edit
      Returns:
      A builder initialized with the provided instance
    • edit

      Helper method to edit a PhysicalComponent description in-place using a builder
      Parameters:
      sml - SensorML instance to edit
      Returns:
      A builder initialized with the provided instance
    • edit

      Helper method to edit a PhysicalSystem description in-place using a builder
      Parameters:
      sml - SensorML instance to edit
      Returns:
      A builder initialized with the provided instance
    • createCharacteristicList

      public SMLMetadataBuilders.CharacteristicListBuilder createCharacteristicList()
      Returns:
      A builder to create a new CharacteristicList
    • createCapabilityList

      public SMLMetadataBuilders.CapabilityListBuilder createCapabilityList()
      Returns:
      A builder to create a new CapabilityList
    • createTerm

      public SMLBuilders.TermBuilder createTerm()
      Returns:
      A builder to create a new Term
    • createObservableProperty

      public SMLBuilders.ObsPropBuilder createObservableProperty()
      Returns:
      A builder to create a new ObservableProperty
    • createContact

      Returns:
      A builder to create a new Contact
    • createDocument

      Returns:
      A builder to create a new Document
    • createSpatialFrame

      public SMLBuilders.SpatialFrameBuilder createSpatialFrame()
      Returns:
      A builder to create a new SpatialFrame
    • getIOComponent

      public static DataComponent getIOComponent(AbstractSWEIdentifiable ioDef)
      Helper to get the input/output/parameter component description whether the IO is wrapped in a DataInterface or DataStream or given as a raw DataComponent.
      Parameters:
      ioDef -
      Returns:
      DataComponent
    • getIOEncoding

      public static DataEncoding getIOEncoding(AbstractSWEIdentifiable ioDef)
      Helper to get the input/output/parameter encoding description whether the IO is wrapped in a DataInterface or DataStream.
      This method returns null if the IO is described as a raw DataComponent.
      Parameters:
      ioDef -
      Returns:
      DataComponent
    • findComponentByPath

      public static org.vast.sensorML.SMLHelper.LinkTarget findComponentByPath(AbstractProcess parent, String linkString) throws SMLException
      Finds a component in a process/component tree using a path.
      Link path format is either '[components/{component_name}/...][inputs|outputs|parameters]/{name}/{name}/...
      Parameters:
      parent - process from which to start the search
      linkString - desired path as a String composed of process name, port type and data component names separated by "/" characters
      Returns:
      the process/component pair targeted by the given path or null if target process is not resolved
      Throws:
      SMLException - if the specified path is incorrect
    • getComponentPath

      public static String getComponentPath(IProcessExec process, DataComponent component)
      Constructs the path to link to the specified component
      Parameters:
      process - the process where the data component resides
      component - the component to link to
      Returns:
      Full path to input or output component
    • getFactory

      public SMLFactory getFactory()
    • newPhysicalSystem

      @Deprecated public PhysicalSystem newPhysicalSystem()
      Deprecated.
    • addIdentifier

      @Deprecated public void addIdentifier(String label, String def, String value)
      Deprecated.
    • addSerialNumber

      @Deprecated public void addSerialNumber(String value)
      Deprecated.