org.modeshape.jcr.spi.federation

## Interface DocumentReader

- All Known Implementing Classes:
    FederatedDocumentReader

      public interface DocumentReader

  A reader which can be used read the structure of `Document` instances and expose the underlying information.

- - ### Method Summary

    Methods
    Modifier and Type | Method and Description
    --- | ---
    `Document` | `document()` Returns the underlying document instance.
    `Integer` | `getCacheTtlSeconds()` Returns the number of seconds that the underlying document should be cached by the repository, if any.
    `List<? extends Document>` | `getChildren()` Returns the list of children the underlying document has.
    `LinkedHashMap<String,Name>` | `getChildrenMap()` Returns an ordered map of (childId, childName) the underlying document has.
    `String` | `getDocumentId()` Returns the id of the underlying document.
    `Set<String>` | `getMixinTypeNames()` Returns a set with the names of the primary types of the underlying document.
    `Set<Name>` | `getMixinTypes()` Returns a set with the names of the primary types of the underlying document.
    `List<String>` | `getParentIds()` Returns the list of identifiers of the parents of the underlying document.
    `Name` | `getPrimaryType()` Returns name of the primary type of the underlying document.
    `String` | `getPrimaryTypeName()` Returns the name of primary type of the underlying document.
    `Map<Name,Property>` | `getProperties()` Returns all the properties of the underlying document.
    `Property` | `getProperty(Name name)` Returns the property which has the given name, or null if there is no such property.
    `Property` | `getProperty(String name)` Returns the property which has the given name, or null if there is no such property.
    `boolean` | `isQueryable()` Determine whether the document is considered queryable.

- - ### Method Detail

    - #### getDocumentId

          String getDocumentId()

      Returns the id of the underlying document.
      Returns:
        a `non-null` `String`

    - #### getParentIds

          List<String> getParentIds()

      Returns the list of identifiers of the parents of the underlying document.
      Returns:
        a `non-null` `List`

    - #### getChildren

          List<? extends Document> getChildren()

      Returns the list of children the underlying document has.
      Returns:
        a `non-null` `List`

    - #### getChildrenMap

          LinkedHashMap<String,Name> getChildrenMap()

      Returns an ordered map of (childId, childName) the underlying document has. This preserves the order of the children as defined on the document.

      The returned map does not contain any explicit same name sibling information, so a connector interested in that would have to do its own, custom processing.

      Returns:
        a `non-null` `LinkedHashMap`

    - #### document

          Document document()

      Returns the underlying document instance.
      Returns:
        a `non-null` `Document` instance.

    - #### getCacheTtlSeconds

          Integer getCacheTtlSeconds()

      Returns the number of seconds that the underlying document should be cached by the repository, if any.
      Returns:
        either an optional `Integer`. If `null`, it means that there isn't a special requirement for the underlying document.

    - #### getPrimaryType

          Name getPrimaryType()

      Returns name of the primary type of the underlying document.
      Returns:
        a `non-null` `Name`

    - #### getPrimaryTypeName

          String getPrimaryTypeName()

      Returns the name of primary type of the underlying document.
      Returns:
        a `non-null` `String`

    - #### getMixinTypes

          Set<Name> getMixinTypes()

      Returns a set with the names of the primary types of the underlying document.
      Returns:
        a `non-null` `Set`

    - #### getMixinTypeNames

          Set<String> getMixinTypeNames()

      Returns a set with the names of the primary types of the underlying document.
      Returns:
        a `non-null` `Set`

    - #### getProperty

          Property getProperty(Name name)

      Returns the property which has the given name, or null if there is no such property.
      Parameters:
        `name` - a `non-null` `Name`
      Returns:
        either a `Property` instance or `null`

    - #### getProperty

          Property getProperty(String name)

      Returns the property which has the given name, or null if there is no such property.
      Parameters:
        `name` - a `non-null` `Name`
      Returns:
        either a `Property` instance or `null`

    - #### getProperties

          Map<Name,Property> getProperties()

      Returns all the properties of the underlying document.
      Returns:
        a `non-null` `Map` of (property name, property value) pairs.

    - #### isQueryable

          boolean isQueryable()

      Determine whether the document is considered queryable.
      Returns:
        true if the document is queryable, or false if it is not

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