Package org.apache.stanbol.enhancer.servicesapi

Examples of org.apache.stanbol.enhancer.servicesapi.ChainException


        //      by the EnhancementJobManager.
        //      However one could add this as an optional feature to the
        //      RESTful interface of the Enhancer!
        //ci.getMetadata().addAll(job.getExecutionMetadata());
        if(job.isFailed()){
            throw new ChainException(job.getErrorMessage(), job.getError());
        }
        if(!job.isFinished()){
            throw new ChainException("EnhancementJobManager was deactivated while" +
                "enhancing the parsed ContentItem "+job.getContentItem()+
                "(EnhancementJobManager type: "+getClass()+")!");
        }
    }
View Full Code Here


         * {@link GraphChain#parser} is not available, any exception during
         * parsing or if the parsed RDF data are not a valid execution plan
         */
        private void updateExecutionPlan() throws ChainException {
            if(resourceData == null){
                throw new ChainException("The configured resource '"+resourceName+
                    "' for the execution plan is not available via the" +
                    "DataFileProvider infrastructure");
            }
            if(parser == null){
                throw new ChainException("Unable to parse RDF data from resource '"+
                    resourceName+"' because the RDF parser service is not available!");
            }
            try {
                executionPlan = parser.parse(new ByteArrayInputStream(resourceData), format);
            }catch(Exception e){
                throw new ChainException("Unable to parse RDF from resource '"+resourceName+
                    "' using format '"+format+"'!",e);
            }
            resourceData = null; //we have the graph no need to keep the raw data
            //we need still to parse the engines and to validate the plan
            engineNames = validateExecutionPlan(executionPlan);
View Full Code Here

TOP

Related Classes of org.apache.stanbol.enhancer.servicesapi.ChainException

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.