0
|
1 package de.mpiwg.indexmeta;
|
|
2
|
|
3 import java.util.ArrayList;
|
|
4 import java.util.List;
|
|
5
|
|
6 import de.mpiwg.indexmeta.bo.Contextualization;
|
|
7 import de.mpiwg.indexmeta.utils.QuadKey;
|
|
8
|
|
9 public class DataProvider {
|
|
10
|
|
11 private PersistentService ps = new PersistentService();
|
|
12
|
|
13 public List<Contextualization> getCtxByIndexMetaId(String indexMetaId){
|
|
14 //QuadKey(indexMetaId, elementId, remoteId, id)
|
|
15 return ps.getCtxMap().getValuesByFirstKey(indexMetaId);
|
|
16 }
|
|
17
|
|
18 public List<Contextualization> getCtxByElementId(String elementId){
|
|
19 //QuadKey(indexMetaId, elementId, remoteId, id)
|
|
20 return ps.getCtxMap().getValuesBySecondKey(elementId);
|
|
21 }
|
|
22
|
|
23 public List<Contextualization> getCtxByRemoteId(String remoteId){
|
|
24 //QuadKey(indexMetaId, elementId, remoteId, id)
|
|
25 return ps.getCtxMap().getValuesByThirdKey(remoteId);
|
|
26 }
|
|
27
|
|
28 public Contextualization getCtx(Long id){
|
|
29 return ps.getCtxMap().getValuesByOwnKey(id);
|
|
30 }
|
|
31
|
|
32 public void saveCtx(Contextualization ctx){
|
|
33 ps.saveCtx(ctx);
|
|
34 }
|
|
35
|
|
36 }
|