Java Doc for BindingDefinition.java in  » XML » jibx-1.1.5 » org » jibx » binding » def » 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.def 
Source Cross Reference  Class Diagram Java Document (Java Doc) 


java.lang.Object
   org.jibx.binding.def.BindingBuilder
      org.jibx.binding.def.BindingDefinition

BindingDefinition
public class BindingDefinition extends BindingBuilder.ContainerBase implements IContainer(Code)
Binding definition. This is the root of the object graph for a binding.
author:
   Dennis M. Sosnoski
version:
   1.0


Field Summary
final public static  StringCURRENT_VERSION_NAME
     Current distribution file name.
final static  StringDEFAULT_AUTOPREFIX
     Default prefix for automatic ID generation.
final public static  StringGENERATE_PREFIX
     Prefix used in all code generation for methods and classes.
public static  StringConversions_base64Conversion
    
public static  StringConversions_objectConversion
    
public static  StringConversions_stringConversion
    

Constructor Summary
public  BindingDefinition(String name, boolean ibind, boolean obind, String tpack, boolean glob, boolean forward, boolean source, boolean force)
     Constructor.

Method Summary
public  voidgenerateCode(boolean verbose)
     Generate code.
public static  BindingDefinitiongetBinding(int index)
     Get indexed binding.
public  BindingDefinitiongetBindingRoot()
    
public  BoundClassgetBoundClass()
     Get class linked to binding element.
public  StringgetDefaultPackage()
     Get default package used for code generation.
public  FilegetDefaultRoot()
     Get root directory for default code generation package.
public  DefinitionContextgetDefinitionContext()
    
public  intgetIdClassIndex(String name)
     Get index for ID'ed class from binding.
public  intgetIndex()
     Get index number of binding.
public  intgetMappedClassIndex(String name)
     Get index for mapped class from binding.
public  intgetMarshallerUnmarshallerIndex(String clas)
     Get marshaller/unmarshaller slot index in binding.
public  intgetNamespaceUriIndex(String uri, String prefix)
     Get index for namespace URI in binding.
public  StringgetPrefix()
     Get prefix for method or class generation.
public  intgetStyleDefault()
     Get default style for value expression.
public  booleanhasNamespaces()
    
public static  voidindent(int depth)
    
public  booleanisAddConstructors()
     Check if default constructor generation is enabled.
public  booleanisContentOrdered()
    
public  booleanisForwards()
     Check if forward ids are supported by unmarshalling binding.
public  booleanisIdGlobal()
     Check if global ids are used by binding.
public  booleanisInput()
     Check if binding is defined for unmarshalling.
public  booleanisOutput()
     Check if binding is defined for marshalling.
public  booleanisTrackSource()
     Check if source tracking is supported by unmarshalling binding.
public  voidprint()
    
public static  voidreset()
     Discard cached information and reset in preparation for a new binding run.
public  voidsetFactoryLocation(String tpack, File root)
     Set location for binding factory class generation.
public  booleansetIdChild(IComponent child)
     Set ID property.
public  voidsetMarshallerUnmarshallerClasses(int slot, String mclas, String uclas)
     Set marshaller and unmarshaller class names for slot.
public  voidsetSchemaInstanceUsed()
     Set flag for schema instance namespace used in binding.

Field Detail
CURRENT_VERSION_NAME
final public static String CURRENT_VERSION_NAME(Code)
Current distribution file name. This is filled in by the Ant build process to match the current distribution.



DEFAULT_AUTOPREFIX
final static String DEFAULT_AUTOPREFIX(Code)
Default prefix for automatic ID generation.



GENERATE_PREFIX
final public static String GENERATE_PREFIX(Code)
Prefix used in all code generation for methods and classes.



s_base64Conversion
public static StringConversion s_base64Conversion(Code)



s_objectConversion
public static StringConversion s_objectConversion(Code)



s_stringConversion
public static StringConversion s_stringConversion(Code)




Constructor Detail
BindingDefinition
public BindingDefinition(String name, boolean ibind, boolean obind, String tpack, boolean glob, boolean forward, boolean source, boolean force) throws JiBXException(Code)
Constructor. Sets all defaults, including the default name provided, and initializes the definition context for the outermost level of the binding.
Parameters:
  name - binding name
Parameters:
  ibind - input binding flag
Parameters:
  obind - output binding flag
Parameters:
  tpack - target package
Parameters:
  glob - global IDs flag
Parameters:
  forward - support forward referenced IDs flag
Parameters:
  source - add source tracking for unmarshalled objects flag
Parameters:
  force - create marshaller/unmarshaller classes for top-levelnon-base mappings
throws:
  JiBXException - if error in transformation




Method Detail
generateCode
public void generateCode(boolean verbose) throws JiBXException(Code)
Generate code. First sets linkages and executes code generation for each top-level mapping defined in this binding, which in turn propagates the code generation all the way down. Then generates the actual binding factory for this binding. TODO: handle unidirectional bindings properly
Parameters:
  verbose - flag for verbose output
throws:
  JiBXException - if error in code generation



getBinding
public static BindingDefinition getBinding(int index)(Code)
Get indexed binding.
Parameters:
  index - number of binding to be returned binding at the specified index



getBindingRoot
public BindingDefinition getBindingRoot()(Code)



getBoundClass
public BoundClass getBoundClass()(Code)
Get class linked to binding element. Implementation of org.jibx.binding.def.IContainer interface, just returns null in this case. information for class linked by binding



getDefaultPackage
public String getDefaultPackage()(Code)
Get default package used for code generation. default code generation package



getDefaultRoot
public File getDefaultRoot()(Code)
Get root directory for default code generation package. root for default code generation



getDefinitionContext
public DefinitionContext getDefinitionContext()(Code)



getIdClassIndex
public int getIdClassIndex(String name)(Code)
Get index for ID'ed class from binding. If the class is not already included it is first added to the binding. If globally unique IDs are used this always returns 0.
Parameters:
  name - fully qualified name of ID'ed class index number of class



getIndex
public int getIndex()(Code)
Get index number of binding. index number for this binding definition



getMappedClassIndex
public int getMappedClassIndex(String name)(Code)
Get index for mapped class from binding. If the class is not already included in any binding it is first added to the list of bound classes. All bindings use the same index numbers to allow easy lookup of the appropriate marshaller and unmarshaller within a particular binding, but this does mean that all bindings dealing with a common set of classes need to be compiled together. This uses the same sequence of values as the BindingDefinition.getMarshallerUnmarshallerIndex method but differs in that the values returned by this method are unique per class. This method is intended for use with <mapping> definitions. It is an error to call this method after calling the BindingDefinition.getMarshallerUnmarshallerIndex method.
Parameters:
  name - fully qualified name of mapped class index number of class



getMarshallerUnmarshallerIndex
public int getMarshallerUnmarshallerIndex(String clas)(Code)
Get marshaller/unmarshaller slot index in binding. This uses the same sequence of values as the BindingDefinition.getMappedClassIndex method but differs in that the same class may have more than one marshaller/unmarshaller slot defined. It's intended for user-defined marshallers/unmarshallers where use is specific to a particular context. After the slot has been assigned by this method, the BindingDefinition.setMarshallerUnmarshallerClasses method must be used to set the actual class names.
Parameters:
  clas - fully qualified name of class handled bymarshaller/unmarshaller slot number for marshaller/unmarshaller



getNamespaceUriIndex
public int getNamespaceUriIndex(String uri, String prefix)(Code)
Get index for namespace URI in binding. If the URI is not already included it is first added to the binding. The empty namespace URI is always given index number 0.
Parameters:
  uri - namespace URI to be included in binding
Parameters:
  prefix - prefix used with namespace index number of namespace



getPrefix
public String getPrefix()(Code)
Get prefix for method or class generation. prefix for names created by this binding



getStyleDefault
public int getStyleDefault()(Code)
Get default style for value expression. Implementation of org.jibx.binding.def.IContainer interface. default style type for values



hasNamespaces
public boolean hasNamespaces()(Code)



indent
public static void indent(int depth)(Code)



isAddConstructors
public boolean isAddConstructors()(Code)
Check if default constructor generation is enabled. true if default constructor generation enabled,false if not



isContentOrdered
public boolean isContentOrdered()(Code)



isForwards
public boolean isForwards()(Code)
Check if forward ids are supported by unmarshalling binding. true if supported, false if not



isIdGlobal
public boolean isIdGlobal()(Code)
Check if global ids are used by binding. true if defined, false if not



isInput
public boolean isInput()(Code)
Check if binding is defined for unmarshalling. true if defined, false if not



isOutput
public boolean isOutput()(Code)
Check if binding is defined for marshalling. true if defined, false if not



isTrackSource
public boolean isTrackSource()(Code)
Check if source tracking is supported by unmarshalling binding. true if defined, false if not



print
public void print()(Code)



reset
public static void reset()(Code)
Discard cached information and reset in preparation for a new binding run.



setFactoryLocation
public void setFactoryLocation(String tpack, File root)(Code)
Set location for binding factory class generation.
Parameters:
  tpack - target package for generated context factory
Parameters:
  root - target root for generated context factory



setIdChild
public boolean setIdChild(IComponent child)(Code)
Set ID property. This parent binding component interface method should never be called for the binding definition, and will throw a runtime exception if it is called.
Parameters:
  child - child defining the ID property false



setMarshallerUnmarshallerClasses
public void setMarshallerUnmarshallerClasses(int slot, String mclas, String uclas)(Code)
Set marshaller and unmarshaller class names for slot.
Parameters:
  slot - assigned marshaller/unmarshaller slot number
Parameters:
  mclas - fully qualified name of marshaller class
Parameters:
  uclas - fully qualified name of unmarshaller class



setSchemaInstanceUsed
public void setSchemaInstanceUsed()(Code)
Set flag for schema instance namespace used in binding.



Fields inherited from org.jibx.binding.def.BindingBuilder
final static int ACC_PACKAGE(Code)(Java Doc)
final static int ACC_PRIVATE(Code)(Java Doc)
final static int ACC_PROTECTED(Code)(Java Doc)
final static int ACC_PUBLIC(Code)(Java Doc)
final static int LINK_FIELDS(Code)(Java Doc)
final static int LINK_METHODS(Code)(Java Doc)
final static int LINK_NONE(Code)(Java Doc)
final static int NAME_HYPHENS(Code)(Java Doc)
final static int NAME_MIXED(Code)(Java Doc)

Methods inherited from org.jibx.binding.def.BindingBuilder
public static BindingDefinition unmarshalBindingDefinition(UnmarshallingContext ctx, String name, URL root) throws JiBXException(Code)(Java Doc)
public static void unmarshalInclude(UnmarshallingContext ctx, BindingDefinition bdef, URL root, ArrayList nslist, HashSet paths) throws JiBXException(Code)(Java Doc)
public static IMapping unmarshalMapping(UnmarshallingContext ctx, IContainer parent, ArrayList nss, boolean uord) throws JiBXException(Code)(Java Doc)
public static IComponent unmarshalStructure(UnmarshallingContext ctx, IContainer contain, IContextObj cobj, boolean coll, boolean uord, boolean implic) 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.