diff options
author | Hubert Figuiere <hub@figuiere.net> | 2007-05-11 18:38:11 -0400 |
---|---|---|
committer | Hubert Figuiere <hub@figuiere.net> | 2007-05-11 18:38:11 -0400 |
commit | 9d7d7c3caac05db240692ad7e9196fcb7f5a1ce5 (patch) | |
tree | c6228d1abcad689137e764f63539effadaf1a662 /java/XMPCore/docs/com/adobe/xmp/XMPPathFactory.html |
Import of XMP SDK 4.1.1 as the start for openxmpadobe-4.1.1
Diffstat (limited to 'java/XMPCore/docs/com/adobe/xmp/XMPPathFactory.html')
-rw-r--r-- | java/XMPCore/docs/com/adobe/xmp/XMPPathFactory.html | 427 |
1 files changed, 427 insertions, 0 deletions
diff --git a/java/XMPCore/docs/com/adobe/xmp/XMPPathFactory.html b/java/XMPCore/docs/com/adobe/xmp/XMPPathFactory.html new file mode 100644 index 0000000..b58ed92 --- /dev/null +++ b/java/XMPCore/docs/com/adobe/xmp/XMPPathFactory.html @@ -0,0 +1,427 @@ +<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"> +<!--NewPage--> +<HTML> +<HEAD> +<!-- Generated by javadoc (build 1.5.0_07) on Thu May 03 14:54:50 CEST 2007 --> +<TITLE> +XMPPathFactory +</TITLE> + +<META NAME="keywords" CONTENT="com.adobe.xmp.XMPPathFactory class"> + +<LINK REL ="stylesheet" TYPE="text/css" HREF="../../../stylesheet.css" TITLE="Style"> + +<SCRIPT type="text/javascript"> +function windowTitle() +{ + parent.document.title="XMPPathFactory"; +} +</SCRIPT> +<NOSCRIPT> +</NOSCRIPT> + +</HEAD> + +<BODY BGCOLOR="white" onload="windowTitle();"> + + +<!-- ========= START OF TOP NAVBAR ======= --> +<A NAME="navbar_top"><!-- --></A> +<A HREF="#skip-navbar_top" title="Skip navigation links"></A> +<TABLE BORDER="0" WIDTH="100%" CELLPADDING="1" CELLSPACING="0" SUMMARY=""> +<TR> +<TD COLSPAN=2 BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> +<A NAME="navbar_top_firstrow"><!-- --></A> +<TABLE BORDER="0" CELLPADDING="0" CELLSPACING="3" SUMMARY=""> + <TR ALIGN="center" VALIGN="top"> + <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../overview-summary.html"><FONT CLASS="NavBarFont1"><B>Overview</B></FONT></A> </TD> + <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="package-summary.html"><FONT CLASS="NavBarFont1"><B>Package</B></FONT></A> </TD> + <TD BGCOLOR="#FFFFFF" CLASS="NavBarCell1Rev"> <FONT CLASS="NavBarFont1Rev"><B>Class</B></FONT> </TD> + <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="class-use/XMPPathFactory.html"><FONT CLASS="NavBarFont1"><B>Use</B></FONT></A> </TD> + <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="package-tree.html"><FONT CLASS="NavBarFont1"><B>Tree</B></FONT></A> </TD> + <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../deprecated-list.html"><FONT CLASS="NavBarFont1"><B>Deprecated</B></FONT></A> </TD> + <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../index-files/index-1.html"><FONT CLASS="NavBarFont1"><B>Index</B></FONT></A> </TD> + <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../help-doc.html"><FONT CLASS="NavBarFont1"><B>Help</B></FONT></A> </TD> + </TR> +</TABLE> +</TD> +<TD ALIGN="right" VALIGN="top" ROWSPAN=3><EM> +</EM> +</TD> +</TR> + +<TR> +<TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2"> + <A HREF="../../../com/adobe/xmp/XMPMetaFactory.html" title="class in com.adobe.xmp"><B>PREV CLASS</B></A> + <A HREF="../../../com/adobe/xmp/XMPSchemaRegistry.html" title="interface in com.adobe.xmp"><B>NEXT CLASS</B></A></FONT></TD> +<TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2"> + <A HREF="../../../index.html?com/adobe/xmp/XMPPathFactory.html" target="_top"><B>FRAMES</B></A> + <A HREF="XMPPathFactory.html" target="_top"><B>NO FRAMES</B></A> + <SCRIPT type="text/javascript"> + <!-- + if(window==top) { + document.writeln('<A HREF="../../../allclasses-noframe.html"><B>All Classes</B></A>'); + } + //--> +</SCRIPT> +<NOSCRIPT> + <A HREF="../../../allclasses-noframe.html"><B>All Classes</B></A> +</NOSCRIPT> + + +</FONT></TD> +</TR> +<TR> +<TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2"> + SUMMARY: NESTED | FIELD | CONSTR | <A HREF="#method_summary">METHOD</A></FONT></TD> +<TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2"> +DETAIL: FIELD | CONSTR | <A HREF="#method_detail">METHOD</A></FONT></TD> +</TR> +</TABLE> +<A NAME="skip-navbar_top"></A> +<!-- ========= END OF TOP NAVBAR ========= --> + +<HR> +<!-- ======== START OF CLASS DATA ======== --> +<H2> +<FONT SIZE="-1"> +com.adobe.xmp</FONT> +<BR> +Class XMPPathFactory</H2> +<PRE> +java.lang.Object + <IMG SRC="../../../resources/inherit.gif" ALT="extended by "><B>com.adobe.xmp.XMPPathFactory</B> +</PRE> +<HR> +<DL> +<DT><PRE>public final class <B>XMPPathFactory</B><DT>extends java.lang.Object</DL> +</PRE> + +<P> +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 core XMP toolkit. + <p> + These functions provide support for composing path expressions to deeply nested properties. The + functions <code>XMPMeta</code> such as <code>getProperty()</code>, + <code>getArrayItem()</code> and <code>getStructField()</code> 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 like <code>getPropertyAsInteger()</code>. + <p> + 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: + <p> + <blockquote> + + <pre> + String path = XMPPathFactory.composeStructFieldPath (schemaNS, "Struct", fieldNS, + "Array"); + String path += XMPPathFactory.composeArrayItemPath (schemaNS, "Array" index); + PropertyInteger result = xmpObj.getPropertyAsInteger(schemaNS, path); + </pre> + + </blockquote> You could also use this code if you want the string form of the integer: + <blockquote> + + <pre> + String path = XMPPathFactory.composeStructFieldPath (schemaNS, "Struct", fieldNS, + "Array"); + PropertyText xmpObj.getArrayItem (schemaNS, path, index); + </pre> + + </blockquote> + <p> + <em>Note:</em> 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. + <em>Note:</em> These methods are much simpler than in the C++-API, they don't check the given + path or array indices. +<P> + +<P> +<DL> +<DT><B>Since:</B></DT> + <DD>25.01.2006</DD> +</DL> +<HR> + +<P> + +<!-- ========== METHOD SUMMARY =========== --> + +<A NAME="method_summary"><!-- --></A> +<TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY=""> +<TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor"> +<TH ALIGN="left" COLSPAN="2"><FONT SIZE="+2"> +<B>Method Summary</B></FONT></TH> +</TR> +<TR BGCOLOR="white" CLASS="TableRowColor"> +<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> +<CODE>static java.lang.String</CODE></FONT></TD> +<TD><CODE><B><A HREF="../../../com/adobe/xmp/XMPPathFactory.html#composeArrayItemPath(java.lang.String, int)">composeArrayItemPath</A></B>(java.lang.String arrayName, + int itemIndex)</CODE> + +<BR> + Compose the path expression for an item in an array.</TD> +</TR> +<TR BGCOLOR="white" CLASS="TableRowColor"> +<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> +<CODE>static java.lang.String</CODE></FONT></TD> +<TD><CODE><B><A HREF="../../../com/adobe/xmp/XMPPathFactory.html#composeFieldSelector(java.lang.String, java.lang.String, java.lang.String, java.lang.String)">composeFieldSelector</A></B>(java.lang.String arrayName, + java.lang.String fieldNS, + java.lang.String fieldName, + java.lang.String fieldValue)</CODE> + +<BR> + Compose the path expression to select an alternate item by a field's value.</TD> +</TR> +<TR BGCOLOR="white" CLASS="TableRowColor"> +<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> +<CODE>static java.lang.String</CODE></FONT></TD> +<TD><CODE><B><A HREF="../../../com/adobe/xmp/XMPPathFactory.html#composeLangSelector(java.lang.String, java.lang.String)">composeLangSelector</A></B>(java.lang.String arrayName, + java.lang.String langName)</CODE> + +<BR> + Compose the path expression to select an alternate item by language.</TD> +</TR> +<TR BGCOLOR="white" CLASS="TableRowColor"> +<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> +<CODE>static java.lang.String</CODE></FONT></TD> +<TD><CODE><B><A HREF="../../../com/adobe/xmp/XMPPathFactory.html#composeQualifierPath(java.lang.String, java.lang.String)">composeQualifierPath</A></B>(java.lang.String qualNS, + java.lang.String qualName)</CODE> + +<BR> + Compose the path expression for a qualifier.</TD> +</TR> +<TR BGCOLOR="white" CLASS="TableRowColor"> +<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> +<CODE>static java.lang.String</CODE></FONT></TD> +<TD><CODE><B><A HREF="../../../com/adobe/xmp/XMPPathFactory.html#composeStructFieldPath(java.lang.String, java.lang.String)">composeStructFieldPath</A></B>(java.lang.String fieldNS, + java.lang.String fieldName)</CODE> + +<BR> + Compose the path expression for a field in a struct.</TD> +</TR> +</TABLE> + <A NAME="methods_inherited_from_class_java.lang.Object"><!-- --></A> +<TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY=""> +<TR BGCOLOR="#EEEEFF" CLASS="TableSubHeadingColor"> +<TH ALIGN="left"><B>Methods inherited from class java.lang.Object</B></TH> +</TR> +<TR BGCOLOR="white" CLASS="TableRowColor"> +<TD><CODE>equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait</CODE></TD> +</TR> +</TABLE> + +<P> + +<!-- ============ METHOD DETAIL ========== --> + +<A NAME="method_detail"><!-- --></A> +<TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY=""> +<TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor"> +<TH ALIGN="left" COLSPAN="1"><FONT SIZE="+2"> +<B>Method Detail</B></FONT></TH> +</TR> +</TABLE> + +<A NAME="composeArrayItemPath(java.lang.String, int)"><!-- --></A><H3> +composeArrayItemPath</H3> +<PRE> +public static java.lang.String <B>composeArrayItemPath</B>(java.lang.String arrayName, + int itemIndex)</PRE> +<DL> +<DD>Compose the path expression for an item in an array. +<P> +<DD><DL> +<DT><B>Parameters:</B><DD><CODE>arrayName</CODE> - The name of the array. May be a general path expression, must not be + <code>null</code> or the empty string.<DD><CODE>itemIndex</CODE> - The index of the desired item. Arrays in XMP are indexed from 1. + 0 and below means last array item and renders as <code>[last()]</code>. +<DT><B>Returns:</B><DD>Returns the composed path basing on fullPath. This will be of the form + <tt>ns:arrayName[i]</tt>, where "ns" is the prefix for schemaNS and + "i" is the decimal representation of itemIndex.</DL> +</DD> +</DL> +<HR> + +<A NAME="composeStructFieldPath(java.lang.String, java.lang.String)"><!-- --></A><H3> +composeStructFieldPath</H3> +<PRE> +public static java.lang.String <B>composeStructFieldPath</B>(java.lang.String fieldNS, + java.lang.String fieldName) + throws <A HREF="../../../com/adobe/xmp/XMPException.html" title="class in com.adobe.xmp">XMPException</A></PRE> +<DL> +<DD>Compose the path expression for a field in a struct. The result can be added to the + path of +<P> +<DD><DL> +<DT><B>Parameters:</B><DD><CODE>fieldNS</CODE> - The namespace URI for the field. Must not be <code>null</code> or the empty + string.<DD><CODE>fieldName</CODE> - The name of the field. Must be a simple XML name, must not be + <code>null</code> or the empty string. +<DT><B>Returns:</B><DD>Returns the composed path. This will be of the form + <tt>ns:structName/fNS:fieldName</tt>, where "ns" is the prefix for + schemaNS and "fNS" is the prefix for fieldNS. +<DT><B>Throws:</B> +<DD><CODE><A HREF="../../../com/adobe/xmp/XMPException.html" title="class in com.adobe.xmp">XMPException</A></CODE> - Thrown if the path to create is not valid.</DL> +</DD> +</DL> +<HR> + +<A NAME="composeQualifierPath(java.lang.String, java.lang.String)"><!-- --></A><H3> +composeQualifierPath</H3> +<PRE> +public static java.lang.String <B>composeQualifierPath</B>(java.lang.String qualNS, + java.lang.String qualName) + throws <A HREF="../../../com/adobe/xmp/XMPException.html" title="class in com.adobe.xmp">XMPException</A></PRE> +<DL> +<DD>Compose the path expression for a qualifier. +<P> +<DD><DL> +<DT><B>Parameters:</B><DD><CODE>qualNS</CODE> - The namespace URI for the qualifier. May be <code>null</code> or the empty + string if the qualifier is in the XML empty namespace.<DD><CODE>qualName</CODE> - The name of the qualifier. Must be a simple XML name, must not be + <code>null</code> or the empty string. +<DT><B>Returns:</B><DD>Returns the composed path. This will be of the form + <tt>ns:propName/?qNS:qualName</tt>, where "ns" is the prefix for + schemaNS and "qNS" is the prefix for qualNS. +<DT><B>Throws:</B> +<DD><CODE><A HREF="../../../com/adobe/xmp/XMPException.html" title="class in com.adobe.xmp">XMPException</A></CODE> - Thrown if the path to create is not valid.</DL> +</DD> +</DL> +<HR> + +<A NAME="composeLangSelector(java.lang.String, java.lang.String)"><!-- --></A><H3> +composeLangSelector</H3> +<PRE> +public static java.lang.String <B>composeLangSelector</B>(java.lang.String arrayName, + java.lang.String langName)</PRE> +<DL> +<DD>Compose the path expression to select an alternate item by language. 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 + ComposeLangSelector lets you select an item in an alt-text array based on + the value of its <tt>xml:lang</tt> qualifier. The other form of content + addressing is shown in ComposeFieldSelector. \note ComposeLangSelector + does not supplant SetLocalizedText or GetLocalizedText. They should + generally be used, as they provide extra logic to choose the appropriate + language and maintain consistency with the 'x-default' value. + ComposeLangSelector gives you an path expression that is explicitly and + only for the language given in the langName parameter. +<P> +<DD><DL> +<DT><B>Parameters:</B><DD><CODE>arrayName</CODE> - The name of the array. May be a general path expression, must + not be <code>null</code> or the empty string.<DD><CODE>langName</CODE> - The RFC 3066 code for the desired language. +<DT><B>Returns:</B><DD>Returns the composed path. This will be of the form + <tt>ns:arrayName[@xml:lang='langName']</tt>, where + "ns" is the prefix for schemaNS.</DL> +</DD> +</DL> +<HR> + +<A NAME="composeFieldSelector(java.lang.String, java.lang.String, java.lang.String, java.lang.String)"><!-- --></A><H3> +composeFieldSelector</H3> +<PRE> +public static java.lang.String <B>composeFieldSelector</B>(java.lang.String arrayName, + java.lang.String fieldNS, + java.lang.String fieldName, + java.lang.String fieldValue) + throws <A HREF="../../../com/adobe/xmp/XMPException.html" title="class in com.adobe.xmp">XMPException</A></PRE> +<DL> +<DD>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: + <p> + <blockquote> + + <pre> + String path = composeFieldSelector ( schemaNS, "Downloads", fieldNS, + "City", chosenCity ); + XMPProperty prop = xmpObj.getStructField ( schemaNS, path, fieldNS, "URI" ); + </pre> + + </blockquote> +<P> +<DD><DL> +<DT><B>Parameters:</B><DD><CODE>arrayName</CODE> - The name of the array. May be a general path expression, must not be + <code>null</code> or the empty string.<DD><CODE>fieldNS</CODE> - The namespace URI for the field used as the selector. Must not be + <code>null</code> or the empty string.<DD><CODE>fieldName</CODE> - The name of the field used as the selector. Must be a simple XML name, must + not be <code>null</code> or the empty string. It must be the name of a field that is + itself simple.<DD><CODE>fieldValue</CODE> - The desired value of the field. +<DT><B>Returns:</B><DD>Returns the composed path. This will be of the form + <tt>ns:arrayName[fNS:fieldName='fieldValue']</tt>, where "ns" is the + prefix for schemaNS and "fNS" is the prefix for fieldNS. +<DT><B>Throws:</B> +<DD><CODE><A HREF="../../../com/adobe/xmp/XMPException.html" title="class in com.adobe.xmp">XMPException</A></CODE> - Thrown if the path to create is not valid.</DL> +</DD> +</DL> +<!-- ========= END OF CLASS DATA ========= --> +<HR> + + +<!-- ======= START OF BOTTOM NAVBAR ====== --> +<A NAME="navbar_bottom"><!-- --></A> +<A HREF="#skip-navbar_bottom" title="Skip navigation links"></A> +<TABLE BORDER="0" WIDTH="100%" CELLPADDING="1" CELLSPACING="0" SUMMARY=""> +<TR> +<TD COLSPAN=2 BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> +<A NAME="navbar_bottom_firstrow"><!-- --></A> +<TABLE BORDER="0" CELLPADDING="0" CELLSPACING="3" SUMMARY=""> + <TR ALIGN="center" VALIGN="top"> + <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../overview-summary.html"><FONT CLASS="NavBarFont1"><B>Overview</B></FONT></A> </TD> + <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="package-summary.html"><FONT CLASS="NavBarFont1"><B>Package</B></FONT></A> </TD> + <TD BGCOLOR="#FFFFFF" CLASS="NavBarCell1Rev"> <FONT CLASS="NavBarFont1Rev"><B>Class</B></FONT> </TD> + <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="class-use/XMPPathFactory.html"><FONT CLASS="NavBarFont1"><B>Use</B></FONT></A> </TD> + <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="package-tree.html"><FONT CLASS="NavBarFont1"><B>Tree</B></FONT></A> </TD> + <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../deprecated-list.html"><FONT CLASS="NavBarFont1"><B>Deprecated</B></FONT></A> </TD> + <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../index-files/index-1.html"><FONT CLASS="NavBarFont1"><B>Index</B></FONT></A> </TD> + <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../help-doc.html"><FONT CLASS="NavBarFont1"><B>Help</B></FONT></A> </TD> + </TR> +</TABLE> +</TD> +<TD ALIGN="right" VALIGN="top" ROWSPAN=3><EM> +</EM> +</TD> +</TR> + +<TR> +<TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2"> + <A HREF="../../../com/adobe/xmp/XMPMetaFactory.html" title="class in com.adobe.xmp"><B>PREV CLASS</B></A> + <A HREF="../../../com/adobe/xmp/XMPSchemaRegistry.html" title="interface in com.adobe.xmp"><B>NEXT CLASS</B></A></FONT></TD> +<TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2"> + <A HREF="../../../index.html?com/adobe/xmp/XMPPathFactory.html" target="_top"><B>FRAMES</B></A> + <A HREF="XMPPathFactory.html" target="_top"><B>NO FRAMES</B></A> + <SCRIPT type="text/javascript"> + <!-- + if(window==top) { + document.writeln('<A HREF="../../../allclasses-noframe.html"><B>All Classes</B></A>'); + } + //--> +</SCRIPT> +<NOSCRIPT> + <A HREF="../../../allclasses-noframe.html"><B>All Classes</B></A> +</NOSCRIPT> + + +</FONT></TD> +</TR> +<TR> +<TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2"> + SUMMARY: NESTED | FIELD | CONSTR | <A HREF="#method_summary">METHOD</A></FONT></TD> +<TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2"> +DETAIL: FIELD | CONSTR | <A HREF="#method_detail">METHOD</A></FONT></TD> +</TR> +</TABLE> +<A NAME="skip-navbar_bottom"></A> +<!-- ======== END OF BOTTOM NAVBAR ======= --> + +<HR> +<i>Copyright © 2006-2007 Adobe Systems Inc. All Rights Reserved.</i> +</BODY> +</HTML> |