You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@clerezza.apache.org by Fabian Christ <ch...@googlemail.com> on 2010/11/03 16:24:58 UTC
Namespace handling in Clerezza and JSON-LD serialization
Hi,
as one part of the EU funded project "Interactive Knowledge Stack" IKS
[1] and by this part of the Apache FOO incubation proposal we currently
use Clerezza as one underlying framework.
Currently, I'm implementing a JSON-LD [2] serializer as part of the FISE
component [3]. This serializer implements the Clerezza
SerializingProvider interface. So this serializer is basically a
Clerezza serializer.
The JSON-LD format supports namespaces, so we need some way to manage
known namespaces and their prefixes within the whole system. An example
of a JSON-LD output looks like this:
{
"#": {
"dbpedia": "http:\/\/dbpedia.org\/ontology\/",
"dcterms": "http:\/\/purl.org\/dc\/terms",
"fise": "http:\/\/fise.iks-project.eu\/ontology\/",
"xmlns": "http:\/\/www.w3.org\/2001\/XMLSchema#"
},
"@": "<urn:iks-project:fise:test:text-annotation:Person>",
"a": [
"<http:\/\/fise.iks-project.eu\/ontology\/Enhancement>",
"<http:\/\/fise.iks-project.eu\/ontology\/TextAnnotation>"
],
"dcterms:\/created": "\"2010-10-27\"^^<xmlns:dateTime>",
"dcterms:\/creator": "urn:iks-project:fise:test:dummyEngine",
"dcterms:\/type": "dbpedia:Person",
"fise:end": "\"20\"^^<xmlns:int>",
"fise:selected-text": "\"Patrick Marshall\"^^<xmlns:string>",
"fise:selection-context": "\"Dr. Patrick ..\"^^<xmlns:string>",
"fise:start": "\"4\"^^<xmlns:int>"
}
This brings us to two questions:
1) How does Clerezza handle the namespaces and prefixes? Is there some
centralized service that FOO could use? If there is no namespace
handling yet, what are the Clerezza plans here? Maybe we could find a
solution that is useful for both projects.
2) Is the Clerezza community interested in the JSON-LD serializer? We
would be happy to commit the code to Clerezza instead of our own code
base and support Clerezza.
Best regards,
- Fabian
[1] http://www.iks-project.eu
[2] http://json-ld.org/spec/
[3]
http://code.google.com/p/iks-project/source/browse/sandbox/fise/trunk/jersey/src/main/java/eu/iksproject/fise/jersey/writers/JsonLdSerializerProvider.java
Re: Namespace handling in Clerezza and JSON-LD serialization
Posted by Tommaso Teofili <to...@gmail.com>.
2010/11/3 Fabian Christ <ch...@googlemail.com>
>
> 2) Is the Clerezza community interested in the JSON-LD serializer? We
> would be happy to commit the code to Clerezza instead of our own code
> base and support Clerezza.
>
>
+1 from me too!
2010/11/5 Olivier Grisel <og...@nuxeo.com>
> On 5 November 2010 18:52, Davide Palmisano <dp...@gmail.com> wrote:
> > Dear all,
> >
> >> That's indeed something that should be done, a service that gives prefix
> >> suggestions for namespace prefixes.
> >
> > something like: http://prefix.cc/ ?
>
> Yes but as an internal OSGi service with a configurable map of
> prefixes (using the apache felix console for instance) and that does
> not require an internet connection to work properly.
>
>
+1 here as well.
Tommaso
Re: [IKS-FISE] Namespace handling in Clerezza and JSON-LD
serialization
Posted by Fabian Christ <ch...@googlemail.com>.
Am Montag, den 08.11.2010, 14:10 +0100 schrieb Olivier Grisel:
> Ok so you already did the service as well: great! I assumed you only
> changed the serializers to be able to pass them the prefix max.
>
> So Fabian can you use the new service in the JSON-LD impl in fise and
> once it's working we will submit as a patch to the clerezza project
Yes, I will start to work on this tomorrow.
Best,
- Fabian
Re: [IKS-FISE] Namespace handling in Clerezza and JSON-LD serialization
Posted by Olivier Grisel <og...@nuxeo.com>.
On 8 November 2010 13:52, Reto Bachmann-Gmuer <re...@trialox.org> wrote:
> On Mon, Nov 8, 2010 at 1:29 PM, Fabian Christ
> <ch...@googlemail.com>wrote:
>
>> Hi,
>>
>> Am Montag, den 08.11.2010, 12:17 +0100 schrieb Olivier Grisel:
>> > On 8 November 2010 12:03, Reto Bachmann-Gmuer <re...@trialox.org>
>> wrote:
>> > > Hi Olivier
>> > >
>> > > I've submitted a fix for CLEREZZA-222. The default data is still
>> missing an
>> > > none of the existing serializer is using it, but it would be great if
>> you
>> > > could have a look at it and tell if its otherwise as expected.
>>
>> I will have a look tomorrow. Can you point me to place where exactly I
>> have to look for the fix?
>>
> the new bundle is here:
> http://svn.apache.org/viewvc/incubator/clerezza/trunk/org.apache.clerezza.parent/org.apache.clerezza.platform.curieprefixmanager/
>
>>
>> Does this fix already solve the problem of managing the namespace
>> prefixes?
>>
> it provides a mangaer for them (web ui) and a service for accessing them.
Ok so you already did the service as well: great! I assumed you only
changed the serializers to be able to pass them the prefix max.
So Fabian can you use the new service in the JSON-LD impl in fise and
once it's working we will submit as a patch to the clerezza project.
--
Olivier
Re: [IKS-FISE] Namespace handling in Clerezza and JSON-LD serialization
Posted by Reto Bachmann-Gmuer <re...@trialox.org>.
On Mon, Nov 8, 2010 at 1:29 PM, Fabian Christ
<ch...@googlemail.com>wrote:
> Hi,
>
> Am Montag, den 08.11.2010, 12:17 +0100 schrieb Olivier Grisel:
> > On 8 November 2010 12:03, Reto Bachmann-Gmuer <re...@trialox.org>
> wrote:
> > > Hi Olivier
> > >
> > > I've submitted a fix for CLEREZZA-222. The default data is still
> missing an
> > > none of the existing serializer is using it, but it would be great if
> you
> > > could have a look at it and tell if its otherwise as expected.
>
> I will have a look tomorrow. Can you point me to place where exactly I
> have to look for the fix?
>
the new bundle is here:
http://svn.apache.org/viewvc/incubator/clerezza/trunk/org.apache.clerezza.parent/org.apache.clerezza.platform.curieprefixmanager/
>
> Does this fix already solve the problem of managing the namespace
> prefixes?
>
it provides a mangaer for them (web ui) and a service for accessing them.
Cheers,
reto
>
> > Thanks very much. I probably won't have time to look in details this
> > week. Ideally the serializer would reuse the prefix info of the future
> > / new prefix namespace service of clerezza :)
> >
> > Maybe Fabian you can open a new issue on clerezza jira for this
> > service and start some implementation and attach it as a patch to the
> > issue so that the clerezza devs can review it.
>
> If the problem is not fixed yet, I will open an issue. If I understand
> right, we want to have a new OSGi service (or bundle?) to handle
> namespaces and their prefixes.
>
> I will try my best to implement this but will probably need some advice
> here and there with the OSGi dependency, meta-data stuff as I'm quite
> unskilled in using OSGi so far.
>
> > Also open a new issue of the JSON-LD serializer you are working on.
> >
> > Reto: which package do you think the namespace prefix service should
> belong too?
>
> Good question. Any suggestions here?
>
> Best,
> - Fabian
>
>
> _______________________________________________
> Iks-fise mailing list
> Iks-fise@iks-project.eu
> http://lists.iks-project.eu/cgi-bin/mailman/listinfo/iks-fise
>
Re: [IKS-FISE] Namespace handling in Clerezza and JSON-LD
serialization
Posted by Fabian Christ <ch...@googlemail.com>.
Hi,
Am Montag, den 08.11.2010, 12:17 +0100 schrieb Olivier Grisel:
> On 8 November 2010 12:03, Reto Bachmann-Gmuer <re...@trialox.org> wrote:
> > Hi Olivier
> >
> > I've submitted a fix for CLEREZZA-222. The default data is still missing an
> > none of the existing serializer is using it, but it would be great if you
> > could have a look at it and tell if its otherwise as expected.
I will have a look tomorrow. Can you point me to place where exactly I
have to look for the fix?
Does this fix already solve the problem of managing the namespace
prefixes?
> Thanks very much. I probably won't have time to look in details this
> week. Ideally the serializer would reuse the prefix info of the future
> / new prefix namespace service of clerezza :)
>
> Maybe Fabian you can open a new issue on clerezza jira for this
> service and start some implementation and attach it as a patch to the
> issue so that the clerezza devs can review it.
If the problem is not fixed yet, I will open an issue. If I understand
right, we want to have a new OSGi service (or bundle?) to handle
namespaces and their prefixes.
I will try my best to implement this but will probably need some advice
here and there with the OSGi dependency, meta-data stuff as I'm quite
unskilled in using OSGi so far.
> Also open a new issue of the JSON-LD serializer you are working on.
>
> Reto: which package do you think the namespace prefix service should belong too?
Good question. Any suggestions here?
Best,
- Fabian
Re: [IKS-FISE] Namespace handling in Clerezza and JSON-LD serialization
Posted by Olivier Grisel <og...@nuxeo.com>.
On 8 November 2010 12:03, Reto Bachmann-Gmuer <re...@trialox.org> wrote:
> Hi Olivier
>
> I've submitted a fix for CLEREZZA-222. The default data is still missing an
> none of the existing serializer is using it, but it would be great if you
> could have a look at it and tell if its otherwise as expected.
Thanks very much. I probably won't have time to look in details this
week. Ideally the serializer would reuse the prefix info of the future
/ new prefix namespace service of clerezza :)
Maybe Fabian you can open a new issue on clerezza jira for this
service and start some implementation and attach it as a patch to the
issue so that the clerezza devs can review it.
Also open a new issue of the JSON-LD serializer you are working on.
Reto: which package do you think the namespace prefix service should belong too?
--
Olivier
Re: [IKS-FISE] Namespace handling in Clerezza and JSON-LD serialization
Posted by Reto Bachmann-Gmuer <re...@trialox.org>.
Hi Olivier
I've submitted a fix for CLEREZZA-222. The default data is still missing an
none of the existing serializer is using it, but it would be great if you
could have a look at it and tell if its otherwise as expected.
cheers,
reto
On Fri, Nov 5, 2010 at 6:54 PM, Olivier Grisel <og...@nuxeo.com> wrote:
> On 5 November 2010 18:52, Davide Palmisano <dp...@gmail.com> wrote:
> > Dear all,
> >
> >> That's indeed something that should be done, a service that gives prefix
> >> suggestions for namespace prefixes.
> >
> > something like: http://prefix.cc/ ?
>
> Yes but as an internal OSGi service with a configurable map of
> prefixes (using the apache felix console for instance) and that does
> not require an internet connection to work properly.
>
> --
> Olivier
> _______________________________________________
> Iks-fise mailing list
> Iks-fise@iks-project.eu
> http://lists.iks-project.eu/cgi-bin/mailman/listinfo/iks-fise
>
Re: Namespace handling in Clerezza and JSON-LD serialization
Posted by Olivier Grisel <og...@nuxeo.com>.
On 5 November 2010 18:52, Davide Palmisano <dp...@gmail.com> wrote:
> Dear all,
>
>> That's indeed something that should be done, a service that gives prefix
>> suggestions for namespace prefixes.
>
> something like: http://prefix.cc/ ?
Yes but as an internal OSGi service with a configurable map of
prefixes (using the apache felix console for instance) and that does
not require an internet connection to work properly.
--
Olivier
Re: Namespace handling in Clerezza and JSON-LD serialization
Posted by Davide Palmisano <dp...@gmail.com>.
Dear all,
> That's indeed something that should be done, a service that gives prefix
> suggestions for namespace prefixes.
something like: http://prefix.cc/ ?
>>
>> 2) Is the Clerezza community interested in the JSON-LD serializer? We
>> would be happy to commit the code to Clerezza instead of our own code
>> base and support Clerezza.
>>
> That's great! What is the media-type for the JSON-LD and do you now how it
> compares with the format currently served as application/rdf+json (I see
> that LD looks nice and compact, are there client-side libraries that support
> it?).
all the best,
Davide
PS: I'm just a lurker on this ml even if I contributed with a couple
of patches to Clerezza in the past, since I'm pretty interested in
this project.
> Cheers,
> Reto
>
>
>>
>> Best regards,
>> - Fabian
>>
>> [1] http://www.iks-project.eu
>> [2] http://json-ld.org/spec/
>> [3]
>>
>> http://code.google.com/p/iks-project/source/browse/sandbox/fise/trunk/jersey/src/main/java/eu/iksproject/fise/jersey/writers/JsonLdSerializerProvider.java
>>
>>
>>
>
--
Davide Palmisano
http://davidepalmisano.wordpress.com
http://twitter.com/dpalmisano
Re: Namespace handling in Clerezza and JSON-LD serialization
Posted by Olivier Grisel <og...@nuxeo.com>.
On 5 November 2010 18:39, Reto Bachmann-Gmuer <re...@trialox.org> wrote:
> Hi Fabian
>
> On Wed, Nov 3, 2010 at 4:24 PM, Fabian Christ
> <ch...@googlemail.com>wrote:
>
>> Hi,
>>
>> as one part of the EU funded project "Interactive Knowledge Stack" IKS
>> [1] and by this part of the Apache FOO incubation proposal we currently
>> use Clerezza as one underlying framework.
>>
>> Currently, I'm implementing a JSON-LD [2] serializer as part of the FISE
>> component [3]. This serializer implements the Clerezza
>> SerializingProvider interface. So this serializer is basically a
>> Clerezza serializer.
>>
>> The JSON-LD format supports namespaces, so we need some way to manage
>> known namespaces and their prefixes within the whole system. An example
>> of a JSON-LD output looks like this:
>>
>> {
>> "#": {
>> "dbpedia": "http:\/\/dbpedia.org\/ontology\/",
>> "dcterms": "http:\/\/purl.org\/dc\/terms",
>> "fise": "http:\/\/fise.iks-project.eu\/ontology\/",
>> "xmlns": "http:\/\/www.w3.org\/2001\/XMLSchema#"
>> },
>> "@": "<urn:iks-project:fise:test:text-annotation:Person>",
>> "a": [
>> "<http:\/\/fise.iks-project.eu\/ontology\/Enhancement>",
>> "<http:\/\/fise.iks-project.eu\/ontology\/TextAnnotation>"
>> ],
>> "dcterms:\/created": "\"2010-10-27\"^^<xmlns:dateTime>",
>> "dcterms:\/creator": "urn:iks-project:fise:test:dummyEngine",
>> "dcterms:\/type": "dbpedia:Person",
>> "fise:end": "\"20\"^^<xmlns:int>",
>> "fise:selected-text": "\"Patrick Marshall\"^^<xmlns:string>",
>> "fise:selection-context": "\"Dr. Patrick ..\"^^<xmlns:string>",
>> "fise:start": "\"4\"^^<xmlns:int>"
>> }
>>
>> This brings us to two questions:
>>
>> 1) How does Clerezza handle the namespaces and prefixes? Is there some
>> centralized service that FOO could use? If there is no namespace
>> handling yet, what are the Clerezza plans here? Maybe we could find a
>> solution that is useful for both projects.
>>
> That's indeed something that should be done, a service that gives prefix
> suggestions for namespace prefixes.
>
>
>>
>> 2) Is the Clerezza community interested in the JSON-LD serializer? We
>> would be happy to commit the code to Clerezza instead of our own code
>> base and support Clerezza.
>>
> That's great! What is the media-type for the JSON-LD and do you now how it
> compares with the format currently served as application/rdf+json (I see
> that LD looks nice and compact, are there client-side libraries that support
> it?).
The recommended media-type is just application/json (according to the
authors of the JSON-LD spec). Currently there is only a python
implementation:
https://github.com/bradleypallen/json_ld_processor
But the project is brand new and already very active. Ready the spec
is very worth it:
http://json-ld.org/spec/latest/
--
Olivier
Re: Namespace handling in Clerezza and JSON-LD serialization
Posted by Reto Bachmann-Gmuer <re...@trialox.org>.
Hi Fabian
On Wed, Nov 3, 2010 at 4:24 PM, Fabian Christ
<ch...@googlemail.com>wrote:
> Hi,
>
> as one part of the EU funded project "Interactive Knowledge Stack" IKS
> [1] and by this part of the Apache FOO incubation proposal we currently
> use Clerezza as one underlying framework.
>
> Currently, I'm implementing a JSON-LD [2] serializer as part of the FISE
> component [3]. This serializer implements the Clerezza
> SerializingProvider interface. So this serializer is basically a
> Clerezza serializer.
>
> The JSON-LD format supports namespaces, so we need some way to manage
> known namespaces and their prefixes within the whole system. An example
> of a JSON-LD output looks like this:
>
> {
> "#": {
> "dbpedia": "http:\/\/dbpedia.org\/ontology\/",
> "dcterms": "http:\/\/purl.org\/dc\/terms",
> "fise": "http:\/\/fise.iks-project.eu\/ontology\/",
> "xmlns": "http:\/\/www.w3.org\/2001\/XMLSchema#"
> },
> "@": "<urn:iks-project:fise:test:text-annotation:Person>",
> "a": [
> "<http:\/\/fise.iks-project.eu\/ontology\/Enhancement>",
> "<http:\/\/fise.iks-project.eu\/ontology\/TextAnnotation>"
> ],
> "dcterms:\/created": "\"2010-10-27\"^^<xmlns:dateTime>",
> "dcterms:\/creator": "urn:iks-project:fise:test:dummyEngine",
> "dcterms:\/type": "dbpedia:Person",
> "fise:end": "\"20\"^^<xmlns:int>",
> "fise:selected-text": "\"Patrick Marshall\"^^<xmlns:string>",
> "fise:selection-context": "\"Dr. Patrick ..\"^^<xmlns:string>",
> "fise:start": "\"4\"^^<xmlns:int>"
> }
>
> This brings us to two questions:
>
> 1) How does Clerezza handle the namespaces and prefixes? Is there some
> centralized service that FOO could use? If there is no namespace
> handling yet, what are the Clerezza plans here? Maybe we could find a
> solution that is useful for both projects.
>
That's indeed something that should be done, a service that gives prefix
suggestions for namespace prefixes.
>
> 2) Is the Clerezza community interested in the JSON-LD serializer? We
> would be happy to commit the code to Clerezza instead of our own code
> base and support Clerezza.
>
That's great! What is the media-type for the JSON-LD and do you now how it
compares with the format currently served as application/rdf+json (I see
that LD looks nice and compact, are there client-side libraries that support
it?).
Cheers,
Reto
>
> Best regards,
> - Fabian
>
> [1] http://www.iks-project.eu
> [2] http://json-ld.org/spec/
> [3]
>
> http://code.google.com/p/iks-project/source/browse/sandbox/fise/trunk/jersey/src/main/java/eu/iksproject/fise/jersey/writers/JsonLdSerializerProvider.java
>
>
>