|
EclipseLink 2.4.2, build 'v20130514-5956486' API Reference | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.eclipse.persistence.jaxb.JAXBContextProperties
public class JAXBContextProperties
These are properties that may be passed in to create a JAXBContext:
Map<String, Object> properties = new HashMap(1); properties.put(); JAXBContext jc = JAXBContext.newInstance(new Class[] {Foo.class}, properties);
Field Summary | |
---|---|
static java.lang.String |
ANNOTATION_HELPER
The name of the property used to specify an AnnotationHelper instance. |
static java.lang.String |
DEFAULT_TARGET_NAMESPACE
The name of the property used to specify a default target namespace. |
static java.lang.String |
JSON_ATTRIBUTE_PREFIX
The name of the property used to specify a value that will be prepended to all keys that are mapped to an XML attribute. |
static java.lang.String |
JSON_INCLUDE_ROOT
The name of the property used to specify in the root node should be included in the message (default is true). |
static java.lang.String |
JSON_NAMESPACE_SEPARATOR
The name of the property used to specify the character (default is '.') |
static java.lang.String |
JSON_VALUE_WRAPPER
The name of the property used to specify the key that will correspond to the property mapped with @XmlValue. |
static java.lang.String |
JSON_WRAPPER_AS_ARRAY_NAME
The Constant JSON_WRAPPER_AS_ARRAY_NAME. |
static java.lang.String |
MEDIA_TYPE
The name of the property used to specify the type of binding to be performed. |
static java.lang.String |
NAMESPACE_PREFIX_MAPPER
The Constant NAMESPACE_PREFIX_MAPPER. |
static java.lang.String |
OXM_METADATA_SOURCE
The name of the property used to specify one or more EclipseLink OXM metadata sources. |
static java.lang.String |
SESSION_EVENT_LISTENER
The name of the property used to specify a SessionEventListener that can be used to customize the metadata before or after it has been initialized. |
static java.lang.String |
XML_ACCESSOR_FACTORY_SUPPORT
The name of the boolean property used to enable custom XmlAccessorFactories. |
Constructor Summary | |
---|---|
JAXBContextProperties()
|
Method Summary |
---|
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static final java.lang.String JSON_ATTRIBUTE_PREFIX
org.eclipse.persistence.jaxb.MarshallerProperties.JSON_ATTRIBUTE_PREFIX
,
org.eclipse.persistence.jaxb.UnmarshallerProperties.JSON_ATTRIBUTE_PREFIX
,
Constant Field Valuespublic static final java.lang.String JSON_INCLUDE_ROOT
org.eclipse.persistence.jaxb.JAXBContextProperties.JSON_INCLUDE_ROOT
,
org.eclipse.persistence.jaxb.UnmarshallerProperties.JSON_INCLUDE_ROOT
,
Constant Field Valuespublic static final java.lang.String JSON_NAMESPACE_SEPARATOR
org.eclipse.persistence.jaxb.MarshallerProperties.NAMESPACE_SEPARATOR
,
org.eclipse.persistence.jaxb.UnmarshallerProperties.NAMESPACE_SEPARATOR
,
Constant Field Valuespublic static final java.lang.String JSON_VALUE_WRAPPER
org.eclipse.persistence.jaxb.MarshallerPropertes.JSON_VALUE_WRAPPER
,
org.eclipse.persistence.jaxb.UnmarshallerPropertes.JSON_VALUE_WRAPPER
,
Constant Field Valuespublic static final java.lang.String MEDIA_TYPE
org.eclipse.persistence.jaxb.MarshallerProperties.MEDIA_TYPE
,
org.eclipse.persistence.jaxb.UnmarshallerProperties.MEDIA_TYPE
,
MediaType
,
Constant Field Valuespublic static final java.lang.String NAMESPACE_PREFIX_MAPPER
NamespacePrefixMapper
,
Constant Field Valuespublic static final java.lang.String SESSION_EVENT_LISTENER
SessionEventListener
,
Constant Field Valuespublic static final java.lang.String OXM_METADATA_SOURCE
public static final java.lang.String DEFAULT_TARGET_NAMESPACE
public static final java.lang.String ANNOTATION_HELPER
AnnotationHelper
,
Annotation
,
AnnotatedElement
,
Constant Field Valuespublic static final java.lang.String XML_ACCESSOR_FACTORY_SUPPORT
com.sun.xml.bind.XmlAccessorFactory
,
Constant Field Valuespublic static final java.lang.String JSON_WRAPPER_AS_ARRAY_NAME
Example
Given the following class:
@XmlAccessorType(XmlAccessType.FIELD) public class Customer { @XmlElementWrapper(name="phone-numbers") @XmlElement(name="phone-number") private ListphoneNumbers; }
If the property is set to false (the default) the JSON output will be:
{ "phone-numbers" : { "phone-number" : [ { ... }, { ... }] } }
And if the property is set to true, then the JSON output will be:
{ "phone-numbers" : [ { ... }, { ... }] }
org.eclipse.persistence.jaxb.MarshallerProperties.JSON_WRAPPER_AS_ARRAY_NAME
,
org.eclipse.persistence.jaxb.UnmarshallerProperties.JSON_WRAPPER_AS_ARRAY_NAME
,
Constant Field ValuesConstructor Detail |
---|
public JAXBContextProperties()
|
EclipseLink 2.4.2, build 'v20130514-5956486' API Reference | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |