OpenAnzo javascript rdf library

48 views
Skip to first unread message

Charlie

unread,
Sep 8, 2010, 8:41:43 AM9/8/10
to OpenAnzo
Hi, I'm new here.
I found this article : http://roubenmeschian.com/rubo/?p=3
which states that its possible to write and read RDF content using the
javascript lib within OpenAnzo. Now I've downloaded the dist version
and found the js jar file with relevant RDF manipulation utilities. I
need to use these within a firefox extension. Any ideas about this and
any example as to how to use the api are more then welcome.

cheers

Rouben Meschian

unread,
Sep 8, 2010, 11:46:37 AM9/8/10
to open...@googlegroups.com
Hi Charles,

You can better understand how the API works by looking at the unit
tests found in the openanzo.js project. There is a foaf browser
example in the 'examples' directory you can also look at. I can't
give you specifics on how to use openanzo.js in a firefox extension
because i have never written one, but from what i've read it seems
like it's not difficult to embed or reference javascript. If you get
really stuck and can't find any way to do this let me know.

cheers,
-Rouben Meschian (rubo)

> --
> You received this message because you are currently subscribed to the "OpenAnzo" group.
>
> To post to this group, send email to open...@googlegroups.com
> To unsubscribe from this group, send email to openanzo-u...@googlegroups.com
>
> For more options, visit this group at http://groups.google.com/group/openanzo?hl=en

Charlie

unread,
Sep 9, 2010, 4:46:23 AM9/9/10
to OpenAnzo
Hi, thanks for your reply.
I will look into the tests and examples that you mentioned.
I essentially want to be able to use some logged data to generate an
RDF representation of that data on my machine.
The data is logged via some javascript and thus adding openanzo
functionality could facilitate this mapping.
will let u know what I've accomplished.

thanks again

Charlie

On Sep 8, 4:46 pm, Rouben Meschian <rmesch...@gmail.com> wrote:
> Hi Charles,
>
> You can better understand how the API works by looking at the unit
> tests found in the openanzo.js project.  There is a foaf browser
> example in the 'examples' directory you can also look at.  I can't
> give you specifics on how to use openanzo.js in a firefox extension
> because i have never written one, but from what i've read it seems
> like it's not difficult to embed or reference javascript.  If you get
> really stuck and can't find any way to do this let me know.
>
> cheers,
> -Rouben Meschian (rubo)
>
Message has been deleted

Charlie

unread,
Sep 9, 2010, 8:13:26 AM9/9/10
to OpenAnzo
Is it possible to serialize any generated RDF to an RDF file?

C

Jordi Albornoz Mulligan

unread,
Sep 9, 2010, 9:52:20 AM9/9/10
to open...@googlegroups.com
On 9/9/2010 8:13 AM, Charlie wrote:
> Is it possible to serialize any generated RDF to an RDF file?

Hi Charlie,

The Open Anzo JavaScript API supports serializing RDF into the N-Triples
format. It can serialize to a string. As for writing that string to a
file, you'll have to use whatever mechanisms exist in Firefox extensions
for that.

The relevant method for serialization is:
anzo.rdf.serializer.NTripleSerializer.serialize(graph)

See the NTripleSerializerTest.js file for example usage:
http://www.openanzo.org/projects/openanzo/browser/openanzo/trunk/org.openanzo.js/src/main/resources/docroot/anzo/tests/rdf/serializer/NTripleSerializerTest.js


--
Jordi Albornoz Mulligan
Founding Engineer - Cambridge Semantics
jo...@cambridgesemantics.com
(617) 401-7321

Reply all
Reply to author
Forward
0 new messages