1 57 58 package com.sun.org.apache.xerces.internal.impl.xs.util; 59 60 import com.sun.org.apache.xerces.internal.xni.XMLLocator; 61 62 68 public class SimpleLocator implements XMLLocator { 69 String lsid, esid; 70 int line, column; 71 72 public SimpleLocator() { 73 } 74 75 public SimpleLocator(String lsid, String esid, int line, int column) { 76 this.line = line; 77 this.column = column; 78 this.lsid = lsid; 79 this.esid = esid; 80 } 81 82 public void setValues(String lsid, String esid, int line, int column) { 83 this.line = line; 84 this.column = column; 85 this.lsid = lsid; 86 this.esid = esid; 87 } 88 89 public int getLineNumber() { 90 return line; 91 } 92 93 public int getColumnNumber() { 94 return column; 95 } 96 97 public String getPublicId() { 98 return null; 99 } 100 101 public String getExpandedSystemId() { 102 return esid; 103 } 104 105 public String getLiteralSystemId() { 106 return lsid; 107 } 108 109 public String getBaseSystemId() { 110 return null; 111 } 112 115 public void setColumnNumber(int col) { 116 this.column = col; 117 } 118 119 122 public void setLineNumber(int line) { 123 this.line = line; 124 } 125 126 129 public void setBaseSystemId(String systemId) {} 130 131 134 public void setExpandedSystemId(String systemId) { 135 esid = systemId; 136 } 137 138 141 public void setLiteralSystemId(String systemId) { 142 lsid = systemId; 143 } 144 145 148 public void setPublicId(String publicId) {} 149 150 156 public String getEncoding() { 157 return null; 158 } 159 160 } 161 | Popular Tags |