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 M2Model
createModel
(InputStream xml) Construct a model from a dictionary xml specificationstatic M2Model
createModel
(String name) Construct an empty modelstatic M2Model
createModel
(String bindingName, InputStream xml) createNamespace
(String uri, String prefix) createPropertyType
(String name) createType
(String name) long
getChecksum
(ModelDefinition.XMLBindingType bindingType) getConstraint
(String name) getName()
getNamespace
(String uri) getPropertyType
(String name) getTypes()
void
removeAspect
(String name) void
removeConstraint
(String name) void
removeImport
(String uri) void
removeNamespace
(String uri) void
removePropertyType
(String name) void
removeType
(String name) void
void
setConfigProperties
(Properties configProperties) void
setDescription
(String description) void
void
setPublishedDate
(Date published) void
setVersion
(String version) void
toXML
(OutputStream xml) Render the model to dictionary XMLvoid
toXML
(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
-