Start line:  
End line:  

Snippet Preview

Snippet HTML Code

Stack Overflow Questions
 
 package eu.clarin.weblicht.wlfxb.ed.test;
 
import static org.junit.Assert.assertEquals;

Author(s):
Yana Panchenko
    @Rule
    public TemporaryFolder testFolder = new TemporaryFolder();
    private static final String INPUT_FILE_WITHOUT_LAYER = "/data/ed-nemodel/tcf-before.xml";
    private static final String INPUT_FILE_WITH_LAYER = "/data/ed-nemodel/tcf-after.xml";
    private static final String EXPECTED_OUTPUT_FILE = "/data/ed-nemodel/output-expected.xml";
    private static final EnumSet<ExternalDataLayerTagedLayersToReadBefore =
            EnumSet.noneOf(ExternalDataLayerTag.class);
    private final String OUTPUT_FILE = "output.xml";
//    private static final EnumSet<TextCorpusLayerTag> tcLayersToReadBefore =
//            EnumSet.of(TextCorpusLayerTag.TEXT);
    private static final EnumSet<TextCorpusLayerTagtcLayersToReadBefore =
            EnumSet.noneOf(TextCorpusLayerTag.class);
    
    private static final EnumSet<ExternalDataLayerTagedLayersToReadAfter =
            EnumSet.of(.);
    private static final EnumSet<TextCorpusLayerTagtcLayersToReadAfter =
            //EnumSet.of(TextCorpusLayerTag.TOKENS);
            EnumSet.noneOf(TextCorpusLayerTag.class);
    @Test
    public void testRead() throws Exception {
        TextCorpus tc = edtc.getTextCorpus();
        TokensLayer tLayer = tc.getTokensLayer();
        ExternalData ed = edtc.getExternalData();
        NamedEntityModelLayer mLayer = ed.getNamedEntityModelLayer();
        assertEquals("application/octet-stream"mLayer.getDataMimeType());
        assertEquals("conll2003"mLayer.getNamedEntitiesType());
        assertEquals("opennlp-1.5"mLayer.getModelType());
        assertEquals("http://arc:8080/drop-off/storage/test.zip"mLayer.getLink());
        assertEquals(nulltLayer);
    }
    @Test
    public void testReadWrite() throws Exception {
                    .getRoot() + . + 
                    );
        ..println(edtc);
        ExternalData ed = edtc.getExternalData();
        NamedEntityModelLayer mLayer = ed.createNamedEntityModelLayer("application/octet-stream""conll2003","opennlp-1.5");
        mLayer.addLink("http://arc:8080/drop-off/storage/test.zip");
        // IMPORTANT close the streams!!!
        edtc.close();
        ..println(edtc);
        // compare output xml with expected xml
    }
New to GrepCode? Check out our FAQ X