Package org.apache.clerezza.rdf.jena.serializer

Examples of org.apache.clerezza.rdf.jena.serializer.JenaSerializerProvider


    public void setUp() {
        backup = new BackupMessageBodyWriter();
        backup.tcManager = new TestTcManager();
        backup.serializer = Serializer.getInstance();
        backup.serializer.bindSerializingProvider(
                new JenaSerializerProvider());
        testMGraph0.add(new TripleImpl(uri0, uri0, uri0));
        testMGraph1.add(new TripleImpl(uri1, uri1, uri1));
        MGraph graphBuilder = new SimpleMGraph();
        graphBuilder.add(new TripleImpl(uriA, uriA, uriA));
        testGraphA = graphBuilder.getGraph();
View Full Code Here


            zemantaEngine.computeEnhancements(ci);
        } catch (EngineException e) {
            RemoteServiceHelper.checkServiceUnavailable(e);
            return;
        }
        JenaSerializerProvider serializer = new JenaSerializerProvider();
        serializer.serialize(System.out, ci.getMetadata(), TURTLE);
        Map<UriRef,Resource> expectedValues = new HashMap<UriRef,Resource>();
        expectedValues.put(Properties.ENHANCER_EXTRACTED_FROM, ci.getUri());
        expectedValues.put(Properties.DC_CREATOR, LiteralFactory.getInstance().createTypedLiteral(
            zemantaEngine.getClass().getName()));
        //deactivate require fise:confidence values for fise:TextAnnotations, because
View Full Code Here

    private static final Logger log = LoggerFactory.getLogger(TestUtils.class);
   
    private TestUtils(){}
   
    public static void logEnhancements(ContentItem ci) {
        JenaSerializerProvider serializer = new JenaSerializerProvider();
        ByteArrayOutputStream logOut = new ByteArrayOutputStream();
        serializer.serialize(logOut, ci.getMetadata(), TURTLE);
        log.info("Enhancements: \n{}",new String(logOut.toByteArray(),Charset.forName("UTF-8")));
    }
View Full Code Here

        parser = new Parser();
        parser.bindParsingProvider(new JenaParserProvider());
        parser.bindParsingProvider(new RdfJsonParsingProvider());

        serializer = new Serializer();
        serializer.bindSerializingProvider(new JenaSerializerProvider());
        serializer.bindSerializingProvider(new RdfJsonSerializingProvider());

        ontologyProvider = new ClerezzaOntologyProvider(tcManager, offline, parser);
        Dictionary<String,Object> onmconf = new Hashtable<String,Object>();
        onmconf.put(ONManager.ONTOLOGY_NETWORK_NS, "http://stanbol.apache.org/scope/");
View Full Code Here

        if(__serializer == null){
            if(context != null){
                __serializer = ContextHelper.getServiceFromContext(Serializer.class, context);
            } else {
                __serializer = new Serializer();
                __serializer.bindSerializingProvider(new JenaSerializerProvider());
                __serializer.bindSerializingProvider(new JsonLdSerializerProvider());
            }
        }
        return __serializer;
    }
View Full Code Here

                log.warn("Zemanta Service not reachable -> offline? -> deactivate test");
                return;
            }
            throw e;
        }
        JenaSerializerProvider serializer = new JenaSerializerProvider();
        serializer.serialize(System.out, ci.getMetadata(), TURTLE);
        int textAnnoNum = checkAllTextAnnotations(ci.getMetadata(), BIO_DOMAIN_TEXT);
        log.info(textAnnoNum + " TextAnnotations found ...");
        int entityAnnoNum = checkAllEntityAnnotations(ci.getMetadata());
        log.info(entityAnnoNum + " EntityAnnotations found ...");
    }
View Full Code Here

TOP

Related Classes of org.apache.clerezza.rdf.jena.serializer.JenaSerializerProvider

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.