Class LinkDecorator
- java.lang.Object
-
- org.eclipse.lyo.oslc4j.core.model.AbstractResource
-
- com.sodius.oslc.server.process.model.LinkDecorator
-
- All Implemented Interfaces:
IExtendedResource
,IResource
@OslcNamespace("http://www.sodius.com/ns/process#") @OslcResourceShape(title="Link Decorator Resource Shape", describes="http://www.sodius.com/ns/process#LinkDecorator") public class LinkDecorator extends AbstractResource
Alink attribute
decorator. A decorator is used to decorate a particular value of the corresponding attribute. This valueidentifies
the decorator.An
icon
or atag
can be used as the decoration source (where the display or styling comes from). TheDcterms.PROPERTY_SOURCE
is used (as an extended property) to dynamically save either the iconURI
or the tagname
.A
label
can be used to override the value to display, in a tag decorator (whose by default displays the attribute value), or to describe the image in an icon decorator.- Since:
- 3.3.0
-
-
Constructor Summary
Constructors Constructor Description LinkDecorator()
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description LinkDecorator
copy()
Convenient method to create a copy of this instance.String
getIdentifier()
Gets the value that the correspondingattribute
must have to apply this decorator.String
getLabel()
Gets this decorator's alias, if any.static LinkDecorator
icon(String identifier, URI source, String label)
Convenient method to create aicon
decorator.void
setIdentifier(String identifier)
Sets the value that the correspondingattribute
must have to apply this decorator.void
setLabel(String label)
Sets this decorator's alias.static LinkDecorator
tag(String identifier, String source, String label)
Convenient method to create atag
decorator.-
Methods inherited from class org.eclipse.lyo.oslc4j.core.model.AbstractResource
addType, getAbout, getExtendedProperties, getTypes, setAbout, setExtendedProperties, setTypes
-
-
-
-
Method Detail
-
tag
public static LinkDecorator tag(String identifier, String source, String label)
Convenient method to create atag
decorator.- Parameters:
identifier
- the link's attribute value to decorate.source
- the name/class of the tag to decorate the link.label
- decorator label.- Returns:
- the created decorator.
-
icon
public static LinkDecorator icon(String identifier, URI source, String label)
Convenient method to create aicon
decorator.- Parameters:
identifier
- the link's attribute value to decorate.source
- the icon URI to decorate the link.label
- decorator label.- Returns:
- the created decorator.
-
getIdentifier
@OslcTitle("Identifier") @OslcOccurs(ExactlyOne) @OslcValueType(String) @OslcPropertyDefinition("http://purl.org/dc/terms/identifier") @OslcDescription("The value that the corresponding attibute must have to apply this decorator") public String getIdentifier()
Gets the value that the correspondingattribute
must have to apply this decorator.- Returns:
- this decorator's identifier.
-
setIdentifier
public void setIdentifier(String identifier)
Sets the value that the correspondingattribute
must have to apply this decorator.- Parameters:
identifier
- this decorator's identifier.
-
getLabel
@OslcTitle("Label") @OslcOccurs(ZeroOrOne) @OslcValueType(String) @OslcPropertyDefinition("http://open-services.net/ns/core#label") @OslcDescription("The alias of this decorator") public String getLabel()
Gets this decorator's alias, if any.- Returns:
- this decorator's alias.
-
setLabel
public void setLabel(String label)
Sets this decorator's alias.- Parameters:
label
- this decorator's alias.
-
copy
public LinkDecorator copy()
Convenient method to create a copy of this instance.- Returns:
- a copy of this instance.
-
-