/** * Get the value of an attribute from an object or tuple. * @param left The left input tuple. * @param right The right input object. * @param prefix The prefix input object (last value from previous extractor in a chain). * @param state The working memory. */ public Object getValue(Tuple left, Object right, Object prefix, IOAVState state) { return ((OAVJavaAttributeType)attr).accessProperty(prefix); }
/** * Get the value of an attribute from an object or tuple. * @param left The left input tuple. * @param right The right input object. * @param prefix The prefix input object (last value from previous extractor in a chain). * @param state The working memory. */ public Object getValue(Tuple left, Object right, Object prefix, IOAVState state) { return ((OAVJavaAttributeType)attr).accessProperty(prefix); }
/** * Get the value of an attribute from an object or tuple. * @param left The left input tuple. * @param right The right input object. * @param prefix The prefix input object (last value from previous extractor in a chain). * @param state The working memory. */ public Object getValue(Tuple left, Object right, Object prefix, IOAVState state) { // Fetch the value from the state // a) attr == null -> use object // b) attr !=null -> use right.getXYZ() if(right instanceof VirtualFact) right = ((VirtualFact)right).getObject(); Object ret; if(attr==null) { ret = right; } else { ret = ((OAVJavaAttributeType)attr).accessProperty(right); } return ret; }
/** * Get the value of an attribute from an object or tuple. * @param left The left input tuple. * @param right The right input object. * @param prefix The prefix input object (last value from previous extractor in a chain). * @param state The working memory. */ public Object getValue(Tuple left, Object right, Object prefix, IOAVState state) { // Fetch the value from the state // a) attr == null -> use object // b) attr !=null -> use right.getXYZ() if(right instanceof VirtualFact) right = ((VirtualFact)right).getObject(); Object ret; if(attr==null) { ret = right; } else { ret = ((OAVJavaAttributeType)attr).accessProperty(right); } return ret; }
/** * Get the value of an attribute from an object or tuple. * @param left The left input tuple. * @param right The right input object. * @param prefix The prefix input object (last value from previous extractor in a chain). * @param state The working memory. */ public Object getValue(Tuple left, Object right, Object prefix, IOAVState state) { // Fetch the object from the tuple // a) attr == null -> use object // b) attr !=null -> use object.getXYZ() Object object = left.getObject(tupleindex); if(object instanceof VirtualFact) object = ((VirtualFact)object).getObject(); if(attr!=null) { object = ((OAVJavaAttributeType)attr).accessProperty(object); } return object; }
/** * Get the value of an attribute from an object or tuple. * @param left The left input tuple. * @param right The right input object. * @param prefix The prefix input object (last value from previous extractor in a chain). * @param state The working memory. */ public Object getValue(Tuple left, Object right, Object prefix, IOAVState state) { // Fetch the object from the tuple // a) attr == null -> use object // b) attr !=null -> use object.getXYZ() Object object = left.getObject(tupleindex); if(object instanceof VirtualFact) object = ((VirtualFact)object).getObject(); if(attr!=null) { object = ((OAVJavaAttributeType)attr).accessProperty(object); } return object; }