Package org.alfresco.repo.dictionary
Class M2Model
- java.lang.Object
-
- org.alfresco.repo.dictionary.M2Model
-
public class M2Model extends java.lang.Object
Model Definition.- Author:
- David Caruana
-
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description CompiledModel
compile(DictionaryDAO dictionaryDAO, NamespaceDAO namespaceDAO, boolean enableConstraintClassLoading)
Create a compiled form of this modelM2Aspect
createAspect(java.lang.String name)
M2Constraint
createConstraint(java.lang.String name, java.lang.String type)
M2Namespace
createImport(java.lang.String uri, java.lang.String prefix)
static M2Model
createModel(java.io.InputStream xml)
Construct a model from a dictionary xml specificationstatic M2Model
createModel(java.lang.String name)
Construct an empty modelstatic M2Model
createModel(java.lang.String bindingName, java.io.InputStream xml)
M2Namespace
createNamespace(java.lang.String uri, java.lang.String prefix)
M2DataType
createPropertyType(java.lang.String name)
M2Type
createType(java.lang.String name)
java.lang.String
getAnalyserResourceBundleName()
M2Aspect
getAspect(java.lang.String name)
java.util.List<M2Aspect>
getAspects()
java.lang.String
getAuthor()
long
getChecksum(ModelDefinition.XMLBindingType bindingType)
M2Constraint
getConstraint(java.lang.String name)
java.util.List<M2Constraint>
getConstraints()
java.lang.String
getDescription()
M2Namespace
getImport(java.lang.String uri)
java.util.List<M2Namespace>
getImports()
java.lang.String
getName()
M2Namespace
getNamespace(java.lang.String uri)
java.util.List<M2Namespace>
getNamespaces()
M2DataType
getPropertyType(java.lang.String name)
java.util.List<M2DataType>
getPropertyTypes()
java.util.Date
getPublishedDate()
M2Type
getType(java.lang.String name)
java.util.List<M2Type>
getTypes()
java.lang.String
getVersion()
void
removeAspect(java.lang.String name)
void
removeConstraint(java.lang.String name)
void
removeImport(java.lang.String uri)
void
removeNamespace(java.lang.String uri)
void
removePropertyType(java.lang.String name)
void
removeType(java.lang.String name)
void
setAnalyserResourceBundleName(java.lang.String analyserResourceBundleName)
void
setAuthor(java.lang.String author)
void
setConfigProperties(java.util.Properties configProperties)
void
setDescription(java.lang.String description)
void
setName(java.lang.String name)
void
setPublishedDate(java.util.Date published)
void
setVersion(java.lang.String version)
void
toXML(java.io.OutputStream xml)
Render the model to dictionary XMLvoid
toXML(ModelDefinition.XMLBindingType bindingType, java.io.OutputStream xml)
-
-
-
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
-
toXML
public void toXML(ModelDefinition.XMLBindingType bindingType, java.io.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 DAOnamespaceDAO
- 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)
-
-