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 int
private boolean
Use by default for nested attributes.private boolean
Use by default for nested elements.private int
Index in namespace table for binding.private String
Namespace prefix (may benull
, but not "").private String
Namespace URI.(package private) static final int
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic NamespaceDefinition
buildNamespace
(String uri, String prefix) Instance builder with supplied values.int
getIndex()
Get namespace index.Get prefix for namespace.getUri()
Get namespace URI.boolean
Check if default namespace for attributes.boolean
Check if default namespace for elements.void
print
(int depth) void
setIndex
(int index) Set namespace index.void
Set 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 benull
for default namespace, but not "")usage
- code for default usage of namespace
-
-
Method Details
-
isAttributeDefault
public boolean isAttributeDefault()Check if default namespace for attributes.- Returns:
true
if default namespace for attributes,false
if not
-
isElementDefault
public boolean isElementDefault()Check if default namespace for elements.- Returns:
true
if default namespace for elements,false
if 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)
-