The closing braces are fine. Its only missed in my email. Actually it gives me the following error in eclipse.
"at org.apache.jena.riot.RDFDataMgr.read(RDFDataMgr.java:243) org.apache.jena.riot.adapters.RDFReaderRIOT.read(RDFReaderRIOT.java:70) com.hp.hpl.jena.rdf.model.impl.ModelCom.read(ModelCom.java:277) at tutorial.istmain.main(istmain.java:23)" On Sat, Aug 15, 2015 at 4:09 PM, Andy Seaborne <[email protected]> wrote: > On 15/08/15 15:16, kumar rohit wrote: > >> Hello, what is the problem with this code.. I can not understand even the >> error message by eclipse. >> > > What is the error you are seeing? > > (it's missing a closing "}" for start; if this is jena3, then the imports > are wrong - but Eclipse will sort that out with shift-cntr-O) > > > >> ______________________________________________ >> import java.io.InputStream; >> >> import com.hp.hpl.jena.rdf.model.Model; >> import com.hp.hpl.jena.rdf.model.ModelFactory; >> import com.hp.hpl.jena.util.FileManager; >> >> public class istmain >> { >> >> public static void main(String[] args) { >> >> Model model=ModelFactory.createDefaultModel(); >> >> InputStream in=FileManager.get().open("Module.owl"); >> model.read(in,null,"RDF/XML"); >> model.write(System.out); >> } >> >> _____________________________________________________ >> >> >
