return false; } else if (!fieldType.equals(other.fieldType)) { return false;
/** * Extracts field types declared inline in a record type. An inline definition is recognized by the * presence of a valueType attribute on the field. Found field types are added to the passed map after * checking for conflicting definitions. */ private void extractFieldTypesFromRecordType(JsonNode node, Map<QName, FieldType> fieldTypes) throws RepositoryException, InterruptedException, JsonFormatException, ImportException { if (node.has("fields")) { ArrayNode fields = getArray(node, "fields"); for (int i = 0; i < fields.size(); i++) { JsonNode field = fields.get(i); if (field.has("valueType")) { FieldType fieldType = parseFieldType(field); if (fieldTypes.containsKey(fieldType.getName())) { FieldType prevFieldType = fieldTypes.get(fieldType.getName()); if (!fieldType.equals(prevFieldType)) { throw new ImportException("Found conflicting definitions of a field type in two record" + " types, field types: " + fieldType + " and " + prevFieldType); } } else { fieldTypes.put(fieldType.getName(), fieldType); } } } } }