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