RDF prefixes

4 views
Skip to first unread message

Busa

unread,
Jun 17, 2009, 10:57:01 AM6/17/09
to OpenAnzo
Why if I import a namedGraph in rdfxml format that contain prefixes
and namespace setted up when i made a "get" of the same namedGraph in
rdfxml format the prefix are lost?
Is there a way for mantaining the prefixes indipendently from the user
setting (setting.trig)? Indeed If you are accessing Anzo server from
an external aplication (via anzoClient API) you may not have any
setting configuration with predefined prefixes.

Thankyou,
Busa.

Lee Feigenbaum

unread,
Jun 22, 2009, 2:24:04 PM6/22/09
to open...@googlegroups.com
Hi Busa,

We do not store any of the prefixes or other serialization artifacts
within the Anzo store. Can you explain what you are trying to accomplish
in more detail? The RDF returned from 'anzo get' should be completely
self-sufficient and valid in any RDF parsing software.

Lee
--
Lee Feigenbaum
VP Technology & Standards, Cambridge Semantics Inc
l...@cambridgesemantics.com
1-617-553-1060

Busa

unread,
Jun 23, 2009, 4:36:17 AM6/23/09
to OpenAnzo
Ok it's absolutely right that Anzo doesn't store nothing about
prefixes but my question still is: why usign getting in trig format
from console it use the prefixes matching in the setting.trig whereas
in RDFXML it doesn't?


Example:

anzo get imo:test

this is the result:
========================================
@prefix imo: <http://imolinfo.it/> .
@prefix dc: <http://purl.org/dc/elements/1.1/> .
@prefix rdfs: <http://www.w3.org/2000/01/rdf-schema#> .
@prefix system: <http://openanzo.org/ontologies/2008/07/System#> .
@prefix osproj: <http://www.imolinfo.it/doap_instances.rdf#> .
@prefix foaf: <http://xmlns.com/foaf/0.1/> .
@prefix idoap: <http://imolinfo.it/doap/> .
@prefix xsd: <http://www.w3.org/2001/XMLSchema#> .
@prefix cli: <http://openanzo.org/cli/> .
@prefix doap: <http://usefulinc.com/ns/doap#> .
@prefix anzo: <http://openanzo.org/ontologies/2008/07/Anzo#> .

imo:test {
_:node14862f0nix1 a foaf:Person ;
foaf:mbox "mbusa...@imolinfo.it" ;
foaf:name "Matteo" .

_:node14862f0nix2 a doap:Version ;
doap:name "TEST" ;
doap:revision "3.1" .

_:node14862f0nix3 doap:browse <http://svn.project.org/cgi-bin/
viewsvn.cgi/trunk/project/> ;
doap:location <http://svn.project.org/svn/repos/trunk/project/> .

doap:TEST a doap:Project ;
doap:SVNRepository _:node14862f0nix3 ;
doap:created "2007-04-05" ;
doap:description "Istanza di test" ;
doap:homepage <http://www.project.org/> ;
doap:license <http://usefulinc.com/doap/licenses/CDDL> ;
doap:maintainer _:node14862f0nix1 ;
doap:name "TEST" ;
doap:release _:node14862f0nix2 ;
doap:shortdesc "Test" ;
doap:shortname "T1" .
}
=================================

if I try in rdf with "-o rdf" option I lose all prefixes (the only
used is "rdf"):

======================================
<?xml version="1.0" encoding="UTF-8"?>
<rdf:RDF
xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#">

<rdf:Description rdf:nodeID="node14862f0nix1">
<rdf:type rdf:resource="http://xmlns.com/foaf/0.1/Person"/>
<mbox xmlns="http://xmlns.com/foaf/0.1/">mbusa...@imolinfo.it</
mbox>
<name xmlns="http://xmlns.com/foaf/0.1/">Matteo</name>
</rdf:Description>

<rdf:Description rdf:nodeID="node14862f0nix2">
<rdf:type rdf:resource="http://usefulinc.com/ns/doap#Version"/>
<name xmlns="http://usefulinc.com/ns/doap#">TEST</name>
<revision xmlns="http://usefulinc.com/ns/doap#">3.1</revision>
</rdf:Description>

<rdf:Description rdf:nodeID="node14862f0nix3">
<browse xmlns="http://usefulinc.com/ns/doap#" rdf:resource="http://
svn.project.org/cgi-bin/viewsvn.cgi/trunk/project/"/>
<location xmlns="http://usefulinc.com/ns/doap#" rdf:resource="http://
svn.project.org/svn/repos/trunk/project/"/>
</rdf:Description>

<rdf:Description rdf:about="http://usefulinc.com/ns/doap#TEST">
<rdf:type rdf:resource="http://usefulinc.com/ns/doap#Project"/>
<SVNRepository xmlns="http://usefulinc.com/ns/doap#"
rdf:nodeID="node14862f0nix3"/>
<created xmlns="http://usefulinc.com/ns/doap#">2007-04-05</created>
<description xmlns="http://usefulinc.com/ns/doap#">Istanza di test</
description>
<homepage xmlns="http://usefulinc.com/ns/doap#" rdf:resource="http://
www.project.org/"/>
<license xmlns="http://usefulinc.com/ns/doap#" rdf:resource="http://
usefulinc.com/doap/licenses/CDDL"/>
<maintainer xmlns="http://usefulinc.com/ns/doap#"
rdf:nodeID="node14862f0nix1"/>
<name xmlns="http://usefulinc.com/ns/doap#">TEST</name>
<release xmlns="http://usefulinc.com/ns/doap#"
rdf:nodeID="node14862f0nix2"/>
<shortdesc xmlns="http://usefulinc.com/ns/doap#">Test</shortdesc>
<shortname xmlns="http://usefulinc.com/ns/doap#">T1</shortname>
</rdf:Description>

</rdf:RDF>
===========================================================

Also using the "- c" option...I get the same result.

Can you tell me why?

Thanx,
Busa,

b...@cambridgesemantics.com

unread,
Jun 23, 2009, 10:45:55 AM6/23/09
to open...@googlegroups.com
Hi Busa,
That's right, currently prefixes are supported only in TriG. We could probably support prefixes in rdf/xml but just haven't It's a bit trickier because we would have to use a combination of xmlns declarations and xml entity strings because of the different ways uri's are written out

- Ben


Sent on the Sprint® Now Network from my BlackBerry®

-----Original Message-----
From: Busa <matteo.b...@gmail.com>

Date: Tue, 23 Jun 2009 01:36:17
To: OpenAnzo<open...@googlegroups.com>
Subject: [OpenAnzo:425] Re: RDF prefixes
doap:SVNRepository_:node14862f0nix3 ;
doap:created "2007-04-05" ;
doap:description "Istanza di test" ;
doap:homepage <http://www.project.org/> ;
doap:license <http://usefulinc.com/doap/licenses/CDDL> ;
doap:maintainer_:node14862f0nix1 ;
doap:name "TEST" ;
doap:release_:node14862f0nix2 ;
Reply all
Reply to author
Forward
0 new messages