Hello, I need to read an RDF file from http://www.cidoc-crm.org/rdfs/cidoc-crm . It is "generic" link to current version of ontology which I use. When I open it in web browser I am automatically redirected to current version (http://www.cidoc-crm.org/rdfs/5.0.4/cidoc-crm) but I don’t know how to read my ontology from generic url: http://www.cidoc-crm.org/rdfs/cidoc-crm in Java. When I use url: http://www.cidoc-crm.org/rdfs/5.0.4/cidoc-crm in my code everything goes fine but when I use generic url I get fallowing exception: com.hp.hpl.jena.shared.JenaException: org.xml.sax.SAXParseException: The element type "meta" must be terminated by the matching end-tag "</meta>".
My code is very simple: //Works: //String path = "http://www.cidoc-crm.org/rdfs/5.0.4/cidoc-crm"; //Doees not work: String path = "http://www.cidoc-crm.org/rdfs/cidoc-crm"; String NS = "http://www.cidoc-crm.org/rdfs/cidoc-crm/_"; OntModel model = ModelFactory.createOntologyModel(); InputStream in = FileManager.get().open(path); if (in == null) { throw new IllegalArgumentException( "File: " + path + " not found"); } model.read(in, NS, "RDF/XML-ABBREV"); //exception thrown here… It is important for me to read from generic link, please If you could help me I will be very grateful. Mat
