Class CapabilityLibrary


  • public class CapabilityLibrary
    extends Object
    Capability library contains all of the capabilities and capability associations in the ontology.
    Author:
    hylli
    • Constructor Detail

      • CapabilityLibrary

        public CapabilityLibrary()
    • 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 term
        type - 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.