Class PropertyOptions


  • public final class PropertyOptions
    extends Options
    The property flags are used when properties are fetched from the XMPMeta-object and provide more detailed information about the property.
    Since:
    03.07.2006
    • Constructor Detail

      • PropertyOptions

        public PropertyOptions()
        Default constructor
      • PropertyOptions

        public PropertyOptions​(int options)
                        throws XMPException
        Intialization constructor
        Parameters:
        options - the initialization options
        Throws:
        XMPException - If the options are not valid
    • Method Detail

      • isURI

        public boolean isURI()
        Returns:
        Return whether the property value is a URI. It is serialized to RDF using the rdf:resource attribute. Not mandatory for URIs, but considered RDF-savvy.
      • setURI

        public PropertyOptions setURI​(boolean value)
        Parameters:
        value - the value to set
        Returns:
        Returns this to enable cascaded options.
      • getHasQualifiers

        public boolean getHasQualifiers()
        Returns:
        Return whether the property has qualifiers. These could be an xml:lang attribute, an rdf:type property, or a general qualifier. See the introductory discussion of qualified properties for more information.
      • setHasQualifiers

        public PropertyOptions setHasQualifiers​(boolean value)
        Parameters:
        value - the value to set
        Returns:
        Returns this to enable cascaded options.
      • isQualifier

        public boolean isQualifier()
        Returns:
        Return whether this property is a qualifier for some other property. Note that if the qualifier itself has a structured value, this flag is only set for the top node of the qualifier's subtree. Qualifiers may have arbitrary structure, and may even have qualifiers.
      • setQualifier

        public PropertyOptions setQualifier​(boolean value)
        Parameters:
        value - the value to set
        Returns:
        Returns this to enable cascaded options.
      • getHasLanguage

        public boolean getHasLanguage()
        Returns:
        Return whether this property has an xml:lang qualifier.
      • setHasLanguage

        public PropertyOptions setHasLanguage​(boolean value)
        Parameters:
        value - the value to set
        Returns:
        Returns this to enable cascaded options.
      • getHasType

        public boolean getHasType()
        Returns:
        Return whether this property has an rdf:type qualifier.
      • setHasType

        public PropertyOptions setHasType​(boolean value)
        Parameters:
        value - the value to set
        Returns:
        Returns this to enable cascaded options.
      • isStruct

        public boolean isStruct()
        Returns:
        Return whether this property contains nested fields.
      • setStruct

        public PropertyOptions setStruct​(boolean value)
        Parameters:
        value - the value to set
        Returns:
        Returns this to enable cascaded options.
      • isArray

        public boolean isArray()
        Returns:
        Return whether this property is an array. By itself this indicates a general unordered array. It is serialized using an rdf:Bag container.
      • setArray

        public PropertyOptions setArray​(boolean value)
        Parameters:
        value - the value to set
        Returns:
        Returns this to enable cascaded options.
      • isArrayOrdered

        public boolean isArrayOrdered()
        Returns:
        Return whether this property is an ordered array. Appears in conjunction with getPropValueIsArray(). It is serialized using an rdf:Seq container.
      • setArrayOrdered

        public PropertyOptions setArrayOrdered​(boolean value)
        Parameters:
        value - the value to set
        Returns:
        Returns this to enable cascaded options.
      • isArrayAlternate

        public boolean isArrayAlternate()
        Returns:
        Return whether this property is an alternative array. Appears in conjunction with getPropValueIsArray(). It is serialized using an rdf:Alt container.
      • setArrayAlternate

        public PropertyOptions setArrayAlternate​(boolean value)
        Parameters:
        value - the value to set
        Returns:
        Returns this to enable cascaded options.
      • isArrayAltText

        public boolean isArrayAltText()
        Returns:
        Return whether this property is an alt-text array. Appears in conjunction with getPropArrayIsAlternate(). It is serialized using an rdf:Alt container. Each array element is a simple property with an xml:lang attribute.
      • setArrayAltText

        public PropertyOptions setArrayAltText​(boolean value)
        Parameters:
        value - the value to set
        Returns:
        Returns this to enable cascaded options.
      • isArrayLimited

        public boolean isArrayLimited()
        Returns:
        Return whether this property is an array with a limit on number-of-elements.
      • setArrayElementLimit

        public PropertyOptions setArrayElementLimit​(int arrayLimit)
        Parameters:
        arrayLimit - the limit to set on number-of-elements
        Returns:
        Returns this to enable cascaded options.
      • getArrayElementsLimit

        public int getArrayElementsLimit()
        Returns:
        Returns the current limit on number-of-elements
      • isSchemaNode

        public boolean isSchemaNode()
        Returns:
        Returns whether the SCHEMA_NODE option is set.
      • setSchemaNode

        public PropertyOptions setSchemaNode​(boolean value)
        Parameters:
        value - the option DELETE_EXISTING to set
        Returns:
        Returns this to enable cascaded options.
      • isCompositeProperty

        public boolean isCompositeProperty()
        Returns:
        Returns whether the property is of composite type - an array or a struct.
      • isSimple

        public boolean isSimple()
        Returns:
        Returns whether the property is of composite type - an array or a struct.
      • equalArrayTypes

        public boolean equalArrayTypes​(PropertyOptions options)
        Compares two options set for array compatibility.
        Parameters:
        options - other options
        Returns:
        Returns true if the array options of the sets are equal.
      • mergeWith

        public void mergeWith​(PropertyOptions options)
                       throws XMPException
        Merges the set options of a another options object with this. If the other options set is null, this objects stays the same.
        Parameters:
        options - other options
        Throws:
        XMPException - If illegal options are provided
      • isOnlyArrayOptions

        public boolean isOnlyArrayOptions()
        Returns:
        Returns true if only array options are set.
      • assertConsistency

        public void assertConsistency​(int options)
                               throws XMPException
        Checks that a node not a struct and array at the same time; and URI cannot be a struct.
        Parameters:
        options - the bitmask to check.
        Throws:
        XMPException - Thrown if the options are not consistent.