Search in sources :

Example 1 with SkosCodeListReader

use of eu.esdihumboldt.hale.io.codelist.skos.reader.SkosCodeListReader in project hale by halestudio.

the class SkosCodeListTest method readCodeList.

private CodeList readCodeList(URI source) throws Exception {
    CodeListReader reader = new SkosCodeListReader();
    reader.setSource(new DefaultInputSupplier(source));
    IOReport report = reader.execute(new LogProgressIndicator());
    assertTrue(report.isSuccess());
    return reader.getCodeList();
}
Also used : SkosCodeListReader(eu.esdihumboldt.hale.io.codelist.skos.reader.SkosCodeListReader) CodeListReader(eu.esdihumboldt.hale.common.codelist.io.CodeListReader) SkosCodeListReader(eu.esdihumboldt.hale.io.codelist.skos.reader.SkosCodeListReader) DefaultInputSupplier(eu.esdihumboldt.hale.common.core.io.supplier.DefaultInputSupplier) IOReport(eu.esdihumboldt.hale.common.core.io.report.IOReport) LogProgressIndicator(eu.esdihumboldt.hale.common.core.io.impl.LogProgressIndicator)

Example 2 with SkosCodeListReader

use of eu.esdihumboldt.hale.io.codelist.skos.reader.SkosCodeListReader in project hale by halestudio.

the class SkosCodeListTest method readCodeList_WithLanguage.

private CodeList readCodeList_WithLanguage(URI source, final String language) throws Exception {
    SkosCodeListReader reader = new SkosCodeListReader() {

        /**
         * @see eu.esdihumboldt.hale.io.codelist.skos.reader.SkosCodeListReader#getLangauge()
         */
        @Override
        public String getLangauge() {
            return language;
        }
    };
    reader.setSource(new DefaultInputSupplier(source));
    IOReport report = reader.execute(new LogProgressIndicator());
    assertTrue(report.isSuccess());
    return reader.getCodeList();
}
Also used : SkosCodeListReader(eu.esdihumboldt.hale.io.codelist.skos.reader.SkosCodeListReader) DefaultInputSupplier(eu.esdihumboldt.hale.common.core.io.supplier.DefaultInputSupplier) IOReport(eu.esdihumboldt.hale.common.core.io.report.IOReport) LogProgressIndicator(eu.esdihumboldt.hale.common.core.io.impl.LogProgressIndicator)

Aggregations

LogProgressIndicator (eu.esdihumboldt.hale.common.core.io.impl.LogProgressIndicator)2 IOReport (eu.esdihumboldt.hale.common.core.io.report.IOReport)2 DefaultInputSupplier (eu.esdihumboldt.hale.common.core.io.supplier.DefaultInputSupplier)2 SkosCodeListReader (eu.esdihumboldt.hale.io.codelist.skos.reader.SkosCodeListReader)2 CodeListReader (eu.esdihumboldt.hale.common.codelist.io.CodeListReader)1