Interface SchemaManager

All Superinterfaces:
PropertyCharacteristicHandler, TypeProvider
All Known Implementing Classes:
SchemaManagerImpl

public interface SchemaManager extends TypeProvider, PropertyCharacteristicHandler
The Schema Manager manages core document types, schemas, facets and field types.
  • Field Details

    • PATH_INDEX_PATTERN

      static final Pattern PATH_INDEX_PATTERN
  • Method Details

    • normalizePath

      static String normalizePath(String path)
      Remove prefix if any and replace the index of complex properties of the given path.

      i.e. files:files/1/file -> files\/*\/file

      Parameters:
      path - the path
      Returns:
      a normalize path
      Since:
      2021.32
    • getField

      Field getField(String xpath)
      Returns the field with given xpath, or null if not found.
    • getField

      Field getField(Field field, String subFieldName)
      Returns the field with given parent field and sub name, or null if not found.
      Since:
      7.2
    • getSchemaFromPrefix

      Schema getSchemaFromPrefix(String schemaPrefix)
    • getXPathSchemaName

      String getXPathSchemaName(String xpath, Set<String> schemas)
      Finds within the schemas the first matching schema having a property with the same name as the first path segment of the xpath. The xpath can be prefixed or unprefixed.
      Parameters:
      xpath - the prefixed or unprefixed xpath
      schemas - the schemas to be searched
      Returns:
      the first schema containing a property matching the xpath
      Since:
      2023
    • getSchemaFromURI

      @Deprecated(since="11.1") Schema getSchemaFromURI(String schemaURI)
      Deprecated.
      since 11.1, seems unused
    • getDocumentTypeNamesForFacet

      Set<String> getDocumentTypeNamesForFacet(String facet)
      Returns the names of all document types that have given facet.
      Returns:
      null or the names as a guaranteed non-empty set.
    • getDocumentTypeNamesExtending

      Set<String> getDocumentTypeNamesExtending(String docType)
      Return the names of all document types extending the given one, which is included.
      Returns:
      null or the set of names.
    • getDocumentTypesCount

      int getDocumentTypesCount()
    • hasSuperType

      boolean hasSuperType(String docType, String superType)
      Returns true if docType is or extends superType, false otherwise.
      Since:
      5.9.4
    • getAllowedSubTypes

      Set<String> getAllowedSubTypes(String type)
      Returns the types of the children that can be created inside a given type type.
      Since:
      8.4
    • getDeprecatedProperties

      @Deprecated(since="11.1") PropertyDeprecationHandler getDeprecatedProperties()
      Deprecated.
      since 11.1, use PropertyCharacteristicHandler methods instead
      Returns:
      the deprecated properties handler
      Since:
      9.2
    • getRemovedProperties

      @Deprecated(since="11.1") PropertyDeprecationHandler getRemovedProperties()
      Deprecated.
      since 11.1, use PropertyCharacteristicHandler methods instead
      Returns:
      the removed properties handler
      Since:
      9.2
    • getClearComplexPropertyBeforeSet

      boolean getClearComplexPropertyBeforeSet()
      Whether or not to ignore any previous values when setting complex properties.
      Returns:
      true if setting a complex property ignores any previous values
      Since:
      9.3
    • getAllowVersionWriteForDublinCore

      boolean getAllowVersionWriteForDublinCore()
      Whether we allow to write the dublincore schema on a version.
      Returns:
      true if write to the dublincore schema of a version is allowed
      Since:
      10.3