Class XmlBindingsGenerator
java.lang.Object
org.eclipse.persistence.tools.dbws.XmlBindingsGenerator
This class is responsible for generating one or more EclipseLink XmlBindings
objects based on a given list of XMLDescriptors.
-
Field Summary
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionprotected static JavaType
generateJavaType
(XMLDescriptor xdesc) Process a given XMLDescriptor and return a JavaType instance.protected static JAXBElement
<XmlAttribute> Process a given XMLMapping and return aJAXBElement<XmlAttribute>
.static XmlBindings
generateXmlBindings
(String packageName, List<XMLDescriptor> descriptors) Generate an XmlBindings instance based on a list of XML descriptors.static List
<XmlBindings> generateXmlBindings
(List<ClassDescriptor> descriptors) Generate one or more XmlBindings based on a given list of XML Descriptor instances.protected static JAXBElement
<XmlElement> generateXmlElement
(XMLMapping xmap) Process a given XMLMapping and return aJAXBElement<XmlElement>
.protected static String
getClassName
(String javaClassName) Convenience methods that returns the class name w/o package for a given fully qualified Java class name.protected static String
getPackageName
(String javaClassName) Convenience methods that returns the package name for a given fully qualified Java class name.protected static boolean
isDefaultNullPolicy
(AbstractNullPolicy nullPolicy) Indicates is a given AbstractNullPolicy is the default.protected static XmlElement
Process a given XMLBinaryDataMapping and return an XmlElement.protected static XmlAttribute
Process a given XMLBinaryDataMapping and return an XmlAttribute.protected static XmlElement
Process a given XMLCompositeCollectionMapping and return an XmlElementprotected static XmlElement
Process a given XMLCompositeDirectCollectionMapping and return an XmlElement.protected static XmlAttribute
Process a given XMLCompositeDirectCollectionMapping and return an XmlAttribute.protected static XmlElement
Process a given XMLCompositeObjectMapping and return an XmlElement.protected static XmlElement
Process a given XMLDirectMapping and return an XmlElement.protected static XmlAttribute
Process a given XMLDirectMapping and return an XmlAttribute.protected static XmlElement
processXMLMapping
(XMLField xfld, String attName, String xpath, String attClassification, AbstractNullPolicy nullPolicy, boolean isCDATA, String containerName, boolean inlineBinary, boolean isSWARef, String mimeType) Process a given XMLMapping and return an XmlElement.protected static XmlAttribute
processXMLMapping
(XMLField xfld, String attName, String xpath, String attClassification, AbstractNullPolicy nullPolicy, String containerName, boolean inlineBinary, boolean isSWARef, String mimeType) Process a given XMLMapping and return an XmlAttribute.
-
Field Details
-
SIMPLE_XML_FORMAT_PKG
- See Also:
-
DATAHANDLER_CLASSNAME
- See Also:
-
-
Constructor Details
-
XmlBindingsGenerator
public XmlBindingsGenerator()
-
-
Method Details
-
generateXmlBindings
Generate one or more XmlBindings based on a given list of XML Descriptor instances. -
generateXmlBindings
Generate an XmlBindings instance based on a list of XML descriptors. OXM metadata files are processed on a per package basis, hence it is assumed that the given list of descriptors are from the same package. -
generateJavaType
Process a given XMLDescriptor and return a JavaType instance. -
generateXmlAttribute
Process a given XMLMapping and return aJAXBElement<XmlAttribute>
. Expected mappings are:- org.eclipse.persistence.oxm.mappings.XMLBinaryDataMapping
- org.eclipse.persistence.oxm.mappings.XMLCompositeDirectCollectionMapping
- org.eclipse.persistence.oxm.mappings.XMLDirectMapping
-
generateXmlElement
Process a given XMLMapping and return aJAXBElement<XmlElement>
. Expected mappings are:- org.eclipse.persistence.oxm.mappings.XMLBinaryDataMapping
- org.eclipse.persistence.oxm.mappings.XMLCompositeCollectionMapping
- org.eclipse.persistence.oxm.mappings.XMLCompositeDirectCollectionMapping
- org.eclipse.persistence.oxm.mappings.XMLCompositeObjectMapping
- org.eclipse.persistence.oxm.mappings.XMLDirectMapping
-
processXMLMapping
protected static XmlAttribute processXMLMapping(XMLField xfld, String attName, String xpath, String attClassification, AbstractNullPolicy nullPolicy, String containerName, boolean inlineBinary, boolean isSWARef, String mimeType) Process a given XMLMapping and return an XmlAttribute. -
processXMLBinaryDataMappingAttribute
Process a given XMLBinaryDataMapping and return an XmlAttribute. -
processXMLCompositeDirectCollectionMappingAttribute
protected static XmlAttribute processXMLCompositeDirectCollectionMappingAttribute(XMLCompositeDirectCollectionMapping xmap) Process a given XMLCompositeDirectCollectionMapping and return an XmlAttribute. -
processXMLDirectMappingAttribute
Process a given XMLDirectMapping and return an XmlAttribute. -
processXMLMapping
protected static XmlElement processXMLMapping(XMLField xfld, String attName, String xpath, String attClassification, AbstractNullPolicy nullPolicy, boolean isCDATA, String containerName, boolean inlineBinary, boolean isSWARef, String mimeType) Process a given XMLMapping and return an XmlElement. -
processXMLDirectMapping
Process a given XMLDirectMapping and return an XmlElement. -
processXMLBinaryDataMapping
Process a given XMLBinaryDataMapping and return an XmlElement. -
processXMLCompositeDirectCollectionMapping
protected static XmlElement processXMLCompositeDirectCollectionMapping(XMLCompositeDirectCollectionMapping xmap) Process a given XMLCompositeDirectCollectionMapping and return an XmlElement. -
processXMLCompositeObjectMapping
Process a given XMLCompositeObjectMapping and return an XmlElement. -
processXMLCompositeCollectionMapping
protected static XmlElement processXMLCompositeCollectionMapping(XMLCompositeCollectionMapping xmap) Process a given XMLCompositeCollectionMapping and return an XmlElement -
getPackageName
Convenience methods that returns the package name for a given fully qualified Java class name. -
getClassName
Convenience methods that returns the class name w/o package for a given fully qualified Java class name. -
isDefaultNullPolicy
Indicates is a given AbstractNullPolicy is the default. This is useful if it is not desirable to write out the default policy in the oxm metadata file. The default policy is NullPolicy, with the following set:- isNullRepresentedByXsiNil = false
- isNullRepresentedByEmptyNode = true
- isSetPerformedForAbsentNode = true
- marshalNullRepresentation = XMLNullRepresentationType.ABSENT_NODE
-