1
0
mirror of https://github.com/gnosygnu/xowa.git synced 2026-03-02 03:49:30 +00:00

Wikibase: Add getReferencedEntityId; refactor some wikibase code

This commit is contained in:
gnosygnu
2018-06-24 08:36:34 -04:00
parent 6348aa6177
commit 341d2e13a4
9 changed files with 280 additions and 25 deletions

View File

@@ -15,8 +15,8 @@ Apache License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-APACHE2.txt
*/
package gplx.xowa.apps.caches; import gplx.*; import gplx.xowa.*; import gplx.xowa.apps.*;
import gplx.xowa.xtns.wbases.*;
public class Wdata_doc_cache {
private Hash_adp_bry hash = Hash_adp_bry.cs();
public class Wbase_doc_cache {
private final Hash_adp_bry hash = Hash_adp_bry.cs();
public void Add(byte[] qid, Wdata_doc doc) {hash.Add(qid, doc);}
public Wdata_doc Get_or_null(byte[] qid) {return (Wdata_doc)hash.Get_by_bry(qid);}
public void Free_mem_all() {this.Clear();}

View File

@@ -15,7 +15,7 @@ Apache License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-APACHE2.txt
*/
package gplx.xowa.apps.caches; import gplx.*; import gplx.xowa.*; import gplx.xowa.apps.*;
public class Xoa_cache_mgr {
public Wdata_doc_cache Doc_cache() {return doc_cache;} private Wdata_doc_cache doc_cache = new Wdata_doc_cache();
public Wbase_doc_cache Doc_cache() {return doc_cache;} private Wbase_doc_cache doc_cache = new Wbase_doc_cache();
public void Free_mem_all() {
doc_cache.Free_mem_all();
}