|
Generated by JDiff |
||||||||
PREV PACKAGE NEXT PACKAGE FRAMES NO FRAMES |
This file contains all the changes in documentation in the packagecom.itextpdf.kernel.xmp
as colored differences. Deletions are shownlike this, and additions are shown like this.
If no deletions or additions are shown in an entry, the HTML tags will be what has changed. The new HTML tags are shown in the differences. If no documentation existed, and then some was added in a later version, this change is noted in the appropriate class pages of differences, but the change is not shown on this page. Only changes in existing text are shown here. Similarly, documentation which was inherited from another class or interface is not shown here.
Note that an HTML error in the new documentation may cause the display of other documentation changes to be presented incorrectly. For instance, failure to close a tag will cause all subsequent paragraphs to be displayed differently.
Utility services for the metadata object. It has only public static functions, you cannot create an object. These are all functions that layer cleanly on top of the kernel XMP toolkit.Class XMPPathFactory, String composeFieldSelector(String, String, String, String)These functions provide support for composing path expressions to deeply nested properties. The functions
XMPMeta
such asgetProperty()
,getArrayItem()
andgetStructField()
provide easy access to top level simple properties, items in top level arrays, and fields of top level structs. They do not provide convenient access to more complex things like fields several levels deep in a complex struct, or fields within an array of structs, or items of an array that is a field of a struct. These functions can also be used to compose paths to top level array items or struct fields so that you can use the binary accessors likegetPropertyAsInteger()
.You can use these functions is to compose a complete path expression, or all but the last component. Suppose you have a property that is an array of integers within a struct. You can access one of the array items like this:
You could also use this code if you want the string form of the integer:String path = XMPPathFactory.composeStructFieldPath (schemaNS, "Struct", fieldNS, "Array"); String path += XMPPathFactory.composeArrayItemPath (schemaNS, "Array" index); PropertyInteger result = xmpObj.getPropertyAsInteger(schemaNS, path);String path = XMPPathFactory.composeStructFieldPath (schemaNS, "Struct", fieldNS, "Array"); PropertyText xmpObj.getArrayItem (schemaNS, path, index);Note: It might look confusing that the schemaNS is passed in all of the calls above. This is because the XMP toolkit keeps the top level "schema" namespace separate from the rest of the path expression. Note: These methods are much simpler than in the C++-API, they don't check the given path or array indices. @since 25.01.2006
Compose the path expression to select an alternate item by a field's value. The path syntax allows two forms of "content addressing" that may be used to select an item in an array of alternatives. The form used in ComposeFieldSelector lets you select an item in an array of structs based on the value of one of the fields in the structs. The other form of content addressing is shown in ComposeLangSelector. For example, consider a simple struct that has two fields, the name of a city and the URI of an FTP site in that city. Use this to create an array of download alternatives. You can show the user a popup built from the values of the city fields. You can then get the corresponding URI as follows:@param arrayName The name of the array. May be a general path expression, must not beString path = composeFieldSelector ( schemaNS, "Downloads", fieldNS, "City", chosenCity ); XMPProperty prop = xmpObj.getStructField ( schemaNS, path, fieldNS, "URI" );null
or the empty string. @param fieldNS The namespace URI for the field used as the selector. Must not benull
or the empty string. @param fieldName The name of the field used as the selector. Must be a simple XML name, must not benull
or the empty string. It must be the name of a field that is itself simple. @param fieldValue The desired value of the field. @return Returns the composed path. This will be of the form ns:arrayName[fNS:fieldName='fieldValue'], where "ns" is the prefix for schemaNS and "fNS" is the prefix for fieldNS. @throws XMPException Thrown if the path to create is not valid.
Normalizes and prints the given string. @param s the String that should be printed @param isAttValue this flag determines whether some characters will be escapedClass XmlDomWriter, void normalizeAndPrint(char, boolean)
Normalizes and print the given character. @param c character that should be printed @param isAttValue this flag determines whether some characters will be escapedClass XmlDomWriter, void setCanonical(boolean)
Sets whether output is canonical. @param canonical should the writer write canonical output or notClass XmlDomWriter, void setOutput(OutputStream, String)
Sets the output stream for printing. @param stream the OutputStream to which data will be written @param encoding output stream encodingClass XmlDomWriter, Attr[] sortAttributes(NamedNodeMap)
Returns a sorted list of attributes. @param attrs objects implementing NamedNodeMap that will be sorted @return a sorted list of attributesClass XmlDomWriter, void write(Node)
Writes the specified node, recursively. @param node the type of Node for writing