Advertisement
Guest User

Untitled

a guest
Oct 21st, 2014
143
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.42 KB | None | 0 0
  1. <xsd:complexType name="Person">
  2. <xsd:annotation>
  3. <xsd:appinfo>
  4. <jxb:property name="car">
  5. <jxb:baseType name="com.example.Car"/>
  6. </jxb:property>
  7. </xsd:appinfo>
  8. </xsd:annotation>
  9. <xsd:attribute name="car" type="xsd:IDREF"/>
  10. </xsd:complexType>
  11. <xsd:complexType name="Car">
  12. <xsd:attribute name="id" type="xsd:ID"/>
  13. </xsd:complexType>
  14.  
  15. @XmlAccessorType(XmlAccessType.FIELD)
  16. @XmlType(name = "Person")
  17. public class Person {
  18. @XmlAttribute(name = "car")
  19. @XmlIDREF
  20. @XmlSchemaType(name = "IDREF")
  21. protected Object car;
  22.  
  23. public Object getCar() {
  24. return car;
  25. }
  26. public void setCar(Object value) {
  27. this.car = value;
  28. }
  29. }
  30.  
  31. @XmlAccessorType(XmlAccessType.FIELD)
  32. @XmlType(name = "Car")
  33. public class Car {
  34. @XmlAttribute(name = "id")
  35. @XmlJavaTypeAdapter(CollapsedStringAdapter.class)
  36. @XmlID
  37. @XmlSchemaType(name = "ID")
  38. protected String id;
  39.  
  40. public String getId() {
  41. return id;
  42. }
  43. public void setId(String value) {
  44. this.id = value;
  45. }
  46. }
  47.  
  48. <xs:attribute name="idRef" type="xs:IDREF">
  49. <xs:annotation>
  50. <xs:appinfo>
  51. <jaxb:property>
  52. <jaxb:baseType name="PractitionerType"/>
  53. </jaxb:property>
  54. </xs:appinfo>
  55. </xs:annotation>
  56. </xs:attribute>
  57.  
  58. @XmlAttribute(name = "idRef")
  59. @XmlIDREF
  60. @XmlSchemaType(name = "IDREF")
  61. protected PractitionerType idRef;
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement