Hi Dhaval,
Currently the VirtGrap.read() method only support RDF/XML format
files, thus we are going to add support for other like N-Triple, N3,
Turtle etc.
Note Jena has another methods for data loading you should be able to
use, although the loads will probably be slower:
import com.hp.hpl.jena.rdf.model.Model;
public Model read(String url);
public Model read(Reader reader, String base);
public Model read(InputStream reader, String base);
public Model read(String url, String lang);
public Model read( String url, String base, String lang );
public Model read(Reader reader, String base, String lang);
public Model read(InputStream reader, String base, String lang);
Best Regards
Hugh Williams
Professional Services
OpenLink Software
Web: http://www.openlinksw.com
Support: http://support.openlinksw.com
Forums: http://boards.openlinksw.com/support
Twitter: http://twitter.com/OpenLink
On 8 Oct 2009, at 09:53, [email protected] wrote:
well, strangely it doesn't give me any error. But when I query the
data from the endpoint it shows the graph being empty.
On 7 Oct 2009 21:44, Hugh Williams <[email protected]> wrote:
> Hi Dhaval,
>
> Do you get a specific error when attempting to load the N-triple
files ?
>
>
> Best Regards
> Hugh Williams
> Professional Services
> OpenLink Software
> Web: http://www.openlinksw.com
> Support: http://support.openlinksw.com
> Forums: http://boards.openlinksw.com/support
>
> Twitter: http://twitter.com/OpenLink
>
>
>
>
>
> On 5 Oct 2009, at 15:34, Dhaval Thakker wrote:
>
> Hi,I have been trying to load few NT (N-Triple files) using
virtuoso API with the following code:
>
>
> ===
> String virtuosoBaseDir ;
> String virtuosoWebServerPath ;
>
> String file;
> VirtGraph myGraph = new VirtGraph (graphname,url, "dba", "dba");
>
> try
> {
>
> String formatType = "N-TRIPLE";
>
> myGraph.read((virtuosoWebServerPath + file),
formatType);
> }
>
>
> ==
>
>
> The above code doesnt work. however the same code works if I
convert the NT file to rdf/xml and change the formatType to "RDF/
XML" and program loads the file perfectly fine. I have checked
Jena's api and they do indeed refer to the NT files as "N-TRIPLE"
format type so why doent virtuoso load it?
>
>
>
> any hints?
>
>
> Thanks
>
>
>
>
> --
> Regards
>
> Dhaval Thakker
>
>
>
>
------------------------------------------------------------------------------
> Come build with us! The BlackBerry® Developer Conference in SF, CA
> is the only developer event you need to attend this year.
Jumpstart your
> developing skills, take BlackBerry mobile applications to market
and stay
> ahead of the curve. Join us from November 9-12, 2009. Register now!
> http://p.sf.net/sfu/devconf_______________________________________________
> Virtuoso-users mailing list
> [email protected]
> https://lists.sourceforge.net/lists/listinfo/virtuoso-users
>
>
>
>
>