Java Doc for BindingElement.java in  » XML » jibx-1.1.5 » org » jibx » binding » model » Java Source Code / Java DocumentationJava Source Code and Java Documentation

Java Source Code / Java Documentation
1. 6.0 JDK Core
2. 6.0 JDK Modules
3. 6.0 JDK Modules com.sun
4. 6.0 JDK Modules com.sun.java
5. 6.0 JDK Modules sun
6. 6.0 JDK Platform
7. Ajax
8. Apache Harmony Java SE
9. Aspect oriented
10. Authentication Authorization
11. Blogger System
12. Build
13. Byte Code
14. Cache
15. Chart
16. Chat
17. Code Analyzer
18. Collaboration
19. Content Management System
20. Database Client
21. Database DBMS
22. Database JDBC Connection Pool
23. Database ORM
24. Development
25. EJB Server geronimo
26. EJB Server GlassFish
27. EJB Server JBoss 4.2.1
28. EJB Server resin 3.1.5
29. ERP CRM Financial
30. ESB
31. Forum
32. GIS
33. Graphic Library
34. Groupware
35. HTML Parser
36. IDE
37. IDE Eclipse
38. IDE Netbeans
39. Installer
40. Internationalization Localization
41. Inversion of Control
42. Issue Tracking
43. J2EE
44. JBoss
45. JMS
46. JMX
47. Library
48. Mail Clients
49. Net
50. Parser
51. PDF
52. Portal
53. Profiler
54. Project Management
55. Report
56. RSS RDF
57. Rule Engine
58. Science
59. Scripting
60. Search Engine
61. Security
62. Sevlet Container
63. Source Control
64. Swing Library
65. Template Engine
66. Test Coverage
67. Testing
68. UML
69. Web Crawler
70. Web Framework
71. Web Mail
72. Web Server
73. Web Services
74. Web Services apache cxf 2.0.1
75. Web Services AXIS2
76. Wiki Engine
77. Workflow Engines
78. XML
79. XML UI
Java
Java Tutorial
Java Open Source
Jar File Download
Java Articles
Java Products
Java by API
Photoshop Tutorials
Maya Tutorials
Flash Tutorials
3ds-Max Tutorials
Illustrator Tutorials
GIMP Tutorials
C# / C Sharp
C# / CSharp Tutorial
C# / CSharp Open Source
ASP.Net
ASP.NET Tutorial
JavaScript DHTML
JavaScript Tutorial
JavaScript Reference
HTML / CSS
HTML CSS Reference
C / ANSI-C
C Tutorial
C++
C++ Tutorial
Ruby
PHP
Python
Python Tutorial
Python Open Source
SQL Server / T-SQL
SQL Server / T-SQL Tutorial
Oracle PL / SQL
Oracle PL/SQL Tutorial
PostgreSQL
SQL / MySQL
MySQL Tutorial
VB.Net
VB.Net Tutorial
Flash / Flex / ActionScript
VBA / Excel / Access / Word
XML
XML Tutorial
Microsoft Office PowerPoint 2007 Tutorial
Microsoft Office Excel 2007 Tutorial
Microsoft Office Word 2007 Tutorial
Java Source Code / Java Documentation » XML » jibx 1.1.5 » org.jibx.binding.model 
Source Cross Reference  Class Diagram Java Document (Java Doc) 


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

Field Summary
final public static  intBOTH_BINDING
    
final public static  intIN_BINDING
    
final public static  intOUT_BINDING
    
final public static  StringArrays_allowedAttributes
    
final static  EnumSets_directionEnum
    

Constructor Summary
public  BindingElement()
     Default constructor.

Method Summary
public  voidaddIdClass(IClass clas)
     Add a class defined with a ID value.
public  voidaddIncludeBinding(String path, BindingElement bind)
     Add binding accessible to includes.
public  booleanaddIncludePath(String path)
     Add include path to set processed.
public  voidaddNamespaceDecl(String prefix, String uri)
     Add namespace declaration for output when marshalling.
public  voidaddTopChild(Object child)
     Add top-level child element.
public  URLgetBaseUrl()
     Get base URL for relative include paths.
public  intgetDefaultStyle()
     Get default style value for child components.
public  BindingElementgetIncludeBinding(URL url, BindingElement root, ValidationContext vctx)
     Get included binding.
public  StringgetName()
     Get binding name.
public  StringgetTargetPackage()
     Get package for generated context factory class.
public  booleanhasAttribute()
    
public  booleanhasContent()
    
public  booleanisAddConstructors()
     Check if default constructor generation is enabled.
public  booleanisForceClasses()
     Check if marshaller/unmarshaller class creation for top-level non-base abstract mappings is forced.
public  booleanisForward()
     Check if forward references to IDs must be supported in XML.
public  booleanisIdClass(String name)
     Check if a class can be referenced by ID.
public  booleanisInBinding()
     Check if this binding component applies for unmarshalling XML.
public  booleanisOptional()
    
public  booleanisOutBinding()
     Check if this binding component applies for marshalling XML.
public  booleanisTrackSource()
     Check if source position tracking enabled for unmarshalling.
public static  ValidationContextnewValidationContext()
     Create a default validation context.
public  voidprevalidate(ValidationContext vctx)
     Prevalidate all attributes of element in isolation.
public static  BindingElementreadBinding(InputStream is, String fname, BindingElement contain, ValidationContext vctx)
     Read a binding definition (possibly as an include) to construct binding model.
public static  BindingElementreadBinding(InputStream is, String fname, ValidationContext vctx)
     Read a binding definition to construct binding model.
public  voidrunValidation(ValidationContext vctx)
     Run the actual validation of a binding model.
public  voidsetAddConstructors(boolean add)
     Set default constructor generation.
public  voidsetBaseUrl(URL base)
     Set base URL for relative include paths.
public  voidsetForceClasses(boolean force)
     Set force marshaller/unmarshaller class creation for top-level non-base abstract mappings.
public  voidsetForward(boolean forward)
     Set forward references to IDs be supported in XML.
public  voidsetInBinding(boolean in)
     Set binding component applies for unmarshalling XML.
public  voidsetName(String name)
     Set binding name.
public  voidsetOutBinding(boolean out)
     Set binding component applies for marshalling XML.
public  voidsetTargetPackage(String pack)
     Set package for generated context factory class.
public  voidsetTrackSource(boolean track)
     Set source position tracking for unmarshalling.
public  IteratortopChildIterator()
     Get iterator for top-level child elements.
public  ArrayListtopChildren()
     Get list of top-level child elements.
public static  BindingElementvalidateBinding(String name, URL path, InputStream is, ValidationContext vctx)
     Validate a binding definition.

Field Detail
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



s_directionEnum
final static EnumSet s_directionEnum(Code)




Constructor Detail
BindingElement
public BindingElement()(Code)
Default constructor.




Method Detail
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



getIncludeBinding
public BindingElement getIncludeBinding(URL url, BindingElement root, ValidationContext vctx) throws IOException, JiBXException(Code)
Get included binding. If the binding was supplied directly it's just returned; otherwise, it's read from the URL. This method should only be called if BindingElement.addIncludePath(String) returns true, so that each unique included binding is only processed once.
Parameters:
  url - binding path
Parameters:
  root - binding containing the include
Parameters:
  vctx - validation context binding
throws:
  IOException -
throws:
  JiBXException -



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, falseif 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, falseif 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



Fields inherited from org.jibx.binding.model.NestingElementBase
final public static StringArray s_allowedAttributes(Code)(Java Doc)

Methods inherited from org.jibx.binding.model.NestingElementBase
final public void addChild(Object child)(Code)(Java Doc)
final public Iterator childIterator()(Code)(Java Doc)
final public ArrayList children()(Code)(Java Doc)
public int getDefaultStyle()(Code)(Java Doc)
final public DefinitionContext getDefinitions()(Code)(Java Doc)
public int getStyle()(Code)(Java Doc)
public String getStyleName()(Code)(Java Doc)
public void prevalidate(ValidationContext vctx)(Code)(Java Doc)
void setDefinitions(DefinitionContext ctx)(Code)(Java Doc)
public void setStyleName(String name)(Code)(Java Doc)
public void validate(ValidationContext vctx)(Code)(Java Doc)

Fields inherited from org.jibx.binding.model.ElementBase
final public static int BINDING_ELEMENT(Code)(Java Doc)
final public static int COLLECTION_ELEMENT(Code)(Java Doc)
final public static String[] ELEMENT_NAMES(Code)(Java Doc)
final public static int FORMAT_ELEMENT(Code)(Java Doc)
final public static int INCLUDE_ELEMENT(Code)(Java Doc)
final public static int INPUT_ELEMENT(Code)(Java Doc)
final public static int MAPPING_ELEMENT(Code)(Java Doc)
final public static int NAMESPACE_ELEMENT(Code)(Java Doc)
final public static int OUTPUT_ELEMENT(Code)(Java Doc)
final public static int SPLIT_ELEMENT(Code)(Java Doc)
final public static int STRUCTURE_ELEMENT(Code)(Java Doc)
final public static int TEMPLATE_ELEMENT(Code)(Java Doc)
final public static int VALUE_ELEMENT(Code)(Java Doc)

Methods inherited from org.jibx.binding.model.ElementBase
final public String getComment()(Code)(Java Doc)
final public String name()(Code)(Java Doc)
public void prevalidate(ValidationContext vctx)(Code)(Java Doc)
final public void setComment(String text)(Code)(Java Doc)
public String toString()(Code)(Java Doc)
final public int type()(Code)(Java Doc)
public void validate(ValidationContext vctx)(Code)(Java Doc)
protected void validateAttributes(IUnmarshallingContext ictx, StringArray attrs) throws JiBXException(Code)(Java Doc)

Methods inherited from java.lang.Object
native protected Object clone() throws CloneNotSupportedException(Code)(Java Doc)
public boolean equals(Object obj)(Code)(Java Doc)
protected void finalize() throws Throwable(Code)(Java Doc)
final native public Class getClass()(Code)(Java Doc)
native public int hashCode()(Code)(Java Doc)
final native public void notify()(Code)(Java Doc)
final native public void notifyAll()(Code)(Java Doc)
public String toString()(Code)(Java Doc)
final native public void wait(long timeout) throws InterruptedException(Code)(Java Doc)
final public void wait(long timeout, int nanos) throws InterruptedException(Code)(Java Doc)
final public void wait() throws InterruptedException(Code)(Java Doc)

www.java2java.com | Contact Us
Copyright 2009 - 12 Demo Source and Support. All rights reserved.
All other trademarks are property of their respective owners.