Examples of AttributeName


Examples of com.google.gxp.compiler.base.AttributeName

  /**
   * Adds the specified {@code Attribute}.
   */
  public void add(final Attribute attr) {
    AttributeName key = new AttributeName(attr.getNamespace(), attr.getName());
    if (namesToAttrs.containsKey(key)) {
      alertSink.add(new MultiValueAttributeError(forNode, attr));
    } else {
      namesToAttrs.put(key, attr);
    }
View Full Code Here

Examples of com.google.gxp.compiler.base.AttributeName

  // TODO(laurence): switch get* methods to take AttributeNames instead of
  // Namespaces and Strings?

  public Attribute getAttribute(Namespace ns, String name) {
    AttributeName key = new AttributeName(ns, name);
    used.add(key);
    return namesToAttrs.get(key);
  }
View Full Code Here

Examples of com.google.gxp.compiler.base.AttributeName

  /**
   * Adds the specified {@code Attribute}.
   */
  public void add(final Attribute attr) {
    AttributeName key = new AttributeName(attr.getNamespace(), attr.getName());
    if (namesToAttrs.containsKey(key)) {
      alertSink.add(new MultiValueAttributeError(forNode, attr));
    } else {
      namesToAttrs.put(key, attr);
    }
View Full Code Here

Examples of com.google.gxp.compiler.base.AttributeName

  // TODO(laurence): switch get* methods to take AttributeNames instead of
  // Namespaces and Strings?

  public Attribute getAttribute(Namespace ns, String name) {
    AttributeName key = new AttributeName(ns, name);
    used.add(key);
    return namesToAttrs.get(key);
  }
View Full Code Here

Examples of org.jrdf.query.relation.attributename.AttributeName

    private static final int VARIABLE_NAME = 1;

    public AttributeName entryToObject(TupleInput tupleInput) {
        final byte b = tupleInput.readByte();
        final String name = tupleInput.readString();
        AttributeName attributeName;
        switch (b) {
            case POSITION_NAME:
                attributeName = new PositionName(name);
                break;
            case VARIABLE_NAME:
View Full Code Here

Examples of org.jrdf.query.relation.attributename.AttributeName

    public Attribute entryToObject(TupleInput tupleInput) {
        final byte b = tupleInput.readByte();
        Attribute attribute;
        if (b == NORMAL_ATTRIBUTE) {
            AttributeName name = nameBinding.entryToObject(tupleInput);
            NodeType type = typeBinding.entryToObject(tupleInput);
            attribute = new AttributeImpl(name, type);
        } else if (b == NULLARY_ATTRIBUTE) {
            attribute = NullaryAttribute.NULLARY_ATTRIBUTE;
        } else {
View Full Code Here

Examples of org.jrdf.query.relation.attributename.AttributeName

    public Attribute findOneCachedAttribute(SingleConstraint constraint) {
        Set<Attribute> attributes = constraint.getHeadings();
        Map<Integer, Attribute> map = new TreeMap<Integer, Attribute>();
        for (Attribute attribute : attributes) {
            AttributeName attributeName = attribute.getAttributeName();
            if (attributeName instanceof VariableName && getCachedValues(attributeName) != null) {
                map.put(getCachedValues(attributeName).size(), attribute);
            }
        }
        if (map.isEmpty()) {
View Full Code Here

Examples of org.jrdf.query.relation.attributename.AttributeName

            }
        }
    }

    private void updateCache(EvaluatedRelation result, long time, Attribute attribute) {
        AttributeName attributeName = attribute.getAttributeName();
        Set<Node> voSet = getMatchingVOs(attribute, getTuples(result, attribute));
        Set<Node> cached = cache.get(attributeName);
        if (time > timeStamp) {
            timeStamp = time;
        }
View Full Code Here

Examples of org.jrdf.query.relation.attributename.AttributeName

        }
        return set;
    }

    private boolean matches(Set<Attribute> source, Attribute attr) {
        AttributeName name = attr.getAttributeName();
        for (Attribute attr1 : source) {
            AttributeName name1 = attr1.getAttributeName();
            if (name instanceof VariableName && name.equals(name1)) {
                return true;
            }
        }
        return false;
View Full Code Here

Examples of org.jrdf.query.relation.attributename.AttributeName

        return o1.singleAvp.equals(o2.singleAvp);
    }

    private Attribute createNewAttribute(Attribute existingAttribute,
        Map<AttributeName, ? extends NodeType> allVariables) {
        AttributeName existingAttributeName = existingAttribute.getAttributeName();
        NodeType newNodeType = allVariables.get(existingAttributeName);
        if (newNodeType == null) {
            newNodeType = existingAttribute.getType();
        }
        return new AttributeImpl(existingAttributeName, newNodeType);
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.