@Override public boolean hasNext() throws QueryEvaluationException { return !RDF.NIL.equals(list); }
/** * Checks whether the supplied datatype is equal to xsd:integer or one of the * built-in datatypes that is derived from xsd:integer. */ public static boolean isIntegerDatatype(IRI datatype) { return datatype.equals(XMLSchema.INTEGER) || datatype.equals(XMLSchema.LONG) || datatype.equals(XMLSchema.INT) || datatype.equals(XMLSchema.SHORT) || datatype.equals(XMLSchema.BYTE) || datatype.equals(XMLSchema.NON_POSITIVE_INTEGER) || datatype.equals(XMLSchema.NEGATIVE_INTEGER) || datatype.equals(XMLSchema.NON_NEGATIVE_INTEGER) || datatype.equals(XMLSchema.POSITIVE_INTEGER) || datatype.equals(XMLSchema.UNSIGNED_LONG) || datatype.equals(XMLSchema.UNSIGNED_INT) || datatype.equals(XMLSchema.UNSIGNED_SHORT) || datatype.equals(XMLSchema.UNSIGNED_BYTE); }
public boolean matches(HandshakeSequence other) { return !other.actor.equals(actor) && !matched && !other.matched && ((other.firstPeak >= firstPeak && other.firstPeak <= latestPeak && latestPeak >= other.firstPeak && latestPeak <= other.latestPeak) || (firstPeak >= other.firstPeak && firstPeak <= other.latestPeak && other.latestPeak >= firstPeak && other.latestPeak <= latestPeak)); } }
/** * Checks whether the supplied datatype is equal to xsd:dateTime, xsd:date, * xsd:time, xsd:gYearMonth, xsd:gMonthDay, xsd:gYear, xsd:gMonth or * xsd:gDay. These are the primitive datatypes that represent dates and/or * times. * * @see XMLGregorianCalendar */ public static boolean isCalendarDatatype(IRI datatype) { return datatype.equals(XMLSchema.DATETIME) || datatype.equals(XMLSchema.DATE) || datatype.equals(XMLSchema.TIME) || datatype.equals(XMLSchema.GYEARMONTH) || datatype.equals(XMLSchema.GMONTHDAY) || datatype.equals(XMLSchema.GYEAR) || datatype.equals(XMLSchema.GMONTH) || datatype.equals(XMLSchema.GDAY); }
@Override public boolean isRecognizedDatatype(IRI datatypeUri) { if (datatypeUri == null) { throw new NullPointerException("Datatype URI cannot be null"); } return org.openrdf.model.vocabulary.RDF.LANGSTRING.equals(datatypeUri) || org.openrdf.model.vocabulary.RDF.XMLLITERAL.equals(datatypeUri) || org.openrdf.model.vocabulary.RDF.HTML.equals(datatypeUri); }
/** * Creates a new SeRQL Parser test. */ public SeRQLParserTestCase(String name, String queryFile, Value result) { super(name); this.queryFile = queryFile; if (!(MFX_CORRECT.equals(result) || MFX_PARSE_ERROR.equals(result))) { throw new IllegalArgumentException("unknown result type: " + result); } this.result = result; }
@Override public boolean isRecognizedDatatype(IRI datatypeUri) { if (datatypeUri == null) { throw new NullPointerException("Datatype URI cannot be null"); } return VIRTRDF_GEOMETRY.equals(datatypeUri); }
public boolean matches(Handoff other) { return !other.actor.equals(actor) && !matched && !other.matched && Math.abs(timeOfSpike - other.timeOfSpike) <= SPIKE_MAX_GAP; } }
public boolean matches(final Clap other) { return !other.actor.equals(actor) && Math.abs(other.timeOfPeak - timeOfPeak) < PEAK_MAX_GAP; } }
/** * Checks whether the supplied datatype is equal to xsd:decimal or one of the * built-in datatypes that is derived from xsd:decimal. */ public static boolean isDecimalDatatype(IRI datatype) { return datatype.equals(XMLSchema.DECIMAL) || isIntegerDatatype(datatype); }
@Override public void statementRemoved(Statement st) { if (RDFS.SUBCLASSOF.equals(st.getPredicate())) { resetClasses(); } } }
/** * Checks whether the supplied value is a "plain literal". A "plain literal" * is a literal with no datatype and optionally a language tag. * * @see <a * href="http://www.w3.org/TR/2004/REC-rdf-concepts-20040210/#dfn-plain-literal">RDF * Literal Documentation</a> */ public static boolean isPlainLiteral(Value v) { if (v instanceof Literal) { Literal l = (Literal)v; return (l.getDatatype().equals(XMLSchema.STRING)); } return false; }
private boolean accept(Resource s, IRI p, Value o, Resource... c) { if (subj != null && !subj.equals(s)) { return false; } if (pred != null && !pred.equals(p)) { return false; } if (obj != null && !obj.equals(o)) { return false; } if (!matches(c, contexts)) { return false; } return (s == null || s instanceof Resource) && (p == null || p instanceof IRI); }
protected void writePredicate(IRI predicate) throws IOException { if (predicate.equals(RDF.TYPE)) { // Write short-cut for rdf:type writer.write("a"); } else { writeURI(predicate); } }
/** * Checks whether the supplied literal is a "simple literal". A * "simple literal" is a literal with no language tag and the datatype * {@link XMLSchema#STRING}. * * @see <a href="http://www.w3.org/TR/sparql11-query/#simple_literal">SPARQL * Simple Literal Documentation</a> */ public static boolean isSimpleLiteral(Literal l) { return !Literals.isLanguageLiteral(l) && l.getDatatype().equals(XMLSchema.STRING); }
@Override public void statementAdded(Statement st) { if (RDFS.SUBCLASSOF.equals(st.getPredicate()) && st.getObject() instanceof Resource) { resetClasses(); } }
/** * Checks whether the supplied literal is a "string literal". A "string * literal" is either a simple literal, a plain literal with language tag, or * a literal with datatype xsd:string. * * @see <a href="http://www.w3.org/TR/sparql11-query/#func-string">SPARQL * Functions on Strings Documentation</a> */ public static boolean isStringLiteral(Literal l) { IRI datatype = l.getDatatype(); return Literals.isLanguageLiteral(l) || datatype.equals(XMLSchema.STRING); }
private static boolean isSupportedDatatype(IRI datatype) { return (XMLSchema.STRING.equals(datatype) || XMLDatatypeUtil.isNumericDatatype(datatype) || XMLDatatypeUtil.isCalendarDatatype(datatype)); } }