Package net.officefloor.model.generate
Class GraphNodeMetaData
java.lang.Object
net.officefloor.model.generate.GraphNodeMetaData
Provides generic meta-data for generating a Model.
- Author:
- Daniel Sagenschneider
-
Constructor Summary
ConstructorsConstructorDescriptionGraphNodeMetaData(String license, File rawRootDir) Top level constructor.GraphNodeMetaData(GraphNodeMetaData parent, String childPath) Child constructor for relative path. -
Method Summary
Modifier and TypeMethodDescriptionstatic StringReturns the input text in camel case.static Stringcapitalise(String text) Returns the input text capitalised.Obtains the license text.getModelMetaData(File modelFile) Obtains theModelMetaDatafrom the input file.getModelMetaData(String typeName) Obtains theModelMetaDatafor the input type.static XmlUnmarshallerLazily obtains theXmlUnmarshallerfor theModelMetaData.Obtains the package name for thisGraphNodeMetaDatainstance.static StringpropertyCase(String text) Returns the input text in case ready for properties.static StringReturns the input text in sentence case.
-
Constructor Details
-
GraphNodeMetaData
Top level constructor.- Parameters:
license- License.rawRootDir- Root directory containing the raw models.
-
GraphNodeMetaData
Child constructor for relative path.- Parameters:
parent- ParentGraphNodeMetaData.childPath- Path for this child.
-
-
Method Details
-
capitalise
Returns the input text capitalised.- Parameters:
text- Text.- Returns:
- Capitalised text.
-
camelCase
Returns the input text in camel case.- Parameters:
text- Text to be transformed to camel case.- Returns:
- Camel case text.
-
propertyCase
Returns the input text in case ready for properties.- Parameters:
text- Text.- Returns:
- Property text.
-
titleCase
Returns the input text in sentence case.- Parameters:
text- Text.- Returns:
- Sentence case text.
-
getModelMetaDataXmlUnmarshaller
Lazily obtains theXmlUnmarshallerfor theModelMetaData.- Returns:
XmlUnmarshallerfor the Model.- Throws:
Exception- If fails to obtain theXmlUnmarshaller.
-
getLicense
Obtains the license text.- Returns:
- License text.
-
getPackageName
Obtains the package name for thisGraphNodeMetaDatainstance.- Returns:
- Package name for this
GraphNodeMetaDatainstance.
-
getModelMetaData
Obtains theModelMetaDatafor the input type.- Parameters:
typeName- Name of the type.- Returns:
ModelMetaDatafor the type ornullif not model generation type.- Throws:
Exception- If fails to obtain theModelMetaData.
-
getModelMetaData
Obtains theModelMetaDatafrom the input file.- Parameters:
modelFile-Filecontaining the configuration of theModelMetaData.- Returns:
ModelMetaDataornullif file is not aModelMetaDataconfiguration file.- Throws:
Exception- If fails to obtainModelMetaData.
-