/** * Create a term that corresponds to a bnode (anonymous term). * * @param anonID is of the anonymous terms * @return an ATermAppl with a single argument for anonID */ public static ATermAppl bnode(final String anonID) { return ATermUtils.makeBnode(anonID); }
/** * Create a term that corresponds to a bnode (anonymous term). * * @param anonID is of the anonymous terms * @return an ATermAppl with a single argument for anonID */ public static ATermAppl bnode(final String anonID) { return ATermUtils.makeBnode(anonID); }
@Override public void visit(final OWLAnonymousIndividual ind) { _term = ATermUtils.makeBnode(ind.toStringID()); if (_addAxioms) _kb.addIndividual(_term); }
@Override public void visit(final OWLAnonymousIndividual ind) { _term = ATermUtils.makeBnode(ind.toStringID()); if (_addAxioms) _kb.addIndividual(_term); }
@Override public void visit(final OWLAnonymousIndividual ind) { _term = ATermUtils.makeBnode(ind.toStringID()); if (_addAxioms) _kb.addIndividual(_term); }
public void testAxiomConverterRules1c() { final KnowledgeBase kb = new KnowledgeBaseImpl(); final AxiomConverter converter = new AxiomConverter(kb, OWL._manager.getOWLDataFactory()); final ATermAppl C = ATermUtils.makeTermAppl("C"); final ATermAppl D = ATermUtils.makeTermAppl("D"); final ATermAppl x = ATermUtils.makeVar("x"); final ATermAppl name = ATermUtils.makeBnode("MyRule"); kb.addClass(C); kb.addClass(D); final ATermAppl[] head = new ATermAppl[] { ATermUtils.makeTypeAtom(x, D) }; final ATermAppl[] body = new ATermAppl[] { ATermUtils.makeTypeAtom(x, C) }; final ATermAppl rule = ATermUtils.makeRule(name, head, body); final OWLAxiom actual = converter.convert(rule); final Set<SWRLAtom> antecedent = new HashSet<>(); final Set<SWRLAtom> consequent = new HashSet<>(); antecedent.add(classAtom(Class("C"), variable("x"))); consequent.add(classAtom(Class("D"), variable("x"))); final OWLAxiom expected = rule(name.getArgument(0).toString(), true, antecedent, consequent); assertEquals(expected, actual); }
aTerm = ATermUtils.makeBnode(r.getId().toString());
aTerm = ATermUtils.makeBnode(r.getId().toString());
aTerm = ATermUtils.makeBnode(r.getId().toString());
@Test public void addAnnotation3() { final KnowledgeBase kb = new KnowledgeBaseImpl(); final ATermAppl s = ATermUtils.makeTermAppl("i"); final ATermAppl p = ATermUtils.makeTermAppl("p"); final ATermAppl o = ATermUtils.makeBnode("b"); kb.addIndividual(s); kb.addAnnotationProperty(p); assertTrue(kb.addAnnotation(s, p, o)); assertTrue(kb.isIndividual(s)); assertTrue(kb.isAnnotationProperty(p)); assertFalse(kb.isIndividual(o)); }
_logger.info("Blank _nodes in class variable positions are not supported"); aTerm = ATermUtils.makeBnode(node.getBlankNodeId().toString());
else if (node.isBlank()) return ATermUtils.makeBnode(node.getBlankNodeLabel()); else if (node.isURI())
else if (node.isBlank()) return ATermUtils.makeBnode(node.getBlankNodeLabel()); else if (node.isURI())
else if (node.isBlank()) return ATermUtils.makeBnode(node.getBlankNodeLabel()); else if (node.isURI())
_logger.info("Blank _nodes in class variable positions are not supported"); aTerm = ATermUtils.makeBnode(node.getBlankNodeId().toString());
_logger.info("Blank _nodes in class variable positions are not supported"); aTerm = ATermUtils.makeBnode(node.getBlankNodeId().toString());