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 NamespaceNamepublic String getUri()
getUri in interface NamespaceNamepublic 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–2018 Apache Software Foundation; Copyright © 2018–2019 The Document Foundation. All rights reserved.