Class DocumentTypeImpl

All Implemented Interfaces:
Serializable, DocumentType, ComplexType, CompositeType, Type

public class DocumentTypeImpl extends CompositeTypeImpl implements DocumentType
Implementation of a document type.
See Also:
  • Field Details

    • facets

      protected Set<String> facets
    • prefetchInfo

      protected PrefetchInfo prefetchInfo
    • subtypes

      protected Set<String> subtypes
    • forbiddenSubtypes

      protected Set<String> forbiddenSubtypes
    • allowedSubtypes

      protected Set<String> allowedSubtypes
  • Constructor Details

  • Method Details

    • setPrefetchInfo

      public void setPrefetchInfo(PrefetchInfo prefetchInfo)
    • getPrefetchInfo

      public PrefetchInfo getPrefetchInfo()
      Description copied from interface: DocumentType
      Gets the prefetch info, or null if no prefetch is defined.

      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.

      Specified by:
      getPrefetchInfo in interface DocumentType
      Returns:
      the prefetch info or null
    • isFile

      public boolean isFile()
      Description copied from interface: DocumentType
      Tests whether this type describes a document (not a folder!) or not.
      Specified by:
      isFile in interface DocumentType
      Returns:
      true if the type describes a document folder, otherwise returns false
    • isFolder

      public boolean isFolder()
      Description copied from interface: DocumentType
      Tests whether this type describes a folder or not.
      Specified by:
      isFolder in interface DocumentType
      Returns:
      true if the type describes a folder, otherwise returns false
    • isOrdered

      public boolean isOrdered()
      Description copied from interface: DocumentType
      Tests whether this type describe an ordered folder or not.
      Specified by:
      isOrdered in interface DocumentType
      Returns:
      true if the type describes an ordered folder, otherwise returns false
    • getFacets

      public Set<String> getFacets()
      Description copied from interface: DocumentType
      Gets all the facets of this document type.

      Facets inherited from parents are taken into account.

      Specified by:
      getFacets in interface DocumentType
      Returns:
      the facets
    • hasFacet

      public boolean hasFacet(String facetName)
      Description copied from interface: DocumentType
      Returns true if this document type has the given facetName facet, false otherwise.
      Specified by:
      hasFacet in interface DocumentType
    • getSubtypes

      public Set<String> getSubtypes()
      Description copied from interface: DocumentType
      Returns the types of the children that can be created inside this type.
      Specified by:
      getSubtypes in interface DocumentType
    • setSubtypes

      public void setSubtypes(Collection<String> subtypes)
      Description copied from interface: DocumentType
      Sets the types of the children that can be created inside the this type.
      Specified by:
      setSubtypes in interface DocumentType
    • hasSubtype

      public boolean hasSubtype(String subtype)
      Description copied from interface: DocumentType
      Returns true if the given subtype type was explicitly allowed to be created inside this type.
      Specified by:
      hasSubtype in interface DocumentType
    • getForbiddenSubtypes

      public Set<String> getForbiddenSubtypes()
      Description copied from interface: DocumentType
      Returns the types of the children that cannot be created inside this type.
      Specified by:
      getForbiddenSubtypes in interface DocumentType
    • setForbiddenSubtypes

      public void setForbiddenSubtypes(Collection<String> forbiddenSubtypes)
      Description copied from interface: DocumentType
      Sets the types of the children that cannot be created inside the this type.
      Specified by:
      setForbiddenSubtypes in interface DocumentType
    • hasForbiddenSubtype

      public boolean hasForbiddenSubtype(String subtype)
      Description copied from interface: DocumentType
      Returns true if the given subtype type was forbidden from being created inside this type.
      Specified by:
      hasForbiddenSubtype in interface DocumentType
    • getAllowedSubtypes

      public Set<String> getAllowedSubtypes()
      Description copied from interface: DocumentType
      Returns the list of types that can effectively be created inside this type. Allowed types results from the exclusion of the forbidden subtypes from the subtypes.
      Specified by:
      getAllowedSubtypes in interface DocumentType
    • hasAllowedSubtype

      public boolean hasAllowedSubtype(String subtype)
      Description copied from interface: DocumentType
      Returns true if the given subtype type can effectively be created inside this type.
      Specified by:
      hasAllowedSubtype in interface DocumentType