Package org.jrdf.query.relation

Examples of org.jrdf.query.relation.Attribute


    private void resetCacheHandler(List<Expression> constraintList) {
        cacheHandler.reset(result, constraintList.size());
    }

    private EvaluatedRelation processConstraint(SingleConstraint constraint) {
        Attribute curAttr = cacheHandler.findOneCachedAttribute(constraint);
        if (curAttr != null) {
            return doCachedConstraint(constraint, curAttr);
        } else {
            return restrict.restrict(result, constraint.getAvo(allVariables));
        }
View Full Code Here


    }

    @Override
    public String toString() {
        Map.Entry<Attribute, Node> attributeValue = singleAvp.entrySet().iterator().next();
        Attribute attribute = attributeValue.getKey();
        return LANG + " (" + attribute + ")";
    }
View Full Code Here

    }

    @Override
    public String toString() {
        Map.Entry<Attribute, Node> attributeValueEntry = singleAvp.entrySet().iterator().next();
        Attribute attribute = attributeValueEntry.getKey();
        return STR + " (" + attribute + ") ";
    }
View Full Code Here

    }

    public LinkedHashMap<Attribute, Node> getAvo(Map<AttributeName, ? extends NodeType> allVariables) {
        LinkedHashMap<Attribute, Node> newAvps = new LinkedHashMap<Attribute, Node>();
        for (Attribute existingAttribute : singleAvp.keySet()) {
            Attribute newAttribute;
            if (allVariables != null) {
                newAttribute = createNewAttribute(existingAttribute, allVariables);
            } else {
                newAttribute = existingAttribute;
            }
View Full Code Here

        }
        return result;
    }

    private boolean equateAVOs(Map<Attribute, Node> lhs, Map<Attribute, Node> rhs) {
        Attribute attribute = lhs.keySet().iterator().next();
        Node lvo = lhs.get(attribute);
        Node rvo = rhs.get(attribute);
        if (isAnyNode(lvo)) {
            if (rvo != null) {
                updateAttributeValue(attribute, lvo, rvo);
View Full Code Here

        }
        return false;
    }

    private void updateAttributeValue(Attribute attribute, Node lvo, Node rvo) {
        final Attribute value = variableMap.get(attribute);
        attributeValues.put(attribute, rvo);
        if (value != null) {
            attributeValues.put(value, rvo);
        }
    }
View Full Code Here

            attributeValues.put(value, rvo);
        }
    }

    private void updateVariableMap(Map<Attribute, Node> rhs, Attribute attribute) {
        Attribute newAttr = rhs.keySet().iterator().next();
        Attribute key, value;
        if (declaredVariables.contains(attribute)) {
            key = newAttr;
            value = attribute;
        } else {
            key = attribute;
            value = newAttr;
        }
        Attribute fixPoint = variableMap.get(value);
        if (fixPoint == null) {
            fixPoint = value;
        }
        variableMap.put(key, fixPoint);
    }
View Full Code Here

    }

    private LinkedHashMap<Attribute, Node> updateAVPVariables(Map<Attribute, Node> avp) {
        LinkedHashMap<Attribute, Node> newAVP = new LinkedHashMap<Attribute, Node>();
        for (Map.Entry<Attribute, Node> entry : avp.entrySet()) {
            final Attribute newAttribute = variableMap.get(entry.getKey());
            if (newAttribute != null) {
                newAVP.put(newAttribute, entry.getValue());
            } else {
                newAVP.put(entry.getKey(), entry.getValue());
            }
View Full Code Here

        if (attributeName == null) {
            returnValue.put(NULLARY_ATTRIBUTE, value);
        } else {
            NodeType type = namePosMap.get(attributeName);
            type = (type == null) ? new ObjectNodeType() : type;
            Attribute attribute = new AttributeImpl(attributeName, type);
            returnValue.put(attribute, value);
            collector.addConstraints(returnValue);
        }
        return returnValue;
    }
View Full Code Here

        avp.put(attribute, value);
    }

    private void createAttributeValuePair(NodeType type, Node anyNode, String variableName) {
        AttributeName attributeName = new VariableName(variableName);
        Attribute att = new AttributeImpl(attributeName, type);
        avp.put(att, anyNode);
    }
View Full Code Here

TOP

Related Classes of org.jrdf.query.relation.Attribute

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.