Package org.apache.stanbol.cmsadapter.servicesapi.mapping

Examples of org.apache.stanbol.cmsadapter.servicesapi.mapping.RDFMapper


            return;
        }

        // According to connection type get RDF mapper, repository accessor,
        // session
        RDFMapper mapper = getRDFMapper(session);

        // Annotate raw RDF with CMS vocabulary annotations according to bridges
        log.info("Graph annotation starting...");
        MGraph annotatedGraph = new SimpleMGraph();
        for (RDFBridge bridge : rdfBridges) {
            long startAnnotation = System.currentTimeMillis();
            annotatedGraph.addAll(bridge.annotateGraph(rawRDFData));
            log.info("Graph annotated in: " + (System.currentTimeMillis() - startAnnotation) + "ms");
        }
        log.info("Graph annotation finished");

        // Store annotated RDF in repository
        log.info("Annotated graph mapping started...");
        long startMap = System.currentTimeMillis();
        mapper.storeRDFinRepository(session, annotatedGraph);
        log.info("Annotated graph mapped in: " + (System.currentTimeMillis() - startMap) + "ms");
    }
View Full Code Here


        if (rdfBridges.size() == 0) {
            log.info("There is no RDF Bridge to execute");
            return new SimpleMGraph();
        }

        RDFMapper mapper = getRDFMapper(session);
        MGraph cmsGraph = new SimpleMGraph();
        for (RDFBridge bridge : rdfBridges) {
            MGraph generatedGraph = mapper.generateRDFFromRepository(baseURI, session, bridge.getCMSPath());
            bridge.annotateCMSGraph(generatedGraph);
            cmsGraph.addAll(generatedGraph);
        }

        MGraph persistentGraph = null;
View Full Code Here

        }
        return persistentGraph;
    }

    private RDFMapper getRDFMapper(Object session) throws RepositoryAccessException {
        RDFMapper mapper = null;
        for (RDFMapper rdfMapper : rdfMappers) {
            if (rdfMapper.canMapWith(session)) {
                mapper = (RDFMapper) rdfMapper;
            }
        }
View Full Code Here

TOP

Related Classes of org.apache.stanbol.cmsadapter.servicesapi.mapping.RDFMapper

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.