Package org.gbif.dwca.io
Class ArchiveFactoryTest
java.lang.Object
org.gbif.dwca.io.ArchiveFactoryTest
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidvoidtestCsv()Test dwca-reader bug 83voidTest extracting a CSV file containing embedded JSON, which itself contains escaped quotes.voidTesting CSV with optional quotesvoidThe pensoft archive http://pensoft.net/dwc/bdj/checklist_980.zip contains empty extension files which caused NPE in the dwca reader.voidBasic validation of archives, where we rely on falling back to defaults from the DWC-A metadata schema.voidTest GNUB style dwca with a single tab delimited file that has a .tab suffix.voidTest GNUB style dwca with a single tab delimited file that has a .tab suffix.voidBasic validation of archives, that the declared files exist and have basic, valid structure.voidTest IPT bug 2158voidIdentifier not set properly when reading single csv file the csv file attached is a utf16 little endian encoded file.voidvoidEnsure that extensions are just skipped for archives that do not have the core id in the mapped extension.voidvoidTest opening a single data file with both eventID column, meaning it has dwc:Event rowType.voidTest opening a single data file with a generic ID column and an eventID column meaning the Archive's ID-term gets set to (DwcTerm.eventID and its rowType gets set to DwcTerm.Event.voidvoidTest bug 77.voidTest reading a single-file Simple Darwin Core Archive.voidTest extension sorting verifying that all core records do have the right number of extension records attached when using the star record iterator.voidtestTab()void
-
Constructor Details
-
ArchiveFactoryTest
public ArchiveFactoryTest()
-
-
Method Details
-
testMetaHandlerUtf16le
- Throws:
Exception
-
testCoreRecords
- Throws:
IOException
-
testCsv
Test dwca-reader bug 83- Throws:
org.gbif.dwc.UnsupportedArchiveExceptionIOException- See Also:
-
testGnubTab
Test GNUB style dwca with a single tab delimited file that has a .tab suffix.- Throws:
org.gbif.dwc.UnsupportedArchiveExceptionIOException
-
testGnubTabZip
Test GNUB style dwca with a single tab delimited file that has a .tab suffix.- Throws:
org.gbif.dwc.UnsupportedArchiveExceptionIOException
-
testCsvOptionalQuotes
@Test public void testCsvOptionalQuotes() throws org.gbif.dwc.UnsupportedArchiveException, IOExceptionTesting CSV with optional quotes- Throws:
org.gbif.dwc.UnsupportedArchiveExceptionIOException
-
testIssue2158
Test IPT bug 2158- Throws:
org.gbif.dwc.UnsupportedArchiveExceptionIOException- See Also:
-
testExtensionNPE
The pensoft archive http://pensoft.net/dwc/bdj/checklist_980.zip contains empty extension files which caused NPE in the dwca reader.- Throws:
org.gbif.dwc.UnsupportedArchiveExceptionIOException
-
testStarIteratorExtRecords
Test extension sorting verifying that all core records do have the right number of extension records attached when using the star record iterator.- Throws:
Exception
-
testIssue78
Identifier not set properly when reading single csv file the csv file attached is a utf16 little endian encoded file. This encoding is known to cause problems and not supported. If you look at the detected concept terms you will find that there is NO concept at all detected because of the wrong character encoding used (the factory tries it with utf8).- Throws:
IOExceptionorg.gbif.dwc.UnsupportedArchiveException- See Also:
-
testOpenArchive
- Throws:
IOExceptionorg.gbif.dwc.UnsupportedArchiveException
-
testOpenSmallArchiveWithEmptyLines
@Test public void testOpenSmallArchiveWithEmptyLines() throws IOException, org.gbif.dwc.UnsupportedArchiveException- Throws:
IOExceptionorg.gbif.dwc.UnsupportedArchiveException
-
testQuotedHeaders
Test bug 77.- Throws:
IOExceptionorg.gbif.dwc.UnsupportedArchiveException- See Also:
-
testTab
- Throws:
org.gbif.dwc.UnsupportedArchiveExceptionIOException
-
testSimpleDWCA
Test reading a single-file Simple Darwin Core Archive.- Throws:
org.gbif.dwc.UnsupportedArchiveExceptionIOException
-
testTabEol
- Throws:
org.gbif.dwc.UnsupportedArchiveExceptionIOException
-
testCsvJsonEscapedQuotes
@Test public void testCsvJsonEscapedQuotes() throws org.gbif.dwc.UnsupportedArchiveException, IOExceptionTest extracting a CSV file containing embedded JSON, which itself contains escaped quotes. JSON value: { "test": "value, \"like\" this" } As a column in CSV: "{ ""test"": ""value, \""like\"" this"" }"- Throws:
org.gbif.dwc.UnsupportedArchiveExceptionIOException
-
testNullCoreID
Ensure that extensions are just skipped for archives that do not have the core id in the mapped extension. https://code.google.com/p/darwincore/issues/detail?id=232- Throws:
IOException
-
testOpenArchiveForEventCore
@Test public void testOpenArchiveForEventCore() throws IOException, org.gbif.dwc.UnsupportedArchiveExceptionTest opening a single data file with both eventID column, meaning it has dwc:Event rowType.- Throws:
IOExceptionorg.gbif.dwc.UnsupportedArchiveException
-
testOpenArchiveForGenericCore
@Test public void testOpenArchiveForGenericCore() throws IOException, org.gbif.dwc.UnsupportedArchiveExceptionTest opening a single data file with a generic ID column and an eventID column meaning the Archive's ID-term gets set to (DwcTerm.eventID and its rowType gets set to DwcTerm.Event.- Throws:
IOExceptionorg.gbif.dwc.UnsupportedArchiveException
-
testFallbackToDefaultsArchives
Basic validation of archives, where we rely on falling back to defaults from the DWC-A metadata schema.- Throws:
IOException
-
testInvalidArchives
Basic validation of archives, that the declared files exist and have basic, valid structure.
-