venukb / any23

Automatically exported from code.google.com/p/any23
Apache License 2.0
0 stars 0 forks source link

Any23 is printing always default "Configuration Properties" #184

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
1. Run a test 

    @Test
    public void testTheAny23FlagToDisableTimeAndSizeTriples() throws IOException, ExtractionException{
        // for any23 version 0.6.1
        final ModifiableConfiguration modifiableConf = DefaultConfiguration.copy();
        modifiableConf.setProperty("any23.extraction.metadata.timesize", "off");
        Any23 any23 = new Any23(modifiableConf);

        String content = readFileAsString("src/test/resources/main-resource/image.ttl");
        // The second argument of StringDocumentSource() must be a valid URI.
        DocumentSource source = new StringDocumentSource(content, "http://base.com");
        ByteArrayOutputStream out = new ByteArrayOutputStream();
        TripleHandler handler = new NTriplesWriter(out);
        any23.extract(source, handler);
        String n3 = out.toString("UTF-8");
        System.out.println(n3);
        assertFalse("Should not contain triple with http://vocab.sindice.net/date",n3.contains("http://vocab.sindice.net/date"));
        assertFalse("Should not contain triple with http://vocab.sindice.net/size",n3.contains("http://vocab.sindice.net/size"));
    }

2. Look at the console you will see
======================= Configuration Properties =======================
any23.http.client.max.connections=5
any23.extraction.metadata.timesize=on
any23.rdfa.extractor.xslt=rdfa.xslt
any23.extraction.csv.comment=#
any23.extraction.head.meta=off
any23.extraction.csv.field=,
any23.microdata.strict=off
any23.http.client.timeout=10000
any23.extraction.metadata.nesting=on
any23.core.version=0.6.1
any23.http.user.agent.default=Any23-CLI
any23.extraction.metadata.domain.per.entity=on
any23.plugin.dirs=./plugins
any23.microdata.ns.default=http://rdf.data-vocabulary.org/
========================================================================

What is the expected output? What do you see instead?
a)I would expect that if I change the flag 
any23.extraction.metadata.timesize" to "off"
the correct actual value should be printed 
b) the second problem with this is that any23 is just printing this to stdout
this should be logged not printed when using any23 programmatically
Can be printed when any23 is used from command line

What version of the product are you using?
0.6.1

Please provide any additional information below.

Original issue reported on code.google.com by danielcz...@gmail.com on 9 Aug 2011 at 5:53

Attachments:

GoogleCodeExporter commented 9 years ago

Original comment by michele.mostarda on 10 Aug 2011 at 9:06

GoogleCodeExporter commented 9 years ago

Original comment by michele.mostarda on 11 Aug 2011 at 5:41

GoogleCodeExporter commented 9 years ago
Fixed at revision r1487.

Original comment by michele.mostarda on 11 Aug 2011 at 5:43