Re: How to load RDF dump

2017-04-01 Thread Stian Soiland-Reyes
You can either use jena distribution's tdbloader script into the folder
"db" (but stop fuseki first), or if the nt file is small enough (e.g. 50
MB) then you can also upload it in the browser interface (but make sure you
run fuseki 2 for this).

If you run Linux and "dB" is blank, then tdbloader2 can be faster for very
large files.

On 1 Apr 2017 10:21 pm, "Laura Morales"  wrote:

> I've downloaded Fuseki and I'm running it as a standalone server
>
> ./fuseki-server --loc=db --port  --localhost --timeout=1 /db
>
> now... what's the correct way to load an RDF dump (.nt file) into Fuseki?
>


Re: Tools for browsing and editing RDF data

2016-11-08 Thread Stian Soiland-Reyes
I've not tested it for myself, but perhaps this Protege plugin could
help with connecting by SPARQL?

http://protegewiki.stanford.edu/wiki/Ontop



You can do quite a bit of customisation with Protege as long as you
stay within the same UI paradigm - for instance one of my colleagues
added a special UI for doing usability testing of Protege within
Protege (!).  It may be a bit geeky for non-ontology folks though..
but what I am not sure about is how you would connect it to a Jena
triple store (tdb or Fuseki?) without doing load/save in the
background.


Protege uses OWLAPI, which internally uses Sesame for RDF
serialization. (They are planning to update for RDF4J 2)

Since version 5 OWLAPI also have Commons RDF bindings for
Triple/IRI/Literal/BlankNode, e.g.
https://github.com/owlcs/owlapi/blob/version5/api/src/main/java/org/semanticweb/owlapi/io/RDFTriple.java

Commons RDF 0.3.0-SNAPSHOT will include Jena bindings - so combining
these could be one (convoluted) way to integrate Protege/Jena without
going via files. I don't know how often you want to do updates, if
it's just "Load"/"Save" like you probably don't need this, but if you
want to reflect every UI change directly back to Jena you will want a
tighter integration.

For that you may need to add an "RDF" factory to adapt the
Jena-Commons-RDF instances to OWLAPI instances, and a virtual 'parser'
and 'writer' on the OWLAPI/Protege side. Let me know if you are
interested in that and I can help out.


On 8 November 2016 at 09:20, Mikael Pesonen <mikael.peso...@lingsoft.fi> wrote:
>
> Thank you for all the suggestions!  Protege is familiar tool so have to
> check how it can be customized. I'll check the Datao as well.
>
> Br,
> Mikael
>
>
> On 8.11.2016 1:37, Olivier Rossel wrote:
>>
>> May be you can have a look at Datao.
>> cf http://datao.net
>>
>> The edit part is managed by a custom version of Protege-Forms.
>> The data model extraction is available also as a service.
>>
>> If this tool seems to be useful for your needs, feel free to contact
>> me for a demo.
>>
>> PS: the tool is not open source, it is a freeware.
>>
>> On Wed, Nov 2, 2016 at 1:51 PM, Mikael Pesonen
>> <mikael.peso...@lingsoft.fi> wrote:
>>>
>>> Hi,
>>>
>>> I'm having trouble to find tools which a non-SPARQL person could use for
>>> editing and viewing any kind of semantic data on Jena triplestore. For
>>> example we have metadata describing files and people using Dublin Core
>>> and
>>> FOAF ontologies, and we would to edit that metadata.
>>>
>>> I guess such a system would need some kind of templates to define the
>>> underlying SPARQL queries. For example what set of triplets is a record
>>> (a
>>> set of data that is selected for editing), which fields of a record can
>>> be
>>> modified or deleted and so on. Field types, class hierarchies etc could
>>> be
>>> read from ontology schemas.
>>>
>>> Hope there exist such a system.
>>>
>>> BR,
>>> Mikael Pesonen
>>>
>>> --
>>> www.lingsoft.fi
>>>
>>> Speech Applications - Language Management - Translation - Reader's and
>>> Writer's Tools - Text Tools - E-books and M-books
>>>
>>> Mikael Pesonen
>>> System Engineer
>>>
>>> e-mail: mikael.peso...@lingsoft.fi
>>> Tel. +358 2 279 3300
>>>
>>> Time zone: GMT+2
>>>
>>> Helsinki Office
>>> Eteläranta 10
>>> FI-00130 Helsinki
>>> FINLAND
>>>
>>> Turku Office
>>> Linnankatu 10 A
>>> FI-20100 Turku
>>> FINLAND
>>>
>
> --
> www.lingsoft.fi
>
> Speech Applications - Language Management - Translation - Reader's and
> Writer's Tools - Text Tools - E-books and M-books
>
> Mikael Pesonen
> System Engineer
>
> e-mail: mikael.peso...@lingsoft.fi
> Tel. +358 2 279 3300
>
> Time zone: GMT+2
>
> Helsinki Office
> Eteläranta 10
> FI-00130 Helsinki
> FINLAND
>
> Turku Office
> Linnankatu 10 A
> FI-20100 Turku
> FINLAND
>



-- 
Stian Soiland-Reyes
http://orcid.org/-0001-9842-9718


Re: Construct query

2016-09-30 Thread Stian Soiland-Reyes
Important to notice is that the CONSTRUCTed triples are just returned to
the caller, they are not added to the graph. It can be useful to reshape
RDF, e.g. swap properties or simplify relationships.

On 30 Sep 2016 10:32 a.m., "Lorenz B." 
wrote:

> SPARQL CONSTRUCT returns an RDF graph or basically, a set of property
> RDF triples.
>
> > I want to know about the Construct query.
> > How it differs from Select query
> > Is it create a new property/class which is not already in the ontology or
> > it just creates new triples.
> > I will appreciate if some one come with a simple example. I have searched
> > web, but could not grasp it.
> >
> --
> Lorenz Bühmann
> AKSW group, University of Leipzig
> Group: http://aksw.org - semantic web research center
>
>


Re: Web UI of Fuseki doesn't start

2016-07-25 Thread Stian Soiland-Reyes
I could replicate this.

stain@biggiebuntu:~/Downloads$ java -jar
/var/www/fuseki/fuseki-server.jar --update --mem /ds
09:45:20 INFO  Dataset: in-memory
09:45:20 WARN  No such directory for static content: /home/stain/Downloads/.
09:45:20 WARN  You may need to set the --pages or --home option to
configure static content correctly
09:45:20 WARN  No pages directory - ./pages

Basically Fuseki can't find its "pages" folder.



You will need to start fuseki from the folder /var/www/fuseki/, or set
the variable FUSEKI_BASE

See http://jena.apache.org/documentation/fuseki2/fuseki-run.html



On 25 July 2016 at 08:42, Andy Seaborne <a...@apache.org> wrote:
> It's the wrong URL in some way.
>
> Andy
>
>
> On 25/07/16 08:39, Sandor Kopacsi wrote:
>>
>> Does anybody have any idea, what can be the problem, and how can I solve
>> it?
>>
>>> I started Fuseki successfully, and wanted to open its web UI, as usual on
>>> port 3030, but I have received the error message:
>>>
>>> "Error 404: Not Found
>>>
>>> Fuseki - version 1.4.0 (Build date: 2016-05-10T11:59:39+)"
>>
>> Thanks,
>>
>> Sandor
>>
>>
>> Am 22.07.2016 um 22:09 schrieb Sandor Kopacsi:
>>>
>>> Dear Stian,
>>>
>>> Thank you for your reaction.
>>>
>>> I have started Fuseki from the command line with:
>>>
>>> java -jar /var/www/fuseki/fuseki-server.jar --update --mem /ds
>>>
>>> as usual. Any other time it worked.
>>>
>>> I haven't tried Fuseki 2.4.0 so far.
>>>
>>> Best Regards,
>>>
>>> Sandor
>>>
>>>
>>>
>>> Am 21.07.2016 um 14:27 schrieb Stian Soiland-Reyes:
>>>>
>>>> How did you start Fuseki, from the command line?
>>>>
>>>> Have you considered trying Fuseki 2.4.0 to see if that makes any
>>>> difference?
>>>>
>>>>
>>>> On 21 July 2016 at 12:37, Sandor Kopacsi
>>>> <sandor.kopa...@univie.ac.at> wrote:
>>>>>
>>>>> Dear Jena-Fuseki Users,
>>>>>
>>>>> I started Fuseki successfully, and wanted to open its web UI, as
>>>>> usual on
>>>>> port 3030, but I have received the error message:
>>>>>
>>>>> "Error 404: Not Found
>>>>>
>>>>> Fuseki - version 1.4.0 (Build date: 2016-05-10T11:59:39+)"
>>>>>
>>>>> What can be the problem, and what should I do?
>>>>>
>>>>> Thanks in advance.
>>>>>
>>>>> Best Regards,
>>>>> Sandor
>>>>>
>>>>> --
>>>>> Sandor Kopacsi
>>>>> Vienna University Computer Center
>>>>>
>>>>
>>>>
>>>
>>
>



-- 
Stian Soiland-Reyes
Apache Taverna (incubating), Apache Commons
http://orcid.org/-0001-9842-9718


Re: Web UI of Fuseki doesn't start

2016-07-21 Thread Stian Soiland-Reyes
How did you start Fuseki, from the command line?

Have you considered trying Fuseki 2.4.0 to see if that makes any difference?


On 21 July 2016 at 12:37, Sandor Kopacsi <sandor.kopa...@univie.ac.at> wrote:
> Dear Jena-Fuseki Users,
>
> I started Fuseki successfully, and wanted to open its web UI, as usual on
> port 3030, but I have received the error message:
>
> "Error 404: Not Found
>
> Fuseki - version 1.4.0 (Build date: 2016-05-10T11:59:39+)"
>
> What can be the problem, and what should I do?
>
> Thanks in advance.
>
> Best Regards,
> Sandor
>
> --
> Sandor Kopacsi
> Vienna University Computer Center
>



-- 
Stian Soiland-Reyes
Apache Taverna (incubating), Apache Commons
http://orcid.org/-0001-9842-9718


Re: Forward/backward rules (and reasoner memory leaks)

2016-06-24 Thread Stian Soiland-Reyes
ses in a more efficient order:
>>
>> (?subClass ?p ?o) <-
>>   (?p rdf:type owl:AnnotationProperty),
>>   (?p rdfs:isDefinedBy <http://graphity.org/gp#>),
>>   (?subClass rdfs:subClassOf ?class), (?class ?p ?o) .
>>
>> The rdf:type rdfs:Class constraints are pointless since those are
>> implied by rdfs:subClassOf anyway. The noValue check is probably best
>> avoided for both cases.
>>
>> Alternatively, depending on the nature of your space leak you could use
>> hybrid rules:
>>
>>(?p rdf:type owl:AnnotationProperty),
>>(?p rdfs:isDefinedBy <http://graphity.org/gp#>)
>>  ->
>>[ (?subClass ?p ?o) <- (?subClass rdfs:subClassOf ?class),
>>   (?class ?p ?o) ]
>>
>> That way the forward engine is only looking at your annotations and the
>> backward engine then has rules that have grounded predicates. You could
>> also table those predicates:
>>
>>(?p rdf:type owl:AnnotationProperty),
>>(?p rdfs:isDefinedBy <http://graphity.org/gp#>)
>>  ->
>>table(?p),
>>[ (?subClass ?p ?o) <- (?subClass rdfs:subClassOf ?class),
>>(?class ?p ?o) ]
>>
>>> [gcdm:  (?template rdf:type <http://graphity.org/gp#Template>),
>>> (?template <http://graphity.org/gc#defaultMode> ?o), (?subClass
>>> rdfs:subClassOf ?template), (?subClass rdf:type
>>> <http://graphity.org/gp#Template>), noValue(?subClass
>>> <http://graphity.org/gc#defaultMode>) -> (?subClass
>>> <http://graphity.org/gc#defaultMode> ?o) ]
>>> [gcsm:  (?template rdf:type <http://graphity.org/gp#Template>),
>>> (?template <http://graphity.org/gc#supportedMode> ?supportedMode),
>>> (?subClass rdfs:subClassOf ?template), (?subClass rdf:type
>>> <http://graphity.org/gp#Template>) -> (?subClass
>>> <http://graphity.org/gc#supportedMode> ?supportedMode) ]
>>
>>
>> These two are more reasonable and could be used backwards or hybrid.
>>
>>> [rdfs9: (?x rdfs:subClassOf ?y), (?a rdf:type ?x) -> (?a rdf:type ?y)]
>>
>>
>> That would work backwards. Depending on the scale of your data you might
>> want to table rdf:type for performance/space tradeoff.
>>
>>> Can these be rewritten as backward rules instead?
>>
>>
>> Sure, the challenge is performance tuning as noted above.
>>
>>  > Does it involve code changes, such as calling reset() etc?
>>
>> Shouldn't do.
>>
>> Dave
>
>



-- 
Stian Soiland-Reyes
Apache Taverna (incubating), Apache Commons
http://orcid.org/-0001-9842-9718


Re: Modularize Jena code

2016-06-23 Thread Stian Soiland-Reyes
I guess what Kumar is asking for is a good strategy for how to bundle
say *.ttl and *.sparql files in a Java project.

I think the way Paul have done it is a sane approach. You should be
able to then do getClass().getResource() to get a java.net.URL to load
- or getResourceAsStream() (but then relative paths will be odd).



On 22 June 2016 at 18:17, Paul Houle <ontolo...@gmail.com> wrote:
> Here is the strategy I am using to package Turtle files,  SPARQL code and
> stuff like that with Java code:
>
> http://ontology2.com/the-book/including-foreign-source-in-java.html
>
> On Fri, Jun 17, 2016 at 8:44 AM, kumar rohit <kumar.en...@gmail.com> wrote:
>
>> While building semantic web application, how can I organise my code? For
>> instance, I have OWL file in Protege and multiple (say 50 queries) .
>>
>> In one class I imported/read the file but confuse then what to do next?
>> Will there be a separate method i-e ExecSparql1() for each sparql query or
>> there is something which is simple?
>>
>> Thanks
>>
>
>
>
> --
> Paul Houle
>
> *Applying Schemas for Natural Language Processing, Distributed Systems,
> Classification and Text Mining and Data Lakes*
>
> (607) 539 6254paul.houle on Skype   ontolo...@gmail.com
>
> :BaseKB -- Query Freebase Data With SPARQL
> http://basekb.com/gold/
>
> Legal Entity Identifier Lookup
> https://legalentityidentifier.info/lei/lookup/
> <http://legalentityidentifier.info/lei/lookup/>
>
> Join our Data Lakes group on LinkedIn
> https://www.linkedin.com/grp/home?gid=8267275



-- 
Stian Soiland-Reyes
Apache Taverna (incubating), Apache Commons
http://orcid.org/-0001-9842-9718


Re: Jena rules in owl ontology

2016-06-08 Thread Stian Soiland-Reyes
The Ontology API should be able to deal with typical OWL 1 models, but
perhaps not fancier OWL2 constructs.

https://jena.apache.org/documentation/ontology/#creating-ontology-models

On 8 June 2016 at 15:14, mehmet mehmet <mehmettw...@gmail.com> wrote:
> I have created an ontology in Protege called Student.owl. I want to import
> it in jena and apply some jena rules on the class/subclass of my ontology.
> Please if some one guide me how to do this and where (in jena code) my
> rules will fit in.
> I am working with jena from few weeks but I have never used Jena rules yet.
>
> thanks



-- 
Stian Soiland-Reyes
Apache Taverna (incubating), Apache Commons
http://orcid.org/-0001-9842-9718


Re: Fuseki null pointer exception with minimum data

2016-05-22 Thread Stian Soiland-Reyes
e(SPARQL_Query.java:272)
>>  at
>> org.apache.jena.fuseki.servlets.SPARQL_Query.executeWithParameter(SPARQL_Query.java:228)
>>  at
>> org.apache.jena.fuseki.servlets.SPARQL_Query.perform(SPARQL_Query.java:213)
>>  at
>> org.apache.jena.fuseki.servlets.ActionSPARQL.executeLifecycle(ActionSPARQL.java:134)
>>  at
>> org.apache.jena.fuseki.servlets.SPARQL_UberServlet.executeRequest(SPARQL_UberServlet.java:354)
>>  at
>> org.apache.jena.fuseki.servlets.SPARQL_UberServlet.serviceDispatch(SPARQL_UberServlet.java:315)
>>  at
>> org.apache.jena.fuseki.servlets.SPARQL_UberServlet.executeAction(SPARQL_UberServlet.java:271)
>>  at
>> org.apache.jena.fuseki.servlets.ActionSPARQL.execCommonWorker(ActionSPARQL.java:85)
>>  at
>> org.apache.jena.fuseki.servlets.ActionBase.doCommon(ActionBase.java:81)
>>  at
>> org.apache.jena.fuseki.servlets.FusekiFilter.doFilter(FusekiFilter.java:72)
>>  at
>> org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1669)
>>  at
>> org.apache.shiro.web.servlet.ProxiedFilterChain.doFilter(ProxiedFilterChain.java:61)
>>  at
>> org.apache.shiro.web.servlet.AdviceFilter.executeChain(AdviceFilter.java:108)
>>  at
>> org.apache.shiro.web.servlet.AdviceFilter.doFilterInternal(AdviceFilter.java:137)
>>  at
>> org.apache.shiro.web.servlet.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:125)
>>  at
>> org.apache.shiro.web.servlet.ProxiedFilterChain.doFilter(ProxiedFilterChain.java:66)
>>  at
>> org.apache.shiro.web.servlet.AbstractShiroFilter.executeChain(AbstractShiroFilter.java:449)
>>  at
>> org.apache.shiro.web.servlet.AbstractShiroFilter$1.call(AbstractShiroFilter.java:365)
>>  at
>> org.apache.shiro.subject.support.SubjectCallable.doCall(SubjectCallable.java:90)
>>  at
>> org.apache.shiro.subject.support.SubjectCallable.call(SubjectCallable.java:83)
>>  at
>> org.apache.shiro.subject.support.DelegatingSubject.execute(DelegatingSubject.java:383)
>>  at
>> org.apache.shiro.web.servlet.AbstractShiroFilter.doFilterInternal(AbstractShiroFilter.java:362)
>>  at
>> org.apache.shiro.web.servlet.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:125)
>>  at
>> org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1669)
>>  at
>> org.apache.jena.fuseki.servlets.CrossOriginFilter.handle(CrossOriginFilter.java:285)
>>  at
>> org.apache.jena.fuseki.servlets.CrossOriginFilter.doFilter(CrossOriginFilter.java:248)
>>  at
>> org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1669)
>>  at
>> org.eclipse.jetty.servlet.ServletHandler.doHandle(ServletHandler.java:581)
>>  at
>> org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:143)
>>  at
>> org.eclipse.jetty.security.SecurityHandler.handle(SecurityHandler.java:548)
>>  at
>> org.eclipse.jetty.server.session.SessionHandler.doHandle(SessionHandler.java:226)
>>  at
>> org.eclipse.jetty.server.handler.ContextHandler.doHandle(ContextHandler.java:1156)
>>  at
>> org.eclipse.jetty.servlet.ServletHandler.doScope(ServletHandler.java:511)
>>  at
>> org.eclipse.jetty.server.session.SessionHandler.doScope(SessionHandler.java:185)
>>  at
>> org.eclipse.jetty.server.handler.ContextHandler.doScope(ContextHandler.java:1088)
>>  at
>> org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:141)
>>  at
>> org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:119)
>>  at org.eclipse.jetty.server.Server.handle(Server.java:517)
>>  at org.eclipse.jetty.server.HttpChannel.handle(HttpChannel.java:306)
>>  at
>> org.eclipse.jetty.server.HttpConnection.onFillable(HttpConnection.java:242)
>>  at
>> org.eclipse.jetty.io.AbstractConnection$ReadCallback.succeeded(AbstractConnection.java:245)
>>  at org.eclipse.jetty.io.FillInterest.fillable(FillInterest.java:95)
>>  at
>> org.eclipse.jetty.io.SelectChannelEndPoint$2.run(SelectChannelEndPoint.java:75)
>>  at
>> org.eclipse.jetty.util.thread.strategy.ExecuteProduceConsume.produceAndRun(ExecuteProduceConsume.java:213)
>>  at
>> org.eclipse.jetty.util.thread.strategy.ExecuteProduceConsume.run(ExecuteProduceConsume.java:147)
>>  at
>> org.eclipse.jetty.util.thread.QueuedThreadPool.runJob(QueuedThreadPool.java:654)
>>  at
>> org.eclipse.jetty.util.thread.QueuedThreadPool$3.run(QueuedThreadPool.java:572)
>>  at java.lang.Thread.run(Thread.java:745)
>> [2016-05-18 10:20:00] Fuseki INFO  [11] 500 Server Error (186 ms)
>> r
>>
>>
>>
>> <http://www.mediafire.com/download/bjz4zpnj0220szz/query.sparql>
>>
>> query.sparql<http://www.mediafire.com/download/bjz4zpnj0220szz/query.sparql>
>> www.mediafire.com
>> MediaFire is a simple to use free service that lets you put all your
>> photos, documents, music, and video in a single place so you can access them
>> anywhere and share them everywhere.
>>
>>
>>
>>
>>
>



-- 
Stian Soiland-Reyes
Apache Commons, Apache Taverna (incubating), Apache Commons RDF (incubating)
http://orcid.org/-0001-9842-9718


Re: Fuseki NullPointerException on 16 million triple dataset

2016-05-22 Thread Stian Soiland-Reyes
eratorBase.java:111)
>>>>
>>>>   at
>>>
>>>
>>> org.apache.jena.sparql.engine.iterator.QueryIteratorWrapper.hasNextBinding(QueryIteratorWrapper.java:39)
>>>>
>>>>   at
>>>
>>>
>>> org.apache.jena.sparql.engine.iterator.QueryIteratorBase.hasNext(QueryIteratorBase.java:111)
>>>>
>>>>   at
>>>
>>>
>>> org.apache.jena.sparql.engine.ResultSetStream.hasNext(ResultSetStream.java:74)
>>>>
>>>>   at
>>>
>>>
>>> org.apache.jena.sparql.engine.ResultSetCheckCondition.hasNext(ResultSetCheckCondition.java:59)
>>>>
>>>>   at
>>>
>>>
>>> org.apache.jena.fuseki.servlets.SPARQL_Query.executeQuery(SPARQL_Query.java:319)
>>>>
>>>>   at
>>>
>>>
>>> org.apache.jena.fuseki.servlets.SPARQL_Query.execute(SPARQL_Query.java:268)
>>>>
>>>>   at
>>>
>>>
>>> org.apache.jena.fuseki.servlets.SPARQL_Query.executeWithParameter(SPARQL_Query.java:226)
>>>>
>>>>   at
>>>
>>>
>>> org.apache.jena.fuseki.servlets.SPARQL_Query.perform(SPARQL_Query.java:211)
>>>>
>>>>   at
>>>
>>>
>>> org.apache.jena.fuseki.servlets.ActionSPARQL.executeLifecycle(ActionSPARQL.java:132)
>>>>
>>>>   at
>>>
>>>
>>> org.apache.jena.fuseki.servlets.SPARQL_UberServlet.executeRequest(SPARQL_UberServlet.java:332)
>>>>
>>>>   at
>>>
>>>
>>> org.apache.jena.fuseki.servlets.SPARQL_UberServlet.serviceDispatch(SPARQL_UberServlet.java:293)
>>>>
>>>>   at
>>>
>>>
>>> org.apache.jena.fuseki.servlets.SPARQL_UberServlet.executeAction(SPARQL_UberServlet.java:249)
>>>>
>>>>   at
>>>
>>>
>>> org.apache.jena.fuseki.servlets.ActionSPARQL.execCommonWorker(ActionSPARQL.java:83)
>>>>
>>>>   at
>>>
>>> org.apache.jena.fuseki.servlets.ActionBase.doCommon(ActionBase.java:79)
>>>>
>>>>   at
>>>
>>>
>>> org.apache.jena.fuseki.servlets.FusekiFilter.doFilter(FusekiFilter.java:72)
>>>>
>>>>   at
>>>
>>>
>>> org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1669)
>>>>
>>>>   at
>>>
>>>
>>> org.apache.shiro.web.servlet.ProxiedFilterChain.doFilter(ProxiedFilterChain.java:61)
>>>>
>>>>   at
>>>
>>>
>>> org.apache.shiro.web.servlet.AdviceFilter.executeChain(AdviceFilter.java:108)
>>>>
>>>>   at
>>>
>>>
>>> org.apache.shiro.web.servlet.AdviceFilter.doFilterInternal(AdviceFilter.java:137)
>>>>
>>>>   at
>>>
>>>
>>> org.apache.shiro.web.servlet.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:125)
>>>>
>>>>   at
>>>
>>>
>>> org.apache.shiro.web.servlet.ProxiedFilterChain.doFilter(ProxiedFilterChain.java:66)
>>>>
>>>>   at
>>>
>>>
>>> org.apache.shiro.web.servlet.AbstractShiroFilter.executeChain(AbstractShiroFilter.java:449)
>>>>
>>>>   at
>>>
>>>
>>> org.apache.shiro.web.servlet.AbstractShiroFilter$1.call(AbstractShiroFilter.java:365)
>>>>
>>>>   at
>>>
>>>
>>> org.apache.shiro.subject.support.SubjectCallable.doCall(SubjectCallable.java:90)
>>>>
>>>>   at
>>>
>>>
>>> org.apache.shiro.subject.support.SubjectCallable.call(SubjectCallable.java:83)
>>>>
>>>>   at
>>>
>>>
>>> org.apache.shiro.subject.support.DelegatingSubject.execute(DelegatingSubject.java:383)
>>>>
>>>>   at
>>>
>>>
>>> org.apache.shiro.web.servlet.AbstractShiroFilter.doFilterInternal(AbstractShiroFilter.java:362)
>>>>
>>>>   at
>>>
>>>
>>> org.apache.shiro.web.servlet.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:125)
>>>>
>>>>   at
>>>
>>>
>>> org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1669)
>>>>
>>>>   at
>>>
>>>
>>> org.apache.jena.fuseki.servlets.CrossOriginFilter.handle(CrossOriginFilter.java:285)
>>>>
>>>>   at
>>>
>>>
>>> org.apache.jena.fuseki.servlets.CrossOriginFilter.doFilter(CrossOriginFilter.java:248)
>>>>
>>>>   at
>>>
>>>
>>> org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1669)
>>>>
>>>>   at
>>>
>>>
>>> org.eclipse.jetty.servlet.ServletHandler.doHandle(ServletHandler.java:581)
>>>>
>>>>   at
>>>
>>>
>>> org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:143)
>>>>
>>>>   at
>>>
>>>
>>> org.eclipse.jetty.security.SecurityHandler.handle(SecurityHandler.java:548)
>>>>
>>>>   at
>>>
>>>
>>> org.eclipse.jetty.server.session.SessionHandler.doHandle(SessionHandler.java:226)
>>>>
>>>>   at
>>>
>>>
>>> org.eclipse.jetty.server.handler.ContextHandler.doHandle(ContextHandler.java:1156)
>>>>
>>>>   at
>>>
>>> org.eclipse.jetty.servlet.ServletHandler.doScope(ServletHandler.java:511)
>>>>
>>>>   at
>>>
>>>
>>> org.eclipse.jetty.server.session.SessionHandler.doScope(SessionHandler.java:185)
>>>>
>>>>   at
>>>
>>>
>>> org.eclipse.jetty.server.handler.ContextHandler.doScope(ContextHandler.java:1088)
>>>>
>>>>   at
>>>
>>>
>>> org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:141)
>>>>
>>>>   at
>>>
>>>
>>> org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:119)
>>>>
>>>>   at org.eclipse.jetty.server.Server.handle(Server.java:517)
>>>>   at
>>>> org.eclipse.jetty.server.HttpChannel.handle(HttpChannel.java:306)
>>>>   at
>>>
>>>
>>> org.eclipse.jetty.server.HttpConnection.onFillable(HttpConnection.java:242)
>>>>
>>>>   at
>>>
>>>
>>> org.eclipse.jetty.io.AbstractConnection$ReadCallback.succeeded(AbstractConnection.java:245)
>>>>
>>>>   at
>>>> org.eclipse.jetty.io.FillInterest.fillable(FillInterest.java:95)
>>>>   at
>>>
>>>
>>> org.eclipse.jetty.io.SelectChannelEndPoint$2.run(SelectChannelEndPoint.java:75)
>>>>
>>>>   at
>>>
>>>
>>> org.eclipse.jetty.util.thread.strategy.ExecuteProduceConsume.produceAndRun(ExecuteProduceConsume.java:213)
>>>>
>>>>   at
>>>
>>>
>>> org.eclipse.jetty.util.thread.strategy.ExecuteProduceConsume.run(ExecuteProduceConsume.java:147)
>>>>
>>>>   at
>>>
>>>
>>> org.eclipse.jetty.util.thread.QueuedThreadPool.runJob(QueuedThreadPool.java:654)
>>>>
>>>>   at
>>>
>>>
>>> org.eclipse.jetty.util.thread.QueuedThreadPool$3.run(QueuedThreadPool.java:572)
>>>>
>>>>   at java.lang.Thread.run(Thread.java:745)
>>>> [2016-05-16 16:43:46] Fuseki INFO  [7] 500 Server Error (1.012 s)
>>>>
>>>>
>>>> Could you help please ?
>>>>
>>>
> --
> Lorenz Bühmann
> AKSW group, University of Leipzig
> Group: http://aksw.org - semantic web research center
>



-- 
Stian Soiland-Reyes
Apache Commons, Apache Taverna (incubating), Apache Commons RDF (incubating)
http://orcid.org/-0001-9842-9718


Re: Performance Cost of Reification

2015-10-11 Thread Stian Soiland-Reyes
Well described. If something requires reification, it usually means either
your model is off track (not expanding the right concepts), or your graph
scope is wrong (because you want to say who said that, add confidence
values , etc).

In designing PROV-O we ran into this same issue, and added typed
"qualifications" as the alternative to reification pattern. E.g

 prov:wasDerivedFrom  ;
prov:qualifiedDerivation :aDerivation .

:aDerivation a prov:Derivation ;
  prov:entity  ;
  rdfs:comment "by copy and paste> .

See http://www.w3.org/TR/prov-o/#description-qualified-terms

By making these proper concepts we can relate them to the rest, not feel
constrained by the "reified" triple, and thus add typing and subclasses.

For instance a prov:Derivation can use prov:hadActivity to link to the
prov:Activity which made , and even relate to the Activity's qualified
relation Usage and Generation.

See example at http://www.w3.org/TR/prov-o/#Derivation

Of course, when you have multiple alternative detail levels too choose
from, users can get confused as to which one to use. In PROV the
qualifications are related with prov:qualifiedThingie relations, that hints
of them being secondary in nature rather than first class citizens to
normally be used alone. In other vocabularies you might find it is the
shortcuts you want to make secondary.
On 9 Oct 2015 15:20, "Andy Seaborne"  wrote:

>
> It is nice that the Titan guys see RDF as something to compare to.
> Coincidently, I was giving a talk about Property Graph / Linked Data just
> recently at the European ApacheCon BigData conference.
>
>
> The Property Graph (PG) market is maybe x2 the size of the RDF market, and
> both are small.  The challenge is growing the graph market, not one form
> taking market share away from the other.
>
> And the key difference between graph databases (either kind) and other
> data systems is the approach to data modelling.  The differences between
> graph systems are not the key here.
>
> About reification, they are somewhat off-track.  Reification is a quite
> specialised feature for limited use. It is not RDF's equivalent to
> attributes on links in PG.
>
> Let me make that concrete with an example simplified from Graph databases
> / chapter 3 (page 52 in my copy).  The book is written the Neo4J folks.
>
> Email provenance.
>
> A sends_email_to B
>
> Now, you could reify that statement (the act by A of sending the email to
> B).
>
> Reification is way more powerful than just being about to add data to the
> triple.  It says "claim: A sends_mail_to B"  - several different and
> competing claims can be made. But let's continue assuming reification and
> assertion of the triple ... [*]
>
> <>
> cc C
> cc D
> sentOn Tuesday
>
> In the same modelling way you could add attributes to a PG graph edge for
> sends_email_to.
>
> Both PG and RDF modelling here are anti-patterns (as chapter 3 notes for
> PG).
>
> The email sent is an important concept so model it explicitly:
>
> A   sends   MSG
> MSG receivedBy  B
> MSG cc_to   C
> MSG cc_to   D
> MSG sentOn  "Tuesday"
>
> By modelling the email message as a first class concept, not implicit in
> the activity via reification/link attributes, you can better add
> information e.g. which servers it was transferred by and stored on, when
> was it received (this is email - that might be twice) and better query it
> (who else accessed it on receipt).  Modelling those on the act of sending
> is making life hard (how do you talk about a draft email?)
>
> MSG contentsURL_to_content
> MSG hasChecksum 0xABCDEF
> MSG status  :sent
>
> This event based modelling.
>
>
> If you wanted a highly efficient reification-supporting RDF store, then
> build one.  No need to blindly store as multiple triples (its called
> compression!).  You don't see such stores because reification is a minor
> feature of RDF.  Event-based modelling and named graphs are often better.
>
> Andy
>
> [*]
> << >> is syntax that I proposed in early SPARQL drafts pre 1.0 for
> reification support but didn't gain much support. It is still in the ARQ
> parser source but not active.
>
>
>


Re: Views on Fuseki Docker image?

2015-09-20 Thread Stian Soiland-Reyes
Thanks for the suggestion to use alpine!


I agree that the Docker images should be small - particular as Jena
Docker images would be just as useful for a "taster session' as a help
for developers who need a bit of Jena right away, and sysadmins who
want to put say Fuseki in production.

I tried using alpine as a base image, but had to use
anapsix/alpine-java to get Oracle Java 8, as needed for Jena 3.


See
https://imagelayers.io/?images=stain%2Fjena-fuseki:latest

Complete image of fuseki: 202 MB

Which is some improvement from the ~850 MB for the previous Fuseki approach!


To test the update, try:

   docker pull stain/jena-fuseki



I also had a go at evolving Rob's riot image using the same approach:

https://hub.docker.com/r/stain/jena/

This docker image exposes the 'riot' command, and clicks in at 187 MB.


With this significant decrease I think I will suggest abandoning my
Maven-inside-Docker attempt, which would increase the container size.



On 15 September 2015 at 09:37, Rurik Thomas Greenall
<rurik.green...@gmail.com> wrote:
> I like the initiative, I would like to see an official docker image.
>
> Currently, we use fisch42/fuseki in our project. I have looked at several
> approaches, based on building the docker image in vagrant with different
> distros. Currently, I'm favouring alpine linux as this give a very small
> image.
>
> I think Stian's approach is broadly a good one.
>
> I'm looking at this in relation to vagrant/alpine.
>
> Rurik
>
>
>
> On Sun, Sep 13, 2015 at 6:00 AM, Stian Soiland-Reyes <st...@apache.org>
> wrote:
>
>> Hi,
>>
>> There is currently a thread on dev@jena about considering having an
>> official Jena Fuseki docker image.
>>
>>
>> As a quick summary about what docker is:
>>
>> Docker https://www.docker.com/ is a Linux Container-based tool which
>> automates software deployment by packaging a virtual root file system
>> with the software pre-installed and (ideally) pre-configured. Official
>> and unofficial docker images are shared and dnwoon the Docker Hub and
>> can be used in a hierarchy (e.g. a Maven image based on a Open JDK
>> image) and network-linked to each other (e.g. a Tomcat image linked to
>> a separate mySQL image)
>>
>> In a Docker-centric world, each application runs as its own container,
>> and are therefore isolated from OS-level changes and any cross-version
>> issues.  Docker can be used for developers to quickly get a
>> production-like environment on their desktop, but also used for
>> deployment in production - you can finally ensure you are testing
>> exactly the same software as in prod.
>>
>>
>>
>> While Fuseki 1 required a bit of manual configuration to run, Fuseki 2
>> can be run 'out of the box', and with its new web interface can even
>> be used without any further configuration, e.g. for playing around
>> with RDF data. It is therefore a prime candidate for a Docker image.
>>
>>
>>
>> There are already a handful of Fuseki images on the Docker hub:
>>
>>
>> https://hub.docker.com/search/?q=fuseki=1=0=0=0=0
>>
>> I think it would be beneficial for the Jena community to create an
>> official image, and bring together the strengths of each of these. I
>> think at the core they are all very similar, but vary a bit in their
>> documentation and extensibility.
>>
>>
>> I am not neutral here, I have suggested for Jena to adapt a version of
>> my own approach
>> ( https://hub.docker.com/r/stain/jena-fuseki/ ) -- but would love to
>> get a desiderata for a Fuseki Docker image - and also hear from any of
>> the other Fuseki Docker guys so we can know which approach Jena should
>> take - if any.
>>
>>
>>
>> It might also be interesting to have a Jena command line Docker image,
>> e.g. with riot and the other bin/ tools.  I would propose that to be a
>> separate image which is just for command line usage.
>>
>> --
>> Stian Soiland-Reyes
>> Apache Taverna (incubating), Apache Commons RDF (incubating)
>> http://orcid.org/-0001-9842-9718
>>



-- 
Stian Soiland-Reyes
Apache Taverna (incubating), Apache Commons RDF (incubating)
http://orcid.org/-0001-9842-9718


Views on Fuseki Docker image?

2015-09-12 Thread Stian Soiland-Reyes
Hi,

There is currently a thread on dev@jena about considering having an
official Jena Fuseki docker image.


As a quick summary about what docker is:

Docker https://www.docker.com/ is a Linux Container-based tool which
automates software deployment by packaging a virtual root file system
with the software pre-installed and (ideally) pre-configured. Official
and unofficial docker images are shared and dnwoon the Docker Hub and
can be used in a hierarchy (e.g. a Maven image based on a Open JDK
image) and network-linked to each other (e.g. a Tomcat image linked to
a separate mySQL image)

In a Docker-centric world, each application runs as its own container,
and are therefore isolated from OS-level changes and any cross-version
issues.  Docker can be used for developers to quickly get a
production-like environment on their desktop, but also used for
deployment in production - you can finally ensure you are testing
exactly the same software as in prod.



While Fuseki 1 required a bit of manual configuration to run, Fuseki 2
can be run 'out of the box', and with its new web interface can even
be used without any further configuration, e.g. for playing around
with RDF data. It is therefore a prime candidate for a Docker image.



There are already a handful of Fuseki images on the Docker hub:

https://hub.docker.com/search/?q=fuseki=1=0=0=0=0

I think it would be beneficial for the Jena community to create an
official image, and bring together the strengths of each of these. I
think at the core they are all very similar, but vary a bit in their
documentation and extensibility.


I am not neutral here, I have suggested for Jena to adapt a version of
my own approach
( https://hub.docker.com/r/stain/jena-fuseki/ ) -- but would love to
get a desiderata for a Fuseki Docker image - and also hear from any of
the other Fuseki Docker guys so we can know which approach Jena should
take - if any.



It might also be interesting to have a Jena command line Docker image,
e.g. with riot and the other bin/ tools.  I would propose that to be a
separate image which is just for command line usage.

-- 
Stian Soiland-Reyes
Apache Taverna (incubating), Apache Commons RDF (incubating)
http://orcid.org/-0001-9842-9718


Fwd: RDF parser interface for Commons RDF

2015-09-02 Thread Stian Soiland-Reyes
Just in case you were interested in Commons RDF - I made a quick
experiment to use Jena's RIOT parsers to populate Commons RDF graphs.


Note that this is NOT the Commons RDF binding for Jena (JENA-1015) -
that would mean implementing Graph, Triple, etc. backed by Jena.


The parsed graph is stored in any Commons RDF implementation -
currently tested with the in-memory "simple" implementation.

See below:


-- Forwarded message ------
From: Stian Soiland-Reyes <st...@apache.org>
Date: 3 September 2015 at 02:07
Subject: RDF parser interface for Commons RDF
To: dev <d...@commonsrdf.incubator.apache.org>


I am not sure if we should be saying anything about RDF parser and
writer interfaces.

Anyhow, I still felt a need to parse generic RDF files with Commons
RDF, and Apache Jena RIOT has a great collection of RDF parsers, so I
wrote a quick binding to see how it can generate and populate
arbitrary Commons RDF Graphs:

https://github.com/stain/commonsrdf-parser-jena


This works with a configurable Graph and RDFTermFactory implementation
together with Jena's StreamRDF - so no intermediate Jena graphs would
be in existence during parsing.


I was playing a bit with what kind of interface parsing would look
like - and ended up with a Factory pattern:

Parser parser = new JenaParser();
Path filePath = Paths.get("/tmp/file.rdf");
Graph g = parser.contentType(Parser.RDFXML).path(examplePath).parse();


This way you don't need to have multiple parse() methods, and can
support many of the optionals easily, e.g. base or content type.  As
even the source is a method, then if path(), url() or inputStream() is
not appropriate for you, you can add a fourth source type by
extension.


A similar interface for writing could be made, but I didn't get too far.


Note that this is not Jena's Commons RDF implementation
https://issues.apache.org/jira/browse/JENA-1015


--
Stian Soiland-Reyes
Apache Taverna (incubating), Apache Commons RDF (incubating)
http://orcid.org/-0001-9842-9718


-- 
Stian Soiland-Reyes
Apache Taverna (incubating), Apache Commons RDF (incubating)
http://orcid.org/-0001-9842-9718


Re: Help on FROM keyword

2015-05-14 Thread Stian Soiland-Reyes
BTW, for arbitrary dummy or example graphs it might be better to name
them using example.com and friends (.org, .net) which are exactly for that
purpose. E.g.

SELECT ?s  WHERE {
GRAPH http://example.com/graph1 {
  ?s ?p ?o .
}

That way it is more obvious to future readers of your code (e.g. your
future self!) that you deliberately did not mean the actual location on the
web.

In production, for similar arbitrary graphs which do not have a
corresponding web namespace, you can generate graph names like urn:uuid:
b213bf89-92be-42b9-9a6c-2566519c710c (see java.util.UUID) - which admitedly
are less fun for debugging, but unique, at least in the current solar
system.

These also have the advantage of not working at all with FROM.
On 13 May 2015 21:51, Andrea Gazzarini gxs...@gmail.com wrote:

 Ok I got you, many thanks.
 I thought I could create a named graph with an arbitrary URI, put some data
 and then use that URI in the FROM keyword.

 Thanks again
 Andrea
 On 13 May 2015 22:36, Andy Seaborne a...@apache.org wrote:

  On 13/05/15 20:16, Andrea Gazzarini wrote:
 
  Hi Andy,
  Thank you very much for the explanation. But I still miss the point: as
  you
  said, the FROM keyword set / fills the default graph so assuming I
  previously loaded a triple under http://graph1.com
 
  Running
 
  SELECT ?s FROM http://graph1.com { ?s ?p ?o }
 
  I should get the subject of that triple. Is that correct? Because the
 code
  above is running under this exact scenario and I'm getting no result.
 
 
  It will do an HTTP GET on http://graph1.com -- it does not get it from
  the dataset because its the dataset to be queried that is being
 described.
 
  (graph1.com happens to exist and it returns junk.)
 
  Andy
 
 
  Kind Regards,
  Andrea
  On 13 May 2015 21:05, Andy Seaborne a...@apache.org wrote:
 
   FROM describes the dataset to use.
 
  GRAPH accesses the data.
 
  FROM http://example/data set the default graph from the contents of
  http://example/data by reading that URL. (This is for the general
  purpose
  dataset - TDB is slightly different but the principle is the same)
 
   Andy
 
  On 13/05/15 18:57, Andrea Gazzarini wrote:
 
   Hi Trevor,
  Thanks, yes that works...but I would like to understand what is wrong
  with
  my example
 
  Thanks again
  Andrea
  On 13 May 2015 19:54, Trevor Donaldson tmdona...@gmail.com wrote:
 
Hi Andrea,
 
 
  Can I suggest trying this ..
 
  SELECT ?s
  WHERE {
  GRAPH http://graph1.com {
  ?s ?p ?o
 }
  }
 
  On Wed, May 13, 2015 at 1:26 PM, Andrea Gazzarini gxs...@gmail.com
  wrote:
 
Hi,
 
  A question about the FROM keyword. I have the following data
 
  http://graph1.com = { http://a.b.c/s1 http://a.b.c/p1 
  http://a.b.c/o1
  . }
  http://graph2.com = { http://a.b.c/s2 http://a.b.c/p2 
  http://a.b.c/o2
  . }
 
  For simplicity, I created a file for each triple (file1.nt and
  file2.nt).
  Then, I loaded those data using the following code:
 
  Dataset memoryDataset = DatasetFactory.createMem();
  Model memoryModel = ModelFactory.createDefaultModel();
  memoryModel.read(new FileReader(file1.nt), http://e.org;,
 
   N-TRIPLE);
 
   memoryDataset.addNamedModel(http://graph1.com;, memoryModel);
 
  memoryModel = ModelFactory.createDefaultModel();
  memoryModel.read(new FileReader(file2.nt), http://e.org;,
 
   N-TRIPLE);
 
   memoryDataset.addNamedModel(http://graph2.com;, memoryModel);
 
  I'm not understanding the results coming from the following query:
 
  SELECT ?s FROM http://graph1.com { ?s ?p ?o }
 
  ?s = nothing
 
  I was expecting
 
  ?s=http://a.b.c/s1
 
  Am I missing something? I'm using Jena 2.12.1
 
  Thanks in advance for your help
  Andrea
 
 
 
 
 
 
 
 



Re: TDB and Google App Engine

2015-04-12 Thread Stian Soiland-Reyes
I can only think of perhaps an in-memory layer and something clever with
the transaction log.. It would add a 700 MB load to the startup time though.

But how would you even get this transaction log distributed with the App
Engine?

For me going down SDB route sounds like a much easier plumbing job, rather
than building a new App Engine storage layer into TDB.

Perhaps a good question is what you are looking for in TDB.. For instance
do you mainly do reads or updates? Are data modifications just adding or
also removing or changing?

What is the tie to the Google App Engine, is it just $cloud or already
bound with the remaining architecture?

Would it be worth having a look at Hadoop and Jena Elephas? For nothing
else, just looking at the storage bit in Elephas could be useful.
On 12 Apr 2015 19:18, Andy Seaborne a...@apache.org wrote:

 On 12/04/15 15:21, Daniel Ferreira (theiostream) wrote:

 The amount of data is around a 700MB TDB directory.


 OK - so not trivial but not gigantic.

 (I usually think in number of triples and quads)


 The only interface Google Cloud Storage provides in its Java API (
 https://cloud.google.com/appengine/docs/java/googlecloudstorageclient/
 javadoc/)
 is GcsInputChannel – which extends java.nio.Channels.ReadableByteChannel.
 Honestly, I'm not too familiar with Java IO to know whether it fits your
 description.


 Sorry - it seems that ReadableByteChannel isn't seekable.  It can only
 read sequentially through a file.

 Someone else might see ways to do this but as far as I can see, that
 reduces the options as far as can see to read everything locally (probably
 not viable) and SDB over Google Cloud SQL.

 Andy


 I'd also like to avoid using SDB and SQL as much as I can, unless patching
 TDB into being able to talk with Google Cloud Storage proves to be
 practically impossible.

 On Sun, Apr 12, 2015 at 10:17 AM, Andy Seaborne a...@apache.org wrote:

  On 11/04/15 17:33, Daniel Ferreira (theiostream) wrote:

  I'm attempting to get my Java website that uses TDB for caching online.
 However, for it to work for my purposes on GAE I'd have to adapt the TDB
 library for connecting with the Google Cloud Storage API instead of just
 reading stuff from the filesystem.

 Has anyone tried doing this before, or is patching TDB the only choice
 in
 my case?

 Thank you,
 Daniel Ferreira.


  Hmm - tricky.

 The best option will depend on how much data you are planning for in the
 database.

 TDB (direct mode) makes use of random access to the files - does Google
 Cloud Storage offer that?  i.e. does it offer a seekable interface?  If
 it
 does, then adding another implementation of BlockAccess should work. If
 not, it's a bit of a problem.

 The other possibility that occurs to me is to use SDB with the Google
 Cloud SQL.  It's MySQL underneath and SDB has MySQL support.

  Andy







Re: Fuseki User Interface unmanageable

2015-04-08 Thread Stian Soiland-Reyes
If you are unable to access Fuseki from the actual localhost for dataset
management (e.g. it's a remote server and you don't want to use tricks like
SSH tunnels), then you still probably do not want anyone on your network
which can access the server from being able to change the datasets, right?

(I've checked that I can't access it from the internet, so either you have
a firewall sorted, or have turned it off for now)

If you don't already have a firewall that restricts 134...195:3030 to only
be accessed by client IPs which are allowed to manage your Fuseki
installation, then you will probably want to set up username/password
protection in your shiro.ini.


Unfortunately the Fuseki 2 user interface is not yet very good yet at
hiding bits you don't have access to - so if you enable
username/password, it will easily ask other visitors for the password as
soon as they click on manage.

Here's the shiro.ini I use for username/password:

https://github.com/stain/jena/blob/fuseki2-docker-maven/jena-fuseki2/jena-fuseki-docker/shiro.ini

You will probably want a better password than pw :)

(pw above is search-replaced with a random password in my Docker
deployment)

On 5 April 2015 at 19:24, Sorin Gheorghiu sorin.gheorg...@uni-konstanz.de
wrote:

  Hi,

 after starting the server without errors and loading few triples
 successfully, no dataset is shown on the server web interface (neither on
 port 3030 nor 8080).
 Moreover it is not posible to manage the datasets. What am I doing wrong?
 The server runs under Ubuntu 12.04.

 Thanks,
 Sorin

 # java -Xmx8G  -jar fuseki-server.jar --config=/etc/fuseki/config.ttl
 [2015-04-05 19:48:02] Server INFO  Fuseki 2.0.0
 2015-03-08T09:49:20+
 [2015-04-05 19:48:02] Config INFO
 FUSEKI_HOME=/opt/apache-jena-fuseki-2.0.0/.
 [2015-04-05 19:48:02] Config INFO
 FUSEKI_BASE=/opt/apache-jena-fuseki-2.0.0/run
 [2015-04-05 19:48:02] ServletINFO  Initializing Shiro environment
 [2015-04-05 19:48:02] Config INFO  Shiro file:
 file:///opt/apache-jena-fuseki-2.0.0/run/shiro.ini
 [2015-04-05 19:48:02] Config INFO  Configuration file:
 /etc/fuseki/config.ttl
 [2015-04-05 19:48:03] BuilderINFO  Service: TDB/text service
 [2015-04-05 19:48:03] Config INFO  Register: /GND030215
 [2015-04-05 19:48:03] Server INFO  Started 2015/04/05 19:48:03 CEST on
 port 3030

 # /opt/apache-jena-2.13.0/bin/tdbloader --loc:GND030215 GND_example.ttl
 19:36:37 INFO  loader   :: -- Start triples data phase
 19:36:37 INFO  loader   :: ** Load empty triples table
 19:36:37 INFO  loader   :: -- Start quads data phase
 19:36:37 INFO  loader   :: ** Load empty quads table
 19:36:37 INFO  loader   :: Load: GND_example.ttl -- 2015/04/05
 19:36:37 CEST
 19:36:38 INFO  loader   :: -- Finish triples data phase
 19:36:38 INFO  loader   :: ** Data: 196 triples loaded in 0,41
 seconds [Rate: 483,95 per second]
 19:36:38 INFO  loader   :: -- Finish quads data phase
 19:36:38 INFO  loader   :: -- Start triples index phase
 19:36:38 INFO  loader   :: ** Index SPO-POS: 194 slots
 indexed in 0,02 seconds [Rate: 12.125,00 per second]
 19:36:38 INFO  loader   :: ** Index SPO-OSP: 194 slots
 indexed in 0,01 seconds [Rate: 12.933,33 per second]
 19:36:38 INFO  loader   :: -- Finish triples index phase
 19:36:38 INFO  loader   :: ** 194 triples indexed in 0,03
 seconds [Rate: 6.258,06 per second]
 19:36:38 INFO  loader   :: -- Finish triples load
 19:36:38 INFO  loader   :: ** Completed: 196 triples loaded in
 0,46 seconds [Rate: 428,88 per second]
 19:36:38 INFO  loader   :: -- Finish quads load




 http://134.34.201.195:3030/GND030215/query?query=SELECT%20*%20%7B%3Fs%20%3Fp%20%3Fo%7D%20limit%205

 [2015-04-05 19:40:38] Fuseki INFO  [1] GET
 http://134.34.201.195:3030/GND030215/query?query=SELECT%20*%20%7B%3Fs%20%3Fp%20%3Fo%7D%20limit%205
 [2015-04-05 19:40:38] Fuseki INFO  [1] GET /GND030215 :: 'query' ::
 none ? query=SELECT%20*%20%7B%3Fs%20%3Fp%20%3Fo%7D%20limit%205
 [2015-04-05 19:40:38] Fuseki INFO  [1] Query = SELECT * {?s ?p ?o}
 limit 5
 [2015-04-05 19:40:38] Fuseki INFO  [1] exec/select
 [2015-04-05 19:40:38] Fuseki INFO  [1] 200 OK (86 ms)
























-- 
Stian Soiland-Reyes
Apache Taverna (incubating), Apache Commons RDF (incubating)
http://orcid.org/-0001-9842-9718


Re: building ontology

2015-04-08 Thread Stian Soiland-Reyes
Your supervisor is right. You will need a web address somewhere that
you can publish your ontology at.

So for instance, if you actually have a homepage at
http://www.example.com/ and you create an ontology about fish, then
perhaps
http://www.example.com/2015/fish
would be a namespace that you control - at least now in 2015 (someone
else might have purchased your domain name in 2025).


In the simplest case you simply make /2015/fish as an empty
directory on the example.com webserver, or have just a human-readable
index.html describing the ontology there. Ideally the URL should be
able to give the OWL ontology back in an RDF format, which might
require more web server configuration (content negotiation) or the
exposure of file extensions, e.g. http://www.example.com/fish.rdf


Hopefully your school or workplace should have some kind of project or
personal web-space for you - if not using something like GitHub pages
might be a simple fallback.
https://pages.github.com/


Note that my http://www.example.com/ above literally is a made-up
example you should replace with your real web server.

If you are doing example/tutorial code, then example.com would be more
appropriate than hi-jacking a domain like ontologie.fr, as it is an
implicit statement This is not a real, published ontology.  You can
also use http://www.example.org/ or http://www.example.net/ if you
need (confusing) variation.


Now if you are going to develop an ontology that is not just an
example or for training purposes, then good practice says you should
ensure your ontology remains available in years to come - so
http://rpc271.cs.man.example.com/~phdstudent5/test/ontology is
probably not so good namespace for other people in the world to rely
on, it might disappear next week.

If an ontology is intended to become mature, then you should register
and use a namespace with a purl from an independent provider, so that
you can later change the redirection if your actual server location
changes. Well known PURL servers are https://purl.org/ and
https://w3id.org/ -- note that each of these take a bit of time to
respond to registration.



On 5 April 2015 at 00:59, hlel emna emnah...@gmail.com wrote:
 I tried to create an ontology with jena and I chose the following namespace:

 String ns=”http://www.ontologie.fr/monOntologie”;

 OntModel m = ModelFactory.*createOntologyModel*();

 OntClass autt = m.createClass(ns+Auteur);

   OntClass thaut = m.createClass(ns+Theme);

   OntClass motc = m.createClass(ns+ Mot-Clé);

 .

 but my supervisor gives me this note: Your ontology is not really published
 anywhere.  The namespace looks made up.

 Please, how I can resolve this problem???



-- 
Stian Soiland-Reyes
Apache Taverna (incubating), Apache Commons RDF (incubating)
http://orcid.org/-0001-9842-9718


Re: Query regarding Jena versions

2015-04-03 Thread Stian Soiland-Reyes
We generally recommend using the latest Jena, which now is 2.13.0.

See http://jena.apache.org/download/

Is there any particular reason why you are considering using 2.6.4?
On 3 Apr 2015 17:10, Rose Beck rosebeck...@gmail.com wrote:

 I downloaded Jena 2.6.4 today but I was not able to load n-quads in
 it. Can you please confirm if Jena 2.6.4 had N-Quad feature? This will
 help me figure out if I am going wrong somewhere

 On Fri, Apr 3, 2015 at 9:34 PM, Andy Seaborne a...@apache.org wrote:
  On 03/04/15 08:09, Rose Beck wrote:
 
  Just out of curiosity what is difference between Jena's version before
  Apache like Jena 2.6.4 and After Apache. Is it something to do with
  its ability to
  handle n-quads..I mean were quad stores introduced before Apache or
  were they introduced After Apache.
 
 
  There was no formal feature jump from 2.6.x to 2.7.x which is the
  SourceForge-Apache migration.
 
  N-quads, SPARQL 1.1 finalization, and the new, efficient I/O handing in
 RIOT
  (so syntaxes except RDF/XML (and TriX)), was happening from about that
 time
  and later but just in parallel development.
 
  Andy
 



 --
 With Warm Regards,
 Rose



Re: Apache Jena for Android

2015-04-02 Thread Stian Soiland-Reyes
The JSON-LD support through JSON-LD-Java also uses HTTPClient (to load
@contexts), but it can be statically overridden, if needed:

https://github.com/jsonld-java/jsonld-java#customizing-the-apache-httpclient
https://github.com/jsonld-java/jsonld-java/blob/master/core/src/main/java/com/github/jsonldjava/core/DocumentLoader.java#L155



On 2 April 2015 at 12:03, Andy Seaborne a...@apache.org wrote:
 Hi Sören,

 Thanks for that assessment.

 Re: Xerces
 Jena uses Xerces for datatypes - java.xml stiff provides Java types to
 handle xml values but jena uses Xerces internals for literal parsing and for
 the knowledge contained in the derived types hierarchy.  It's not an
 insignificant amount of work.

 This has come up before. Xerces isn't modular so we can't just pick out the
 dv bytes - we may be able to extract the source code and incorporate that
 way and hence not depend on Xerces for that.  That's clearly a bit uck but I
 don't see another way to have the datatype support.

 I've long had a wish that there was a separate XSD library for datatypes,
 separate from XML processing, but the body of knowledge captured by teh
 Xerces work is pretty huge so the effort needed to get it right (and fast)
 is quite daunting.

 Of all the syntax forms supported, TriX is not one I personally worry about
 much :-)

 Re: httpclient

 Trackign back ...
 https://issues.apache.org/jira/browse/JENA-576

 Solr4j depends on httpclient 4.2 or did at the time someone last looked.

 Jena's use of httpclient is fairly contained - having the authenticator
 stuff work is quite important though.

 Andy


 On 31/03/15 21:41, Sören Brunk wrote:

 Hi Andy,

 thanks for your feedback and sorry for taking so long to reply. It would
 be great to get Android support into mainline Jena and I'm willing to
 help. It might be necessary to build an extra jar package for Android
 though, similar to what jena-osgi does.


 Is there are anything the Jena project can do that would make the
 conversion? There may be things that Jena does, or the way is it
 packaged, that are inconvenient for you but really make no differnce
 to the project - sometimes things are just the way they are because it
 was done that way but could easily be done another way.  If you have
 any such points, do email thsilist or raise a JIRA.


 The httpclient issue might resolve itself as soon as Jena is able to
 switch to httpclient 4.3. I've looked into the javax.xml issues in more
 detail and the good news is that all the xsd datatype classes are
 actually there. What's missing are the StAX classes (everything in
 java.xml.stream) which seem to be used in ARQ and core (for SPARQL XML
 result sets, RDF/XML and TriX) and of course in Xerces. That means it's
 enough to repackage the StAX classes from xml-apis and to modify
 jena-arq, jena-core and xercesImpl. I've changed my build accordingly.

 Android uses XmlPullParser for stream parsing. So another solution could
 be to replace StAX with a XmlPull based parsing but I guess that would
 take some effort.


 On Android, how does TDB work well?  TDB uses fairly traditional file
 handling for 32 bit machines - direct mode - and uses memory mapped
 I/O for 64 bit machines - mapped mode - if it can detect the mode
 correctly.  Detection is not subtle, it looks in system property
 java.vm.info and default to 32 bit.  In mapped mode, it does try to
 use as much memory as possible which is not friendly to co-resident
 apps (you can force direct mode programmatically).


 Since most Android devices nowadays run on a 32 bit ARM architecture I
 guess it will run almost always in direct mode.
 But I realized that TDB isn't working at all at the moment, because it
 depends on JDK classes that aren't available on Android for things like
 getting the PID. I think it is possible to replace those calls by using
 similar classes provided by the Android SDK. I will try to get it
 working. A dependency on Android specific code would probably make
 mainline integration more difficult though.

 Sören





-- 
Stian Soiland-Reyes
Apache Taverna (incubating), Apache Commons RDF (incubating)
http://orcid.org/-0001-9842-9718


Re: fuseki.war fails to start: Unsupported major.minor version 51.0

2015-04-01 Thread Stian Soiland-Reyes
The JAVA_HOME environment variable is not (and should not) be passed
through to a service startup script, as it would not work on reboot.

Instead you have to modify something like /etc/default/tomcat or run
updates-alternatives -config java to change the default java OS-wide.

In some distributions simply uninstalling java 6 is enough, but I don't
think that works in Ubuntu 12.04 as it would probably uninstall tomcat as
well.
On 1 Apr 2015 15:45, Sorin Gheorghiu sorin.gheorg...@uni-konstanz.de
wrote:

 Indeed, Tomcat Manager shows current version Java6:

 Server Information
 Tomcat Version  JVM Version JVM Vendor  OS Name OS
 Version  OS Architecture
 Apache Tomcat/7.0.261.6.0_27-b27Sun Microsystems Inc.   Linux
 2.6.32-37-pve amd64



 Regards,
 Sorin


 Am 01.04.2015 um 16:21 schrieb Andy Seaborne:

 Tomcat 7 only requires Java 6

 It looks like it is being run with Java6 despite your command line
 settings showing Java7.

 Are you running tomcat as a service?

 Andy

 On 01/04/15 15:00, Sorin Gheorghiu wrote:

 Hi Jena team,

 Following the installation instructions from
 http://jena.apache.org/documentation/serving_data/ the fuseki server
 2.0.0 starts from command line and it runs as well on local port 3030.

 # cd /opt/apache-jena-fuseki-2.0.0
 # ./fuseki-server
 [2015-04-01 15:32:01] Server INFO  Fuseki 2.0.0
 2015-03-08T09:49:20+
 [2015-04-01 15:32:01] Config INFO
 FUSEKI_HOME=/opt/apache-jena-fuseki-2.0.0
 [2015-04-01 15:32:01] Config INFO
 FUSEKI_BASE=/opt/apache-jena-fuseki-2.0.0/run
 [2015-04-01 15:32:01] ServletINFO  Initializing Shiro environment
 [2015-04-01 15:32:01] Config INFO  Shiro file:
 file:///opt/apache-jena-fuseki-2.0.0/run/shiro.ini
 [2015-04-01 15:32:02] Server INFO  Started 2015/04/01 15:32:02 CEST
 on port 3030

 But *fuseki.war* failed to start on Tomcat 7.0 (see error [1]). An
 upgrade to Java to 1.7.0_51 didn't help, the error still occurs.

 # java -version
 java version 1.7.0_51
 Java(TM) SE Runtime Environment (build 1.7.0_51-b13)
 Java HotSpot(TM) 64-Bit Server VM (build 24.51-b03, mixed mode)

 # echo $JAVA_HOME
 /usr/lib/jvm/java-7-openjdk-amd64/

 # lsb_release -a
 No LSB modules are available.
 Distributor ID: Ubuntu
 Description:Ubuntu 12.04.5 LTS
 Release:12.04
 Codename:   precise

 It seems no permission issue for Tomcat to read the jar files, for
 example:

 # ls -lrt
 /var/lib/tomcat7/webapps/fuseki/WEB-INF/lib/jena-fuseki-core-2.0.0.jar
 -rw-r--r-- 1 tomcat7 tomcat7 252125 Mär  8 09:57
 /var/lib/tomcat7/webapps/fuseki/WEB-INF/lib/jena-fuseki-core-2.0.0.jar


 That's not the WAR file.


 Could you provide any advice how to fix this error please?

 Thank you in advance,
 Sorin

 [1]

 01.04.2015 15:19:01 org.apache.catalina.core.ApplicationContext log
 INFO: HTMLManager: start: Starting web application '/fuseki'
 01.04.2015 15:19:01 org.apache.catalina.core.ApplicationContext log
 SCHWERWIEGEND: FAIL - Application at context path /fuseki could not be
 started
 org.apache.catalina.LifecycleException: Failed to start component
 [StandardEngine[Catalina].StandardHost[localhost].StandardContext
 [/fuseki]]
  at
 org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:154)
  at
 org.apache.catalina.manager.ManagerServlet.start(ManagerServlet.java:1247)

  at
 org.apache.catalina.manager.HTMLManagerServlet.start(HTMLManagerServlet.java:747)


  at
 org.apache.catalina.manager.HTMLManagerServlet.doPost(HTMLManagerServlet.java:222)


  at javax.servlet.http.HttpServlet.service(HttpServlet.java:641)
  at javax.servlet.http.HttpServlet.service(HttpServlet.java:722)
  at
 org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(
 ApplicationFilterChain.java:305)

  at
 org.apache.catalina.core.ApplicationFilterChain.doFilter(
 ApplicationFilterChain.java:210)

  at
 org.apache.catalina.filters.CsrfPreventionFilter.doFilter(CsrfPreventionFilter.java:194)


  at
 org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(
 ApplicationFilterChain.java:243)

  at
 org.apache.catalina.core.ApplicationFilterChain.doFilter(
 ApplicationFilterChain.java:210)

  at
 org.apache.catalina.filters.SetCharacterEncodingFilter.doFilter(
 SetCharacterEncodingFilter.java:108)

  at
 org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(
 ApplicationFilterChain.java:243)

  at
 org.apache.catalina.core.ApplicationFilterChain.doFilter(
 ApplicationFilterChain.java:210)

  at
 org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:224)


  at
 org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:169)


  at
 org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:581)


  at
 org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:168)


  

Re: fuseki.war fails to start: Unsupported major.minor version 51.0

2015-04-01 Thread Stian Soiland-Reyes
I am not sure what that could be - there are no earlier errors? Try

tail -n100 /var/log/tomcat7/catalina.out


Did you also change the ownership of /etc/fuseki so Tomcat would have
write access to it?

mkdir /etc/fuseki
chown tomcat7:tomcat7 /etc/fuseki


You can override this location by setting the FUSEKI_BASE environment
variable in /etc/default/tomcat7 - but still need to ensure the
'tomcat7' user (as it is in Ubuntu) has write access.



I am afraid I was unable to reproduce, using

docker run -it ubuntu:12:04 bash

apt-get update
apt-get install openjdk-7-jdk
apt-get install tomcat7
apt-get install wget
cd /tmp
wget 
http://mirror.vorboss.net/apache/jena/binaries/apache-jena-fuseki-2.0.0.tar.gz
wget 
http://www.apache.org/dist/jena/binaries/apache-jena-fuseki-2.0.0.tar.gz.asc
wget http://www.apache.org/dist/jena/KEYS  # broken https in 12.04
gpg --import KEYS
gpg --verify apache-jena-fuseki-2.0.0.tar.gz.asc
tar zxfv apache-jena-fuseki-2.0.0.tar.gz
mv apache-jena-fuseki-2.0.0/fuseki.war /var/lib/tomcat7/webapps/
mkdir /etc/fuseki
chown tomcat7:tomcat7 /etc/fuseki
/etc/init.d/tomcat7 restart

root@f973c6d9e0ec:/tmp# tail -f /var/log/tomcat7/catalina.out
[2015-04-01 23:13:16] Config INFO  FUSEKI_BASE=/etc/fuseki
[2015-04-01 23:13:16] Config INFO  Shiro file: file:///etc/fuseki/shiro.ini
[2015-04-01 23:13:16] Config INFO  Context path = /fuseki
[2015-04-01 23:13:16] Config INFO  Configuration file:
/etc/fuseki/config.ttl
Apr 01, 2015 11:13:18 PM org.apache.catalina.startup.HostConfig deployDirectory
INFO: Deploying web application directory /var/lib/tomcat7/webapps/ROOT
Apr 01, 2015 11:13:18 PM org.apache.coyote.AbstractProtocol start
INFO: Starting ProtocolHandler [http-bio-8080]
Apr 01, 2015 11:13:18 PM org.apache.catalina.startup.Catalina start
INFO: Server startup in 11575 ms



On 1 April 2015 at 17:27, Sorin Gheorghiu
sorin.gheorg...@uni-konstanz.de wrote:
 I could change to Java7 by editing JAVA_HOME variable in
 /etc/default/tomcat7,
 but I got a *listenerStart *error during a new fuseki start attempt:

 Apr 01, 2015 6:21:16 PM org.apache.catalina.core.StandardContext
 startInternal
 Schwerwiegend: Error listenerStart
 Apr 01, 2015 6:21:16 PM org.apache.catalina.core.StandardContext
 startInternal
 Schwerwiegend: Context [/fuseki] startup failed due to previous errors

 Regards,
 Sorin


 Am 01.04.2015 um 17:49 schrieb Stian Soiland-Reyes:

 The JAVA_HOME environment variable is not (and should not) be passed
 through to a service startup script, as it would not work on reboot.

 Instead you have to modify something like /etc/default/tomcat or run
 updates-alternatives -config java to change the default java OS-wide.

 In some distributions simply uninstalling java 6 is enough, but I don't
 think that works in Ubuntu 12.04 as it would probably uninstall tomcat as
 well.
 On 1 Apr 2015 15:45, Sorin Gheorghiu sorin.gheorg...@uni-konstanz.de
 wrote:

 Indeed, Tomcat Manager shows current version Java6:

 Server Information
 Tomcat Version  JVM Version JVM Vendor  OS Name OS
 Version  OS Architecture
 Apache Tomcat/7.0.261.6.0_27-b27Sun Microsystems Inc.   Linux
 2.6.32-37-pve amd64



 Regards,
 Sorin


 Am 01.04.2015 um 16:21 schrieb Andy Seaborne:

 Tomcat 7 only requires Java 6

 It looks like it is being run with Java6 despite your command line
 settings showing Java7.

 Are you running tomcat as a service?

  Andy

 On 01/04/15 15:00, Sorin Gheorghiu wrote:

 Hi Jena team,

 Following the installation instructions from
 http://jena.apache.org/documentation/serving_data/ the fuseki server
 2.0.0 starts from command line and it runs as well on local port 3030.

 # cd /opt/apache-jena-fuseki-2.0.0
 # ./fuseki-server
 [2015-04-01 15:32:01] Server INFO  Fuseki 2.0.0
 2015-03-08T09:49:20+
 [2015-04-01 15:32:01] Config INFO
 FUSEKI_HOME=/opt/apache-jena-fuseki-2.0.0
 [2015-04-01 15:32:01] Config INFO
 FUSEKI_BASE=/opt/apache-jena-fuseki-2.0.0/run
 [2015-04-01 15:32:01] ServletINFO  Initializing Shiro environment
 [2015-04-01 15:32:01] Config INFO  Shiro file:
 file:///opt/apache-jena-fuseki-2.0.0/run/shiro.ini
 [2015-04-01 15:32:02] Server INFO  Started 2015/04/01 15:32:02 CEST
 on port 3030

 But *fuseki.war* failed to start on Tomcat 7.0 (see error [1]). An
 upgrade to Java to 1.7.0_51 didn't help, the error still occurs.

 # java -version
 java version 1.7.0_51
 Java(TM) SE Runtime Environment (build 1.7.0_51-b13)
 Java HotSpot(TM) 64-Bit Server VM (build 24.51-b03, mixed mode)

 # echo $JAVA_HOME
 /usr/lib/jvm/java-7-openjdk-amd64/

 # lsb_release -a
 No LSB modules are available.
 Distributor ID: Ubuntu
 Description:Ubuntu 12.04.5 LTS
 Release:12.04
 Codename:   precise

 It seems no permission issue for Tomcat to read the jar files, for
 example:

 # ls -lrt
 /var/lib/tomcat7/webapps/fuseki/WEB-INF/lib/jena-fuseki-core-2.0.0.jar
 -rw-r--r-- 1 tomcat7 tomcat7 252125 Mär  8 09:57
 /var/lib

Re: Apache Jena for Android

2015-04-01 Thread Stian Soiland-Reyes
+1 - and how well does the memory mapping of TDB work on Dalvik?


Would jena-sdb work with SQLite?

https://developer.android.com/guide/topics/data/data-storage.html#db

You would probably need https://github.com/SQLDroid/SQLDroid so you
get a JDBC driver.


On 1 April 2015 at 18:02, Claude Warren cla...@xenei.com wrote:
 Might it make sense to use a different persistence engine on Android since
 it probably will not have the huge datasets that TDB is designed for.  It
 might make sense to have a small store available for small devices.  Just a
 thought.

 Claude

 On Tue, Mar 31, 2015 at 9:41 PM, Sören Brunk soeren.br...@tu-dresden.de
 wrote:

 Hi Andy,

 thanks for your feedback and sorry for taking so long to reply. It would
 be great to get Android support into mainline Jena and I'm willing to help.
 It might be necessary to build an extra jar package for Android though,
 similar to what jena-osgi does.


 Is there are anything the Jena project can do that would make the
 conversion? There may be things that Jena does, or the way is it packaged,
 that are inconvenient for you but really make no differnce to the project -
 sometimes things are just the way they are because it was done that way but
 could easily be done another way.  If you have any such points, do email
 thsilist or raise a JIRA.


 The httpclient issue might resolve itself as soon as Jena is able to
 switch to httpclient 4.3. I've looked into the javax.xml issues in more
 detail and the good news is that all the xsd datatype classes are actually
 there. What's missing are the StAX classes (everything in java.xml.stream)
 which seem to be used in ARQ and core (for SPARQL XML result sets, RDF/XML
 and TriX) and of course in Xerces. That means it's enough to repackage the
 StAX classes from xml-apis and to modify jena-arq, jena-core and
 xercesImpl. I've changed my build accordingly.

 Android uses XmlPullParser for stream parsing. So another solution could
 be to replace StAX with a XmlPull based parsing but I guess that would take
 some effort.


 On Android, how does TDB work well?  TDB uses fairly traditional file
 handling for 32 bit machines - direct mode - and uses memory mapped I/O
 for 64 bit machines - mapped mode - if it can detect the mode correctly.
 Detection is not subtle, it looks in system property java.vm.info and
 default to 32 bit.  In mapped mode, it does try to use as much memory as
 possible which is not friendly to co-resident apps (you can force direct
 mode programmatically).


 Since most Android devices nowadays run on a 32 bit ARM architecture I
 guess it will run almost always in direct mode.
 But I realized that TDB isn't working at all at the moment, because it
 depends on JDK classes that aren't available on Android for things like
 getting the PID. I think it is possible to replace those calls by using
 similar classes provided by the Android SDK. I will try to get it working.
 A dependency on Android specific code would probably make mainline
 integration more difficult though.

 Sören

 --
 Dipl. Inf. Sören Brunk
 Research Associate

 Technische Universität Dresden
 Faculty of Computer Science
 Institute for Software- and Multimedia-Technology
 Junior Professorship in Software Engineering of Ubiquitous Systems
 01062 Dresden




 --
 I like: Like Like - The likeliest place on the web
 http://like-like.xenei.com
 LinkedIn: http://www.linkedin.com/in/claudewarren



-- 
Stian Soiland-Reyes
Apache Taverna (incubating), Apache Commons RDF (incubating)
http://orcid.org/-0001-9842-9718


Re: Preprocessor or formatting data in fuseki

2015-03-31 Thread Stian Soiland-Reyes
You would probably want to SELECT ?title ?brand etc. in the SPARQL
query, then you can use XSLT to rewrite the XML based on binding,
rather than try to parse and group the triples, which would become
much harder in XSLT.

http://www.w3.org/TR/rdf-sparql-XMLres/
http://www.w3.org/standards/xml/transformation


On 30 March 2015 at 15:03, Nauman Ramzan nauman.emalla...@gmail.com wrote:
 See right now i am receiving topples
 e.g

 example.com/product/1 example.com/prop/title iPhone
 example.com/product/1 example.com/prop/brand Apple
 example.com/product/1 example.com/prop/condition New
 example.com/product/1 example.com/prop/description Smart phone
 example.com/product/1 example.com/prop/keypoints touch screen, smart
 phone


 I want to get this data in this formate

 example.com/product/1
 example.com/prop/title iPhone
 example.com/prop/brand Apple
 example.com/prop/condition New
 example.com/prop/description Smart phone
 example.com/prop/keypoints touch screen, smart phone
 example.com/product/2
 example.com/prop/title iPhone
 example.com/prop/brand Apple
 example.com/prop/condition New
 example.com/prop/description Smart phone
 example.com/prop/keypoints touch screen, smart phone

 and so on, Purpose of this process is to read data block by block.

 Regards

 On Mon, Mar 30, 2015 at 4:38 PM, Andy Seaborne a...@apache.org wrote:

 On 29/03/15 22:11, Nauman Ramzan wrote:

 Hi all !
 I just want to know how can I formate
 Fuseki response ?
 Like
 item1
title mobile
brand apple
 item2
title mobile
brand apple
 And so on like turtle
 How can i apply these formats ?

 Regards
 Nauman


 That's XML?

 You could apply XSLT to the XML results form of SELECT results.
 You can even get the server to add the stylesheet line with stylesheet=
 That's how HTML output is done.

 Andy





-- 
Stian Soiland-Reyes
Apache Taverna (incubating), Apache Commons RDF (incubating)
http://orcid.org/-0001-9842-9718


Re: Apache Jena for Android

2015-03-12 Thread Stian Soiland-Reyes
SPARQL results are HTTP-streamed back from Fuseki (and in TDB
programmatically), as long as you don't use ORDER and select a
streamable serialization format like JSON (not JSON-LD)

That is exactly what I do in
  https://github.com/openphacts/openphacts-irs
to populate an ElasticSearch instance, by generating SPARQL queries to select
certain properties, then iterating
over the JSON response in a streaming way.

As I register one JSON document in ES per SPARQL result (or more
correctly, per subject URI), then I use the bulk loading feature of ES
to chunk of 1000 in one HTTP request to ES.

I don't know which search engine you have, but I guess you could do
something similar.


If you do it through TDBs API then you should not need to worry about
the serialization as you can just use the Iterator normally.


Note that Jena also has its own text-search integration with Solr
and/or ElasticSearch which could be of interest -
https://jena.apache.org/documentation/query/text-query.html

(in my case I need to customize lots of ElasticSearch indexes (and
need the option to populate from Virtuoso instead of Jena)  and so
have rather done it with the streaming script.)


On 10 March 2015 at 14:58, Fabio Ricci fabio.ri...@semweb.ch wrote:
 Dear community

 does anyone know how to query RDF Data with SPARQL in huge graphs using Jena
 so, that a portion of rdf triples is processed - say 1000 triples at a time
 ?

 I need this in order to INDEX triples in a search engine, need therefore to
 access every triple but not all at a time ...

 Thank you in advance
 Regards
 Fabio



-- 
Stian Soiland-Reyes
Apache Taverna (incubating), Apache Commons RDF (incubating)
http://orcid.org/-0001-9842-9718


Re: Print a model without the option ^^http://www.w3.org/2001/XMLSchema#string

2015-03-02 Thread Stian Soiland-Reyes
What if you try something like this?

https://gist.github.com/stain/be58129e5ac382668f53


public static class SimpleLiteralStreamRDF extends StreamRDFProxy {
public SimpleLiteralStreamRDF(StreamRDF writer) {
super(writer);
}

@Override
public void triple(Triple triple) {
Node object = triple.getObject();
if (object.isLiteral()) {
Literal literal =
ResourceFactory.createPlainLiteral(object.getLiteralLexicalForm());
triple = new Triple(triple.getSubject(),
triple.getPredicate(), literal.asNode());
}
super.triple(triple);
}
}


Model model = ModelFactory.createDefaultModel();
model.add(ResourceFactory.createResource(),
ResourceFactory.createProperty(http://example.com/hasDouble;),
ResourceFactory.createTypedLiteral(13.37,
XSDDatatype.XSDdouble));
model.add(ResourceFactory.createResource(),
ResourceFactory.createProperty(http://example.com/hasString;),
ResourceFactory.createTypedLiteral(uhu,
XSDDatatype.XSDstring));
model.add(ResourceFactory.createResource(),
ResourceFactory.createProperty(http://example.com/hasLang;),
ResourceFactory.createLangLiteral(Hello, en-GB));


final StreamRDF writer =
StreamRDFWriter.getWriterStream(System.out, Lang.TURTLE);
StreamRDF literalWriter = new SimpleLiteralStreamRDF(writer);
StreamOps.graphToStream(model.getGraph(), literalWriter);



The above outputs:

_:b0http://example.com/hasLang  Hello .
_:b1http://example.com/hasDouble  13.37 .
_:b2http://example.com/hasString  uhu .




Note that I could not quickly find the equivalent of my StreamRDFProxy
(see the gist) - PipedTriplesStream is not quite that as it needs a
PipedRDFIterator instead of another StreamRDF.

On 2 March 2015 at 14:53, Marco Tenti tentimar...@gmail.com wrote:
 Hi, everyone,  my question today is a little strange but i need it for a
 integration with a exisisting project, there is a way to write  a model
 without the option of the literal object? In the specific only for the
 string object.
 I solved for now with other java code (Scanner,read,replace,ecc.) but I wanted
 to know if jena allows me to do it directly in some way, for example:

 I have this:

 Subject Predicate myLiteralString^^
 http://www.w3.org/2001/XMLSchema#string
 ...

 Subject Predicate myLiteralString^^
 http://www.w3.org/2001/XMLSchema#long
 Subject Predicate myLiteralString^^
 http://www.w3.org/2001/XMLSchema#decimal
 Subject Predicate myLiteralString^^
 http://www.w3.org/2001/XMLSchema#string

 but i want to print this:
 Subject Predicate myLiteralString
 ...
 Subject Predicate myLiteralString^^
 http://www.w3.org/2001/XMLSchema#long
 Subject Predicate myLiteralString^^
 http://www.w3.org/2001/XMLSchema#decimal
 Subject Predicate myLiteralString

 Ty, in advance. greetings.



-- 
Stian Soiland-Reyes
Apache Taverna (incubating)
http://orcid.org/-0001-9842-9718


Re: Strange Exception

2015-02-16 Thread Stian Soiland-Reyes
 eWrapper.java:164)
  at


 org.apache.jena.fuseki.servlets.HttpServletResponseTracker.sendError(Ht
 tpS
 ervletResponseTracker.java:53)
  at


 org.apache.jena.fuseki.servlets.ServletBase.responseSendError(ServletBa
 se.
 java:73)
  at


 org.apache.jena.fuseki.servlets.SPARQL_ServletBase.doCommon(SPARQL_Serv
 let
 Base.java:82)
  at


 org.apache.jena.fuseki.servlets.SPARQL_Query.doPost(SPARQL_Query.java:5
 7)
  at
 javax.servlet.http.HttpServlet.service(HttpServlet.java:755)
  at
 javax.servlet.http.HttpServlet.service(HttpServlet.java:848)
  at
 org.eclipse.jetty.servlet.ServletHolder.handle(ServletHolder.java:684)
  at


 org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHa
 ndl
 er.java:1496)
  at


 org.eclipse.jetty.servlets.UserAgentFilter.doFilter(UserAgentFilter.jav
 a:8
 2)
  at
 org.eclipse.jetty.servlets.GzipFilter.doFilter(GzipFilter.java:256)
  at


 org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHa
 ndl
 er.java:1467)
  at


 org.eclipse.jetty.servlet.ServletHandler.doHandle(ServletHandler.java:4
 99)
  at


 org.eclipse.jetty.server.session.SessionHandler.doHandle(SessionHandler
 .ja
 va:229)
  at


 org.eclipse.jetty.server.handler.ContextHandler.doHandle(ContextHandler
 .ja
 va:1086)
  at


 org.eclipse.jetty.servlet.ServletHandler.doScope(ServletHandler.java:42
 8)
  at


 org.eclipse.jetty.server.session.SessionHandler.doScope(SessionHandler.
 jav
 a:193)
  at


 org.eclipse.jetty.server.handler.ContextHandler.doScope(ContextHandler.
 jav
 a:1020)
  at


 org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.jav
 a:1
 35)
  at


 org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.j
 ava
 :116)
  at org.eclipse.jetty.server.Server.handle(Server.java:370)
  at


 org.eclipse.jetty.server.AbstractHttpConnection.handleRequest(AbstractH
 ttp
 Connection.java:494)
  at


 org.eclipse.jetty.server.AbstractHttpConnection.content(AbstractHttpCon
 nec
 tion.java:982)
  at


 org.eclipse.jetty.server.AbstractHttpConnection$RequestHandler.content(
 Abs
 tractHttpConnection.java:1043)
  at
 org.eclipse.jetty.http.HttpParser.parseNext(HttpParser.java:865)
  at
 org.eclipse.jetty.http.HttpParser.parseAvailable(HttpParser.java:240)
  at


 org.eclipse.jetty.server.AsyncHttpConnection.handle(AsyncHttpConnection
 .ja
 va:82)
  at


 org.eclipse.jetty.io.nio.SelectChannelEndPoint.handle(SelectChannelEndP
 oin
 t.java:667)
  at


 org.eclipse.jetty.io.nio.SelectChannelEndPoint$1.run(SelectChannelEndPo
 int
 .java:52)
  at


 org.eclipse.jetty.util.thread.QueuedThreadPool.runJob(QueuedThreadPool.
 jav
 a:608)
  at


 org.eclipse.jetty.util.thread.QueuedThreadPool$3.run(QueuedThreadPool.j
 ava
 :543)
  at java.lang.Thread.run(Thread.java:745)

 Regards,

 Michael Brunnbauer

 --
 ++  Michael Brunnbauer
 ++  netEstate GmbH
 ++  Geisenhausener Straße 11a
 ++  81379 München
 ++  Tel +49 89 32 19 77 80
 ++  Fax +49 89 32 19 77 89
 ++  E-Mail bru...@netestate.de
 ++  http://www.netestate.de/
 ++
 ++  Sitz: München, HRB Nr.142452 (Handelsregister B München)
 ++  USt-IdNr. DE221033342
 ++  Geschäftsführer: Michael Brunnbauer, Franz Brunnbauer
 ++  Prokurist: Dipl. Kfm. (Univ.) Markus Hendel














-- 
Stian Soiland-Reyes
Apache Taverna (incubating)
http://orcid.org/-0001-9842-9718


Re: hot swap tdb behind fuseki

2015-02-10 Thread Stian Soiland-Reyes
Are you using the tdb to swap just for reading, or would you need to
synchronize transactions?

Below I'll assume you mean 'reading', and that you want to swap
because you have a 'newer' tdb store from somewhere.


With fuseki2 (I have not checked with Fuseki 1 which only has a REST
interface) you can hot add a new tdb store in the web interface. If
the tdb directory with the given name already exist under
/etc/fuseki/databases it will be re-used and made live immediately.

In my setup I use this in combination with data loading, so that I can
load offline with tdbloader2 and then immediately make it live in an
existing running Fuseki 2.

There's unfortunately an open issue in the web interface with removing
and adding a store with the same name -
https://issues.apache.org/jira/browse/JENA-869 - so if you try this
now with the current SNAPSHOT of Fuseki 2 you would have to make a new
database name for every swap and copy the tdb store into that before
adding it in the user interface.  You could probably hide/simplify
that name from the URI with a simple Apache httpd ProxyPass or
RewriteRule



On 10 February 2015 at 19:19, Paul Tyson phty...@sbcglobal.net wrote:
 I've looked through the user documentation but did not find a clue to
 this problem. I have not dug too deeply into the code.

 The problem is to safely re-initialize a running fuseki server to read a
 new tdb location.

 I've thought of using 2 (or more) jetty or tomcat workers in a
 load-balancing configuration, which would allow staged restarts. But
 before I go there I thought I would ask if there is an easier way.

 Does anyone have a usage pattern for this, or can point me to some
 documentation or classes that would get me started?

 Thanks,
 --Paul




-- 
Stian Soiland-Reyes
Apache Taverna (incubating)
http://orcid.org/-0001-9842-9718


Re: hot swap tdb behind fuseki

2015-02-10 Thread Stian Soiland-Reyes
Here are my data loading notes btw, it is relating to Docker, but should
not be too hard to follow:

https://github.com/stain/jena/tree/fuseki2-docker/jena-fuseki2/jena-fuseki-docker#data-loading

(Note: that docker image is double unofficial as it's SNAPSHOT non-Apache)
On 11 Feb 2015 00:09, Paul Tyson phty...@sbcglobal.net wrote:

 On Tue, 2015-02-10 at 23:38 +, Stian Soiland-Reyes wrote:
  Are you using the tdb to swap just for reading, or would you need to
  synchronize transactions?
 
  Below I'll assume you mean 'reading', and that you want to swap
  because you have a 'newer' tdb store from somewhere.

 Yes, that's the use case exactly.

 
 
  With fuseki2 (I have not checked with Fuseki 1 which only has a REST
  interface) you can hot add a new tdb store in the web interface. If
  the tdb directory with the given name already exist under
  /etc/fuseki/databases it will be re-used and made live immediately.
 

 I currently use fuseki 1 but was looking to upgrade to fuseki2 anyway,
 so this sounds like it will solve my problem.

  In my setup I use this in combination with data loading, so that I can
  load offline with tdbloader2 and then immediately make it live in an
  existing running Fuseki 2.

 I create the new tdb (using tdbloader) and then update a symlink to
 target the new tdb. Currently I restart fuseki and the new tdb is read
 from the symlink. I want to eliminate the restart. It sounds like the
 fuseki2 web interface will allow this.

 
  There's unfortunately an open issue in the web interface with removing
  and adding a store with the same name -
  https://issues.apache.org/jira/browse/JENA-869 - so if you try this
  now with the current SNAPSHOT of Fuseki 2 you would have to make a new
  database name for every swap and copy the tdb store into that before
  adding it in the user interface.  You could probably hide/simplify
  that name from the URI with a simple Apache httpd ProxyPass or
  RewriteRule

 Thanks for the pointers and warning. I'll see if I can work it out.

 Regards,
 --Paul

 
 
 
  On 10 February 2015 at 19:19, Paul Tyson phty...@sbcglobal.net wrote:
   I've looked through the user documentation but did not find a clue to
   this problem. I have not dug too deeply into the code.
  
   The problem is to safely re-initialize a running fuseki server to read
 a
   new tdb location.
  
   I've thought of using 2 (or more) jetty or tomcat workers in a
   load-balancing configuration, which would allow staged restarts. But
   before I go there I thought I would ask if there is an easier way.
  
   Does anyone have a usage pattern for this, or can point me to some
   documentation or classes that would get me started?
  
   Thanks,
   --Paul
  
 
 
 





Re: Sparql Resultset

2015-02-06 Thread Stian Soiland-Reyes
Or use CONSTRUCT WHERE {}  shorthand:

http://www.w3.org/TR/sparql11-query/#constructWhere

I must admit I didn't check if this works in Jena, but given that Andy
cowrote the spec... :-)
On 6 Feb 2015 09:39, Andy Seaborne a...@apache.org wrote:

 On 06/02/15 02:32, Kamalraj Jairam wrote:

 Hello All,

 How do i convert a sparql resultset to a model ?

 Is it possible without transforming the spraql select query to a
 construct query?

 Thanks
 Kamalraj


 What are you trying to do?

 You can convert a ResultSet to a model with ResultSetFormatter.toModel.
 It's really left-over code from the days when SPARQL testing looked like it
 would be model based.

 It is encoding the result set, and it's not related to the vocabulary of
 the model queried.  Try it out to see the vocabulary used.

 Andy




Re: Sparql Resultset

2015-02-06 Thread Stian Soiland-Reyes
One would assume that if you do unions and subqueries, you should also
have a better idea about what kind of graph structure you want
returned.. :-)

You can't construct GRAPHs in CONSTRUCT, for instance (at least not
according to the standard).

In the CONSTRUCT you can reference optional variables, for instance,
and those triples would simply be skipped it that variable is missing
in a particular binding. I don't think you can do conditional branches
or property paths etc. in the CONSTRUCT bit - so you have to simplify
those in the constructed graph (e.g. use a superproperty) or do
multiple queries.


Or do you intend to get something like all nquads required to match
my WHERE clause?

On 6 February 2015 at 11:05, Kamalraj Jairam
kjai...@semanticsoftware.com.au wrote:
 This looks good for simple queries,

 In case of Queries with Unions and Subqueries etc, not sure what the 
 construct graph would look like



 On 6 Feb 2015, at 9:58 pm, Andy Seaborne a...@apache.org wrote:

 On 06/02/15 09:54, Stian Soiland-Reyes wrote:
 Or use CONSTRUCT WHERE {}  shorthand:

 http://www.w3.org/TR/sparql11-query/#constructWhere

 I must admit I didn't check if this works in Jena, but given that Andy
 cowrote the spec... :-)

 Yes, it works.

 It's syntactic sugar the parser sorts out.  It's not even in the abstract 
 syntax tree.

 arq.qparse 'CONSTRUCT WHERE {?s ?p ?o}'
 ==
 CONSTRUCT
  { ?s ?p ?o .}
 WHERE
  { ?s ?p ?o}

   Andy

 On 6 Feb 2015 09:39, Andy Seaborne a...@apache.org wrote:

 On 06/02/15 02:32, Kamalraj Jairam wrote:

 Hello All,

 How do i convert a sparql resultset to a model ?

 Is it possible without transforming the spraql select query to a
 construct query?

 Thanks
 Kamalraj


 What are you trying to do?

 You can convert a ResultSet to a model with ResultSetFormatter.toModel.
 It's really left-over code from the days when SPARQL testing looked like it
 would be model based.

 It is encoding the result set, and it's not related to the vocabulary of
 the model queried.  Try it out to see the vocabulary used.

 Andy








-- 
Stian Soiland-Reyes
Apache Taverna (incubating)
http://orcid.org/-0001-9842-9718


Re: Jena setup

2015-02-04 Thread Stian Soiland-Reyes
My apologies for confusing you..  Redhat-based distros has chkconfig now.

Here's how I suggest you install it:

[root@b89e7dda506f tmp]# cd /tmp
[root@b89e7dda506f tmp]# wget
http://mirror.catn.com/pub/apache//jena/binaries/jena-fuseki-1.1.1-distribution.tar.gz
[root@b89e7dda506f tmp]# tar zxfv jena-fuseki-1.1.1-distribution.tar.gz
[root@b89e7dda506f tmp]# mv jena-fuseki-1.1.1 /opt/jena-fuseki
[root@b89e7dda506f tmp]# ln -s /opt/jena-fuseki/fuseki /etc/init.d/
[root@b89e7dda506f tmp]# chkconfig fuseki on
[root@b89e7dda506f tmp]# chkconfig --list fuseki
fuseki 0:off1:off2:on3:on4:on5:on6:off

This would mean it should start on startup. To start it right away:

[root@b89e7dda506f tmp]# service fuseki start
Starting Fuseki: Redirecting Fuseki stderr/stdout to
/opt/jena-fuseki/log/stderrout.log
STARTED Fuseki Wed Feb  4 11:42:35 UTC 2015
PID=265

[root@b89e7dda506f tmp]# ps -ef
UIDPID  PPID  C STIME TTY  TIME CMD
root 1 0  0 11:23 ?00:00:00 bash
root   265 1  8 11:42 ?00:00:06 java -Xmx1200M -jar
/opt/jena-fuseki/fuseki-server.jar --update --loc=/opt/jena-fuseki/DB
/ds


These settings make it more unix-like installation:

[root@b89e7dda506f tmp]# cat /etc/default/fuseki
FUSEKI_DATA_DIR=/var/lib/fuseki
FUSEKI_LOGS=/var/log/fuseki

See /etc/init.d/fuseki for other variables you can set.



Note that setting FUSEKI_USER does not seem to work very well (at
least for me) - it's not passing along the remaining variables - so
unfortunately your Fuseki would run as the root user with the security
implications this entails.



On 4 February 2015 at 00:02, Legault, Phillip [ITSUS]
plega...@its.jnj.com wrote:
 Thanks
 Joshua and Stian
 I will give this a try in the morning

 -Original Message-
 From: Stian Soiland-Reyes [mailto:st...@apache.org]
 Sent: Tuesday, February 03, 2015 6:01 PM
 To: joshuaaa...@gmail.com; users@jena.apache.org
 Subject: Re: Jena setup

 You would also want to run update-rc.d for the runlevels so that it is 
 started on reboot.

 I'm afraid I don't remember the exact syntax.

 Note that the init script from Jena Fuseki uses /etc/fuseki for both 
 configuration and data storage. You can either edit the init script or create 
 a symlink to use a different folder.
 On 3 Feb 2015 22:49, Joshua TAYLOR joshuaaa...@gmail.com wrote:

 How to start Fuseki when OS starts? [1] may be of interest to you:

 Fuseki comes with a script that does exactly the kinds of things
 you're asking for. It's just a matter of putting the fuseki script in
 an init.d directory

 I've not used Red Hat/Fedora in a while, but I imagine it must have
 some of the same kinds of init.d scripts.

 [1] http://stackoverflow.com/q/26589016/1281433

 On Tue, Feb 3, 2015 at 5:21 PM, Legault, Phillip [ITSUS]
 plega...@its.jnj.com wrote:
 
  I'm new to Jena Fuseki and I hope someone can help me. I'm trying to
  get
 the fuseki server running on redhat @ reboot.
  I'm able to get it running at the command line and the test data worked.
  export JENAROOT=/app/jena
  PATH=$PATH:$JENAROOT/bin
  ./fuseki-server --update --loc=DB --port=8080 /ds
 
  I'm setting this up to use with a Semantic MediaWiiki server
 
  How do I get this to start on reboot with the env vars?
 
  I tried starting it with crontab and could not get it to work.
 
 
 
 



 --
 Joshua Taylor, http://www.cs.rpi.edu/~tayloj/




-- 
Stian Soiland-Reyes, eScience Lab
School of Computer Science
The University of Manchester
http://soiland-reyes.com/stian/work/http://orcid.org/-0001-9842-9718


Re: Jena setup

2015-02-04 Thread Stian Soiland-Reyes
The non-root bug is a known issue with a patch:

https://issues.apache.org/jira/browse/JENA-789


To run as a non-root user:

Edit /etc/default/fuseki to contain:

[root@b89e7dda506f /]# cat /etc/default/fuseki
FUSEKI_HOME=/opt/jena-fuseki
FUSEKI_DATA_DIR=/var/lib/fuseki
FUSEKI_LOGS=/var/log/fuseki
FUSEKI_USER=fuseki

[root@b89e7dda506f /]# source /etc/default/fuseki
[root@b89e7dda506f /]# adduser fuseki
[root@b89e7dda506f /]# service fuseki stop
[root@b89e7dda506f /]# chown -R $FUSEKI_USER $FUSEKI_DATA_DIR $FUSEKI_LOGS
[root@b89e7dda506f /]# wget
https://issues.apache.org/jira/secure/attachment/12671074/jena-789.patch
[root@b89e7dda506f /]# yum install -y patch
[root@b89e7dda506f /]# patch /opt/jena-fuseki/fuseki jena-789.patch
[root@b89e7dda506f /]# service fuseki start
[root@b89e7dda506f /]# cat /var/log/fuseki/stderrout.log
12:11:19 INFO  TDB dataset: directory=/var/lib/fuseki
12:11:20 INFO  Dataset path = /ds
12:11:20 INFO  Fuseki 1.1.1 2014-10-02T16:36:17+0100
12:11:20 INFO  Started 2015/02/04 12:11:20 UTC on port 3030



On 4 February 2015 at 12:01, Stian Soiland-Reyes
soiland-re...@cs.manchester.ac.uk wrote:
 My apologies for confusing you..  Redhat-based distros has chkconfig now.

 Here's how I suggest you install it:

 [root@b89e7dda506f tmp]# cd /tmp
 [root@b89e7dda506f tmp]# wget
 http://mirror.catn.com/pub/apache//jena/binaries/jena-fuseki-1.1.1-distribution.tar.gz
 [root@b89e7dda506f tmp]# tar zxfv jena-fuseki-1.1.1-distribution.tar.gz
 [root@b89e7dda506f tmp]# mv jena-fuseki-1.1.1 /opt/jena-fuseki
 [root@b89e7dda506f tmp]# ln -s /opt/jena-fuseki/fuseki /etc/init.d/
 [root@b89e7dda506f tmp]# chkconfig fuseki on
 [root@b89e7dda506f tmp]# chkconfig --list fuseki
 fuseki 0:off1:off2:on3:on4:on5:on6:off

 This would mean it should start on startup. To start it right away:

 [root@b89e7dda506f tmp]# service fuseki start
 Starting Fuseki: Redirecting Fuseki stderr/stdout to
 /opt/jena-fuseki/log/stderrout.log
 STARTED Fuseki Wed Feb  4 11:42:35 UTC 2015
 PID=265

 [root@b89e7dda506f tmp]# ps -ef
 UIDPID  PPID  C STIME TTY  TIME CMD
 root 1 0  0 11:23 ?00:00:00 bash
 root   265 1  8 11:42 ?00:00:06 java -Xmx1200M -jar
 /opt/jena-fuseki/fuseki-server.jar --update --loc=/opt/jena-fuseki/DB
 /ds


 These settings make it more unix-like installation:

 [root@b89e7dda506f tmp]# cat /etc/default/fuseki
 FUSEKI_DATA_DIR=/var/lib/fuseki
 FUSEKI_LOGS=/var/log/fuseki

 See /etc/init.d/fuseki for other variables you can set.



 Note that setting FUSEKI_USER does not seem to work very well (at
 least for me) - it's not passing along the remaining variables - so
 unfortunately your Fuseki would run as the root user with the security
 implications this entails.



 On 4 February 2015 at 00:02, Legault, Phillip [ITSUS]
 plega...@its.jnj.com wrote:
 Thanks
 Joshua and Stian
 I will give this a try in the morning

 -Original Message-
 From: Stian Soiland-Reyes [mailto:st...@apache.org]
 Sent: Tuesday, February 03, 2015 6:01 PM
 To: joshuaaa...@gmail.com; users@jena.apache.org
 Subject: Re: Jena setup

 You would also want to run update-rc.d for the runlevels so that it is 
 started on reboot.

 I'm afraid I don't remember the exact syntax.

 Note that the init script from Jena Fuseki uses /etc/fuseki for both 
 configuration and data storage. You can either edit the init script or 
 create a symlink to use a different folder.
 On 3 Feb 2015 22:49, Joshua TAYLOR joshuaaa...@gmail.com wrote:

 How to start Fuseki when OS starts? [1] may be of interest to you:

 Fuseki comes with a script that does exactly the kinds of things
 you're asking for. It's just a matter of putting the fuseki script in
 an init.d directory

 I've not used Red Hat/Fedora in a while, but I imagine it must have
 some of the same kinds of init.d scripts.

 [1] http://stackoverflow.com/q/26589016/1281433

 On Tue, Feb 3, 2015 at 5:21 PM, Legault, Phillip [ITSUS]
 plega...@its.jnj.com wrote:
 
  I'm new to Jena Fuseki and I hope someone can help me. I'm trying to
  get
 the fuseki server running on redhat @ reboot.
  I'm able to get it running at the command line and the test data worked.
  export JENAROOT=/app/jena
  PATH=$PATH:$JENAROOT/bin
  ./fuseki-server --update --loc=DB --port=8080 /ds
 
  I'm setting this up to use with a Semantic MediaWiiki server
 
  How do I get this to start on reboot with the env vars?
 
  I tried starting it with crontab and could not get it to work.
 
 
 
 



 --
 Joshua Taylor, http://www.cs.rpi.edu/~tayloj/




 --
 Stian Soiland-Reyes, eScience Lab
 School of Computer Science
 The University of Manchester
 http://soiland-reyes.com/stian/work/http://orcid.org/-0001-9842-9718



-- 
Stian Soiland-Reyes, myGrid team
School of Computer Science
The University of Manchester
http://soiland-reyes.com/stian/work/ http://orcid.org/-0001-9842-9718


Re: Jena setup

2015-02-03 Thread Stian Soiland-Reyes
You would also want to run update-rc.d for the runlevels so that it is
started on reboot.

I'm afraid I don't remember the exact syntax.

Note that the init script from Jena Fuseki uses /etc/fuseki for both
configuration and data storage. You can either edit the init script or
create a symlink to use a different folder.
On 3 Feb 2015 22:49, Joshua TAYLOR joshuaaa...@gmail.com wrote:

 How to start Fuseki when OS starts? [1] may be of interest to you:

 Fuseki comes with a script that does exactly the kinds of things
 you're asking for. It's just a matter of putting the fuseki script in
 an init.d directory

 I've not used Red Hat/Fedora in a while, but I imagine it must have
 some of the same kinds of init.d scripts.

 [1] http://stackoverflow.com/q/26589016/1281433

 On Tue, Feb 3, 2015 at 5:21 PM, Legault, Phillip [ITSUS]
 plega...@its.jnj.com wrote:
 
  I'm new to Jena Fuseki and I hope someone can help me. I'm trying to get
 the fuseki server running on redhat @ reboot.
  I'm able to get it running at the command line and the test data worked.
  export JENAROOT=/app/jena
  PATH=$PATH:$JENAROOT/bin
  ./fuseki-server --update --loc=DB --port=8080 /ds
 
  I'm setting this up to use with a Semantic MediaWiiki server
 
  How do I get this to start on reboot with the env vars?
 
  I tried starting it with crontab and could not get it to work.
 
 
 
 



 --
 Joshua Taylor, http://www.cs.rpi.edu/~tayloj/



Re: elephas project

2015-01-27 Thread Stian Soiland-Reyes
Jena Elephas is still an experimental feature, so you have to use a
SNAPSHOT version/repository.

You'll probably want something like:

dependencies
 dependency
groupIdorg.apache.jena/groupId
artifactIdjena-elephas-mapreduce/artifactId
version0.9.0-SNAPSHOT/version
 /dependency
/dependencies

  repositories
repository
  idapache.snapshots/id
  nameApache Snapshot Repository/name
  urlhttp://repository.apache.org/snapshots/url
  releases
enabledfalse/enabled
  /releases
/repository
  /repositories


If you prefer not to use the snapshot repository you can build
jena-elephas from the hadoop-rdf branch in git. See

http://jena.apache.org/download/#source-code
https://github.com/apache/jena/tree/hadoop-rdf/jena-elephas


Here's a demo application:

https://github.com/apache/jena/tree/hadoop-rdf/jena-elephas/jena-elephas-stats


On 27 January 2015 at 09:57, Carmen Manzulli carmenmanzu...@gmail.com wrote:
 Hi,
 I would like to know what version will i insert in my dependecies if i want
 to prove jena-elephas-*?

 thanks,
 Carmen

-- 
Stian Soiland-Reyes
Apache Taverna (incubating)
http://orcid.org/-0001-9842-9718


Re: shiro.ini with custom realm fuseki2

2015-01-19 Thread Stian Soiland-Reyes
You can set the FUSEKI_BASE environment variable within your Tomcat
startup script (e.g. in /usr/share/tomcat7/bin/setenv.sh) to customize
the folder.

e.g.

FUSEKI_BASE=/etc/fuseki
export FUSEKI_BASE

The folder /etc/fuseki is the default when running the WAR - this
folder must be writeable by the tomcat UNIX user.



On 19 January 2015 at 13:42, Trevor Donaldson tmdona...@gmail.com wrote:
 Found the problem from tomcat. Why is fuseki looking here for the shiro.ini
 file? Shouldn't it be relative to ./run not relative to tomcat/bin.
 [2015-01-19 08:34:43] Config INFO  Shiro file:
 file:///home/trevor/servers/tomcat/apache-tomcat-7.0.57/bin/home/trevor/servers/fuseki/jena-fuseki-dist-2.0.0-SNAPSHOT/run/shiro.ini


 On Mon, Jan 19, 2015 at 8:38 AM, Trevor Donaldson tmdona...@gmail.com
 wrote:

 More info, I think it may be a problem with the war vs jetty. I tried to
 start fuseki from command line and I get the expected class not found
 exception. Unfortunately I don't get that from the war file.

 On Mon, Jan 19, 2015 at 7:48 AM, Trevor Donaldson tmdona...@gmail.com
 wrote:

 Yes the classes are available.  I don't think fuseki is using my
 shiro.ini. I modified the file in. /run but I don't see anything different.
 I restarted tomcat and it isn't recognizing any change I make. I even wiped
 out the shiro.ini file to see if it would error, nothing happens.
 On Jan 19, 2015 7:04 AM, Stian Soiland-Reyes 
 soiland-re...@cs.manchester.ac.uk wrote:

 I actually modified my shiro.ini yesterday, to enable the basic auth
 admin user (as localhost inside a Docker image is not the same as
 localhost outside..) and this worked fine (except being asked for
 username/password on every page, not just admin page)


 You have to edit it in /etc/fuseki/ (or in ./run)  after starting
 Fuseki 2 once - then restart after editing.

 I don't know about the details of how to do alternative realms,
 however. Are you sure that those classes are available within the
 fuseki-server.jar or within the fuseki.war's WEB-INF/lib folder?



 (Yes - the Fuseki2 docker image is coming soon - but I have to get
 that admin-user sorted as otherwise you can't load any data :)  --
 perhaps having a command line option to stage-load with tdb should
 also be included.)

 On 19 January 2015 at 01:23, Trevor Donaldson tmdona...@gmail.com
 wrote:
  Not sure if this is correct place but I will ask regardless. I am
 trying to
  use a custom realm to authenticate users to the fuseki interface. This
 is
  my shiro.ini file but when I hit the fuseki url nothing happens. It
 doesn't
  look like it is authenticating at all.
 
  [main]
  # Development
  ssl.enabled = true
 
 
 plainMatcher=org.apache.shiro.authc.credential.AllowAllCredentialsMatcher
  #iniRealm=org.apache.shiro.realm.text.IniRealm
  #iniRealm.credentialsMatcher = $plainMatcher
 
  certificateRealm=custom.shiro.web.CustomRealm
  certificateRealm.credentialsMatcher = $plainMatcher
 
  securityManager.realms=$certificateRealm
 
  certificateFilter=custom.shiro.web.X509AuthenticationFilter
  #localhost=org.apache.jena.fuseki.authz.LocalhostFilter
 
  Not sure what I am doing wrong. Thanks in advance



 --
 Stian Soiland-Reyes, myGrid team
 School of Computer Science
 The University of Manchester
 http://soiland-reyes.com/stian/work/
 http://orcid.org/-0001-9842-9718






-- 
Stian Soiland-Reyes, myGrid team
School of Computer Science
The University of Manchester
http://soiland-reyes.com/stian/work/ http://orcid.org/-0001-9842-9718


Re: shiro.ini with custom realm fuseki2

2015-01-19 Thread Stian Soiland-Reyes
I actually modified my shiro.ini yesterday, to enable the basic auth
admin user (as localhost inside a Docker image is not the same as
localhost outside..) and this worked fine (except being asked for
username/password on every page, not just admin page)


You have to edit it in /etc/fuseki/ (or in ./run)  after starting
Fuseki 2 once - then restart after editing.

I don't know about the details of how to do alternative realms,
however. Are you sure that those classes are available within the
fuseki-server.jar or within the fuseki.war's WEB-INF/lib folder?



(Yes - the Fuseki2 docker image is coming soon - but I have to get
that admin-user sorted as otherwise you can't load any data :)  --
perhaps having a command line option to stage-load with tdb should
also be included.)

On 19 January 2015 at 01:23, Trevor Donaldson tmdona...@gmail.com wrote:
 Not sure if this is correct place but I will ask regardless. I am trying to
 use a custom realm to authenticate users to the fuseki interface. This is
 my shiro.ini file but when I hit the fuseki url nothing happens. It doesn't
 look like it is authenticating at all.

 [main]
 # Development
 ssl.enabled = true

 plainMatcher=org.apache.shiro.authc.credential.AllowAllCredentialsMatcher
 #iniRealm=org.apache.shiro.realm.text.IniRealm
 #iniRealm.credentialsMatcher = $plainMatcher

 certificateRealm=custom.shiro.web.CustomRealm
 certificateRealm.credentialsMatcher = $plainMatcher

 securityManager.realms=$certificateRealm

 certificateFilter=custom.shiro.web.X509AuthenticationFilter
 #localhost=org.apache.jena.fuseki.authz.LocalhostFilter

 Not sure what I am doing wrong. Thanks in advance



-- 
Stian Soiland-Reyes, myGrid team
School of Computer Science
The University of Manchester
http://soiland-reyes.com/stian/work/ http://orcid.org/-0001-9842-9718


Re: Third Party Libraries in Fuseki 2

2015-01-16 Thread Stian Soiland-Reyes
It should be safest to do the second option of WEB-INF/lib - otherwise
you might have to ensure that everything your JAR in tomcat/lib
requires is also in tomcat/lib (even if it is in WEB-INF/lib) - which
could cause conflicts.



On 16 January 2015 at 02:46, Trevor Donaldson tmdona...@gmail.com wrote:
 Ok thanks.
 On Jan 15, 2015 9:05 PM, John A. Fereira ja...@cornell.edu wrote:

 That depends on what you're using for your servlet container.  When I use
 jetty I just create a lib directory in the directory where I've downloaded
 fuseki, and  drop any jar files there (for example, if you want to connect
 to an sdb that's where the sdb jar file would go.  Then the start up script
 just needs to include those jar files in the classpath.  If you're
 deploying to Tomcat the easiest way is to use jar to expand the fuseki.war
 file.  Then you should see a WEB-INF/lib directory.   Drop your jar file
 then the re-create the war file with the jar command.


 -Original Message-
 From: Trevor Donaldson [mailto:tmdona...@gmail.com]
 Sent: Thursday, January 15, 2015 8:21 PM
 To: users@jena.apache.org
 Subject: Third Party Libraries in Fuseki 2

 Where should I place third party libraries in Fuseki2? I am using
 fuseki.war. I would like to use a custom shiro realm. I am not sure where
 to place the custom.jar.

 Thanks




-- 
Stian Soiland-Reyes, myGrid team
School of Computer Science
The University of Manchester
http://soiland-reyes.com/stian/work/ http://orcid.org/-0001-9842-9718


Re: Third Party Libraries in Fuseki 2

2015-01-16 Thread Stian Soiland-Reyes
Presumably one would always have to do the WEB-INF/lib trick to add
custom ARQ Filter functions?

https://jena.apache.org/documentation/query/extension.html#value-functions


(.. as the functions would need access to the interface
com.hp.hpl.jena.sparql.pfunction.PFuncAssignToObject from the webapp
classloader that holds jena-arq.jar and friends)



Does https://jena.apache.org/documentation/query/java-uri.html even
work within Fuseki 2 as a WAR?

com.hp.hpl.jena.sparql.util.Loader uses Class.forName() ...

On 16 January 2015 at 15:10, John A. Fereira ja...@cornell.edu wrote:

 Sounds good.  So, did it work?

 Documenting this somewhere would probably be useful.

 -Original Message-
 From: Trevor Donaldson [mailto:tmdona...@gmail.com]
 Sent: Friday, January 16, 2015 10:02 AM
 To: users@jena.apache.org
 Subject: Re: Third Party Libraries in Fuseki 2

 Thanks Stian, John, and Andy. I actually went with jar -uf war 
 WEB-INF/lib/custom.jar

 On Fri, Jan 16, 2015 at 9:48 AM, Andy Seaborne a...@apache.org wrote:

 If you want additional jars/classes AND in war file form, I think it
 needs some small amount of self-assembly.

 You may be able to take the war file distributed and add your extra
 jars (it is a zip file; or jar -u) I've not tried - just read some
 page like
 http://linuxproblems.org/wiki/Add_or_update_files_in_a_war_file
 :-)

 With maven, you can probably do that, or have your own war builder
 with the same dependency of jena-fuseki-core as the delivery module.

 Andy


 On 16/01/15 13:59, Stian Soiland-Reyes wrote:

 It should be safest to do the second option of WEB-INF/lib -
 otherwise you might have to ensure that everything your JAR in
 tomcat/lib requires is also in tomcat/lib (even if it is in
 WEB-INF/lib) - which could cause conflicts.



 On 16 January 2015 at 02:46, Trevor Donaldson tmdona...@gmail.com
 wrote:

 Ok thanks.
 On Jan 15, 2015 9:05 PM, John A. Fereira ja...@cornell.edu wrote:

  That depends on what you're using for your servlet container.  When
 I
 use
 jetty I just create a lib directory in the directory where I've
 downloaded fuseki, and  drop any jar files there (for example, if
 you want to connect to an sdb that's where the sdb jar file would
 go.  Then the start up script just needs to include those jar files
 in the classpath.  If you're deploying to Tomcat the easiest way is
 to use jar to expand the fuseki.war
 file.  Then you should see a WEB-INF/lib directory.   Drop your jar file
 then the re-create the war file with the jar command.


 -Original Message-
 From: Trevor Donaldson [mailto:tmdona...@gmail.com]
 Sent: Thursday, January 15, 2015 8:21 PM
 To: users@jena.apache.org
 Subject: Third Party Libraries in Fuseki 2

 Where should I place third party libraries in Fuseki2? I am using
 fuseki.war. I would like to use a custom shiro realm. I am not sure
 where to place the custom.jar.

 Thanks









-- 
Stian Soiland-Reyes
Apache Taverna (incubating)
http://orcid.org/-0001-9842-9718


Re: Third Party Libraries in Fuseki 2

2015-01-16 Thread Stian Soiland-Reyes
Just relax - custom property functions work well in Fuseki 2. (which
is presumably something along the lines of what Trevor wants to add).

I tested a custom function with Fuseki 2 WAR deployed in Tomcat 7:

PREFIX arq: java:arq.examples.propertyfunction.
SELECT ?s ?name WHERE { ?s arq:localname ?name }

works perfectly.

I added localname.jar to WEB-INF/lib/ as Trevor suggests:

sudo jar -uf /var/lib/tomcat7/webapps/fuseki.war WEB-INF/lib/localname.jar

(You have to place the JAR in an empty subfolder WEB-INF/lib/first)


Tomcat should restart the application automatically when the .war is updated.

(I made localname.jar from the jena-arq/src-examples. I had to do the
last bit old-skool with javac and jar as there was no pom.xml for the
examples  :( )


# fuseki dist

Installing custom JARs to fuseki 1 or in the Fuseki 2
jena-fuseki2/jena-fuseki-dist distribution seems to be a bit trickier,
as you have to edit the launcher scripts fuseki-server or
fuseki-server.bat to modify the java -classpath.

(Even then I could not get this to work, but I didn't try very hard).

On 16 January 2015 at 16:14, Stian Soiland-Reyes st...@apache.org wrote:
 Presumably one would always have to do the WEB-INF/lib trick to add
 custom ARQ Filter functions?

 https://jena.apache.org/documentation/query/extension.html#value-functions


 (.. as the functions would need access to the interface
 com.hp.hpl.jena.sparql.pfunction.PFuncAssignToObject from the webapp
 classloader that holds jena-arq.jar and friends)



 Does https://jena.apache.org/documentation/query/java-uri.html even
 work within Fuseki 2 as a WAR?

 com.hp.hpl.jena.sparql.util.Loader uses Class.forName() ...

 On 16 January 2015 at 15:10, John A. Fereira ja...@cornell.edu wrote:

 Sounds good.  So, did it work?

 Documenting this somewhere would probably be useful.

 -Original Message-
 From: Trevor Donaldson [mailto:tmdona...@gmail.com]
 Sent: Friday, January 16, 2015 10:02 AM
 To: users@jena.apache.org
 Subject: Re: Third Party Libraries in Fuseki 2

 Thanks Stian, John, and Andy. I actually went with jar -uf war 
 WEB-INF/lib/custom.jar

 On Fri, Jan 16, 2015 at 9:48 AM, Andy Seaborne a...@apache.org wrote:

 If you want additional jars/classes AND in war file form, I think it
 needs some small amount of self-assembly.

 You may be able to take the war file distributed and add your extra
 jars (it is a zip file; or jar -u) I've not tried - just read some
 page like
 http://linuxproblems.org/wiki/Add_or_update_files_in_a_war_file
 :-)

 With maven, you can probably do that, or have your own war builder
 with the same dependency of jena-fuseki-core as the delivery module.

 Andy


 On 16/01/15 13:59, Stian Soiland-Reyes wrote:

 It should be safest to do the second option of WEB-INF/lib -
 otherwise you might have to ensure that everything your JAR in
 tomcat/lib requires is also in tomcat/lib (even if it is in
 WEB-INF/lib) - which could cause conflicts.



 On 16 January 2015 at 02:46, Trevor Donaldson tmdona...@gmail.com
 wrote:

 Ok thanks.
 On Jan 15, 2015 9:05 PM, John A. Fereira ja...@cornell.edu wrote:

  That depends on what you're using for your servlet container.  When
 I
 use
 jetty I just create a lib directory in the directory where I've
 downloaded fuseki, and  drop any jar files there (for example, if
 you want to connect to an sdb that's where the sdb jar file would
 go.  Then the start up script just needs to include those jar files
 in the classpath.  If you're deploying to Tomcat the easiest way is
 to use jar to expand the fuseki.war
 file.  Then you should see a WEB-INF/lib directory.   Drop your jar file
 then the re-create the war file with the jar command.


 -Original Message-
 From: Trevor Donaldson [mailto:tmdona...@gmail.com]
 Sent: Thursday, January 15, 2015 8:21 PM
 To: users@jena.apache.org
 Subject: Third Party Libraries in Fuseki 2

 Where should I place third party libraries in Fuseki2? I am using
 fuseki.war. I would like to use a custom shiro realm. I am not sure
 where to place the custom.jar.

 Thanks









 --
 Stian Soiland-Reyes
 Apache Taverna (incubating)
 http://orcid.org/-0001-9842-9718



-- 
Stian Soiland-Reyes, myGrid team
School of Computer Science
The University of Manchester
http://soiland-reyes.com/stian/work/ http://orcid.org/-0001-9842-9718


Re: Testing of jena-osgi bundle

2015-01-14 Thread Stian Soiland-Reyes
Thanks for having a look!

I don't have write access to the Jena snapshot repository and this is
still an open pull request.


It should however be here:

http://repository.mygrid.org.uk/artifactory/simple/incubator-snapshot-local/

to use it in Maven, add:

dependencies
dependency
groupIdorg.apache.jena/groupId
artifactIdjena-osgi/artifactId
version2.12.2-SNAPSHOT/version
typebundle/type
/dependency
/dependencies

repositories
repository
  idtaverna-incubating/id
  nameApache Taverna incubating Repository/name

urlhttp://repository.mygrid.org.uk/artifactory/incubator-snapshot-local//url
  releases
enabledfalse/enabled
  /releases
  snapshots /
/repository
/repositories


(hosted outside Apache because Taverna is freshly incubating and
haven't got all the apache.org infrastructure set up yet)


The other bundle dependencies should be pulled in by Maven, e.g.
httpcore-osgi and jackson-core - you might want to check mvn
dependency:tree for duplications with your own.


As jena-osgi now includes the shadowed classes directly it can also be
used as a compile dependency without ever needing jena-tdb etc.

(I deviated from the pattern of having the non-bundle dependencies
listed as scopecompilescope - as that means that any Maven users
of jena-osgi would also get transitive non-bundle duplicate
dependencies like httpclient-cache and jena-arq - or have to add a
fragile  exclusions as I had to do for httpclient-osgi -- see
https://github.com/stain/jena/blob/jena-osgi-bundle/jena-osgi/pom.xml#L117)


For example usage in Maven, see
https://github.com/stain/jena/blob/jena-osgi-bundle/jena-osgi-test/pom.xml#L37
https://github.com/stain/jena/blob/jena-osgi-bundle/jena-osgi-test/src/main/java/org/apache/jena/osgi/test/JenaOSGITestImpl.java


In clerezza, which modules do I need to build/run to make a runnable
OSGi application? The standalone applications don't run within the
OSGi framework as far as I could tell, e.g. platform.launcher.tdb
says:

 TDB variant of standalone java application for launching the clerezza.org 
 platform. It is also a bundle, but there is no OSGi container known to 
 support this (we are working on it :-) ).

Perhaps if you get a clerezza branch configured correctly to use
jena-osgi, but something still falls over, you could share it with me
to try?

On 14 January 2015 at 13:18, Reto Gmür r...@apache.org wrote:
 Hi Stian

 Do you happen to have this deployed to a snapshot repository (I don't see
 it here:
 https://repository.apache.org/content/groups/snapshots/org/apache/jena/)
 This would make it a bit easier to try to create a launcher using it.

 Cheers,
 Reto

 On Mon, Jan 12, 2015 at 1:42 AM, Stian Soiland-Reyes st...@apache.org
 wrote:

 Would anyone who is using OSGi and Jena be able to test the experimental
 jena-osgi bundle?   I might have asked about this earlier, but have since
 updated the patch.




 The ZIP at

 https://people.apache.org/~stain/jena-osgi-test-20150112/

 includes both
 jena-osgi-2.12.2-SNAPSHOT.jar

 and the other required bundles (e.g. httpclient-osgi, jackson-core, ++)



 Note that this email does not in any way form a release - the above is
 based on the unreleased 'master' branch at Jena.



 You can build it yourself by checking out my jena-osgi-bundle branch:

 https://github.com/stain/jena/tree/jena-osgi-bundle

 and build the jena-osgi/ module with mvn clean install. The bundle JAR
 would then be in the target/ folder.



 See details about the Jena pull request below:



 -- Forwarded message --
 From: asfbot notificati...@github.com
 Date: 12 January 2015 at 00:05
 Subject: Re: [jena] Jena OSGi bundle (#10)
 To: apache/jena j...@noreply.github.com
 Cc: Stian Soiland-Reyes st...@mygrid.org.uk


 Stian Soiland-Reyes on d...@jena.apache.org replies:
 So I have updated the jena-osgi pull request in
 #10 https://github.com/apache/jena/pull/10

 As commented there - it now includes a new module jena-osgi-test to
 test it within Equinox and Apache Felix (two of the leading OSGi
 frameworks).

 The tests are run as part of the maven build - any failure would be
 propagated out. It has to be in a separate module in order to test
 calling from 'another' OSGi module.

 Note that the test depends on the maven plugin

 https://github.com/everit-org/eosgi-maven-plugin

 This is licensed under LGPL. This is only used during the test/build
 (of jena-osgi-test) - which I believe should be acceptable according
 to:

 https://www.apache.org/legal/resolved.html#prohibited

 Given these brief tests working (which cover jena-core, jena-arq and
 jena-tdb), I would be comfortable to put it in, then wait for
 feedback. Perhaps wait with promoting it on the website before we know
 it works generally?

 I tried putting it into Clerezza instead of their
 org.apache.clerezza.ext.jena.* modules, but I am not knowledgeable
 enough about how to get Clerezza started as an OSGi

Testing of jena-osgi bundle

2015-01-11 Thread Stian Soiland-Reyes
Would anyone who is using OSGi and Jena be able to test the experimental
jena-osgi bundle?   I might have asked about this earlier, but have since
updated the patch.




The ZIP at

https://people.apache.org/~stain/jena-osgi-test-20150112/

includes both
jena-osgi-2.12.2-SNAPSHOT.jar

and the other required bundles (e.g. httpclient-osgi, jackson-core, ++)



Note that this email does not in any way form a release - the above is
based on the unreleased 'master' branch at Jena.



You can build it yourself by checking out my jena-osgi-bundle branch:

https://github.com/stain/jena/tree/jena-osgi-bundle

and build the jena-osgi/ module with mvn clean install. The bundle JAR
would then be in the target/ folder.



See details about the Jena pull request below:



-- Forwarded message --
From: asfbot notificati...@github.com
Date: 12 January 2015 at 00:05
Subject: Re: [jena] Jena OSGi bundle (#10)
To: apache/jena j...@noreply.github.com
Cc: Stian Soiland-Reyes st...@mygrid.org.uk


Stian Soiland-Reyes on d...@jena.apache.org replies:
So I have updated the jena-osgi pull request in
#10 https://github.com/apache/jena/pull/10

As commented there - it now includes a new module jena-osgi-test to
test it within Equinox and Apache Felix (two of the leading OSGi
frameworks).

The tests are run as part of the maven build - any failure would be
propagated out. It has to be in a separate module in order to test
calling from 'another' OSGi module.

Note that the test depends on the maven plugin

https://github.com/everit-org/eosgi-maven-plugin

This is licensed under LGPL. This is only used during the test/build
(of jena-osgi-test) - which I believe should be acceptable according
to:

https://www.apache.org/legal/resolved.html#prohibited

Given these brief tests working (which cover jena-core, jena-arq and
jena-tdb), I would be comfortable to put it in, then wait for
feedback. Perhaps wait with promoting it on the website before we know
it works generally?

I tried putting it into Clerezza instead of their
org.apache.clerezza.ext.jena.* modules, but I am not knowledgeable
enough about how to get Clerezza started as an OSGi application..

If you want to copy-paste it into a running OSGi setup, then have a look in

jena/jena-osgi-test/target/eosgi-dist/felix/lib

as it would contain the bundles you need. Namely:

commons-csv-1.0.jar
commons-lang3-3.3.2.jar
httpclient-osgi-4.2.6.jar
httpcore-osgi-4.2.5.jar
jackson-annotations-2.3.0.jar
jackson-core-2.3.3.jar
jackson-databind-2.3.3.jar
jcl-over-slf4j-1.7.6.jar
jena-osgi-2.12.2-SNAPSHOT.jar
jsonld-java-0.5.1.jar
libthrift-0.9.2.jar
log4j-1.2.17.jar
slf4j-api-1.7.6.jar

You might not want this if you do slf4j in another way:

slf4j-log4j12-1.7.6.jar

You should not need these as they are only used for the testing:

org.ops4j.pax.tipi.junit-4.11.0.1.jar
jena-osgi-test-2.12.2-SNAPSHOT.jar
org.everit.osgi.dev.testrunner-4.0.3.jar
org.everit.osgi.dev.testrunner.junit4-3.0.4.jar
org.ops4j.pax.tipi.hamcrest.core-1.3.0.1.jar

—
Reply to this email directly or view it on GitHub
https://github.com/apache/jena/pull/10#issuecomment-69518840.



-- 
Stian Soiland-Reyes
Apache Taverna (incubating)
http://orcid.org/-0001-9842-9718


Re: Validating and resolving RDF URIs

2015-01-08 Thread Stian Soiland-Reyes
BTW.. why is there this confusing class hierarchy?

IRIFactory extends IRIFactoryImpl extends AbsIRIFactoryImpl implements
IRIFactoryI



On 8 January 2015 at 13:30, Andy Seaborne a...@apache.org wrote:
 On 08/01/15 12:57, Martynas Jusevičius wrote:

 Thanks.

 Couldn't Jena's IRI be made to extend java.net.URI, override the
 methods that differ, and still be accepted where URI is expected?


 java.net.URI is a final class.

 Probably other issues as well (IRIs are unicode, URIs are ASCII ; RFC 2396
 vs 3896) but that's a blocker in itself.

 IRIs are not particularly cheap - the resolver has caching to mitigate this.

 The parsing rules such as the scheme-specific stuff (that IRI adds over
 j.n.URI) can have a noticeable cost (e.g. parsing).  Another cost is the use
 of regexs - using java.net.URI to parse the structure (it has a hand-written
 URI parser) might help partly.

 Slightly bizarrely, if you pass in the components of a java.net.URI, java
 builds a string and parses it to get the components again.

 Adding IRI.toURI operation might help c.f. IRI.toURL.  Contributions
 welcome.

 Andy



 On Tue, Jan 6, 2015 at 10:27 PM, Andy Seaborne a...@apache.org wrote:

 On 06/01/15 16:22, Martynas Jusevičius wrote:


 Hey,

 I'm reading URIs from request input that will end up in an RDF Model.
 They can be relative, in which case they need to be resolved, and they
 can be invalid, in which case they need to be rejected.

 What I'm looking for is to replace new URI/URI.create() and
 URI.resolve(uri) usages with a more RDF-compliant solution.

 I wanted to check if IRIResolver is the right class for this purpose?
 Are there any examples?



 org.apache.jena.riot.system.IRIResolver (not the legacy one in the old N3
 parser).

 This uses the jena-iri library which is quite, err, precise.

 See also the parsing pipeline that uses CheckerIRI for checking.  In
 fact,
 you might want to use StreamRDF (where all parers send things).

  Andy



 Thanks.

 Martynas






-- 
Stian Soiland-Reyes, myGrid team
School of Computer Science
The University of Manchester
http://soiland-reyes.com/stian/work/ http://orcid.org/-0001-9842-9718


Re: Validating and resolving RDF URIs

2015-01-08 Thread Stian Soiland-Reyes
That's a big bunch of factories...

It was more that the naming seemed upside down - one would normally
expect SomethingImpl to implement/extend Something - not the other way
around :)


So I think I get it - the distinction from IRIFactoryImpl and its
superclass AbsIRIFactoryImpl is that IRI only subclass the Abs* one -
as it does not do any of the conformance and validation bits done by
the IRIFactoryImpl/IRIFactory.

What is the difference between IRIFactory and IRIFactoryImpl then?
There's implementation in both. Is it the package name?


Then there's the other confusing hierarchy - but at least here the
IRIImpl extends IRI.

AbsIRIFactoryImpl - IRI (abstract) - AbsIRIImpl - IRIImpl

So if IRI is abstract, why is there then an additional abstract AbsIRIImpl?


Or in other words - why isn't IRI an interface (extending IRIFactoryI)
instead of a class, and then let AbsIRIImpl be a subclass of
AbsIRIFactoryImpl?


Apologies with these silly questions.. I think I won't try to do the
.toURI() (and create(URI) ) patch given the confusion of all these -
but perhaps Martynas want to have a go?

On 8 January 2015 at 14:01, Andy Seaborne a...@apache.org wrote:
 On 08/01/15 13:50, Stian Soiland-Reyes wrote:

 BTW.. why is there this confusing class hierarchy?

 IRIFactory extends IRIFactoryImpl extends AbsIRIFactoryImpl implements
 IRIFactoryI


 I don't understand the question and probably don't know the answer anyway.

 And it's not what I see.

 abstract public class IRI
extends AbsIRIFactoryImpl
implements IRIFactoryI, IRIRelativize

 public class IRIFactory
   extends IRIFactoryImpl
   implements IRIFactoryI


 IRIs are self factories - given one, you can make another with construct
 and create (IRI resolution occurs).

 The final I in IRIFactoryI is Interface -- an old style naming.

 Andy





 On 8 January 2015 at 13:30, Andy Seaborne a...@apache.org wrote:

 On 08/01/15 12:57, Martynas Jusevičius wrote:


 Thanks.

 Couldn't Jena's IRI be made to extend java.net.URI, override the
 methods that differ, and still be accepted where URI is expected?



 java.net.URI is a final class.

 Probably other issues as well (IRIs are unicode, URIs are ASCII ; RFC
 2396
 vs 3896) but that's a blocker in itself.

 IRIs are not particularly cheap - the resolver has caching to mitigate
 this.

 The parsing rules such as the scheme-specific stuff (that IRI adds over
 j.n.URI) can have a noticeable cost (e.g. parsing).  Another cost is the
 use
 of regexs - using java.net.URI to parse the structure (it has a
 hand-written
 URI parser) might help partly.

 Slightly bizarrely, if you pass in the components of a java.net.URI, java
 builds a string and parses it to get the components again.

 Adding IRI.toURI operation might help c.f. IRI.toURL.  Contributions
 welcome.

  Andy



 On Tue, Jan 6, 2015 at 10:27 PM, Andy Seaborne a...@apache.org wrote:


 On 06/01/15 16:22, Martynas Jusevičius wrote:



 Hey,

 I'm reading URIs from request input that will end up in an RDF Model.
 They can be relative, in which case they need to be resolved, and they
 can be invalid, in which case they need to be rejected.

 What I'm looking for is to replace new URI/URI.create() and
 URI.resolve(uri) usages with a more RDF-compliant solution.

 I wanted to check if IRIResolver is the right class for this purpose?
 Are there any examples?




 org.apache.jena.riot.system.IRIResolver (not the legacy one in the old
 N3
 parser).

 This uses the jena-iri library which is quite, err, precise.

 See also the parsing pipeline that uses CheckerIRI for checking.  In
 fact,
 you might want to use StreamRDF (where all parers send things).

   Andy



 Thanks.

 Martynas










-- 
Stian Soiland-Reyes, myGrid team
School of Computer Science
The University of Manchester
http://soiland-reyes.com/stian/work/ http://orcid.org/-0001-9842-9718


Re: Using Model inside Java Objects.

2014-11-27 Thread Stian Soiland-Reyes
I have find it really nice to use the OntModel and the more specific
types there, like Individual.

It means I have to pre-load an ontology or RDFS schema (from URI or
classpath) and set static fields for the different properties and
classes I will enquire/construct with.

See 
https://github.com/taverna/taverna-prov/blob/master/prov-taverna-owl-bindings/src/main/java/org/purl/wf4ever/provtaverna/owl/ProvModel.java


When I have loaded I do null-checks as getObjectProperty returns null
if I misspell the property name - thus I can catch this here rather
than six steps later when trying to consume the broken RDF.


After that I just use Individual as my domain objects and pass them to
an instance of ProvModel (e.g. a graph) for any getters and setters.
Example usage:

https://github.com/taverna/taverna-prov/blob/master/prov-taverna-export/src/main/java/org/purl/wf4ever/provtaverna/export/W3ProvenanceExport.java#L253

Saving is straight forward:
https://github.com/taverna/taverna-prov/blob/master/prov-taverna-export/src/main/java/org/purl/wf4ever/provtaverna/export/W3ProvenanceExport.java#L388



(You might notice that my approach fell apart as soon as I had
multiple ontologies to use.. I did this as subclasses of ProvModel
here

https://github.com/taverna/taverna-prov/blob/master/prov-taverna-owl-bindings/src/main/java/org/purl/wf4ever/provtaverna/owl/TavernaProvModel.java

.. but I was unable to get the inferencing right (you might not need
this) - probably because I did the mistake of loading always a new
OntModel instead of adding to it - I was hampered by my
loadModelFromClassPath :) )



Some of the things I wish was better:

null-safe getObjectProperty etc.
looking up values of object properties to get back pre-casted
Individuals - my workaround:
   
https://github.com/wf4ever/robundle/blob/master/src/main/java/org/purl/wf4ever/robundle/manifest/RDFToManifest.java#L214

(one day I should prepare a patch to add that as a method on
Individual or ObjectProperty)




On 20 November 2014 at 22:13, David Moss admo...@gmail.com wrote:
 Until now I have been treating Jena and RDF like a database connection.
 I retrieved data and immediately converted it to familiar Java objects with
 fields, getters, setters and methods.


 Recently I have been wondering if it might be better to keep the data as a
 Jena Model within the object and use Jena to do the manipulation.



 Retrieving a property value seems overly complex in syntax however.
 Is there a better way to do this?

 .

 Model m = qe.execConstruct();

 m.setNsPrefixes(p);

 System.out.println(m.getProperty(null,
 m.getProperty(m.expandPrefix(dc:title))).getObject().asLiteral().toString(
 ));

 .



 DM




-- 
Stian Soiland-Reyes, myGrid team
School of Computer Science
The University of Manchester
http://soiland-reyes.com/stian/work/ http://orcid.org/-0001-9842-9718


Re: Jena / Stanbol success stories?

2014-11-26 Thread Stian Soiland-Reyes
I've summarized this thread so we can put it on the Jena website. (See
attached diff from the CMS). It was mentioned on ApacheCon that Apache
projects should be better on marketing - and this is great stuff that Jena
should be proud of!

Those reporting might want to double-check the text below.

Not sure what to call the page.. Who uses Jena?  Users of Jena, Jena
in use etc.




On 25 November 2014 at 20:55, Milorad Tosic mbto...@yahoo.com.invalid
wrote:

 Our Semantic Linked Data management platform www.tasorone.com uses Jena's
 ARQ and offers Jena TDB based implementation as a default triplestore.

 Regards,Milorad



   From: Phillip Rhodes motley.crue@gmail.com
  To: users@jena.apache.org; d...@stanbol.apache.org
  Sent: Monday, November 24, 2014 4:19 AM
  Subject: Jena / Stanbol success stories?

 Hi all, I was just wondering if anybody knows of, or is involved with,
 any projects using Jena and/or Stanbol which (have been|can be)
 discussed and cited publicly?

 A local company that I've been talking to is interested in possibly
 using SemWeb technology (specifically, Jena/Stanbol) internally, but
 are looking for some evidence to support the assertion that this
 technology delivers and is for real.

 Any pointers or references would be appreciated... or if you are
 personally involved in something and are willing to talk about it
 (possibly with appropriate NDAs, etc. in place), I'd love to talk to
 you.


 Thanks,



 Phil
 ---
 This message optimized for indexing by NSA PRISM

 --
 Stian Soiland-Reyes
 Apache Taverna (incubating)
 http://orcid.org/-0001-9842-9718

Index: trunk/content/about_jena/about.mdtext
===
--- trunk/content/about_jena/about.mdtext   (revision 1641732)
+++ trunk/content/about_jena/about.mdtext   (working copy)
@@ -22,6 +22,10 @@
 Jena entered incubation with the Apache in November 2010, and graduated as a 
top-level
 project in April 2012.
 
+### Jena in use
+
+Jena is [related to several projects](contributions.html) and is [used by 
multiple companies](who_uses_it.html) in production.
+
 ### Thanks
 YourKit is kindly supporting open source projects with its full-featured Java 
Profiler.
 YourKit, LLC is the creator of innovative and intelligent tools for profiling
Index: trunk/content/about_jena/index.mdtext
===
--- trunk/content/about_jena/index.mdtext   (revision 1641732)
+++ trunk/content/about_jena/index.mdtext   (working copy)
@@ -29,6 +29,7 @@
 * ... [download Jena components](/download/index.cgi)
 * ... [use Jena with Maven](/download/maven.html)
 * ... [find out more about the Jena project](/about_jena/about.html)
+* ... [see who is using Jena](/about_jena/who_uses_it.html)
 * ... [see who's involved](/about_jena/team.html)
 * ... [follow a tutorial](/tutorials/index.html)
 * ... [see how to get started with Jena](/getting_started/index.html)
Index: trunk/content/about_jena/who_uses_it.mdtext
===
--- trunk/content/about_jena/who_uses_it.mdtext (revision 0)
+++ trunk/content/about_jena/who_uses_it.mdtext (working copy)
@@ -0,0 +1,102 @@
+Title: Who use Jena?
+Notice:Licensed to the Apache Software Foundation (ASF) under one
+   or more contributor license agreements.  See the NOTICE file
+   distributed with this work for additional information
+   regarding copyright ownership.  The ASF licenses this file
+   to you under the Apache License, Version 2.0 (the
+   License); you may not use this file except in compliance
+   with the License.  You may obtain a copy of the License at
+   .
+ http://www.apache.org/licenses/LICENSE-2.0
+   .
+   Unless required by applicable law or agreed to in writing,
+   software distributed under the License is distributed on an
+   AS IS BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+   KIND, either express or implied.  See the License for the
+   specific language governing permissions and limitations
+   under the License.
+
+# Users of Jena
+
+Jena is used by a wide-range range of products and solutions. 
+This is not a comprehensive list, and is based on public knowledge and 
self-reporting to the [users@jena mailing 
list](https://mail-archives.apache.org/mod_mbox/jena-users/).
+Contact the list to suggest modifications of this page.
+
+
+## Open University
+
+The [Linked Open Data endpoint](http://data.open.ac.uk/) of [The Open 
University](http://www.open.ac.uk/) is built on top
+of Jena Fuseki. 
+
+The [Listening Experience Database](http://www.open.ac.uk/Arts/LED) use Fuseki 
and the
+Stanbol Entityhub backing up Drupal 7 to support a [crowd-sourced linked
+dataset](http://led.kmi.open.ac.uk/linkeddata/).
+
+
+## TopQuadrant
+
+[TopQuadrant](http://www.topquadrant.com/)'s

Re: Jena / Stanbol success stories?

2014-11-26 Thread Stian Soiland-Reyes
Yes, a bigger preamble would be needed on top. I would not say it is
frowned upon, what we can't say is that Jena is made by or for these
companies.

and perhaps only truly self-reported ones could be listed, e.g. exclude IBM
and those Andy found out by looking at error messages.. ;)

How other projects do this:

http://hadoop.apache.org/#Who+Uses+Hadoop%3F

https://cwiki.apache.org/confluence/pages/viewpage.action?pageId=30744222

http://wiki.apache.org/lucene-java/PoweredBy

So the trend is to put such a list in a separate wiki page so it is more
obviously not endorsement and easier to see that you can add yourself.

On 26 Nov 2014 16:22, Rob Vesse rve...@dotnetrdf.org wrote:

 Stian

 Putting up such a page is somewhat frowned upon at the ASF

 http://www.apache.org/foundation/marks/responsibility#independent

 Projects must not endorse or promote the work of third parties, nor allow
 third party influence to affect the future of the project for specific
 outside organisations.

 So we'd have to be very careful how we phrase things to not fall afoul of
 this requirement.

 Rob

 From:  Stian Soiland-Reyes st...@apache.org
 Reply-To:  users@jena.apache.org
 Date:  Wednesday, 26 November 2014 15:44
 To:  users@jena.apache.org users@jena.apache.org
 Subject:  Re: Jena / Stanbol success stories?

  I've summarized this thread so we can put it on the Jena website. (See
  attached diff from the CMS). It was mentioned on ApacheCon that Apache
  projects should be better on marketing - and this is great stuff that
 Jena
  should be proud of!
 
  Those reporting might want to double-check the text below.
 
  Not sure what to call the page.. Who uses Jena?  Users of Jena,
 Jena in
  use etc.
 
 
 
 
  On 25 November 2014 at 20:55, Milorad Tosic mbto...@yahoo.com.invalid
 wrote:
  Our Semantic Linked Data management platform www.tasorone.com
  http://www.tasorone.com  uses Jena's ARQ and offers Jena TDB based
  implementation as a default triplestore.
 
  Regards,Milorad
 
 
 
From: Phillip Rhodes motley.crue@gmail.com
   To: users@jena.apache.org; d...@stanbol.apache.org
   Sent: Monday, November 24, 2014 4:19 AM
   Subject: Jena / Stanbol success stories?
 
  Hi all, I was just wondering if anybody knows of, or is involved with,
  any projects using Jena and/or Stanbol which (have been|can be)
  discussed and cited publicly?
 
  A local company that I've been talking to is interested in possibly
  using SemWeb technology (specifically, Jena/Stanbol) internally, but
  are looking for some evidence to support the assertion that this
  technology delivers and is for real.
 
  Any pointers or references would be appreciated... or if you are
  personally involved in something and are willing to talk about it
  (possibly with appropriate NDAs, etc. in place), I'd love to talk to
  you.
 
 
  Thanks,
 
 
 
  Phil
  ---
  This message optimized for indexing by NSA PRISM
 
  --
  Stian Soiland-Reyes
  Apache Taverna (incubating)
  http://orcid.org/-0001-9842-9718





Re: Jena / Stanbol success stories?

2014-11-26 Thread Stian Soiland-Reyes
I've taken the liberty to forward this thread to the brand new
market...@apache.org list, to see what they say. I'm sure we can
figure out the right  weasel words to add.. :)

https://mail-archives.apache.org/mod_mbox/www-marketing/


https://www.apache.org/foundation/marks/linking#productsupport also
have some guidance even though this listing wouldn't be about product
support.


On 26 November 2014 at 17:03, Rob Vesse rve...@dotnetrdf.org wrote:
 Yes I agree we can do it we just need to be careful of how we do it to
 avoid the implied endorsement as you say

 rel=nofollow would likely be a good idea

 Rob

 On 26/11/2014 16:30, Damian Steer d.st...@bris.ac.uk wrote:

On 26/11/14 16:21, Rob Vesse wrote:
 Stian

 Putting up such a page is somewhat frowned upon at the ASF

If you search for 'powered by' you'll find quite a number of pages like
this at apache:

https://www.google.co.uk/search?q=powered+by+site%3Aapache.org

They seem to be fairly simple lists of uses, without (as you say) any
implied endorsement or promotion.

Damian

--
Damian Steer
Senior Technical Researcher
Research IT
+44 (0) 117 928 7057







-- 
Stian Soiland-Reyes, myGrid team
School of Computer Science
The University of Manchester
http://soiland-reyes.com/stian/work/ http://orcid.org/-0001-9842-9718


Re: ApacheCon EU 2014?

2014-11-07 Thread Stian Soiland-Reyes
We found some money, so I'll join as well.


On 6 November 2014 20:29, Andy Seaborne a...@apache.org wrote:
 I'll be there Saturday to Thursday, staying at the conference hotel. It'll
 be good to meet up.

 The entire programme is

  http://apacheconeu2014.sched.org/

 with the linked data talks being

   http://apacheconeu2014.sched.org/overview/type/linked+data

 Andy



 On 06/11/14 19:04, Rob Vesse wrote:

 Yes I am going to be in Budapest as well

 I think some of the Clerezza folks will be as well

 Rob

 On 06/11/2014 18:03, Sergio Fernández
 sergio.fernan...@salzburgresearch.at wrote:

 +1 for a beer all together
 the Marmotta folks we'll be in Budapest from Sunday to Thursday

 On 06/11/14 14:39, Stian Soiland-Reyes wrote:

 Hi!

 Is any Jena folks (in addition to Andy Seaborne) planning to attend
 ApacheCon EU 2014 in two weeks time?

 http://events.linuxfoundation.org/events/apachecon-europe/


 I see Andy is running a Linked Data track:

 http://wikier.github.io/apachecon-eu-2014-linked-data-track/


 Taverna folks might be interested in going - just looking for funds..


 --
 Sergio Fernández
 Senior Researcher
 Knowledge and Media Technologies
 Salzburg Research Forschungsgesellschaft mbH
 Jakob-Haringer-Straße 5/3 | 5020 Salzburg, Austria
 T: +43 662 2288 318 | M: +43 660 2747 925
 sergio.fernan...@salzburgresearch.at
 http://www.salzburgresearch.at









-- 
Stian Soiland-Reyes, myGrid team
School of Computer Science
The University of Manchester
http://soiland-reyes.com/stian/work/ http://orcid.org/-0001-9842-9718


ApacheCon EU 2014?

2014-11-06 Thread Stian Soiland-Reyes
Hi!

Is any Jena folks (in addition to Andy Seaborne) planning to attend
ApacheCon EU 2014 in two weeks time?

http://events.linuxfoundation.org/events/apachecon-europe/


I see Andy is running a Linked Data track:

http://wikier.github.io/apachecon-eu-2014-linked-data-track/


Taverna folks might be interested in going - just looking for funds..

-- 
Stian Soiland-Reyes, myGrid team
School of Computer Science
The University of Manchester


Please test: Jena OSGi bundle

2014-10-31 Thread Stian Soiland-Reyes
I have suggested for Jena to add an OSGi bundle jena-osgi -
https://github.com/apache/jena/pull/10


I've done it as a single bundle of the major modules (those in the
distribution ZIP) - effectively putting them all on the same
classloader to avoid any issues with the service registries, as part
of Jena still use Class.forName() across modules (...I know).

(Longer term one would of course rather get rid of Class.forName, and
then each module of Jena could be a bundle. This would however require
a bit more work/thought. )


If you are an OSGi user, then perhaps you could test this bundle so we
can see if it is a sane approach.  It would also be good to hear what
is the approach you've done in using Jena in your bundles so far.


I have personally only tested this bundle in a single product where I
just do load and save of JSON-LD using Jena RIOT, and some simple
graph inspection. So I am sure I've not done everything right.. so we
need to test it a bit more.


You can either check out
 https://github.com/stain/jena

using the branch
  jena-osgi-bundle

then use mvn install on:

jena-parent
jena-osgi

The remaining modules should be pulled from the fresh snapshots in
http://repository.apache.org/snapshots/


(I've used the maven-bundler-plugin to generate the manifest and to
embed the jena-* JARs within the bundle JAR - see the
jena-osgi/pom.xml for details  -- I am particularly wondering how I
can exclude libthrift as that is also available as a bundle)



Alternatively I have a full build of that branch from our build server at

http://build.mygrid.org.uk/ci/job/jena-bundle/21/

that deploys to the Maven repository at:

http://repository.mygrid.org.uk/artifactory/ext-snapshot-local/


(Note that the virtual machine host of this server has been a bit
temperamental this week and might have some downtime next week to fix
that. )




So to try out this, feel free to grab the JAR from :

http://build.mygrid.org.uk/ci/job/jena-bundle/21/org.apache.jena$jena-osgi/
or
http://repository.mygrid.org.uk/artifactory/ext-snapshot-local/org/apache/jena/jena-osgi/2.12.2-SNAPSHOT/


If you are running outside Maven, you would might also need to add
additional bundles:

* org.apache.httpcomponents:httpclient-osgi:jar:4.2.6
* org.apache.httpcomponents:httpcore-osgi:jar:4.2.5
* com.fasterxml.jackson.core:jackson-core:jar:2.3.3
* com.fasterxml.jackson.core:jackson-databind:jar:2.3.3
* com.fasterxml.jackson.core:jackson-annotations:jar:2.3.0
* org.apache.commons:commons-csv:jar:1.0
* org.apache.thrift:libthrift:jar:0.9.1
* org.apache.commons:commons-lang3:jar:3.1
* org.slf4j:jcl-over-slf4j:jar:1.7.6
* org.slf4j:slf4j-api:jar:1.7.6
* org.slf4j:slf4j-log4j12:jar:1.7.6
* log4j:log4j:jar:1.2.17

or, add to your pom.xml:

dependencies
dependency
  groupIdorg.apache.jena/groupId
  artifactIdjena-osgi/artifactId
  version2.12.2-SNAPSHOT/version
/dependency
/dependencies

repositories
  repository
  idmygrid.ext-snapshot-local/id
  nameApache Release Distribution Repository/name
  urlhttp://repository.mygrid.org.uk/artifactory/ext-snapshot-local//url
  releases/
  snapshots
enabledfalse/enabled
  /snapshots
  /repository
/repositories

(Maven should then pull in the remaining dependencies automatically)


Note that you would in effect be testing Jena libraries version
2.12.2-SNAPSHOT - so if something is weird, verify it is caused by the
jena-osgi bundle or by Jena 2.12.2-SNAPSHOT. :)

This might brake at a later stage as jena-parent in Apache's snapshot
repository does not (yet) have ${ver.thrift} defined -- this only
works if the taverna-parent comes from mygrid.ext-snapshot-local.
(For now, try mvn install -U to force update the parent).


Re: [ANN] Jena 2.12.1 released

2014-10-18 Thread Stian Soiland-Reyes
The tag jena-2.12.1 is missing from git - only jena-2.12.1-rc1 and
jena-2.12.1-rc2 are there.

On 9 October 2014 11:18, Rob Vesse rve...@dotnetrdf.org wrote:
 We are pleased to announce the release of Apache Jena 2.12.1 which
 includes Apache Jena Fuseki 1.1.1.

 Users are reminded that from Jena 2.12.1 requires Java 7.

 Thanks as ever to everyone who has contributed to this release.

 The code changes can be found in the list of resolved issues at

 http://s.apache.org/jena2.12.1-changes

 Download Jena via the mirrors and links at

 http://jena.apache.org/download/index.html

 or from Maven central.

 Rob








-- 
Stian Soiland-Reyes, myGrid team
School of Computer Science
The University of Manchester
http://soiland-reyes.com/stian/work/ http://orcid.org/-0001-9842-9718