Example #1
0
  public void addPropertiesForEdge(InstancePropertyMap instancePropertyMap) {
    if (instancePropertyMap == null) {
      throw new IllegalArgumentException();
    }
    if (_edgeInstances.containsKey(instancePropertyMap.getId())) {
      // property already set for this edge
      throw new IllegalArgumentException();
    }

    _edgeInstances.put(instancePropertyMap.getId(), instancePropertyMap);
  }
Example #2
0
  public void addPropertiesForVertex(InstancePropertyMap instancePropertyMap) {
    if (instancePropertyMap == null) {
      throw new IllegalArgumentException();
    }
    if (_vertexInstances.containsKey(instancePropertyMap.getId())) {
      // property already set for this vertex
      throw new IllegalArgumentException();
    }

    assert (_template.containsVertex(instancePropertyMap.getId()));

    _vertexInstances.put(instancePropertyMap.getId(), instancePropertyMap);
  }