From: Jennifer C. <jen...@at...> - 2010-01-21 00:39:02
|
Hi Tim, Thanks very much for your work on this! > Shall I commit these changes? That's a good question. If the changes are backwards-compatible (i.e. don't require anything from Jena 2.6.2 or its dependencies) then it shouldn't be a problem. If they're not then we need to decide. In what package (and jar) does the LiteralLabelFactory class live? Jennifer -----Original Message----- From: Tim Pizey [mailto:ti...@pa...] Sent: Wednesday, January 20, 2010 7:44 AM To: Riccardo Tasso; ng4...@li... Subject: Re: [namedgraphs] [Fwd: Re: Problem related to Jena 2.6.0] Hi Riccardo, I have done a fresh checkout. I use Maven to build ng4j. Editted pom.xml to use 2.6.0 for jena and jenatest.. then executed: mvn install However the connection to the jena repository timed out. As you probably know there have been some upheavals in the jena ecosystem. I changed the repository location to http://openjena.org/repo/ (not strictly necessary as these are mirrored) This resulted in: INFO] Compilation failure /home/timp/workspace/ng4j/src/de/fuberlin/wiwiss/ng4j/trix/TriXReader.java :[162,35] com.hp.hpl.jena.graph.impl.LiteralLabel is abstract; cannot be instantiated /home/timp/workspace/ng4j/src/de/fuberlin/wiwiss/ng4j/trix/TriXReader.java :[172,35] com.hp.hpl.jena.graph.impl.LiteralLabel is abstract; cannot be instantiated /home/timp/workspace/ng4j/src/de/fuberlin/wiwiss/ng4j/trix/TriXReaderWithE xtensions.java:[168,35] com.hp.hpl.jena.graph.impl.LiteralLabel is abstract; cannot be instantiated /home/timp/workspace/ng4j/src/de/fuberlin/wiwiss/ng4j/trix/TriXReaderWithE xtensions.java:[178,35] com.hp.hpl.jena.graph.impl.LiteralLabel is abstract; cannot be instantiated which is the same problem as you. I then did mvn -DdownloadJavadocs=true -DdownloadSources=true eclipse:clean eclipse:eclipse which creates a new set of eclipse configuration files. In TriXReader substitute: public void objectPlainLiteral(String value, String lang) { LiteralLabel ll = LiteralLabelFactory.create(value, lang); this.object = Node.createLiteral(ll); addTriple(); } public void objectTypedLiteral(String value, String datatypeURI) { // No idea what that line does, is copy&paste from ModelCom.createTypedLiteral RDFDatatype dt = TypeMapper.getInstance().getSafeTypeByName(datatypeURI); LiteralLabel ll = LiteralLabelFactory.createLiteralLabel( value, "", dt ); this.object = Node.createLiteral(ll); addTriple(); } In TriXReaderWithExtensions we do the same (cut and paste issues :( ) public void objectPlainLiteral(String value, String lang) { LiteralLabel ll = LiteralLabelFactory.create(value, lang); this.object = Node.createLiteral(ll); addTriple(); } public void objectTypedLiteral(String value, String datatypeURI) { // No idea what that line does, is copy&paste from ModelCom.createTypedLiteral RDFDatatype dt = TypeMapper.getInstance().getSafeTypeByName(datatypeURI); LiteralLabel ll = LiteralLabelFactory.createLiteralLabel( value, "", dt ); this.object = Node.createLiteral(ll); addTriple(); } This gets us working with Eclipse and Maven. Shall I commit these changes? cheers Tim 2010/1/18 Riccardo Tasso wrote: > Hi Tim, > I've just imported NG4J 0.9.2 sourcecode as an Eclipse project and changed > every library referring to jena 2.6.0 in the corresponding jena 2.6.2. > I have 4 errors (of the same type fortunately). Two of them in the class > de.fuberlin.wiwiss.ng4j.trix.TriXReader (lines 162 and 172) and two in the > class de.fuberlin.wiwiss.ng4j.trix.TriXReaderWithExtensions (lines 168 and > 178). > > The error is in the instructions: > new LiteralLabel(value, lang); > new LiteralLabel(value, null, dt); > and the report is: > "Cannot instantiate the type LiteralLabel" > > Can you help me in solving this issue? > Thank you, > Riccardo > -------------------------------------------------------------------------- ---- Throughout its 18-year history, RSA Conference consistently attracts the world's best and brightest in the field, creating opportunities for Conference attendees to learn about information security's most important issues through interactions with peers, luminaries and emerging and established companies. http://p.sf.net/sfu/rsaconf-dev2dev _______________________________________________ ng4j-namedgraphs mailing list ng4...@li... https://lists.sourceforge.net/lists/listinfo/ng4j-namedgraphs |