Class GraphNodeMetaData

java.lang.Object
net.officefloor.model.generate.GraphNodeMetaData

public class GraphNodeMetaData extends Object
Provides generic meta-data for generating a Model.
Author:
Daniel Sagenschneider
  • Constructor Details

    • GraphNodeMetaData

      public GraphNodeMetaData(String license, File rawRootDir)
      Top level constructor.
      Parameters:
      license - License.
      rawRootDir - Root directory containing the raw models.
    • GraphNodeMetaData

      public GraphNodeMetaData(GraphNodeMetaData parent, String childPath)
      Child constructor for relative path.
      Parameters:
      parent - Parent GraphNodeMetaData.
      childPath - Path for this child.
  • Method Details

    • capitalise

      public static String capitalise(String text)
      Returns the input text capitalised.
      Parameters:
      text - Text.
      Returns:
      Capitalised text.
    • camelCase

      public static String camelCase(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 String propertyCase(String text)
      Returns the input text in case ready for properties.
      Parameters:
      text - Text.
      Returns:
      Property text.
    • titleCase

      public static String titleCase(String text)
      Returns the input text in sentence case.
      Parameters:
      text - Text.
      Returns:
      Sentence case text.
    • getModelMetaDataXmlUnmarshaller

      public static XmlUnmarshaller getModelMetaDataXmlUnmarshaller() throws Exception
      Lazily obtains the XmlUnmarshaller for the ModelMetaData.
      Returns:
      XmlUnmarshaller for the Model.
      Throws:
      Exception - If fails to obtain the XmlUnmarshaller.
    • getLicense

      public String getLicense()
      Obtains the license text.
      Returns:
      License text.
    • getPackageName

      public String getPackageName()
      Obtains the package name for this GraphNodeMetaData instance.
      Returns:
      Package name for this GraphNodeMetaData instance.
    • getModelMetaData

      public ModelMetaData getModelMetaData(String typeName) throws Exception
      Obtains the ModelMetaData for the input type.
      Parameters:
      typeName - Name of the type.
      Returns:
      ModelMetaData for the type or null if not model generation type.
      Throws:
      Exception - If fails to obtain the ModelMetaData.
    • getModelMetaData

      public ModelMetaData getModelMetaData(File modelFile) throws Exception
      Obtains the ModelMetaData from the input file.
      Parameters:
      modelFile - File containing the configuration of the ModelMetaData.
      Returns:
      ModelMetaData or null if file is not a ModelMetaData configuration file.
      Throws:
      Exception - If fails to obtain ModelMetaData.