Package org.apache.stanbol.entityhub.ldpath

Examples of org.apache.stanbol.entityhub.ldpath.EntityhubLDPath.parseProgram()


        String ldPathProgram = getProgramByName(programName);
        ValueFactory vf = InMemoryValueFactory.getInstance();
        EntityhubLDPath ldPath = new EntityhubLDPath(backend, vf);
        Program<Object> program = null;
        try {
            program = ldPath.parseProgram(LDPathUtils.constructReader(ldPathProgram));
        } catch (LDPathParseException e) {
            String msg = "Should never happen!!!!! Cannot parse the already stored LDPath program.";
            logger.error(msg, e);
        } catch (LDPathException e) {
            String msg = "Should never happen!!!!! Cannot parse the already stored LDPath program.";
View Full Code Here


        String ldPathProgram = getProgramByName(programName);
        ValueFactory vf = InMemoryValueFactory.getInstance();
        EntityhubLDPath ldPath = new EntityhubLDPath(backend, vf);
        Program<Object> program = null;
        try {
            program = ldPath.parseProgram(LDPathUtils.constructReader(ldPathProgram));
        } catch (LDPathParseException e) {
            logger.error("Should never happen!!!!!", e);
            return Collections.emptyMap();
        }
View Full Code Here

                                 String ldpath,
                                 Set<String> contexts ) throws LDPathParseException {
        MGraph data = new IndexedMGraph();
        RdfValueFactory vf = new RdfValueFactory(data);
        EntityhubLDPath ldPath = new EntityhubLDPath(backend,vf);
        Program<Object> program = ldPath.parseProgram(getReader(ldpath));
        if(log.isDebugEnabled()){
            log.debug("Execute on Context(s) '{}' LDPath program: \n{}",
                contexts,program.getPathExpression(backend));
        }
        /*
 
View Full Code Here

            //NOTE: calling execute(..) an this parseLdPath or even the
            //ldpathProgram will result in UnsupportedOperationException
            //but parsing is OK
            EntityhubLDPath parseLdPath = new EntityhubLDPath(parseBackend, valueFactory);
            try {
                ldpathProgram = parseLdPath.parseProgram(new StringReader(ldpathProgramStr));
            } catch (LDPathParseException e) {
                log.error("Unable to parse LDPath pogram: \n {}", ldpathProgramStr);
                throw new ConfigurationException(DereferenceConstants.DEREFERENCE_ENTITIES_LDPATH,
                    "Unable to parse configured LDPath program ", e);
            }
View Full Code Here

                                 String ldpath,
                                 Set<String> contexts ) throws LDPathParseException {
        MGraph data = new IndexedMGraph();
        RdfValueFactory vf = new RdfValueFactory(data);
        EntityhubLDPath ldPath = new EntityhubLDPath(backend,vf);
        Program<Object> program = ldPath.parseProgram(getReader(ldpath));
        if(log.isDebugEnabled()){
            log.debug("Execute on Context(s) '{}' LDPath program: \n{}",
                contexts,program.getPathExpression(backend));
        }
        /*
 
View Full Code Here

        String ldPathProgram = getProgramByName(programName);
        ValueFactory vf = InMemoryValueFactory.getInstance();
        EntityhubLDPath ldPath = new EntityhubLDPath(backend, vf);
      Program<Object> program = null;
        try {
            program = ldPath.parseProgram(LDPathUtils.constructReader(ldPathProgram));
        } catch (LDPathParseException e) {
          String msg = "Should never happen!!!!! Cannot parse the already stored LDPath program.";
            logger.error(msg, e);
        } catch (LDPathException e) {
          String msg = "Should never happen!!!!! Cannot parse the already stored LDPath program.";
View Full Code Here

        String ldPathProgram = getProgramByName(programName);
        ValueFactory vf = InMemoryValueFactory.getInstance();
        EntityhubLDPath ldPath = new EntityhubLDPath(backend, vf);
        Program<Object> program = null;
        try {
            program = ldPath.parseProgram(LDPathUtils.constructReader(ldPathProgram));
        } catch (LDPathParseException e) {
            logger.error("Should never happen!!!!!", e);
            return Collections.emptyMap();
        }
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. 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.