1 16 17 package org.apache.xerces.impl.xs.util; 18 19 import org.apache.xerces.xni.XMLLocator; 20 21 29 public class SimpleLocator implements XMLLocator { 30 31 String lsid, esid; 32 int line, column; 33 int charOffset; 34 35 public SimpleLocator() { 36 } 37 38 public SimpleLocator(String lsid, String esid, int line, int column) { 39 this(lsid, esid, line, column, -1); 40 } 41 42 public void setValues(String lsid, String esid, int line, int column) { 43 setValues(lsid, esid, line, column, -1); 44 } 45 46 public SimpleLocator(String lsid, String esid, int line, int column, int offset) { 47 this.line = line; 48 this.column = column; 49 this.lsid = lsid; 50 this.esid = esid; 51 charOffset = offset; 52 } 53 54 public void setValues(String lsid, String esid, int line, int column, int offset) { 55 this.line = line; 56 this.column = column; 57 this.lsid = lsid; 58 this.esid = esid; 59 charOffset = offset; 60 } 61 62 public int getLineNumber() { 63 return line; 64 } 65 66 public int getColumnNumber() { 67 return column; 68 } 69 70 public int getCharacterOffset() { 71 return charOffset; 72 } 73 74 public String getPublicId() { 75 return null; 76 } 77 78 public String getExpandedSystemId() { 79 return esid; 80 } 81 82 public String getLiteralSystemId() { 83 return lsid; 84 } 85 86 public String getBaseSystemId() { 87 return null; 88 } 89 92 public void setColumnNumber(int col) { 93 this.column = col; 94 } 95 96 99 public void setLineNumber(int line) { 100 this.line = line; 101 } 102 103 public void setCharacterOffset(int offset) { 104 charOffset = offset; 105 } 106 107 110 public void setBaseSystemId(String systemId) {} 111 112 115 public void setExpandedSystemId(String systemId) { 116 esid = systemId; 117 } 118 119 122 public void setLiteralSystemId(String systemId) { 123 lsid = systemId; 124 } 125 126 129 public void setPublicId(String publicId) {} 130 131 137 public String getEncoding() { 138 return null; 139 } 140 141 public String getXMLVersion() { 142 return null; 143 } 144 } 145 | Popular Tags |