public abstract class AbstractXmlGenerator extends AbstractModelloGenerator
Constructor and Description |
---|
AbstractXmlGenerator() |
Modifier and Type | Method and Description |
---|---|
protected ModelField |
getContentField(java.util.List<ModelField> modelFields)
Get the field which type is
Content if any. |
protected java.util.List<ModelField> |
getFieldsForXml(ModelClass modelClass,
Version version)
Return the XML fields of this class, with proper XML order and no XML transient fields.
|
protected java.util.List<ModelField> |
getXmlAttributeFields(java.util.List<ModelField> modelFields)
Gets all fields that are not marked as XML attribute.
|
protected boolean |
hasContentField(java.util.List<ModelField> modelFields) |
protected void |
initHeader(org.codehaus.plexus.util.xml.XMLWriter w) |
protected java.lang.String |
resolveTagName(ModelClass modelClass)
Resolve XML tag name for a class.
|
protected java.lang.String |
resolveTagName(ModelField modelField,
XmlFieldMetadata xmlFieldMetadata)
Resolve XML tag name for a field.
|
protected java.lang.String |
resolveTagName(java.lang.String fieldTagName,
XmlAssociationMetadata xmlAssociationMetadata)
Resolve XML tag name for an item in an association with many multiplicity.
|
capitalise, contextualize, getBuildContext, getEncoding, getFieldsForClass, getGeneratedVersion, getHeader, getModel, getOutputDirectory, getParameter, getParameter, getParameter, initialize, isClassInModel, isCollection, isEmpty, isInnerAssociation, isMap, isPackageWithVersion, singular, uncapitalise
enableLogging, getLogger, setupLogger, setupLogger, setupLogger
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
generate
protected void initHeader(org.codehaus.plexus.util.xml.XMLWriter w)
protected java.lang.String resolveTagName(ModelClass modelClass)
modelClass
- the model classprotected java.lang.String resolveTagName(ModelField modelField, XmlFieldMetadata xmlFieldMetadata)
modelField
- the model fieldxmlFieldMetadata
- the XML metadata of the fieldprotected java.lang.String resolveTagName(java.lang.String fieldTagName, XmlAssociationMetadata xmlAssociationMetadata)
fieldTagName
- the XML tag name of the field containing the associationxmlAssociationMetadata
- the XML metadata of the associationprotected boolean hasContentField(java.util.List<ModelField> modelFields)
protected ModelField getContentField(java.util.List<ModelField> modelFields)
Content
if any.modelFields
- the fields to checknull
if no field is Content
protected java.util.List<ModelField> getXmlAttributeFields(java.util.List<ModelField> modelFields)
modelFields
- The collection of model fields from which to extract the XML attributes, must not be
null
.null
.protected java.util.List<ModelField> getFieldsForXml(ModelClass modelClass, Version version)
modelClass
- current classversion
- the version of the class to use