Changeset 675
- Timestamp:
- 09/06/10 15:33:33 (14 years ago)
- Location:
- VirtualCollectionRegistry/trunk/VirtualCollectionRegistry/src/main
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
VirtualCollectionRegistry/trunk/VirtualCollectionRegistry/src/main/java/eu/clarin/cmdi/virtualcollectionregistry/model/GeneratedBy.java
r557 r675 3 3 import javax.persistence.Column; 4 4 import javax.persistence.Embeddable; 5 import javax.persistence.Embedded; 6 import javax.persistence.Lob; 5 7 import javax.xml.bind.annotation.XmlAccessType; 6 8 import javax.xml.bind.annotation.XmlAccessorType; 9 import javax.xml.bind.annotation.XmlAttribute; 7 10 import javax.xml.bind.annotation.XmlElement; 11 import javax.xml.bind.annotation.XmlSeeAlso; 8 12 import javax.xml.bind.annotation.XmlType; 13 import javax.xml.bind.annotation.XmlValue; 9 14 10 15 @Embeddable … … 12 17 @XmlType(propOrder = { "description", "query" }, 13 18 namespace = "urn:x-vcr:generatedby") 19 @XmlSeeAlso(GeneratedBy.Query.class) 14 20 public class GeneratedBy { 21 @Embeddable 22 @XmlAccessorType(XmlAccessType.NONE) 23 public static class Query { 24 @Column(name = "generatedby_query_profile") 25 @XmlAttribute(name = "profile", required = true) 26 private String profile; 27 @Column(name = "generatedby_query_value") 28 @Lob 29 @XmlValue 30 private String value; 31 32 public void setProfile(String profile) { 33 this.profile = profile; 34 } 35 36 public String getProfile() { 37 return profile; 38 } 39 40 public void setQuery(String value) { 41 this.value = value; 42 } 43 44 public String getValue() { 45 return value; 46 } 47 } // class Query 48 15 49 @Column(name = "generatedby_description") 16 50 private String description; 17 @ Column(name = "generatedby_query")18 private Stringquery;51 @Embedded 52 private Query query; 19 53 20 54 public GeneratedBy() { … … 31 65 } 32 66 33 public void setQuery( Stringquery) {67 public void setQuery(Query query) { 34 68 this.query = query; 35 69 } 36 70 37 71 @XmlElement(name = "Query") 38 public StringgetQuery() {72 public Query getQuery() { 39 73 return query; 40 74 } -
VirtualCollectionRegistry/trunk/VirtualCollectionRegistry/src/main/resources/META-INF/VirtualCollection.xsd
r556 r675 1 1 <?xml version="1.0" encoding="UTF-8"?> 2 2 <xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema" 3 elementFormDefault=" qualified">3 elementFormDefault="unqualified"> 4 4 5 5 <xs:element name="VirtualCollections"> 6 6 <xs:complexType> 7 7 <xs:sequence maxOccurs="unbounded"> 8 <xs:element ref="VirtualCollection" 8 <xs:element ref="VirtualCollection"/> 9 9 </xs:sequence> 10 <xs:attribute name="totalCount" type="xs:integer" 11 <xs:attribute name="offset" type="xs:integer" 10 <xs:attribute name="totalCount" type="xs:integer"/> 11 <xs:attribute name="offset" type="xs:integer"/> 12 12 <xs:attribute name="result"> 13 13 <xs:simpleType> 14 14 <xs:restriction base="xs:string"> 15 <xs:enumeration value="full" 16 <xs:enumeration value="partial" 15 <xs:enumeration value="full"/> 16 <xs:enumeration value="partial"/> 17 17 </xs:restriction> 18 18 </xs:simpleType> … … 24 24 <xs:complexType> 25 25 <xs:sequence> 26 <xs:element name="Name" type="xs:string" 27 <xs:element minOccurs="0" name="Description" type="xs:string" 28 <xs:element minOccurs="0" name="CreationDate" type="xs:date" 26 <xs:element name="Name" type="xs:string"/> 27 <xs:element minOccurs="0" name="Description" type="xs:string"/> 28 <xs:element minOccurs="0" name="CreationDate" type="xs:date"/> 29 29 <xs:element name="Type"> 30 30 <xs:simpleType> 31 31 <xs:restriction base="xs:string"> 32 <xs:enumeration value="extensional" 33 <xs:enumeration value="intensional" 32 <xs:enumeration value="extensional"/> 33 <xs:enumeration value="intensional"/> 34 34 </xs:restriction> 35 35 </xs:simpleType> … … 38 38 <xs:complexType> 39 39 <xs:sequence> 40 <xs:element name="Name" type="xs:string" /> 41 <xs:element minOccurs="0" name="Email" type="xs:string" /> 42 <xs:element minOccurs="0" name="Organisation" 43 type="xs:string" /> 40 <xs:element name="Name" type="xs:string"/> 41 <xs:element minOccurs="0" name="Email" type="xs:string"/> 42 <xs:element minOccurs="0" name="Organisation" type="xs:string"/> 44 43 </xs:sequence> 45 <xs:attribute name="ref" type="xs:IDREF" 44 <xs:attribute name="ref" type="xs:IDREF"/> 46 45 </xs:complexType> 47 46 </xs:element> … … 49 48 <xs:simpleType> 50 49 <xs:restriction base="xs:string"> 51 <xs:enumeration value="research" 52 <xs:enumeration value="reference" 53 <xs:enumeration value="sample" 54 <xs:enumeration value="future-use" 50 <xs:enumeration value="research"/> 51 <xs:enumeration value="reference"/> 52 <xs:enumeration value="sample"/> 53 <xs:enumeration value="future-use"/> 55 54 <!-- to be extended --> 56 55 </xs:restriction> … … 60 59 <xs:simpleType> 61 60 <xs:restriction base="xs:string"> 62 <xs:enumeration value="intended" 63 <xs:enumeration value="fluctuating" 64 <xs:enumeration value="untended" 61 <xs:enumeration value="intended"/> 62 <xs:enumeration value="fluctuating"/> 63 <xs:enumeration value="untended"/> 65 64 </xs:restriction> 66 65 </xs:simpleType> 67 66 </xs:element> 68 <xs:element minOccurs="0" name="ReproducibilityNotice" 69 type="xs:string" /> 67 <xs:element minOccurs="0" name="ReproducibilityNotice" type="xs:string"/> 70 68 <xs:element name="Resources"> 71 69 <xs:complexType> … … 77 75 <xs:simpleType> 78 76 <xs:restriction base="xs:string"> 79 <xs:enumeration value="Metadata" 80 <xs:enumeration value="Resource" 77 <xs:enumeration value="Metadata"/> 78 <xs:enumeration value="Resource"/> 81 79 </xs:restriction> 82 80 </xs:simpleType> … … 84 82 <xs:element name="ResourceRef"> 85 83 <xs:simpleType> 86 <xs:restriction base="xs:anyURI" 84 <xs:restriction base="xs:anyURI"/> 87 85 </xs:simpleType> 88 86 </xs:element> … … 96 94 <xs:complexType> 97 95 <xs:sequence> 98 <xs:element name="Description" type="xs:string" /> 99 <xs:element name="Query" maxOccurs="1" 100 minOccurs="0"> 96 <xs:element name="Description" type="xs:string"/> 97 <xs:element name="Query" minOccurs="0"> 101 98 <xs:complexType> 102 <xs:s equence>103 <xs: any namespace="##any" processContents="lax" />104 </xs:sequence>105 <xs:attribute name="profile" type="xs:string"106 use="optional" />99 <xs:simpleContent> 100 <xs:extension base="xs:string"> 101 <xs:attribute name="profile" type="xs:string" use="required"/> 102 </xs:extension> 103 </xs:simpleContent> 107 104 </xs:complexType> 108 105 </xs:element>
Note: See TracChangeset
for help on using the changeset viewer.