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.apache.any23.extractor
Interface ExtractionResult

All Superinterfaces:
  ErrorReporter

All Known Subinterfaces:
  TagSoupExtractionResult

All Known Implementing Classes:
  ExtractionResultImpl

    public interface ExtractionResult

extends ErrorReporter

Interface defining the methods that a representation of an extraction result must have.

Nested Class Summary

Nested classes/interfaces inherited from interface org.apache.any23.extractor.ErrorReporter
`ErrorReporter.Error, ErrorReporter.ErrorLevel`

Method Summary
`void` | `close()` Close the result.
`ExtractionResult` | `openSubResult(ExtractionContext extractionContext)` Open a result nested in the current one.
`void` | `writeNamespace(String prefix, String uri)` Write a namespace.
`void` | `writeTriple(org.openrdf.model.Resource s, org.openrdf.model.URI p, org.openrdf.model.Value o)` Write a triple.
`void` | `writeTriple(org.openrdf.model.Resource s, org.openrdf.model.URI p, org.openrdf.model.Value o, org.openrdf.model.URI g)` Writes a triple.

Methods inherited from interface org.apache.any23.extractor.ErrorReporter
`getErrors, notifyError, printErrorsReport`

Method Detail

### writeTriple

    void writeTriple(org.openrdf.model.Resource s,
                     org.openrdf.model.URI p,
                     org.openrdf.model.Value o,
                     org.openrdf.model.URI g)

  Writes a triple. Parameters can be null, then the triple will be silently ignored.

  Parameters:
    `s` - subject
    `p` - predicate
    `o` - object
    `g` - graph

### writeTriple

    void writeTriple(org.openrdf.model.Resource s,
                     org.openrdf.model.URI p,
                     org.openrdf.model.Value o)

  Write a triple. Parameters can be null, then the triple will be silently ignored.

  Parameters:
    `s` - subject
    `p` - predicate
    `o` - object

### writeNamespace

    void writeNamespace(String prefix,
                        String uri)

  Write a namespace.

  Parameters:
    `prefix` - the prefix of the namespace
    `uri` - the long URI identifying the namespace

### close

    void close()

  Close the result.

  Extractors should close their results as soon as possible, but don't have to, the environment will close any remaining ones. Implementations should be robust against multiple close() invocations.

### openSubResult

    ExtractionResult openSubResult(ExtractionContext extractionContext)

  Open a result nested in the current one.

  Parameters:
    `extractionContext` - the context to be used to open the sub result.
  Returns:
    the instance of the nested extraction result.

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 © 2010-2012 The Apache Software Foundation. All Rights Reserved.