You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
etesync-android/libs/simple-xml-2.7/javadoc/org/simpleframework/xml/stream/NamespaceMap.html

377 lines
14 KiB

<!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.6.0_37) on Mon Feb 18 20:39:44 EST 2013 -->
<TITLE>
NamespaceMap
</TITLE>
<META NAME="date" CONTENT="2013-02-18">
<LINK REL ="stylesheet" TYPE="text/css" HREF="../../../../stylesheet.css" TITLE="Style">
<SCRIPT type="text/javascript">
function windowTitle()
{
if (location.href.indexOf('is-external=true') == -1) {
parent.document.title="NamespaceMap";
}
}
</SCRIPT>
<NOSCRIPT>
</NOSCRIPT>
</HEAD>
<BODY BGCOLOR="white" onload="windowTitle();">
<HR>
<!-- ========= 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>&nbsp;</TD>
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="package-summary.html"><FONT CLASS="NavBarFont1"><B>Package</B></FONT></A>&nbsp;</TD>
<TD BGCOLOR="#FFFFFF" CLASS="NavBarCell1Rev"> &nbsp;<FONT CLASS="NavBarFont1Rev"><B>Class</B></FONT>&nbsp;</TD>
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="package-tree.html"><FONT CLASS="NavBarFont1"><B>Tree</B></FONT></A>&nbsp;</TD>
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../../deprecated-list.html"><FONT CLASS="NavBarFont1"><B>Deprecated</B></FONT></A>&nbsp;</TD>
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../../index-all.html"><FONT CLASS="NavBarFont1"><B>Index</B></FONT></A>&nbsp;</TD>
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../../help-doc.html"><FONT CLASS="NavBarFont1"><B>Help</B></FONT></A>&nbsp;</TD>
</TR>
</TABLE>
</TD>
<TD ALIGN="right" VALIGN="top" ROWSPAN=3><EM>
</EM>
</TD>
</TR>
<TR>
<TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
&nbsp;<A HREF="../../../../org/simpleframework/xml/stream/Mode.html" title="enum in org.simpleframework.xml.stream"><B>PREV CLASS</B></A>&nbsp;
&nbsp;<A HREF="../../../../org/simpleframework/xml/stream/Node.html" title="interface in org.simpleframework.xml.stream"><B>NEXT CLASS</B></A></FONT></TD>
<TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
<A HREF="../../../../index.html?org/simpleframework/xml/stream/NamespaceMap.html" target="_top"><B>FRAMES</B></A> &nbsp;
&nbsp;<A HREF="NamespaceMap.html" target="_top"><B>NO FRAMES</B></A> &nbsp;
&nbsp;<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:&nbsp;NESTED&nbsp;|&nbsp;FIELD&nbsp;|&nbsp;CONSTR&nbsp;|&nbsp;<A HREF="#method_summary">METHOD</A></FONT></TD>
<TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2">
DETAIL:&nbsp;FIELD&nbsp;|&nbsp;CONSTR&nbsp;|&nbsp;<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">
org.simpleframework.xml.stream</FONT>
<BR>
Interface NamespaceMap</H2>
<DL>
<DT><B>All Superinterfaces:</B> <DD>java.lang.Iterable&lt;java.lang.String&gt;</DD>
</DL>
<HR>
<DL>
<DT><PRE>public interface <B>NamespaceMap</B><DT>extends java.lang.Iterable&lt;java.lang.String&gt;</DL>
</PRE>
<P>
The <code>NamespaceMap</code> object is used store the namespaces
for an element. Each namespace added to this map can be added
with a prefix. A prefix is added only if the associated reference
has not been added to a parent element. If a parent element has
the associated reference, then the parents prefix is the one that
will be returned when requested from this map.
<P>
<P>
<DL>
<DT><B>Author:</B></DT>
<DD>Niall Gallagher</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>&nbsp;java.lang.String</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../org/simpleframework/xml/stream/NamespaceMap.html#getPrefix()">getPrefix</A></B>()</CODE>
<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;This is the prefix that is associated with the source element.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>&nbsp;java.lang.String</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../org/simpleframework/xml/stream/NamespaceMap.html#getPrefix(java.lang.String)">getPrefix</A></B>(java.lang.String&nbsp;reference)</CODE>
<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;This acquires the prefix for the specified namespace reference.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>&nbsp;java.lang.String</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../org/simpleframework/xml/stream/NamespaceMap.html#getReference(java.lang.String)">getReference</A></B>(java.lang.String&nbsp;prefix)</CODE>
<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;This acquires the namespace reference for the specified prefix.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>&nbsp;java.util.Iterator&lt;java.lang.String&gt;</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../org/simpleframework/xml/stream/NamespaceMap.html#iterator()">iterator</A></B>()</CODE>
<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;This returns an iterator for the namespace of all the nodes
in this <code>NamespaceMap</code>.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>&nbsp;java.lang.String</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../org/simpleframework/xml/stream/NamespaceMap.html#setReference(java.lang.String)">setReference</A></B>(java.lang.String&nbsp;reference)</CODE>
<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;This is used to add the namespace reference to the namespace
map.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>&nbsp;java.lang.String</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../org/simpleframework/xml/stream/NamespaceMap.html#setReference(java.lang.String, java.lang.String)">setReference</A></B>(java.lang.String&nbsp;reference,
java.lang.String&nbsp;prefix)</CODE>
<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;This is used to add the namespace reference to the namespace
map.</TD>
</TR>
</TABLE>
&nbsp;
<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="getPrefix()"><!-- --></A><H3>
getPrefix</H3>
<PRE>
java.lang.String <B>getPrefix</B>()</PRE>
<DL>
<DD>This is the prefix that is associated with the source element.
If the source element does not contain a namespace reference
then this will return its parents namespace. This ensures
that if a namespace has been declared its child elements will
inherit its prefix.
<P>
<DD><DL>
</DL>
</DD>
<DD><DL>
<DT><B>Returns:</B><DD>this returns the prefix that is currently in scope</DL>
</DD>
</DL>
<HR>
<A NAME="getPrefix(java.lang.String)"><!-- --></A><H3>
getPrefix</H3>
<PRE>
java.lang.String <B>getPrefix</B>(java.lang.String&nbsp;reference)</PRE>
<DL>
<DD>This acquires the prefix for the specified namespace reference.
If the namespace reference has been set on this node with a
given prefix then that prefix is returned, however if it has
not been set this will search the parent elements to find the
prefix that is in scope for the specified reference.
<P>
<DD><DL>
</DL>
</DD>
<DD><DL>
<DT><B>Parameters:</B><DD><CODE>reference</CODE> - the reference to find a matching prefix for
<DT><B>Returns:</B><DD>this will return the prefix that is is scope</DL>
</DD>
</DL>
<HR>
<A NAME="getReference(java.lang.String)"><!-- --></A><H3>
getReference</H3>
<PRE>
java.lang.String <B>getReference</B>(java.lang.String&nbsp;prefix)</PRE>
<DL>
<DD>This acquires the namespace reference for the specified prefix.
If the provided prefix has been set on this node with a given
reference then that reference is returned, however if it has
not been set this will search the parent elements to find the
reference that is in scope for the specified reference.
<P>
<DD><DL>
</DL>
</DD>
<DD><DL>
<DT><B>Parameters:</B><DD><CODE>prefix</CODE> - the prefix to find a matching reference for
<DT><B>Returns:</B><DD>this will return the reference that is is scope</DL>
</DD>
</DL>
<HR>
<A NAME="iterator()"><!-- --></A><H3>
iterator</H3>
<PRE>
java.util.Iterator&lt;java.lang.String&gt; <B>iterator</B>()</PRE>
<DL>
<DD>This returns an iterator for the namespace of all the nodes
in this <code>NamespaceMap</code>. This allows the namespaces
to be iterated within a for each loop in order to extract the
prefix values associated with the map.
<P>
<DD><DL>
<DT><B>Specified by:</B><DD><CODE>iterator</CODE> in interface <CODE>java.lang.Iterable&lt;java.lang.String&gt;</CODE></DL>
</DD>
<DD><DL>
<DT><B>Returns:</B><DD>this returns the namespaces contained in this map</DL>
</DD>
</DL>
<HR>
<A NAME="setReference(java.lang.String)"><!-- --></A><H3>
setReference</H3>
<PRE>
java.lang.String <B>setReference</B>(java.lang.String&nbsp;reference)</PRE>
<DL>
<DD>This is used to add the namespace reference to the namespace
map. If the namespace has been added to a parent node then
this will not add the reference. The prefix added to the map
will be the default namespace, which is an empty prefix.
<P>
<DD><DL>
</DL>
</DD>
<DD><DL>
<DT><B>Parameters:</B><DD><CODE>reference</CODE> - this is the reference to be added
<DT><B>Returns:</B><DD>this returns the prefix that has been replaced</DL>
</DD>
</DL>
<HR>
<A NAME="setReference(java.lang.String, java.lang.String)"><!-- --></A><H3>
setReference</H3>
<PRE>
java.lang.String <B>setReference</B>(java.lang.String&nbsp;reference,
java.lang.String&nbsp;prefix)</PRE>
<DL>
<DD>This is used to add the namespace reference to the namespace
map. If the namespace has been added to a parent node then
this will not add the reference.
<P>
<DD><DL>
</DL>
</DD>
<DD><DL>
<DT><B>Parameters:</B><DD><CODE>reference</CODE> - this is the reference to be added<DD><CODE>prefix</CODE> - this is the prefix to be added to the reference
<DT><B>Returns:</B><DD>this returns the prefix that has been replaced</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>&nbsp;</TD>
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="package-summary.html"><FONT CLASS="NavBarFont1"><B>Package</B></FONT></A>&nbsp;</TD>
<TD BGCOLOR="#FFFFFF" CLASS="NavBarCell1Rev"> &nbsp;<FONT CLASS="NavBarFont1Rev"><B>Class</B></FONT>&nbsp;</TD>
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="package-tree.html"><FONT CLASS="NavBarFont1"><B>Tree</B></FONT></A>&nbsp;</TD>
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../../deprecated-list.html"><FONT CLASS="NavBarFont1"><B>Deprecated</B></FONT></A>&nbsp;</TD>
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../../index-all.html"><FONT CLASS="NavBarFont1"><B>Index</B></FONT></A>&nbsp;</TD>
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../../help-doc.html"><FONT CLASS="NavBarFont1"><B>Help</B></FONT></A>&nbsp;</TD>
</TR>
</TABLE>
</TD>
<TD ALIGN="right" VALIGN="top" ROWSPAN=3><EM>
</EM>
</TD>
</TR>
<TR>
<TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
&nbsp;<A HREF="../../../../org/simpleframework/xml/stream/Mode.html" title="enum in org.simpleframework.xml.stream"><B>PREV CLASS</B></A>&nbsp;
&nbsp;<A HREF="../../../../org/simpleframework/xml/stream/Node.html" title="interface in org.simpleframework.xml.stream"><B>NEXT CLASS</B></A></FONT></TD>
<TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
<A HREF="../../../../index.html?org/simpleframework/xml/stream/NamespaceMap.html" target="_top"><B>FRAMES</B></A> &nbsp;
&nbsp;<A HREF="NamespaceMap.html" target="_top"><B>NO FRAMES</B></A> &nbsp;
&nbsp;<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:&nbsp;NESTED&nbsp;|&nbsp;FIELD&nbsp;|&nbsp;CONSTR&nbsp;|&nbsp;<A HREF="#method_summary">METHOD</A></FONT></TD>
<TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2">
DETAIL:&nbsp;FIELD&nbsp;|&nbsp;CONSTR&nbsp;|&nbsp;<A HREF="#method_detail">METHOD</A></FONT></TD>
</TR>
</TABLE>
<A NAME="skip-navbar_bottom"></A>
<!-- ======== END OF BOTTOM NAVBAR ======= -->
<HR>
</BODY>
</HTML>