1 56 57 package org.jdom.contrib.ids; 58 59 import org.jdom.Attribute; 60 import org.jdom.Document; 61 import org.jdom.DocType; 62 import org.jdom.Element; 63 import org.jdom.Namespace; 64 import org.jdom.DefaultJDOMFactory; 65 66 95 public class IdFactory extends DefaultJDOMFactory { 96 97 100 public IdFactory() { 101 super(); 102 } 103 104 106 public Attribute attribute(String name, String value, Namespace namespace) { 107 return new IdAttribute(name, value, namespace); 108 } 109 110 public Attribute attribute(String name, String value, 111 int type, Namespace namespace) { 112 return new IdAttribute(name, value, type, namespace); 113 } 114 115 public Attribute attribute(String name, String value) { 116 return new IdAttribute(name, value); 117 } 118 119 public Attribute attribute(String name, String value, int type) { 120 return new IdAttribute(name, value, type); 121 } 122 123 public Document document(Element rootElement, DocType docType) { 124 return new IdDocument(rootElement, docType); 125 } 126 public Document document(Element rootElement) { 127 return new IdDocument(rootElement); 128 } 129 130 public Element element(String name, Namespace namespace) { 131 return new IdElement(name, namespace); 132 } 133 public Element element(String name) { 134 return new IdElement(name); 135 } 136 public Element element(String name, String uri) { 137 return new IdElement(name, uri); 138 } 139 public Element element(String name, String prefix, String uri) { 140 return new IdElement(name, prefix, uri); 141 } 142 } 143 144 | Popular Tags |