Andy, In DB2 we extend GraphBase and then override some of the methods... so just clarifying >> My proposal is that the useful operations are moved to Graph, the code for the withReifications forms migrate to the only callers in ModelCom. <<
Today when Model.add(Model) is called by end user, the code flows to ModelCom.add(Model) ModelCom.add(Model,boolean) BulkUpdateHandler().add(Graph, boolean) So you are saying that ModelCom will now call Graph.add(Graph) and so as long as one overrides the new Graph.add(Graph) method, ModelCom would invoke it. thanks Mario From: Andy Seaborne <[email protected]> To: [email protected] Date: 09/03/2012 11:04 PM Subject: Evolution: BulkUpdateHandler / Reification / QueryHandler Sent by: Andy Seaborne <[email protected]> As part of wanting to tidy up and reduce the "core" of Jena, I'd like to propose we Remove BulkUpdateHandler interface Migrate it's few useful operation to Graph. Start to provide reification with "standard" only. graph.QueryHandler only used to support reification. == BulkUpdateHandler The two implementations I know of are SimpleBulkUpdateHandler UpdateHandlerSDB A few of it's operations are useful but most turn into nothing but loops to call add(Triple)/delete(Triple). Event handling details each operation kind but, as far as I can see, this becomes individual calls to an "addedStatement"/"removedStatement" at the Model level i.e. the different between adding by array or list or iterator gets lost. The useful operations are: add(Graph) delete(Graph) removeAll() remove(s,p,o) and the slightly bizarre: add(Graph, withReifications) delete(Graph, withReifications) (see below about reification) and the less useful (because they don't relate to the way the storage might properly batch changes - the provider shouldn't decide the batch boundaries) which turn into add(Triple)/delete(Triple) add(Triple []) add( List<Triple>) add( Iterator<Triple>) delete(Triple []) delete( List<Triple>) delete( Iterator<Triple>) The only calls to these "add" operations are from ARP which batches it's changes into units of 1000, but not a whole parser run. As the SimpleBulkUpdate handler turns these into single calls, nothing gained. My proposal is that the useful operations are moved to Graph, the code for the withReifications forms migrate to the only callers in ModelCom. UpdateHandlerSDB: This only uses the UpdateHandler interface to wrap the calls in start/finish bulk update to implicitly increase the scope of bulk updates. But it isn't == Reification The intent is to only support the default standard eventually. Standard can be provided by code, with no retained state (partial reificiations). TDB and SDB do not support anything except "standard". This leads to .... (graph.)QueryHandler: It's main use is with reification. I think we can remove it when reification is replaced by a straight code implications. Andy See also JENA-189
