public EntityReferenceEventImpl(Location loc, String name) { super(loc); // note: location will be incorrect... mDecl = new EntityDeclarationEventImpl(loc, name); }
public boolean equals(Object o) { if (o == this) return true; if (o == null) return false; if (!(o instanceof EntityDeclaration)) return false; EntityDeclaration other = (EntityDeclaration) o; return stringsWithNullsEqual(getName(), other.getName()) && stringsWithNullsEqual(getBaseURI(), other.getBaseURI()) && stringsWithNullsEqual(getNotationName(), other.getNotationName()) && stringsWithNullsEqual(getPublicId(), other.getPublicId()) && stringsWithNullsEqual(getReplacementText(), other.getReplacementText()) && stringsWithNullsEqual(getSystemId(), other.getSystemId()) ; }
public void writeAsEncodedUnicode(Writer w) throws XMLStreamException { try { w.write("<!ENTITY "); w.write(getName()); w.write(" \""); // Should really quote... for now, let's not bother: String content = getReplacementText(); if (content != null) { w.write(content); } w.write("\">"); } catch (IOException ie) { throwFromIOE(ie); } }
public void writeUsing(XMLStreamWriter2 w) throws XMLStreamException { // Really shouldn't be output. But if we must... StringWriter strw = new StringWriter(); writeAsEncodedUnicode(strw); w.writeRaw(strw.toString()); }