|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.zkoss.idom.Namespace
public final class Namespace
Represents the namespace. A namespace is immutable, so you have to get a new one
Item
,
Serialized FormField Summary | |
---|---|
static Namespace |
NO_NAMESPACE
The Namespace for when not in a namespace |
static Namespace |
XML_NAMESPACE
The xml namespace. |
static Namespace |
XMLNS_NAMESPACE
The xmlns namespace. |
Constructor Summary | |
---|---|
Namespace(java.lang.String prefix,
java.lang.String uri)
Constructor. |
Method Summary | |
---|---|
java.lang.Object |
clone()
|
boolean |
equals(java.lang.Object o)
Note: equals() is based on URI only. |
boolean |
equalsAll(Namespace ns)
Tests whether two namespace are the same in both prefix and namespace URI. |
java.lang.String |
getPrefix()
Gets the prefix mapped to this Namespace. |
static Namespace |
getSpecial(java.lang.String prefix)
Returns the special namespace if prefix is special, or null if not. |
java.lang.String |
getURI()
Gets the namespace URI for this Namespace. |
int |
hashCode()
Note: hashCode() is based on URI only. |
java.lang.String |
tagNameOf(java.lang.String name)
Gets the tag name of the giving local name. |
java.lang.String |
toString()
|
Methods inherited from class java.lang.Object |
---|
finalize, getClass, notify, notifyAll, wait, wait, wait |
Field Detail |
---|
public static final Namespace NO_NAMESPACE
Namespace
for when not in a namespace
public static final Namespace XML_NAMESPACE
public static final Namespace XMLNS_NAMESPACE
Constructor Detail |
---|
public Namespace(java.lang.String prefix, java.lang.String uri)
prefix
- String prefix to map to this namespace.uri
- String URI for namespace.
DOMException
- with NAMESPACE_ERR if the given prefix and uri
is invalidMethod Detail |
---|
public static Namespace getSpecial(java.lang.String prefix)
public final java.lang.String tagNameOf(java.lang.String name)
public final java.lang.String getPrefix()
public final java.lang.String getURI()
public final boolean equalsAll(Namespace ns)
Note: unlike equals, it throws DOMException if prefix is the same but URI is different.
DOMException
- if they have the same prefix
but with different namespace URIpublic java.lang.Object clone()
clone
in class java.lang.Object
public boolean equals(java.lang.Object o)
equals
in class java.lang.Object
public int hashCode()
hashCode
in class java.lang.Object
public java.lang.String toString()
toString
in class java.lang.Object
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |