Re: Writing an ARQ Extension Function

2018-08-10 Thread Andy Seaborne
On 10/08/18 14:57, Arunkumar Krishnamoorthy wrote: So i need to change this function to dateTime?, NodeValue date = NodeValue.makeDate(lastModified); is "make date" That is something you can try in your program - rather than email. Please also read the javadoc for

Re: Writing an ARQ Extension Function

2018-08-10 Thread Arunkumar Krishnamoorthy
So i need to change this function to dateTime?, NodeValue date = NodeValue.makeDate(lastModified); is "make date" On Fri, Aug 10, 2018 at 9:51 AM, Andy Seaborne wrote: > > > On 10/08/18 14:36, Arunkumar Krishnamoorthy wrote: > >> Even i don't know where that particular date is coming from.

Re: Writing an ARQ Extension Function

2018-08-10 Thread Andy Seaborne
On 10/08/18 14:36, Arunkumar Krishnamoorthy wrote: Even i don't know where that particular date is coming from. The dataset is attached. if it is not in the data and not in query, then it is in your code. What about URLConnection.getLastModifed? NB: You are in timezone +05:00 judging by

Re: Writing an ARQ Extension Function

2018-08-10 Thread Arunkumar Krishnamoorthy
Even i don't know where that particular date is coming from. The dataset is attached. On Fri, Aug 10, 2018 at 3:57 AM, Andy Seaborne wrote: > >> But i have given the type as xsd:dateTime, so it should take it right? > > The computer says otherwise. > > >>myfn:LastModified(?r) > > >>

Re: Writing an ARQ Extension Function

2018-08-10 Thread Andy Seaborne
>> But i have given the type as xsd:dateTime, so it should take it right? The computer says otherwise. >>myfn:LastModified(?r) > >> "2005-11-06T00:00:00Z"^^xsd:dateTime ) "2005-11-06T00:00:00Z"^^xsd:dateTime is OK >> "1969-12-31T19:00:00"^^xsd:date Not OK. Find out where

Re: Writing an ARQ Extension Function

2018-08-09 Thread Lorenz Buehmann
which type? in the function or in the data? both have to match, there is no implicit conversion I guess. On 09.08.2018 21:29, Arunkumar Krishnamoorthy wrote: > But i have given the type as xsd:dateTime, so it should take it right? > > On Thu, Aug 9, 2018 at 3:24 PM, ajs6f wrote: > >>> 13:44:11

Re: Writing an ARQ Extension Function

2018-08-09 Thread Arunkumar Krishnamoorthy
But i have given the type as xsd:dateTime, so it should take it right? On Thu, Aug 9, 2018 at 3:24 PM, ajs6f wrote: > > 13:44:11 WARN NodeValue:: Datatype format exception: > > "1969-12-31T19:00:00"^^xsd:date > > No, Jena is just telling you (quite correctly) that

Re: Writing an ARQ Extension Function

2018-08-09 Thread ajs6f
> 13:44:11 WARN NodeValue:: Datatype format exception: > "1969-12-31T19:00:00"^^xsd:date No, Jena is just telling you (quite correctly) that "1969-12-31T19:00:00" is not an xsd:date. Notice the time that is included. xsd:date does not include time. ajs6f > On Aug 9, 2018, at 2:35

Re: Writing an ARQ Extension Function

2018-08-09 Thread Andy Seaborne
Good question - there is still a noticeable tail of com.hp.hpl, here and on Stackoverflow. Some is due to old apps; that is good in that the software is useful enough to be used for such a long time. I suspect that some of the rest is university courses providing the materials that have not

Re: Writing an ARQ Extension Function

2018-08-08 Thread Lorenz Buehmann
I'm always wondering how people that are new to Apache Jena still use the old version. I mean, the first hit via Google is the Apache Jena webpage which clearly refers to the latest version. In the current case, he just copied the code example from [1] which indeed uses the old version given that

Re: Writing an ARQ Extension Function

2018-08-08 Thread Andy Seaborne
com.hp.hpl.jena -- that's Jena2. Packages are "org.apache.jena" in Jena3. The code seems to have been compiled against Jena2 and run against Jena3. That won't work. Andy On 08/08/18 18:14, Arunkumar Krishnamoorthy wrote: The java code i am executing is, package samplejena; import

Re: Writing an ARQ Extension Function

2018-08-08 Thread Arunkumar Krishnamoorthy
The java code i am executing is, package samplejena; import com.hp.hpl.jena.query.expr.NodeValue; import com.hp.hpl.jena.query.function.FunctionBase1; import java.net.*; import java.text.SimpleDateFormat; import java.util.*; public class LastModified extends FunctionBase1 { private static

Re: Writing an ARQ Extension Function

2018-08-08 Thread Arunkumar Krishnamoorthy
Hello Andy, I am getting the following issue when i run the code, Caused by: java.lang.ClassNotFoundException: com.hp.hpl.jena.query.function.FunctionBase1 at java.net.URLClassLoader.findClass(URLClassLoader.java:381) at java.lang.ClassLoader.loadClass(ClassLoader.java:424) at

Re: Writing an ARQ Extension Function

2018-08-07 Thread Arunkumar Krishnamoorthy
It is executing now Andy. Thanks a lot. I missed to add the directory. Thanks again for this help. On Tue, Aug 7, 2018 at 2:06 PM, Andy Seaborne wrote: > > > On 07/08/18 18:07, Arunkumar Krishnamoorthy wrote: > >> So my JENA_CP >> is JENA_CP='/home/ak/Downloads/apache-jena-3.8.0/lib/*:/home/ak

Re: Writing an ARQ Extension Function

2018-08-07 Thread Andy Seaborne
On 07/08/18 18:07, Arunkumar Krishnamoorthy wrote: So my JENA_CP is JENA_CP='/home/ak/Downloads/apache-jena-3.8.0/lib/*:/home/ak/Documents'. Does the file /home/ak/Documents/samplejena/LastModified.class exist? /home/ak/Documents location has the classfile/jar of the code But still

Re: Writing an ARQ Extension Function

2018-08-07 Thread Arunkumar Krishnamoorthy
So my JENA_CP is JENA_CP='/home/ak/Downloads/apache-jena-3.8.0/lib/*:/home/ak/Documents'. /home/ak/Documents location has the classfile/jar of the code But still when i run this command, /home/ak/Downloads/apache-jena-3.8.0/bin/arq --data /home/ak/Desktop/dataset.rdf --query

Re: Writing an ARQ Extension Function

2018-08-07 Thread Andy Seaborne
The list doesn't accept attachments. >> JENA_CP="$JENA_HOME"'/home/ak/Documents' This needs to be a valid java classpath. $JENA_HOME is directory of the Jena installation. In the original it says: JENA_CP="$JENA_HOME"'/lib/*' the .../lib/* (NB single quotes - no * expansion) puts all the

Re: Writing an ARQ Extension Function

2018-08-07 Thread Arunkumar Krishnamoorthy
;> On 06/08/18 19:09, Arunkumar Krishnamoorthy wrote: >> >> Hello All, >> >> I am following the link below to write an ARQ extension function, >> >> https://blog.ldodds.com/2005/11/07/writing-an-arq-extension- >> f