org.jibx.binding.def
Class NamespaceDefinition

java.lang.Object
  extended byorg.jibx.binding.def.NamespaceDefinition

public class NamespaceDefinition
extends java.lang.Object

Namespace definition from binding.

Version:
1.0
Author:
Dennis M. Sosnoski

Field Summary
(package private) static int ALLDEFAULT_USAGE
           
(package private) static int ATTRIBUTES_USAGE
           
(package private) static int ELEMENTS_USAGE
           
private  boolean m_attributeDefault
          Use by default for nested attributes.
private  boolean m_elementDefault
          Use by default for nested elements.
private  int m_index
          Index in namespace table for binding.
private  java.lang.String m_prefix
          Namespace prefix (may be null, but not "").
private  java.lang.String m_uri
          Namespace URI.
(package private) static int NODEFAULT_USAGE
           
 
Constructor Summary
NamespaceDefinition(java.lang.String uri, java.lang.String prefix, int usage)
          Constructor.
 
Method Summary
static NamespaceDefinition buildNamespace(java.lang.String uri, java.lang.String prefix)
          Instance builder with supplied values.
 int getIndex()
          Get namespace index.
 java.lang.String getPrefix()
          Get prefix for namespace.
 java.lang.String getUri()
          Get namespace URI.
 boolean isAttributeDefault()
          Check if default namespace for attributes.
 boolean isElementDefault()
          Check if default namespace for elements.
 void print(int depth)
           
 void setIndex(int index)
          Set namespace index.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

NODEFAULT_USAGE

static final int NODEFAULT_USAGE
See Also:
Constant Field Values

ELEMENTS_USAGE

static final int ELEMENTS_USAGE
See Also:
Constant Field Values

ATTRIBUTES_USAGE

static final int ATTRIBUTES_USAGE
See Also:
Constant Field Values

ALLDEFAULT_USAGE

static final int ALLDEFAULT_USAGE
See Also:
Constant Field Values

m_uri

private java.lang.String m_uri
Namespace URI.


m_prefix

private java.lang.String m_prefix
Namespace prefix (may be null, but not "").


m_index

private int m_index
Index in namespace table for binding.


m_elementDefault

private boolean m_elementDefault
Use by default for nested elements.


m_attributeDefault

private boolean m_attributeDefault
Use by default for nested attributes.

Constructor Detail

NamespaceDefinition

public NamespaceDefinition(java.lang.String uri,
                           java.lang.String prefix,
                           int usage)
                    throws JiBXException
Constructor.

Parameters:
uri - namespace URI
prefix - namespace prefix (may be null for default namespace, but not "")
usage - code for default usage of namespace
Throws:
JiBXException - if configuration error
Method Detail

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

getPrefix

public java.lang.String getPrefix()
Get prefix for namespace.

Returns:
namespace prefix (may be null, but not "")

getUri

public java.lang.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(java.lang.String uri,
                                                 java.lang.String prefix)
                                          throws JiBXException
Instance builder with supplied values. Used for canned definitions.

Parameters:
uri - namespace URI
prefix - namespace prefix
Throws:
JiBXException - if configuration error

print

public void print(int depth)


Project Web Site