@Nullable protected OWLClassExpression resultFromVal(IRI iri, IRI templateVal) { String tStr = expandExpressionMap.get(iri); String exStr = tStr.replace("?Y", manchesterSyntaxTool.getId(templateVal)); try { return manchesterSyntaxTool.parseManchesterExpression(exStr); } catch (ParserException e) { LOG.error(e.getMessage(), e); return null; } }
@Nullable protected OWLClassExpression resultFromVal(IRI iri, IRI templateVal) { String tStr = expandExpressionMap.get(iri); String exStr = tStr.replace("?Y", manchesterSyntaxTool.getId(templateVal)); try { return manchesterSyntaxTool.parseManchesterExpression(exStr); } catch (ParserException e) { LOG.error(e.getMessage(), e); return null; } }
@Nullable protected OWLClassExpression resultFromVal(IRI iri, IRI templateVal) { String tStr = expandExpressionMap.get(iri); String exStr = tStr.replace("?Y", manchesterSyntaxTool.getId(templateVal)); try { return manchesterSyntaxTool.parseManchesterExpression(exStr); } catch (ParserException e) { LOG.error(e.getMessage(), e); return null; } }
@Nullable protected OWLClassExpression resultFromVal(IRI iri, IRI templateVal) { String tStr = expandExpressionMap.get(iri); String exStr = tStr.replace("?Y", manchesterSyntaxTool.getId(templateVal)); try { return manchesterSyntaxTool.parseManchesterExpression(exStr); } catch (ParserException e) { LOG.error(e.getMessage(), e); return null; } }
@Override public OWLClassExpression parse(String str) throws ParseException { try { return getParser(str).parseClassExpression(); } catch (ParserException e) { throw new ParseException(e.getMessage(), e.getStartPos()); } }
public static ManchesterSyntaxFrameParseError getParseError(ParserException e) { List<EntityType<?>> expectedEntityTypes = getExpectedEntityTypes(e); String message = e.getMessage().replace(ManchesterOWLSyntaxTokenizer.EOF, "end of description"); return new ManchesterSyntaxFrameParseError(message, e.getColumnNumber(), e.getLineNumber(), e.getCurrentToken(), expectedEntityTypes); }
throw new Exception( String.format( parseError, tableName, row + 1, id, column + 1, header, sub, e.getMessage()));
return parser.parseOntology(ontology); } catch (ParserException e) { throw new ManchesterOWLSyntaxParserException(e.getMessage(), e, e.getLineNumber(), e.getColumnNumber()); } catch (OWLOntologyInputSourceException | IOException e) {
return parser.parseOntology(ontology); } catch (ParserException e) { throw new ManchesterOWLSyntaxParserException(e.getMessage(), e, e.getLineNumber(), e.getColumnNumber()); } catch (OWLOntologyInputSourceException | IOException e) {
return parser.parseOntology(ontology); } catch (ParserException e) { throw new ManchesterOWLSyntaxParserException(e.getMessage(), e, e.getLineNumber(), e.getColumnNumber()); } catch (OWLOntologyInputSourceException | IOException e) {
return parser.parseOntology(ontology); } catch (ParserException e) { throw new ManchesterOWLSyntaxParserException(e.getMessage(), e, e.getLineNumber(), e.getColumnNumber()); } catch (OWLOntologyInputSourceException | IOException e) {
public static OWLExpressionParserException convertException(ParserException ex) { int endPos = ex.getStartPos() + ex.getCurrentToken().length(); if (ex.getCurrentToken().equals("<EOF>")){ endPos = ex.getStartPos(); // because start + length of <EOF> would push us past the end of the document } return new OWLExpressionParserException(ex.getMessage(), ex.getStartPos(), endPos, ex.isClassNameExpected(), ex.isObjectPropertyNameExpected(), ex.isDataPropertyNameExpected(), ex.isIndividualNameExpected(), ex.isDatatypeNameExpected(), ex.isAnnotationPropertyNameExpected(), ex.getExpectedKeywords()); }
public static OWLExpressionParserException convertException(ParserException ex) { int endPos = ex.getStartPos() + ex.getCurrentToken().length(); if (ex.getCurrentToken().equals("<EOF>")){ endPos = ex.getStartPos(); // because start + length of <EOF> would push us past the end of the document } return new OWLExpressionParserException(ex.getMessage(), ex.getStartPos(), endPos, ex.isClassNameExpected(), ex.isObjectPropertyNameExpected(), ex.isDataPropertyNameExpected(), ex.isIndividualNameExpected(), ex.isDatatypeNameExpected(), ex.isAnnotationPropertyNameExpected(), ex.getExpectedKeywords()); }