org.jibx.binding.model
Class IncludeElement

java.lang.Object
  extended by org.jibx.binding.model.ElementBase
      extended by org.jibx.binding.model.NestingElementBase
          extended by org.jibx.binding.model.IncludeElement

public class IncludeElement
extends NestingElementBase

Model component for include element of binding definition. During prevalidation this reads the included binding definition. All further processing of the included components needs to be handled directly by the tree walking code in TreeContext, since the components of the included binding need to be treated as though they were direct children of the container of this element (and accessed in the appropriate order).

Version:
1.0
Author:
Dennis M. Sosnoski

Field Summary
private  BindingElement m_binding
          Object model for included binding.
private  java.lang.String m_includePath
          Path to included binding definition.
private  boolean m_precompiled
          Included binding precompiled flag.
static StringArray s_allowedAttributes
          Enumeration of allowed attribute names
 
Fields inherited from class org.jibx.binding.model.ElementBase
BINDING_ELEMENT, COLLECTION_ELEMENT, ELEMENT_NAMES, FORMAT_ELEMENT, INCLUDE_ELEMENT, INPUT_ELEMENT, MAPPING_ELEMENT, NAMESPACE_ELEMENT, OUTPUT_ELEMENT, SPLIT_ELEMENT, STRUCTURE_ELEMENT, TEMPLATE_ELEMENT, VALUE_ELEMENT
 
Constructor Summary
IncludeElement()
          Constructor.
 
Method Summary
 BindingElement getBinding()
          Get the included binding model.
 java.lang.String getIncludePath()
          Get path to included binding.
private  void preSet(IUnmarshallingContext uctx)
          Make sure all attributes are defined.
 void prevalidate(ValidationContext vctx)
          Prevalidate element information.
 void setIncludePath(java.lang.String path)
          Set path to included binding.
 
Methods inherited from class org.jibx.binding.model.NestingElementBase
addChild, childIterator, children, getDefaultStyle, getDefinitions, getStyle, getStyleName, setDefinitions, setStyleName, validate
 
Methods inherited from class org.jibx.binding.model.ElementBase
getComment, name, setComment, toString, type, validateAttributes
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

s_allowedAttributes

public static final StringArray s_allowedAttributes
Enumeration of allowed attribute names


m_includePath

private java.lang.String m_includePath
Path to included binding definition.


m_precompiled

private boolean m_precompiled
Included binding precompiled flag.


m_binding

private BindingElement m_binding
Object model for included binding.

Constructor Detail

IncludeElement

public IncludeElement()
Constructor.

Method Detail

setIncludePath

public void setIncludePath(java.lang.String path)
Set path to included binding.

Parameters:
path -

getIncludePath

public java.lang.String getIncludePath()
Get path to included binding.

Returns:
path

getBinding

public BindingElement getBinding()
Get the included binding model. This call is only valid after prevalidation.

Returns:
binding element, or null if redundant include

preSet

private void preSet(IUnmarshallingContext uctx)
             throws JiBXException
Make sure all attributes are defined.

Parameters:
uctx - unmarshalling context
Throws:
JiBXException - on unmarshalling error

prevalidate

public void prevalidate(ValidationContext vctx)
Description copied from class: ElementBase
Prevalidate element information. The prevalidation step is used to check isolated aspects of an element, such as the settings for enumerated values on the element and attributes. This empty base class implementation should be overridden by each subclass that requires prevalidation handling.

Overrides:
prevalidate in class NestingElementBase
Parameters:
vctx - validation context


Project Web Site