Class M2Model


  • public class M2Model
    extends java.lang.Object
    Model Definition.
    Author:
    David Caruana
    • Method Detail

      • createModel

        public static M2Model createModel​(java.lang.String name)
        Construct an empty model
        Parameters:
        name - the name of the model
        Returns:
        the model
      • createModel

        public static M2Model createModel​(java.io.InputStream xml)
        Construct a model from a dictionary xml specification
        Parameters:
        xml - the dictionary xml
        Returns:
        the model representation of the xml
      • createModel

        public static M2Model createModel​(java.lang.String bindingName,
                                          java.io.InputStream xml)
      • toXML

        public void toXML​(java.io.OutputStream xml)
        Render the model to dictionary XML
        Parameters:
        xml - the dictionary xml representation of the model
      • compile

        public CompiledModel compile​(DictionaryDAO dictionaryDAO,
                                     NamespaceDAO namespaceDAO,
                                     boolean enableConstraintClassLoading)
        Create a compiled form of this model
        Parameters:
        dictionaryDAO - dictionary DAO
        namespaceDAO - namespace DAO
        Returns:
        the compiled form of the model
      • getName

        public java.lang.String getName()
      • setName

        public void setName​(java.lang.String name)
      • getDescription

        public java.lang.String getDescription()
      • setDescription

        public void setDescription​(java.lang.String description)
      • getAuthor

        public java.lang.String getAuthor()
      • setAuthor

        public void setAuthor​(java.lang.String author)
      • getPublishedDate

        public java.util.Date getPublishedDate()
      • setPublishedDate

        public void setPublishedDate​(java.util.Date published)
      • getVersion

        public java.lang.String getVersion()
      • setVersion

        public void setVersion​(java.lang.String version)
      • createType

        public M2Type createType​(java.lang.String name)
      • removeType

        public void removeType​(java.lang.String name)
      • getTypes

        public java.util.List<M2Type> getTypes()
      • getType

        public M2Type getType​(java.lang.String name)
      • createAspect

        public M2Aspect createAspect​(java.lang.String name)
      • removeAspect

        public void removeAspect​(java.lang.String name)
      • getAspects

        public java.util.List<M2Aspect> getAspects()
      • getAspect

        public M2Aspect getAspect​(java.lang.String name)
      • createPropertyType

        public M2DataType createPropertyType​(java.lang.String name)
      • removePropertyType

        public void removePropertyType​(java.lang.String name)
      • getPropertyTypes

        public java.util.List<M2DataType> getPropertyTypes()
      • getPropertyType

        public M2DataType getPropertyType​(java.lang.String name)
      • createNamespace

        public M2Namespace createNamespace​(java.lang.String uri,
                                           java.lang.String prefix)
      • removeNamespace

        public void removeNamespace​(java.lang.String uri)
      • getNamespaces

        public java.util.List<M2Namespace> getNamespaces()
      • getNamespace

        public M2Namespace getNamespace​(java.lang.String uri)
      • createImport

        public M2Namespace createImport​(java.lang.String uri,
                                        java.lang.String prefix)
      • removeImport

        public void removeImport​(java.lang.String uri)
      • getImports

        public java.util.List<M2Namespace> getImports()
      • getImport

        public M2Namespace getImport​(java.lang.String uri)
      • getConstraints

        public java.util.List<M2Constraint> getConstraints()
      • getConstraint

        public M2Constraint getConstraint​(java.lang.String name)
      • createConstraint

        public M2Constraint createConstraint​(java.lang.String name,
                                             java.lang.String type)
      • removeConstraint

        public void removeConstraint​(java.lang.String name)
      • getAnalyserResourceBundleName

        public java.lang.String getAnalyserResourceBundleName()
        Returns:
        String
      • setAnalyserResourceBundleName

        public void setAnalyserResourceBundleName​(java.lang.String analyserResourceBundleName)
      • setConfigProperties

        public void setConfigProperties​(java.util.Properties configProperties)