private static void addProperties(GraphMLElement graphElement, String elementId, Map<String, KeyType> keyIdToTypeMapping, List<DataType> elementData) throws InvalidGraphException { KeyType keyType = keyIdToTypeMapping.get(eachDataElement.getKey()); if (keyType == null) { throw new InvalidGraphException("Accessing not existing attribute with key " + eachDataElement.getKey());