Task #7128
Story #2829: Structural changes to D1 Data Types schema for Version 2.0 release
Auto-generated MediaType java class doesn't reflect the xml schema definition
100%
Description
Recently Dave added a type - mediaType in the system metadata schema:
xs:annotation
xs:documentation
Value drawn from the value space of IANA Media Types ( http://www.iana.org/assignments/media-types/media-types.xhtml ). When specified, indicates the IANA Media Type (aka MIME-Type) of the object. The value should include the media type and subtype (e.g. text/csv). The mediaType value is not case sensitive.
/xs:documentation
xs:documentation
Any required media type parameters must be provided, and optional parameters may be specified. There are no explicit constraints on the name of attributes or their values, however they SHOULD conform to media type optional and required parameters as specified in the respective media type RFC.
/xs:documentation
/xs:annotation
xs:simpleContent
/xs:extension
/xs:simpleContent
/xs:complexType
It extends from the string and can have any numbers of any attributes.
Ben rebuilt the d1_common_java based on the new change. However, the new auto-generated java class MediaType only has the field string; it doesn't capture the attributes:
public class MediaType implements Serializable
{
private static final long serialVersionUID = 10000000;
private String string;
/** * Get the 'MediaType' complexType value. * * @return value */ public String getString() { return string; } /** * Set the 'MediaType' complexType value. * * @param string */ public void setString(String string) { this.string = string; }
}
The java code can be found in
https://repository.dataone.org/software/cicore/trunk/d1_common_java/src/main/java/org/dataone/service/types/v2/MediaType.java
History
#1 Updated by Jing Tao over 9 years ago
- Parent task set to #2829
#2 Updated by Ben Leinfelder over 9 years ago
- Status changed from New to Closed
- % Done changed from 0 to 100
- translation missing: en.field_remaining_hours set to 0.0
MediaType now has a name attribute and 0 or more MediaTypeProperty elements.