Package org.apache.any23.extractor.microdata

## Class MicrodataExtractorTest

- java.lang.Object
- - org.apache.any23.AbstractAny23TestBase
  - - org.apache.any23.extractor.html.AbstractExtractorTestCase
    - - org.apache.any23.extractor.microdata.MicrodataExtractorTest

-     public class MicrodataExtractorTest
      extends AbstractExtractorTestCase

  Reference test class for `MicrodataExtractor`.
  Author:
    Davide Palmisano ( dpalmisano@gmail.com )

- - ### Nested Class Summary

    Nested Classes
    Modifier and Type | Class | Description
    --- | --- | ---
    `static class` | `MicrodataExtractorTest.TestRDFHandler` |

  - ### Field Summary

    - ### Fields inherited from class org.apache.any23.extractor.html.AbstractExtractorTestCase

      `baseIRI, conn`

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

      `tempDirectory, testFolder`

  - ### Constructor Summary

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

  - ### Method Summary

    All Methods Instance Methods Concrete Methods
    Modifier and Type | Method | Description
    --- | --- | ---
    `protected ExtractorFactory<?>` | `getExtractorFactory()` |
    `void` | `runOnlineTests()` |
    `void` | `testBadPropertyNames()` |
    `void` | `testBadTypes()` |
    `void` | `testExample2()` |
    `void` | `testExample5()` |
    `void` | `testExample5221()` | First reference test for Microdata Extraction algorithm.
    `void` | `testExample5222()` | Second reference test for Microdata Extraction algorithm.
    `void` | `testExampleSchemaOrg1()` | First reference test for http://schema.org/.
    `void` | `testExampleSchemaOrg2()` | Second reference test for http://schema.org/.
    `void` | `testMicrodataBasic()` |
    `void` | `testMicrodataGoogleRichSnippet()` | Reference test as provided by Google Rich Snippet for Microdata.
    `void` | `testMicrodataMissingScheme()` |
    `void` | `testMicrodataNestedUrlResolving()` |
    `void` | `testSchemaOrgNestedProps()` | Reference test for Schema.org.
    `void` | `testTel()` |
    `void` | `testUnusedItemprop()` |

    - ### Methods inherited from class org.apache.any23.extractor.html.AbstractExtractorTestCase

      `assertContains, assertContains, assertContains, assertContains, assertContains, assertContains, assertContainsModel, assertContainsModel, assertExtract, assertExtract, assertIssue, assertModelEmpty, assertModelNotEmpty, assertNoIssues, assertNotContains, assertNotContains, assertNotContains, assertNotContains, assertNotFound, assertStatementsSize, assertStatementsSize, assertStatementsSize, dumpAsListOfStatements, dumpHumanReadableTriples, dumpModelToNQuads, dumpModelToRDFXML, dumpModelToTurtle, extract, findExactlyOneBlankSubject, findExactlyOneObject, findObject, findObjectAsLiteral, findObjectAsResource, findObjects, findSubjects, getConnection, getIssues, getIssues, getReport, getStatements, getStatementsSize, setUp, tearDown`

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

      `copyResourceToTempFile, getDocumentSourceFromResource, getDocumentSourceFromResource`

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

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

- - ### Constructor Detail

    - #### MicrodataExtractorTest

          public MicrodataExtractorTest()

  - ### Method Detail

    - #### getExtractorFactory

          protected ExtractorFactory<?> getExtractorFactory()

      Specified by:
        `getExtractorFactory` in class `AbstractExtractorTestCase`
      Returns:
        the factory of the extractor to be tested.

    - #### testSchemaOrgNestedProps

          public void testSchemaOrgNestedProps()
                                        throws org.eclipse.rdf4j.repository.RepositoryException,
                                               org.eclipse.rdf4j.rio.RDFHandlerException,
                                               IOException,
                                               org.eclipse.rdf4j.rio.RDFParseException,
                                               ExtractionException

      Reference test for Schema.org.
      Throws:
        `ExtractionException` - if an exception is raised during extraction
        `org.eclipse.rdf4j.repository.RepositoryException` - if an error is encountered whilst loading content from a storage connection
        `org.eclipse.rdf4j.rio.RDFHandlerException` - if there is an error in the `RDFHandler` implementation
        `IOException` - if there is an error loading input data
        `org.eclipse.rdf4j.rio.RDFParseException` - if there is an error parsing an actual RDF stream

    - #### testUnusedItemprop

          public void testUnusedItemprop()

    - #### testExample2

          public void testExample2()

    - #### testExample5

          public void testExample5()

    - #### runOnlineTests

          public void runOnlineTests()
                              throws Exception

      Throws:
        `Exception`

    - #### testMicrodataBasic

          public void testMicrodataBasic()

    - #### testMicrodataMissingScheme

          public void testMicrodataMissingScheme()

    - #### testMicrodataGoogleRichSnippet

          public void testMicrodataGoogleRichSnippet()
                                              throws org.eclipse.rdf4j.rio.RDFHandlerException,
                                                     org.eclipse.rdf4j.repository.RepositoryException,
                                                     IOException,
                                                     org.eclipse.rdf4j.rio.RDFParseException

      Reference test as provided by Google Rich Snippet for Microdata.
      Throws:
        `org.eclipse.rdf4j.repository.RepositoryException` - if an error is encountered whilst loading content from a storage connection
        `org.eclipse.rdf4j.rio.RDFHandlerException` - if there is an error in the `RDFHandler` implementation
        `IOException` - if there is an error loading input data
        `org.eclipse.rdf4j.rio.RDFParseException` - if there is an error parsing an actual RDF stream

    - #### testExample5221

          public void testExample5221()
                               throws org.eclipse.rdf4j.rio.RDFHandlerException,
                                      org.eclipse.rdf4j.repository.RepositoryException,
                                      IOException,
                                      org.eclipse.rdf4j.rio.RDFParseException

      First reference test for Microdata Extraction algorithm.
      Throws:
        `org.eclipse.rdf4j.repository.RepositoryException` - if an error is encountered whilst loading content from a storage connection
        `org.eclipse.rdf4j.rio.RDFHandlerException` - if there is an error in the `RDFHandler` implementation
        `IOException` - if there is an error loading input data
        `org.eclipse.rdf4j.rio.RDFParseException` - if there is an error parsing an actual RDF stream

    - #### testExample5222

          public void testExample5222()
                               throws org.eclipse.rdf4j.rio.RDFHandlerException,
                                      org.eclipse.rdf4j.repository.RepositoryException,
                                      IOException,
                                      org.eclipse.rdf4j.rio.RDFParseException

      Second reference test for Microdata Extraction algorithm.
      Throws:
        `org.eclipse.rdf4j.repository.RepositoryException` - if an error is encountered whilst loading content from a storage connection
        `org.eclipse.rdf4j.rio.RDFHandlerException` - if there is an error in the `RDFHandler` implementation
        `IOException` - if there is an error loading input data
        `org.eclipse.rdf4j.rio.RDFParseException` - if there is an error parsing an actual RDF stream

    - #### testExampleSchemaOrg1

          public void testExampleSchemaOrg1()
                                     throws org.eclipse.rdf4j.rio.RDFHandlerException,
                                            org.eclipse.rdf4j.repository.RepositoryException,
                                            IOException,
                                            org.eclipse.rdf4j.rio.RDFParseException

      First reference test for http://schema.org/.
      Throws:
        `org.eclipse.rdf4j.repository.RepositoryException` - if an error is encountered whilst loading content from a storage connection
        `org.eclipse.rdf4j.rio.RDFHandlerException` - if there is an error in the `RDFHandler` implementation
        `IOException` - if there is an error loading input data
        `org.eclipse.rdf4j.rio.RDFParseException` - if there is an error parsing an actual RDF stream

    - #### testExampleSchemaOrg2

          public void testExampleSchemaOrg2()
                                     throws org.eclipse.rdf4j.rio.RDFHandlerException,
                                            org.eclipse.rdf4j.repository.RepositoryException,
                                            IOException,
                                            org.eclipse.rdf4j.rio.RDFParseException

      Second reference test for http://schema.org/.
      Throws:
        `org.eclipse.rdf4j.repository.RepositoryException` - if an error is encountered whilst loading content from a storage connection
        `org.eclipse.rdf4j.rio.RDFHandlerException` - if there is an error in the `RDFHandler` implementation
        `IOException` - if there is an error loading input data
        `org.eclipse.rdf4j.rio.RDFParseException` - if there is an error parsing an actual RDF stream

    - #### testMicrodataNestedUrlResolving

          public void testMicrodataNestedUrlResolving()
                                               throws IOException

      Throws:
        `IOException`

    - #### testTel

          public void testTel()

    - #### testBadTypes

          public void testBadTypes()
                            throws IOException

      Throws:
        `IOException`

    - #### testBadPropertyNames

          public void testBadPropertyNames()
                                    throws IOException

      Throws:
        `IOException`