@Override public List<AtomObject> getAllArguments() { final List<AtomObject> list = new ArrayList<>(2); list.add(getArgument1()); list.add(getArgument2()); return list; }
@Override public List<AtomObject> getAllArguments() { final List<AtomObject> list = new ArrayList<>(2); list.add(getArgument1()); list.add(getArgument2()); return list; }
@Override public boolean matches(final RuleAtom atom) { return ((atom instanceof IndividualPropertyAtom) || (atom instanceof DatavaluedPropertyAtom)) && atom.getPredicate().equals(_role.getName()) && ((BinaryAtom<?, ?, ?>) atom).getArgument1() instanceof AtomVariable && ((BinaryAtom<?, ?, ?>) atom).getArgument2().equals(((BinaryAtom<?, ?, ?>) atom).getArgument1()); }
@Override public boolean matches(final RuleAtom atom) { return ((atom instanceof IndividualPropertyAtom) || (atom instanceof DatavaluedPropertyAtom)) && atom.getPredicate().equals(_role.getName()) && ((BinaryAtom<?, ?, ?>) atom).getArgument1() instanceof AtomVariable && ((BinaryAtom<?, ?, ?>) atom).getArgument2().equals(((BinaryAtom<?, ?, ?>) atom).getArgument1()); }
@Override @SuppressWarnings("rawtypes") public boolean matches(final RuleAtom atom) { return ((atom instanceof IndividualPropertyAtom) || (atom instanceof DatavaluedPropertyAtom)) && atom.getPredicate().equals(_role.getName()) && ((BinaryAtom) atom).getArgument1() instanceof AtomIConstant && ((AtomIConstant) ((BinaryAtom) atom).getArgument1()).getValue().equals(_name) && ((BinaryAtom) atom).getArgument2() instanceof AtomVariable; }
@Override @SuppressWarnings("rawtypes") public boolean matches(final RuleAtom atom) { return ((atom instanceof IndividualPropertyAtom) || (atom instanceof DatavaluedPropertyAtom)) && atom.getPredicate().equals(_role.getName()) && ((BinaryAtom) atom).getArgument1() instanceof AtomIConstant && ((AtomIConstant) ((BinaryAtom) atom).getArgument1()).getValue().equals(_name) && ((BinaryAtom) atom).getArgument2() instanceof AtomVariable; }
@Override public boolean matches(final RuleAtom atom) { return ((atom instanceof IndividualPropertyAtom) || (atom instanceof DatavaluedPropertyAtom)) && atom.getPredicate().equals(_role.getName()) && ((BinaryAtom<?, ?, ?>) atom).getArgument1() instanceof AtomIConstant && ((AtomIConstant) ((BinaryAtom<?, ?, ?>) atom).getArgument1()).getValue().equals(_name) && ((BinaryAtom<?, ?, ?>) atom).getArgument2() instanceof AtomConstant && ((AtomConstant) ((BinaryAtom<?, ?, ?>) atom).getArgument2()).getValue().equals(_objectName); }
@Override public boolean matches(final RuleAtom atom) { return ((atom instanceof IndividualPropertyAtom) || (atom instanceof DatavaluedPropertyAtom)) && atom.getPredicate().equals(_role.getName()) && ((BinaryAtom<?, ?, ?>) atom).getArgument1() instanceof AtomIConstant && ((AtomIConstant) ((BinaryAtom<?, ?, ?>) atom).getArgument1()).getValue().equals(_name) && ((BinaryAtom<?, ?, ?>) atom).getArgument2() instanceof AtomConstant && ((AtomConstant) ((BinaryAtom<?, ?, ?>) atom).getArgument2()).getValue().equals(_objectName); }
@Override @SuppressWarnings("rawtypes") public boolean matches(final RuleAtom atom) { return (atom instanceof IndividualPropertyAtom || atom instanceof DatavaluedPropertyAtom) && atom.getPredicate().equals(_role.getName()) && ((BinaryAtom) atom).getArgument1() instanceof AtomVariable && ((BinaryAtom) atom).getArgument2() instanceof AtomVariable; }
@Override @SuppressWarnings("rawtypes") public boolean matches(final RuleAtom atom) { return (atom instanceof IndividualPropertyAtom || atom instanceof DatavaluedPropertyAtom) && atom.getPredicate().equals(_role.getName()) && ((BinaryAtom) atom).getArgument1() instanceof AtomVariable && ((BinaryAtom) atom).getArgument2() instanceof AtomVariable; }
@Override @SuppressWarnings("rawtypes") public boolean matches(final RuleAtom atom) { return ((atom instanceof IndividualPropertyAtom) || (atom instanceof DatavaluedPropertyAtom)) && atom.getPredicate().equals(_role.getName()) && ((BinaryAtom) atom).getArgument1() instanceof AtomVariable && ((BinaryAtom) atom).getArgument2() instanceof AtomIConstant && ((AtomIConstant) ((BinaryAtom) atom).getArgument2()).getValue().equals(_name); }
@Override @SuppressWarnings("rawtypes") public boolean matches(final RuleAtom atom) { return ((atom instanceof IndividualPropertyAtom) || (atom instanceof DatavaluedPropertyAtom)) && atom.getPredicate().equals(_role.getName()) && ((BinaryAtom) atom).getArgument1() instanceof AtomVariable && ((BinaryAtom) atom).getArgument2() instanceof AtomIConstant && ((AtomIConstant) ((BinaryAtom) atom).getArgument2()).getValue().equals(_name); }
private void addPropertyAtom(final BinaryAtom<ATermAppl, ? extends AtomObject, ? extends AtomObject> atom) { final AtomObject s = atom.getArgument1(); final AtomObject o = atom.getArgument2(); final Role role = _abox.getRole(atom.getPredicate()); if (s instanceof AtomVariable && o instanceof AtomVariable) { if (s.equals(o)) _result = new AlphaReflexiveEdgeNode(_abox, role); else _result = new AlphaEdgeNode(_abox, role); } else if (s instanceof AtomConstant) { if (o instanceof AtomConstant) _result = new AlphaNoVarEdgeNode(_abox, role, ((AtomConstant) s).getValue(), ((AtomConstant) o).getValue()); else _result = new AlphaFixedSubjectEdgeNode(_abox, role, ((AtomConstant) s).getValue()); } else _result = new AlphaFixedObjectEdgeNode(_abox, role, ((AtomConstant) o).getValue()); }
private void addPropertyAtom(final BinaryAtom<ATermAppl, ? extends AtomObject, ? extends AtomObject> atom) { final AtomObject s = atom.getArgument1(); final AtomObject o = atom.getArgument2(); final Role role = _abox.getRole(atom.getPredicate()); if (s instanceof AtomVariable && o instanceof AtomVariable) { if (s.equals(o)) _result = new AlphaReflexiveEdgeNode(_abox, role); else _result = new AlphaEdgeNode(_abox, role); } else if (s instanceof AtomConstant) { if (o instanceof AtomConstant) _result = new AlphaNoVarEdgeNode(_abox, role, ((AtomConstant) s).getValue(), ((AtomConstant) o).getValue()); else _result = new AlphaFixedSubjectEdgeNode(_abox, role, ((AtomConstant) s).getValue()); } else _result = new AlphaFixedObjectEdgeNode(_abox, role, ((AtomConstant) o).getValue()); }
final AtomIObject obj = (AtomIObject) (atom instanceof UnaryAtom ? ((UnaryAtom<?>) atom).getArgument() : ((BinaryAtom<?, ?, ?>) atom).getArgument1()); final Individual ind = _binding.get(obj);
final AtomIObject obj = (AtomIObject) (atom instanceof UnaryAtom ? ((UnaryAtom<?>) atom).getArgument() : ((BinaryAtom<?, ?, ?>) atom).getArgument1()); final Individual ind = _binding.get(obj);