Java Doc for DefinitionContext.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.DefinitionContext

DefinitionContext
public class DefinitionContext (Code)
Nesting level for definitions in binding. This tracks namespace and mapping definitions that apply to all enclosed items.
author:
   Dennis M. Sosnoski
version:
   1.0



Constructor Summary
public  DefinitionContext(IContainer contain)
     Constructor.

Method Summary
public  voidaddConversion(QName name, StringConversion conv)
     Add named conversion.
public  voidaddImpliedNamespace(NamespaceDefinition def)
     Add namespace declaration to set defined at this level.
public  voidaddMapping(IMapping def)
     Add class mapping to set defined at this level.
public  voidaddNamedStructure(String name, IComponent comp)
     Add named structure component to set defined at this level.
public  voidaddNamespace(NamespaceDefinition def)
     Add namespace to set defined at this level.
public  voidgenLoadNamespaces(MethodBuilder mb)
     Generate code for loading namespace index and URI arrays.
public  voidgenerateCode(boolean verbose, boolean force)
     Generate code.
public  IMappinggetClassMapping(String name)
     Get mapping definition for class.
public  StringConversiongetConversion(ClassFile clas)
     Get conversion definition for class.
public  intgetDefaultIndex(boolean attr)
     Get the default namespace index for a contained name.
public  StringgetDefaultURI(boolean attr)
     Get the default namespace URI for a contained name.
public  IMappinggetMappingAtLevel(String name)
     Get mapping definition for class if defined at this level.
public  ArrayListgetMappings()
     Get mapping definitions at level.
public  StringConversiongetNamedConversion(QName name)
     Get named conversion definition.
public  IComponentgetNamedStructure(String name)
     Get nested structure by name.
public  intgetNamespaceIndex(String uri, boolean attr)
     Get namespace index for a given URI.
public  ArrayListgetNamespaces()
    
public  StringConversiongetSpecificConversion(String name)
     Get specific conversion definition for type.
public  booleanhasNamespace()
     Check if one or more namespaces are defined in this context.
public  voidlinkMappings()
     Links extension mappings to their base mappings.
public  voidprint(int depth)
    
public  voidsetConversion(StringConversion conv)
     Set specific conversion definition for type.
public  voidsetDefaultConversion(QName name, StringConversion conv)
     Sets a conversion definition by both type and name.
public  voidsetLinkages()
     Set linkages between binding components.
public  voidsetNamedConversion(QName name, StringConversion conv)
     Sets a named conversion definition.


Constructor Detail
DefinitionContext
public DefinitionContext(IContainer contain)(Code)
Constructor. Uses the containing context to establish the hierarchy for resolving namespaces and class mappings.
Parameters:
  contain - containing binding definition component




Method Detail
addConversion
public void addConversion(QName name, StringConversion conv) throws JiBXException(Code)
Add named conversion. Checks for duplicate conversions defined within a level with the same name.
Parameters:
  name - format name for this conversion
Parameters:
  conv - conversion definition for class
throws:
  JiBXException - if duplicate conversion definition



addImpliedNamespace
public void addImpliedNamespace(NamespaceDefinition def) throws JiBXException(Code)
Add namespace declaration to set defined at this level. This method treats all namespaces as though they were declared with default="none". If the new namespace prefix conflicts with an existing namespace this throws an exception.
Parameters:
  def - namespace definition to be added (duplicates ignored)
throws:
  JiBXException - on namespace definition conflict



addMapping
public void addMapping(IMapping def) throws JiBXException(Code)
Add class mapping to set defined at this level. If the new mapping conflicts with an existing one at this level it throws an exception.
Parameters:
  def - mapping definition to be added
throws:
  JiBXException - on mapping definition conflict



addNamedStructure
public void addNamedStructure(String name, IComponent comp) throws JiBXException(Code)
Add named structure component to set defined at this level. If the name conflicts with an existing one at this level it throws an exception.
Parameters:
  name - component name to be set
Parameters:
  comp - named component
throws:
  JiBXException - on mapping definition conflict



addNamespace
public void addNamespace(NamespaceDefinition def) throws JiBXException(Code)
Add namespace to set defined at this level. If the new namespace conflicts with an existing namespace at this level (in terms of default usage or prefix) this throws an exception.
Parameters:
  def - namespace definition to be added (duplicates ignored)
throws:
  JiBXException - on namespace definition conflict



genLoadNamespaces
public void genLoadNamespaces(MethodBuilder mb)(Code)
Generate code for loading namespace index and URI arrays. The code creates the arrays and leaves the references on the stack.
Parameters:
  mb - method builder for generated code



generateCode
public void generateCode(boolean verbose, boolean force) throws JiBXException(Code)
Generate code. Executes code generation for each top-level mapping defined in this binding, which in turn propagates the code generation all the way down.
Parameters:
  verbose - flag for verbose output
Parameters:
  force - create marshaller/unmarshaller even for abstract non-basemappings flag
throws:
  JiBXException - if error in transformation



getClassMapping
public IMapping getClassMapping(String name)(Code)
Get mapping definition for class. Finds the mapping for a fully qualified class name, throwing an exception if no mapping is defined. This can only be used during the linkage phase.
Parameters:
  name - fully qualified class name mapping definition for class, or null if not defined



getConversion
public StringConversion getConversion(ClassFile clas)(Code)
Get conversion definition for class. Finds the conversion based on a fully qualified class name. If a specific conversion for the actual class is not found (either in this or a containing level) this returns the generic object conversion.
Parameters:
  clas - information for target conversion class conversion definition for class



getDefaultIndex
public int getDefaultIndex(boolean attr)(Code)
Get the default namespace index for a contained name. Elements and attributes are treated separately, since namespace handling differs between the two.
Parameters:
  attr - flag for attribute name default namespace index



getDefaultURI
public String getDefaultURI(boolean attr)(Code)
Get the default namespace URI for a contained name. Elements and attributes are treated separately, since namespace handling differs between the two.
Parameters:
  attr - flag for attribute name default namespace URI, or null if none



getMappingAtLevel
public IMapping getMappingAtLevel(String name)(Code)
Get mapping definition for class if defined at this level.
Parameters:
  name - fully qualified class name mapping definition for class, or null if not defined



getMappings
public ArrayList getMappings()(Code)
Get mapping definitions at level. mapping definitions, null if none defined at level



getNamedConversion
public StringConversion getNamedConversion(QName name)(Code)
Get named conversion definition. Finds the conversion with the supplied name, checking the containing definitions if the conversion is not found at this level.
Parameters:
  name - conversion name to be found conversion definition for class



getNamedStructure
public IComponent getNamedStructure(String name) throws JiBXException(Code)
Get nested structure by name. Finds the nested structure with the given name, throwing an exception if no component with that name is defined.
Parameters:
  name - component name to be found component with given name
throws:
  JiBXException - if name not defined



getNamespaceIndex
public int getNamespaceIndex(String uri, boolean attr) throws JiBXException(Code)
Get namespace index for a given URI. Finds the prefix for a URI in a name contained by this level, throwing an exception if the URI is not found or does not have a prefix.
Parameters:
  uri - namespace URI to be found
Parameters:
  attr - flag for attribute name namespace index for URI
throws:
  JiBXException - if URI not defined or not usable



getNamespaces
public ArrayList getNamespaces()(Code)
Get the namespaces defined in this context namespace definitions (may be null if none)



getSpecificConversion
public StringConversion getSpecificConversion(String name)(Code)
Get specific conversion definition for type. Finds with an exact match on the class name, checking the containing definitions if a conversion is not found at this level.
Parameters:
  name - fully qualified class name to be converted conversion definition for class, or null if notfound



hasNamespace
public boolean hasNamespace()(Code)
Check if one or more namespaces are defined in this context. true if namespaces are defined, falseif not



linkMappings
public void linkMappings() throws JiBXException(Code)
Links extension mappings to their base mappings. This must be done before the more general linking step in order to determine which abstract mappings are standalone and which are extended by other mappings
throws:
  JiBXException - if error in linking



print
public void print(int depth)(Code)



setConversion
public void setConversion(StringConversion conv) throws JiBXException(Code)
Set specific conversion definition for type. Sets the conversion based on a type signature, checking for duplicate conversions defined within a level.
Parameters:
  conv - conversion definition for class
throws:
  JiBXException - if duplicate conversion definition



setDefaultConversion
public void setDefaultConversion(QName name, StringConversion conv) throws JiBXException(Code)
Sets a conversion definition by both type and name. Both the type and name are checked for duplicate conversions defined within a level.
Parameters:
  name - format name for this conversion
Parameters:
  conv - conversion definition for class
throws:
  JiBXException - if duplicate conversion definition



setLinkages
public void setLinkages() throws JiBXException(Code)
Set linkages between binding components. This is called after all the basic information has been set up. All linkage to higher level components should be done by this method, in order to prevent problems due to the order of definitions between components. For the definition context this calls the same method on all mappings defined in this context.
throws:
  JiBXException - if error in configuration



setNamedConversion
public void setNamedConversion(QName name, StringConversion conv) throws JiBXException(Code)
Sets a named conversion definition.
Parameters:
  name - format name for this conversion
Parameters:
  conv - conversion definition for class
throws:
  JiBXException - if duplicate conversion definition



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.