i'm comparing two classes.. if its a resource, asResource() will return the resource else it will through the exception.. for this asResource() i found an error that " cannot find symbol symbol: method asResource() location: interface com.hp.hpl.jena.rdf.model.RDFNode"... so what to do?
On Mon, Apr 8, 2013 at 3:34 AM, Chris Dollin <[email protected]>wrote: > On Monday, April 08, 2013 03:06:39 AM aarthi wrote: > > hi....... i'm comparing two owl files using jena. in that i use this > > code for comparision > > > > > > > > private boolean areEqual(RDFNode thisOne, RDFNode thatOne){ > > if(thisOne.isResource() && thatOne.isResource()) > > return areEqual(thisOne.asResource(), thatOne.asResource()); > > if(thisOne.isLiteral() && thatOne.isLiteral()) > > return areEqual(thisOne.asLiteral(), thatOne.asLiteral()); > > > > return false; > > } > > > > but there is an error in asLiteral() and asResource(). I have imported > > hp.hpl.jena.rdf.graph.RDFNode but still i can't resolve the error. > > anyone help me > > Why not just use .equals()? > > (You don't tell us what the error is or what RDFNode's you're comparing > or what the calling code looks like or whether you have overloads for > areEqual(), so it's a bit tricky to work out what you've done wrong.) > > Chris > > -- > "I don't want to know what the Structuralists think! I want /Archer's > Goon/ > to know what YOU think!" > > Epimorphics Ltd, http://www.epimorphics.com > Registered address: Court Lodge, 105 High Street, Portishead, Bristol BS20 > 6PT > Epimorphics Ltd. is a limited company registered in England (number > 7016688) > >
