Package org.apache.any23

## Class Any23Test

- java.lang.Object
- - org.apache.any23.AbstractAny23TestBase
  - - org.apache.any23.Any23OnlineTestBase
    - - org.apache.any23.Any23Test

-     public class Any23Test
      extends Any23OnlineTestBase

  Test case for `Any23` facade.
  Author:
    Davide Palmisano ( dpalmisano@gmail.com ), Michele Mostarda ( michele.mostarda@gmail.com )

- - ### Field Summary

    - ### Fields inherited from class org.apache.any23.Any23OnlineTestBase

      `ONLINE_TEST_DISABLED_FLAG`

    - ### Fields inherited from class org.apache.any23.AbstractAny23TestBase

      `tempDirectory, testFolder`

  - ### Constructor Summary

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

  - ### Method Summary

    All Methods Instance Methods Concrete Methods
    Modifier and Type | Method | Description
    --- | --- | ---
    `void` | `testAbstractMethodErrorIssue186_1()` |
    `void` | `testAbstractMethodErrorIssue186_2()` |
    `void` | `testBlankNodesViaURL()` |
    `void` | `testDemoCodeSnippet1()` | Tests out the first code snipped used in Developer Manual.
    `void` | `testDemoCodeSnippet2()` | Tests out the second code snipped used in Developer Manual.
    `void` | `testExceptionPropagation()` |
    `void` | `testExplicitEncoding()` | This tests the behavior of Any23 to execute the extraction explicitly specifying the charset encoding of the input.
    `void` | `testExtractionParameters()` |
    `void` | `testExtractionParametersWithNestingDisabled()` |
    `void` | `testGZippedContent()` | This test checks if a URL that is supposed to be GZIPPED is correctly opened and parsed with the `Any23` facade.
    `void` | `testHTMLBruteForceDetection()` |
    `void` | `testImplicitEncoding()` | This tests the behavior of Any23 to perform the extraction without passing it any charset encoding.
    `void` | `testIssue415InvalidNTriples()` |
    `void` | `testIssue415ValidNTriples()` |
    `void` | `testMicrodataSupport()` |
    `void` | `testModifiableConfiguration_issue183()` |
    `void` | `testN3Detection1()` |
    `void` | `testN3Detection2()` |
    `void` | `testNTriplesDetectionAndExtraction()` |
    `void` | `testNturtleDetectionAndExtraction()` |
    `void` | `testProgrammaticExtraction()` | This test checks the extraction behavior when the library is used programatically.
    `void` | `testRDFXMLDetectionAndExtraction()` |
    `void` | `testTTLDetection()` |
    `void` | `testXMLMimeTypeManagement()` | Test correct management of general XML content.
    `void` | `testXMLMimeTypeManagementViaURL()` | Test correct management of general XML content from URL source.

    - ### Methods inherited from class org.apache.any23.Any23OnlineTestBase

      `assumeOnlineAllowed`

    - ### Methods inherited from class org.apache.any23.AbstractAny23TestBase

      `copyResourceToTempFile, getDocumentSourceFromResource, getDocumentSourceFromResource, setUp`

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

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

- - ### Constructor Detail

    - #### Any23Test

          public Any23Test()

  - ### Method Detail

    - #### testTTLDetection

          public void testTTLDetection()
                                throws Exception

      Throws:
        `Exception`

    - #### testN3Detection1

          public void testN3Detection1()
                                throws Exception

      Throws:
        `Exception`

    - #### testN3Detection2

          public void testN3Detection2()
                                throws Exception

      Throws:
        `Exception`

    - #### testHTMLBruteForceDetection

          public void testHTMLBruteForceDetection()
                                           throws Exception

      Throws:
        `Exception`

    - #### testExplicitEncoding

          public void testExplicitEncoding()
                                    throws Exception

      This tests the behavior of Any23 to execute the extraction explicitly specifying the charset encoding of the input.
      Throws:
        `Exception` - if there is an error reading the input

    - #### testImplicitEncoding

          public void testImplicitEncoding()
                                    throws Exception

      This tests the behavior of Any23 to perform the extraction without passing it any charset encoding. The encoding is therefore guessed using `TikaEncodingDetector` class.
      Throws:
        `Exception` - if there is an error reading the input

    - #### testRDFXMLDetectionAndExtraction

          public void testRDFXMLDetectionAndExtraction()
                                                throws Exception

      Throws:
        `Exception`

    - #### testNTriplesDetectionAndExtraction

          public void testNTriplesDetectionAndExtraction()
                                                  throws Exception

      Throws:
        `Exception`

    - #### testNturtleDetectionAndExtraction

          public void testNturtleDetectionAndExtraction()
                                                 throws Exception

      Throws:
        `Exception`

    - #### testDemoCodeSnippet1

          public void testDemoCodeSnippet1()
                                    throws Exception

      Tests out the first code snipped used in Developer Manual.
      Throws:
        `Exception` - if there is an error reading the input

    - #### testDemoCodeSnippet2

          public void testDemoCodeSnippet2()
                                    throws Exception

      Tests out the second code snipped used in Developer Manual.
      Throws:
        `Exception` - if there is an error reading the input

    - #### testProgrammaticExtraction

          public void testProgrammaticExtraction()
                                          throws ExtractionException,
                                                 IOException,
                                                 URISyntaxException

      This test checks the extraction behavior when the library is used programatically. This test is related to the issue #45, to verify the different behaviors between Maven and Ant. The behavior was related to a 2nd-level dependency introduced by Maven.
      Throws:
        `ExtractionException` - if there is an error running extraction logic
        `IOException` - if there is an error reading the input
        `URISyntaxException` - if there is an error defining input URI's

    - #### testGZippedContent

          public void testGZippedContent()
                                  throws IOException,
                                         URISyntaxException,
                                         ExtractionException

      This test checks if a URL that is supposed to be GZIPPED is correctly opened and parsed with the `Any23` facade.
      Throws:
        `ExtractionException` - if there is an error running extraction logic
        `IOException` - if there is an error reading the input
        `URISyntaxException` - if there is an error defining input URI's

    - #### testExtractionParameters

          public void testExtractionParameters()
                                        throws IOException,
                                               ExtractionException,
                                               TripleHandlerException

      Throws:
        `IOException`
        `ExtractionException`
        `TripleHandlerException`

    - #### testExtractionParametersWithNestingDisabled

          public void testExtractionParametersWithNestingDisabled()
                                                           throws IOException,
                                                                  ExtractionException,
                                                                  TripleHandlerException

      Throws:
        `IOException`
        `ExtractionException`
        `TripleHandlerException`

    - #### testExceptionPropagation

          public void testExceptionPropagation()
                                        throws IOException

      Throws:
        `IOException`

    - #### testXMLMimeTypeManagement

          public void testXMLMimeTypeManagement()
                                         throws IOException,
                                                ExtractionException

      Test correct management of general XML content.
      Throws:
        `ExtractionException` - if there is an error running extraction logic
        `IOException` - if there is an error reading the input

    - #### testXMLMimeTypeManagementViaURL

          public void testXMLMimeTypeManagementViaURL()
                                               throws IOException,
                                                      ExtractionException

      Test correct management of general XML content from URL source.
      Throws:
        `ExtractionException` - if there is an error running extraction logic
        `IOException` - if there is an error reading the input

    - #### testBlankNodesViaURL

          public void testBlankNodesViaURL()
                                    throws IOException,
                                           ExtractionException

      Throws:
        `IOException`
        `ExtractionException`

    - #### testMicrodataSupport

          public void testMicrodataSupport()
                                    throws Exception

      Throws:
        `Exception`

    - #### testAbstractMethodErrorIssue186_1

          public void testAbstractMethodErrorIssue186_1()
                                                 throws IOException,
                                                        ExtractionException

      Throws:
        `IOException`
        `ExtractionException`

    - #### testAbstractMethodErrorIssue186_2

          public void testAbstractMethodErrorIssue186_2()
                                                 throws IOException,
                                                        ExtractionException

      Throws:
        `IOException`
        `ExtractionException`

    - #### testModifiableConfiguration_issue183

          public void testModifiableConfiguration_issue183()
                                                    throws Exception

      Throws:
        `Exception`

    - #### testIssue415InvalidNTriples

          public void testIssue415InvalidNTriples()
                                           throws Exception

      Throws:
        `Exception`

    - #### testIssue415ValidNTriples

          public void testIssue415ValidNTriples()
                                         throws Exception

      Throws:
        `Exception`