Class CapabilityLibrary
- java.lang.Object
-
- fi.tut.mei.capabilityQueryLib.model.CapabilityLibrary
-
public class CapabilityLibrary extends Object
Capability library contains all of the capabilities and capability associations in the ontology.- Author:
- hylli
-
-
Constructor Summary
Constructors Constructor Description CapabilityLibrary()
-
Method Summary
All Methods Instance Methods Concrete Methods Deprecated Methods Modifier and Type Method Description List<Capability>
getCapabilities()
get all of the capabilitiesCapability
getCapability(String name)
get a capability with a nameCapabilityAssociation
getCapabilityAssociation(String name)
Deprecated.Always returns null since associations no longer have names.List<CapabilityAssociation>
getCapabilityAssociations()
Deprecated.Returns always an empty list since associations are no longer kept here.Capability
getOrCreateCapability(String name)
get a capability with a name.List<Capability>
searchCapability(String searchTerm, fi.tut.mei.resdescapi.util.Util.EnumSearchType type)
Search capability by name.List<String>
viewParameters(String capabilityName)
List all parameters of a capability as list of strings.
-
-
-
Method Detail
-
getCapability
public Capability getCapability(String name)
get a capability with a name- Parameters:
name
- the capability name.- Returns:
- null if not found
-
getOrCreateCapability
public Capability getOrCreateCapability(String name)
get a capability with a name. If not found create a new capability.- Parameters:
name
- capability name- Returns:
- the capability
-
searchCapability
public List<Capability> searchCapability(String searchTerm, fi.tut.mei.resdescapi.util.Util.EnumSearchType type)
Search capability by name.- Parameters:
searchTerm
- the search termtype
- how to search: capability name starts with, ends with, contains or exactly matches the search term.- Returns:
- List of capabilities that match the search term.
-
getCapabilityAssociation
@Deprecated public CapabilityAssociation getCapabilityAssociation(String name)
Deprecated.Always returns null since associations no longer have names.get capability association by name- Parameters:
name
- association name- Returns:
- null if not found
-
getCapabilities
public List<Capability> getCapabilities()
get all of the capabilities- Returns:
- all capabilities
-
getCapabilityAssociations
@Deprecated public List<CapabilityAssociation> getCapabilityAssociations()
Deprecated.Returns always an empty list since associations are no longer kept here.get all capability associations- Returns:
- all capability associations
-
viewParameters
public List<String> viewParameters(String capabilityName)
List all parameters of a capability as list of strings. Strings represent the parameters as a hierarchy separated by / for example payload or hasRotationMovementRanges/RotationalMovementRange/rotation_z- Parameters:
capabilityName
- name of a capability- Returns:
- a string for each parameter and parameter of each ParameterObject, Null if there is no capability with the given name.
-
-