public class DocumentTypeImpl extends CompositeTypeImpl implements DocumentType
Modifier and Type | Field and Description |
---|---|
protected Set<String> |
facets |
protected PrefetchInfo |
prefetchInfo |
schemas
fields, fieldsByName, ns
constraints, EMPTY_SUPERTYPES, name, schema, superType
Constructor and Description |
---|
DocumentTypeImpl(String name) |
DocumentTypeImpl(String name,
DocumentType superType,
List<Schema> schemas,
Collection<String> facets,
PrefetchInfo prefetchInfo)
Constructs a document type.
|
Modifier and Type | Method and Description |
---|---|
Set<String> |
getFacets()
Gets all the facets of this document type.
|
PrefetchInfo |
getPrefetchInfo()
Gets the prefetch info, or null if no prefetch is defined.
|
boolean |
hasFacet(String facetName)
Returns
true if this document type has the given facetName facet, false otherwise . |
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 |
setPrefetchInfo(PrefetchInfo prefetchInfo) |
getField, getSchema, getSchemaNames, getSchemas, hasSchema, hasSchemas, isComplexType, isCompositeType, validate
addField, addField, canonicalXPath, convert, getField, getFields, getFieldsCount, getNamespace, hasField, hasFields, newInstance, toString, validateMap
addConstraints, decode, encode, getConstraints, getName, getObjectResolver, getSchema, getSchemaName, getSuperType, getTypeHierarchy, isAny, isAnyType, isListType, isSimpleType, isSuperTypeOf, validateConstraints
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
getSchema, getSchemaNames, getSchemas, hasSchema, hasSchemas
addField, getField, getField, getFields, getFieldsCount, getNamespace, hasField, hasFields
convert, decode, encode, getConstraints, getName, getObjectResolver, getSchema, getSchemaName, getSuperType, getTypeHierarchy, isAnyType, isComplexType, isCompositeType, isListType, isSimpleType, isSuperTypeOf, newInstance, validate
protected PrefetchInfo prefetchInfo
public DocumentTypeImpl(String name, DocumentType superType, List<Schema> schemas, Collection<String> facets, PrefetchInfo prefetchInfo)
public DocumentTypeImpl(String name)
public void setPrefetchInfo(PrefetchInfo prefetchInfo)
public PrefetchInfo getPrefetchInfo()
DocumentType
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.
getPrefetchInfo
in interface DocumentType
public boolean isFile()
DocumentType
isFile
in interface DocumentType
public boolean isFolder()
DocumentType
isFolder
in interface DocumentType
public boolean isOrdered()
DocumentType
isOrdered
in interface DocumentType
public Set<String> getFacets()
DocumentType
Facets inherited from parents are taken into account.
getFacets
in interface DocumentType
public boolean hasFacet(String facetName)
DocumentType
true
if this document type has the given facetName
facet, false otherwise
.hasFacet
in interface DocumentType
Copyright © 2016 Nuxeo SA. All rights reserved.