2 * Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
3 * Copyright (C) 2010 - Calixte DENIZET
5 * This file must be used under the terms of the CeCILL.
6 * This source file is licensed as described in the file COPYING, which
7 * you should have received as part of this distribution. The terms
8 * are also available at
9 * http://www.cecill.info/licences/Licence_CeCILL_V2-en.txt
13 package org.scilab.modules.helptools;
17 public class DocbookElement {
19 private Map<String, String> attributes;
21 private StringBuilder contents;
26 * @param name the tag name
27 * @param attributes the attributes and its values
29 protected DocbookElement(String name, String uri, Map attributes) {
31 this.attributes = attributes;
33 contents = new StringBuilder();
37 * @return a new DocbookElement
39 public DocbookElement getNewInstance(String name, String uri, Map attributes) {
40 return new DocbookElement(name, uri, attributes);
44 * @return the tag name
46 public String getName() {
53 public String getURI() {
58 * @return the attributes
60 public Map<String, String> getAttributes() {
65 * @return the buffer used to add contents of the tag
67 public StringBuilder getStringBuilder() {
72 * @param the buffer to use
74 public void setStringBuilder(StringBuilder buf) {
79 * This method can be used to store other things...
80 * and it should be override since it does nothing...
81 * I created it to handle the case where the converter has two String (or more)
82 * to generate with the same data.
83 * @param obj the Object to append.
85 public void append(Object obj) { }
88 * This method can be used to get what it has been stored with append
96 * Add a parent to retrieve its contents
97 * @param elem the parent
99 public void setParent(DocbookElement elem) { }
102 * @return the parent element
104 public DocbookElement getParent() {