Re: [Knobot-devel] knobot orphans
Status: Beta
Brought to you by:
rebach
|
From: <re...@gm...> - 2007-03-05 12:07:31
|
dbu wrote: > hello reto, > > [taking a direct discussion onto this mailing list] > > thanks for your tip how to solve the NullpointerException we got becaus= e > one statement had a nextrelation pointing to an non-existent statement.= > =20 strange use of "statement" bot are resources, the first of type knoBot:Relation the second most likely an rss:item > doing "remove next and first relation stmts" and then "de-orphanize > relations" solved it. > > i am however afraid of loosing ordering information or something.=20 the statements deleted and recreated are a faster way to access the ordered relations than getting all relations with a source and sorting them. if the orer of items change there was something strange before, such a "strange" situation may happen when the relations have different aging-values. > is > there an easy way how to restrict the OrphanizeAll to only statements > having a specific source? can you give me a hint how i could implement = this? > http://knobot.cvs.sourceforge.net/knobot/knobot/src/org/wymiwyg/knobot/= admin/OrphanizeAll.java?revision=3D1.3&view=3Dmarkup > looks like the place to edit, but how? > =20 seems unncessary to me, you would have to iterate through resources of type relation (listSubjectsWithProperty(RDF.type, KNOBOT.Relation), check if the source matches and delete next/first if applicable. =09 reto |