/** * Get body predicates * * @param pom * @return */ public List<Predicate> getBodyPredicates(PredicateObjectMap pom) { List<Predicate> bodyPredicates = new ArrayList<Predicate>(); // process PREDICATEs for (PredicateMap pm : pom.getPredicateMaps()) { String pmConstant = pm.getConstant(); if (pmConstant != null) { Predicate bodyPredicate = fac.getPredicate(pmConstant, 2); bodyPredicates.add(bodyPredicate); } } return bodyPredicates; }
public static Predicate createPredicateFromRelation(RelationDefinition r) { RelationID id = r.getID(); String name = id.getSchemaName(); if (name == null) name = id.getTableName(); else name = name + "." + id.getTableName(); Predicate pred = fac.getPredicate(name, r.getAttributes().size()); return pred; }
if (elements == null) elements = new Vector<Term>(); Predicate predicate = dfac.getPredicate(uri, elements.size());
ValueConstant vconst = (ValueConstant) term0; String predName = vconst.getValue(); Predicate newpred = fac.getPredicate(predName, 1); Function bodyAtom = fac.getFunction(newpred, subjectAtom); body.add(bodyAtom);
Predicate functionSymbol = dfac.getPredicate(functionName, arity); value = dfac.getFunction(functionSymbol, terms21);
Predicate predicate = dfac.getPredicate(name, size); Function newhead = dfac.getFunction(predicate, variableList); rule.updateHead(newhead);
value = dfac.getTypedTerm(terms31.get(0), type); else { functionSymbol = dfac.getPredicate(functionName, arity); value = dfac.getFunction(functionSymbol, terms31);
if (predf.getTerms().size() == 1) //fixed string pred = OBDADataFactoryImpl.getInstance().getPredicate(((ValueConstant)(predf.getTerm(0))).getValue(), 1); predUri = vf.createURI(pred.getName());
ValueConstant pr = (ValueConstant) ((Function) pred).getTerm(0); if (object instanceof Variable) { predicate = dfac.getPredicate(pr.getValue(), 2); } else { if (object instanceof Function) {
if (predf.getFunctionSymbol() instanceof URITemplatePredicate) { if (predf.getTerms().size() == 1) { //fixed string pred = OBDADataFactoryImpl.getInstance().getPredicate(((ValueConstant)(predf.getTerm(0))).getValue(), 1); predUri = vf.createURI(pred.getName());