Пример #1
0
 public void Add(Section section) {
    list.Add(section);
 }
Пример #2
0
    //public String GetContent() {
    //   return text;
    //}
    //public void SetContent(String text) {
    //   this.text = text;
    //}
 public void TestStatic() {
    Persister persister = new Persister();
    Document document = new Document("Secret Document");
    Section section = new Section("Introduction");
    Paragraph first = new Paragraph();
    Paragraph second = new Paragraph();
    Paragraph third = new Paragraph();
    first.setContent("First paragraph of document");
    second.setContent("Second paragraph in the document");
    third.setContent("Third and readonly paragraph");
    section.Add(first);
    section.Add(second);
    section.Add(third);
    document.Add(section);
    persister.write(document, System.out);
    validate(persister, document);
 }