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: PREFIX nci: PREFIX xsd: PREFIX owl:

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 Seven-prop

Re: Jena-text starts-wth

2013-11-14 Thread Joshua TAYLOR
On Thu, Nov 14, 2013 at 7:42 AM, wrote: > > I am using the following query to get all concepts that start with the word > "Head". > > > PREFIX text: > PREFIX nci: > 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 wrote: > Hi there, > > DateTimeStruct is, well, a struct. The fields are public. You cou

Re: Jena-text starts-wth

2013-11-14 Thread Andy Seaborne
On 14/11/13 14:04, Joshua TAYLOR wrote: On Thu, Nov 14, 2013 at 7:42 AM, wrote: I am using the following query to get all concepts that start with the word "Head". PREFIX text: PREFIX nci: PREFIX xsd:

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

2013-11-14 Thread Martynas Jusevičius
I came up with an approach that concatenates lexical values and doesn't need Calendar or DateTimeStruct. Not sure however how this aligns with the range of time:inXSDDateTime which is xsd:dateTime - can xsd:gYear/xsd:gMonthDay/xsd:date be treated as xsd:dateTime values? I guess I'll have to typeca

Re: Jena-text starts-wth

2013-11-14 Thread hueyl16
Hi Andy, I tried "Head*" but it does not work like "starts-with". "Head*" matches "DICOM Header Tag", which just "Head" does not. So that behaves as expected. But it still does not solve my "starts-with" problem since "DICOM Header Tag" was returned as part of the results in the first place. I

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 wrote: > I came up with an approach that concatenates lexical values and > doesn't need Calendar or DateTimeStruct. > > Not sure however how

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. That'l

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: On Thu, Nov 14, 2013 at 7:10 PM, Andy Seaborne wrote: > On 14/11/13 16:42, Martynas Jusevičius wrote: >> >> OK I was probably too quick - n

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 wrote: > Andy,

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 existi

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 wrote: > On 14/11

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 i

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