Mercurial > hg > IndexMetaContextualizer
comparison src/main/java/de/mpiwg/indexmeta/DataProvider.java @ 0:dfce13a5f5f9
nit project!
author | Jorge Urzua <jurzua@mpiwg-berlin.mpg.de> |
---|---|
date | Thu, 11 Apr 2013 15:25:26 +0200 |
parents | |
children |
comparison
equal
deleted
inserted
replaced
-1:000000000000 | 0:dfce13a5f5f9 |
---|---|
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 } |