Package net.officefloor.model.generate
Class GraphNodeMetaData
- java.lang.Object
-
- net.officefloor.model.generate.GraphNodeMetaData
-
public class GraphNodeMetaData extends java.lang.Object
Provides 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.String
camelCase(java.lang.String text)
Returns the input text in camel case.static java.lang.String
capitalise(java.lang.String text)
Returns the input text capitalised.java.lang.String
getLicense()
Obtains the license text.ModelMetaData
getModelMetaData(java.io.File modelFile)
Obtains theModelMetaData
from the input file.ModelMetaData
getModelMetaData(java.lang.String typeName)
Obtains theModelMetaData
for the input type.static XmlUnmarshaller
getModelMetaDataXmlUnmarshaller()
Lazily obtains theXmlUnmarshaller
for theModelMetaData
.java.lang.String
getPackageName()
Obtains the package name for thisGraphNodeMetaData
instance.static java.lang.String
propertyCase(java.lang.String text)
Returns the input text in case ready for properties.static java.lang.String
titleCase(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 theXmlUnmarshaller
for theModelMetaData
.- Returns:
XmlUnmarshaller
for 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 thisGraphNodeMetaData
instance.- Returns:
- Package name for this
GraphNodeMetaData
instance.
-
getModelMetaData
public ModelMetaData getModelMetaData(java.lang.String typeName) throws java.lang.Exception
Obtains theModelMetaData
for the input type.- Parameters:
typeName
- Name of the type.- Returns:
ModelMetaData
for the type ornull
if 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 theModelMetaData
from the input file.- Parameters:
modelFile
-File
containing the configuration of theModelMetaData
.- Returns:
ModelMetaData
ornull
if file is not aModelMetaData
configuration file.- Throws:
java.lang.Exception
- If fails to obtainModelMetaData
.
-
-