org.codehaus.modello.plugins.xml
public abstract class AbstractXmlJavaGenerator extends AbstractJavaModelloGenerator
DEFAULT_DATE_FORMAT, useJava5
Constructor and Description |
---|
AbstractXmlJavaGenerator() |
Modifier and Type | Method and Description |
---|---|
protected ModelField |
getContentField(java.util.List modelFields)
Get the field which type is
Content if any. |
protected java.lang.String |
getFileName(java.lang.String suffix) |
protected java.util.List |
getNonTransientFields(java.util.List modelFields)
Gets all fields that are not marked as transient.
|
protected java.lang.String |
getValue(java.lang.String type,
java.lang.String initialValue,
XmlFieldMetadata xmlFieldMetadata) |
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.
|
protected void |
writeDateParsingHelper(JSourceCode sc,
java.lang.String exception) |
addModelImports, getDefaultValue, getJavaDefaultValue, getPrefix, getValueChecker, initHeader, initHeader, initialize, newJSourceWriter, suppressAllWarnings
capitalise, contextualize, getBuildContext, getEncoding, getFieldsForClass, getGeneratedVersion, getHeader, getModel, getOutputDirectory, getParameter, getParameter, getParameter, isClassInModel, isCollection, isEmpty, isInnerAssociation, isMap, isPackageWithVersion, singular, uncapitalise
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
generate
protected java.lang.String getFileName(java.lang.String suffix)
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 ModelField getContentField(java.util.List modelFields)
Content
if any.modelFields
- the fields to checknull
if no field is Content
protected java.util.List getNonTransientFields(java.util.List modelFields)
modelFields
- The collection of model fields from which to extract the non-transient fields, must not be
null
.null
.protected java.lang.String getValue(java.lang.String type, java.lang.String initialValue, XmlFieldMetadata xmlFieldMetadata)
protected void writeDateParsingHelper(JSourceCode sc, java.lang.String exception)