Package jadex.bridge.sensor.service
Class TagProperty
- java.lang.Object
-
- jadex.bridge.nonfunctional.AbstractNFProperty<java.util.Collection<java.lang.String>,java.lang.Void>
-
- jadex.bridge.sensor.service.TagProperty
-
- All Implemented Interfaces:
INFProperty<java.util.Collection<java.lang.String>,java.lang.Void>
public class TagProperty extends AbstractNFProperty<java.util.Collection<java.lang.String>,java.lang.Void>
Tagging a service with a string for searching specifically tagged services. Allows tagging with single tags and tag collections. a) allows for tagging via creation parameters b) allows for tagging by referencing an argument (which is read to get the tags)
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from interface jadex.bridge.nonfunctional.INFProperty
INFProperty.Target
-
-
Field Summary
Fields Modifier and Type Field Description static java.lang.String
ARGUMENT
The argument constant.protected IInternalAccess
component
The component.static java.lang.String
JADEX_VERSION
static java.lang.String
NAME
The name of the property.protected java.util.Map<java.lang.String,java.lang.Object>
params
The parameters.static java.lang.String
PLATFORM_NAME
static java.lang.String
SERVICE_PROPERTY_NAME
The key used to store the tags in the service property map.-
Fields inherited from class jadex.bridge.nonfunctional.AbstractNFProperty
metainfo
-
-
Constructor Summary
Constructors Constructor Description TagProperty(IInternalAccess comp, IService service, MethodInfo method, java.util.Map<java.lang.String,java.lang.Object> params)
Creates the property.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static void
checkReservedTag(java.lang.String tag)
Check if it is a reserved tag.static void
checkReservedTags(java.lang.String[] tags)
Check if it is a reserved tag.protected static java.util.Collection<java.lang.String>
convertToCollection(java.lang.Object obj)
Convert user defined tag(s) to collection.static java.util.Collection<java.lang.String>
createRuntimeTags(java.lang.Object vals, IExternalAccess component)
Create a collection of tags and replace the variable values.IFuture<java.util.Collection<java.lang.String>>
getValue(java.lang.Void unit)
Returns the current value of the property, performs unit conversion if necessary.-
Methods inherited from class jadex.bridge.nonfunctional.AbstractNFProperty
createProperty, dispose, getMetaInfo, getName, getPrettyPrintValue, getValue, readNFProperties
-
-
-
-
Field Detail
-
NAME
public static final java.lang.String NAME
The name of the property.- See Also:
- Constant Field Values
-
ARGUMENT
public static final java.lang.String ARGUMENT
The argument constant.- See Also:
- Constant Field Values
-
SERVICE_PROPERTY_NAME
public static final java.lang.String SERVICE_PROPERTY_NAME
The key used to store the tags in the service property map.- See Also:
- Constant Field Values
-
PLATFORM_NAME
public static final java.lang.String PLATFORM_NAME
- See Also:
- Constant Field Values
-
JADEX_VERSION
public static final java.lang.String JADEX_VERSION
- See Also:
- Constant Field Values
-
component
protected IInternalAccess component
The component.
-
params
protected java.util.Map<java.lang.String,java.lang.Object> params
The parameters.
-
-
Constructor Detail
-
TagProperty
public TagProperty(IInternalAccess comp, IService service, MethodInfo method, java.util.Map<java.lang.String,java.lang.Object> params)
Creates the property.
-
-
Method Detail
-
getValue
public IFuture<java.util.Collection<java.lang.String>> getValue(java.lang.Void unit)
Returns the current value of the property, performs unit conversion if necessary.- Parameters:
unit
- Unit of the returned value.- Returns:
- The current value of the property.
-
convertToCollection
protected static java.util.Collection<java.lang.String> convertToCollection(java.lang.Object obj)
Convert user defined tag(s) to collection.
-
createRuntimeTags
public static java.util.Collection<java.lang.String> createRuntimeTags(java.lang.Object vals, IExternalAccess component)
Create a collection of tags and replace the variable values.
-
checkReservedTags
public static void checkReservedTags(java.lang.String[] tags)
Check if it is a reserved tag.- Parameters:
tag
- The tag.
-
checkReservedTag
public static void checkReservedTag(java.lang.String tag)
Check if it is a reserved tag.- Parameters:
tag
- The tag.
-
-