/** determines object type based on first type attribute it finds */
  public ObjectType getType() {
    for (RpslAttribute attribute : attributes) {
      final ObjectType objectType = ObjectType.getByNameOrNull(attribute.getKey());
      if (objectType != null) {
        return objectType;
      }
    }

    throw new IllegalStateException("No type attribute found");
  }