protected OWLAnnotation parseAnnotation() { OWLAnnotationProperty annoProp = parseAnnotationProperty(); String obj = peekToken(); if (isIndividualName(obj) || isClassName(obj) || isObjectPropertyName(obj) || isDataPropertyName(obj)) { consumeToken(); OWLAnnotationValue value; if (obj.startsWith("_:")) { value = anonProvider.getOWLAnonymousIndividual(obj); } else { value = getIRI(obj); } return df.getOWLAnnotation(annoProp, value); } if (obj.startsWith("<")) { IRI value = parseIRI(); return df.getOWLAnnotation(annoProp, value); } OWLLiteral con = parseLiteral(null); return df.getOWLAnnotation(annoProp, con); }
protected OWLAnnotation parseAnnotation() { OWLAnnotationProperty annoProp = parseAnnotationProperty(); String obj = peekToken(); if (isIndividualName(obj) || isClassName(obj) || isObjectPropertyName(obj) || isDataPropertyName(obj)) { consumeToken(); OWLAnnotationValue value; if (obj.startsWith("_:")) { value = anonProvider.getOWLAnonymousIndividual(obj); } else { value = getIRI(obj); } return df.getOWLAnnotation(annoProp, value); } if (obj.startsWith("<")) { IRI value = parseIRI(); return df.getOWLAnnotation(annoProp, value); } OWLLiteral con = parseLiteral(null); return df.getOWLAnnotation(annoProp, con); }
protected OWLAnnotation parseAnnotation() { OWLAnnotationProperty annoProp = parseAnnotationProperty(); String obj = peekToken(); if (isIndividualName(obj) || isClassName(obj) || isObjectPropertyName(obj) || isDataPropertyName(obj)) { consumeToken(); OWLAnnotationValue value; if (obj.startsWith("_:")) { value = anonProvider.getOWLAnonymousIndividual(obj); } else { value = getIRI(obj); } return df.getOWLAnnotation(annoProp, value); } if (obj.startsWith("<")) { IRI value = parseIRI(); return df.getOWLAnnotation(annoProp, value); } OWLLiteral con = parseLiteral(null); return df.getOWLAnnotation(annoProp, con); }
protected OWLAnnotation parseAnnotation() { OWLAnnotationProperty annoProp = parseAnnotationProperty(); String obj = peekToken(); if (isIndividualName(obj) || isClassName(obj) || isObjectPropertyName(obj) || isDataPropertyName(obj)) { consumeToken(); OWLAnnotationValue value; if (obj.startsWith("_:")) { value = anonProvider.getOWLAnonymousIndividual(obj); } else { value = getIRI(obj); } return df.getOWLAnnotation(annoProp, value); } if (obj.startsWith("<")) { IRI value = parseIRI(); return df.getOWLAnnotation(annoProp, value); } OWLLiteral con = parseLiteral(null); return df.getOWLAnnotation(annoProp, con); }
private SWRLAtom parseRuleAtom() { String predicate = peekToken(); if (isClassName(predicate)) { return parseClassAtom(); } else if (OPEN.matches(predicate)) { return parseClassAtom(); } else if (isObjectPropertyName(predicate)) { return parseObjectPropertyAtom(); } else if (isDataPropertyName(predicate)) { return parseDataPropertyAtom(); } else if (isDatatypeName(predicate)) { return parseDataRangeAtom(); } else if (DIFFERENT_FROM.matchesEitherForm(predicate)) { return parseDifferentFromAtom(); } else if (SAME_AS.matchesEitherForm(predicate)) { return parseSameAsAtom(); } else if (isSWRLBuiltin(predicate) || predicate.startsWith("<")) { return parseBuiltInAtom(); } else { consumeToken(); Set<String> kw = new TreeSet<>(); kw.addAll(ruleBuiltIns.keySet()); kw.add(DIFFERENT_FROM.toString()); kw.add(SAME_AS.toString()); throw new ExceptionBuilder().withKeyword(kw).withClass().withObject().withData() .build(); } }
private SWRLAtom parseRuleAtom() { String predicate = peekToken(); if (isClassName(predicate)) { return parseClassAtom(); } else if (OPEN.matches(predicate)) { return parseClassAtom(); } else if (isObjectPropertyName(predicate)) { return parseObjectPropertyAtom(); } else if (isDataPropertyName(predicate)) { return parseDataPropertyAtom(); } else if (isDatatypeName(predicate)) { return parseDataRangeAtom(); } else if (DIFFERENT_FROM.matchesEitherForm(predicate)) { return parseDifferentFromAtom(); } else if (SAME_AS.matchesEitherForm(predicate)) { return parseSameAsAtom(); } else if (isSWRLBuiltin(predicate) || predicate.startsWith("<")) { return parseBuiltInAtom(); } else { consumeToken(); Set<String> kw = new TreeSet<>(); kw.addAll(ruleBuiltIns.keySet()); kw.add(DIFFERENT_FROM.toString()); kw.add(SAME_AS.toString()); throw new ExceptionBuilder().withKeyword(kw).withClass().withObject().withData() .build(); } }
private SWRLAtom parseRuleAtom() { String predicate = peekToken(); if (isClassName(predicate)) { return parseClassAtom(); } else if (OPEN.matches(predicate)) { return parseClassAtom(); } else if (isObjectPropertyName(predicate)) { return parseObjectPropertyAtom(); } else if (isDataPropertyName(predicate)) { return parseDataPropertyAtom(); } else if (isDatatypeName(predicate)) { return parseDataRangeAtom(); } else if (DIFFERENT_FROM.matchesEitherForm(predicate)) { return parseDifferentFromAtom(); } else if (SAME_AS.matchesEitherForm(predicate)) { return parseSameAsAtom(); } else if (isSWRLBuiltin(predicate) || predicate.startsWith("<")) { return parseBuiltInAtom(); } else { consumeToken(); Set<String> kw = new TreeSet<>(); kw.addAll(ruleBuiltIns.keySet()); kw.add(DIFFERENT_FROM.toString()); kw.add(SAME_AS.toString()); throw new ExceptionBuilder().withKeyword(kw).withClass().withObject().withData() .build(); } }
private SWRLAtom parseRuleAtom() { String predicate = peekToken(); if (isClassName(predicate)) { return parseClassAtom(); } else if (OPEN.matches(predicate)) { return parseClassAtom(); } else if (isObjectPropertyName(predicate)) { return parseObjectPropertyAtom(); } else if (isDataPropertyName(predicate)) { return parseDataPropertyAtom(); } else if (isDatatypeName(predicate)) { return parseDataRangeAtom(); } else if (DIFFERENT_FROM.matchesEitherForm(predicate)) { return parseDifferentFromAtom(); } else if (SAME_AS.matchesEitherForm(predicate)) { return parseSameAsAtom(); } else if (isSWRLBuiltin(predicate) || predicate.startsWith("<")) { return parseBuiltInAtom(); } else { consumeToken(); Set<String> kw = new TreeSet<>(); kw.addAll(ruleBuiltIns.keySet()); kw.add(DIFFERENT_FROM.toString()); kw.add(SAME_AS.toString()); throw new ExceptionBuilder().withKeyword(kw).withClass().withObject().withData() .build(); } }
OWLClassExpression complemented = parseNestedClassExpression(false); return df.getOWLObjectComplementOf(complemented); } else if (isClassName(tok)) { consumeToken(); return getOWLClass(tok);
OWLClassExpression complemented = parseNestedClassExpression(false); return df.getOWLObjectComplementOf(complemented); } else if (isClassName(tok)) { consumeToken(); return getOWLClass(tok);
OWLClassExpression complemented = parseNestedClassExpression(false); return df.getOWLObjectComplementOf(complemented); } else if (isClassName(tok)) { consumeToken(); return getOWLClass(tok);
OWLClassExpression complemented = parseNestedClassExpression(false); return df.getOWLObjectComplementOf(complemented); } else if (isClassName(tok)) { consumeToken(); return getOWLClass(tok);
} else if (OPENBRACE.matches(tok)) { return parseObjectOneOf(); } else if (isClassName(tok)) { String name = consumeToken(); return getOWLClass(name);
} else if (OPENBRACE.matches(tok)) { return parseObjectOneOf(); } else if (isClassName(tok)) { String name = consumeToken(); return getOWLClass(name);
} else if (OPENBRACE.matches(tok)) { return parseObjectOneOf(); } else if (isClassName(tok)) { String name = consumeToken(); return getOWLClass(name);
} else if (OPENBRACE.matches(tok)) { return parseObjectOneOf(); } else if (isClassName(tok)) { String name = consumeToken(); return getOWLClass(name);
@Override public OWLAxiom parseAxiom() { String token = peekToken(); if (isClassName(token)) { return parseAxiomWithClassExpressionStart(); } else if (isObjectPropertyName(token)) {
@Override public OWLAxiom parseAxiom() { String token = peekToken(); if (isClassName(token)) { return parseAxiomWithClassExpressionStart(); } else if (isObjectPropertyName(token)) {
@Override public OWLAxiom parseAxiom() { String token = peekToken(); if (isClassName(token)) { return parseAxiomWithClassExpressionStart(); } else if (isObjectPropertyName(token)) {
@Override public OWLAxiom parseAxiom() { String token = peekToken(); if (isClassName(token)) { return parseAxiomWithClassExpressionStart(); } else if (isObjectPropertyName(token)) {