Sorry. Agree with you on that. RDF XML is likely to be the format.

Br,
Mikael


On 24.3.2016 16:23, A. Soroka wrote:
Right, I'm suggesting that perhaps it should at least try to parse the file 
when it ends in .xml, as well. I'm not addressing the question of file size.

---
A. Soroka
The University of Virginia Library

On Mar 24, 2016, at 10:16 AM, Mikael Pesonen <mikael.peso...@lingsoft.fi> wrote:


Hi,

s-put succeeds with smaller file when .xml renamed to .rdf. Tested with a 
subset of ~1 million triplets. Entire file is ~100 million triplets.

Br,
Mikael


On 24.3.2016 15:41, A. Soroka wrote:
I seem to remember that the list has received a question like this before. 
Perhaps s-put should try to parse *.xml files as RDF/XML, and only fail if that 
can't be done?

---
A. Soroka
The University of Virginia Library

On Mar 24, 2016, at 7:41 AM, Mikael Pesonen <mikael.peso...@lingsoft.fi> wrote:


Hi Osma!

Well that was an easy solution that worked. Thanks!

Mikael


On 24.3.2016 13:25, Osma Suominen wrote:
Hi Mikael!

Try renaming the file to .rdf instead of .xml. It's likely that s-put doesn't 
recognize the file extension .xml - after all, it could be any kind of XML, not 
just RDF/XML.

-Osma

On 24/03/16 11:31, Mikael Pesonen wrote:
Hi,

sorry for missing info. So I'm trying to:

/apache-jena-fuseki-2.3.1$ bin/s-put http://localhost:3030/ds/data
http://www.lingsoft.fi/geonames/ ./tmp.xml


tmp.xml is a geonames entry:

<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<rdf:RDF xmlns:cc="http://creativecommons.org/ns#";
xmlns:dcterms="http://purl.org/dc/terms/";
xmlns:foaf="http://xmlns.com/foaf/0.1/";
xmlns:gn="http://www.geonames.org/ontology#";
xmlns:owl="http://www.w3.org/2002/07/owl#";
xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#";
xmlns:rdfs="http://www.w3.org/2000/01/rdf-schema#";
xmlns:wgs84_pos="http://www.w3.org/2003/01/geo/wgs84_pos#";>
<gn:Feature rdf:about="http://sws.geonames.org/3/";><rdfs:isDefinedBy
rdf:resource="http://sws.geonames.org/3/about.rdf"/>
<gn:name>Zamīn Sūkhteh</gn:name><gn:alternateName xml:lang="fa">زمين
سوخته</gn:alternateName>
<gn:alternateName xml:lang="fa">Zamīn
Sūkhteh</gn:alternateName><gn:featureClass
rdf:resource="http://www.geonames.org/ontology#S"/>
<gn:featureCode rdf:resource="http://www.geonames.org/ontology#S.CRRL"/>
<gn:countryCode>IR</gn:countryCode>
<wgs84_pos:lat>32.45831</wgs84_pos:lat>
<wgs84_pos:long>48.96335</wgs84_pos:long>
<gn:parentFeature rdf:resource="http://sws.geonames.org/127082/"/>
<gn:parentCountry rdf:resource="http://sws.geonames.org/130758/"/>
<gn:parentADM1 rdf:resource="http://sws.geonames.org/127082/"/>
<gn:nearbyFeatures rdf:resource="http://sws.geonames.org/3/nearby.rdf"/>
<gn:locationMap
rdf:resource="http://www.geonames.org/3/zamin-sukhteh.html"/>
</gn:Feature>
</rdf:RDF>


And error comes from Ruby:

/usr/lib/ruby/1.9.1/net/http.rb:1436:in `block in
initialize_http_header': undefined method `strip' for nil:NilClass
(NoMethodError)
         from /usr/lib/ruby/1.9.1/net/http.rb:1434:in `each'
         from /usr/lib/ruby/1.9.1/net/http.rb:1434:in
`initialize_http_header'
         from bin/s-put:205:in `send_body'
         from bin/s-put:164:in `PUT'
         from bin/s-put:424:in `cmd_soh'
         from bin/s-put:703:in `<main>'


XML looks like valid, but is s-put missing some info on what that XML is?

Br,
Mikael





On 18.3.2016 13:32, Andy Seaborne wrote:
No idea? I need to update data to either running database or make
a new db.
(to a message 3 days ago ...)

"this does not work" is a bit minimal.

What does work?  Other s-* commands? Other files?

I'd guess that ".xml" is not recognized as RDF. It's not the right
file extension. The MIME type must be for the request. There's some
kind of determination in the soh script.

When trying to start another server to port 3031 server complains

org.apache.jena.tdb.TDBException: Can't open database at location
/home/text/tools/apache-jena-fuseki-2.3.1/run/system/
You can't have two servers running on the same TDB files at the same
time. (For that matter, you can't do that with MySQL either - you need
a server process to mediate requests).

    Andy

Mikael

On 15.3.2016 13:40, Mikael Pesonen wrote:
Hi,

okay thats good to know. I tried with s-put

apache-jena-fuseki-2.3.1$ bin/s-put http://localhost:3030/ds/data
http://www.lingsoft.fi/geonames/ tmp.xml

/usr/lib/ruby/1.9.1/net/http.rb:1436:in `block in
initialize_http_header': undefined method `strip' for nil:NilClass
(NoMethodError)
        from /usr/lib/ruby/1.9.1/net/http.rb:1434:in `each'
        from /usr/lib/ruby/1.9.1/net/http.rb:1434:in
`initialize_http_header'
        from bin/s-put:205:in `send_body'
        from bin/s-put:164:in `PUT'
        from bin/s-put:424:in `cmd_soh'
        from bin/s-put:703:in `<main>'

tmp.xml contains one entry from Geonames dump:

<?xml version="1.0" encoding="UTF-8" standalone="no"?><rdf:RDF
xmlns:cc="http://creativecommons.org/ns#";
xmlns:dcterms="http://purl.org/dc/terms/";
xmlns:foaf="http://xmlns.com/foaf/0.1/";
xmlns:gn="http://www.geonames.org/ontology#";
xmlns:owl="http://www.w3.org/2002/07/owl#";
xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#";
xmlns:rdfs="http://www.w3.org/2000/01/rdf-schema#";
xmlns:wgs84_pos="http://www.w3.org/2003/01/geo/wgs84_pos#";><gn:Feature
rdf:about="http://sws.geonames.org/3/";><rdfs:isDefinedBy
rdf:resource="http://sws.geonames.org/3/about.rdf"/><gn:name>Zamīn
Sūkhteh</gn:name><gn:alternateName xml:lang="fa">زمين
سوخته</gn:alternateName><gn:alternateName xml:lang="fa">Zamīn
Sūkhteh</gn:alternateName><gn:featureClass
rdf:resource="http://www.geonames.org/ontology#S"/><gn:featureCode
rdf:resource="http://www.geonames.org/ontology#S.CRRL"/><gn:countryCode>IR</gn:countryCode><wgs84_pos:lat>32.45831</wgs84_pos:lat><wgs84_pos:long>48.96335</wgs84_pos:long><gn:parentFeature

rdf:resource="http://sws.geonames.org/127082/"/><gn:parentCountry
rdf:resource="http://sws.geonames.org/130758/"/><gn:parentADM1
rdf:resource="http://sws.geonames.org/127082/"/><gn:nearbyFeatures
rdf:resource="http://sws.geonames.org/3/nearby.rdf"/><gn:locationMap
rdf:resource="http://www.geonames.org/3/zamin-sukhteh.html"/></gn:Feature></rdf:RDF>



Br,
Mikael


On 15.3.2016 13:21, Andy Seaborne wrote:
On 15/03/16 10:40, Mikael Pesonen wrote:
Hi,

is it possible to add content to graph from RDF XML with command line
tools? s-put requires SPARQL and tdbloader says

org.apache.jena.tdb.TDBException: Can't open database at location
/home/text/tools/apache-jena-3.0.1/DB/ as it is already locked by the
process with PID 7672.  TDB databases do not permit concurrent usage
across JVMs so in order to prevent possible data corruption you
cannot
open this location from the JVM that does not own the lock for the
dataset

Br,
Mikael

Yes - use s-put or s-post.

These are the SPARQL Graph Store Protocol - no query language, no
update language.

All they do is HTTP PUT or POST to the right graph name and the right
content type.

You can PUT and POST to the dataset itself as well using curl or wget
or any HTTP tool.  You need to set the Content-type header.

    Andy

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


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

Reply via email to