Re: Fuseki / Java

2018-06-25 Thread mellassi khouloud
Hello ,

I Don't use any TDB , but i want to know what's the difference between
using TDB or not ?
what's the best solution .
thanks



2018-06-23 10:49 GMT+02:00 Lorenz Buehmann <
buehm...@informatik.uni-leipzig.de>:

> 1. What is the backend of your Fuseki server?
>
> 2. You can use RDFConnection [1] to "communicate" with the Fuseki if
> there is no underlying TDB
>
>
> [1] https://jena.apache.org/documentation/rdfconnection/
>
>
> On 22.06.2018 10:20, jena melina wrote:
> > thanks for your answer ,
> > but i don't understand what you want to explain ... could you please
> > explain to me what I should I do ?
> >
> > 2018-06-22 7:37 GMT+02:00 Lorenz Buehmann <
> > buehm...@informatik.uni-leipzig.de>:
> >
> >> To extend my answer, for SPARQL I'd prefer the RDFConnection way [1]
> >>
> >>
> >> [1] https://jena.apache.org/documentation/rdfconnection/
> >>
> >>
> >> On 22.06.2018 07:35, Lorenz Buehmann wrote:
> >>> Fuseki is an HTTP SPARQL server - but what is the backend? If it's TDB,
> >>> you can use the code from the TDB examples with the corresponding TDB
> >>> location.
> >>>
> >>> If enabled, you could also use SPARQL Update protocol, i.e. write
> >>> queries instead of Java code.
> >>>
> >>> The documentation:
> >>> https://jena.apache.org/documentation/serving_data/#use-from-java
> >>>
> >>>
> >>> On 21.06.2018 22:53, jena melina wrote:
>  hello ,
> 
>  I'm have  a java program that manipulate my  ontology ( create
> activity
> >> ,
>  tag , user ...)
> 
> 
> 
> 
>  public TEST() {
>  onto = ModelFactory.*createOntologyModel*(
> OntModelSpec.*OWL_MEM*);
>  OntDocumentManager manager = onto.getDocumentManager();
> 
> 
>  manager.addAltEntry("https://www.w3.org/ns/test;,
> >> "ontologies/test.owl")
>  ;
>  manager.addAltEntry("https://www.w3.org/ns/test2;,
>  "ontologies/test2.owl");
> 
>  this.synchronize();
> 
> 
>  }
> 
> 
> 
>  For example to create Activity I use this method :
> 
>  public Resource createEntity(String uri) throws
>  AlreadyExistingRdfResourceException {
> 
>  Resource res = onto.getIndividual(uri);
>  if (res != null) throw new AlreadyExistingRdfResourceExce
> >> ption(uri);
>  res = onto.createResource(uri);
>  return res;
>  }
> 
> 
> 
>  Now I need to use Fuseki server to save all modification that I do ,
> >> but I
>  don’t want to do many modification on my code , so I don’t know if I
> can
>  found help here ..
> 
>  I know how to connect to Fuseki server , but I don’t found how I can
> >> save
>  the owl into fuseki server , and how I can request   or modify my
> >> ontology
>  using (my code + Fuseki server ).
> 
> 
>  thanks for your help
> 
> >>
>
>


Re: Fuseki / Java

2018-06-23 Thread Lorenz Buehmann
1. What is the backend of your Fuseki server?

2. You can use RDFConnection [1] to "communicate" with the Fuseki if
there is no underlying TDB


[1] https://jena.apache.org/documentation/rdfconnection/


On 22.06.2018 10:20, jena melina wrote:
> thanks for your answer ,
> but i don't understand what you want to explain ... could you please
> explain to me what I should I do ?
>
> 2018-06-22 7:37 GMT+02:00 Lorenz Buehmann <
> buehm...@informatik.uni-leipzig.de>:
>
>> To extend my answer, for SPARQL I'd prefer the RDFConnection way [1]
>>
>>
>> [1] https://jena.apache.org/documentation/rdfconnection/
>>
>>
>> On 22.06.2018 07:35, Lorenz Buehmann wrote:
>>> Fuseki is an HTTP SPARQL server - but what is the backend? If it's TDB,
>>> you can use the code from the TDB examples with the corresponding TDB
>>> location.
>>>
>>> If enabled, you could also use SPARQL Update protocol, i.e. write
>>> queries instead of Java code.
>>>
>>> The documentation:
>>> https://jena.apache.org/documentation/serving_data/#use-from-java
>>>
>>>
>>> On 21.06.2018 22:53, jena melina wrote:
 hello ,

 I'm have  a java program that manipulate my  ontology ( create activity
>> ,
 tag , user ...)




 public TEST() {
 onto = ModelFactory.*createOntologyModel*(OntModelSpec.*OWL_MEM*);
 OntDocumentManager manager = onto.getDocumentManager();


 manager.addAltEntry("https://www.w3.org/ns/test;,
>> "ontologies/test.owl")
 ;
 manager.addAltEntry("https://www.w3.org/ns/test2;,
 "ontologies/test2.owl");

 this.synchronize();


 }



 For example to create Activity I use this method :

 public Resource createEntity(String uri) throws
 AlreadyExistingRdfResourceException {

 Resource res = onto.getIndividual(uri);
 if (res != null) throw new AlreadyExistingRdfResourceExce
>> ption(uri);
 res = onto.createResource(uri);
 return res;
 }



 Now I need to use Fuseki server to save all modification that I do ,
>> but I
 don’t want to do many modification on my code , so I don’t know if I can
 found help here ..

 I know how to connect to Fuseki server , but I don’t found how I can
>> save
 the owl into fuseki server , and how I can request   or modify my
>> ontology
 using (my code + Fuseki server ).


 thanks for your help

>>



Re: Fuseki / Java

2018-06-22 Thread jena melina
thanks for your answer ,
but i don't understand what you want to explain ... could you please
explain to me what I should I do ?

2018-06-22 7:37 GMT+02:00 Lorenz Buehmann <
buehm...@informatik.uni-leipzig.de>:

> To extend my answer, for SPARQL I'd prefer the RDFConnection way [1]
>
>
> [1] https://jena.apache.org/documentation/rdfconnection/
>
>
> On 22.06.2018 07:35, Lorenz Buehmann wrote:
> > Fuseki is an HTTP SPARQL server - but what is the backend? If it's TDB,
> > you can use the code from the TDB examples with the corresponding TDB
> > location.
> >
> > If enabled, you could also use SPARQL Update protocol, i.e. write
> > queries instead of Java code.
> >
> > The documentation:
> > https://jena.apache.org/documentation/serving_data/#use-from-java
> >
> >
> > On 21.06.2018 22:53, jena melina wrote:
> >> hello ,
> >>
> >> I'm have  a java program that manipulate my  ontology ( create activity
> ,
> >> tag , user ...)
> >>
> >>
> >>
> >>
> >> public TEST() {
> >> onto = ModelFactory.*createOntologyModel*(OntModelSpec.*OWL_MEM*);
> >> OntDocumentManager manager = onto.getDocumentManager();
> >>
> >>
> >> manager.addAltEntry("https://www.w3.org/ns/test;,
> "ontologies/test.owl")
> >> ;
> >> manager.addAltEntry("https://www.w3.org/ns/test2;,
> >> "ontologies/test2.owl");
> >>
> >> this.synchronize();
> >>
> >>
> >> }
> >>
> >>
> >>
> >> For example to create Activity I use this method :
> >>
> >> public Resource createEntity(String uri) throws
> >> AlreadyExistingRdfResourceException {
> >>
> >> Resource res = onto.getIndividual(uri);
> >> if (res != null) throw new AlreadyExistingRdfResourceExce
> ption(uri);
> >> res = onto.createResource(uri);
> >> return res;
> >> }
> >>
> >>
> >>
> >> Now I need to use Fuseki server to save all modification that I do ,
> but I
> >> don’t want to do many modification on my code , so I don’t know if I can
> >> found help here ..
> >>
> >> I know how to connect to Fuseki server , but I don’t found how I can
> save
> >> the owl into fuseki server , and how I can request   or modify my
> ontology
> >> using (my code + Fuseki server ).
> >>
> >>
> >> thanks for your help
> >>
>
>


Re: Fuseki / Java

2018-06-21 Thread Lorenz Buehmann
To extend my answer, for SPARQL I'd prefer the RDFConnection way [1]


[1] https://jena.apache.org/documentation/rdfconnection/


On 22.06.2018 07:35, Lorenz Buehmann wrote:
> Fuseki is an HTTP SPARQL server - but what is the backend? If it's TDB,
> you can use the code from the TDB examples with the corresponding TDB
> location.
>
> If enabled, you could also use SPARQL Update protocol, i.e. write
> queries instead of Java code.
>
> The documentation:
> https://jena.apache.org/documentation/serving_data/#use-from-java
>
>
> On 21.06.2018 22:53, jena melina wrote:
>> hello ,
>>
>> I'm have  a java program that manipulate my  ontology ( create activity ,
>> tag , user ...)
>>
>>
>>
>>
>> public TEST() {
>> onto = ModelFactory.*createOntologyModel*(OntModelSpec.*OWL_MEM*);
>> OntDocumentManager manager = onto.getDocumentManager();
>>
>>
>> manager.addAltEntry("https://www.w3.org/ns/test;, "ontologies/test.owl")
>> ;
>> manager.addAltEntry("https://www.w3.org/ns/test2;,
>> "ontologies/test2.owl");
>>
>> this.synchronize();
>>
>>
>> }
>>
>>
>>
>> For example to create Activity I use this method :
>>
>> public Resource createEntity(String uri) throws
>> AlreadyExistingRdfResourceException {
>>
>> Resource res = onto.getIndividual(uri);
>> if (res != null) throw new AlreadyExistingRdfResourceException(uri);
>> res = onto.createResource(uri);
>> return res;
>> }
>>
>>
>>
>> Now I need to use Fuseki server to save all modification that I do , but I
>> don’t want to do many modification on my code , so I don’t know if I can
>> found help here ..
>>
>> I know how to connect to Fuseki server , but I don’t found how I can save
>> the owl into fuseki server , and how I can request   or modify my ontology
>> using (my code + Fuseki server ).
>>
>>
>> thanks for your help
>>



Re: Fuseki java client?

2017-07-09 Thread Andy Seaborne



On 08/07/17 18:56, Phillip Rhodes wrote:

Hi all, I've been using Jena for some time now, working with the Java
API directly, and only recently began looking at Fuseki.  Now, looking
at the Fuseki docs page, I see a section listed as "Use from Java"
that points to
.


Fixed (in staging).


But that URL doesn't lead to anything.

I'm curious as to what, if anything, that ought to point to.  I'm not
even sure what it means to say "use Fuseki from Java" other than just
using something like HTTPClient to interface with the Fuseki HTTP
services.  Is there more I should know about, or is that pretty much
it?


Thanks,


Phil



From Java,

http://jena.apache.org/documentation/rdfconnection/

This pulls together the different SPARQL protocol APIs (query, update, 
GSP) into one thing and provides for a uniformity between local and 
remote.


That's not the same as making remote look like local. The unit of work 
is no longer an individual statement in a model for remote.


In addition to the command line tools mentioned, there is also the SOH 
scripts:


http://jena.staging.apache.org/documentation/fuseki2/soh.html

Andy


Re: Fuseki java client?

2017-07-08 Thread ajs6f

That's correct-- Fuseki's whole purpose is to implement those HTTP APIs.


ajs6f

Phillip Rhodes wrote on 7/8/17 5:14 PM:

Thanks Jean-Marc.  Is it safe to assume those are just implemented in
terms of the same http operations used by the s-* commands that ship
with Fuseki?  That is, there isn't another special protocol for Java
clients or anything is there?



Phil

This message optimized for indexing by NSA PRISM


On Sat, Jul 8, 2017 at 3:51 PM, Jean-Marc Vanel
 wrote:

There are the utility programs in Jena :

arq.rsparql
arq.rupdate

they are command line java clients.

Call them with --help to get the arguments list.


2017-07-08 19:56 GMT+02:00 Phillip Rhodes :


Hi all, I've been using Jena for some time now, working with the Java
API directly, and only recently began looking at Fuseki.  Now, looking
at the Fuseki docs page, I see a section listed as "Use from Java"
that points to
.
But that URL doesn't lead to anything.

I'm curious as to what, if anything, that ought to point to.  I'm not
even sure what it means to say "use Fuseki from Java" other than just
using something like HTTPClient to interface with the Fuseki HTTP
services.  Is there more I should know about, or is that pretty much
it?


Thanks,


Phil





--
Jean-Marc Vanel
http://www.semantic-forms.cc:9111/display?displayuri=http://jmvanel.free.fr/jmv.rdf%23me
Déductions SARL - Consulting, services, training,
Rule-based programming, Semantic Web
+33 (0)6 89 16 29 52
Twitter: @jmvanel , @jmvanel_fr ; chat: irc://irc.freenode.net#eulergui


Re: Fuseki java client?

2017-07-08 Thread Jean-Marc Vanel
There are the utility programs in Jena :

arq.rsparql
arq.rupdate

they are command line java clients.

Call them with --help to get the arguments list.


2017-07-08 19:56 GMT+02:00 Phillip Rhodes :

> Hi all, I've been using Jena for some time now, working with the Java
> API directly, and only recently began looking at Fuseki.  Now, looking
> at the Fuseki docs page, I see a section listed as "Use from Java"
> that points to
> .
> But that URL doesn't lead to anything.
>
> I'm curious as to what, if anything, that ought to point to.  I'm not
> even sure what it means to say "use Fuseki from Java" other than just
> using something like HTTPClient to interface with the Fuseki HTTP
> services.  Is there more I should know about, or is that pretty much
> it?
>
>
> Thanks,
>
>
> Phil
>



-- 
Jean-Marc Vanel
http://www.semantic-forms.cc:9111/display?displayuri=http://jmvanel.free.fr/jmv.rdf%23me
Déductions SARL - Consulting, services, training,
Rule-based programming, Semantic Web
+33 (0)6 89 16 29 52
Twitter: @jmvanel , @jmvanel_fr ; chat: irc://irc.freenode.net#eulergui