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 Summary
ConstructorsConstructorDescriptionResourceType(ResourceType resourceType) Create an instance of ResourceType using its value in the annotation type. -
Method Summary
Modifier and TypeMethodDescriptionGets the children resource types of this type.Gets the children resource types of this type.Gets the domain defining this type.Gets the parent type of this type.Gets the optional parent type of this type.getTitle()Gets the title of the resource type, e.g.booleanisCompatibleWith(ResourceType resourceType) Determines whether this type is compatible with anotherResourceType.voidsetChildren(Collection<URI> children) Sets the children resource types of this type.voidSets the domain defining this type.voidSets the parent type of this type.voidSets the title of the resource type.Methods inherited from class org.eclipse.lyo.oslc4j.core.model.AbstractResource
addType, getAbout, getExtendedProperties, getTypes, setAbout, setExtendedProperties, setTypes
-
Constructor Details
-
ResourceType
public 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
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
Sets the domain defining this type.- Parameters:
domain- the domain defining this type.- Since:
- 3.13.0
-
getParent
Gets the parent type of this type.- Returns:
- parent type if available,
nullotherwise. - Since:
- 3.13.0
-
setParent
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
Sets the children resource types of this type.- Parameters:
children- the resource types of this type.- Since:
- 3.13.0
-
isCompatibleWith
Determines whether this type is compatible with anotherResourceType.- Parameters:
resourceType- the resource type to verify.- Returns:
trueifresourceTypeis equal or parent/ancestor of this type;falseotherwise.- Throws:
LinkingTypesStoreException- if an error prevents resource types from being retrieved.- Since:
- 3.13.0
-
getParentType
Gets the optional parent type of this type. UnlikegetParent(), returns the complete object and not just its URI.- Returns:
- an empty
Optionalif 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
Gets the children resource types of this type. UnlikegetChildren(), 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
-