org.apache.any23.extractor
Class SingleDocumentExtractionTest

java.lang.Object
  extended by org.apache.any23.extractor.SingleDocumentExtractionTest

public class SingleDocumentExtractionTest
extends Object

Test case for SingleDocumentExtraction.

Author:
Michele Mostarda (mostarda@fbk.eu), Davide Palmisano (palmisano@fbk.eu)

Constructor Summary
SingleDocumentExtractionTest()
           
 
Method Summary
 void setUp()
           
 void tearDown()
           
 void testMicroformatDomains()
          Tests the existence of the domain triples.
 void testNestedMicroformats()
          Tests the nested microformat relationships.
 void testNestedMicroformatsInduced()
          Tests the nested microformat relationships.
 void testNestedMicroformatsManaged()
          Tests the nested microformat relationships.
 void testNestedVCardAdr()
          This test assess the absence of SINDICE nesting relationship, since HCardExtractor declared a native nesting with the AdrExtractor.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

SingleDocumentExtractionTest

public SingleDocumentExtractionTest()
Method Detail

setUp

public void setUp()
           throws org.openrdf.repository.RepositoryException,
                  org.openrdf.sail.SailException
Throws:
org.openrdf.repository.RepositoryException
org.openrdf.sail.SailException

tearDown

public void tearDown()
              throws org.openrdf.sail.SailException,
                     org.openrdf.repository.RepositoryException,
                     org.apache.any23.writer.TripleHandlerException
Throws:
org.openrdf.sail.SailException
org.openrdf.repository.RepositoryException
org.apache.any23.writer.TripleHandlerException

testMicroformatDomains

public void testMicroformatDomains()
                            throws IOException,
                                   org.apache.any23.extractor.ExtractionException,
                                   org.openrdf.repository.RepositoryException
Tests the existence of the domain triples.

Throws:
IOException
ExtractionException
org.openrdf.repository.RepositoryException

testNestedMicroformats

public void testNestedMicroformats()
                            throws IOException,
                                   org.apache.any23.extractor.ExtractionException,
                                   org.openrdf.repository.RepositoryException
Tests 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 see SingleDocumentExtraction consolidateResources(java.util.List, java.util.List, org.apache.any23.writer.TripleHandler)}

Throws:
IOException
ExtractionException
org.openrdf.repository.RepositoryException

testNestedVCardAdr

public void testNestedVCardAdr()
                        throws IOException,
                               org.apache.any23.extractor.ExtractionException,
                               org.openrdf.repository.RepositoryException
This test assess the absence of SINDICE nesting relationship, since HCardExtractor declared a native nesting with the AdrExtractor.

Throws:
IOException
ExtractionException
org.openrdf.repository.RepositoryException
See Also:
org.apache.any23.extractor.html.annotations.Includes}

testNestedMicroformatsInduced

public void testNestedMicroformatsInduced()
                                   throws IOException,
                                          org.apache.any23.extractor.ExtractionException,
                                          org.openrdf.repository.RepositoryException
Tests 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 see SingleDocumentExtraction consolidateResources(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
ExtractionException
org.openrdf.repository.RepositoryException

testNestedMicroformatsManaged

public void testNestedMicroformatsManaged()
                                   throws IOException,
                                          org.apache.any23.extractor.ExtractionException,
                                          org.openrdf.repository.RepositoryException
Tests 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
ExtractionException
org.openrdf.repository.RepositoryException


Copyright © 2010-2012 The Apache Software Foundation. All Rights Reserved.