public class SchemaManagerImpl extends Object implements SchemaManager
Holds basic types (String, Integer, etc.), schemas, document types and facets.
Modifier and Type | Field and Description |
---|---|
static String |
SCHEMAS_DIR_NAME |
Constructor and Description |
---|
SchemaManagerImpl() |
Modifier and Type | Method and Description |
---|---|
void |
flushPendingsRegistration() |
DocumentType |
getDocumentType(String name)
Gets a document type.
|
DocumentTypeDescriptor |
getDocumentTypeDescriptor(String name) |
Set<String> |
getDocumentTypeNamesExtending(String docTypeName)
Return the names of all document types extending the given one, which
is included.
|
Set<String> |
getDocumentTypeNamesForFacet(String facet)
Returns the names of all document types that have given facet.
|
DocumentType[] |
getDocumentTypes()
Gets the list of document types.
|
int |
getDocumentTypesCount() |
CompositeType |
getFacet(String name)
Gets a facet.
|
CompositeType[] |
getFacets()
Gets the list of facets.
|
Field |
getField(String prefixedName)
Gets the field given a prefixed name.
|
Set<String> |
getNoPerDocumentQueryFacets()
Finds which facets are configured as no-per-instance-query.
|
List<Schema> |
getProxySchemas(String docType)
Gets the schemas on a proxy for a document of the given type.
|
Schema |
getSchema(String name)
Gets a schema.
|
Schema |
getSchemaFromPrefix(String schemaPrefix) |
Schema |
getSchemaFromURI(String schemaURI) |
Schema[] |
getSchemas()
Gets the list of schemas.
|
File |
getSchemasDir() |
boolean |
hasSuperType(String docType,
String superType)
Returns true if
docType is or extends superType , false
otherwise. |
boolean |
isProxySchema(String schema,
String docType)
Checks if a schema is on a proxy for a document of the given type.
|
void |
registerConfiguration(TypeConfiguration config) |
void |
registerDocumentType(DocumentTypeDescriptor dtd) |
void |
registerFacet(FacetDescriptor fd) |
void |
registerProxies(ProxiesDescriptor pd) |
void |
registerSchema(SchemaBindingDescriptor sd) |
void |
unregisterConfiguration(TypeConfiguration config) |
void |
unregisterDocumentType(DocumentTypeDescriptor dtd) |
void |
unregisterFacet(FacetDescriptor fd) |
void |
unregisterProxies(ProxiesDescriptor pd) |
void |
unregisterSchema(SchemaBindingDescriptor sd) |
public static final String SCHEMAS_DIR_NAME
public File getSchemasDir()
public void registerConfiguration(TypeConfiguration config)
public void unregisterConfiguration(TypeConfiguration config)
public void registerSchema(SchemaBindingDescriptor sd)
public void unregisterSchema(SchemaBindingDescriptor sd)
public void registerFacet(FacetDescriptor fd)
public void unregisterFacet(FacetDescriptor fd)
public void registerDocumentType(DocumentTypeDescriptor dtd)
public void unregisterDocumentType(DocumentTypeDescriptor dtd)
public DocumentTypeDescriptor getDocumentTypeDescriptor(String name)
public void registerProxies(ProxiesDescriptor pd)
public void unregisterProxies(ProxiesDescriptor pd)
public Schema[] getSchemas()
TypeProvider
getSchemas
in interface TypeProvider
public Schema getSchema(String name)
TypeProvider
getSchema
in interface TypeProvider
public Schema getSchemaFromPrefix(String schemaPrefix)
getSchemaFromPrefix
in interface SchemaManager
public Schema getSchemaFromURI(String schemaURI)
getSchemaFromURI
in interface SchemaManager
public CompositeType[] getFacets()
TypeProvider
getFacets
in interface TypeProvider
public CompositeType getFacet(String name)
TypeProvider
getFacet
in interface TypeProvider
public Set<String> getNoPerDocumentQueryFacets()
TypeProvider
getNoPerDocumentQueryFacets
in interface TypeProvider
public DocumentType getDocumentType(String name)
TypeProvider
getDocumentType
in interface TypeProvider
public Set<String> getDocumentTypeNamesForFacet(String facet)
SchemaManager
getDocumentTypeNamesForFacet
in interface SchemaManager
public Set<String> getDocumentTypeNamesExtending(String docTypeName)
SchemaManager
getDocumentTypeNamesExtending
in interface SchemaManager
public DocumentType[] getDocumentTypes()
TypeProvider
getDocumentTypes
in interface TypeProvider
public int getDocumentTypesCount()
getDocumentTypesCount
in interface SchemaManager
public boolean hasSuperType(String docType, String superType)
SchemaManager
docType
is or extends superType
, false
otherwise.hasSuperType
in interface SchemaManager
public List<Schema> getProxySchemas(String docType)
TypeProvider
getProxySchemas
in interface TypeProvider
public boolean isProxySchema(String schema, String docType)
TypeProvider
isProxySchema
in interface TypeProvider
public Field getField(String prefixedName)
SchemaManager
getField
in interface SchemaManager
public void flushPendingsRegistration()
Copyright © 2014 Nuxeo SA. All rights reserved.