1 package org.catacomb.interlish.structure; 2 3 public interface ElementFactory { 4 5 // for elements that should ocntain all their context as attibutes (ie, the package) 6 Element makeStandaloneElementFor(Object obj); 7 8 9 // for elements within a known context - just get the class name and use it for the name 10 Element makeElementFor(Object obj); 11 12 13 Element makeElement(String name); 14 15 Element makeElement(String name, String body); 16 17 // in following the objects are whatever class is returned by the above two; 18 void addAttribute(Element elt, String name, String value); 19 20 21 void addAttribute(Element elt, String name, double value); 22 23 24 void addElement(Element parent, Object child); 25 26 27 28 }