use of org.apache.rya.indexing.entity.EntityIndexOptimizer in project incubator-rya by apache.
the class MongoEntityIndex2IT method beforeClass.
@Before
public void beforeClass() throws Exception {
optimizer = new EntityIndexOptimizer();
optimizer.setConf(conf);
final TypeStorage typeStorage = optimizer.getTypeStorage();
typeStorage.create(PERSON_TYPE);
final Entity entity = Entity.builder().setSubject(new RyaURI("urn:SSN:111-11-1111")).setExplicitType(RYA_PERSON_TYPE).setProperty(RYA_PERSON_TYPE, new Property(new RyaURI("urn:age"), new RyaType("25"))).setProperty(RYA_PERSON_TYPE, new Property(new RyaURI("urn:eye"), new RyaType("blue"))).setProperty(RYA_PERSON_TYPE, new Property(new RyaURI("urn:name"), new RyaType("bob"))).build();
entityStorage = optimizer.getEntityStorage();
entityStorage.create(entity);
}
Aggregations