Package org.apache.any23.extractor.rdfa

## Class RDFa11ExtractorTest

- java.lang.Object
- - org.apache.any23.AbstractAny23TestBase
  - - org.apache.any23.extractor.html.AbstractExtractorTestCase
    - - org.apache.any23.extractor.rdfa.AbstractRDFaExtractorTestCase
      - - org.apache.any23.extractor.rdfa.RDFa11ExtractorTest

-     public class RDFa11ExtractorTest
      extends AbstractRDFaExtractorTestCase

  Reference test class for `RDFa11Extractor` class.
  Author:
    Michele Mostarda (mostarda@fbk.eu)

- - ### Field Summary

    - ### Fields inherited from class org.apache.any23.extractor.rdfa.AbstractRDFaExtractorTestCase

      `vDCTERMS, vFOAF`

    - ### 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
    --- | ---
    `RDFa11ExtractorTest()` |

  - ### Method Summary

    All Methods Instance Methods Concrete Methods
    Modifier and Type | Method | Description
    --- | --- | ---
    `protected ExtractorFactory<?>` | `getExtractorFactory()` |
    `void` | `test0087()` |
    `void` | `testAttributeAlreadySpecified()` |
    `void` | `testBasicWithSyntaxErrors()` |
    `void` | `testBBCNewsScotland()` |
    `void` | `testExplicitDatatypeDeclaration()` | This test checks the behavior of the RDFa extraction where the datatype of a property is explicitly set.
    `void` | `testInvalidXMLCharacter()` |
    `void` | `testIssue227()` |
    `void` | `testIssue268And317()` |
    `void` | `testIssue271AndJavascriptParsing()` |
    `void` | `testIssue273()` |
    `void` | `testIssue326()` |
    `void` | `testObjectResourceConversion()` | This test verifies the correct object resource conversion.
    `void` | `testOpenGraphAlternateObjectTypes()` | Tests the correct support of alternate Open Graph Protocol Object Types
    `void` | `testOpenGraphStructuredProperties()` | Tests the correct support of Open Graph Protocol's Basic Metadata, Optional Metadata, Structured Properties and Arrays.
    `void` | `testRDFa10Extraction()` | Taken from the GoodRelations test cases.
    `void` | `testRDFa11Extraction()` | Taken from the GoodRelations test cases.
    `void` | `testRelRevSupport()` | This test verifies the correct REL/REV attribute usage.
    `void` | `testRelWithHref()` | Tests the correct behavior of REL and HREF.
    `void` | `testTolerantParsing()` | Tests that the default parser settings enable tolerance in data type parsing.
    `void` | `testVocabSupport()` | Tests the @vocab support.
    `void` | `testVocabWithoutTrailingSlash()` |

    - ### Methods inherited from class org.apache.any23.extractor.rdfa.AbstractRDFaExtractorTestCase

      `testBasic, testDrupalTestPage, testEmptyDatatypeDeclarationWithInnerXMLTags, testIncompleteTripleManagement, testRDFa11CURIEs`

    - ### 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

    - #### RDFa11ExtractorTest

          public RDFa11ExtractorTest()

  - ### Method Detail

    - #### testObjectResourceConversion

          public void testObjectResourceConversion()
                                            throws org.eclipse.rdf4j.repository.RepositoryException

      This test verifies the correct object resource conversion.
      Throws:
        `org.eclipse.rdf4j.repository.RepositoryException` - if an error is encountered whilst loading content from a storage connection

    - #### testBBCNewsScotland

          public void testBBCNewsScotland()

    - #### testInvalidXMLCharacter

          public void testInvalidXMLCharacter()

    - #### testAttributeAlreadySpecified

          public void testAttributeAlreadySpecified()

    - #### test0087

          public void test0087()

    - #### testBasicWithSyntaxErrors

          public void testBasicWithSyntaxErrors()

    - #### testIssue326

          public void testIssue326()

    - #### testIssue227

          public void testIssue227()

    - #### testIssue271AndJavascriptParsing

          public void testIssue271AndJavascriptParsing()

    - #### testIssue273

          public void testIssue273()

    - #### testIssue268And317

          public void testIssue268And317()

    - #### testExplicitDatatypeDeclaration

          public void testExplicitDatatypeDeclaration()
                                               throws org.eclipse.rdf4j.repository.RepositoryException

      This test checks the behavior of the RDFa extraction where the datatype of a property is explicitly set. For details see the RDFa in XHTML: Syntax and Processing recommendation.
      Throws:
        `org.eclipse.rdf4j.repository.RepositoryException` - if an error is encountered whilst loading content from a storage connection

    - #### testRelWithHref

          public void testRelWithHref()
                               throws org.eclipse.rdf4j.repository.RepositoryException

      Tests the correct behavior of REL and HREF.
      Throws:
        `org.eclipse.rdf4j.repository.RepositoryException` - if an error is encountered whilst loading content from a storage connection

    - #### testRelRevSupport

          public void testRelRevSupport()
                                 throws org.eclipse.rdf4j.repository.RepositoryException

      This test verifies the correct REL/REV attribute usage.
      Throws:
        `org.eclipse.rdf4j.repository.RepositoryException` - if an error is encountered whilst loading content from a storage connection

    - #### testVocabSupport

          public void testVocabSupport()
                                throws org.eclipse.rdf4j.repository.RepositoryException

      Tests the @vocab support.
      Throws:
        `org.eclipse.rdf4j.repository.RepositoryException` - if an error is encountered whilst loading content from a storage connection

    - #### testVocabWithoutTrailingSlash

          public void testVocabWithoutTrailingSlash()

    - #### testTolerantParsing

          public void testTolerantParsing()

      Tests that the default parser settings enable tolerance in data type parsing.

    - #### testRDFa10Extraction

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

      Taken from the GoodRelations test cases. It checks if the extraction is the same when the namespaces are defined in RDFa1.0.
      Throws:
        `org.eclipse.rdf4j.repository.RepositoryException` - if an error is encountered whilst loading content from a storage connection
        `IOException` - if there is an error processing input data
        `org.eclipse.rdf4j.rio.RDFHandlerException` - if there is an error in the `RDFHandler`
        `org.eclipse.rdf4j.rio.RDFParseException` - if there is an error parsing input RDF

    - #### testRDFa11Extraction

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

      Taken from the GoodRelations test cases. It checks if the extraction is the same when the namespaces are defined in RDFa1.1.
      Throws:
        `org.eclipse.rdf4j.repository.RepositoryException` - if an error is encountered whilst loading content from a storage connection
        `IOException` - if there is an error processing input data
        `org.eclipse.rdf4j.rio.RDFHandlerException` - if there is an error in the `RDFHandler`
        `org.eclipse.rdf4j.rio.RDFParseException` - if there is an error parsing input RDF

    - #### testOpenGraphStructuredProperties

          public void testOpenGraphStructuredProperties()
                                                 throws IOException,
                                                        ExtractionException,
                                                        org.eclipse.rdf4j.repository.RepositoryException

      Tests the correct support of Open Graph Protocol's Basic Metadata, Optional Metadata, Structured Properties and Arrays.
      Throws:
        `IOException` - if there is an error processing the input data
        `ExtractionException` - if there is an exception during extraction
        `org.eclipse.rdf4j.repository.RepositoryException` - if an error is encountered whilst loading content from a storage connection

    - #### getExtractorFactory

          protected ExtractorFactory<?> getExtractorFactory()

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

    - #### testOpenGraphAlternateObjectTypes

          public void testOpenGraphAlternateObjectTypes()
                                                 throws IOException,
                                                        ExtractionException,
                                                        org.eclipse.rdf4j.repository.RepositoryException

      Tests the correct support of alternate Open Graph Protocol Object Types
      Throws:
        `IOException` - if there is an error processing the input data
        `ExtractionException` - if there is an exception during extraction
        `org.eclipse.rdf4j.repository.RepositoryException` - if an error is encountered whilst loading content from a storage connection