Api for serialize Dataset in some RDF format

4 views
Skip to first unread message

Busa

unread,
Jun 17, 2009, 9:15:25 AM6/17/09
to OpenAnzo
Hi all dear OpenAnzo group.

I'm tryng to develope a Servlet that give an HTTP GET interface to
the main Command Line Interface features.
At the moment I have implemented the Import (very simple without all
the options). Now I'm tryng to implement the Get so that from a simple
URL we can get a serialization of a dataset (usefull for every
application that direcly harvast rdf online).
I noticed that I can easly delegate all to the CommandInterface
because of many class are hidden to me.
So looking to the src of the commnadLineInterface (i.e GetCommand.java
and CommandContext.java) I'm tryng to replicate some of the main
features in my servlet.

My question is: instead of direct using the RioToAnzoWriterAdapter
that process all the statements and having to take care of things like
format or prefix, is there some api class for easy RDF serialization?

May be something like:
RDFSerilizer.serialize(Writer, IAnzoGraph,
Format, boolean usePrefix) ?

If not... it coud be usefull for the future. Don't u think?

Thanx again,
Busa.

Matthew Roy

unread,
Jun 17, 2009, 2:23:32 PM6/17/09
to open...@googlegroups.com
There is a set of serialization utility methods within the
org.openanzo.rdf.utils.ReadWriteUtils class. This class has methods to
serialize graphs, quadstores/datasets and collections of statements.

Matt

Busa

unread,
Jun 18, 2009, 4:21:21 AM6/18/09
to OpenAnzo
Thakyou! That's work perfectly and was exactly what I was looking
for! ;)
Bye,
Busa
Reply all
Reply to author
Forward
0 new messages