private Object evaluateForDataLookup(DocumentOperation op) {
        if (op instanceof DocumentPut)
            return ((DocumentPut)op).getDocument().getDataType().isA(this.type) ? op : false;
        else if (op instanceof DocumentUpdate)
            return ((DocumentUpdate)op).getDocumentType().isA(this.type) ? op : false;
        else
            throw new IllegalStateException("Programming error");
    }
A document node which returns a document: For accessing document field data in AttributeNode,
where it should be possible to access fields both by the concrete type ("concreteType.fieldName")
and by parent type ("inheritedType.inheritedField").

@author Simon Thoresen Hult
@author bratseth
document/src/main/java/com/yahoo/document/select/rule/DocumentNode.java