private List<EvaluatedAxiom> getEvaluatedAxioms(SparqlEndpointKS endpoint, SPARQLReasoner reasoner, OWLEntity entity, AxiomType axiomType, int maxExecutionTimeInSeconds, double threshold, int maxNrOfReturnedAxioms, boolean useInference) { List<EvaluatedAxiom> learnedAxioms = new ArrayList<>(); try { learnedAxioms = applyLearningAlgorithm(axiomType2Class.get(axiomType), endpoint, reasoner, entity, maxExecutionTimeInSeconds, threshold, maxNrOfReturnedAxioms); } catch (ComponentInitException e) { e.printStackTrace(); } return learnedAxioms; }
@Override public void init() throws ComponentInitException { // TODO Auto-generated method stub throw new ComponentInitException("not implemented"); }
public static ConfParser parseFile(File filename) throws FileNotFoundException, ParseException, UnsupportedEncodingException { ConfParserLegacy parser = new ConfParserLegacy(new InputStreamReader(new FileInputStream(filename), "UTF-8")); try { parser.init(); } catch (ComponentInitException e) { throw (ParseException) e.getCause(); } return parser; }
} catch (ComponentInitException e) { logger.error(e); logger.error(e.getLocalizedMessage()); System.exit(-2); } catch (ComponentInitException e) { logger.error(e); logger.error(e.getLocalizedMessage()); System.exit(-2); e.printStackTrace();
ks.init(); } catch (ComponentInitException e1) { e1.printStackTrace();
@Override public void init() throws ComponentInitException { if (edge == null) { String msg = "Underlying EDGE class not instantiated"; logger.error(msg); throw new ComponentInitException(msg); } logger.debug("Initializing EDGE"); fullyInitialized = false; super.init(); }
lp.init(); } catch (ComponentInitException e) { e.printStackTrace();
@NotNull protected Map parseJson() throws ComponentInitException { JSONObject ret = new JSONObject(); JSONParser parser = new JSONParser(); Object parse = null; try { parse = parser.parse(new InputStreamReader(inputStream), new InsertionOrderedContainerFactory()); } catch (org.json.simple.parser.ParseException e) { throw new ComponentInitException(e.toString(), e); } catch (IOException e) { throw new ComponentInitException(e); } logger.trace("parse was: " + parse.toString()); if (!(parse instanceof Map)) { throw new ComponentInitException("Not a JSON object: " + parse.getClass()); } return (Map) parse; }
ks.init(); } catch (ComponentInitException e) { e.printStackTrace();
throw new ComponentInitException(str); } else if(percentage < 0.10) { logger.warn(str);
} catch (ComponentInitException e1) { e1.printStackTrace(); } catch (ComponentInitException e) { e.printStackTrace();
public void init() throws ComponentInitException { try { this.Start(); } catch (ParseException e) { throw new ComponentInitException(e); } postProcess(); initialized = true; }
} catch (ComponentInitException e) { e.printStackTrace();
@Override public void init() throws ComponentInitException { try { if (url == null) { /* Copyied from OWLFile */ Path path = Paths.get(fileName); if(!path.isAbsolute() && baseDir != null) {// else relative to base directory path = Paths.get(baseDir, fileName); } URI uri = path.normalize().toUri(); setUrl(uri.toURL().toString()); } kb = KBParser.parseKBFile(new URL(getUrl())); logger.trace("KB File " + getUrl() + " parsed successfully."); } catch (ParseException e) { throw new ComponentInitException("KB file " + getUrl() + " could not be parsed correctly.", e); } catch (FileNotFoundException e) { throw new ComponentInitException("KB file " + getUrl() + " could not be found.", e); } catch (OWLOntologyCreationException e) { throw new ComponentInitException("KB file " + getUrl() + " could not converted to OWL ontology.", e); } catch (MalformedURLException e) { throw new ComponentInitException("KB file URL " + getUrl() + " is invalid.", e); } catch (IOException e) { throw new ComponentInitException("KB file " + getUrl() + " could not be read.", e); } initialized = true; }
} catch (ComponentInitException e) { e.printStackTrace();
@Override public void init() throws ComponentInitException { AbstractReasonerComponent rc = learningProblem.getReasoner(); if (rc instanceof ClosedWorldReasoner) { sourcesOntology = ((ClosedWorldReasoner) rc).getReasonerComponent().getOntology(); } else if (rc instanceof OWLAPIReasoner) { sourcesOntology = ((OWLAPIReasoner) rc).getOntology(); } else { throw new ComponentInitException("Unsupported Reasoning: " + rc.getClass()); } }
throw new ComponentInitException("No positive examples have been set."); str += missing.toString(); if(missing.size()==allExamples.size()) { throw new ComponentInitException(str); } if(percentage < 0.10) { logger.warn(str);
} catch (ComponentInitException e) { e.printStackTrace();
throw new ComponentInitException(message); String message = "OWLOntologyCreationException complete ontology NOT created. "; logger.error(message + e1.getMessage()); throw new ComponentInitException(message);