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 forRDFa11Extractorclass.- 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()voidtest0087()voidtestAttributeAlreadySpecified()voidtestBasicWithSyntaxErrors()voidtestBBCNewsScotland()voidtestExplicitDatatypeDeclaration()This test checks the behavior of the RDFa extraction where the datatype of a property is explicitly set.voidtestInvalidXMLCharacter()voidtestIssue227()voidtestIssue268And317()voidtestIssue271AndJavascriptParsing()voidtestIssue273()voidtestIssue326()voidtestObjectResourceConversion()This test verifies the correct object resource conversion.voidtestOpenGraphAlternateObjectTypes()Tests the correct support of alternate Open Graph Protocol Object TypesvoidtestOpenGraphStructuredProperties()Tests the correct support of Open Graph Protocol's Basic Metadata, Optional Metadata, Structured Properties and Arrays.voidtestRDFa10Extraction()Taken from the GoodRelations test cases.voidtestRDFa11Extraction()Taken from the GoodRelations test cases.voidtestRelRevSupport()This test verifies the correct REL/REV attribute usage.voidtestRelWithHref()Tests the correct behavior of REL and HREF.voidtestTolerantParsing()Tests that the default parser settings enable tolerance in data type parsing.voidtestVocabSupport()Tests the @vocab support.voidtestVocabWithoutTrailingSlash()-
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
-
-
-
-
Method Detail
-
testObjectResourceConversion
public void testObjectResourceConversion() throws org.eclipse.rdf4j.repository.RepositoryExceptionThis 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.RepositoryExceptionThis 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.RepositoryExceptionTests 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.RepositoryExceptionThis 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.RepositoryExceptionTests 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.RDFParseExceptionTaken 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 connectionIOException- if there is an error processing input dataorg.eclipse.rdf4j.rio.RDFHandlerException- if there is an error in theRDFHandlerorg.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.RDFParseExceptionTaken 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 connectionIOException- if there is an error processing input dataorg.eclipse.rdf4j.rio.RDFHandlerException- if there is an error in theRDFHandlerorg.eclipse.rdf4j.rio.RDFParseException- if there is an error parsing input RDF
-
testOpenGraphStructuredProperties
public void testOpenGraphStructuredProperties() throws IOException, ExtractionException, org.eclipse.rdf4j.repository.RepositoryExceptionTests 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 dataExtractionException- if there is an exception during extractionorg.eclipse.rdf4j.repository.RepositoryException- if an error is encountered whilst loading content from a storage connection
-
getExtractorFactory
protected ExtractorFactory<?> getExtractorFactory()
- Specified by:
getExtractorFactoryin classAbstractExtractorTestCase- Returns:
- the factory of the extractor to be tested.
-
testOpenGraphAlternateObjectTypes
public void testOpenGraphAlternateObjectTypes() throws IOException, ExtractionException, org.eclipse.rdf4j.repository.RepositoryExceptionTests the correct support of alternate Open Graph Protocol Object Types- Throws:
IOException- if there is an error processing the input dataExtractionException- if there is an exception during extractionorg.eclipse.rdf4j.repository.RepositoryException- if an error is encountered whilst loading content from a storage connection
-
-