private static void populatePDFAFieldType(PDFAFieldType field, DefinedStructuredType structuredType) throws XmpParsingException { String fName = field.getName(); String fDescription = field.getDescription(); String fValueType = field.getValueType(); if (fName == null || fDescription == null || fValueType == null) { throw new XmpParsingException(ErrorType.RequiredProperty, "Missing field in field definition"); } try { Types fValue = Types.valueOf(fValueType); structuredType.addProperty(fName, TypeMapping.createPropertyType(fValue, Cardinality.Simple)); } catch (IllegalArgumentException e) { throw new XmpParsingException(ErrorType.NoValueType, "Type not defined : " + fValueType, e); // TODO could fValueType be a structured type ? } }
private static void populatePDFAFieldType(PDFAFieldType field, DefinedStructuredType structuredType) throws XmpParsingException { String fName = field.getName(); String fDescription = field.getDescription(); String fValueType = field.getValueType(); if (fName == null || fDescription == null || fValueType == null) { throw new XmpParsingException(ErrorType.RequiredProperty, "Missing field in field definition"); } try { Types fValue = Types.valueOf(fValueType); structuredType.addProperty(fName, TypeMapping.createPropertyType(fValue, Cardinality.Simple)); } catch (IllegalArgumentException e) { throw new XmpParsingException(ErrorType.NoValueType, "Type not defined : " + fValueType, e); // TODO could fValueType be a structured type ? } }
private static void populatePDFAFieldType(PDFAFieldType field, DefinedStructuredType structuredType) throws XmpParsingException { String fName = field.getName(); String fDescription = field.getDescription(); String fValueType = field.getValueType(); if (fName == null || fDescription == null || fValueType == null) { throw new XmpParsingException(ErrorType.RequiredProperty, "Missing field in field definition"); } try { Types fValue = Types.valueOf(fValueType); structuredType.addProperty(fName, TypeMapping.createPropertyType(fValue, Cardinality.Simple)); } catch (IllegalArgumentException e) { throw new XmpParsingException(ErrorType.NoValueType, "Type not defined : " + fValueType, e); // TODO could fValueType be a structured type ? } }