Package org.alfresco.repo.dictionary
Class M2Model
java.lang.Object
org.alfresco.repo.dictionary.M2Model
Model Definition.
- Author:
- David Caruana
-
Method Summary
Modifier and TypeMethodDescriptioncompile(DictionaryDAO dictionaryDAO, NamespaceDAO namespaceDAO, boolean enableConstraintClassLoading) Create a compiled form of this modelcreateAspect(String name) createConstraint(String name, String type) createImport(String uri, String prefix) static M2ModelcreateModel(InputStream xml) Construct a model from a dictionary xml specificationstatic M2ModelcreateModel(String name) Construct an empty modelstatic M2ModelcreateModel(String bindingName, InputStream xml) createNamespace(String uri, String prefix) createPropertyType(String name) createType(String name) longgetChecksum(ModelDefinition.XMLBindingType bindingType) getConstraint(String name) getName()getNamespace(String uri) getPropertyType(String name) getTypes()voidremoveAspect(String name) voidremoveConstraint(String name) voidremoveImport(String uri) voidremoveNamespace(String uri) voidremovePropertyType(String name) voidremoveType(String name) voidvoidsetConfigProperties(Properties configProperties) voidsetDescription(String description) voidvoidsetPublishedDate(Date published) voidsetVersion(String version) voidtoXML(OutputStream xml) Render the model to dictionary XMLvoidtoXML(ModelDefinition.XMLBindingType bindingType, OutputStream xml)
-
Method Details
-
createModel
Construct an empty model- Parameters:
name- the name of the model- Returns:
- the model
-
createModel
Construct a model from a dictionary xml specification- Parameters:
xml- the dictionary xml- Returns:
- the model representation of the xml
-
createModel
-
toXML
Render the model to dictionary XML- Parameters:
xml- the dictionary xml representation of the model
-
toXML
-
getChecksum
-
compile
public CompiledModel compile(DictionaryDAO dictionaryDAO, NamespaceDAO namespaceDAO, boolean enableConstraintClassLoading) Create a compiled form of this model- Parameters:
dictionaryDAO- dictionary DAOnamespaceDAO- namespace DAO- Returns:
- the compiled form of the model
-
getName
-
setName
-
getDescription
-
setDescription
-
getAuthor
-
setAuthor
-
getPublishedDate
-
setPublishedDate
-
getVersion
-
setVersion
-
createType
-
removeType
-
getTypes
-
getType
-
createAspect
-
removeAspect
-
getAspects
-
getAspect
-
createPropertyType
-
removePropertyType
-
getPropertyTypes
-
getPropertyType
-
createNamespace
-
removeNamespace
-
getNamespaces
-
getNamespace
-
createImport
-
removeImport
-
getImports
-
getImport
-
getConstraints
-
getConstraint
-
createConstraint
-
removeConstraint
-
setConfigProperties
-