Package org.apache.any23.extractor
Class SingleDocumentExtractionTest
- java.lang.Object
-
- org.apache.any23.AbstractAny23TestBase
-
- org.apache.any23.extractor.SingleDocumentExtractionTest
-
public class SingleDocumentExtractionTest extends AbstractAny23TestBase
Test case forSingleDocumentExtraction.- Author:
- Michele Mostarda (mostarda@fbk.eu), Davide Palmisano (palmisano@fbk.eu)
-
-
Field Summary
-
Fields inherited from class org.apache.any23.AbstractAny23TestBase
tempDirectory, testFolder
-
-
Constructor Summary
Constructors Constructor Description SingleDocumentExtractionTest()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidsetUp()voidtearDown()voidtestMicroformatDomains()Tests the existence of the domain triples.voidtestNestedMicroformats()Tests the nested microformat relationships.voidtestNestedMicroformatsInduced()Tests the nested microformat relationships.voidtestNestedMicroformatsManaged()Tests the nested microformat relationships.voidtestNestedVCardAdr()This test assess the absence ofSINDICEnesting relationship, sinceHCardExtractordeclared a native nesting with theAdrExtractor.-
Methods inherited from class org.apache.any23.AbstractAny23TestBase
copyResourceToTempFile, getDocumentSourceFromResource, getDocumentSourceFromResource
-
-
-
-
Method Detail
-
setUp
public void setUp() throws Exception- Overrides:
setUpin classAbstractAny23TestBase- Throws:
Exception
-
tearDown
public void tearDown() throws org.eclipse.rdf4j.sail.SailException, org.eclipse.rdf4j.repository.RepositoryException, TripleHandlerException- Throws:
org.eclipse.rdf4j.sail.SailExceptionorg.eclipse.rdf4j.repository.RepositoryExceptionTripleHandlerException
-
testMicroformatDomains
public void testMicroformatDomains() throws IOException, ExtractionException, org.eclipse.rdf4j.repository.RepositoryExceptionTests the existence of the domain triples.- Throws:
IOException- if there is an error loading input dataExtractionException- if an exception is raised during extractionorg.eclipse.rdf4j.repository.RepositoryException- if an error is encountered whilst loading content from a storage connection
-
testNestedMicroformats
public void testNestedMicroformats() throws IOException, ExtractionException, org.eclipse.rdf4j.repository.RepositoryExceptionTests the nested microformat relationships. This test verifies the first supported approach for microformat nesting. Such approach foreseen to add a microformat HTML node within the property of a container microformat. For further details seeSingleDocumentExtractionconsolidateResources(java.util.List, java.util.List, org.apache.any23.writer.TripleHandler)}- Throws:
IOException- if there is an error loading input dataExtractionException- if an exception is raised during extractionorg.eclipse.rdf4j.repository.RepositoryException- if an error is encountered whilst loading content from a storage connection
-
testNestedVCardAdr
public void testNestedVCardAdr() throws IOException, ExtractionException, org.eclipse.rdf4j.repository.RepositoryExceptionThis test assess the absence ofSINDICEnesting relationship, sinceHCardExtractordeclared a native nesting with theAdrExtractor.- Throws:
IOException- if there is an error loading input dataExtractionException- if an exception is raised during extractionorg.eclipse.rdf4j.repository.RepositoryException- if an error is encountered whilst loading content from a storage connection- See Also:
Includes
-
testNestedMicroformatsInduced
public void testNestedMicroformatsInduced() throws IOException, ExtractionException, org.eclipse.rdf4j.repository.RepositoryExceptionTests the nested microformat relationships. This test verifies the second supported approach for microformat nesting. Such approach foreseen to use the same node attributes to declare both a microformat container property and a nested microformat root class. For further details seeSingleDocumentExtractionconsolidateResources(java.util.List, java.util.List, org.apache.any23.writer.TripleHandler)} See also the Nested Entities article that is linked by the official microformats.org doc page.- Throws:
IOException- if there is an error loading input dataExtractionException- if an exception is raised during extractionorg.eclipse.rdf4j.repository.RepositoryException- if an error is encountered whilst loading content from a storage connection
-
testNestedMicroformatsManaged
public void testNestedMicroformatsManaged() throws IOException, ExtractionException, org.eclipse.rdf4j.repository.RepositoryExceptionTests the nested microformat relationships. This test verifies the behavior of the nested microformats when the nesting relationship is handled by the microformat extractor itself (like the HReview that is able to detect an inner VCard).- Throws:
IOException- if there is an error loading input dataExtractionException- if an exception is raised during extractionorg.eclipse.rdf4j.repository.RepositoryException- if an error is encountered whilst loading content from a storage connection
-
-