Class ResourceType

java.lang.Object
org.eclipse.lyo.oslc4j.core.model.AbstractResource
com.sodius.oslc.server.process.model.ResourceType
All Implemented Interfaces:
IExtendedResource, IResource

@OslcNamespace("http://www.sodius.com/ns/process#") @OslcResourceShape(title="Resource Type Resource Shape", describes="http://www.sodius.com/ns/process#ResourceType") public class ResourceType extends AbstractResource
A resource type.
Since:
3.7.0.
  • Constructor Details

    • ResourceType

      public ResourceType()
    • ResourceType

      public ResourceType(ResourceType resourceType)
      Create an instance of ResourceType using its value in the annotation type.
      Parameters:
      resourceType - standard resource type.
      Since:
      3.13.0
  • Method Details

    • getTitle

      @OslcPropertyDefinition("http://purl.org/dc/terms/title") @OslcValueType(XMLLiteral) public String getTitle()
      Gets the title of the resource type, e.g. "Change Request".
      Returns:
      the title of this type.
    • setTitle

      public void setTitle(String title)
      Sets the title of the resource type.
      Parameters:
      title - the title of the resource type.
    • getDomain

      @OslcPropertyDefinition("http://open-services.net/ns/core#domain") @OslcRepresentation(Inline) @OslcValueType(LocalResource) public Domain getDomain()
      Gets the domain defining this type.
      Returns:
      the domain defining this type.
      Since:
      3.13.0
    • setDomain

      public void setDomain(Domain domain)
      Sets the domain defining this type.
      Parameters:
      domain - the domain defining this type.
      Since:
      3.13.0
    • getParent

      @OslcPropertyDefinition("http://www.sodius.com/ns/process#parent") public URI getParent()
      Gets the parent type of this type.
      Returns:
      parent type if available, null otherwise.
      Since:
      3.13.0
    • setParent

      public void setParent(URI parent)
      Sets the parent type of this type.
      Parameters:
      parent - the parent type.
      Since:
      3.13.0
    • getChildren

      @OslcPropertyDefinition("http://www.sodius.com/ns/process#child") @OslcName("child") public Collection<URI> getChildren()
      Gets the children resource types of this type.
      Returns:
      children resource types of this type.
      Since:
      3.13.0
    • setChildren

      public void setChildren(Collection<URI> children)
      Sets the children resource types of this type.
      Parameters:
      children - the resource types of this type.
      Since:
      3.13.0
    • isCompatibleWith

      public boolean isCompatibleWith(ResourceType resourceType) throws LinkingTypesStoreException
      Determines whether this type is compatible with another ResourceType.
      Parameters:
      resourceType - the resource type to verify.
      Returns:
      true if resourceType is equal or parent/ancestor of this type; false otherwise.
      Throws:
      LinkingTypesStoreException - if an error prevents resource types from being retrieved.
      Since:
      3.13.0
    • getParentType

      public Optional<ResourceType> getParentType() throws LinkingTypesStoreException
      Gets the optional parent type of this type. Unlike getParent(), returns the complete object and not just its URI.
      Returns:
      an empty Optional if this type has no parent; the contained reference otherwise.
      Throws:
      LinkingTypesStoreException - if an error prevents resource types from being retrieved.
      Since:
      3.13.0
    • getChildrenTypes

      public Collection<ResourceType> getChildrenTypes() throws LinkingTypesStoreException
      Gets the children resource types of this type. Unlike getChildren(), returns the complete objects and not just their URIs.
      Returns:
      children resource types of this type.
      Throws:
      LinkingTypesStoreException - if an error prevents resource types from being retrieved.
      Since:
      3.13.0