Skip to main content

Notice: this Wiki will be going read only early in 2024 and edits will no longer be possible. Please see: https://gitlab.eclipse.org/eclipsefdn/helpdesk/-/wikis/Wiki-shutdown-plan for the plan.

Jump to: navigation, search

Difference between revisions of "EclipseLink/Development/359251"

 
(44 intermediate revisions by 2 users not shown)
Line 1: Line 1:
 
<div style="margin:5px;float:right;border:1px solid #000000;padding:5px">__TOC__</div>  
 
<div style="margin:5px;float:right;border:1px solid #000000;padding:5px">__TOC__</div>  
= Design Documentation: JAXB Extensions  =
+
= Design Documentation: JAXB RI Extensions  =
  
 
[http://bugs.eclipse.org/359251 ER 359251]  
 
[http://bugs.eclipse.org/359251 ER 359251]  
  
In the current JAXB RI, developed by Sun, there are a series of "proprietary" JAXB extensions that are available to provide advanced JAXB functionality outside of the JAXB spec (these extension classes reside in the '''com.sun.xml.bind''' package).  
+
In the JAXB RI, developed by Sun, there are a series of "proprietary" extensions that are available to provide advanced JAXB functionality outside of the JAXB spec (these extension classes reside in the '''com.sun.xml.bind''' and '''com.sun.internal.xml.bind''' packages).  
  
 
This page will track the various JAXB Extensions that we want to bring into MOXy.  
 
This page will track the various JAXB Extensions that we want to bring into MOXy.  
  
'''Jan. 2012''': Other extension properties: http://jaxb.java.net/2.2/docs/vendorProperties.html
+
See: http://jaxb.java.net/2.2/docs/vendorProperties.html
  
== XmlLocation  ==
+
== Goal ==
  
* COMPLETE
+
Our intent is to support these extensions as is, so that MOXy can be a drop in replacement for the JAXB RI.
 +
 
 +
== Completed ==
 +
 
 +
=== Object Identity Config (2.4 only) ===
 +
 
 +
* '''COMPLETE'''
 +
* Documentation: http://wiki.eclipse.org/EclipseLink/Development/379706
 +
* Bug: https://bugs.eclipse.org/bugs/show_bug.cgi?id=379706
 +
 
 +
=== XML Headers (2.4 only) ===
 +
 
 +
* '''COMPLETE'''
 +
* '''DOCS NEEDED'''
 +
* Bug: https://bugs.eclipse.org/bugs/show_bug.cgi?id=379704
 +
 
 +
=== AccessorFactory (2.4 only) ===
 +
 
 +
* '''COMPLETE'''
 +
* Documentation: http://wiki.eclipse.org/EclipseLink/Development/372403
 +
* Bug: https://bugs.eclipse.org/bugs/show_bug.cgi?id=372403
 +
* Added for the benefit of Hibernate users
 +
* Difficult to implement, no documentation, can be replaced by @XmlJavaTypeAdapter
 +
 
 +
=== CycleRecoverable (2.4 only) ===
 +
 
 +
* '''COMPLETE'''
 +
* Documentation: http://wiki.eclipse.org/EclipseLink/Development/372404
 +
* Bug: https://bugs.eclipse.org/bugs/show_bug.cgi?id=372404
 +
* http://jaxb.java.net/guide/Mapping_cyclic_references_to_XML.html
 +
* http://www.java.net/node/654639
 +
 
 +
=== XmlLocation (2.4 only) ===
 +
 
 +
* '''COMPLETE'''
 
* Documentation: http://wiki.eclipse.org/EclipseLink/Development/355766
 
* Documentation: http://wiki.eclipse.org/EclipseLink/Development/355766
 
* Bug: https://bugs.eclipse.org/bugs/show_bug.cgi?id=355766
 
* Bug: https://bugs.eclipse.org/bugs/show_bug.cgi?id=355766
 
* Would give the user more information after unmarshalling, could be useful in WSDL environments, or other times when JAXB XML data may be embedded within other XML
 
* Would give the user more information after unmarshalling, could be useful in WSDL environments, or other times when JAXB XML data may be embedded within other XML
  
== NamespacePrefixMapper ==
+
=== NamespacePrefixMapper (2.3.3 and 2.4) ===
  
*https://bugs.eclipse.org/bugs/show_bug.cgi?id=357266  
+
* '''COMPLETE'''
*Allows the user to customize the namespace prefixes that are generated  
+
* Documentation: http://wiki.eclipse.org/EclipseLink/Development/357266
*Could create our own NamespacePrefixMapper that users could subclass
+
* Background Info:  [http://jaxb.java.net/2.2/docs/vendorProperties.html#prefixmapper http://jaxb.java.net/2.2/docs/vendorProperties.html#prefixmapper]
*Custom Mapper would be provided via Marshaller properties
+
* Bug: https://bugs.eclipse.org/bugs/show_bug.cgi?id=357266  
 +
* Allows the user to customize the namespace prefixes that are generated  
 +
* Custom Mapper would be provided via Marshaller properties
  
== IDResolver ==
+
=== IDResolver (2.3.3 and 2.4) ===
  
* COMPLETE
+
* '''COMPLETE'''
 
* Documentation: http://wiki.eclipse.org/EclipseLink/Development/360249
 
* Documentation: http://wiki.eclipse.org/EclipseLink/Development/360249
 
* Bug: https://bugs.eclipse.org/bugs/show_bug.cgi?id=360249
 
* Bug: https://bugs.eclipse.org/bugs/show_bug.cgi?id=360249
 
* Exampe: http://weblogs.java.net/blog/kohsuke/archive/2005/08/pluggable_ididr.html  
 
* Exampe: http://weblogs.java.net/blog/kohsuke/archive/2005/08/pluggable_ididr.html  
* IDResolver works for Kohsuke's first example (Distinctive Symbol Spaces) but the combination with Unmarshall.Listener doesn't seem to work (Scoped Symbol Spaces)
 
*'''mgrebac''': "Need to look into this one further."
 
  
== CycleRecoverable  ==
+
=== IndentString (2.3.3 and 2.4) ===
  
* Can't get it to work in RI or Metro!
+
* '''COMPLETE'''
* '''mgrebac''': "You can have a look under cycle-recovery sample in jaxb sources or jaxb release artifacts."
+
* Background Info: [http://jaxb.java.net/2.2/docs/vendorProperties.html#indent http://jaxb.java.net/2.2/docs/vendorProperties.html#indent]
* http://jaxb.java.net/guide/Mapping_cyclic_references_to_XML.html
+
* Documentation: http://wiki.eclipse.org/EclipseLink/Development/370574
* http://www.java.net/node/654639
+
* Bug: https://bugs.eclipse.org/bugs/show_bug.cgi?id=370574
 +
* Allows the user to customize the indenting that happens in marshalled documents
  
 +
=== CharacterEscapeHandler (2.3.3 and 2.4) ===
  
== <strike>OverrideAnnotationOf</strike>  ==
+
* '''COMPLETE'''
 +
* Background Info: [http://jaxb.java.net/2.2/docs/vendorProperties.html#charescape http://jaxb.java.net/2.2/docs/vendorProperties.html#charescape]
 +
* Documentation: http://wiki.eclipse.org/EclipseLink/Development/370589
 +
* Bug: https://bugs.eclipse.org/bugs/show_bug.cgi?id=370589
 +
* Allows the user to customize the escaping of special characters
 +
* Not applicable when marshalling to: XMLStreamWriter, XMLEventWriter, ContentHandler, Node
 +
 
 +
=== XML Declaration Control (2.3.3 and 2.4) ===
 +
 
 +
* '''COMPLETE'''
 +
* Background Info:  [http://jaxb.java.net/2.2/docs/vendorProperties.html#xmldecl http://jaxb.java.net/2.2/docs/vendorProperties.html#xmldecl]
 +
* Opposite of Marshaller.JAXB_FRAGMENT (no bug entered)
 +
 
 +
=== Test Get/Set For All Properties ===
 +
 
 +
* We need to ensure that we test getting all these properties as well as setting them.
 +
* '''COMPLETE''' : org.eclipse.persistence.testing.jaxb.properties.PropertyTestCases
 +
 
 +
== Future ==
 +
 
 +
The following items are of low priority and there is no current plan to implement these.
 +
 
 +
=== Canonicalization ===
 +
 
 +
* Bug: https://bugs.eclipse.org/bugs/show_bug.cgi?id=379705
 +
 
 +
=== <strike>OverrideAnnotationOf</strike>  ===
  
 
*Allows for more flexible mapping (?)  
 
*Allows for more flexible mapping (?)  
Line 47: Line 109:
 
*'''mgrebac''': "The above annotation was actually used only for a very specific case of supporting usecase with XmlMixed, and is actually even not expected to be used outside of xjc."
 
*'''mgrebac''': "The above annotation was actually used only for a very specific case of supporting usecase with XmlMixed, and is actually even not expected to be used outside of xjc."
  
== <strike>AccessorFactory</strike>  ==
+
=== <strike>Locatable</strike>  ===
 
+
*Added for the benefit of Hibernate users
+
*Difficult to implement, no documentation, can be replaced by @XmlJavaTypeAdapter
+
 
+
== <strike>Locatable</strike>  ==
+
  
 
*Seems to be mainly used internally by the RI  
 
*Seems to be mainly used internally by the RI  
Line 58: Line 115:
 
*'''mgrebac''': "No, this is as well not meant to be user feature, is usable for xjc itself and plugins to point to correct source when there is a failure."
 
*'''mgrebac''': "No, this is as well not meant to be user feature, is usable for xjc itself and plugins to point to correct source when there is a failure."
  
== <strike>XmlIsSet</strike>  ==
+
=== <strike>XmlIsSet</strike>  ===
  
 
*Doesn't work in RI  
 
*Doesn't work in RI  
 
*Deprecated in the RI, no need to implement since we have XmlIsSetNullPolicy?
 
*Deprecated in the RI, no need to implement since we have XmlIsSetNullPolicy?
 
*'''mgrebac''': "Correct - deprecated, unused, we shall be able to remove it safely at this point actually."
 
*'''mgrebac''': "Correct - deprecated, unused, we shall be able to remove it safely at this point actually."

Latest revision as of 11:35, 5 June 2012

Design Documentation: JAXB RI Extensions

ER 359251

In the JAXB RI, developed by Sun, there are a series of "proprietary" extensions that are available to provide advanced JAXB functionality outside of the JAXB spec (these extension classes reside in the com.sun.xml.bind and com.sun.internal.xml.bind packages).

This page will track the various JAXB Extensions that we want to bring into MOXy.

See: http://jaxb.java.net/2.2/docs/vendorProperties.html

Goal

Our intent is to support these extensions as is, so that MOXy can be a drop in replacement for the JAXB RI.

Completed

Object Identity Config (2.4 only)

XML Headers (2.4 only)

AccessorFactory (2.4 only)

CycleRecoverable (2.4 only)

XmlLocation (2.4 only)

NamespacePrefixMapper (2.3.3 and 2.4)

IDResolver (2.3.3 and 2.4)

IndentString (2.3.3 and 2.4)

CharacterEscapeHandler (2.3.3 and 2.4)

XML Declaration Control (2.3.3 and 2.4)

Test Get/Set For All Properties

  • We need to ensure that we test getting all these properties as well as setting them.
  • COMPLETE : org.eclipse.persistence.testing.jaxb.properties.PropertyTestCases

Future

The following items are of low priority and there is no current plan to implement these.

Canonicalization

OverrideAnnotationOf

  • Allows for more flexible mapping (?)
  • Doesn't work if the field to override is not named "content", customization doesn't work (RI)
  • mgrebac: "The above annotation was actually used only for a very specific case of supporting usecase with XmlMixed, and is actually even not expected to be used outside of xjc."

Locatable

  • Seems to be mainly used internally by the RI
  • Interface only defines get methods... is user resonsible for setting up com.sun.xml.bind.v2.runtime.Location objects? Is this even meant to be a user-feature?
  • mgrebac: "No, this is as well not meant to be user feature, is usable for xjc itself and plugins to point to correct source when there is a failure."

XmlIsSet

  • Doesn't work in RI
  • Deprecated in the RI, no need to implement since we have XmlIsSetNullPolicy?
  • mgrebac: "Correct - deprecated, unused, we shall be able to remove it safely at this point actually."

Back to the top