Class PropertyOptions

java.lang.Object
com.itextpdf.kernel.xmp.options.Options
com.itextpdf.kernel.xmp.options.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
  • Field Details

  • Constructor Details

    • 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 Details

    • 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.
    • 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.
    • getValidOptions

      protected int getValidOptions()
      Description copied from class: Options
      To be implemeted by inheritants.
      Specified by:
      getValidOptions in class Options
      Returns:
      Returns a bit mask where all valid option bits are set.
      See Also:
    • defineOptionName

      protected String defineOptionName (int option)
      Description copied from class: Options
      To be implemeted by inheritants.
      Specified by:
      defineOptionName in class Options
      Parameters:
      option - a single, valid option bit.
      Returns:
      Returns a human readable name for an option bit.
      See Also:
    • 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.
      Overrides:
      assertConsistency in class Options
      Parameters:
      options - the bitmask to check.
      Throws:
      XMPException - Thrown if the options are not consistent.