@Override public void visit(SWRLIndividualArgument iobj) { iobj.getIndividual().accept( this ); swrlIObject = new AtomIConstant( term ); }
public Individual set( AtomIVariable key, ATermAppl value ) { AtomIConstant constant = new AtomIConstant( value ); IndividualValueCollector collector = new IndividualValueCollector(); constant.accept( collector ); return set( key, collector.getValue() ); }
/** * {@inheritDoc} */ public void visit(AtomIConstant constant) { term = constant.getValue(); }
public void visit(SWRLIndividualArgument iobj) { iobj.getIndividual().accept( this ); swrlIObject = new AtomIConstant( term ); }
public Individual set( AtomIVariable key, ATermAppl value ) { AtomIConstant constant = new AtomIConstant( value ); IndividualValueCollector collector = new IndividualValueCollector(); constant.accept( collector ); return set( key, collector.getValue() ); }
/** * {@inheritDoc} */ public void visit(AtomIConstant constant) { term = constant.getValue(); }
private AtomIObject convertAtomIObject(ATermAppl t) { if( ATermUtils.isVar( t ) ) return new AtomIVariable( ((ATermAppl) t.getArgument( 0 )).getName() ); else if( kb.isIndividual( t ) ) return new AtomIConstant( t ); else if( ATermUtils.isAnon( t ) ) return new AtomIConstant( t ); throw new InternalReasonerException( "Unrecognized term: " + t ); }
private boolean argMatches(ClassAtom atom) { AtomObject arg = atom.getArgument(); return name == null ? arg instanceof AtomVariable : (arg instanceof AtomIConstant && ((AtomIConstant) arg).getValue().equals(name)); }
private AtomIObject convertAtomIObject(ATermAppl t) { if( ATermUtils.isVar( t ) ) return new AtomIVariable( ((ATermAppl) t.getArgument( 0 )).getName() ); else if( kb.isIndividual( t ) ) return new AtomIConstant( t ); else if( ATermUtils.isAnon( t ) ) return new AtomIConstant( t ); throw new InternalReasonerException( "Unrecognized term: " + t ); }
public void visit( AtomIConstant constant ) { abox.copyOnWrite(); value = abox.getIndividual( constant.getValue() ); }
AtomIConstant arg = new AtomIConstant( nominal ); RuleAtom atom = new IndividualPropertyAtom( p, var, arg ); atoms.add(atom);
public void visit( AtomIConstant constant ) { abox.copyOnWrite(); value = abox.getIndividual( constant.getValue() ); }
AtomIConstant arg = new AtomIConstant( nominal ); RuleAtom atom = new IndividualPropertyAtom( p, var, arg ); atoms.add(atom);
public String toString() { return URIUtils.getLocalName( getValue().getName() ); }
AtomIConstant arg = new AtomIConstant( nominal ); RuleAtom atom = new IndividualPropertyAtom( p, var, arg ); atoms.add(atom);
public String toString() { return URIUtils.getLocalName( getValue().getName() ); }
AtomIConstant arg = new AtomIConstant( nominal ); RuleAtom atom = new IndividualPropertyAtom( p, var, arg ); atoms.add(atom);
public void visit(AtomIConstant constant) { abox.copyOnWrite(); Individual individual = abox.getIndividual(constant.getValue()); // if (individual.isMerged()) { // dependency = individual.getMergeDependency(true); // individual = individual.getSame(); // } result = new ConstantNodeProvider(individual); }
private AtomIObject createRuleIObject(Node node) { if( hasObject( node, RDF.type.asNode(), SWRL.Variable.asNode() ) ) { return new AtomIVariable( node.getURI() ); } else { ATermAppl term = node2term( node ); if( defineIndividual( term ) ) { return new AtomIConstant( node2term( node ) ); } else { addUnsupportedFeature( "Cannot create rule individual object for node " + node ); return null; } } }
@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; }