| 1 | |
|
| 2 | |
|
| 3 | |
|
| 4 | |
|
| 5 | |
|
| 6 | |
|
| 7 | |
|
| 8 | |
|
| 9 | |
|
| 10 | |
|
| 11 | |
|
| 12 | |
|
| 13 | |
|
| 14 | |
|
| 15 | |
|
| 16 | |
|
| 17 | |
|
| 18 | |
|
| 19 | |
package net.sourceforge.jeuclid.elements.generic; |
| 20 | |
|
| 21 | |
import org.apache.batik.dom.AbstractDOMImplementation; |
| 22 | |
import org.w3c.dom.DOMImplementation; |
| 23 | |
import org.w3c.dom.Document; |
| 24 | |
import org.w3c.dom.DocumentType; |
| 25 | |
|
| 26 | |
|
| 27 | |
|
| 28 | |
|
| 29 | |
public final class JEuclidDOMImplementation extends AbstractDOMImplementation { |
| 30 | |
|
| 31 | |
private static final long serialVersionUID = 1L; |
| 32 | |
|
| 33 | 16839 | private static final class SingletonHolder { |
| 34 | 209 | private static final JEuclidDOMImplementation INSTANCE = new JEuclidDOMImplementation(); |
| 35 | |
|
| 36 | 0 | private SingletonHolder() { |
| 37 | 0 | } |
| 38 | |
} |
| 39 | |
|
| 40 | |
|
| 41 | |
|
| 42 | |
|
| 43 | |
protected JEuclidDOMImplementation() { |
| 44 | 209 | super(); |
| 45 | 209 | } |
| 46 | |
|
| 47 | |
|
| 48 | |
public Document createDocument(final String namespaceURI, |
| 49 | |
final String qualifiedName, final DocumentType doctype) { |
| 50 | 0 | final Document result = new DocumentElement(doctype); |
| 51 | 0 | result.appendChild(result.createElementNS(namespaceURI, qualifiedName)); |
| 52 | 0 | return result; |
| 53 | |
} |
| 54 | |
|
| 55 | |
|
| 56 | |
public DocumentType createDocumentType(final String qualifiedName, |
| 57 | |
final String publicId, final String systemId) { |
| 58 | 0 | throw new UnsupportedOperationException(); |
| 59 | |
} |
| 60 | |
|
| 61 | |
|
| 62 | |
|
| 63 | |
|
| 64 | |
|
| 65 | |
|
| 66 | |
public static DOMImplementation getInstance() { |
| 67 | 16839 | return JEuclidDOMImplementation.SingletonHolder.INSTANCE; |
| 68 | |
} |
| 69 | |
} |