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"

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 Extensions =
+
[http://bugs.eclipse.org/355766 ER 355766]
  
[http://bugs.eclipse.org/355766 ER 355766]
+
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 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).
+
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.
+
== XmlLocation  ==
  
== XmlLocation ==
+
*https://bugs.eclipse.org/bugs/show_bug.cgi?id=355766  
* 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 ==
* https://bugs.eclipse.org/bugs/show_bug.cgi?id=357266
+
* Allows the user to customize the namespace prefixes that are generated
+
* Could create our own NamespacePrefixMapper that users could subclass
+
* Custom Mapper would be provided via Marshaller properties
+
  
== IDResolver ==
+
*https://bugs.eclipse.org/bugs/show_bug.cgi?id=357266
* http://weblogs.java.net/blog/kohsuke/archive/2005/08/pluggable_ididr.html
+
*Allows the user to customize the namespace prefixes that are generated
* IDResolver works for Kohsuke's first example (Distinctive Symbol Spaces) but the combination with Unmarshall.Listener doesn't seem to work (Scoped Symbol Spaces)
+
*Could create our own NamespacePrefixMapper that users could subclass
* "THIS INTERFACE IS SUBJECT TO CHANGE WITHOUT NOTICE."
+
*Custom Mapper would be provided via Marshaller properties
* mgrebac: "Need to look into this one further."
+
  
== OverrideAnnotationOf ==  
+
== <strike>IDResolver</strike>  ==
* 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."
+
  
== AccessorFactory ==
+
*http://weblogs.java.net/blog/kohsuke/archive/2005/08/pluggable_ididr.html
* Added for the benefit of Hibernate users
+
*IDResolver works for Kohsuke's first example (Distinctive Symbol Spaces) but the combination with Unmarshall.Listener doesn't seem to work (Scoped Symbol Spaces)
* Difficult to implement, no documentation, can be replaced by @XmlJavaTypeAdapter
+
*"THIS INTERFACE IS SUBJECT TO CHANGE WITHOUT NOTICE."
 +
*mgrebac: "Need to look into this one further."
  
== Locatable ==  
+
== OverrideAnnotationOf  ==
* 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?
+
  
== XmlIsSet ==
+
*Allows for more flexible mapping (?)
* Doesn't work in RI
+
*Doesn't work if the field to override is not named "content", customization doesn't work (RI)
* Deprecated in the RI, no need to implement since we have XmlIsSetNullPolicy?
+
*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."
  
== CycleRecoverable ==  
+
== AccessorFactory  ==
* Can't get it to work in RI or Metro!
+
 
 +
*Added for the benefit of Hibernate users
 +
*Difficult to implement, no documentation, can be replaced by @XmlJavaTypeAdapter
 +
 
 +
== 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?
 +
 
 +
== XmlIsSet  ==
 +
 
 +
*Doesn't work in RI
 +
*Deprecated in the RI, no need to implement since we have XmlIsSetNullPolicy?
 +
 
 +
== CycleRecoverable ==
 +
 
 +
*Can't get it to work in RI or Metro!

Revision as of 11:16, 28 September 2011

Design Documentation: JAXB Extensions

ER 355766

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).

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

XmlLocation

NamespacePrefixMapper

IDResolver

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."

AccessorFactory

  • Added for the benefit of Hibernate users
  • Difficult to implement, no documentation, can be replaced by @XmlJavaTypeAdapter

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?

XmlIsSet

  • Doesn't work in RI
  • Deprecated in the RI, no need to implement since we have XmlIsSetNullPolicy?

CycleRecoverable

  • Can't get it to work in RI or Metro!

Back to the top