@Override public List<AtomObject> getAllArguments() { List<AtomObject> list = new ArrayList<AtomObject>(2); list.add( getArgument1() ); list.add( getArgument2() ); return list; }
@Override public List<AtomObject> getAllArguments() { List<AtomObject> list = new ArrayList<AtomObject>(2); list.add( getArgument1() ); list.add( getArgument2() ); return list; }
@SuppressWarnings("rawtypes") public boolean matches(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); }
public boolean matches(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); }
public boolean matches(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()); }
@SuppressWarnings("rawtypes") public boolean matches(RuleAtom atom) { return ((atom instanceof IndividualPropertyAtom) || (atom instanceof DatavaluedPropertyAtom)) && atom.getPredicate().equals(role.getName()) && ((BinaryAtom) atom).getArgument1() instanceof AtomVariable && ((BinaryAtom) atom).getArgument2() instanceof AtomVariable; }
@SuppressWarnings("rawtypes") public boolean matches(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; }
private void addPropertyAtom(BinaryAtom<ATermAppl, ? extends AtomObject, ? extends AtomObject> atom) { AtomObject s = atom.getArgument1(); AtomObject o = atom.getArgument2(); 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()); } } }