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


java.lang.Object
   org.jibx.binding.generator.SchemaMappingDetail

SchemaMappingDetail
public class SchemaMappingDetail (Code)
Holder for the details of how a mapping is to be represented in a schema. Each mapping is converted to a complex type, but the complex type may be either global or local to a containing global element. In the case of a mapping used as the base for one or more extension types, both a global complex type and a global element that references the type are required. This also tracks the content form for the complex type definition. Should the binding representation of polymorphism use both abstract mappings with type names, and concrete mappings with element names that reference the abstract mapping? Then use two complete separate hierarchies? But in order to do the book ----\ -----item dvd -----/ So the concrete for book extends the concrete mapping for item, as does the concrete mapping for dvd. If book is not extended, there's no need to have a separate BookType. There is the need for a separate abstract mapping for ItemType, which the concrete mapping for item then uses. On the other hand, the way I've changed the code to work there's no need have any additional mappings - the book and dvd mappings can each just invoke the item mapping directly. Now what if I want to extend the book mapping? So I have an arts book type that adds more details, say the number of plates. Ideally, I'd like to have the artBook mapping extend the concrete book mapping. But then how do I distinguish between the artBook and the reference to a book that's meant to be a element? Here's the logical structure of what I want: book --\ artBook ---------- BookType ---\ ----- ItemType dvd -----/ But the extends structure is: artBook ---------- book ---\ ----- item dvd -----/ Should the BookType abstract mapping in the top diagram extend ItemType? I don't think that's necessary, as long as the first component of the BookType definition is a structure reference to ItemType. So concrete s can be extended to represent substitution groups. If the base of a extension is an abstract , I'll add an abstract element definition for that just to serve as a base for the substitution group. Abstract extensions in the future can be used for type substitution, but that requires named types for the whol hierarchy. If I do it this way, there's no need to allow for names on abstract mappings, and each abstract mapping corresponds directly to a complexType while each concrete mapping corresponds directly to an element. Note that the extends relationship between elements may or may not carry over to the schema; if a uses extends='...' but doesn't have the structure reference to the extended type as the first component, or if the reference uses a name, the extends relationship cannot go into the schema and the user should get a warning. On the other hand, if the first component is a structure reference to a with no name, this should be reflected in the schame as an extends relationship for the complexTypes. s which are used as groups of elements and/or attributes should be modeled in the schema as s and s. What about customizations for schema generation? It seems like this would be very useful, but the issue here is that the structure doesn't match the form of the customizations used for going from Java (class-structured). I'd instead want to make schema customizations follow the structure of a binding definition. Can I just generate the schema components on-demand? That would mean a first pass to generate these details, and a second pass which actually triggered the generation process. But then I might also need a third pass, etc. I suppose the best is to do a sort of modified on-demand, where I generate the default equivalent directly



Constructor Summary
public  SchemaMappingDetail(MappingElement map, boolean haschild, boolean hastext, MappingElement base, QName tname, QName oname)
     Constructor.

Method Summary
public  MappingElementgetExtensionBase()
     Get base mapping for schema type extension.
public  MappingElementgetMapping()
     Get mapping.
public  QNamegetOtherName()
     Get element name.
public  QNamegetSubstitution()
     Get substitution group base name.
public  QNamegetTypeName()
     Get name for type.
public  booleanhasAttribute()
     Check if attribute component present.
public  booleanhasChild()
     Check if child element component present.
public  booleanhasText()
     Check if text component present.
public  booleanisElement()
     Check if generating as an element.
public  booleanisGroup()
     Check if generating as a group.
public  booleanisType()
     Check if generating as a group.
public  voidsetElement(boolean gen)
     Set generating as an element.
public  voidsetGroup(boolean gen)
     Set generating as a group.
public  voidsetSubstitution(QName qname)
     Set substitution group base name.
public  voidsetType(boolean gen)
     Set generating as a type.


Constructor Detail
SchemaMappingDetail
public SchemaMappingDetail(MappingElement map, boolean haschild, boolean hastext, MappingElement base, QName tname, QName oname)(Code)
Constructor.
Parameters:
  map - mapping definition
Parameters:
  haschild - has child element(s) flag
Parameters:
  hastext - has child text(s) flag
Parameters:
  base - base mapping for schema type extension
Parameters:
  tname - name as type
Parameters:
  oname - name as element/group/attributeGroup




Method Detail
getExtensionBase
public MappingElement getExtensionBase()(Code)
Get base mapping for schema type extension. extension base



getMapping
public MappingElement getMapping()(Code)
Get mapping. mapping



getOtherName
public QName getOtherName()(Code)
Get element name. element name for concrete mapping (null if abstract)



getSubstitution
public QName getSubstitution()(Code)
Get substitution group base name. substitution group base name



getTypeName
public QName getTypeName()(Code)
Get name for type. name



hasAttribute
public boolean hasAttribute()(Code)
Check if attribute component present. flag



hasChild
public boolean hasChild()(Code)
Check if child element component present. flag



hasText
public boolean hasText()(Code)
Check if text component present. flag



isElement
public boolean isElement()(Code)
Check if generating as an element. flag



isGroup
public boolean isGroup()(Code)
Check if generating as a group. flag



isType
public boolean isType()(Code)
Check if generating as a group. flag



setElement
public void setElement(boolean gen)(Code)
Set generating as an element.
Parameters:
  gen -



setGroup
public void setGroup(boolean gen)(Code)
Set generating as a group.
Parameters:
  gen -



setSubstitution
public void setSubstitution(QName qname)(Code)
Set substitution group base name.
Parameters:
  qname -



setType
public void setType(boolean gen)(Code)
Set generating as a type.
Parameters:
  gen -



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.