Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## org.modeshape.graph.text
Class TextExtractorContext

    java.lang.Object
      org.modeshape.graph.ExecutionContext
          org.modeshape.graph.text.TextExtractorContext

All Implemented Interfaces:
  Cloneable, ClassLoaderFactory

    public class TextExtractorContext

extends ExecutionContext

A context for extracting the content.

Field Summary

Fields inherited from class org.modeshape.graph.ExecutionContext
`DEFAULT_CONTEXT`

Constructor Summary
`TextExtractorContext(ExecutionContext context, Path inputPath, Set<Property> inputProperties, String mimeType, Problems problems)`

Method Summary
`Path` | `getInputPath()` Return the path of the input node containing the content being sequenced.
`Set<Property>` | `getInputProperties()` Return the set of properties from the input node containing the content being sequenced.
`Property` | `getInputProperty(Name name)` Return the property with the supplied name from the input node containing the content being sequenced.
`String` | `getMimeType()` Get the MIME type of the content being processed, if it is known.
`Problems` | `getProblems()` Get an interface that can be used to record various problems, warnings, and errors that are not extreme enough to warrant throwing exceptions.
`TextExtractorContext` | `with(ClassLoaderFactory classLoaderFactory)` Create a new execution context that mirrors this context but that uses the supplied `class loader factory`.
`TextExtractorContext` | `with(Map<String,String> data)` Create a new execution context that mirrors this context but that contains the supplied data.
`TextExtractorContext` | `with(MimeTypeDetector mimeTypeDetector)` Create a new execution context that is the same as this context, but which uses the supplied `MIME type detector`.
`TextExtractorContext` | `with(NamespaceRegistry namespaceRegistry)` Create a new execution context that mirrors this context but that uses the supplied namespace registry.
`TextExtractorContext` | `with(SecurityContext securityContext)` Create an `ExecutionContext` that is the same as this context, but which uses the supplied `security context`.
`TextExtractorContext` | `with(String processId)` Create a new execution context that mirrors this context but that contains the supplied process identifier.
`TextExtractorContext` | `with(String key, String value)` Create a new execution context that mirrors this context but that contains the supplied key-value pair in the new context's data.

Methods inherited from class org.modeshape.graph.ExecutionContext
`clone, getClassLoader, getClassLoaderFactory, getData, getId, getLogger, getLogger, getMimeTypeDetector, getNamespaceRegistry, getProcessId, getPropertyFactory, getSecurityContext, getTextExtractor, getValueFactories, initializeDefaultNamespaces, toString, with, with`

Methods inherited from class java.lang.Object
`equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait`

Constructor Detail

### TextExtractorContext

    public TextExtractorContext(ExecutionContext context,
                                Path inputPath,
                                Set<Property> inputProperties,
                                String mimeType,
                                Problems problems)

Method Detail

### getInputPath

    public Path getInputPath()

  Return the path of the input node containing the content being sequenced.

  Returns:
    input node's path.

### getInputProperties

    public Set<Property> getInputProperties()

  Return the set of properties from the input node containing the content being sequenced.

  Returns:
    the input node's properties; never `null`.

### getInputProperty

    public Property getInputProperty(Name name)

  Return the property with the supplied name from the input node containing the content being sequenced.

  Parameters:
    `name` -
  Returns:
    the input node property, or `null` if none exists.

### getMimeType

    public String getMimeType()

  Get the MIME type of the content being processed, if it is known.

  Returns:
    the MIME type, or null if the type is not known.

### getProblems

    public Problems getProblems()

  Get an interface that can be used to record various problems, warnings, and errors that are not extreme enough to warrant throwing exceptions.

  Returns:
    the interface for recording problems; never null

### with

    public TextExtractorContext with(ClassLoaderFactory classLoaderFactory)

  Create a new execution context that mirrors this context but that uses the supplied `class loader factory`.

  Overrides:
    `with` in class `ExecutionContext`
  Parameters:
    `classLoaderFactory` - the new class loader factory implementation, or null if the default implementation should be used
  Returns:
    the execution context that is identical with this execution context, but which uses the supplied class loader factory implementation; never null
  See Also:
    `ExecutionContext.with(org.modeshape.common.component.ClassLoaderFactory)`

### with

    public TextExtractorContext with(Map<String,String> data)

  Create a new execution context that mirrors this context but that contains the supplied data. Note that the supplied map is always copied to ensure that it is immutable.

  Overrides:
    `with` in class `ExecutionContext`
  Parameters:
    `data` - the data that is to be affiliated with the resulting context or null if the resulting context should have no data
  Returns:
    the execution context that is identical with this execution context, but which uses the supplied data; never null
  See Also:
    `ExecutionContext.with(java.util.Map)`

### with

    public TextExtractorContext with(MimeTypeDetector mimeTypeDetector)

  Create a new execution context that is the same as this context, but which uses the supplied `MIME type detector`.

  Overrides:
    `with` in class `ExecutionContext`
  Parameters:
    `mimeTypeDetector` - the new MIME type detector implementation, or null if the context should use a `MimeTypeDetectors` instance with an `ExtensionBasedMimeTypeDetector`
  Returns:
    the execution context that is identical with this execution context, but which uses the supplied detector implementation; never null
  See Also:
    `ExecutionContext.with(org.modeshape.graph.mimetype.MimeTypeDetector)`

### with

    public TextExtractorContext with(NamespaceRegistry namespaceRegistry)

  Create a new execution context that mirrors this context but that uses the supplied namespace registry. The resulting context's `value factories` and `property factory` all make use of the new namespace registry.

  Overrides:
    `with` in class `ExecutionContext`
  Parameters:
    `namespaceRegistry` - the new namespace registry implementation, or null if the default implementation should be used
  Returns:
    the execution context that is identical with this execution context, but which uses the supplied registry; never null
  See Also:
    `ExecutionContext.with(org.modeshape.graph.property.NamespaceRegistry)`

### with

    public TextExtractorContext with(SecurityContext securityContext)

  Create an `ExecutionContext` that is the same as this context, but which uses the supplied `security context`.

  Overrides:
    `with` in class `ExecutionContext`
  Parameters:
    `securityContext` - the new security context to use; may be null
  Returns:
    the execution context that is identical with this execution context, but with a different security context; never null
  See Also:
    `ExecutionContext.with(org.modeshape.graph.SecurityContext)`

### with

    public TextExtractorContext with(String key,
                                     String value)

  Create a new execution context that mirrors this context but that contains the supplied key-value pair in the new context's data.

  Overrides:
    `with` in class `ExecutionContext`
  Parameters:
    `key` - the key for the new data that is to be affiliated with the resulting context
    `value` - the data value to be affiliated with the supplied key in the resulting context, or null if an existing data affiliated with the key should be removed in the resulting context
  Returns:
    the execution context that is identical with this execution context, but which uses the supplied data; never null
  See Also:
    `ExecutionContext.with(java.lang.String, java.lang.String)`

### with

    public TextExtractorContext with(String processId)

  Create a new execution context that mirrors this context but that contains the supplied process identifier.

  Overrides:
    `with` in class `ExecutionContext`
  Parameters:
    `processId` - the identifier of the process
  Returns:
    the execution context that is identical with this execution context, but which uses the supplied process identifier; never null
  See Also:
    `ExecutionContext.with(java.lang.String)`

Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

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