GraphBackedTypeStore implements ITypeStore { @Override @GraphTransaction public TypesDef restoreType(String typeName) throws AtlasException { Iterator vertices = graph.query().has(Constants.VERTEX_TYPE_PROPERTY_KEY, VERTEX_TYPE).has(Constants.TYPENAME_PROPERTY_KEY, typeName).vertices().iterator(); return getTypesFromVertices(vertices); } @Inject  GraphBackedTypeStore(AtlasGraph atlasGraph); @Override @GraphTransaction void store(TypeSystem typeSystem, ImmutableList<String> typeNames); @Override @GraphTransaction TypesDef restore(); @Override @GraphTransaction TypesDef restoreType(String typeName); static final String VERTEX_TYPE; static final String SUPERTYPE_EDGE_LABEL; }
@Test(dependsOnMethods = "testStore") public void testRestoreType() throws Exception { TypesDef typesDef = typeStore.restoreType("Manager"); verifyRestoredClassType(typesDef, "Manager"); }