Package org.apache.stanbol.entityhub.ldpath.backend

Examples of org.apache.stanbol.entityhub.ldpath.backend.SiteManagerBackend


        if (ldPathProgram == null || ldPathProgram.isEmpty()) {
            String msg = "LDPath Program cannot be null.";
            logger.error(msg);
            throw new LDPathException(msg);
        }
        RDFBackend<Object> rdfBackend = new SiteManagerBackend(referencedSiteManager);
        RdfPathParser<Object> LDparser = new RdfPathParser<Object>(rdfBackend, constructReader(ldPathProgram));
        Program<Object> program = null;
        try {
            program = LDparser.parseProgram();
        } catch (ParseException e) {
View Full Code Here


        return nameProgramMap.get(programName);
    }

    @Override
    public Program<Object> getParsedProgramByName(String programName) {
        SiteManagerBackend backend = new SiteManagerBackend(referencedSiteManager);
        String ldPathProgram = getProgramByName(programName);
        ValueFactory vf = InMemoryValueFactory.getInstance();
        EntityhubLDPath ldPath = new EntityhubLDPath(backend, vf);
        Program<Object> program = null;
        try {
View Full Code Here

    }

    @Override
    public Map<String,Collection<?>> executeProgram(String programName, Set<String> contexts, ContentItem ci) throws LDPathException {
        Map<String,Collection<?>> results = new HashMap<String,Collection<?>>();
        SiteManagerBackend backend = new SiteManagerBackend(referencedSiteManager);
        String ldPathProgram = getProgramByName(programName);
        ValueFactory vf = InMemoryValueFactory.getInstance();
        EntityhubLDPath ldPath = new EntityhubLDPath(backend, vf);
        Program<Object> program = null;
        try {
View Full Code Here

        if (ldPathProgram == null || ldPathProgram.isEmpty()) {
            String msg = "LDPath Program cannot be null.";
            logger.error(msg);
            throw new LDPathException(msg);
        }
        RDFBackend<Object> rdfBackend = new SiteManagerBackend(referencedSiteManager);
        RdfPathParser<Object> LDparser = new RdfPathParser<Object>(rdfBackend, constructReader(ldPathProgram));
        Program<Object> program = null;
        try {
            program = LDparser.parseProgram();
        } catch (ParseException e) {
View Full Code Here

             @FormParam(value = "context")Set<String> contexts,
             @FormParam(value = "ldpath")String ldpath,
             @Context HttpHeaders headers){
        SiteManager referencedSiteManager = ContextHelper.getServiceFromContext(
            SiteManager.class, servletContext);
        return handleLDPathRequest(this,new SiteManagerBackend(referencedSiteManager),
            ldpath, contexts, headers, servletContext);
    }
View Full Code Here

     * @return the response
     */
    private Response executeLDPathQuery(SiteManager manager,FieldQuery query, String ldpathProgramString, MediaType mediaType, HttpHeaders headers) {
        QueryResultList<Representation> result;
        ValueFactory vf = new RdfValueFactory(new IndexedMGraph());
        SiteManagerBackend backend = new SiteManagerBackend(manager);
        EntityhubLDPath ldPath = new EntityhubLDPath(backend,vf);
        //copy the selected fields, because we might need to delete some during
        //the preparation phase
        Set<String> selectedFields = new HashSet<String>(query.getSelectedFields());
        //first prepare (only execute the query if the parameters are valid)
View Full Code Here

        return entity == null ? null : entity.getRepresentation();
    }
   
    @Override
    protected RDFBackend<Object> createRdfBackend(SiteManager service) {
        return new SiteManagerBackend(service);
    }
View Full Code Here

             @FormParam(value = "context")Set<String> contexts,
             @FormParam(value = "ldpath")String ldpath,
             @Context HttpHeaders headers){
        ReferencedSiteManager referencedSiteManager = ContextHelper.getServiceFromContext(
            ReferencedSiteManager.class, servletContext);
        return handleLDPathRequest(this,new SiteManagerBackend(referencedSiteManager),
            ldpath, contexts, headers, servletContext);
    }
View Full Code Here

     * @return the response
     */
    private Response executeLDPathQuery(ReferencedSiteManager manager,FieldQuery query, String ldpathProgramString, MediaType mediaType, HttpHeaders headers) {
        QueryResultList<Representation> result;
        ValueFactory vf = new RdfValueFactory(new IndexedMGraph());
        SiteManagerBackend backend = new SiteManagerBackend(manager);
        EntityhubLDPath ldPath = new EntityhubLDPath(backend,vf);
        //copy the selected fields, because we might need to delete some during
        //the preparation phase
        Set<String> selectedFields = new HashSet<String>(query.getSelectedFields());
        //first prepare (only execute the query if the parameters are valid)
View Full Code Here

        if (ldPathProgram == null || ldPathProgram.isEmpty()) {
            String msg = "LDPath Program cannot be null.";
            logger.error(msg);
            throw new LDPathException(msg);
        }
        RDFBackend<Object> rdfBackend = new SiteManagerBackend(referencedSiteManager);
        RdfPathParser<Object> LDparser = new RdfPathParser<Object>(rdfBackend, constructReader(ldPathProgram));
        Program<Object> program = null;
        try {
            program = LDparser.parseProgram();
        } catch (ParseException e) {
View Full Code Here

TOP

Related Classes of org.apache.stanbol.entityhub.ldpath.backend.SiteManagerBackend

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.