EclipseLink 2.1.2, build 'v20101206-r8635' API Reference

org.eclipse.persistence.jaxb.compiler
Class XMLProcessor

java.lang.Object
  extended by org.eclipse.persistence.jaxb.compiler.XMLProcessor

public class XMLProcessor
extends java.lang.Object


Constructor Summary
XMLProcessor(java.util.Map<java.lang.String,XmlBindings> bindings)
          This is the preferred constructor.
 
Method Summary
 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.
 void processXML(AnnotationsProcessor annotationsProcessor, JavaModelInput jModelInput, TypeMappingInfo[] typeMappingInfos, JavaClass[] originalJavaClasses)
          Process XmlBindings on a per package basis for a given AnnotationsPorcessor instance.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

XMLProcessor

public XMLProcessor(java.util.Map<java.lang.String,XmlBindings> bindings)
This is the preferred constructor.

Parameters:
bindings -
Method Detail

processXML

public void processXML(AnnotationsProcessor annotationsProcessor,
                       JavaModelInput jModelInput,
                       TypeMappingInfo[] typeMappingInfos,
                       JavaClass[] originalJavaClasses)
Process XmlBindings on a per package basis for a given AnnotationsPorcessor instance.

Parameters:
annotationsProcessor -

classExistsInArray

public boolean classExistsInArray(JavaClass theClass,
                                  java.util.ArrayList<JavaClass> existingClasses)
Convenience method to determine if a class exists in a given ArrayList. The classes are compared via equals() method.


getNameFromXPath

public 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. This method would typically be called when building a QName to set as the 'SchemaName' on a Property. Examples: - returns 'id' for xml-path '@id' - returns 'managerId' for xml-path 'projects/prj:project/@prj:managerId' - returns 'first-name' for xml-path 'info/personal-info/first-name/text()' - returns 'project' for xml-path 'projects/prj:project/text()' - returns 'data' for xml-path 'pieces-of-data/data[1]/text()'

Parameters:
xpath -
propertyName -
isAttribute -
Returns:

EclipseLink 2.1.2, build 'v20101206-r8635' API Reference