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(); } }
throw new ExceptionBuilder().withKeyword(OPEN, OPENBRACE).withClass().build();
throw new ExceptionBuilder().withKeyword(OPEN, OPENBRACE).withClass().build();
.withClass().withObject().withData().withKeyword(OPEN, OPENBRACE, INV, FUNCTIONAL, INVERSE_FUNCTIONAL, SYMMETRIC, ASYMMETRIC, TRANSITIVE, REFLEXIVE, IRREFLEXIVE) .build();
.withClass().withObject().withData().withKeyword(OPEN, OPENBRACE, INV, FUNCTIONAL, INVERSE_FUNCTIONAL, SYMMETRIC, ASYMMETRIC, TRANSITIVE, REFLEXIVE, IRREFLEXIVE) .build();
.withClass().withObject().withData().withKeyword(OPEN, OPENBRACE, INV, FUNCTIONAL, INVERSE_FUNCTIONAL, SYMMETRIC, ASYMMETRIC, TRANSITIVE, REFLEXIVE, IRREFLEXIVE) .build();
throw new ExceptionBuilder().withClass().withObject().withData() .withKeyword(OPEN, OPENBRACE, NOT, INVERSE).build();
throw new ExceptionBuilder().withKeyword(OPEN, OPENBRACE).withClass().build();
.withClass().withObject().withData().withKeyword(OPEN, OPENBRACE, INV, FUNCTIONAL, INVERSE_FUNCTIONAL, SYMMETRIC, ASYMMETRIC, TRANSITIVE, REFLEXIVE, IRREFLEXIVE) .build();
throw new ExceptionBuilder().withClass().withObject().withData() .withKeyword(OPEN, OPENBRACE, NOT, INVERSE).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(); } }
throw new ExceptionBuilder().withClass().withObject().withData() .withKeyword(OPEN, OPENBRACE, NOT, INVERSE).build();
throw new ExceptionBuilder().withKeyword(OPEN, OPENBRACE).withClass().build();
throw new ExceptionBuilder().withClass().withObject().withData() .withKeyword(OPEN, OPENBRACE, NOT, INVERSE).build();
private OWLClass getOWLClass(String name) { OWLClass cls = checker.getOWLClass(name); if (cls == null && classNames.contains(name)) { cls = df.getOWLClass(getIRI(name)); } if (cls == null) { throw new ExceptionBuilder().withKeyword(potentialKeywords).withClass().build(); } return cls; }
private OWLClass getOWLClass(String name) { OWLClass cls = checker.getOWLClass(name); if (cls == null && classNames.contains(name)) { cls = df.getOWLClass(getIRI(name)); } if (cls == null) { throw new ExceptionBuilder().withKeyword(potentialKeywords).withClass().build(); } return cls; }
private OWLClass getOWLClass(String name) { OWLClass cls = checker.getOWLClass(name); if (cls == null && classNames.contains(name)) { cls = df.getOWLClass(getIRI(name)); } if (cls == null) { throw new ExceptionBuilder().withKeyword(potentialKeywords).withClass().build(); } return cls; }
private OWLClass getOWLClass(String name) { OWLClass cls = checker.getOWLClass(name); if (cls == null && classNames.contains(name)) { cls = df.getOWLClass(getIRI(name)); } if (cls == null) { throw new ExceptionBuilder().withKeyword(potentialKeywords).withClass().build(); } return cls; }