1 package net.firstpartners.nounit.snippet; 2 3 26 27 import org.jdom.Element; 28 import org.jdom.output.XMLOutputter; 29 30 31 35 abstract public class AbstractSnippet implements ISnippet { 36 37 40 protected String innerName; 41 42 45 protected String innerAccess; 46 47 48 52 public AbstractSnippet() { 53 } 54 55 60 public String toString() { 61 62 StringBuffer stringDescription = new StringBuffer (); 63 64 stringDescription.append(innerAccess); 65 stringDescription.append(" "); 66 stringDescription.append(innerName); 67 68 return stringDescription.toString(); 69 70 71 } 72 73 78 protected String toXml(Element jDomDescription) { 79 80 XMLOutputter fmt = new XMLOutputter(" ", true); 82 83 String xmlAsString = fmt.outputString(jDomDescription); 85 86 return xmlAsString; 87 88 } 89 90 } 91 92 | Popular Tags |