1 package com.wutka.dtd;
2
3 import java.io.*;
4
5 /*** Represents an external ID in an entity declaration
6 *
7 * @author Mark Wutka
8 * @version $Revision: 1.16 $ $Date: 2002/07/19 01:20:11 $ by $Author: wutka $
9 */
10 public abstract class DTDExternalID implements DTDOutput
11 {
12 public String system;
13
14 public DTDExternalID()
15 {
16 }
17
18 /*** Writes out a declaration for this external ID */
19 public abstract void write(PrintWriter out)
20 throws IOException;
21
22 public boolean equals(Object ob)
23 {
24 if (ob == this) return true;
25 if (!(ob instanceof DTDExternalID)) return false;
26
27 DTDExternalID other = (DTDExternalID) ob;
28
29 if (system == null)
30 {
31 if (other.system != null) return false;
32 }
33 else
34 {
35 if (!system.equals(other.system)) return false;
36 }
37
38 return true;
39 }
40
41 /*** Sets the system ID */
42 public void setSystem(String aSystem)
43 {
44 system = aSystem;
45 }
46
47 /*** Retrieves the system ID */
48 public String getSystem()
49 {
50 return system;
51 }
52 }