Package org.apache.any23.extractor

## Class MockTripleHandler

- java.lang.Object
- - org.apache.any23.extractor.MockTripleHandler

- All Implemented Interfaces:
    `AutoCloseable`, `TripleHandler`

      public class MockTripleHandler
      extends Object
      implements TripleHandler

  Just a mockup implementing a `TripleHandler`. Used only for test purposes.

- - ### Constructor Summary

    Constructors
    Constructor | Description
    --- | ---
    `MockTripleHandler()` |

  - ### Method Summary

    All Methods Instance Methods Concrete Methods
    Modifier and Type | Method | Description
    --- | --- | ---
    `void` | `close()` |
    `void` | `closeContext​(ExtractionContext context)` |
    `void` | `endDocument​(org.eclipse.rdf4j.model.IRI documentIRI)` |
    `void` | `expectClose()` |
    `void` | `expectCloseContext​(String extractorName, org.eclipse.rdf4j.model.IRI documentIRI, String localID)` |
    `void` | `expectEndDocument​(org.eclipse.rdf4j.model.IRI documentIRI)` |
    `void` | `expectNamespace​(String prefix, String uri, String extractorName, org.eclipse.rdf4j.model.IRI documentIRI, String localID)` |
    `void` | `expectOpenContext​(String extractorName, org.eclipse.rdf4j.model.IRI documentIRI, String localID)` |
    `void` | `expectSetContentLength​(long contentLength)` |
    `void` | `expectStartDocument​(org.eclipse.rdf4j.model.IRI documentIRI)` |
    `void` | `expectTriple​(org.eclipse.rdf4j.model.Resource s, org.eclipse.rdf4j.model.IRI p, org.eclipse.rdf4j.model.Value o, org.eclipse.rdf4j.model.IRI g, String extractorName, org.eclipse.rdf4j.model.IRI documentIRI, String localID)` |
    `void` | `openContext​(ExtractionContext context)` |
    `void` | `receiveNamespace​(String prefix, String uri, ExtractionContext context)` |
    `void` | `receiveTriple​(org.eclipse.rdf4j.model.Resource s, org.eclipse.rdf4j.model.IRI p, org.eclipse.rdf4j.model.Value o, org.eclipse.rdf4j.model.IRI g, ExtractionContext context)` |
    `void` | `setContentLength​(long contentLength)` |
    `void` | `startDocument​(org.eclipse.rdf4j.model.IRI documentIRI)` |
    `void` | `verify()` |

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

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

- - ### Constructor Detail

    - #### MockTripleHandler

          public MockTripleHandler()

  - ### Method Detail

    - #### expectStartDocument

          public void expectStartDocument​(org.eclipse.rdf4j.model.IRI documentIRI)

    - #### expectEndDocument

          public void expectEndDocument​(org.eclipse.rdf4j.model.IRI documentIRI)

    - #### expectSetContentLength

          public void expectSetContentLength​(long contentLength)

    - #### expectClose

          public void expectClose()

    - #### expectOpenContext

          public void expectOpenContext​(String extractorName,
                                        org.eclipse.rdf4j.model.IRI documentIRI,
                                        String localID)

    - #### expectCloseContext

          public void expectCloseContext​(String extractorName,
                                         org.eclipse.rdf4j.model.IRI documentIRI,
                                         String localID)

    - #### expectTriple

          public void expectTriple​(org.eclipse.rdf4j.model.Resource s,
                                   org.eclipse.rdf4j.model.IRI p,
                                   org.eclipse.rdf4j.model.Value o,
                                   org.eclipse.rdf4j.model.IRI g,
                                   String extractorName,
                                   org.eclipse.rdf4j.model.IRI documentIRI,
                                   String localID)

    - #### expectNamespace

          public void expectNamespace​(String prefix,
                                      String uri,
                                      String extractorName,
                                      org.eclipse.rdf4j.model.IRI documentIRI,
                                      String localID)

    - #### verify

          public void verify()

    - #### startDocument

          public void startDocument​(org.eclipse.rdf4j.model.IRI documentIRI)

      Specified by:
        `startDocument` in interface `TripleHandler`

    - #### endDocument

          public void endDocument​(org.eclipse.rdf4j.model.IRI documentIRI)

      Specified by:
        `endDocument` in interface `TripleHandler`

    - #### openContext

          public void openContext​(ExtractionContext context)

      Specified by:
        `openContext` in interface `TripleHandler`

    - #### closeContext

          public void closeContext​(ExtractionContext context)

      Specified by:
        `closeContext` in interface `TripleHandler`

    - #### receiveTriple

          public void receiveTriple​(org.eclipse.rdf4j.model.Resource s,
                                    org.eclipse.rdf4j.model.IRI p,
                                    org.eclipse.rdf4j.model.Value o,
                                    org.eclipse.rdf4j.model.IRI g,
                                    ExtractionContext context)

      Specified by:
        `receiveTriple` in interface `TripleHandler`

    - #### receiveNamespace

          public void receiveNamespace​(String prefix,
                                       String uri,
                                       ExtractionContext context)

      Specified by:
        `receiveNamespace` in interface `TripleHandler`

    - #### close

          public void close()

      Specified by:
        `close` in interface `AutoCloseable`
      Specified by:
        `close` in interface `TripleHandler`

    - #### setContentLength

          public void setContentLength​(long contentLength)

      Specified by:
        `setContentLength` in interface `TripleHandler`