Package org.apache.axiom.om
Interface OMNamespace
-
public interface OMNamespaceA namespace binding specifying a namespace prefix and a namespace URI.Implementations of this interface must be immutable or behave as if they were immutable, i.e.
getPrefix()andgetNamespaceURI()must always return the same values when invoked on the same instance.Implementations must override
Object.equals(Object)andObject.hashCode(). TwoOMNamespaceinstances are considered equal if their namespace URIs and prefixes are equal.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Deprecated Methods Modifier and Type Method Description booleanequals(String uri, String prefix)Method equals.StringgetName()Deprecated.This method is deprecated.StringgetNamespaceURI()Get the namespace URI.StringgetPrefix()Get the namespace prefix.
-
-
-
Method Detail
-
equals
boolean equals(String uri, String prefix)
Method equals.- Parameters:
uri-prefix-- Returns:
- Returns boolean.
-
getPrefix
String getPrefix()
Get the namespace prefix. This method may returnnullfor instances returned byOMFactory.createOMNamespace(String, String). This indicates that Axiom should generate a namespace prefix when this instance is passed to one of the factory methods inOMFactory. In all other cases the return value is not null. In particular, an empty string indicates that no prefix is used, i.e. that the namespace is used as default namespace.- Returns:
- the namespace prefix
-
getName
String getName()
Deprecated.This method is deprecated. Please use getNamespaceURI() method instead.Method getName.- Returns:
- Returns String.
-
getNamespaceURI
String getNamespaceURI()
Get the namespace URI. This method never returnsnull. It may return an empty string if this instance represents a namespace declaration of typexmlns="". This may be the case for instances returned byOMElement.getAllDeclaredNamespaces(). On the other hand, methods such asOMNamedInformationItem.getNamespace()will returnnullfor information items that have no namespace. In that case the returned string is never empty.- Returns:
- the namespace URI
-
-