Example #1
0
 public TripleBasedBean(Object o, TripleStore store, TripleFactory factory) {
   super();
   this.store = store;
   this.storeId = store.getId();
   this.object = o;
   this.tripleFactory = factory;
 }
Example #2
0
 protected Collection<Triple> getTriplesForSubject(Object subj) {
   Collection<Triple> coll = store.getAll(tripleFactory.newTriple(subj, Variable.v, Variable.v));
   Iterator<Triple> iter = coll.iterator();
   while (iter.hasNext()) {
     if ((iter.next().getProperty()).equals(TripleStore.TYPE)) {
       iter.remove();
     }
   }
   return coll;
 }
Example #3
0
 public Object get(Object key) {
   Triple t = store.get(propertyKey(key));
   return t == null ? null : t.getValue();
 }
Example #4
0
 public boolean containsKey(Object key) {
   return store.get(propertyKey(key)) != null;
 }
Example #5
0
 public void clear() {
   for (Triple t : getTriplesForSubject(getObject())) {
     store.remove(t);
   }
 }
Example #6
0
 public Object remove(Object key) {
   return store.remove(store.get(propertyKey(key)));
 }
Example #7
0
 public Object put(String key, Object value) {
   return store.put(property(key, value));
 }