public interface DocumentType extends CompositeType
Sample document types are Workspace, Section, Domain,... The list of builtin document type is visible at NXCore/OSGI-INF/CoreExtensions.xml.
| Modifier and Type | Method and Description |
|---|---|
void |
addSchemas(String[] schemas)
Adds specified schemas to the document type.
|
String[] |
getChildrenTypes()
Gets the type names that can be used for children docs.
|
Set<String> |
getFacets()
Gets all the facets of this document type.
|
PrefetchInfo |
getPrefetchInfo()
Gets the prefetch info, or null if no prefetch is defined.
|
TypeRef<DocumentType> |
getRef()
Gets a proxy (or reference to this type).
|
DocumentType[] |
getResolvedChildrenTypes()
Gets the resolved children doc types.
|
boolean |
isChildTypeAllowed(String name) |
boolean |
isFile()
Tests whether this type describes a document (not a folder!) or not.
|
boolean |
isFolder()
Tests whether this type describes a folder or not.
|
boolean |
isOrdered()
Tests whether this type describe an ordered folder or not.
|
void |
setChildrenTypes(String[] subTypes)
Sets the names of the allowed children doc types.
|
void |
setDeclaredFacets(String[] facets) |
void |
setPrefetchInfo(PrefetchInfo prefetchInfo)
Sets the prefetch info.
|
addSchema, addSchema, getSchema, getSchemaByPrefix, getSchemaNames, getSchemas, hasSchema, hasSchemasaddField, addField, addField, addField, getField, getField, getFields, getFieldsCount, getNamespace, hasField, hasField, hasFields, isUnstructuredconvert, decode, encode, getName, getSchema, getSchemaName, getSuperType, getTypeHierarchy, isAnyType, isComplexType, isCompositeType, isListType, isNotNull, isReadOnly, isSimpleType, isSuperTypeOf, newInstance, validatevoid setPrefetchInfo(PrefetchInfo prefetchInfo)
The prefetch info describes which fields (or entire schemas) should be prefetched when instantiating a document.
This is primarily intended to optimize document initialization time.
The prefetch info is a string array of length multiple of 2 containing a sequence of pairs
composed by the schema name and the field name. If the field name is null then the entire schema
should be prefetched. Example: "common", null, "dublincore", "title"
prefetchInfo - PrefetchInfo getPrefetchInfo()
If the prefetch info is not null, the caller should use it when instantiating a document to preload the fields defined by the prefetch info.
If no prefetch is specified by the document type, the caller is free to use a default prefetch info or no prefetch at all.
boolean isFile()
boolean isFolder()
boolean isOrdered()
Set<String> getFacets()
Facets inherited from parents are taken into account.
void setDeclaredFacets(String[] facets)
facets - void addSchemas(String[] schemas)
schemas - TypeRef<DocumentType> getRef()
TypegetRef in interface ComplexTypegetRef in interface CompositeTypegetRef in interface Typevoid setChildrenTypes(String[] subTypes)
Children types are document types allowed for the children of a document of the current type.
Type names may include '*' for all types.
subTypes - null if no children types have been defined
(i.e. this type cannot have children), else an array with children typesString[] getChildrenTypes()
Returned types may include special group of types like '*'.
DocumentType[] getResolvedChildrenTypes()
Special group of types like '*' and exclusion filters if any are applied and the set of actual children types is computed and resolved into real doc types.
boolean isChildTypeAllowed(String name)
Copyright © 2012 Nuxeo SA. All Rights Reserved.