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
A link attribute decorator. A decorator is used to decorate a particular value of the corresponding attribute. This value identifies the decorator.

An icon or a tag can be used as the decoration source (where the display or styling comes from). The Dcterms.PROPERTY_SOURCE is used (as an extended property) to dynamically save either the icon URI or the tag name.

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 Details

    • LinkDecorator

      public LinkDecorator()
  • Method Details

    • tag

      public static LinkDecorator tag(String identifier, String source, String label)
      Convenient method to create a tag 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 a icon 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 corresponding attribute must have to apply this decorator.
      Returns:
      this decorator's identifier.
    • setIdentifier

      public void setIdentifier(String identifier)
      Sets the value that the corresponding attribute 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.