Changeset 675


Ignore:
Timestamp:
09/06/10 15:33:33 (14 years ago)
Author:
oschonef
Message:
  • remove more sophisticated xs:any stuff from GeneretedBy? element in XSD
  • map Query in GeneratedBy? element to String for now
  • some minor style updates in XSD
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  
    33import javax.persistence.Column;
    44import javax.persistence.Embeddable;
     5import javax.persistence.Embedded;
     6import javax.persistence.Lob;
    57import javax.xml.bind.annotation.XmlAccessType;
    68import javax.xml.bind.annotation.XmlAccessorType;
     9import javax.xml.bind.annotation.XmlAttribute;
    710import javax.xml.bind.annotation.XmlElement;
     11import javax.xml.bind.annotation.XmlSeeAlso;
    812import javax.xml.bind.annotation.XmlType;
     13import javax.xml.bind.annotation.XmlValue;
    914
    1015@Embeddable
     
    1217@XmlType(propOrder = { "description", "query" },
    1318         namespace = "urn:x-vcr:generatedby")
     19@XmlSeeAlso(GeneratedBy.Query.class)
    1420public 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
    1549    @Column(name = "generatedby_description")
    1650    private String description;
    17     @Column(name = "generatedby_query")
    18     private String query;
     51    @Embedded
     52    private Query query;
    1953
    2054    public GeneratedBy() {
     
    3165    }
    3266
    33     public void setQuery(String query) {
     67    public void setQuery(Query query) {
    3468        this.query = query;
    3569    }
    3670
    3771    @XmlElement(name = "Query")
    38     public String getQuery() {
     72    public Query getQuery() {
    3973        return query;
    4074    }
  • VirtualCollectionRegistry/trunk/VirtualCollectionRegistry/src/main/resources/META-INF/VirtualCollection.xsd

    r556 r675  
    11<?xml version="1.0" encoding="UTF-8"?>
    22<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema"
    3   elementFormDefault="qualified">
     3  elementFormDefault="unqualified">
    44
    55  <xs:element name="VirtualCollections">
    66    <xs:complexType>
    77      <xs:sequence maxOccurs="unbounded">
    8         <xs:element ref="VirtualCollection" />
     8        <xs:element ref="VirtualCollection"/>
    99      </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"/>
    1212      <xs:attribute name="result">
    1313        <xs:simpleType>
    1414          <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"/>
    1717          </xs:restriction>
    1818        </xs:simpleType>
     
    2424    <xs:complexType>
    2525      <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"/>
    2929        <xs:element name="Type">
    3030          <xs:simpleType>
    3131            <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"/>
    3434            </xs:restriction>
    3535          </xs:simpleType>
     
    3838          <xs:complexType>
    3939            <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"/>
    4443            </xs:sequence>
    45             <xs:attribute name="ref" type="xs:IDREF" />
     44            <xs:attribute name="ref" type="xs:IDREF"/>
    4645          </xs:complexType>
    4746        </xs:element>
     
    4948          <xs:simpleType>
    5049            <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"/>
    5554              <!-- to be extended -->
    5655            </xs:restriction>
     
    6059          <xs:simpleType>
    6160            <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"/>
    6564            </xs:restriction>
    6665          </xs:simpleType>
    6766        </xs:element>
    68         <xs:element minOccurs="0" name="ReproducibilityNotice"
    69           type="xs:string" />
     67        <xs:element minOccurs="0" name="ReproducibilityNotice" type="xs:string"/>
    7068        <xs:element name="Resources">
    7169          <xs:complexType>
     
    7775                      <xs:simpleType>
    7876                        <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"/>
    8179                        </xs:restriction>
    8280                      </xs:simpleType>
     
    8482                    <xs:element name="ResourceRef">
    8583                      <xs:simpleType>
    86                         <xs:restriction base="xs:anyURI" />
     84                        <xs:restriction base="xs:anyURI"/>
    8785                      </xs:simpleType>
    8886                    </xs:element>
     
    9694          <xs:complexType>
    9795            <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">
    10198                <xs:complexType>
    102                   <xs:sequence>
    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>
    107104                </xs:complexType>
    108105              </xs:element>
Note: See TracChangeset for help on using the changeset viewer.