Notice: This Wiki is now read only and edits are no longer possible. Please see: https://gitlab.eclipse.org/eclipsefdn/helpdesk/-/wikis/Wiki-shutdown-plan for the plan.
Difference between revisions of "EclipseLink/DesignDocs/317962/Phase2.1"
(→Xml Metadata Tags) |
(→Example: xml-class-extractor) |
||
Line 75: | Line 75: | ||
<java-type name="org.example.Employee"> | <java-type name="org.example.Employee"> | ||
<xml-class-extractor class="org.example.MyClassExtractor" /> | <xml-class-extractor class="org.example.MyClassExtractor" /> | ||
+ | </java-type> | ||
+ | </source> | ||
+ | |||
+ | == Example: Type-level xml-property == | ||
+ | |||
+ | The following example will demonstrate how a type-level <code>xml-property</code> can be applied: | ||
+ | |||
+ | Setting <code>xml-property</code> on a type via [http://wiki.eclipse.org/EclipseLink/DesignDocs/293925/MOXyExtensions EclipseLink XML metadata] can be accomplished as follows: | ||
+ | <source lang="xml"> | ||
+ | <java-type name="org.example.Employee"> | ||
+ | <xml-property name="" value="" value-type="" /> | ||
+ | </java-type> | ||
+ | </source> | ||
+ | |||
+ | == Example: Property-level xml-property == | ||
+ | |||
+ | The following example will demonstrate how a property-level <code>xml-property</code> can be applied: | ||
+ | |||
+ | Setting <code>xml-property</code> on a property via [http://wiki.eclipse.org/EclipseLink/DesignDocs/293925/MOXyExtensions EclipseLink XML metadata] can be accomplished as follows: | ||
+ | <source lang="xml"> | ||
+ | <java-type name="org.example.Employee"> | ||
+ | <java-attributes> | ||
+ | <xml-element java-attribute="myProperty"> | ||
+ | <xml-property name="" value="" value-type="" /> | ||
+ | </xml-element> | ||
+ | </java-attributes> | ||
</java-type> | </java-type> | ||
</source> | </source> |
Revision as of 15:12, 9 July 2010
Phase 2.1 - Additional MOXy external metadata support
This phase of development involves providing additional MOXy external metadata support that allows similar configuration abilities as with deployment XML
Xml Metadata Tags
The following Xml metadata tags will be targeted in this phase:
XML Metadata Tag | MOXy Annotation | Package | Type | Field | Method |
---|---|---|---|---|---|
xml-class-extractor | XmlClassExtractor | X | |||
xml-property | XmlProperty | X | X | X | |
xml-properties | XmlProperties | ||||
xml-transformation | XmlTransformation | ||||
xml-read-transformer | XmlReadTransformer | ||||
xml-write-transformer | XmlWriteTransformer | ||||
xml-write-transformers | XmlWriteTransformers |
Example: xml-class-extractor
The following example will demonstrate how the xml-class-extractor
can be applied:
Setting xml-class-extractor
via EclipseLink XML metadata can be accomplished as follows:
<java-type name="org.example.Employee"> <xml-class-extractor class="org.example.MyClassExtractor" /> </java-type>
Example: Type-level xml-property
The following example will demonstrate how a type-level xml-property
can be applied:
Setting xml-property
on a type via EclipseLink XML metadata can be accomplished as follows:
<java-type name="org.example.Employee"> <xml-property name="" value="" value-type="" /> </java-type>
Example: Property-level xml-property
The following example will demonstrate how a property-level xml-property
can be applied:
Setting xml-property
on a property via EclipseLink XML metadata can be accomplished as follows:
<java-type name="org.example.Employee"> <java-attributes> <xml-element java-attribute="myProperty"> <xml-property name="" value="" value-type="" /> </xml-element> </java-attributes> </java-type>