Package org.jibx.binding.def
Class NamespaceDefinition
- java.lang.Object
-
- org.jibx.binding.def.NamespaceDefinition
-
public class NamespaceDefinition extends Object
Namespace definition from binding.- Author:
- Dennis M. Sosnoski
-
-
Constructor Summary
Constructors Constructor Description NamespaceDefinition(String uri, String prefix, int usage)Constructor.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static NamespaceDefinitionbuildNamespace(String uri, String prefix)Instance builder with supplied values.intgetIndex()Get namespace index.StringgetPrefix()Get prefix for namespace.StringgetUri()Get namespace URI.booleanisAttributeDefault()Check if default namespace for attributes.booleanisElementDefault()Check if default namespace for elements.voidprint(int depth)voidsetIndex(int index)Set namespace index.voidsetPrefix(String prefix)Set prefix for namespace.
-
-
-
Method Detail
-
isAttributeDefault
public boolean isAttributeDefault()
Check if default namespace for attributes.- Returns:
trueif default namespace for attributes,falseif not
-
isElementDefault
public boolean isElementDefault()
Check if default namespace for elements.- Returns:
trueif default namespace for elements,falseif not
-
setPrefix
public void setPrefix(String prefix)
Set prefix for namespace.- Parameters:
prefix- namespace prefix (may benull, but not "")
-
getPrefix
public String getPrefix()
Get prefix for namespace.- Returns:
- namespace prefix (may be
null, but not "")
-
getUri
public String getUri()
Get namespace URI.- Returns:
- namespace URI
-
setIndex
public void setIndex(int index)
Set namespace index.- Parameters:
index- namespace index
-
getIndex
public int getIndex()
Get namespace index.- Returns:
- namespace index
-
buildNamespace
public static NamespaceDefinition buildNamespace(String uri, String prefix)
Instance builder with supplied values. Used for canned definitions.- Parameters:
uri- namespace URIprefix- namespace prefix- Returns:
- NamespaceDefinition
-
print
public void print(int depth)
-
-