1 package net.sf.saxon.instruct; 2 import net.sf.saxon.om.NamespaceResolver; 3 import net.sf.saxon.trace.InstructionInfo; 4 import net.sf.saxon.trace.InstructionInfoProvider; 5 import net.sf.saxon.trace.Location; 6 7 import java.io.Serializable ; 8 import java.util.HashMap ; 9 import java.util.Iterator ; 10 11 14 15 public final class InstructionDetails implements InstructionInfo, InstructionInfoProvider, Serializable { 16 17 private int constructType = Location.UNCLASSIFIED; 18 private String systemId = null; 19 private int lineNumber = -1; 20 private int columnNumber = -1; 21 private int objectNameCode = -1; 22 private NamespaceResolver namespaceResolver; 23 private HashMap properties = new HashMap (5); 24 25 public InstructionDetails() {} 26 27 30 31 public void setConstructType(int type) { 32 constructType = type; 33 } 34 35 38 public int getConstructType() { 39 return constructType; 40 } 41 42 46 47 public void setNamespaceResolver(NamespaceResolver resolver) { 48 namespaceResolver = resolver; 49 } 50 51 55 56 public NamespaceResolver getNamespaceResolver() { 57 return namespaceResolver; 58 } 59 60 64 65 public void setSystemId(String systemId) { 66 this.systemId = systemId; 67 } 68 69 73 74 public String getSystemId() { 75 return systemId; 76 } 77 78 82 83 public void setLineNumber(int lineNumber) { 84 this.lineNumber = lineNumber; 85 } 86 87 91 92 public int getLineNumber() { 93 return lineNumber; 94 } 95 96 100 101 public void setObjectNameCode(int nameCode) { 102 objectNameCode = nameCode; 103 } 104 105 109 110 public int getObjectNameCode() { 111 return objectNameCode; 112 } 113 114 117 118 public void setProperty(String name, Object value) { 119 properties.put(name, value); 120 } 121 122 125 126 public Object getProperty(String name) { 127 return properties.get(name); 128 } 129 130 135 136 public Iterator getProperties() { 137 return properties.keySet().iterator(); 138 } 139 140 146 147 public String getPublicId() { 148 return null; 149 } 150 151 154 155 public void setColumnNumber(int column) { 156 columnNumber = column; 157 } 158 159 163 164 public int getColumnNumber() { 165 return columnNumber; 166 } 167 168 171 172 185 189 190 public InstructionInfo getInstructionInfo() { 191 return this; 192 } 193 194 public String getSystemId(int locationId) { 195 return getSystemId(); 196 } 197 198 public int getLineNumber(int locationId) { 199 return getLineNumber(); 200 } 201 } 202 203 | Popular Tags |