Class ResourceProperties


  • public class ResourceProperties
    extends Object
    Provides methods for getting and setting property values on an OSLC resource.

    Referencing OSLC Properties

    All methods expect as argument an OSLC resource and an OSLC property. The OSLC property can be referenced in four different ways:

    • using a qualified name, e.g. Dcterms.qname("title"),
    • using a property definition as a String, e.g. "http://purl.org/dc/terms/title",
    • using a property definition URI, e.g. URI.create("http://purl.org/dc/terms/title"),
    • using a Property resource as defined by a ResourceShape, e.g. myShape.getProperties()[0].

    Getting a property value

    This class provides methods for getting a property value, using either the corresponding getter method declared by the underlying resource class (if any) or its extended properties storage.

    For example, the following code reads the dcterms:title value of an OSLC resource:

     String title = ResourceProperties.getString(resource, Dcterms.PROPERTY_TITLE);
     

    Here is the how the property value is obtained:

    1. The resource class is first inspected for a getter method defining an OslcPropertyDefinition annotation matching the specified property.
    2. If such method is found, it is invoked and the underlying value is returned.
    3. If no such method is found, the property value is searched in the Map returned by the resource IExtendedResource.getExtendedProperties() method.

    Getter methods generally return the underlying property value as is. They throw a ClassCastException if the underlying value does not match the type defined by the getter method (e.g. calling getInteger() on a boolean property).

    Below are the exceptions to this general contract:

    • Getter methods returning a String unwrap the underlying XMLLiteral to obtain its String content, if any.
    • Getter methods returning a Boolean parse the underlying String or XMLLiteral to obtain a boolean out of it, if any.
    • Getter methods returning a collection (e.g. getLinks()):
      • wrap the underlying array value returned by the resource class method as a collection, if any.
      • wrap a single value referenced in extended properties as a collection, if any.
    • Getter methods returning a Link or a collection of Link wrap the underlying URI value as a Link, if any.
    • Getter methods returning a URI or a collection of URI unwrap the underlying Link value as a URI, if any.

    Setting a property value

    This class also provides methods for setting a property value, using either the corresponding setter method declared by the underlying resource class (if any) or its extended properties storage.

    For example, the following code changes the dcterms:title value of an OSLC resource:

     ResourceProperties.setString(resource, Dcterms.PROPERTY_TITLE, "The new resource title");
     

    Here is the how the property value is set:

    1. The resource class is first inspected for a setter method pairing a getter method defining a OslcPropertyDefinition annotation matching the specified property.
    2. If such method is found, it is invoked with the property value as argument.
    3. If no such method is found, the property value is set in the Map returned by the resource IExtendedResource.getExtendedProperties() method.

      Warning: In that case the namespace prefix of the property is unknown, unless the given property parameter is a QName instance containing the prefix.

    Setter methods generally set the provided property value as is. They throw an IllegalArgumentException if the provided value does not match the type defined by the setter method (e.g. calling setString() on a boolean property).

    Below are the exceptions to this general contract:

    • Setter methods expecting a Link convert it to a URI value, if required by the underlying resource class setter method.
    • Setter methods expecting a URI convert it to a Link value, if required by the underlying resource class setter method.

    Updating a collection of property values

    Collections returned by getter methods are modifiable. All modifications made in the returned collection are replicated on the underlying resource:

    • If there is a setter method for the OSLC property, it is called with the updated collection on every change made (e.g. on each call to add() or remove()).
    • If the collection originates from a call to IExtendedResource.getExtendedProperties(), here is the update process:
      • If the new collection is empty, the property is removed from extended properties.
      • If the new collection contains only one element, the element itself is set in extended properties.
      • If the new collection contains many elements, the collection is set in extended properties.
    Since:
    1.3.0
    • Method Detail

      • getObject

        public static Object getObject​(IExtendedResource resource,
                                       QName qname)
        Returns the value for the property specified as a qualified name. Refer to this class documentation for details on this operation.
        Parameters:
        resource - the OSLC resource holding property values.
        qname - the qualified name of the OSLC property (e.g. Dcterms.qname("title")).
        Returns:
        the underlying property value, null if not present.
      • getObject

        public static Object getObject​(IExtendedResource resource,
                                       URI propertyDefinition)
        Returns the value for the property specified as a URI. Refer to this class documentation for details on this operation.
        Parameters:
        resource - the OSLC resource holding property values.
        propertyDefinition - the URI of the OSLC property (e.g. URI.create("http://purl.org/dc/terms/title")).
        Returns:
        the underlying property value, null if not present.
      • getObject

        public static Object getObject​(IExtendedResource resource,
                                       String propertyDefinition)
        Returns the value for the property specified as a String. Refer to this class documentation for details on this operation.
        Parameters:
        resource - the OSLC resource holding property values.
        propertyDefinition - the qualified name of the OSLC property (e.g. "http://purl.org/dc/terms/title").
        Returns:
        the underlying property value, null if not present.
        Since:
        1.4.0
      • getObject

        public static Object getObject​(IExtendedResource resource,
                                       Property property)
        Returns the value for the specified property. Refer to this class documentation for details on this operation.
        Parameters:
        resource - the OSLC resource holding property values.
        property - the OSLC property, as defined by the resource shape.
        Returns:
        the underlying property value, null if not present.
      • setObject

        public static void setObject​(IExtendedResource resource,
                                     QName qname,
                                     Object value)
        Changes the value of the property specified as a qualified name.
        Parameters:
        resource - the OSLC resource holding property values.
        qname - the qualified name of the OSLC property (e.g. Dcterms.qname("title")).
        value - the new value to assign (possibly null)
      • setObject

        public static void setObject​(IExtendedResource resource,
                                     URI propertyDefinition,
                                     Object value)
        Changes the value of the property specified as a qualified name.
        Parameters:
        resource - the OSLC resource holding property values.
        propertyDefinition - the URI of the OSLC property (e.g. URI.create("http://purl.org/dc/terms/title")).
        value - the new value to assign (possibly null)
      • setObject

        public static void setObject​(IExtendedResource resource,
                                     String propertyDefinition,
                                     Object value)
        Changes the value of the property specified as a qualified name.
        Parameters:
        resource - the OSLC resource holding property values.
        propertyDefinition - the qualified name of the OSLC property (e.g. "http://purl.org/dc/terms/title").
        value - the new value to assign (possibly null)
        Since:
        1.4.0
      • setObject

        public static void setObject​(IExtendedResource resource,
                                     Property property,
                                     Object value)
        Changes the value of the property defined by a resource shape.
        Parameters:
        resource - the OSLC resource holding property values.
        property - the OSLC property, as defined by the resource shape.
        value - the new value to assign (possibly null)
      • getString

        public static String getString​(IExtendedResource resource,
                                       QName qname)
        Returns the value for the String property specified as a qualified name. Refer to this class documentation for details on this operation.
        Parameters:
        resource - the OSLC resource holding property values.
        qname - the qualified name of the OSLC property (e.g. Dcterms.qname("title")).
        Returns:
        the underlying property value, null if not present.
      • getString

        public static String getString​(IExtendedResource resource,
                                       URI propertyDefinition)
        Returns the value for the String property specified as a URI. Refer to this class documentation for details on this operation.
        Parameters:
        resource - the OSLC resource holding property values.
        propertyDefinition - the URI of the OSLC property (e.g. URI.create("http://purl.org/dc/terms/title")).
        Returns:
        the underlying property value, null if not present.
      • getString

        public static String getString​(IExtendedResource resource,
                                       String propertyDefinition)
        Returns the value for the String property specified as a String. Refer to this class documentation for details on this operation.
        Parameters:
        resource - the OSLC resource holding property values.
        propertyDefinition - the qualified name of the OSLC property (e.g. "http://purl.org/dc/terms/title").
        Returns:
        the underlying property value, null if not present.
        Since:
        1.4.0
      • getString

        public static String getString​(IExtendedResource resource,
                                       Property property)
        Returns the value for the specified String property. Refer to this class documentation for details on this operation.
        Parameters:
        resource - the OSLC resource holding property values.
        property - the OSLC property, as defined by the resource shape.
        Returns:
        the underlying property value, null if not present.
      • setString

        public static void setString​(IExtendedResource resource,
                                     QName qname,
                                     String value)
        Changes the value of the String property specified as a qualified name.
        Parameters:
        resource - the OSLC resource holding property values.
        qname - the qualified name of the OSLC property (e.g. Dcterms.qname("title")).
        value - the new value to assign (possibly null)
      • setString

        public static void setString​(IExtendedResource resource,
                                     URI propertyDefinition,
                                     String value)
        Changes the value of the String property specified as a qualified name.
        Parameters:
        resource - the OSLC resource holding property values.
        propertyDefinition - the URI of the OSLC property (e.g. URI.create("http://purl.org/dc/terms/title")).
        value - the new value to assign (possibly null)
      • setString

        public static void setString​(IExtendedResource resource,
                                     String propertyDefinition,
                                     String value)
        Changes the value of the String property specified as a qualified name.
        Parameters:
        resource - the OSLC resource holding property values.
        propertyDefinition - the qualified name of the OSLC property (e.g. "http://purl.org/dc/terms/title").
        value - the new value to assign (possibly null)
        Since:
        1.4.0
      • setString

        public static void setString​(IExtendedResource resource,
                                     Property property,
                                     String value)
        Changes the value of the String property defined by a resource shape.
        Parameters:
        resource - the OSLC resource holding property values.
        property - the OSLC property, as defined by the resource shape.
        value - the new value to assign (possibly null)
      • getBoolean

        public static Boolean getBoolean​(IExtendedResource resource,
                                         QName qname)
        Returns the value for the Boolean property specified as a qualified name. Refer to this class documentation for details on this operation.
        Parameters:
        resource - the OSLC resource holding property values.
        qname - the qualified name of the OSLC property.
        Returns:
        the underlying property value, null if not present.
      • getBoolean

        public static Boolean getBoolean​(IExtendedResource resource,
                                         URI propertyDefinition)
        Returns the value for the Boolean property specified as a URI. Refer to this class documentation for details on this operation.
        Parameters:
        resource - the OSLC resource holding property values.
        propertyDefinition - the URI of the OSLC property.
        Returns:
        the underlying property value, null if not present.
      • getBoolean

        public static Boolean getBoolean​(IExtendedResource resource,
                                         String propertyDefinition)
        Returns the value for the Boolean property specified as a String. Refer to this class documentation for details on this operation.
        Parameters:
        resource - the OSLC resource holding property values.
        propertyDefinition - the qualified name of the OSLC property.
        Returns:
        the underlying property value, null if not present.
        Since:
        1.4.0
      • getBoolean

        public static Boolean getBoolean​(IExtendedResource resource,
                                         Property property)
        Returns the value for the specified Boolean property. Refer to this class documentation for details on this operation.
        Parameters:
        resource - the OSLC resource holding property values.
        property - the OSLC property, as defined by the resource shape.
        Returns:
        the underlying property value, null if not present.
      • setBoolean

        public static void setBoolean​(IExtendedResource resource,
                                      QName qname,
                                      Boolean value)
        Changes the value of the Boolean property specified as a qualified name.
        Parameters:
        resource - the OSLC resource holding property values.
        qname - the qualified name of the OSLC property.
        value - the new value to assign (possibly null)
      • setBoolean

        public static void setBoolean​(IExtendedResource resource,
                                      URI propertyDefinition,
                                      Boolean value)
        Changes the value of the Boolean property specified as a qualified name.
        Parameters:
        resource - the OSLC resource holding property values.
        propertyDefinition - the URI of the OSLC property.
        value - the new value to assign (possibly null)
      • setBoolean

        public static void setBoolean​(IExtendedResource resource,
                                      String propertyDefinition,
                                      Boolean value)
        Changes the value of the Boolean property specified as a qualified name.
        Parameters:
        resource - the OSLC resource holding property values.
        propertyDefinition - the qualified name of the OSLC property.
        value - the new value to assign (possibly null)
        Since:
        1.4.0
      • setBoolean

        public static void setBoolean​(IExtendedResource resource,
                                      Property property,
                                      Boolean value)
        Changes the value of the Boolean property defined by a resource shape.
        Parameters:
        resource - the OSLC resource holding property values.
        property - the OSLC property, as defined by the resource shape.
        value - the new value to assign (possibly null)
      • getInteger

        public static Integer getInteger​(IExtendedResource resource,
                                         QName qname)
        Returns the value for the Integer property specified as a qualified name. Refer to this class documentation for details on this operation.
        Parameters:
        resource - the OSLC resource holding property values.
        qname - the qualified name of the OSLC property.
        Returns:
        the underlying property value, null if not present.
      • getInteger

        public static Integer getInteger​(IExtendedResource resource,
                                         URI propertyDefinition)
        Returns the value for the Integer property specified as a URI. Refer to this class documentation for details on this operation.
        Parameters:
        resource - the OSLC resource holding property values.
        propertyDefinition - the URI of the OSLC property.
        Returns:
        the underlying property value, null if not present.
      • getInteger

        public static Integer getInteger​(IExtendedResource resource,
                                         String propertyDefinition)
        Returns the value for the Integer property specified as a String. Refer to this class documentation for details on this operation.
        Parameters:
        resource - the OSLC resource holding property values.
        propertyDefinition - the qualified name of the OSLC property.
        Returns:
        the underlying property value, null if not present.
        Since:
        1.4.0
      • getInteger

        public static Integer getInteger​(IExtendedResource resource,
                                         Property property)
        Returns the value for the specified Integer property. Refer to this class documentation for details on this operation.
        Parameters:
        resource - the OSLC resource holding property values.
        property - the OSLC property, as defined by the resource shape.
        Returns:
        the underlying property value, null if not present.
      • setInteger

        public static void setInteger​(IExtendedResource resource,
                                      QName qname,
                                      Integer value)
        Changes the value of the Integer property specified as a qualified name.
        Parameters:
        resource - the OSLC resource holding property values.
        qname - the qualified name of the OSLC property.
        value - the new value to assign (possibly null)
      • setInteger

        public static void setInteger​(IExtendedResource resource,
                                      URI propertyDefinition,
                                      Integer value)
        Changes the value of the Integer property specified as a qualified name.
        Parameters:
        resource - the OSLC resource holding property values.
        propertyDefinition - the URI of the OSLC property.
        value - the new value to assign (possibly null)
      • setInteger

        public static void setInteger​(IExtendedResource resource,
                                      String propertyDefinition,
                                      Integer value)
        Changes the value of the Integer property specified as a qualified name.
        Parameters:
        resource - the OSLC resource holding property values.
        propertyDefinition - the qualified name of the OSLC property.
        value - the new value to assign (possibly null)
        Since:
        1.4.0
      • setInteger

        public static void setInteger​(IExtendedResource resource,
                                      Property property,
                                      Integer value)
        Changes the value of the Integer property defined by a resource shape.
        Parameters:
        resource - the OSLC resource holding property values.
        property - the OSLC property, as defined by the resource shape.
        value - the new value to assign (possibly null)
      • getDate

        public static Date getDate​(IExtendedResource resource,
                                   QName qname)
        Returns the value for the Date property specified as a qualified name. Refer to this class documentation for details on this operation.
        Parameters:
        resource - the OSLC resource holding property values.
        qname - the qualified name of the OSLC property (e.g. OslcCore.qname("created")).
        Returns:
        the underlying property value, null if not present.
      • getDate

        public static Date getDate​(IExtendedResource resource,
                                   URI propertyDefinition)
        Returns the value for the Date property specified as a URI. Refer to this class documentation for details on this operation.
        Parameters:
        resource - the OSLC resource holding property values.
        propertyDefinition - the URI of the OSLC property (e.g. URI.create("http://open-services.net/ns/core#created")).
        Returns:
        the underlying property value, null if not present.
      • getDate

        public static Date getDate​(IExtendedResource resource,
                                   String propertyDefinition)
        Returns the value for the Date property specified as a String. Refer to this class documentation for details on this operation.
        Parameters:
        resource - the OSLC resource holding property values.
        propertyDefinition - the qualified name of the OSLC property (e.g. "http://open-services.net/ns/core#created").
        Returns:
        the underlying property value, null if not present.
        Since:
        1.4.0
      • getDate

        public static Date getDate​(IExtendedResource resource,
                                   Property property)
        Returns the value for the specified Date property. Refer to this class documentation for details on this operation.
        Parameters:
        resource - the OSLC resource holding property values.
        property - the OSLC property, as defined by the resource shape.
        Returns:
        the underlying property value, null if not present.
      • setDate

        public static void setDate​(IExtendedResource resource,
                                   QName qname,
                                   Date value)
        Changes the value of the Date property specified as a qualified name.
        Parameters:
        resource - the OSLC resource holding property values.
        qname - the qualified name of the OSLC property (e.g. OslcCore.qname("created")).
        value - the new value to assign (possibly null)
      • setDate

        public static void setDate​(IExtendedResource resource,
                                   URI propertyDefinition,
                                   Date value)
        Changes the value of the Date property specified as a qualified name.
        Parameters:
        resource - the OSLC resource holding property values.
        propertyDefinition - the URI of the OSLC property (e.g. URI.create("http://open-services.net/ns/core#created")).
        value - the new value to assign (possibly null)
      • setDate

        public static void setDate​(IExtendedResource resource,
                                   String propertyDefinition,
                                   Date value)
        Changes the value of the Date property specified as a qualified name.
        Parameters:
        resource - the OSLC resource holding property values.
        propertyDefinition - the qualified name of the OSLC property (e.g. "http://open-services.net/ns/core#created").
        value - the new value to assign (possibly null)
        Since:
        1.4.0
      • setDate

        public static void setDate​(IExtendedResource resource,
                                   Property property,
                                   Date value)
        Changes the value of the Date property defined by a resource shape.
        Parameters:
        resource - the OSLC resource holding property values.
        property - the OSLC property, as defined by the resource shape.
        value - the new value to assign (possibly null)
      • getURI

        public static URI getURI​(IExtendedResource resource,
                                 QName qname)
        Returns the value for the URI property specified as a qualified name. Refer to this class documentation for details on this operation.
        Parameters:
        resource - the OSLC resource holding property values.
        qname - the qualified name of the OSLC property (e.g. OslcCore.qname("serviceProvider")).
        Returns:
        the underlying property value, null if not present.
      • getURI

        public static URI getURI​(IExtendedResource resource,
                                 URI propertyDefinition)
        Returns the value for the URI property specified as a URI. Refer to this class documentation for details on this operation.
        Parameters:
        resource - the OSLC resource holding property values.
        propertyDefinition - the URI of the OSLC property (e.g. URI.create("http://open-services.net/ns/core#serviceProvider")).
        Returns:
        the underlying property value, null if not present.
      • getURI

        public static URI getURI​(IExtendedResource resource,
                                 String propertyDefinition)
        Returns the value for the URI property specified as a String. Refer to this class documentation for details on this operation.
        Parameters:
        resource - the OSLC resource holding property values.
        propertyDefinition - the qualified name of the OSLC property (e.g. "http://open-services.net/ns/core#serviceProvider").
        Returns:
        the underlying property value, null if not present.
        Since:
        1.4.0
      • getURI

        public static URI getURI​(IExtendedResource resource,
                                 Property property)
        Returns the value for the specified URI property. Refer to this class documentation for details on this operation.
        Parameters:
        resource - the OSLC resource holding property values.
        property - the OSLC property, as defined by the resource shape.
        Returns:
        the underlying property value, null if not present.
      • setURI

        public static void setURI​(IExtendedResource resource,
                                  QName qname,
                                  URI value)
        Changes the value of the URI property specified as a qualified name.
        Parameters:
        resource - the OSLC resource holding property values.
        qname - the qualified name of the OSLC property (e.g. OslcCore.qname("serviceProvider")).
        value - the new value to assign (possibly null)
      • setURI

        public static void setURI​(IExtendedResource resource,
                                  URI propertyDefinition,
                                  URI value)
        Changes the value of the URI property specified as a qualified name.
        Parameters:
        resource - the OSLC resource holding property values.
        propertyDefinition - the URI of the OSLC property (e.g. URI.create("http://open-services.net/ns/core#serviceProvider")).
        value - the new value to assign (possibly null)
      • setURI

        public static void setURI​(IExtendedResource resource,
                                  String propertyDefinition,
                                  URI value)
        Changes the value of the URI property specified as a qualified name.
        Parameters:
        resource - the OSLC resource holding property values.
        propertyDefinition - the qualified name of the OSLC property (e.g. "http://open-services.net/ns/core#serviceProvider").
        value - the new value to assign (possibly null)
        Since:
        1.4.0
      • setURI

        public static void setURI​(IExtendedResource resource,
                                  Property property,
                                  URI value)
        Changes the value of the URI property defined by a resource shape.
        Parameters:
        resource - the OSLC resource holding property values.
        property - the OSLC property, as defined by the resource shape.
        value - the new value to assign (possibly null)
      • getLink

        public static Link getLink​(IExtendedResource resource,
                                   QName qname)
        Returns the value for the Link property specified as a qualified name. Refer to this class documentation for details on this operation.
        Parameters:
        resource - the OSLC resource holding property values.
        qname - the qualified name of the OSLC property (e.g. OslcCore.qname("serviceProvider")).
        Returns:
        the underlying property value, null if not present.
      • getLink

        public static Link getLink​(IExtendedResource resource,
                                   URI propertyDefinition)
        Returns the value for the Link property specified as a URI. Refer to this class documentation for details on this operation.
        Parameters:
        resource - the OSLC resource holding property values.
        propertyDefinition - the URI of the OSLC property (e.g. URI.create("http://open-services.net/ns/core#serviceProvider")).
        Returns:
        the underlying property value, null if not present.
      • getLink

        public static Link getLink​(IExtendedResource resource,
                                   String propertyDefinition)
        Returns the value for the Link property specified as a String. Refer to this class documentation for details on this operation.
        Parameters:
        resource - the OSLC resource holding property values.
        propertyDefinition - the qualified name of the OSLC property (e.g. "http://open-services.net/ns/core#serviceProvider").
        Returns:
        the underlying property value, null if not present.
        Since:
        1.4.0
      • getLink

        public static Link getLink​(IExtendedResource resource,
                                   Property property)
        Returns the value for the specified Link property. Refer to this class documentation for details on this operation.
        Parameters:
        resource - the OSLC resource holding property values.
        property - the OSLC property, as defined by the resource shape.
        Returns:
        the underlying property value, null if not present.
      • setLink

        public static void setLink​(IExtendedResource resource,
                                   QName qname,
                                   Link value)
        Changes the value of the Link property specified as a qualified name.
        Parameters:
        resource - the OSLC resource holding property values.
        qname - the qualified name of the OSLC property (e.g. OslcCore.qname("serviceProvider")).
        value - the new value to assign (possibly null)
      • setLink

        public static void setLink​(IExtendedResource resource,
                                   URI propertyDefinition,
                                   Link value)
        Changes the value of the Link property specified as a qualified name.
        Parameters:
        resource - the OSLC resource holding property values.
        propertyDefinition - the URI of the OSLC property (e.g. URI.create("http://open-services.net/ns/core#serviceProvider")).
        value - the new value to assign (possibly null)
      • setLink

        public static void setLink​(IExtendedResource resource,
                                   String propertyDefinition,
                                   Link value)
        Changes the value of the Link property specified as a qualified name.
        Parameters:
        resource - the OSLC resource holding property values.
        propertyDefinition - the qualified name of the OSLC property (e.g. "http://open-services.net/ns/core#serviceProvider").
        value - the new value to assign (possibly null)
        Since:
        1.4.0
      • setLink

        public static void setLink​(IExtendedResource resource,
                                   Property property,
                                   Link value)
        Changes the value of the Link property defined by a resource shape.
        Parameters:
        resource - the OSLC resource holding property values.
        property - the OSLC property, as defined by the resource shape.
        value - the new value to assign (possibly null)
      • getStrings

        public static Collection<String> getStrings​(IExtendedResource resource,
                                                    QName qname)
        Returns the collection of values for the String property specified as a qualified name. Refer to this class documentation for details on this operation.
        Parameters:
        resource - the OSLC resource holding property values.
        qname - the qualified name of the OSLC property.
        Returns:
        the collection of property values.
      • getStrings

        public static Collection<String> getStrings​(IExtendedResource resource,
                                                    URI propertyDefinition)
        Returns the collection of values for the String property specified as a URI. Refer to this class documentation for details on this operation.
        Parameters:
        resource - the OSLC resource holding property values.
        propertyDefinition - the URI of the OSLC property.
        Returns:
        the collection of property values.
      • getStrings

        public static Collection<String> getStrings​(IExtendedResource resource,
                                                    String propertyDefinition)
        Returns the collection of values for the String property specified as a String. Refer to this class documentation for details on this operation.
        Parameters:
        resource - the OSLC resource holding property values.
        propertyDefinition - the qualified name of the OSLC property.
        Returns:
        the collection of property values.
        Since:
        1.4.0
      • getStrings

        public static Collection<String> getStrings​(IExtendedResource resource,
                                                    Property property)
        Returns the collection of values for the specified String property. Refer to this class documentation for details on this operation.
        Parameters:
        resource - the OSLC resource holding property values.
        property - the OSLC property, as defined by the resource shape.
        Returns:
        the collection of property values.
      • getURIs

        public static Collection<URI> getURIs​(IExtendedResource resource,
                                              QName qname)
        Returns the collection of values for the URI property specified as a qualified name. Refer to this class documentation for details on this operation.
        Parameters:
        resource - the OSLC resource holding property values.
        qname - the qualified name of the OSLC property.
        Returns:
        the collection of property values.
      • getURIs

        public static Collection<URI> getURIs​(IExtendedResource resource,
                                              URI propertyDefinition)
        Returns the collection of values for the URI property specified as a URI. Refer to this class documentation for details on this operation.
        Parameters:
        resource - the OSLC resource holding property values.
        propertyDefinition - the URI of the OSLC property.
        Returns:
        the collection of property values.
      • getURIs

        public static Collection<URI> getURIs​(IExtendedResource resource,
                                              String propertyDefinition)
        Returns the collection of values for the URI property specified as a String. Refer to this class documentation for details on this operation.
        Parameters:
        resource - the OSLC resource holding property values.
        propertyDefinition - the qualified name of the OSLC property.
        Returns:
        the collection of property values.
        Since:
        1.4.0
      • getURIs

        public static Collection<URI> getURIs​(IExtendedResource resource,
                                              Property property)
        Returns the collection of values for the specified URI property. Refer to this class documentation for details on this operation.
        Parameters:
        resource - the OSLC resource holding property values.
        property - the OSLC property, as defined by the resource shape.
        Returns:
        the collection of property values.
      • getLinks

        public static Collection<Link> getLinks​(IExtendedResource resource,
                                                QName qname)
        Returns the collection of values for the Link property specified as a qualified name. Refer to this class documentation for details on this operation.
        Parameters:
        resource - the OSLC resource holding property values.
        qname - the qualified name of the OSLC property.
        Returns:
        the collection of property values.
      • getLinks

        public static Collection<Link> getLinks​(IExtendedResource resource,
                                                URI propertyDefinition)
        Returns the collection of values for the Link property specified as a URI. Refer to this class documentation for details on this operation.
        Parameters:
        resource - the OSLC resource holding property values.
        propertyDefinition - the URI of the OSLC property.
        Returns:
        the collection of property values.
      • getLinks

        public static Collection<Link> getLinks​(IExtendedResource resource,
                                                String propertyDefinition)
        Returns the collection of values for the Link property specified as a String. Refer to this class documentation for details on this operation.
        Parameters:
        resource - the OSLC resource holding property values.
        propertyDefinition - the qualified name of the OSLC property.
        Returns:
        the collection of property values.
        Since:
        1.4.0
      • getLinks

        public static Collection<Link> getLinks​(IExtendedResource resource,
                                                Property property)
        Returns the collection of values for the specified Link property. Refer to this class documentation for details on this operation.
        Parameters:
        resource - the OSLC resource holding property values.
        property - the OSLC property, as defined by the resource shape.
        Returns:
        the collection of property values.