this.vertex = vertex;
}
public Object get(FieldInformer<?> key) {
if(!fieldValues.containsKey(key)) {
Loader loader = new Loader();
Vertex currentVertex = vertex;
Object value = null;
for(Property currentProperty : key.getFieldPath()) {
Iterator<Edge> edges = service.getStrategy().getOutEdgesFor(currentVertex, currentProperty).iterator();
if(edges.hasNext()) {
currentVertex = edges.next().getVertex(com.tinkerpop.blueprints.Direction.IN);
} else {
// maybe it's a literal value (valid only when on last property, but this is
// theoretically guaranteed by informers)
if(loader.hasLiteralProperty(currentProperty, currentVertex)) {
value = loader.loadSingleLiteral(getClass().getClassLoader(), currentProperty, currentVertex, new ObjectCache());
} else {
// but, if not, well, consider result as a failure
currentVertex = null;
}
}