iText 7 7.1.8 API
|
This class represents the set of XMP metadata as a DOM representation. More...
Public Member Functions |
|||
XMPProperty | GetProperty (String schemaNS, String propName) | ||
The property value getter-methods all take a property specification: the first two parameters are always the top level namespace URI (the "schema" namespace) and the basic name of the property being referenced. More... |
|||
XMPProperty | GetArrayItem (String schemaNS, String arrayName, int itemIndex) | ||
Provides access to items within an array. More... |
|||
int | CountArrayItems (String schemaNS, String arrayName) | ||
Returns the number of items in the array. More... |
|||
XMPProperty | GetStructField (String schemaNS, String structName, String fieldNS, String fieldName) | ||
Provides access to fields within a nested structure. More... |
|||
XMPProperty | GetQualifier (String schemaNS, String propName, String qualNS, String qualName) | ||
Provides access to a qualifier attached to a property. More... |
|||
void | SetProperty (String schemaNS, String propName, Object propValue, PropertyOptions options) | ||
The property value More... |
|||
void | SetProperty (String schemaNS, String propName, Object propValue) | ||
void | SetArrayItem (String schemaNS, String arrayName, int itemIndex, String itemValue, PropertyOptions options) | ||
Replaces an item within an array. More... |
|||
void | SetArrayItem (String schemaNS, String arrayName, int itemIndex, String itemValue) | ||
void | InsertArrayItem (String schemaNS, String arrayName, int itemIndex, String itemValue, PropertyOptions options) | ||
Inserts an item into an array previous to the given index. More... |
|||
void | InsertArrayItem (String schemaNS, String arrayName, int itemIndex, String itemValue) | ||
void | AppendArrayItem (String schemaNS, String arrayName, PropertyOptions arrayOptions, String itemValue, PropertyOptions itemOptions) | ||
Simplifies the construction of an array by not requiring that you pre-create an empty array. More... |
|||
void | AppendArrayItem (String schemaNS, String arrayName, String itemValue) | ||
void | SetStructField (String schemaNS, String structName, String fieldNS, String fieldName, String fieldValue, PropertyOptions options) | ||
Provides access to fields within a nested structure. More... |
|||
void | SetStructField (String schemaNS, String structName, String fieldNS, String fieldName, String fieldValue) | ||
void | SetQualifier (String schemaNS, String propName, String qualNS, String qualName, String qualValue, PropertyOptions options) | ||
Provides access to a qualifier attached to a property. More... |
|||
void | SetQualifier (String schemaNS, String propName, String qualNS, String qualName, String qualValue) | ||
void | DeleteProperty (String schemaNS, String propName) | ||
Deletes the given XMP subtree rooted at the given property. More... |
|||
void | DeleteArrayItem (String schemaNS, String arrayName, int itemIndex) | ||
Deletes the given XMP subtree rooted at the given array item. More... |
|||
void | DeleteStructField (String schemaNS, String structName, String fieldNS, String fieldName) | ||
Deletes the given XMP subtree rooted at the given struct field. More... |
|||
void | DeleteQualifier (String schemaNS, String propName, String qualNS, String qualName) | ||
Deletes the given XMP subtree rooted at the given qualifier. More... |
|||
bool | DoesPropertyExist (String schemaNS, String propName) | ||
Returns whether the property exists. More... |
|||
bool | DoesArrayItemExist (String schemaNS, String arrayName, int itemIndex) | ||
Tells if the array item exists. More... |
|||
bool | DoesStructFieldExist (String schemaNS, String structName, String fieldNS, String fieldName) | ||
DoesStructFieldExist tells if the struct field exists. More... |
|||
bool | DoesQualifierExist (String schemaNS, String propName, String qualNS, String qualName) | ||
DoesQualifierExist tells if the qualifier exists. More... |
|||
XMPProperty | GetLocalizedText (String schemaNS, String altTextName, String genericLang, String specificLang) | ||
These functions provide convenient support for localized text properties, including a number of special and obscure aspects. More... |
|||
void | SetLocalizedText (String schemaNS, String altTextName, String genericLang, String specificLang, String itemValue, PropertyOptions options) | ||
Modifies the value of a selected item in an alt-text array. More... |
|||
void | SetLocalizedText (String schemaNS, String altTextName, String genericLang, String specificLang, String itemValue) | ||
bool? | GetPropertyBoolean (String schemaNS, String propName) | ||
These are very similar to More... |
|||
int? | GetPropertyInteger (String schemaNS, String propName) | ||
Convenience method to retrieve the literal value of a property. More... |
|||
long? | GetPropertyLong (String schemaNS, String propName) | ||
Convenience method to retrieve the literal value of a property. More... |
|||
double? | GetPropertyDouble (String schemaNS, String propName) | ||
Convenience method to retrieve the literal value of a property. More... |
|||
XMPDateTime | GetPropertyDate (String schemaNS, String propName) | ||
Convenience method to retrieve the literal value of a property. More... |
|||
DateTime | GetPropertyCalendar (String schemaNS, String propName) | ||
Convenience method to retrieve the literal value of a property. More... |
|||
byte[] | GetPropertyBase64 (String schemaNS, String propName) | ||
Convenience method to retrieve the literal value of a property. More... |
|||
String | GetPropertyString (String schemaNS, String propName) | ||
Convenience method to retrieve the literal value of a property. More... |
|||
void | SetPropertyBoolean (String schemaNS, String propName, bool propValue, PropertyOptions options) | ||
Convenience method to set a property to a literal More... |
|||
void | SetPropertyBoolean (String schemaNS, String propName, bool propValue) | ||
void | SetPropertyInteger (String schemaNS, String propName, int propValue, PropertyOptions options) | ||
Convenience method to set a property to a literal More... |
|||
void | SetPropertyInteger (String schemaNS, String propName, int propValue) | ||
void | SetPropertyLong (String schemaNS, String propName, long propValue, PropertyOptions options) | ||
Convenience method to set a property to a literal More... |
|||
void | SetPropertyLong (String schemaNS, String propName, long propValue) | ||
void | SetPropertyDouble (String schemaNS, String propName, double propValue, PropertyOptions options) | ||
Convenience method to set a property to a literal More... |
|||
void | SetPropertyDouble (String schemaNS, String propName, double propValue) | ||
void | SetPropertyDate (String schemaNS, String propName, XMPDateTime propValue, PropertyOptions options) | ||
Convenience method to set a property with an XMPDateTime-object, which is serialized to an ISO8601 date. More... |
|||
void | SetPropertyDate (String schemaNS, String propName, XMPDateTime propValue) | ||
void | SetPropertyCalendar (String schemaNS, String propName, DateTime propValue, PropertyOptions options) | ||
Convenience method to set a property with a Java Calendar-object, which is serialized to an ISO8601 date. More... |
|||
void | SetPropertyCalendar (String schemaNS, String propName, DateTime propValue) | ||
void | SetPropertyBase64 (String schemaNS, String propName, byte[] propValue, PropertyOptions options) | ||
Convenience method to set a property from a binary More... |
|||
void | SetPropertyBase64 (String schemaNS, String propName, byte[] propValue) | ||
XMPIterator | Iterator () | ||
Constructs an iterator for the properties within this XMP object. More... |
|||
XMPIterator | Iterator (IteratorOptions options) | ||
Constructs an iterator for the properties within this XMP object using some options. More... |
|||
XMPIterator | Iterator (String schemaNS, String propName, IteratorOptions options) | ||
Construct an iterator for the properties within an XMP object. More... |
|||
String | GetObjectName () | ||
This correlates to the about-attribute, returns the empty String if no name is set. More... |
|||
void | SetObjectName (String name) | ||
|
|||
String | GetPacketHeader () | ||
Object | Clone () | ||
Clones the complete metadata tree. More... |
|||
void | Sort () | ||
Sorts the complete datamodel according to the following rules: More... |
|||
void | Normalize (ParseOptions options) | ||
Perform the normalization as a separate parsing step. More... |
|||
String | DumpObject () | ||
Renders this node and the tree unter this node in a human readable form. More... |
|||
This class represents the set of XMP metadata as a DOM representation.
This class represents the set of XMP metadata as a DOM representation. It has methods to read and modify all kinds of properties, create an iterator over all properties and serialize the metadata to a String, byte-array or
.
void iText.Kernel.XMP.XMPMeta.AppendArrayItem | ( | String | schemaNS, |
String | arrayName, | ||
PropertyOptions | arrayOptions, | ||
String | itemValue, | ||
PropertyOptions | itemOptions | ||
) |
Simplifies the construction of an array by not requiring that you pre-create an empty array.
Simplifies the construction of an array by not requiring that you pre-create an empty array. The array that is assigned is created automatically if it does not yet exist. Each call to appendArrayItem() appends an item to the array. The corresponding parameters have the same use as setArrayItem(). The arrayOptions parameter is used to specify what kind of array. If the array exists, it must have the specified form.
schemaNS | The namespace URI for the array. Has the same usage as in getProperty. |
arrayName | The name of the array. May be a general path expression, must not be null or the empty string. Has the same namespace prefix usage as propPath in getProperty. |
arrayOptions | Option flags describing the array form. The only valid options are
null
|
itemValue | the value of the array item. Has the same usage as propValue in getProperty. |
itemOptions | Option flags describing the item to append ( iText.Kernel.XMP.Options.PropertyOptions ) |
XMPException | Wraps all errors and exceptions that may occur. |
iText.Kernel.XMP.XMPException |
Implemented in iText.Kernel.XMP.Impl.XMPMetaImpl.
void iText.Kernel.XMP.XMPMeta.AppendArrayItem | ( | String | schemaNS, |
String | arrayName, | ||
String | itemValue | ||
) |
schemaNS | The namespace URI for the array |
arrayName | The name of the array |
itemValue | the value of the array item |
XMPException | Wraps all errors and exceptions |
iText.Kernel.XMP.XMPException |
Implemented in iText.Kernel.XMP.Impl.XMPMetaImpl.
Object iText.Kernel.XMP.XMPMeta.Clone | ( | ) |
Clones the complete metadata tree.
Implemented in iText.Kernel.XMP.Impl.XMPMetaImpl.
int iText.Kernel.XMP.XMPMeta.CountArrayItems | ( | String | schemaNS, |
String | arrayName | ||
) |
Returns the number of items in the array.
schemaNS | The namespace URI for the array. Has the same usage as in getProperty. |
arrayName | The name of the array. May be a general path expression, must not be
null
getProperty()
|
XMPException | Wraps all errors and exceptions that may occur. |
iText.Kernel.XMP.XMPException |
Implemented in iText.Kernel.XMP.Impl.XMPMetaImpl.
void iText.Kernel.XMP.XMPMeta.DeleteArrayItem | ( | String | schemaNS, |
String | arrayName, | ||
int | itemIndex | ||
) |
Deletes the given XMP subtree rooted at the given array item.
Deletes the given XMP subtree rooted at the given array item. It is not an error if the array item does not exist.
schemaNS | The namespace URI for the array. Has the same usage as in getProperty. |
arrayName | The name of the array. May be a general path expression, must not be
null
getProperty()
|
itemIndex | The index of the desired item. Arrays in XMP are indexed from 1. The constant
XMPConst.ARRAY_LAST_ITEM
|
Implemented in iText.Kernel.XMP.Impl.XMPMetaImpl.
void iText.Kernel.XMP.XMPMeta.DeleteProperty | ( | String | schemaNS, |
String | propName | ||
) |
Deletes the given XMP subtree rooted at the given property.
Deletes the given XMP subtree rooted at the given property. It is not an error if the property does not exist.
schemaNS | The namespace URI for the property. Has the same usage as in
getProperty()
|
propName | The name of the property. Has the same usage as in getProperty. |
Implemented in iText.Kernel.XMP.Impl.XMPMetaImpl.
void iText.Kernel.XMP.XMPMeta.DeleteQualifier | ( | String | schemaNS, |
String | propName, | ||
String | qualNS, | ||
String | qualName | ||
) |
Deletes the given XMP subtree rooted at the given qualifier.
Deletes the given XMP subtree rooted at the given qualifier. It is not an error if the qualifier does not exist.
schemaNS | The namespace URI for the struct. Has the same usage as in
getProperty()
|
propName | The name of the property to which the qualifier is attached. Has the same usage as in getProperty. |
qualNS | The namespace URI for the qualifier. Has the same URI and prefix usage as the schemaNS parameter. |
qualName | The name of the qualifier. Must be a single XML name, must not be
null
|
Implemented in iText.Kernel.XMP.Impl.XMPMetaImpl.
void iText.Kernel.XMP.XMPMeta.DeleteStructField | ( | String | schemaNS, |
String | structName, | ||
String | fieldNS, | ||
String | fieldName | ||
) |
Deletes the given XMP subtree rooted at the given struct field.
Deletes the given XMP subtree rooted at the given struct field. It is not an error if the field does not exist.
schemaNS | The namespace URI for the struct. Has the same usage as in
getProperty()
|
structName | The name of the struct. May be a general path expression, must not be
null
|
fieldNS | The namespace URI for the field. Has the same URI and prefix usage as the schemaNS parameter. |
fieldName | The name of the field. Must be a single XML name, must not be
null
|
Implemented in iText.Kernel.XMP.Impl.XMPMetaImpl.
bool iText.Kernel.XMP.XMPMeta.DoesArrayItemExist | ( | String | schemaNS, |
String | arrayName, | ||
int | itemIndex | ||
) |
Tells if the array item exists.
schemaNS | The namespace URI for the array. Has the same usage as in
getProperty()
|
arrayName | The name of the array. May be a general path expression, must not be
null
getProperty()
|
itemIndex | The index of the desired item. Arrays in XMP are indexed from 1. The constant
XMPConst.ARRAY_LAST_ITEM
|
Implemented in iText.Kernel.XMP.Impl.XMPMetaImpl.
bool iText.Kernel.XMP.XMPMeta.DoesPropertyExist | ( | String | schemaNS, |
String | propName | ||
) |
Returns whether the property exists.
schemaNS | The namespace URI for the property. Has the same usage as in
getProperty()
|
propName | The name of the property. Has the same usage as in
getProperty()
|
Implemented in iText.Kernel.XMP.Impl.XMPMetaImpl.
bool iText.Kernel.XMP.XMPMeta.DoesQualifierExist | ( | String | schemaNS, |
String | propName, | ||
String | qualNS, | ||
String | qualName | ||
) |
DoesQualifierExist tells if the qualifier exists.
schemaNS | The namespace URI for the struct. Has the same usage as in
getProperty()
|
propName | The name of the property to which the qualifier is attached. Has the same usage as in
getProperty()
|
qualNS | The namespace URI for the qualifier. Has the same URI and prefix usage as the schemaNS parameter. |
qualName | The name of the qualifier. Must be a single XML name, must not be
null
|
Implemented in iText.Kernel.XMP.Impl.XMPMetaImpl.
bool iText.Kernel.XMP.XMPMeta.DoesStructFieldExist | ( | String | schemaNS, |
String | structName, | ||
String | fieldNS, | ||
String | fieldName | ||
) |
DoesStructFieldExist tells if the struct field exists.
schemaNS | The namespace URI for the struct. Has the same usage as in
getProperty()
|
structName | The name of the struct. May be a general path expression, must not be
null
getProperty()
|
fieldNS | The namespace URI for the field. Has the same URI and prefix usage as the schemaNS parameter. |
fieldName | The name of the field. Must be a single XML name, must not be
null
|
Implemented in iText.Kernel.XMP.Impl.XMPMetaImpl.
String iText.Kernel.XMP.XMPMeta.DumpObject | ( | ) |
Renders this node and the tree unter this node in a human readable form.
Implemented in iText.Kernel.XMP.Impl.XMPMetaImpl.
XMPProperty iText.Kernel.XMP.XMPMeta.GetArrayItem | ( | String | schemaNS, |
String | arrayName, | ||
int | itemIndex | ||
) |
Provides access to items within an array.
Provides access to items within an array. The index is passed as an integer, you need not worry about the path string syntax for array items, convert a loop index to a string, etc.
schemaNS | The namespace URI for the array. Has the same usage as in getProperty. |
arrayName | The name of the array. May be a general path expression, must not be
null
getProperty()
|
itemIndex | The index of the desired item. Arrays in XMP are indexed from 1. The constant XMPConst.ARRAY_LAST_ITEM always refers to the last existing array item. |
XMPException | Wraps all errors and exceptions that may occur. |
iText.Kernel.XMP.XMPException |
Implemented in iText.Kernel.XMP.Impl.XMPMetaImpl.
XMPProperty iText.Kernel.XMP.XMPMeta.GetLocalizedText | ( | String | schemaNS, |
String | altTextName, | ||
String | genericLang, | ||
String | specificLang | ||
) |
These functions provide convenient support for localized text properties, including a number of special and obscure aspects.
These functions provide convenient support for localized text properties, including a number of special and obscure aspects. Localized text properties are stored in alt-text arrays. They allow multiple concurrent localizations of a property value, for example a document title or copyright in several languages. The most important aspect of these functions is that they select an appropriate array item based on one or two RFC 3066 language tags. One of these languages, the "specific" language, is preferred and selected if there is an exact match. For many languages it is also possible to define a "generic" language that may be used if there is no specific language match. The generic language must be a valid RFC 3066 primary subtag, or the empty string. For example, a specific language of "en-US" should be used in the US, and a specific language of "en-UK" should be used in England. It is also appropriate to use "en" as the generic language in each case. If a US document goes to England, the "en-US" title is selected by using the "en" generic language and the "en-UK" specific language. It is considered poor practice, but allowed, to pass a specific language that is just an RFC 3066 primary tag. For example "en" is not a good specific language, it should only be used as a generic language. Passing "i" or "x" as the generic language is also considered poor practice but allowed. Advice from the W3C about the use of RFC 3066 language tags can be found at: http://www.w3.org/International/articles/language-tags/
Note: RFC 3066 language tags must be treated in a case insensitive manner. The XMP Toolkit does this by normalizing their capitalization:
The XMP toolkit normalizes alt-text arrays such that the x-default item is the first item. The SetLocalizedText function has several special features related to the x-default item, see its description for details. The selection of the array item is the same for GetLocalizedText and SetLocalizedText:
A partial match with the generic language is where the start of the item's language matches the generic string and the next character is '-'. An exact match is also recognized as a degenerate case. It is fine to pass x-default as the specific language. In this case, selection of an x-default item is an exact match by the first rule, not a selection by the 3rd rule. The last 2 rules are fallbacks used when the specific and generic languages fail to produce a match.
returns information about a selected item in an alt-text array. The array item is selected according to the rules given above. Note: In a future version of this API a method using Java
will be added.
schemaNS | The namespace URI for the alt-text array. Has the same usage as in
getProperty()
|
altTextName | The name of the alt-text array. May be a general path expression, must not be
null
getProperty()
|
genericLang | The name of the generic language as an RFC 3066 primary subtag. May be
null
|
specificLang | The name of the specific language as an RFC 3066 tag. Must not be
null
|
XMPException | Wraps all errors and exceptions that may occur. |
iText.Kernel.XMP.XMPException |
Implemented in iText.Kernel.XMP.Impl.XMPMetaImpl.
String iText.Kernel.XMP.XMPMeta.GetObjectName | ( | ) |
This correlates to the about-attribute, returns the empty String if no name is set.
Implemented in iText.Kernel.XMP.Impl.XMPMetaImpl.
String iText.Kernel.XMP.XMPMeta.GetPacketHeader | ( | ) |
Implemented in iText.Kernel.XMP.Impl.XMPMetaImpl.
XMPProperty iText.Kernel.XMP.XMPMeta.GetProperty | ( | String | schemaNS, |
String | propName | ||
) |
The property value getter-methods all take a property specification: the first two parameters are always the top level namespace URI (the "schema" namespace) and the basic name of the property being referenced.
The property value getter-methods all take a property specification: the first two parameters are always the top level namespace URI (the "schema" namespace) and the basic name of the property being referenced. See the introductory discussion of path expression usage for more information.
All of the functions return an object inherited from
or
if the property does not exists. The result object contains the value of the property and option flags describing the property. Arrays and the non-leaf levels of nodes do not have values.
See iText.Kernel.XMP.Options.PropertyOptions for detailed information about the options.
This is the simplest property getter, mainly for top level simple properties or after using the path composition functions in XMPPathFactory.
schemaNS | The namespace URI for the property. May be
null
|
propName | The name of the property. May be a general path expression, must not be
null
|
XMPException | Wraps all errors and exceptions that may occur. |
iText.Kernel.XMP.XMPException |
Implemented in iText.Kernel.XMP.Impl.XMPMetaImpl.
byte [] iText.Kernel.XMP.XMPMeta.GetPropertyBase64 | ( | String | schemaNS, |
String | propName | ||
) |
Convenience method to retrieve the literal value of a property.
schemaNS | The namespace URI for the property. Has the same usage as in
getProperty()
|
propName | The name of the property. Has the same usage as in
getProperty()
|
XMPException | Wraps all exceptions that may occur, especially conversion errors. |
iText.Kernel.XMP.XMPException |
Implemented in iText.Kernel.XMP.Impl.XMPMetaImpl.
bool? iText.Kernel.XMP.XMPMeta.GetPropertyBoolean | ( | String | schemaNS, |
String | propName | ||
) |
These are very similar to
getProperty()
and SetProperty()
above, but the value is returned or provided in a literal form instead of as a UTF-8 string.
These are very similar to
and
above, but the value is returned or provided in a literal form instead of as a UTF-8 string. The path composition functions in
may be used to compose an path expression for fields in nested structures, items in arrays, or qualifiers.
schemaNS | The namespace URI for the property. Has the same usage as in
getProperty()
|
propName | The name of the property. Has the same usage as in
getProperty()
|
XMPException | Wraps all exceptions that may occur, especially conversion errors. |
iText.Kernel.XMP.XMPException |
Implemented in iText.Kernel.XMP.Impl.XMPMetaImpl.
DateTime iText.Kernel.XMP.XMPMeta.GetPropertyCalendar | ( | String | schemaNS, |
String | propName | ||
) |
Convenience method to retrieve the literal value of a property.
schemaNS | The namespace URI for the property. Has the same usage as in
getProperty()
|
propName | The name of the property. Has the same usage as in
getProperty()
|
XMPException | Wraps all exceptions that may occur, especially conversion errors. |
iText.Kernel.XMP.XMPException |
Implemented in iText.Kernel.XMP.Impl.XMPMetaImpl.
XMPDateTime iText.Kernel.XMP.XMPMeta.GetPropertyDate | ( | String | schemaNS, |
String | propName | ||
) |
Convenience method to retrieve the literal value of a property.
schemaNS | The namespace URI for the property. Has the same usage as in
getProperty()
|
propName | The name of the property. Has the same usage as in
getProperty()
|
XMPException | Wraps all exceptions that may occur, especially conversion errors. |
iText.Kernel.XMP.XMPException |
Implemented in iText.Kernel.XMP.Impl.XMPMetaImpl.
double? iText.Kernel.XMP.XMPMeta.GetPropertyDouble | ( | String | schemaNS, |
String | propName | ||
) |
Convenience method to retrieve the literal value of a property.
schemaNS | The namespace URI for the property. Has the same usage as in
getProperty()
|
propName | The name of the property. Has the same usage as in
getProperty()
|
XMPException | Wraps all exceptions that may occur, especially conversion errors. |
iText.Kernel.XMP.XMPException |
Implemented in iText.Kernel.XMP.Impl.XMPMetaImpl.
int? iText.Kernel.XMP.XMPMeta.GetPropertyInteger | ( | String | schemaNS, |
String | propName | ||
) |
Convenience method to retrieve the literal value of a property.
schemaNS | The namespace URI for the property. Has the same usage as in
getProperty()
|
propName | The name of the property. Has the same usage as in
getProperty()
|
XMPException | Wraps all exceptions that may occur, especially conversion errors. |
iText.Kernel.XMP.XMPException |
Implemented in iText.Kernel.XMP.Impl.XMPMetaImpl.
long? iText.Kernel.XMP.XMPMeta.GetPropertyLong | ( | String | schemaNS, |
String | propName | ||
) |
Convenience method to retrieve the literal value of a property.
schemaNS | The namespace URI for the property. Has the same usage as in
getProperty()
|
propName | The name of the property. Has the same usage as in
getProperty()
|
XMPException | Wraps all exceptions that may occur, especially conversion errors. |
iText.Kernel.XMP.XMPException |
Implemented in iText.Kernel.XMP.Impl.XMPMetaImpl.
String iText.Kernel.XMP.XMPMeta.GetPropertyString | ( | String | schemaNS, |
String | propName | ||
) |
Convenience method to retrieve the literal value of a property.
Convenience method to retrieve the literal value of a property. Note: There is no
, because
sets a string value.
schemaNS | The namespace URI for the property. Has the same usage as in
getProperty()
|
propName | The name of the property. Has the same usage as in
getProperty()
|
XMPException | Wraps all exceptions that may occur, especially conversion errors. |
iText.Kernel.XMP.XMPException |
Implemented in iText.Kernel.XMP.Impl.XMPMetaImpl.
XMPProperty iText.Kernel.XMP.XMPMeta.GetQualifier | ( | String | schemaNS, |
String | propName, | ||
String | qualNS, | ||
String | qualName | ||
) |
Provides access to a qualifier attached to a property.
Provides access to a qualifier attached to a property. The namespace for the qualifier is passed as a URI, you need not worry about the path string syntax. In many regards qualifiers are like struct fields. See the introductory discussion of qualified properties for more information.
The names of qualifiers should be XML qualified names, that is within an XML namespace. The path syntax for a qualified name uses the namespace prefix. This is unreliable since the prefix is never guaranteed. The URI is the formal name, the prefix is just a local shorthand in a given sequence of XML text.
Note: Qualifiers are only supported for simple leaf properties at this time.
schemaNS | The namespace URI for the struct. Has the same usage as in getProperty. |
propName | The name of the property to which the qualifier is attached. May be a general path expression, must not be
null
getProperty()
|
qualNS | The namespace URI for the qualifier. Has the same URI and prefix usage as the schemaNS parameter. |
qualName | The name of the qualifier. Must be a single XML name, must not be
null
|
Returns a
containing the value and the options of the qualifier or
if the property does not exist. The name of the qualifier must be a single XML name, must not be
or the empty string. Has the same namespace prefix usage as the propName parameter.
The value of the qualifier is only set if it has one (Arrays and non-leaf levels of structs do not have values).
XMPException | Wraps all errors and exceptions that may occur. |
iText.Kernel.XMP.XMPException |
Implemented in iText.Kernel.XMP.Impl.XMPMetaImpl.
XMPProperty iText.Kernel.XMP.XMPMeta.GetStructField | ( | String | schemaNS, |
String | structName, | ||
String | fieldNS, | ||
String | fieldName | ||
) |
Provides access to fields within a nested structure.
Provides access to fields within a nested structure. The namespace for the field is passed as a URI, you need not worry about the path string syntax.
The names of fields should be XML qualified names, that is within an XML namespace. The path syntax for a qualified name uses the namespace prefix. This is unreliable since the prefix is never guaranteed. The URI is the formal name, the prefix is just a local shorthand in a given sequence of XML text.
schemaNS | The namespace URI for the struct. Has the same usage as in getProperty. |
structName | The name of the struct. May be a general path expression, must not be
null
getProperty()
|
fieldNS | The namespace URI for the field. Has the same URI and prefix usage as the schemaNS parameter. |
fieldName | The name of the field. Must be a single XML name, must not be
null
|
XMPException | Wraps all errors and exceptions that may occur. |
iText.Kernel.XMP.XMPException |
Implemented in iText.Kernel.XMP.Impl.XMPMetaImpl.
void iText.Kernel.XMP.XMPMeta.InsertArrayItem | ( | String | schemaNS, |
String | arrayName, | ||
int | itemIndex, | ||
String | itemValue | ||
) |
schemaNS | The namespace URI for the array |
arrayName | The name of the array |
itemIndex | The index to insert the new item |
itemValue | the value of the array item |
XMPException | Wraps all errors and exceptions |
iText.Kernel.XMP.XMPException |
Implemented in iText.Kernel.XMP.Impl.XMPMetaImpl.
void iText.Kernel.XMP.XMPMeta.InsertArrayItem | ( | String | schemaNS, |
String | arrayName, | ||
int | itemIndex, | ||
String | itemValue, | ||
PropertyOptions | options | ||
) |
Inserts an item into an array previous to the given index.
Inserts an item into an array previous to the given index. The index is passed as an integer, you need not worry about the path string syntax for array items, convert a loop index to a string, etc. The array passed must already exist. In normal usage the selected array item is modified. A new item is automatically appended if the index is the array size plus 1.
schemaNS | The namespace URI for the array. Has the same usage as in getProperty. |
arrayName | The name of the array. May be a general path expression, must not be
null
|
itemIndex | The index to insert the new item. Arrays in XMP are indexed from 1. Use
XMPConst.ARRAY_LAST_ITEM
|
itemValue | the new value of the array item. Has the same usage as propValue in
setProperty()
|
options | the set options that decide about the kind of the node. |
XMPException | Wraps all errors and exceptions that may occur. |
iText.Kernel.XMP.XMPException |
Implemented in iText.Kernel.XMP.Impl.XMPMetaImpl.
XMPIterator iText.Kernel.XMP.XMPMeta.Iterator | ( | ) |
Constructs an iterator for the properties within this XMP object.
XMPException | Wraps all errors and exceptions that may occur. |
iText.Kernel.XMP.XMPException |
Implemented in iText.Kernel.XMP.Impl.XMPMetaImpl.
XMPIterator iText.Kernel.XMP.XMPMeta.Iterator | ( | IteratorOptions | options | ) |
Constructs an iterator for the properties within this XMP object using some options.
options | Option flags to control the iteration. |
XMPException | Wraps all errors and exceptions that may occur. |
iText.Kernel.XMP.XMPException |
Implemented in iText.Kernel.XMP.Impl.XMPMetaImpl.
XMPIterator iText.Kernel.XMP.XMPMeta.Iterator | ( | String | schemaNS, |
String | propName, | ||
IteratorOptions | options | ||
) |
Construct an iterator for the properties within an XMP object.
Construct an iterator for the properties within an XMP object. According to the parameters it iterates the entire data tree, properties within a specific schema, or a subtree rooted at a specific node.
schemaNS | Optional schema namespace URI to restrict the iteration. Omitted (visit all schema) by passing
null
|
propName | Optional property name to restrict the iteration. May be an arbitrary path expression. Omitted (visit all properties) by passing
null
|
options | Option flags to control the iteration. See iText.Kernel.XMP.Options.IteratorOptions for details. |
XMPException | Wraps all errors and exceptions that may occur. |
iText.Kernel.XMP.XMPException |
Implemented in iText.Kernel.XMP.Impl.XMPMetaImpl.
void iText.Kernel.XMP.XMPMeta.Normalize | ( | ParseOptions | options | ) |
Perform the normalization as a separate parsing step.
Perform the normalization as a separate parsing step. Normally it is done during parsing, unless the parsing option iText.Kernel.XMP.Options.ParseOptions.OMIT_NORMALIZATION is set to
. Note: It does no harm to call this method to an already normalized xmp object. It was a PDF/A requirement to get hand on the unnormalized
object.
options | optional parsing options. |
XMPException | Wraps all errors and exceptions that may occur. |
iText.Kernel.XMP.XMPException |
Implemented in iText.Kernel.XMP.Impl.XMPMetaImpl.
void iText.Kernel.XMP.XMPMeta.SetArrayItem | ( | String | schemaNS, |
String | arrayName, | ||
int | itemIndex, | ||
String | itemValue | ||
) |
schemaNS | The namespace URI |
arrayName | The name of the array |
itemIndex | The index to insert the new item |
itemValue | the new value of the array item |
XMPException | Wraps all errors and exceptions |
iText.Kernel.XMP.XMPException |
Implemented in iText.Kernel.XMP.Impl.XMPMetaImpl.
void iText.Kernel.XMP.XMPMeta.SetArrayItem | ( | String | schemaNS, |
String | arrayName, | ||
int | itemIndex, | ||
String | itemValue, | ||
PropertyOptions | options | ||
) |
Replaces an item within an array.
Replaces an item within an array. The index is passed as an integer, you need not worry about the path string syntax for array items, convert a loop index to a string, etc. The array passed must already exist. In normal usage the selected array item is modified. A new item is automatically appended if the index is the array size plus 1.
schemaNS | The namespace URI for the array. Has the same usage as in getProperty. |
arrayName | The name of the array. May be a general path expression, must not be
null
|
itemIndex | The index of the desired item. Arrays in XMP are indexed from 1. To address the last existing item, use CountArrayItems(System.String, System.String) to find out the length of the array. |
itemValue | the new value of the array item. Has the same usage as propValue in
setProperty()
|
options | the set options for the item. |
XMPException | Wraps all errors and exceptions that may occur. |
iText.Kernel.XMP.XMPException |
Implemented in iText.Kernel.XMP.Impl.XMPMetaImpl.
void iText.Kernel.XMP.XMPMeta.SetLocalizedText | ( | String | schemaNS, |
String | altTextName, | ||
String | genericLang, | ||
String | specificLang, | ||
String | itemValue | ||
) |
schemaNS | The namespace URI for the alt-text array |
altTextName | The name of the alt-text array |
genericLang | The name of the generic language |
specificLang | The name of the specific language |
itemValue | the new value for the appropriate array item |
XMPException | Wraps all errors and exceptions |
iText.Kernel.XMP.XMPException |
Implemented in iText.Kernel.XMP.Impl.XMPMetaImpl.
void iText.Kernel.XMP.XMPMeta.SetLocalizedText | ( | String | schemaNS, |
String | altTextName, | ||
String | genericLang, | ||
String | specificLang, | ||
String | itemValue, | ||
PropertyOptions | options | ||
) |
Modifies the value of a selected item in an alt-text array.
Modifies the value of a selected item in an alt-text array. Creates an appropriate array item if necessary, and handles special cases for the x-default item. If the selected item is from a match with the specific language, the value of that item is modified. If the existing value of that item matches the existing value of the x-default item, the x-default item is also modified. If the array only has 1 existing item (which is not x-default), an x-default item is added with the given value. If the selected item is from a match with the generic language and there are no other generic matches, the value of that item is modified. If the existing value of that item matches the existing value of the x-default item, the x-default item is also modified. If the array only has 1 existing item (which is not x-default), an x-default item is added with the given value. If the selected item is from a partial match with the generic language and there are other partial matches, a new item is created for the specific language. The x-default item is not modified. If the selected item is from the last 2 rules then a new item is created for the specific language. If the array only had an x-default item, the x-default item is also modified. If the array was empty, items are created for the specific language and x-default. Note: In a future version of this API a method using Java
will be added.
schemaNS | The namespace URI for the alt-text array. Has the same usage as in
getProperty()
|
altTextName | The name of the alt-text array. May be a general path expression, must not be
null
getProperty()
|
genericLang | The name of the generic language as an RFC 3066 primary subtag. May be
null
|
specificLang | The name of the specific language as an RFC 3066 tag. Must not be
null
|
itemValue | A pointer to the
null
|
options | Option flags, none are defined at present. |
XMPException | Wraps all errors and exceptions that may occur. |
iText.Kernel.XMP.XMPException |
Implemented in iText.Kernel.XMP.Impl.XMPMetaImpl.
void iText.Kernel.XMP.XMPMeta.SetProperty | ( | String | schemaNS, |
String | propName, | ||
Object | propValue | ||
) |
schemaNS | The namespace URI |
propName | The name of the property |
propValue | the value for the property |
XMPException | Wraps all errors and exceptions |
iText.Kernel.XMP.XMPException |
Implemented in iText.Kernel.XMP.Impl.XMPMetaImpl.
void iText.Kernel.XMP.XMPMeta.SetProperty | ( | String | schemaNS, |
String | propName, | ||
Object | propValue, | ||
PropertyOptions | options | ||
) |
The property value
setters
all take a property specification, their differences are in the form of this.
The property value
all take a property specification, their differences are in the form of this. The first two parameters are always the top level namespace URI (the
namespace) and the basic name of the property being referenced. See the introductory discussion of path expression usage for more information.
All of the functions take a string value for the property and option flags describing the property. The value must be Unicode in UTF-8 encoding. Arrays and non-leaf levels of structs do not have values. Empty arrays and structs may be created using appropriate option flags. All levels of structs that is assigned implicitly are created if necessary. appendArayItem implicitly creates the named array if necessary.
See iText.Kernel.XMP.Options.PropertyOptions for detailed information about the options.
This is the simplest property setter, mainly for top level simple properties or after using the path composition functions in XMPPathFactory
schemaNS | The namespace URI for the property. Has the same usage as in getProperty. |
propName | The name of the property. Has the same usage as in
getProperty()
|
propValue | the value for the property (only leaf properties have a value). Arrays and non-leaf levels of structs do not have values. Must be
null
The value is automatically detected: Boolean, Integer, Long, Double, XMPDateTime and byte[] are handled, on all other
toString()
|
options | Option flags describing the property. See the earlier description. |
XMPException | Wraps all errors and exceptions that may occur. |
iText.Kernel.XMP.XMPException |
Implemented in iText.Kernel.XMP.Impl.XMPMetaImpl.
void iText.Kernel.XMP.XMPMeta.SetPropertyBase64 | ( | String | schemaNS, |
String | propName, | ||
byte[] | propValue | ||
) |
schemaNS | The namespace URI for the property |
propName | The name of the property |
propValue | the literal property value as byte array |
XMPException | Wraps all exceptions |
iText.Kernel.XMP.XMPException |
Implemented in iText.Kernel.XMP.Impl.XMPMetaImpl.
void iText.Kernel.XMP.XMPMeta.SetPropertyBase64 | ( | String | schemaNS, |
String | propName, | ||
byte[] | propValue, | ||
PropertyOptions | options | ||
) |
Convenience method to set a property from a binary
byte[]
-array, which is serialized as base64-string.
schemaNS | The namespace URI for the property. Has the same usage as in
setProperty()
|
propName | The name of the property. Has the same usage as in
getProperty()
|
propValue | the literal property value as byte array. |
options | options of the property to set (optional). |
XMPException | Wraps all exceptions that may occur. |
iText.Kernel.XMP.XMPException |
Implemented in iText.Kernel.XMP.Impl.XMPMetaImpl.
void iText.Kernel.XMP.XMPMeta.SetPropertyBoolean | ( | String | schemaNS, |
String | propName, | ||
bool | propValue | ||
) |
schemaNS | The namespace URI for the property |
propName | The name of the property |
propValue | the literal property value as
boolean
|
XMPException | Wraps all exceptions |
iText.Kernel.XMP.XMPException |
Implemented in iText.Kernel.XMP.Impl.XMPMetaImpl.
void iText.Kernel.XMP.XMPMeta.SetPropertyBoolean | ( | String | schemaNS, |
String | propName, | ||
bool | propValue, | ||
PropertyOptions | options | ||
) |
Convenience method to set a property to a literal
boolean
value.
schemaNS | The namespace URI for the property. Has the same usage as in
setProperty()
|
propName | The name of the property. Has the same usage as in
getProperty()
|
propValue | the literal property value as
boolean
|
options | options of the property to set (optional). |
XMPException | Wraps all exceptions that may occur. |
iText.Kernel.XMP.XMPException |
Implemented in iText.Kernel.XMP.Impl.XMPMetaImpl.
void iText.Kernel.XMP.XMPMeta.SetPropertyCalendar | ( | String | schemaNS, |
String | propName, | ||
DateTime | propValue | ||
) |
schemaNS | The namespace URI for the property |
propName | The name of the property |
propValue | the property value as
Calendar
|
XMPException | Wraps all exceptions |
iText.Kernel.XMP.XMPException |
Implemented in iText.Kernel.XMP.Impl.XMPMetaImpl.
void iText.Kernel.XMP.XMPMeta.SetPropertyCalendar | ( | String | schemaNS, |
String | propName, | ||
DateTime | propValue, | ||
PropertyOptions | options | ||
) |
Convenience method to set a property with a Java Calendar-object, which is serialized to an ISO8601 date.
schemaNS | The namespace URI for the property. Has the same usage as in
setProperty()
|
propName | The name of the property. Has the same usage as in
getProperty()
|
propValue | the property value as Java
Calendar
|
options | options of the property to set (optional). |
XMPException | Wraps all exceptions that may occur. |
iText.Kernel.XMP.XMPException |
Implemented in iText.Kernel.XMP.Impl.XMPMetaImpl.
void iText.Kernel.XMP.XMPMeta.SetPropertyDate | ( | String | schemaNS, |
String | propName, | ||
XMPDateTime | propValue | ||
) |
schemaNS | The namespace URI for the property |
propName | The name of the property |
propValue | the property value as
XMPDateTime
|
XMPException | Wraps all exceptions |
iText.Kernel.XMP.XMPException |
Implemented in iText.Kernel.XMP.Impl.XMPMetaImpl.
void iText.Kernel.XMP.XMPMeta.SetPropertyDate | ( | String | schemaNS, |
String | propName, | ||
XMPDateTime | propValue, | ||
PropertyOptions | options | ||
) |
Convenience method to set a property with an XMPDateTime-object, which is serialized to an ISO8601 date.
schemaNS | The namespace URI for the property. Has the same usage as in
setProperty()
|
propName | The name of the property. Has the same usage as in
getProperty()
|
propValue | the property value as
XMPDateTime
|
options | options of the property to set (optional). |
XMPException | Wraps all exceptions that may occur. |
iText.Kernel.XMP.XMPException |
Implemented in iText.Kernel.XMP.Impl.XMPMetaImpl.
void iText.Kernel.XMP.XMPMeta.SetPropertyDouble | ( | String | schemaNS, |
String | propName, | ||
double | propValue | ||
) |
schemaNS | The namespace URI for the property |
propName | The name of the property |
propValue | the literal property value as
double
|
XMPException | Wraps all exceptions |
iText.Kernel.XMP.XMPException |
Implemented in iText.Kernel.XMP.Impl.XMPMetaImpl.
void iText.Kernel.XMP.XMPMeta.SetPropertyDouble | ( | String | schemaNS, |
String | propName, | ||
double | propValue, | ||
PropertyOptions | options | ||
) |
Convenience method to set a property to a literal
double
value.
schemaNS | The namespace URI for the property. Has the same usage as in
setProperty()
|
propName | The name of the property. Has the same usage as in
getProperty()
|
propValue | the literal property value as
double
|
options | options of the property to set (optional). |
XMPException | Wraps all exceptions that may occur. |
iText.Kernel.XMP.XMPException |
Implemented in iText.Kernel.XMP.Impl.XMPMetaImpl.
void iText.Kernel.XMP.XMPMeta.SetPropertyInteger | ( | String | schemaNS, |
String | propName, | ||
int | propValue | ||
) |
schemaNS | The namespace URI for the property |
propName | The name of the property |
propValue | the literal property value as
int
|
XMPException | Wraps all exceptions |
iText.Kernel.XMP.XMPException |
Implemented in iText.Kernel.XMP.Impl.XMPMetaImpl.
void iText.Kernel.XMP.XMPMeta.SetPropertyInteger | ( | String | schemaNS, |
String | propName, | ||
int | propValue, | ||
PropertyOptions | options | ||
) |
Convenience method to set a property to a literal
int
value.
schemaNS | The namespace URI for the property. Has the same usage as in
setProperty()
|
propName | The name of the property. Has the same usage as in
getProperty()
|
propValue | the literal property value as
int
|
options | options of the property to set (optional). |
XMPException | Wraps all exceptions that may occur. |
iText.Kernel.XMP.XMPException |
Implemented in iText.Kernel.XMP.Impl.XMPMetaImpl.
void iText.Kernel.XMP.XMPMeta.SetPropertyLong | ( | String | schemaNS, |
String | propName, | ||
long | propValue | ||
) |
schemaNS | The namespace URI for the property |
propName | The name of the property |
propValue | the literal property value as
long
|
XMPException | Wraps all exceptions |
iText.Kernel.XMP.XMPException |
Implemented in iText.Kernel.XMP.Impl.XMPMetaImpl.
void iText.Kernel.XMP.XMPMeta.SetPropertyLong | ( | String | schemaNS, |
String | propName, | ||
long | propValue, | ||
PropertyOptions | options | ||
) |
Convenience method to set a property to a literal
long
value.
schemaNS | The namespace URI for the property. Has the same usage as in
setProperty()
|
propName | The name of the property. Has the same usage as in
getProperty()
|
propValue | the literal property value as
long
|
options | options of the property to set (optional). |
XMPException | Wraps all exceptions that may occur. |
iText.Kernel.XMP.XMPException |
Implemented in iText.Kernel.XMP.Impl.XMPMetaImpl.
void iText.Kernel.XMP.XMPMeta.SetQualifier | ( | String | schemaNS, |
String | propName, | ||
String | qualNS, | ||
String | qualName, | ||
String | qualValue | ||
) |
schemaNS | The namespace URI for the struct |
propName | The name of the property to which the qualifier is attached |
qualNS | The namespace URI for the qualifier |
qualName | The name of the qualifier |
qualValue | the value of the qualifier |
XMPException | Wraps all errors and exceptions |
iText.Kernel.XMP.XMPException |
Implemented in iText.Kernel.XMP.Impl.XMPMetaImpl.
void iText.Kernel.XMP.XMPMeta.SetQualifier | ( | String | schemaNS, |
String | propName, | ||
String | qualNS, | ||
String | qualName, | ||
String | qualValue, | ||
PropertyOptions | options | ||
) |
Provides access to a qualifier attached to a property.
Provides access to a qualifier attached to a property. The namespace for the qualifier is passed as a URI, you need not worry about the path string syntax. In many regards qualifiers are like struct fields. See the introductory discussion of qualified properties for more information. The names of qualifiers should be XML qualified names, that is within an XML namespace. The path syntax for a qualified name uses the namespace prefix, which is unreliable because the prefix is never guaranteed. The URI is the formal name, the prefix is just a local shorthand in a given sequence of XML text. The property the qualifier will be attached has to exist.
schemaNS | The namespace URI for the struct. Has the same usage as in getProperty. |
propName | The name of the property to which the qualifier is attached. Has the same usage as in getProperty. |
qualNS | The namespace URI for the qualifier. Has the same URI and prefix usage as the schemaNS parameter. |
qualName | The name of the qualifier. Must be a single XML name, must not be
null
|
qualValue | A pointer to the
null
|
options | Option flags describing the qualifier. See the earlier description. |
XMPException | Wraps all errors and exceptions that may occur. |
iText.Kernel.XMP.XMPException |
Implemented in iText.Kernel.XMP.Impl.XMPMetaImpl.
void iText.Kernel.XMP.XMPMeta.SetStructField | ( | String | schemaNS, |
String | structName, | ||
String | fieldNS, | ||
String | fieldName, | ||
String | fieldValue | ||
) |
schemaNS | The namespace URI for the struct |
structName | The name of the struct |
fieldNS | The namespace URI for the field |
fieldName | The name of the field |
fieldValue | the value of the field |
XMPException | Wraps all errors and exceptions |
iText.Kernel.XMP.XMPException |
Implemented in iText.Kernel.XMP.Impl.XMPMetaImpl.
void iText.Kernel.XMP.XMPMeta.SetStructField | ( | String | schemaNS, |
String | structName, | ||
String | fieldNS, | ||
String | fieldName, | ||
String | fieldValue, | ||
PropertyOptions | options | ||
) |
Provides access to fields within a nested structure.
Provides access to fields within a nested structure. The namespace for the field is passed as a URI, you need not worry about the path string syntax. The names of fields should be XML qualified names, that is within an XML namespace. The path syntax for a qualified name uses the namespace prefix, which is unreliable because the prefix is never guaranteed. The URI is the formal name, the prefix is just a local shorthand in a given sequence of XML text.
schemaNS | The namespace URI for the struct. Has the same usage as in getProperty. |
structName | The name of the struct. May be a general path expression, must not be null or the empty string. Has the same namespace prefix usage as propName in getProperty. |
fieldNS | The namespace URI for the field. Has the same URI and prefix usage as the schemaNS parameter. |
fieldName | The name of the field. Must be a single XML name, must not be null or the empty string. Has the same namespace prefix usage as the structName parameter. |
fieldValue | the value of thefield, if the field has a value. Has the same usage as propValue in getProperty. |
options | Option flags describing the field. See the earlier description. |
XMPException | Wraps all errors and exceptions that may occur. |
iText.Kernel.XMP.XMPException |
Implemented in iText.Kernel.XMP.Impl.XMPMetaImpl.
void iText.Kernel.XMP.XMPMeta.Sort | ( | ) |
Sorts the complete datamodel according to the following rules:
Schema nodes are sorted by prefix.
Sorts the complete datamodel according to the following rules:
Implemented in iText.Kernel.XMP.Impl.XMPMetaImpl.