1 20 21 25 26 package org.ozoneDB.xml.dom; 27 28 import org.w3c.dom.*; 29 30 31 50 public final class EntityReferenceImpl extends NodeImpl implements EntityReferenceProxy { 51 52 final static long serialVersionUID = 1; 53 54 55 public short getNodeType() { 56 return this.ENTITY_REFERENCE_NODE; 57 } 58 59 60 public final void setNodeValue( String value ) { 61 throw new DOMExceptionImpl( DOMException.NO_DATA_ALLOWED_ERR, "This node type does not support values." ); 62 } 63 64 65 public final Object clone() { 66 EntityReferenceProxy clone = null; 67 try { 68 clone = (EntityReferenceProxy)database().createObject( EntityReferenceImpl.class.getName() ); 69 clone.init( _ownerDocument, getNodeName() ); 70 cloneInto( clone, true ); 71 } catch (Exception except) { 72 throw new DOMExceptionImpl( DOMExceptionImpl.PDOM_ERR, except.getMessage() ); 73 } 74 return clone; 75 } 76 77 78 public final Node cloneNode( boolean deep ) { 79 EntityReferenceProxy clone = null; 80 try { 81 clone = (EntityReferenceProxy)database().createObject( EntityReferenceImpl.class.getName() ); 82 clone.init( _ownerDocument, getNodeName() ); 83 cloneInto( clone, deep ); 84 } catch (Exception except) { 85 throw new DOMExceptionImpl( DOMExceptionImpl.PDOM_ERR, except.getMessage() ); 86 } 87 return clone; 88 } 89 90 91 public String toString() { 92 String name; 93 94 name = getNodeName(); 95 if (name.length() > 32) { 96 name = name.substring( 0, 32 ) + ".."; 97 } 98 return "Entity ref: [" + name + "]"; 99 } 100 101 102 protected final boolean supportsChildern() { 103 return true; 104 } 105 106 113 142 143 144 150 EntityReferenceImpl( DocumentImpl owner, String name ) { 151 super( owner, name, null, true ); 152 } 153 154 155 public EntityReferenceImpl() { 156 super(); 157 } 158 159 160 public void init( DocumentProxy owner, String name ) { 161 super.init( owner, name, null, true ); 162 } 163 } 164 | Popular Tags |