/** * Checks if the atom is unary or not. */ private static boolean isUnary(Function atom) { return atom.getArity() == 1 ? true : false; }
public static boolean isBoolean(CQIE query) { return query.getHead().getArity() == 0; }
/** * check if the term is {@code URI("http://www.w3.org/1999/02/22-rdf-syntax-ns#type")} * @param term * @return */ private static boolean isURIRDFType(Term term) { boolean result = true; if(term instanceof Function){ Function func = (Function) term; if (func.getArity() != 1){ result = false; } else { result = result && (func.getFunctionSymbol() instanceof URITemplatePredicate); result = result && (func.getTerm(0) instanceof ValueConstant) && ((ValueConstant) func.getTerm(0)).getValue(). equals(OBDAVocabulary.RDF_TYPE); } } else { result = false; } return result; }
int arity = function.getArity(); if (arity == 1) {