コード例 #1
0
 public TripleBasedBean(Object o, TripleStore store, TripleFactory factory) {
   super();
   this.store = store;
   this.storeId = store.getId();
   this.object = o;
   this.tripleFactory = factory;
 }
コード例 #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;
 }
コード例 #3
0
 public Object get(Object key) {
   Triple t = store.get(propertyKey(key));
   return t == null ? null : t.getValue();
 }
コード例 #4
0
 public boolean containsKey(Object key) {
   return store.get(propertyKey(key)) != null;
 }
コード例 #5
0
 public void clear() {
   for (Triple t : getTriplesForSubject(getObject())) {
     store.remove(t);
   }
 }
コード例 #6
0
 public Object remove(Object key) {
   return store.remove(store.get(propertyKey(key)));
 }
コード例 #7
0
 public Object put(String key, Object value) {
   return store.put(property(key, value));
 }