Revision 104,
1.2 KB
checked in by wojtekp, 13 years ago
(diff) |
|
-
Property svn:mime-type set to
text/plain
|
Rev | Line | |
---|
[104] | 1 | package schedframe.scheduling.plan.impl; |
---|
| 2 | |
---|
| 3 | import java.io.StringWriter; |
---|
| 4 | |
---|
| 5 | import org.exolab.castor.xml.MarshalException; |
---|
| 6 | import org.exolab.castor.xml.ValidationException; |
---|
| 7 | |
---|
| 8 | import schedframe.scheduling.plan.PropertyInterface; |
---|
| 9 | |
---|
| 10 | public class Property implements PropertyInterface<org.qcg.broker.schemas.schedulingplan.Property> { |
---|
| 11 | |
---|
| 12 | protected org.qcg.broker.schemas.schedulingplan.Property p; |
---|
| 13 | |
---|
| 14 | public Property(){ |
---|
| 15 | this.p = new org.qcg.broker.schemas.schedulingplan.Property(); |
---|
| 16 | } |
---|
| 17 | |
---|
| 18 | public Property(org.qcg.broker.schemas.schedulingplan.Property value){ |
---|
| 19 | this.p = value; |
---|
| 20 | } |
---|
| 21 | |
---|
| 22 | public String getContent() { |
---|
| 23 | return this.p.getContent(); |
---|
| 24 | } |
---|
| 25 | |
---|
| 26 | public String getName() { |
---|
| 27 | return this.p.getName(); |
---|
| 28 | } |
---|
| 29 | |
---|
| 30 | public void setContent(String content) { |
---|
| 31 | this.p.setContent(content); |
---|
| 32 | } |
---|
| 33 | |
---|
| 34 | public void setName(String name) { |
---|
| 35 | this.p.setName(name); |
---|
| 36 | } |
---|
| 37 | |
---|
| 38 | public org.qcg.broker.schemas.schedulingplan.Property getDescription() { |
---|
| 39 | return this.p; |
---|
| 40 | } |
---|
| 41 | |
---|
| 42 | public String getDocument() throws Exception { |
---|
| 43 | StringWriter writer = new StringWriter(); |
---|
| 44 | try { |
---|
| 45 | p.marshal(writer); |
---|
| 46 | } catch (MarshalException e) { |
---|
| 47 | e.printStackTrace(); |
---|
| 48 | } catch (ValidationException e) { |
---|
| 49 | e.printStackTrace(); |
---|
| 50 | } |
---|
| 51 | return writer.toString(); |
---|
| 52 | } |
---|
| 53 | |
---|
| 54 | } |
---|
Note: See
TracBrowser
for help on using the repository browser.