public String toString() { return URIUtils.getLocalName(getPredicate().toString())+"("+getAllArguments()+")"; } }
@Override public String toString() { return atom.toString(); } }
@Override public void visit(SWRLBuiltInAtom atom) { List<AtomDObject> arguments = new ArrayList<AtomDObject>( atom.getAllArguments().size() ); for( SWRLDArgument swrlArg : atom.getArguments() ) { swrlArg.accept( this ); arguments.add( swrlDObject ); } swrlAtom = new BuiltInAtom( atom.getPredicate().toString(), arguments ); }
private boolean isApplicable( Collection<AtomVariable> bound ) { boolean[] boundPositions = new boolean[ atom.getAllArguments().size() ]; for ( int i = 0; i < boundPositions.length; i++ ) { if ( bound.contains( atom.getAllArguments().get( i ) ) ) boundPositions[i] = true; else boundPositions[i] = false; } return function.isApplicable( boundPositions ); }
public void visit(BuiltInAtom atom) { BuiltIn builtin = BuiltInRegistry.instance.getBuiltIn( atom.getPredicate() ); if( builtin.equals( NoSuchBuiltIn.instance ) ) { notUsableMessage = "No builtin for " + atom.getPredicate(); } }
public void visit(SWRLBuiltInAtom atom) { List<AtomDObject> arguments = new ArrayList<AtomDObject>( atom.getAllArguments().size() ); for( SWRLDArgument swrlArg : atom.getArguments() ) { swrlArg.accept( this ); arguments.add( swrlDObject ); } swrlAtom = new BuiltInAtom( atom.getPredicate().toString(), arguments ); }
private boolean isApplicable( Collection<AtomVariable> bound ) { boolean[] boundPositions = new boolean[ atom.getAllArguments().size() ]; for ( int i = 0; i < boundPositions.length; i++ ) { if ( bound.contains( atom.getAllArguments().get( i ) ) ) boundPositions[i] = true; else boundPositions[i] = false; } return function.isApplicable( boundPositions ); }
public void visit(BuiltInAtom atom) { BuiltIn builtin = BuiltInRegistry.instance.getBuiltIn( atom.getPredicate() ); if( builtin.equals( NoSuchBuiltIn.instance ) ) { usable = false; usageMessage = "No builtin for " + atom.getPredicate(); } else { usable = true; } }
if( builtin != null ) { ATermAppl value = (ATermAppl) facetRestriction.getArgument( 1 ); atoms.add( new BuiltInAtom( builtin, var, new AtomDConstant( value ) ) );
public String toString() { return URIUtils.getLocalName(getPredicate().toString())+"("+getAllArguments()+")"; } }
public void rebind(VariableBinding newBinding) { Literal[] arguments = new Literal[ atom.getAllArguments().size() ]; int i = 0; for ( AtomDObject obj : atom.getAllArguments() ) { arguments[i++] = newBinding.get( obj ); } result = test.test( arguments ); }
public void visit(BuiltInAtom atom) { BuiltIn builtIn = BuiltInRegistry.instance.getBuiltIn( atom.getPredicate() ); helpers.add( builtIn.createHelper( atom ) ); }
if( builtin != null ) { ATermAppl value = (ATermAppl) facetRestriction.getArgument( 1 ); atoms.add( new BuiltInAtom( builtin, var, new AtomDConstant( value ) ) );
/** * {@inheritDoc} */ public void visit(BuiltInAtom atom) { int arity = atom.getAllArguments().size(); ATermAppl[] args = new ATermAppl[arity+1]; args[0] = ATermUtils.makeTermAppl( atom.getPredicate() ); int i = 1; for( AtomDObject arg : atom.getAllArguments() ) { args[i++] = translate( arg ); } term = ATermUtils.makeBuiltinAtom( args ); }
public void rebind(VariableBinding newBinding) { Literal[] arguments = new Literal[ atom.getAllArguments().size() ]; int i = 0; for ( AtomDObject obj : atom.getAllArguments() ) { arguments[i++] = newBinding.get( obj ); } result = test.test( arguments ); }
public void visit(BuiltInAtom atom) { BuiltIn builtIn = BuiltInRegistry.instance.getBuiltIn( atom.getPredicate() ); helpers.add( builtIn.createHelper( atom ) ); }
if( builtin != null ) { ATermAppl value = (ATermAppl) facetRestriction.getArgument( 1 ); atoms.add( new BuiltInAtom( builtin, var, new AtomDConstant( value ) ) );
/** * {@inheritDoc} */ public void visit(BuiltInAtom atom) { int arity = atom.getAllArguments().size(); ATermAppl[] args = new ATermAppl[arity+1]; args[0] = ATermUtils.makeTermAppl( atom.getPredicate() ); int i = 1; for( AtomDObject arg : atom.getAllArguments() ) { args[i++] = translate( arg ); } term = ATermUtils.makeBuiltinAtom( args ); }
public Collection<? extends AtomVariable> getBindableVars( Collection<AtomVariable> bound ) { AtomDObject head = null; for ( AtomDObject obj : atom.getAllArguments() ) { if (head == null) { head = obj; // Can only bind first argument to a function if ( !VariableUtils.isVariable( head ) ) return Collections.emptySet(); } else { // Cannot bind a variable that occurs in multiple places. if ( head.equals( obj ) ) return Collections.emptySet(); } } if ( head == null ) return Collections.emptySet(); return Collections.singleton( (AtomVariable) head ); }
public BuiltInCall(ABox abox, BuiltInAtom atom) { this.abox = abox; this.atom = atom; builtin = BuiltInRegistry.instance.getBuiltIn(atom.getPredicate()); helper = builtin.createHelper(atom); }