1 7 8 package org.apache.jetspeed.xml.api.jcm; 9 10 14 import java.io.Reader ; 15 import java.io.Serializable ; 16 import java.io.Writer ; 17 import org.exolab.castor.xml.*; 18 import org.exolab.castor.xml.MarshalException; 19 import org.exolab.castor.xml.ValidationException; 20 import org.xml.sax.DocumentHandler ; 21 22 26 public class Entry implements java.io.Serializable { 27 28 29 33 private java.lang.String _name; 34 35 private Image _image; 36 37 38 42 public Entry() { 43 super(); 44 } 46 47 51 53 public Image getImage() 54 { 55 return this._image; 56 } 58 60 public java.lang.String getName() 61 { 62 return this._name; 63 } 65 67 public boolean isValid() 68 { 69 try { 70 validate(); 71 } 72 catch (org.exolab.castor.xml.ValidationException vex) { 73 return false; 74 } 75 return true; 76 } 78 82 public void marshal(java.io.Writer out) 83 throws org.exolab.castor.xml.MarshalException, org.exolab.castor.xml.ValidationException 84 { 85 86 Marshaller.marshal(this, out); 87 } 89 93 public void marshal(org.xml.sax.DocumentHandler handler) 94 throws org.exolab.castor.xml.MarshalException, org.exolab.castor.xml.ValidationException 95 { 96 97 Marshaller.marshal(this, handler); 98 } 100 104 public void setImage(Image image) 105 { 106 this._image = image; 107 } 109 113 public void setName(java.lang.String name) 114 { 115 this._name = name; 116 } 118 122 public static org.apache.jetspeed.xml.api.jcm.Entry unmarshal(java.io.Reader reader) 123 throws org.exolab.castor.xml.MarshalException, org.exolab.castor.xml.ValidationException 124 { 125 return (org.apache.jetspeed.xml.api.jcm.Entry) Unmarshaller.unmarshal(org.apache.jetspeed.xml.api.jcm.Entry.class, reader); 126 } 128 130 public void validate() 131 throws org.exolab.castor.xml.ValidationException 132 { 133 org.exolab.castor.xml.Validator validator = new org.exolab.castor.xml.Validator(); 134 validator.validate(this); 135 } 137 } 138 | Popular Tags |