Package org.vast.sensorML
Class SMLHelper
java.lang.Object
org.vast.swe.SWEHelper
org.vast.sensorML.SMLHelper
Helper class for creating SensorML process and system components and dealing with process input/output structures.
- Since:
- May 16, 2017
-
Field Summary
FieldsModifier and TypeFieldDescriptionfinal CommonCapabilities
final CommonCharacteristics
final CommonClassifiers
final CommonConditions
static final org.isotc211.v2005.gco.Factory
static final org.isotc211.v2005.gmd.Factory
static final Factory
static final SMLFactory
static final SWEFactory
protected final SMLFactory
final CommonIdentifiers
Fields inherited from class org.vast.swe.SWEHelper
ACCEL_UNIT, ANGLE_UNIT, ANGULAR_SPEED_UNIT, CURRENT_UNIT, DISTANCE_UNIT, ENERGY_UNIT, MASS_UNIT, PATH_SEPARATOR, POWER_UNIT, SPEED_UNIT, SURFACE_UNIT, TEMP_UNIT, TIME_UNIT, UNITLESS, uomParser, VOLTAGE_UNIT, VOLUME_UNIT
-
Constructor Summary
ConstructorsConstructorDescriptionCreate a SML helper with the default factorySMLHelper
(AbstractProcess process) Deprecated.SMLHelper
(SMLFactory fac) Create a SML helper with the provided factory -
Method Summary
Modifier and TypeMethodDescriptionvoid
addIdentifier
(String label, String def, String value) Deprecated.void
addSerialNumber
(String value) Deprecated.edit
(AggregateProcess sml) Helper method to edit a AggregateProcess description in-place using a builderedit
(PhysicalComponent sml) Helper method to edit a PhysicalComponent description in-place using a builderedit
(PhysicalSystem sml) Helper method to edit a PhysicalSystem description in-place using a builderedit
(SimpleProcess sml) Helper method to edit a SimpleProcess description in-place using a builderstatic org.vast.sensorML.SMLHelper.LinkTarget
findComponentByPath
(AbstractProcess parent, String linkString) Finds a component in a process/component tree using a path.
Link path format is either '[components/{component_name}/...][inputs|outputs|parameters]/{name}/{name}/...static String
getComponentPath
(IProcessExec process, DataComponent component) Constructs the path to link to the specified componentstatic DataComponent
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.static DataEncoding
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.Deprecated.Methods inherited from class org.vast.swe.SWEHelper
assignBinaryEncoding, checkUom, checkUom, checkUom, createArray, createBoolean, createCategory, createCategoryRange, createChoice, createCount, createCountRange, createDataParser, createDataWriter, createGeometry, createMatrix, createQuantity, createQuantityRange, createRecord, createText, createTime, createTimeRange, createVector, ensureXmlCompatible, findComponent, findComponentByDefinition, findComponentByName, findComponentByPath, findComponentByPath, getCfUri, getComponentPath, getDBpediaUri, getDefaultBinaryEncoding, getDefaultEncoding, getEpsgUri, getPropertyUri, getQudtUri, getRootComponent, getTimeStampIndexer, newAllowedTimes, newAllowedTokens, newAllowedValues, newBinaryBlock, newBinaryComponent, newBinaryEncoding, newBinaryEncoding, newBoolean, newBoolean, newCategory, newCategory, newCategoryRange, newCount, newCount, newCount, newCount, newCountRange, newCountRange, newDataArray, newDataArray, newDataArray, newDataChoice, newDataRecord, newDataRecord, newDataStream, newDataStream, newEncodedValuesProperty, newLinkProperty, newLinkProperty, newLinkProperty, newMatrix, newMatrix, newNilValue, newNilValues, newPhenomenonTimeIsoUTC, newQuantity, newQuantity, newQuantity, newQuantity, newQuantityRange, newQuantityRange, newRgbImage, newSystemIdComponent, newText, newText, newTextEncoding, newTextEncoding, newTime, newTime, newTime, newTime, newTimeIsoUTC, newTimeRange, newTimeRange, newTimeStampIsoGPS, newTimeStampIsoUTC, newTimeStampOnBoardClock, newUnitReference, newVector, newVector, newXMLEncoding, wrapWithTimeStamp, wrapWithTimeStampUTC
-
Field Details
-
DEFAULT_SML_FACTORY
-
DEFAULT_SWE_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
-
identifiers
-
classifiers
-
characteristics
-
capabilities
-
conditions
-
-
Constructor Details
-
SMLHelper
public SMLHelper()Create a SML helper with the default factory -
SMLHelper
Create a SML helper with the provided factory- Parameters:
fac
- SML process object factory
-
SMLHelper
Deprecated.Use#edit(AbstractProcess)
that returns a builder
-
-
Method Details
-
createSimpleProcess
- Returns:
- A builder to create a new SimpleProcess
-
createAggregateProcess
- Returns:
- A builder to create a new AggregateProcess
-
createPhysicalComponent
- Returns:
- A builder to create a new PhysicalComponent
-
createPhysicalSystem
- Returns:
- A builder to create a new PhysicalSystem
-
createDeployment
- Returns:
- A builder to create a new Deployment
-
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
- Returns:
- A builder to create a new CharacteristicList
-
createCapabilityList
- Returns:
- A builder to create a new CapabilityList
-
createTerm
- Returns:
- A builder to create a new Term
-
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
- Returns:
- A builder to create a new SpatialFrame
-
getIOComponent
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
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 searchlinkString
- 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
Constructs the path to link to the specified component- Parameters:
process
- the process where the data component residescomponent
- the component to link to- Returns:
- Full path to input or output component
-
getFactory
-
newPhysicalSystem
Deprecated. -
addIdentifier
Deprecated. -
addSerialNumber
Deprecated.
-
#edit(AbstractProcess)
that returns a builder