public class XMLProcessor
extends java.lang.Object
Purpose: XMLProcessor is used to process the meta data provided in external OXM XML files. This information is then used in conjunction with the information from AnnotationsProcess to generate schemas (via SchemaGenerator) and mappings (via MappingsGenerator).
As a general rule meta data provided in external OXM XML files overrides meta data specified through annotations.
Generator
Modifier and Type | Field and Description |
---|---|
static java.lang.String |
DEFAULT |
static java.lang.String |
GENERATE |
Constructor and Description |
---|
XMLProcessor(java.util.Map<java.lang.String,XmlBindings> bindings)
This is the preferred constructor.
|
Modifier and Type | Method and Description |
---|---|
boolean |
classExistsInArray(JavaClass theClass,
java.util.ArrayList<JavaClass> existingClasses)
Convenience method to determine if a class exists in a given ArrayList.
|
static java.lang.String |
getNameFromXPath(java.lang.String xpath,
java.lang.String propertyName,
boolean isAttribute)
Convenience method that returns the field name for a given xml-path.
|
static XmlBindings |
mergeXmlBindings(java.util.List<XmlBindings> bindings)
This method is used to merge several bindings files into one XMLBindings object.
|
void |
processXML(AnnotationsProcessor annotationsProcessor,
JavaModelInput jModelInput,
TypeMappingInfo[] typeMappingInfos,
JavaClass[] originalJavaClasses)
Process XmlBindings on a per package basis for a given
AnnotationsProcessor instance.
|
void |
reapplyPackageAndClassAdapters(Property prop,
TypeInfo owningInfo)
This method checks for class and package level adapters after the type of a property has been set.
|
public static final java.lang.String DEFAULT
public static final java.lang.String GENERATE
public XMLProcessor(java.util.Map<java.lang.String,XmlBindings> bindings)
bindings
- public void processXML(AnnotationsProcessor annotationsProcessor, JavaModelInput jModelInput, TypeMappingInfo[] typeMappingInfos, JavaClass[] originalJavaClasses)
annotationsProcessor
- public boolean classExistsInArray(JavaClass theClass, java.util.ArrayList<JavaClass> existingClasses)
public static java.lang.String getNameFromXPath(java.lang.String xpath, java.lang.String propertyName, boolean isAttribute)
xpath
- propertyName
- isAttribute
- public void reapplyPackageAndClassAdapters(Property prop, TypeInfo owningInfo)
prop
- the property that needs to be updatedowningInfo
- the typeInfo that represents the owner of this property.public static XmlBindings mergeXmlBindings(java.util.List<XmlBindings> bindings)
bindings
- the list of XmlBindings objects to merge.