Package org.jibx.binding.def
Class NamespaceDefinition
java.lang.Object
org.jibx.binding.def.NamespaceDefinition
Namespace definition from binding.
- Author:
- Dennis M. Sosnoski
-
Field Summary
FieldsModifier and TypeFieldDescription(package private) static final int(package private) static final int(package private) static final intprivate booleanUse by default for nested attributes.private booleanUse by default for nested elements.private intIndex in namespace table for binding.private StringNamespace prefix (may benull, but not "").private StringNamespace URI.(package private) static final int -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic NamespaceDefinitionbuildNamespace(String uri, String prefix) Instance builder with supplied values.intgetIndex()Get namespace index.Get prefix for namespace.getUri()Get namespace URI.booleanCheck if default namespace for attributes.booleanCheck if default namespace for elements.voidprint(int depth) voidsetIndex(int index) Set namespace index.voidSet prefix for namespace.
-
Field Details
-
NODEFAULT_USAGE
static final int NODEFAULT_USAGE- See Also:
-
ELEMENTS_USAGE
static final int ELEMENTS_USAGE- See Also:
-
ATTRIBUTES_USAGE
static final int ATTRIBUTES_USAGE- See Also:
-
ALLDEFAULT_USAGE
static final int ALLDEFAULT_USAGE- See Also:
-
m_uri
Namespace URI. -
m_prefix
Namespace prefix (may benull, but not ""). -
m_index
private int m_indexIndex in namespace table for binding. -
m_elementDefault
private boolean m_elementDefaultUse by default for nested elements. -
m_attributeDefault
private boolean m_attributeDefaultUse by default for nested attributes.
-
-
Constructor Details
-
NamespaceDefinition
Constructor.- Parameters:
uri- namespace URIprefix- namespace prefix (may benullfor default namespace, but not "")usage- code for default usage of namespace
-
-
Method Details
-
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
Set prefix for namespace.- Parameters:
prefix- namespace prefix (may benull, but not "")
-
getPrefix
Get prefix for namespace.- Returns:
- namespace prefix (may be
null, but not "")
-
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
Instance builder with supplied values. Used for canned definitions.- Parameters:
uri- namespace URIprefix- namespace prefix
-
print
public void print(int depth)
-