org.modeshape.jcr.federation

## Class FederatedSchematicEntry

- java.lang.Object
- - org.modeshape.jcr.federation.FederatedSchematicEntry

- All Implemented Interfaces:
    Cloneable, SchematicEntry

      public class FederatedSchematicEntry
      extends Object
      implements SchematicEntry

  A simple `SchematicEntry` implementation which is used by the `FederatedDocumentStore` to wrap editable documents.

- - ### Nested Class Summary

    - ### Nested classes/interfaces inherited from interface org.infinispan.schematic.SchematicEntry

      `SchematicEntry.FieldName`

  - ### Constructor Summary

    Constructors
    Constructor and Description
    `FederatedSchematicEntry(EditableDocument document)`

  - ### Method Summary

    Methods
    Modifier and Type | Method and Description
    --- | ---
    `Document` | `asDocument()` Get the representation of this entry as a document, which will include the `metadata` and `content` as nested documents.
    `EditableDocument` | `edit()`
    `Document` | `getContent()` Return this value's content.
    `Document` | `getMetadata()` Get the metadata associated with this value.
    `void` | `setContent(Document content)` Set the content for this value to be the supplied Document and set the content type to be " `application/json`".

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

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

- - ### Constructor Detail

    - #### FederatedSchematicEntry

          public FederatedSchematicEntry(EditableDocument document)

  - ### Method Detail

    - #### getMetadata

          public Document getMetadata()

      Description copied from interface: `SchematicEntry`
      Get the metadata associated with this value.
      Specified by:
        `getMetadata` in interface `SchematicEntry`
      Returns:
        the metadata document; never null

    - #### getContent

          public Document getContent()

      Description copied from interface: `SchematicEntry`
      Return this value's content. The result will either be a `Document`.
      Specified by:
        `getContent` in interface `SchematicEntry`
      Returns:
        the content, or null if there is no content

    - #### setContent

          public void setContent(Document content)

      Description copied from interface: `SchematicEntry`
      Set the content for this value to be the supplied Document and set the content type to be " `application/json`".
      Specified by:
        `setContent` in interface `SchematicEntry`
      Parameters:
        `content` - the Document representing the JSON content; may not be null

    - #### edit

          public EditableDocument edit()

    - #### asDocument

          public Document asDocument()

      Description copied from interface: `SchematicEntry`
      Get the representation of this entry as a document, which will include the `metadata` and `content` as nested documents.
      Specified by:
        `asDocument` in interface `SchematicEntry`
      Returns:
        the entry's representation as a document

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