org.modeshape.jcr

## Class NodeTypeSchemata

- java.lang.Object
- - org.modeshape.jcr.NodeTypeSchemata

- All Implemented Interfaces:
    Schemata

      @Immutable
      public class NodeTypeSchemata
      extends Object
      implements Schemata

  A `Schemata` implementation that is constructed from the `NodeType`s and `PropertyDefinition`s contained within a `RepositoryNodeTypeManager`. The resulting `Schemata.Table`s will never change, so the `RepositoryNodeTypeManager` must replace it's cached instance whenever the node types change.

- - ### Nested Class Summary

    Nested Classes
    Modifier and Type | Class and Description
    --- | ---
    `protected class` | `NodeTypeSchemata.SessionSchemata` Implementation class that builds the tables lazily.

    - ### Nested classes/interfaces inherited from interface org.modeshape.jcr.query.validate.Schemata

      `Schemata.Column, Schemata.Key, Schemata.Table, Schemata.View`

  - ### Field Summary

    Fields
    Modifier and Type | Field and Description
    --- | ---
    `protected static boolean` | `DEFAULT_CAN_CONTAIN_REFERENCES`
    `protected static boolean` | `DEFAULT_FULL_TEXT_SEARCHABLE`

  - ### Method Summary

    Methods
    Modifier and Type | Method and Description
    --- | ---
    `protected void` | `addAllNodesTable(ImmutableSchemata.Builder builder, IndexRules.Builder indexRuleBuilder, ExecutionContext context, List<org.modeshape.jcr.JcrPropertyDefinition> additionalProperties)`
    `protected void` | `addIndexRule(IndexRules.Builder builder, org.modeshape.jcr.JcrPropertyDefinition defn, String type, TypeSystem typeSystem, boolean canBeReference, boolean isStrongReference)` Add an index rule for the given property definition and the type in the `TypeSystem`.
    `protected void` | `addView(ImmutableSchemata.Builder builder, ExecutionContext context, org.modeshape.jcr.JcrNodeType nodeType)`
    `IndexRules` | `getIndexRules()` Get the index rules ...
    `protected org.modeshape.jcr.JcrNodeType` | `getNodeType(Name nodeTypeName)`
    `Schemata` | `getSchemataForSession(JcrSession session)` Get a schemata instance that works with the supplied session and that uses the session-specific namespace mappings.
    `Schemata.Table` | `getTable(SelectorName name)` Get the information for the table or view with the supplied name within this schema.
    `protected Set<Operator>` | `operatorsFor(org.modeshape.jcr.JcrPropertyDefinition defn)`
    `protected org.modeshape.jcr.JcrPropertyDefinition` | `pseudoProperty(ExecutionContext context, Name name, int propertyType)`
    `String` | `toString()`

    - ### Methods inherited from class java.lang.Object

      `clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait`

- - ### Field Detail

    - #### DEFAULT_CAN_CONTAIN_REFERENCES

          protected static final boolean DEFAULT_CAN_CONTAIN_REFERENCES

      See Also:
        Constant Field Values

    - #### DEFAULT_FULL_TEXT_SEARCHABLE

          protected static final boolean DEFAULT_FULL_TEXT_SEARCHABLE

      See Also:
        Constant Field Values

  - ### Method Detail

    - #### pseudoProperty

          protected org.modeshape.jcr.JcrPropertyDefinition pseudoProperty(ExecutionContext context,
                                                               Name name,
                                                               int propertyType)

    - #### getIndexRules

          public IndexRules getIndexRules()

      Get the index rules ...
      Returns:
        indexRules

    - #### getNodeType

          protected org.modeshape.jcr.JcrNodeType getNodeType(Name nodeTypeName)

    - #### addAllNodesTable

          protected final void addAllNodesTable(ImmutableSchemata.Builder builder,
                              IndexRules.Builder indexRuleBuilder,
                              ExecutionContext context,
                              List<org.modeshape.jcr.JcrPropertyDefinition> additionalProperties)

    - #### operatorsFor

          protected Set<Operator> operatorsFor(org.modeshape.jcr.JcrPropertyDefinition defn)

    - #### addIndexRule

          protected final void addIndexRule(IndexRules.Builder builder,
                          org.modeshape.jcr.JcrPropertyDefinition defn,
                          String type,
                          TypeSystem typeSystem,
                          boolean canBeReference,
                          boolean isStrongReference)

      Add an index rule for the given property definition and the type in the `TypeSystem`.
      Parameters:
        `builder` - the index rule builder; never null
        `defn` - the property definition; never null
        `type` - the TypeSystem type, which may be a more general type than dictated by the definition, since multiple definitions with the same name require the index rule to use the common base type; never null
        `typeSystem` - the type system; never null
        `canBeReference` - true if the property described the rule can hold reference values, or false otherwise
        `isStrongReference` - true if the index rule can be a reference and it should be included in referential integrity checks

    - #### addView

          protected final void addView(ImmutableSchemata.Builder builder,
                     ExecutionContext context,
                     org.modeshape.jcr.JcrNodeType nodeType)

    - #### getTable

          public Schemata.Table getTable(SelectorName name)

      Description copied from interface: `Schemata`
      Get the information for the table or view with the supplied name within this schema.

      The resulting definition is immutable.

      Specified by:
        `getTable` in interface `Schemata`
      Parameters:
        `name` - the table or view name; may not be null
      Returns:
        the table or view information, or null if there is no such table

    - #### getSchemataForSession

          public Schemata getSchemataForSession(JcrSession session)

      Get a schemata instance that works with the supplied session and that uses the session-specific namespace mappings. Note that the resulting instance does not change as the session's namespace mappings are changed, so when that happens the JcrSession must call this method again to obtain a new schemata.
      Parameters:
        `session` - the session; may not be null
      Returns:
        the schemata that can be used for the session; never null

    - #### toString

          public String toString()

      Overrides:
        `toString` in class `Object`

Copyright © 2008-2014 JBoss, a division of Red Hat. All Rights Reserved.