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 forMicrodataExtractor.- Author:
- Davide Palmisano ( dpalmisano@gmail.com )
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classMicrodataExtractorTest.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()voidrunOnlineTests()voidtestBadPropertyNames()voidtestBadTypes()voidtestExample2()voidtestExample5()voidtestExample5221()First reference test for Microdata Extraction algorithm.voidtestExample5222()Second reference test for Microdata Extraction algorithm.voidtestExampleSchemaOrg1()First reference test for http://schema.org/.voidtestExampleSchemaOrg2()Second reference test for http://schema.org/.voidtestMicrodataBasic()voidtestMicrodataGoogleRichSnippet()Reference test as provided by Google Rich Snippet for Microdata.voidtestMicrodataMissingScheme()voidtestMicrodataNestedUrlResolving()voidtestSchemaOrgNestedProps()Reference test for Schema.org.voidtestTel()voidtestUnusedItemprop()-
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
-
getExtractorFactory
protected ExtractorFactory<?> getExtractorFactory()
- Specified by:
getExtractorFactoryin classAbstractExtractorTestCase- 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, ExtractionExceptionReference test for Schema.org.- Throws:
ExtractionException- if an exception is raised during extractionorg.eclipse.rdf4j.repository.RepositoryException- if an error is encountered whilst loading content from a storage connectionorg.eclipse.rdf4j.rio.RDFHandlerException- if there is an error in theRDFHandlerimplementationIOException- if there is an error loading input dataorg.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()
-
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.RDFParseExceptionReference 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 connectionorg.eclipse.rdf4j.rio.RDFHandlerException- if there is an error in theRDFHandlerimplementationIOException- if there is an error loading input dataorg.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.RDFParseExceptionFirst reference test for Microdata Extraction algorithm.- Throws:
org.eclipse.rdf4j.repository.RepositoryException- if an error is encountered whilst loading content from a storage connectionorg.eclipse.rdf4j.rio.RDFHandlerException- if there is an error in theRDFHandlerimplementationIOException- if there is an error loading input dataorg.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.RDFParseExceptionSecond reference test for Microdata Extraction algorithm.- Throws:
org.eclipse.rdf4j.repository.RepositoryException- if an error is encountered whilst loading content from a storage connectionorg.eclipse.rdf4j.rio.RDFHandlerException- if there is an error in theRDFHandlerimplementationIOException- if there is an error loading input dataorg.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.RDFParseExceptionFirst reference test for http://schema.org/.- Throws:
org.eclipse.rdf4j.repository.RepositoryException- if an error is encountered whilst loading content from a storage connectionorg.eclipse.rdf4j.rio.RDFHandlerException- if there is an error in theRDFHandlerimplementationIOException- if there is an error loading input dataorg.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.RDFParseExceptionSecond reference test for http://schema.org/.- Throws:
org.eclipse.rdf4j.repository.RepositoryException- if an error is encountered whilst loading content from a storage connectionorg.eclipse.rdf4j.rio.RDFHandlerException- if there is an error in theRDFHandlerimplementationIOException- if there is an error loading input dataorg.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
-
-