private void consumeToken(ManchesterOWLSyntax expected) { String tok = consumeToken(); if (!expected.matches(tok)) { throw new ExceptionBuilder().withKeyword(expected).build(); } }
@Override public OWLClassExpression parseClassExpression() { OWLClassExpression desc = parseUnion(); if (!eof(consumeToken())) { throw new ExceptionBuilder().withKeyword(EOFTOKEN).build(); } return desc; }
protected OWLDataProperty parseDataProperty() { String name = consumeToken(); if (!isDataPropertyName(name)) { throw new ExceptionBuilder().withData().build(); } return getOWLDataProperty(name); }
private OWLPropertyExpression parsePropertyExpression() { String tok = peekToken(); if (isObjectPropertyName(tok)) { return parseObjectPropertyExpression(false); } else if (INVERSE.matches(tok)) { return parseObjectPropertyExpression(false); } else if (isDataPropertyName(tok)) { return parseDataProperty(); } else { consumeToken(); throw new ExceptionBuilder().withObject().withData().build(); } }
protected OWLAnnotationProperty parseAnnotationProperty() { String name = consumeToken(); if (!isAnnotationPropertyName(name)) { throw new ExceptionBuilder().withAnn().build(); } return getOWLAnnotationProperty(name); }
private OWLDataPropertyExpression parseDataPropertyExpression() { String tok = consumeToken(); if (!isDataPropertyName(tok)) { throw new ExceptionBuilder().withData().build(); } return getOWLDataProperty(tok); }
private OWLPropertyExpression parsePropertyExpression() { String tok = peekToken(); if (isObjectPropertyName(tok)) { return parseObjectPropertyExpression(false); } else if (INVERSE.matches(tok)) { return parseObjectPropertyExpression(false); } else if (isDataPropertyName(tok)) { return parseDataProperty(); } else { consumeToken(); throw new ExceptionBuilder().withObject().withData().build(); } }
private void consumeToken(ManchesterOWLSyntax expected) { String tok = consumeToken(); if (!expected.matches(tok)) { throw new ExceptionBuilder().withKeyword(expected).build(); } }
@Override public OWLClassExpression parseClassExpression() { OWLClassExpression desc = parseUnion(); if (!eof(consumeToken())) { throw new ExceptionBuilder().withKeyword(EOFTOKEN).build(); } return desc; }
protected OWLAnnotationProperty parseAnnotationProperty() { String name = consumeToken(); if (!isAnnotationPropertyName(name)) { throw new ExceptionBuilder().withAnn().build(); } return getOWLAnnotationProperty(name); }
private OWLDataPropertyExpression parseDataPropertyExpression() { String tok = consumeToken(); if (!isDataPropertyName(tok)) { throw new ExceptionBuilder().withData().build(); } return getOWLDataProperty(tok); }
private void consumeToken(ManchesterOWLSyntax expected) { String tok = consumeToken(); if (!expected.matches(tok)) { throw new ExceptionBuilder().withKeyword(expected).build(); } }
protected OWLDataProperty parseDataProperty() { String name = consumeToken(); if (!isDataPropertyName(name)) { throw new ExceptionBuilder().withData().build(); } return getOWLDataProperty(name); }
private void consumeToken(ManchesterOWLSyntax expected) { String tok = consumeToken(); if (!expected.matches(tok)) { throw new ExceptionBuilder().withKeyword(expected).build(); } }
protected OWLDataProperty parseDataProperty() { String name = consumeToken(); if (!isDataPropertyName(name)) { throw new ExceptionBuilder().withData().build(); } return getOWLDataProperty(name); }
private OWLDataPropertyExpression parseDataPropertyExpression() { String tok = consumeToken(); if (!isDataPropertyName(tok)) { throw new ExceptionBuilder().withData().build(); } return getOWLDataProperty(tok); }
protected OWLDataProperty parseDataProperty() { String name = consumeToken(); if (!isDataPropertyName(name)) { throw new ExceptionBuilder().withData().build(); } return getOWLDataProperty(name); }
private OWLDataPropertyExpression parseDataPropertyExpression() { String tok = consumeToken(); if (!isDataPropertyName(tok)) { throw new ExceptionBuilder().withData().build(); } return getOWLDataProperty(tok); }