|
Version: 1.1.1 | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.biomoby.shared.MobyPrefixResolver
public class MobyPrefixResolver
The main purpose of this class is to provide default mapping from prefices we will use in the XPath statements built in the various client classes to URI's of XML namespaces. For example, if one wanted to construct a XPath statement looking for queryResponse elements from the MOBY namespace, there is no direct mechanism to specify this in the XPath. One can instead compile an XPath statement such as "//moby:queryResponse" and use this PrefixResolver, that defines the "moby" prefix as pointing to the MOBY XML Namespace. Otherwise the "//moby:queryResponse" will not match the document unless the document happens to use "moby:" as that Namespace's prefix. Using this class is the only way to compile XPaths that are independent of the namespace declarations in the document (since those are the default ones used by XPath evaluators). NOTE: the methods of this class rely on the DOM being parsed with a namespace-aware parser!
Nested Class Summary | |
---|---|
static class |
MobyPrefixResolver.MobyNodeList
|
Constructor Summary | |
---|---|
MobyPrefixResolver()
|
Method Summary | |
---|---|
static String |
getAttr(Element e,
String attrName)
Convenience method that matches attributes in the MOBY namespace or, for now at least, with no declared namespace. |
String |
getBaseIdentifier()
We don't really implement this as it can be extremely complicated. |
static Element |
getChildElement(Element e,
String elementName)
Convenience method that matches attributes in the MOBY namespace or, for now at least, with no declared namespace. |
static NodeList |
getChildElements(Element e,
String elementName)
Convenience method that matches child elements in the MOBY namespace or, for now at least, with no declared namespace. "*" acts as a wildcard. |
String |
getNamespaceForPrefix(String prefix)
|
String |
getNamespaceForPrefix(String prefix,
Node context)
Don't use this class if this method will be used. |
boolean |
handlesNullPrefixes()
|
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static final String MOBY_XML_NAMESPACE
public static final String MOBY_XML_NAMESPACE_INVALID
public static final String MOBY_XML_PREFIX
public static final String MOBY_TRANSPORT_NAMESPACE
public static final String MOBY_TRANSPORT_PREFIX
public static final String XSI_NAMESPACE1999
public static final String XSI_NAMESPACE2001
public static final String XSI_PREFIX
public static final String XSI1999_PREFIX
public static final String XSI2001_PREFIX
public static final String XSD_NAMESPACE
public static final String XSD_PREFIX
public static final String SOAP_ENC_NAMESPACE
public static final String SOAP_ENC_PREFIX
public static final String WS_ADDRESSING_PREFIX
public static final String WS_ADDRESSING_NAMESPACE
public static final String WSRP_PREFIX
public static final String WSRP_NAMESPACE
public static final String XHTML_PREFIX
public static final String XHTML_NAMESPACE
public static final String XLINK_PREFIX
public static final String XLINK_NAMESPACE
public static final String WSDL_PREFIX
public static final String WSDL_NAMESPACE
public static final String WSDL20_PREFIX
public static final String WSDL20_NAMESPACE
public static final String HTTP_PREFIX
public static final String HTTP_NAMESPACE
public static final String SAWSDL_PREFIX
public static final String SAWSDL_NAMESPACE
public static final String LSID_PREFIX
public static final String LSID_NAMESPACE
public static final String DUBLIN_CORE_PREFIX
public static final String DUBLIN_CORE_NAMESPACE
Constructor Detail |
---|
public MobyPrefixResolver()
Method Detail |
---|
public String getBaseIdentifier()
getBaseIdentifier
in interface org.apache.xml.utils.PrefixResolver
public static String getAttr(Element e, String attrName)
public static Element getChildElement(Element e, String elementName)
public static NodeList getChildElements(Element e, String elementName)
public String getNamespaceForPrefix(String prefix)
getNamespaceForPrefix
in interface org.apache.xml.utils.PrefixResolver
public String getNamespaceForPrefix(String prefix, Node context)
getNamespaceForPrefix
in interface org.apache.xml.utils.PrefixResolver
public boolean handlesNullPrefixes()
handlesNullPrefixes
in interface org.apache.xml.utils.PrefixResolver
|
Version: 1.1.1 | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |