public void setAge(int age) { map.put( property( "age", Integer.valueOf( age ) ) ); }
public void setAgeI(Integer age) { map.put( property( "age", age ) ); }
public StudentProxyWrapper3( Imp2 object, TripleStore store ) { this.object = object; this.store = store; if ( ! this.store.contains( propertyKey("age") ) ) { this.store.put( property( "age", 0) ); } this.store.put( property( "xcsvf" , 0.0 ) ); this.store.put( property( "name" , null ) ); this.store.put( property( "csdfsd", 0L ) ); this.store.put( property( "school" , null ) ); }
public void clear() { bit_writer.setIntValue( object, 0 ); name_writer.setValue( object, null ); super.clear(); this.store.put( property( "age", 0) ); this.store.put( property( "xcsvf" , 0.0 ) ); this.store.put( property( "name" , null ) ); this.store.put( property( "csdfsd", 0L ) ); this.store.put( property( "school" , null ) ); }
public boolean put(final Triple triple) { boolean ret = put( triple, true ); return ret; }
public boolean add( final Triple triple ) { return put(triple, false); }
@Test public void testMassAddRemove() { TripleStore store = new TripleStore( ); int instanceLength = 1 * 1000 * 30; int tripleLength = 70; Triple t = null; List<Individual> inds = new ArrayList<Individual>(instanceLength); for ( int i = 0; i < instanceLength; i++) { Individual ind = new Individual(); inds.add( ind ); for (int j = 0; j < tripleLength; j++) { t = new TripleImpl(ind, getPropertyName(j), i*j); assertFalse( store.put( t ) ); } } assertEquals( instanceLength * tripleLength, store.size() ); for ( int i = 0; i < instanceLength; i++) { for (int j = 0; j < tripleLength; j++) { t = new TripleImpl(inds.get( i ),getPropertyName(j), V ); store.removeAll( t ); } } assertEquals( 0, store.size() ); }
@Test public void testPutAndGetWithExisting() { // We know it needs to hold a lot of triples, so instantiate it with huge capacity. // A lower capacity ensures a larger capacity per number of triples, i.e. less collision - default is 0.75f TripleStore store = new TripleStore(10*100*1000, 0.6f ); Individual ind = new Individual(); Triple t = new TripleImpl(ind, "hasName", "mark"); assertFalse( store.put( t ) ); Triple tKey = new TripleImpl(ind, "hasName", V ); t = store.get( tKey ); assertEquals("mark", t.getValue() ); t = new TripleImpl(ind, "hasName", "davide"); assertTrue( store.put( t ) ); tKey = new TripleImpl(ind, "hasName", V ); t = store.get( tKey ); assertEquals("davide", t.getValue() ); }
@Test public void testPutAndGet() { // We know it needs to hold a lot of triples, so instantiate it with huge capacity. // A lower capacity ensures a larger capacity per number of triples, i.e. less collision - default is 0.75f TripleStore store = new TripleStore(10*100*1000, 0.6f ); Individual ind = new Individual(); Triple t = new TripleImpl(ind, "hasName", "mark"); assertFalse( store.put( t ) ); Triple tKey = new TripleImpl(ind, "hasName", V ); t = store.get( tKey ); assertEquals("mark", t.getValue() ); }
public Object put(String key, Object value) { return store.put( property( key, value ) ); }
@Test public void testPutAndGetandRemove() { // We know it needs to hold a lot of triples, so instantiate it with huge capacity. // A lower capacity ensures a larger capacity per number of triples, i.e. less collision - default is 0.75f TripleStore store = new TripleStore(10*100*1000, 0.6f ); Individual ind = new Individual(); Triple t = new TripleImpl(ind, "hasName", "mark"); assertFalse( store.put( t ) ); Triple tKey = new TripleImpl(ind, "hasName", V ); t = store.get( tKey ); assertEquals("mark", t.getValue() ); t = new TripleImpl(ind, "hasName", V ); assertEquals( 1, store.removeAll( t ) ); assertFalse( store.remove( t ) ); // try again and make sure it's false. tKey = new TripleImpl(ind, "hasName", V ); assertNull( store.get( tKey ) ); }
public Object put( String key, Object value ) { store.put( tripleFactory.newTriple( key, TripleStore.PROXY, value ), false ); Object ret = store.add( property( TripleStore.TYPE, key ) ); return ret; }