Re: [Virtuoso-users] Library to parse SPARQL queries

2015-06-25 Thread Cong Kinh Nguyen
Hi Lorenz,

In fact, we also need to parse the queries because we need to get Expr, 
Triple, etc. from the queries. We've augmented the queries based on Expr 
and Triple. Do you know how to overcome this? Thanks a lot!

Best regards,
Kinh

On 25/06/15 16:54, Lorenz Bühmann wrote:
> Hello Cong,
>
> the problem is that the first query is illegal SPARQL Syntax, but 
> Virtuoso allows such queries nevertheless.
>
> You can avoid the parsing to a Query object if you use the 
> QueryEngineHttp class instead, which only works with the query string 
> and does not do any syntax checks.
>
> Lorenz
>
>> Hi Lorena, Lorenz,
>>
>> Thanks for your information. Sorry, I didn't check carefully the 
>> documentation about SPARQL1.1 before picking an example 'IN' in the 
>> SPARQL. Basically, we've created restful service for augmenting 
>> SPARQL queries. The queries are created by third party and sent to 
>> the rest endpoint to execute. The queries could be successfully run 
>> with SPARQL endpoint of Virtuoso. However, our Restful endpoint was 
>> failed to run such queries. The root cause was that Apache Jena 
>> library didn't understand the queries sent by third party. I just 
>> tested a real case we already had:
>>
>> select ?s as ?s1 ?p ?o
>> where {
>> ?s ?p ?o
>> }
>> limit 100
>>
>> This query is very simple, okay with Virtuoso, but failed with Apache 
>> Jena. For Apache Jena, we need to do something like:
>> select (?s as ?s1) ?p ?o
>> where {
>> ?s ?p ?o
>> }
>> limit 100
>>
>> But, basically SPARQL queries are sent by other people to our Restful 
>> service, they just test the queries with SPARQL endpoint of Virtuoso, 
>> then they expected it would work with our Restful service. Does 
>> anyone of you know any possible solution for our issue. Thanks!
>>
>> Best regards,
>> Kinh
>>
>> On 25/06/15 16:03, Lorenz Bühmann wrote:
>>> Apache JENA supports full SPARQL 1.1 and thus also FILTER IN clause.
>>>
>>> Lorenz
>>>> Hi Lorena,
>>>>
>>>> Thanks Lorena. Indeed, this Javascript library seems so powerful. I 
>>>> just
>>>> had a quick look and found that the library also supported 'IN'.
>>>> However, sorry to not mention in the first message, I'm actually using
>>>> JAVA. Does you know a solution for this?
>>>>
>>>> Best regards,
>>>> Kinh
>>>>
>>>> On 25/06/15 15:36, Lorena Etcheverry wrote:
>>>>> Hi Kinh.
>>>>>
>>>>> I've been using this javascript SPARQL parser for a while and it's 
>>>>> very
>>>>> good.
>>>>>
>>>>> http://ruben.verborgh.org/blog/2014/08/22/writing-a-sparql-parser-in-javascript/
>>>>>  
>>>>>
>>>>>
>>>>> best
>>>>> lorena
>>>>>
>>>>> On 06/25/2015 10:15 AM, Cong Kinh Nguyen wrote:
>>>>>> Hi everybody,
>>>>>>
>>>>>> I have been using Jena library to parse SPARQL query. However, 
>>>>>> Virtuoso
>>>>>> supports a lot more than Jena. Could anyone tell me if there was any
>>>>>> libraries for parsing SPARQL queries with extensible features (for
>>>>>> example: support 'IN', etc.) in Virtuoso? Thanks in advance!
>>>>>>
>>>>>> Best regards,
>>>>>> Kinh
>>>>>>
>>>>>> --
>>>>>>  
>>>>>>
>>>>>> Monitor 25 network devices or servers for free with OpManager!
>>>>>> OpManager is web-based network management software that monitors
>>>>>> network devices and physical & virtual servers, alerts via email 
>>>>>> & sms
>>>>>> for fault. Monitor 25 devices for free with no restriction. 
>>>>>> Download now
>>>>>> http://ad.doubleclick.net/ddm/clk/292181274;119417398;o
>>>>>> ___
>>>>>> Virtuoso-users mailing list
>>>>>> Virtuoso-users@lists.sourceforge.net
>>>>>> https://lists.sourceforge.net/lists/listinfo/virtuoso-users
>>>> --
>>>>  
>>>>
>>>> Monitor 25 network devices or servers for free with OpManager!
>>>> OpManager is web-based network management software that monitors
>>>> network devices and physical & virtual servers, alerts via email & sms
>>>> for fault. Monitor 25 devices for free with no restriction. 
>>>> Download now
>>>> http://ad.doubleclick.net/ddm/clk/292181274;119417398;o
>>>> ___
>>>> Virtuoso-users mailing list
>>>> Virtuoso-users@lists.sourceforge.net
>>>> https://lists.sourceforge.net/lists/listinfo/virtuoso-users
>>>>
>>>>
>>
>>
>>


--
Monitor 25 network devices or servers for free with OpManager!
OpManager is web-based network management software that monitors 
network devices and physical & virtual servers, alerts via email & sms 
for fault. Monitor 25 devices for free with no restriction. Download now
http://ad.doubleclick.net/ddm/clk/292181274;119417398;o
___
Virtuoso-users mailing list
Virtuoso-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/virtuoso-users


Re: [Virtuoso-users] Library to parse SPARQL queries

2015-06-25 Thread Cong Kinh Nguyen
Hi Lorena, Lorenz,

Thanks for your information. Sorry, I didn't check carefully the 
documentation about SPARQL1.1 before picking an example 'IN' in the 
SPARQL. Basically, we've created restful service for augmenting SPARQL 
queries. The queries are created by third party and sent to the rest 
endpoint to execute. The queries could be successfully run with SPARQL 
endpoint of Virtuoso. However, our Restful endpoint was failed to run 
such queries. The root cause was that Apache Jena library didn't 
understand the queries sent by third party. I just tested a real case we 
already had:

select ?s as ?s1 ?p ?o
where {
?s ?p ?o
}
limit 100

This query is very simple, okay with Virtuoso, but failed with Apache 
Jena. For Apache Jena, we need to do something like:
select (?s as ?s1) ?p ?o
where {
?s ?p ?o
}
limit 100

But, basically SPARQL queries are sent by other people to our Restful 
service, they just test the queries with SPARQL endpoint of Virtuoso, 
then they expected it would work with our Restful service. Does anyone 
of you know any possible solution for our issue. Thanks!

Best regards,
Kinh

On 25/06/15 16:03, Lorenz Bühmann wrote:
> Apache JENA supports full SPARQL 1.1 and thus also FILTER IN clause.
>
> Lorenz
>> Hi Lorena,
>>
>> Thanks Lorena. Indeed, this Javascript library seems so powerful. I just
>> had a quick look and found that the library also supported 'IN'.
>> However, sorry to not mention in the first message, I'm actually using
>> JAVA. Does you know a solution for this?
>>
>> Best regards,
>> Kinh
>>
>> On 25/06/15 15:36, Lorena Etcheverry wrote:
>>> Hi Kinh.
>>>
>>> I've been using this javascript SPARQL parser for a while and it's very
>>> good.
>>>
>>> http://ruben.verborgh.org/blog/2014/08/22/writing-a-sparql-parser-in-javascript/
>>>
>>> best
>>> lorena
>>>
>>> On 06/25/2015 10:15 AM, Cong Kinh Nguyen wrote:
>>>> Hi everybody,
>>>>
>>>> I have been using Jena library to parse SPARQL query. However, Virtuoso
>>>> supports a lot more than Jena. Could anyone tell me if there was any
>>>> libraries for parsing SPARQL queries with extensible features (for
>>>> example: support 'IN', etc.) in Virtuoso? Thanks in advance!
>>>>
>>>> Best regards,
>>>> Kinh
>>>>
>>>> --
>>>> Monitor 25 network devices or servers for free with OpManager!
>>>> OpManager is web-based network management software that monitors
>>>> network devices and physical & virtual servers, alerts via email & sms
>>>> for fault. Monitor 25 devices for free with no restriction. Download now
>>>> http://ad.doubleclick.net/ddm/clk/292181274;119417398;o
>>>> ___
>>>> Virtuoso-users mailing list
>>>> Virtuoso-users@lists.sourceforge.net
>>>> https://lists.sourceforge.net/lists/listinfo/virtuoso-users
>> --
>> Monitor 25 network devices or servers for free with OpManager!
>> OpManager is web-based network management software that monitors
>> network devices and physical & virtual servers, alerts via email & sms
>> for fault. Monitor 25 devices for free with no restriction. Download now
>> http://ad.doubleclick.net/ddm/clk/292181274;119417398;o
>> ___
>> Virtuoso-users mailing list
>> Virtuoso-users@lists.sourceforge.net
>> https://lists.sourceforge.net/lists/listinfo/virtuoso-users
>>
>>


--
Monitor 25 network devices or servers for free with OpManager!
OpManager is web-based network management software that monitors 
network devices and physical & virtual servers, alerts via email & sms 
for fault. Monitor 25 devices for free with no restriction. Download now
http://ad.doubleclick.net/ddm/clk/292181274;119417398;o
___
Virtuoso-users mailing list
Virtuoso-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/virtuoso-users


Re: [Virtuoso-users] Library to parse SPARQL queries

2015-06-25 Thread Cong Kinh Nguyen
Hi Lorena,

Thanks Lorena. Indeed, this Javascript library seems so powerful. I just 
had a quick look and found that the library also supported 'IN'. 
However, sorry to not mention in the first message, I'm actually using 
JAVA. Does you know a solution for this?

Best regards,
Kinh

On 25/06/15 15:36, Lorena Etcheverry wrote:
> Hi Kinh.
>
> I've been using this javascript SPARQL parser for a while and it's very
> good.
>
> http://ruben.verborgh.org/blog/2014/08/22/writing-a-sparql-parser-in-javascript/
>
> best
> lorena
>
> On 06/25/2015 10:15 AM, Cong Kinh Nguyen wrote:
>> Hi everybody,
>>
>> I have been using Jena library to parse SPARQL query. However, Virtuoso
>> supports a lot more than Jena. Could anyone tell me if there was any
>> libraries for parsing SPARQL queries with extensible features (for
>> example: support 'IN', etc.) in Virtuoso? Thanks in advance!
>>
>> Best regards,
>> Kinh
>>
>> --
>> Monitor 25 network devices or servers for free with OpManager!
>> OpManager is web-based network management software that monitors
>> network devices and physical & virtual servers, alerts via email & sms
>> for fault. Monitor 25 devices for free with no restriction. Download now
>> http://ad.doubleclick.net/ddm/clk/292181274;119417398;o
>> ___
>> Virtuoso-users mailing list
>> Virtuoso-users@lists.sourceforge.net
>> https://lists.sourceforge.net/lists/listinfo/virtuoso-users


--
Monitor 25 network devices or servers for free with OpManager!
OpManager is web-based network management software that monitors 
network devices and physical & virtual servers, alerts via email & sms 
for fault. Monitor 25 devices for free with no restriction. Download now
http://ad.doubleclick.net/ddm/clk/292181274;119417398;o
___
Virtuoso-users mailing list
Virtuoso-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/virtuoso-users


[Virtuoso-users] Library to parse SPARQL queries

2015-06-25 Thread Cong Kinh Nguyen
Hi everybody,

I have been using Jena library to parse SPARQL query. However, Virtuoso 
supports a lot more than Jena. Could anyone tell me if there was any 
libraries for parsing SPARQL queries with extensible features (for 
example: support 'IN', etc.) in Virtuoso? Thanks in advance!

Best regards,
Kinh

--
Monitor 25 network devices or servers for free with OpManager!
OpManager is web-based network management software that monitors 
network devices and physical & virtual servers, alerts via email & sms 
for fault. Monitor 25 devices for free with no restriction. Download now
http://ad.doubleclick.net/ddm/clk/292181274;119417398;o
___
Virtuoso-users mailing list
Virtuoso-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/virtuoso-users


Re: [Virtuoso-users] Virtuoso goes down if the number of concurrent connections to Virtuoso is greater than maximal connections defined in virtuoso.ini

2015-02-03 Thread Cong Kinh Nguyen

Hi Hugh,

If I increase number of maximal connections, it will be okay. However, I 
was wondering if there would be a way to prevent Virtuoso from being 
died when the number of concurrent connections is greater than the 
number of maximal connections defined in the virtuoso.ini file.

You find a copy of virtuoso.ini in the enclosed file. Thanks!

On 31/01/15 05:09, Hugh Williams wrote:

Hi Cong,

I compiled your test app and it runs successfully against my Linux develop7 
build:


VIRTMAIN@vpn184:~/binsrc/jena2/virtuoso_driver$ javac -classpath 
".:../lib/junit-4.5.jar:../lib/jena-arq-2.10.1.jar:../lib/jena-iri-0.9.6.jar:../lib/jena-core-2.10.1.jar:../lib/jena-core-2.10.1-tests.jar:../../../libsrc/JDBCDriverType4/virtjdbc4.jar:../virt_jena2.jar:../lib/jcl-over-slf4j-1.6.4.jar:../lib/log4j-1.2.16.jar:../lib/slf4j-api-1.6.4.jar:../lib/slf4j-log4j12-1.6.4.jar:../lib/xercesImpl-2.11.0.jar:../lib/xml-apis-1.4.01.jar"
 Main1.java
VIRTMAIN@vpn184:~/binsrc/jena2/virtuoso_driver$ java -classpath 
".:../lib/junit-4.5.jar:../lib/jena-arq-2.10.1.jar:../lib/jena-iri-0.9.6.jar:../lib/jena-core-2.10.1.jar:../lib/jena-core-2.10.1-tests.jar:../../../libsrc/JDBCDriverType4/virtjdbc4.jar:../virt_jena2.jar:../lib/jcl-over-slf4j-1.6.4.jar:../lib/log4j-1.2.16.jar:../lib/slf4j-api-1.6.4.jar:../lib/slf4j-log4j12-1.6.4.jar:../lib/xercesImpl-2.11.0.jar:../lib/xml-apis-1.4.01.jar"
 Main1
log4j:WARN No appenders could be found for logger 
(com.hp.hpl.jena.util.FileManager).
log4j:WARN Please initialize the log4j system properly.
log4j:WARN See http://logging.apache.org/log4j/1.2/faq.html#noconfig for more 
info.
VIRTMAIN@vpn184:~/binsrc/jena2/virtuoso_driver$

SQL> status('');
REPORT
VARCHAR
___

OpenLink Virtuoso  Server
Version 07.10.3211-pthreads for Linux as of Jan 24 2015
Started on: 2015-01-26 18:33 GMT+1


Can you provide a copy of your virtuoso.ini for comparison ?

Best Regards
Hugh Williams
Professional Services
OpenLink Software, Inc.  //  http://www.openlinksw.com/
Weblog   -- http://www.openlinksw.com/blogs/
LinkedIn -- http://www.linkedin.com/company/openlink-software/
Twitter  -- http://twitter.com/OpenLink
Google+  -- http://plus.google.com/100570109519069333827/
Facebook -- http://www.facebook.com/OpenLinkSoftware
Universal Data Access, Integration, and Management Technology Providers



Best regards,
Kinh
;
;  virtuoso.ini
;
;  Configuration file for the OpenLink Virtuoso VDBMS Server
;
;  To learn more about this product, or any other product in our
;  portfolio, please check out our web site at:
;
;  http://virtuoso.openlinksw.com/
;
;  or contact us at:
;
;  general.informat...@openlinksw.com
;
;  If you have any technical questions, please contact our support
;  staff at:
;
;  technical.supp...@openlinksw.com
;

;
;  Database setup
;
[Database]
DatabaseFile= 
/usr/local/virtuoso-opensource/var/lib/virtuoso/db/virtuoso.db
ErrorLogFile= 
/usr/local/virtuoso-opensource/var/lib/virtuoso/db/virtuoso.log
LockFile= 
/usr/local/virtuoso-opensource/var/lib/virtuoso/db/virtuoso.lck
TransactionFile = 
/usr/local/virtuoso-opensource/var/lib/virtuoso/db/virtuoso.trx
xa_persistent_file  = 
/usr/local/virtuoso-opensource/var/lib/virtuoso/db/virtuoso.pxa
ErrorLogLevel   = 7
FileExtend  = 200
MaxCheckpointRemap  = 2000
Striping= 0
TempStorage = TempDatabase


[TempDatabase]
DatabaseFile= 
/usr/local/virtuoso-opensource/var/lib/virtuoso/db/virtuoso-temp.db
TransactionFile = 
/usr/local/virtuoso-opensource/var/lib/virtuoso/db/virtuoso-temp.trx
MaxCheckpointRemap  = 2000
Striping= 0


;
;  Server parameters
;
[Parameters]
ServerPort  = 
LiteMode= 0
DisableUnixSocket   = 1
DisableTcpSocket= 0
;SSLServerPort  = 2111
;SSLCertificate = cert.pem
;SSLPrivateKey  = pk.pem
;X509ClientVerify   = 0
;X509ClientVerifyDepth  = 0
;X509ClientVerifyCAFile = ca.pem
MaxClientConnections= 10
CheckpointInterval  = 60
O_DIRECT= 0
CaseMode= 2
MaxStaticCursorRows = 5000
CheckpointAuditTrail= 0
AllowOSCalls= 0
SchedulerInterval   = 10
DirsAllowed = ., 
/usr/local/virtuoso-opensource/share/virtuoso/vad
ThreadCleanupInterval   = 0
ThreadThreshold = 10
ResourcesCleanupInterval= 0
FreeTextBatchSize   = 10
SingleCPU   = 0
VADInstallDir   = 
/usr/local/virtuoso-opensource/share/virtuoso/vad/
PrefixResultNames   = 0
Rd

[Virtuoso-users] Virtuoso goes down if the number of concurrent connections to Virtuoso is greater than maximal connections defined in virtuoso.ini

2015-01-29 Thread Cong Kinh Nguyen
Hi everybody,

I'm using JDBC to insert data into Virtuoso 7. I encountered an issue. 
Whenever I increased the number of threads to insert data more than 
maximal connections defined in the virtuoso.ini file, my code made 
Virtuoso gone down. Do you have any ideas to prevent Virtuoso from being 
died in such situation. Thanks in advance!


Best regards,
Kinh

--
Dive into the World of Parallel Programming. The Go Parallel Website,
sponsored by Intel and developed in partnership with Slashdot Media, is your
hub for all things parallel software development, from weekly thought
leadership blogs to news, videos, case studies, tutorials and more. Take a
look and join the conversation now. http://goparallel.sourceforge.net/
___
Virtuoso-users mailing list
Virtuoso-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/virtuoso-users


Re: [Virtuoso-users] Set up private graph

2014-12-01 Thread Cong Kinh Nguyen
I didn't understand what happened. But after reinstalling Virtuoso, it's 
been working. Thank you anyway.


Best regards,
Kinh


On 01/12/14 14:57, Cong Kinh Nguyen wrote:

Hi everybody,

I am a newbie with Virtuoso. I am working in a system where we need to 
support SPARQL queries and some kinds of privacy.


I suppose that I have three graphs:

- http://example.com/public (anybody can have READ access to this graph)
- http://example.com/private/Anna (only Anna has READ access to this 
graph)

- http://example.com/private/Bob (only Bob has READ access to this graph)

I was trying as the following steps with dba (only the 'dba' user can 
update data):

DB.DBA.USER_CREATE ('Anna', 'Anna');
DB.DBA.USER_CREATE ('Bob', 'Bob');

DB.DBA.RDF_DEFAULT_USER_PERMS_SET ('nobody', 0);
DB.DBA.RDF_DEFAULT_USER_PERMS_SET ('Anna', 0);
DB.DBA.RDF_DEFAULT_USER_PERMS_SET ('Bob', 0);

DB.DBA.RDF_GRAPH_USER_PERMS_SET ('http://example.com/private/Anna', 'Anna', 1);
DB.DBA.RDF_GRAPH_USER_PERMS_SET ('http://example.com/private/Bob', 'Bob', 1);


When I executed those commands, I received errors saying "
Permissions of unauthenticated user are broader than new permissions of user "Anna" on 
specific graph<http://example.com/private/Anna>". This kind of message also happened for 
'Bob' user.

I was wondering if someone could tell me where I was wrong or what I had to do 
to fix this issue. Thanks in advance!

Best regards,
Kinh



--
Download BIRT iHub F-Type - The Free Enterprise-Grade BIRT Server
from Actuate! Instantly Supercharge Your Business Reports and Dashboards
with Interactivity, Sharing, Native Excel Exports, App Integration & more
Get technology previously reserved for billion-dollar corporations, FREE
http://pubads.g.doubleclick.net/gampad/clk?id=157005751&iu=/4140/ostg.clktrk___
Virtuoso-users mailing list
Virtuoso-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/virtuoso-users


[Virtuoso-users] Set up private graph

2014-12-01 Thread Cong Kinh Nguyen

Hi everybody,

I am a newbie with Virtuoso. I am working in a system where we need to 
support SPARQL queries and some kinds of privacy.


I suppose that I have three graphs:

- http://example.com/public (anybody can have READ access to this graph)
- http://example.com/private/Anna (only Anna has READ access to this graph)
- http://example.com/private/Bob (only Bob has READ access to this graph)

I was trying as the following steps with dba (only the 'dba' user can 
update data):


DB.DBA.USER_CREATE ('Anna', 'Anna');
DB.DBA.USER_CREATE ('Bob', 'Bob');

DB.DBA.RDF_DEFAULT_USER_PERMS_SET ('nobody', 0);
DB.DBA.RDF_DEFAULT_USER_PERMS_SET ('Anna', 0);
DB.DBA.RDF_DEFAULT_USER_PERMS_SET ('Bob', 0);

DB.DBA.RDF_GRAPH_USER_PERMS_SET ('http://example.com/private/Anna', 'Anna', 1);
DB.DBA.RDF_GRAPH_USER_PERMS_SET ('http://example.com/private/Bob', 'Bob', 1);


When I executed those commands, I received errors saying "

Permissions of unauthenticated user are broader than new permissions of user "Anna" on 
specific graph ". This kind of message also happened for 
'Bob' user.

I was wondering if someone could tell me where I was wrong or what I had to do 
to fix this issue. Thanks in advance!

Best regards,
Kinh

--
Download BIRT iHub F-Type - The Free Enterprise-Grade BIRT Server
from Actuate! Instantly Supercharge Your Business Reports and Dashboards
with Interactivity, Sharing, Native Excel Exports, App Integration & more
Get technology previously reserved for billion-dollar corporations, FREE
http://pubads.g.doubleclick.net/gampad/clk?id=157005751&iu=/4140/ostg.clktrk___
Virtuoso-users mailing list
Virtuoso-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/virtuoso-users