| java.lang.Object org.jibx.binding.model.ElementBase org.jibx.binding.model.NestingElementBase org.jibx.binding.model.BindingElement
BindingElement | public class BindingElement extends NestingElementBase (Code) | | Model component for binding element.
author: Dennis M. Sosnoski version: 1.0 |
Inner Class :public static class UnmarshalWrapper | |
Method Summary | |
public void | addIdClass(IClass clas) Add a class defined with a ID value. | public void | addIncludeBinding(String path, BindingElement bind) Add binding accessible to includes. | public boolean | addIncludePath(String path) Add include path to set processed. | public void | addNamespaceDecl(String prefix, String uri) Add namespace declaration for output when marshalling. | public void | addTopChild(Object child) Add top-level child element. | public URL | getBaseUrl() Get base URL for relative include paths. | public int | getDefaultStyle() Get default style value for child components. | public BindingElement | getIncludeBinding(URL url, BindingElement root, ValidationContext vctx) Get included binding. | public String | getName() Get binding name. | public String | getTargetPackage() Get package for generated context factory class. | public boolean | hasAttribute() | public boolean | hasContent() | public boolean | isAddConstructors() Check if default constructor generation is enabled. | public boolean | isForceClasses() Check if marshaller/unmarshaller class creation for top-level non-base
abstract mappings is forced. | public boolean | isForward() Check if forward references to IDs must be supported in XML. | public boolean | isIdClass(String name) Check if a class can be referenced by ID. | public boolean | isInBinding() Check if this binding component applies for unmarshalling XML. | public boolean | isOptional() | public boolean | isOutBinding() Check if this binding component applies for marshalling XML. | public boolean | isTrackSource() Check if source position tracking enabled for unmarshalling. | public static ValidationContext | newValidationContext() Create a default validation context. | public void | prevalidate(ValidationContext vctx) Prevalidate all attributes of element in isolation. | public static BindingElement | readBinding(InputStream is, String fname, BindingElement contain, ValidationContext vctx) Read a binding definition (possibly as an include) to construct binding
model. | public static BindingElement | readBinding(InputStream is, String fname, ValidationContext vctx) Read a binding definition to construct binding model. | public void | runValidation(ValidationContext vctx) Run the actual validation of a binding model. | public void | setAddConstructors(boolean add) Set default constructor generation. | public void | setBaseUrl(URL base) Set base URL for relative include paths. | public void | setForceClasses(boolean force) Set force marshaller/unmarshaller class creation for top-level non-base
abstract mappings. | public void | setForward(boolean forward) Set forward references to IDs be supported in XML. | public void | setInBinding(boolean in) Set binding component applies for unmarshalling XML. | public void | setName(String name) Set binding name. | public void | setOutBinding(boolean out) Set binding component applies for marshalling XML. | public void | setTargetPackage(String pack) Set package for generated context factory class. | public void | setTrackSource(boolean track) Set source position tracking for unmarshalling. | public Iterator | topChildIterator() Get iterator for top-level child elements. | public ArrayList | topChildren() Get list of top-level child elements. | public static BindingElement | validateBinding(String name, URL path, InputStream is, ValidationContext vctx) Validate a binding definition. |
BOTH_BINDING | final public static int BOTH_BINDING(Code) | | |
IN_BINDING | final public static int IN_BINDING(Code) | | |
OUT_BINDING | final public static int OUT_BINDING(Code) | | |
s_allowedAttributes | final public static StringArray s_allowedAttributes(Code) | | Enumeration of allowed attribute names
|
BindingElement | public BindingElement()(Code) | | Default constructor.
|
addIdClass | public void addIdClass(IClass clas)(Code) | | Add a class defined with a ID value. This is used to track the classes
with ID values for validating ID references in the binding. If the
binding uses global IDs, the actual ID class is added to the table along
with all interfaces implemented by the class and all superclasses, since
instances of the ID class can be referenced in any of those forms. If the
binding does not use global IDs, only the actual ID class is added, since
references must be type-specific.
Parameters: clas - information for class with ID value |
addIncludeBinding | public void addIncludeBinding(String path, BindingElement bind)(Code) | | Add binding accessible to includes. This allows bindings to be supplied
directly, without needing to be parsed from an input document.
Parameters: path - URL string identifying the binding (virtual path) Parameters: bind - |
addIncludePath | public boolean addIncludePath(String path)(Code) | | Add include path to set processed.
Parameters: path - true if new path, false if duplicate |
addNamespaceDecl | public void addNamespaceDecl(String prefix, String uri)(Code) | | Add namespace declaration for output when marshalling.
Parameters: prefix - Parameters: uri - |
addTopChild | public void addTopChild(Object child)(Code) | | Add top-level child element.
TODO: should be ElementBase argument, but JiBX doesn't allow yet
Parameters: child - element to be added as child of this element |
getBaseUrl | public URL getBaseUrl()(Code) | | Get base URL for relative include paths.
base URL |
getDefaultStyle | public int getDefaultStyle()(Code) | | Get default style value for child components. This call is only
meaningful after validation.
default style value for child components |
getName | public String getName()(Code) | | Get binding name.
binding definition name |
getTargetPackage | public String getTargetPackage()(Code) | | Get package for generated context factory class.
package for generated context factory |
hasAttribute | public boolean hasAttribute()(Code) | | |
hasContent | public boolean hasContent()(Code) | | |
isAddConstructors | public boolean isAddConstructors()(Code) | | Check if default constructor generation is enabled.
true if default constructor generation enabled,false if not |
isForceClasses | public boolean isForceClasses()(Code) | | Check if marshaller/unmarshaller class creation for top-level non-base
abstract mappings is forced.
true if class generation forced,false if not |
isForward | public boolean isForward()(Code) | | Check if forward references to IDs must be supported in XML.
true if forward references required,false if not |
isIdClass | public boolean isIdClass(String name)(Code) | | Check if a class can be referenced by ID. This just checks if any classes
compatible with the reference type are bound with ID values.
Parameters: name - fully qualified name of class true if class is bound with an ID,false if not |
isInBinding | public boolean isInBinding()(Code) | | Check if this binding component applies for unmarshalling XML.
true if binding supports input, false if not |
isOptional | public boolean isOptional()(Code) | | |
isOutBinding | public boolean isOutBinding()(Code) | | Check if this binding component applies for marshalling XML.
true if binding supports output, false if not |
isTrackSource | public boolean isTrackSource()(Code) | | Check if source position tracking enabled for unmarshalling.
true if source position tracking enabled,false if not |
newValidationContext | public static ValidationContext newValidationContext()(Code) | | Create a default validation context.
new validation context |
prevalidate | public void prevalidate(ValidationContext vctx)(Code) | | Prevalidate all attributes of element in isolation.
Parameters: vctx - validation context |
readBinding | public static BindingElement readBinding(InputStream is, String fname, BindingElement contain, ValidationContext vctx) throws JiBXException(Code) | | Read a binding definition (possibly as an include) to construct binding
model.
Parameters: is - input stream for reading binding Parameters: fname - name of input file (null if unknown) Parameters: contain - containing binding (null if none) Parameters: vctx - validation context used during unmarshalling root of binding definition model throws: JiBXException - on error in reading binding |
readBinding | public static BindingElement readBinding(InputStream is, String fname, ValidationContext vctx) throws JiBXException(Code) | | Read a binding definition to construct binding model.
Parameters: is - input stream for reading binding Parameters: fname - name of input file (null if unknown) Parameters: vctx - validation context used during unmarshalling root of binding definition model throws: JiBXException - on error in reading binding |
runValidation | public void runValidation(ValidationContext vctx)(Code) | | Run the actual validation of a binding model.
Parameters: vctx - context for controlling validation |
setAddConstructors | public void setAddConstructors(boolean add)(Code) | | Set default constructor generation.
Parameters: add - true if constructors should be added,false if not |
setBaseUrl | public void setBaseUrl(URL base)(Code) | | Set base URL for relative include paths.
Parameters: base - |
setForceClasses | public void setForceClasses(boolean force)(Code) | | Set force marshaller/unmarshaller class creation for top-level non-base
abstract mappings.
Parameters: force - true if class generation forced,false if not |
setForward | public void setForward(boolean forward)(Code) | | Set forward references to IDs be supported in XML.
Parameters: forward - true if forward references supported,false if not |
setInBinding | public void setInBinding(boolean in)(Code) | | Set binding component applies for unmarshalling XML.
Parameters: in - true if binding supports input,false if not |
setName | public void setName(String name)(Code) | | Set binding name.
Parameters: name - binding definition name |
setOutBinding | public void setOutBinding(boolean out)(Code) | | Set binding component applies for marshalling XML.
Parameters: out - true if binding supports output,false if not |
setTargetPackage | public void setTargetPackage(String pack)(Code) | | Set package for generated context factory class.
Parameters: pack - generated context factory package |
setTrackSource | public void setTrackSource(boolean track)(Code) | | Set source position tracking for unmarshalling.
Parameters: track - true if source position tracking enabled,false if not |
topChildIterator | public Iterator topChildIterator()(Code) | | Get iterator for top-level child elements.
iterator for child elements |
topChildren | public ArrayList topChildren()(Code) | | Get list of top-level child elements.
list of child elements, or null if none |
validateBinding | public static BindingElement validateBinding(String name, URL path, InputStream is, ValidationContext vctx) throws JiBXException(Code) | | Validate a binding definition.
Parameters: name - binding definition name Parameters: is - input stream for reading binding Parameters: vctx - validation context to record problems root of binding definition model, or null if errorin unmarshalling throws: JiBXException - on error in binding XML structure |
|
|