Jena-text starts-wth

2013-11-14 Thread hueyl16
Hi, I am using the following query to get all concepts that start with the word Head. PREFIX text: http://jena.apache.org/text# PREFIX nci: http://ncicb.nci.nih.gov/xml/owl/EVS/Thesaurus.owl# PREFIX xsd: http://www.w3.org/2001/XMLSchema# PREFIX owl: http://www.w3.org/2002/07/owl# PREFIX

Re: Building xsd:dateTime from xsd:gYear + xsd:gMonth + xsd:gDay

2013-11-14 Thread Andy Seaborne
Hi there, DateTimeStruct is, well, a struct. The fields are public. You could write a builder to target that. The default constructor could be made public. The statics are specific patterns for the XSD date/time datatypes with validation. DateTimeStruct represents the Date/time

Re: Jena-text starts-wth

2013-11-14 Thread Joshua TAYLOR
On Thu, Nov 14, 2013 at 7:42 AM, huey...@aol.com wrote: I am using the following query to get all concepts that start with the word Head. PREFIX text: http://jena.apache.org/text# PREFIX nci: http://ncicb.nci.nih.gov/xml/owl/EVS/Thesaurus.owl# PREFIX xsd:

Re: Building xsd:dateTime from xsd:gYear + xsd:gMonth + xsd:gDay

2013-11-14 Thread Martynas Jusevičius
I'll try DateTimeStruct again, but that basically means I need my own copy of the class, since I currently cannot extend it to override the private constructor? On Thu, Nov 14, 2013 at 2:15 PM, Andy Seaborne a...@apache.org wrote: Hi there, DateTimeStruct is, well, a struct. The fields are

Re: Building xsd:dateTime from xsd:gYear + xsd:gMonth + xsd:gDay

2013-11-14 Thread Martynas Jusevičius
OK I was probably too quick - now I realized the syntax of xsd:gMonth and xsd:gDay is not so simple... On Thu, Nov 14, 2013 at 4:05 PM, Martynas Jusevičius marty...@graphity.org wrote: I came up with an approach that concatenates lexical values and doesn't need Calendar or DateTimeStruct. Not

Re: Building xsd:dateTime from xsd:gYear + xsd:gMonth + xsd:gDay

2013-11-14 Thread Andy Seaborne
On 14/11/13 16:42, Martynas Jusevičius wrote: OK I was probably too quick - now I realized the syntax of xsd:gMonth and xsd:gDay is not so simple... :-) http://www.w3.org/TR/xmlschema11-2/#dateTime for details. The range of time:month is a non-negative integer so may be single digit.

Re: Building xsd:dateTime from xsd:gYear + xsd:gMonth + xsd:gDay

2013-11-14 Thread Martynas Jusevičius
Andy, now I'm confused. Where are you looking? I checked the RDF/XML version of Time ontology and it says: owl:DatatypeProperty rdf:ID=year rdfs:domain rdf:resource=#DateTimeDescription / rdfs:range rdf:resource=xsd;gYear / /owl:DatatypeProperty owl:DatatypeProperty rdf:ID=month

Re: Building xsd:dateTime from xsd:gYear + xsd:gMonth + xsd:gDay

2013-11-14 Thread Martynas Jusevičius
BTW, there seems to be a related question on StackOverflow: http://answers.semanticweb.com/questions/610/ordering-by-time-in-sparql-query I might just give up building an xsd:dateTime and use separate year/month/day components. On Thu, Nov 14, 2013 at 7:26 PM, Martynas Jusevičius

Re: Building xsd:dateTime from xsd:gYear + xsd:gMonth + xsd:gDay

2013-11-14 Thread Andy Seaborne
On 14/11/13 18:29, Martynas Jusevičius wrote: BTW, there seems to be a related question on StackOverflow: http://answers.semanticweb.com/questions/610/ordering-by-time-in-sparql-query I might just give up building an xsd:dateTime and use separate year/month/day components. On Thu, Nov 14, 2013

Re: Jena-text starts-wth

2013-11-14 Thread Andy Seaborne
See the links to the syntax of Lucene query strings -- if that works for you, you can use it. Even so, if you need to both use text:query and a FILTER, then it's probably faster because there are less triples to consider. Andy PS It helps to start a new thread, not reply to an

Re: Building xsd:dateTime from xsd:gYear + xsd:gMonth + xsd:gDay

2013-11-14 Thread Martynas Jusevičius
OK. One more question - most of the examples I was looking at (like the one from StackOverflow) use simple integer values like 11^^xsd:gMonth, and not the --11^^xsd:gMonth syntax. But strictly speaking, these are illegal values? On Thu, Nov 14, 2013 at 9:11 PM, Andy Seaborne a...@apache.org

Re: Building xsd:dateTime from xsd:gYear + xsd:gMonth + xsd:gDay

2013-11-14 Thread Andy Seaborne
On 14/11/13 20:28, Martynas Jusevičius wrote: OK. One more question - most of the examples I was looking at (like the one from StackOverflow) use simple integer values like 11^^xsd:gMonth, and not the --11^^xsd:gMonth syntax. But strictly speaking, these are illegal values? Yes - strictly

convert Node to Expr

2013-11-14 Thread Tim Harsch
Is there a way to convert from com.hp.hpl.jena.graph.Node to com.hp.hpl.jena.sparql.expr.Expr ? Thanks, Tim