Package com.itextpdf.kernel.xmp.options
Class PropertyOptions
java.lang.Object
com.itextpdf.kernel.xmp.options.Options
com.itextpdf.kernel.xmp.options.PropertyOptions
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 Summary
Modifier and TypeFieldDescriptionstatic final int
static final int
static final int
static final int
static final int
may be used in the futurestatic final int
static final int
static final int
static final int
static final int
static final int
static final int
Updated by iText.static final int
static final int
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionvoid
assertConsistency
(int options) Checks that a node not a struct and array at the same time; and URI cannot be a struct.protected String
defineOptionName
(int option) To be implemeted by inheritants.boolean
equalArrayTypes
(PropertyOptions options) Compares two options set for array compatibility.boolean
boolean
boolean
protected int
To be implemeted by inheritants.boolean
isArray()
boolean
boolean
boolean
boolean
boolean
boolean
boolean
boolean
isSimple()
boolean
isStruct()
boolean
isURI()
void
mergeWith
(PropertyOptions options) Merges the set options of a another options object with this.setArray
(boolean value) setArrayAlternate
(boolean value) setArrayAltText
(boolean value) setArrayOrdered
(boolean value) setHasLanguage
(boolean value) setHasQualifiers
(boolean value) setHasType
(boolean value) setQualifier
(boolean value) setSchemaNode
(boolean value) setStruct
(boolean value) setURI
(boolean value) Methods inherited from class com.itextpdf.kernel.xmp.options.Options
clear, containsAllOptions, containsOneOf, equals, getOption, getOptions, getOptionsString, hashCode, isExactly, setOption, setOptions, toString
-
Field Details
-
NO_OPTIONS
public static final int NO_OPTIONS- See Also:
-
URI
public static final int URI- See Also:
-
HAS_QUALIFIERS
public static final int HAS_QUALIFIERS- See Also:
-
QUALIFIER
public static final int QUALIFIER- See Also:
-
HAS_LANGUAGE
public static final int HAS_LANGUAGE- See Also:
-
HAS_TYPE
public static final int HAS_TYPE- See Also:
-
STRUCT
public static final int STRUCT- See Also:
-
ARRAY
public static final int ARRAY- See Also:
-
ARRAY_ORDERED
public static final int ARRAY_ORDERED- See Also:
-
ARRAY_ALTERNATE
public static final int ARRAY_ALTERNATE- See Also:
-
ARRAY_ALT_TEXT
public static final int ARRAY_ALT_TEXT- See Also:
-
SCHEMA_NODE
public static final int SCHEMA_NODE- See Also:
-
DELETE_EXISTING
public static final int DELETE_EXISTINGmay be used in the future- See Also:
-
SEPARATE_NODE
public static final int SEPARATE_NODEUpdated by iText. Indicates if the property should be writted as a separate node- See Also:
-
-
Constructor Details
-
PropertyOptions
public PropertyOptions()Default constructor -
PropertyOptions
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
- 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
- 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
- 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
- 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
- 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
- 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
- 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
- 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
- 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
- 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
- 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
Compares two options set for array compatibility.- Parameters:
-
options
- other options - Returns:
- Returns true if the array options of the sets are equal.
-
mergeWith
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 classOptions
- Returns:
- Returns a bit mask where all valid option bits are set.
- See Also:
-
defineOptionName
Description copied from class:Options
To be implemeted by inheritants.- Specified by:
-
defineOptionName
in classOptions
- Parameters:
-
option
- a single, valid option bit. - Returns:
- Returns a human readable name for an option bit.
- See Also:
-
assertConsistency
Checks that a node not a struct and array at the same time; and URI cannot be a struct.- Overrides:
-
assertConsistency
in classOptions
- Parameters:
-
options
- the bitmask to check. - Throws:
-
XMPException
- Thrown if the options are not consistent.
-