org.odftoolkit.odfdom.pkg
public class OdfNamespace extends Object implements Comparable<OdfNamespace>, NamespaceName
Modifier and Type | Method and Description |
---|---|
int |
compareTo(OdfNamespace namespace) |
boolean |
equals(Object obj) |
static String |
getLocalPart(String qname) |
static OdfNamespace |
getNamespace(String uri)
Returns the namespace for the given uri.
|
String |
getPrefix() |
static String |
getPrefixPart(String qname) |
String |
getUri() |
int |
hashCode() |
static OdfNamespace |
newNamespace(NamespaceName name)
Returns the OdfNamespace for the given name.
|
static OdfNamespace |
newNamespace(String prefix,
String uri)
Returns the OdfNamespace for the given name.
|
static String[] |
splitQName(String qname)
Splits the XML Qname into the local name and the prefix.
|
String |
toString() |
public static OdfNamespace newNamespace(NamespaceName name)
name
- represents a W3C Namespace Name. The interface NamespaceName
is often implemented by an enum.public static OdfNamespace newNamespace(String prefix, String uri)
uri
- identifying the namespace.public static OdfNamespace getNamespace(String uri)
uri
- identifying the namespace.public String getPrefix()
getPrefix
in interface NamespaceName
public String getUri()
getUri
in interface NamespaceName
public static String[] splitQName(String qname) throws IllegalArgumentException
qname
- is the qualified name to be splitted.IllegalArgumentException
- if no qualified name was given.public static String getPrefixPart(String qname)
qname
- is the qualified name to be splitted.IllegalArgumentException
- if no qualified name was given.public static String getLocalPart(String qname)
qname
- is the qualified name to be splitted.IllegalArgumentException
- if no qualified name was given.public int compareTo(OdfNamespace namespace)
compareTo
in interface Comparable<OdfNamespace>
Copyright © 2008-2014 The Apache Software Foundation. All Rights Reserved.