Class M2Model

java.lang.Object
org.alfresco.repo.dictionary.M2Model

public class M2Model extends Object
Model Definition.
Author:
David Caruana
  • Method Details

    • createModel

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

      public static M2Model createModel(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(String bindingName, InputStream xml)
    • toXML

      public void toXML(OutputStream xml)
      Render the model to dictionary XML
      Parameters:
      xml - the dictionary xml representation of the model
    • toXML

      public void toXML(ModelDefinition.XMLBindingType bindingType, OutputStream xml)
    • getChecksum

      public long getChecksum(ModelDefinition.XMLBindingType bindingType)
    • 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 String getName()
    • setName

      public void setName(String name)
    • getDescription

      public String getDescription()
    • setDescription

      public void setDescription(String description)
    • getAuthor

      public String getAuthor()
    • setAuthor

      public void setAuthor(String author)
    • getPublishedDate

      public Date getPublishedDate()
    • setPublishedDate

      public void setPublishedDate(Date published)
    • getVersion

      public String getVersion()
    • setVersion

      public void setVersion(String version)
    • createType

      public M2Type createType(String name)
    • removeType

      public void removeType(String name)
    • getTypes

      public List<M2Type> getTypes()
    • getType

      public M2Type getType(String name)
    • createAspect

      public M2Aspect createAspect(String name)
    • removeAspect

      public void removeAspect(String name)
    • getAspects

      public List<M2Aspect> getAspects()
    • getAspect

      public M2Aspect getAspect(String name)
    • createPropertyType

      public M2DataType createPropertyType(String name)
    • removePropertyType

      public void removePropertyType(String name)
    • getPropertyTypes

      public List<M2DataType> getPropertyTypes()
    • getPropertyType

      public M2DataType getPropertyType(String name)
    • createNamespace

      public M2Namespace createNamespace(String uri, String prefix)
    • removeNamespace

      public void removeNamespace(String uri)
    • getNamespaces

      public List<M2Namespace> getNamespaces()
    • getNamespace

      public M2Namespace getNamespace(String uri)
    • createImport

      public M2Namespace createImport(String uri, String prefix)
    • removeImport

      public void removeImport(String uri)
    • getImports

      public List<M2Namespace> getImports()
    • getImport

      public M2Namespace getImport(String uri)
    • getConstraints

      public List<M2Constraint> getConstraints()
    • getConstraint

      public M2Constraint getConstraint(String name)
    • createConstraint

      public M2Constraint createConstraint(String name, String type)
    • removeConstraint

      public void removeConstraint(String name)
    • setConfigProperties

      public void setConfigProperties(Properties configProperties)