first commit
This commit is contained in:
@@ -0,0 +1,7 @@
|
||||
package org.apache.xerces.xni.parser;
|
||||
|
||||
public interface XMLComponentManager {
|
||||
boolean getFeature(String paramString) throws XMLConfigurationException;
|
||||
|
||||
Object getProperty(String paramString) throws XMLConfigurationException;
|
||||
}
|
@@ -0,0 +1,33 @@
|
||||
package org.apache.xerces.xni.parser;
|
||||
|
||||
import org.apache.xerces.xni.XNIException;
|
||||
|
||||
public class XMLConfigurationException extends XNIException {
|
||||
public static final short NOT_RECOGNIZED = 0;
|
||||
|
||||
public static final short NOT_SUPPORTED = 1;
|
||||
|
||||
protected short fType;
|
||||
|
||||
protected String fIdentifier;
|
||||
|
||||
public XMLConfigurationException(short type, String identifier) {
|
||||
super(identifier);
|
||||
this.fType = type;
|
||||
this.fIdentifier = identifier;
|
||||
}
|
||||
|
||||
public XMLConfigurationException(short type, String identifier, String message) {
|
||||
super(message);
|
||||
this.fType = type;
|
||||
this.fIdentifier = identifier;
|
||||
}
|
||||
|
||||
public short getType() {
|
||||
return this.fType;
|
||||
}
|
||||
|
||||
public String getIdentifier() {
|
||||
return this.fIdentifier;
|
||||
}
|
||||
}
|
@@ -0,0 +1,9 @@
|
||||
package org.apache.xerces.xni.parser;
|
||||
|
||||
import org.apache.xerces.xni.XMLDTDContentModelHandler;
|
||||
|
||||
public interface XMLDTDContentModelSource {
|
||||
XMLDTDContentModelHandler getDTDContentModelHandler();
|
||||
|
||||
void setDTDContentModelHandler(XMLDTDContentModelHandler paramXMLDTDContentModelHandler);
|
||||
}
|
9
hrmsEjb/org/apache/xerces/xni/parser/XMLDTDSource.java
Normal file
9
hrmsEjb/org/apache/xerces/xni/parser/XMLDTDSource.java
Normal file
@@ -0,0 +1,9 @@
|
||||
package org.apache.xerces.xni.parser;
|
||||
|
||||
import org.apache.xerces.xni.XMLDTDHandler;
|
||||
|
||||
public interface XMLDTDSource {
|
||||
XMLDTDHandler getDTDHandler();
|
||||
|
||||
void setDTDHandler(XMLDTDHandler paramXMLDTDHandler);
|
||||
}
|
@@ -0,0 +1,9 @@
|
||||
package org.apache.xerces.xni.parser;
|
||||
|
||||
import org.apache.xerces.xni.XMLDocumentHandler;
|
||||
|
||||
public interface XMLDocumentSource {
|
||||
XMLDocumentHandler getDocumentHandler();
|
||||
|
||||
void setDocumentHandler(XMLDocumentHandler paramXMLDocumentHandler);
|
||||
}
|
@@ -0,0 +1,9 @@
|
||||
package org.apache.xerces.xni.parser;
|
||||
|
||||
import java.io.IOException;
|
||||
import org.apache.xerces.xni.XMLResourceIdentifier;
|
||||
import org.apache.xerces.xni.XNIException;
|
||||
|
||||
public interface XMLEntityResolver {
|
||||
XMLInputSource resolveEntity(XMLResourceIdentifier paramXMLResourceIdentifier) throws XNIException, IOException;
|
||||
}
|
11
hrmsEjb/org/apache/xerces/xni/parser/XMLErrorHandler.java
Normal file
11
hrmsEjb/org/apache/xerces/xni/parser/XMLErrorHandler.java
Normal file
@@ -0,0 +1,11 @@
|
||||
package org.apache.xerces.xni.parser;
|
||||
|
||||
import org.apache.xerces.xni.XNIException;
|
||||
|
||||
public interface XMLErrorHandler {
|
||||
void error(String paramString1, String paramString2, XMLParseException paramXMLParseException) throws XNIException;
|
||||
|
||||
void fatalError(String paramString1, String paramString2, XMLParseException paramXMLParseException) throws XNIException;
|
||||
|
||||
void warning(String paramString1, String paramString2, XMLParseException paramXMLParseException) throws XNIException;
|
||||
}
|
95
hrmsEjb/org/apache/xerces/xni/parser/XMLInputSource.java
Normal file
95
hrmsEjb/org/apache/xerces/xni/parser/XMLInputSource.java
Normal file
@@ -0,0 +1,95 @@
|
||||
package org.apache.xerces.xni.parser;
|
||||
|
||||
import java.io.InputStream;
|
||||
import java.io.Reader;
|
||||
import org.apache.xerces.xni.XMLResourceIdentifier;
|
||||
|
||||
public class XMLInputSource {
|
||||
protected String fPublicId;
|
||||
|
||||
protected String fSystemId;
|
||||
|
||||
protected String fBaseSystemId;
|
||||
|
||||
protected InputStream fByteStream;
|
||||
|
||||
protected Reader fCharStream;
|
||||
|
||||
protected String fEncoding;
|
||||
|
||||
public XMLInputSource(String publicId, String systemId, String baseSystemId) {
|
||||
this.fPublicId = publicId;
|
||||
this.fSystemId = systemId;
|
||||
this.fBaseSystemId = baseSystemId;
|
||||
}
|
||||
|
||||
public XMLInputSource(XMLResourceIdentifier resourceIdentifier) {
|
||||
this.fPublicId = resourceIdentifier.getPublicId();
|
||||
this.fSystemId = resourceIdentifier.getLiteralSystemId();
|
||||
this.fBaseSystemId = resourceIdentifier.getBaseSystemId();
|
||||
}
|
||||
|
||||
public XMLInputSource(String publicId, String systemId, String baseSystemId, InputStream byteStream, String encoding) {
|
||||
this.fPublicId = publicId;
|
||||
this.fSystemId = systemId;
|
||||
this.fBaseSystemId = baseSystemId;
|
||||
this.fByteStream = byteStream;
|
||||
this.fEncoding = encoding;
|
||||
}
|
||||
|
||||
public XMLInputSource(String publicId, String systemId, String baseSystemId, Reader charStream, String encoding) {
|
||||
this.fPublicId = publicId;
|
||||
this.fSystemId = systemId;
|
||||
this.fBaseSystemId = baseSystemId;
|
||||
this.fCharStream = charStream;
|
||||
this.fEncoding = encoding;
|
||||
}
|
||||
|
||||
public void setPublicId(String publicId) {
|
||||
this.fPublicId = publicId;
|
||||
}
|
||||
|
||||
public String getPublicId() {
|
||||
return this.fPublicId;
|
||||
}
|
||||
|
||||
public void setSystemId(String systemId) {
|
||||
this.fSystemId = systemId;
|
||||
}
|
||||
|
||||
public String getSystemId() {
|
||||
return this.fSystemId;
|
||||
}
|
||||
|
||||
public void setBaseSystemId(String baseSystemId) {
|
||||
this.fBaseSystemId = baseSystemId;
|
||||
}
|
||||
|
||||
public String getBaseSystemId() {
|
||||
return this.fBaseSystemId;
|
||||
}
|
||||
|
||||
public void setByteStream(InputStream byteStream) {
|
||||
this.fByteStream = byteStream;
|
||||
}
|
||||
|
||||
public InputStream getByteStream() {
|
||||
return this.fByteStream;
|
||||
}
|
||||
|
||||
public void setCharacterStream(Reader charStream) {
|
||||
this.fCharStream = charStream;
|
||||
}
|
||||
|
||||
public Reader getCharacterStream() {
|
||||
return this.fCharStream;
|
||||
}
|
||||
|
||||
public void setEncoding(String encoding) {
|
||||
this.fEncoding = encoding;
|
||||
}
|
||||
|
||||
public String getEncoding() {
|
||||
return this.fEncoding;
|
||||
}
|
||||
}
|
96
hrmsEjb/org/apache/xerces/xni/parser/XMLParseException.java
Normal file
96
hrmsEjb/org/apache/xerces/xni/parser/XMLParseException.java
Normal file
@@ -0,0 +1,96 @@
|
||||
package org.apache.xerces.xni.parser;
|
||||
|
||||
import org.apache.xerces.xni.XMLLocator;
|
||||
import org.apache.xerces.xni.XNIException;
|
||||
|
||||
public class XMLParseException extends XNIException {
|
||||
protected String fPublicId;
|
||||
|
||||
protected String fLiteralSystemId;
|
||||
|
||||
protected String fExpandedSystemId;
|
||||
|
||||
protected String fBaseSystemId;
|
||||
|
||||
protected int fLineNumber = -1;
|
||||
|
||||
protected int fColumnNumber = -1;
|
||||
|
||||
public XMLParseException(XMLLocator locator, String message) {
|
||||
super(message);
|
||||
if (locator != null) {
|
||||
this.fPublicId = locator.getPublicId();
|
||||
this.fLiteralSystemId = locator.getLiteralSystemId();
|
||||
this.fExpandedSystemId = locator.getExpandedSystemId();
|
||||
this.fBaseSystemId = locator.getBaseSystemId();
|
||||
this.fLineNumber = locator.getLineNumber();
|
||||
this.fColumnNumber = locator.getColumnNumber();
|
||||
}
|
||||
}
|
||||
|
||||
public XMLParseException(XMLLocator locator, String message, Exception exception) {
|
||||
super(message, exception);
|
||||
this.fPublicId = locator.getPublicId();
|
||||
this.fLiteralSystemId = locator.getLiteralSystemId();
|
||||
this.fExpandedSystemId = locator.getExpandedSystemId();
|
||||
this.fBaseSystemId = locator.getBaseSystemId();
|
||||
this.fLineNumber = locator.getLineNumber();
|
||||
this.fColumnNumber = locator.getColumnNumber();
|
||||
}
|
||||
|
||||
public String getPublicId() {
|
||||
return this.fPublicId;
|
||||
}
|
||||
|
||||
public String getExpandedSystemId() {
|
||||
return this.fExpandedSystemId;
|
||||
}
|
||||
|
||||
public String getLiteralSystemId() {
|
||||
return this.fLiteralSystemId;
|
||||
}
|
||||
|
||||
public String getBaseSystemId() {
|
||||
return this.fBaseSystemId;
|
||||
}
|
||||
|
||||
public int getLineNumber() {
|
||||
return this.fLineNumber;
|
||||
}
|
||||
|
||||
public int getColumnNumber() {
|
||||
return this.fColumnNumber;
|
||||
}
|
||||
|
||||
public String toString() {
|
||||
StringBuffer str = new StringBuffer();
|
||||
if (this.fPublicId != null)
|
||||
str.append(this.fPublicId);
|
||||
str.append(':');
|
||||
if (this.fPublicId != null)
|
||||
str.append(this.fPublicId);
|
||||
str.append(':');
|
||||
if (this.fLiteralSystemId != null)
|
||||
str.append(this.fLiteralSystemId);
|
||||
str.append(':');
|
||||
if (this.fExpandedSystemId != null)
|
||||
str.append(this.fExpandedSystemId);
|
||||
str.append(':');
|
||||
if (this.fBaseSystemId != null)
|
||||
str.append(this.fBaseSystemId);
|
||||
str.append(':');
|
||||
str.append(this.fLineNumber);
|
||||
str.append(':');
|
||||
str.append(this.fColumnNumber);
|
||||
str.append(':');
|
||||
String message = getMessage();
|
||||
if (message == null) {
|
||||
Exception exception = getException();
|
||||
if (exception != null)
|
||||
message = exception.getMessage();
|
||||
}
|
||||
if (message != null)
|
||||
str.append(message);
|
||||
return str.toString();
|
||||
}
|
||||
}
|
@@ -0,0 +1,48 @@
|
||||
package org.apache.xerces.xni.parser;
|
||||
|
||||
import java.io.IOException;
|
||||
import java.util.Locale;
|
||||
import org.apache.xerces.xni.XMLDTDContentModelHandler;
|
||||
import org.apache.xerces.xni.XMLDTDHandler;
|
||||
import org.apache.xerces.xni.XMLDocumentHandler;
|
||||
import org.apache.xerces.xni.XNIException;
|
||||
|
||||
public interface XMLParserConfiguration extends XMLComponentManager {
|
||||
boolean getFeature(String paramString) throws XMLConfigurationException;
|
||||
|
||||
void setFeature(String paramString, boolean paramBoolean) throws XMLConfigurationException;
|
||||
|
||||
void addRecognizedFeatures(String[] paramArrayOfString);
|
||||
|
||||
void addRecognizedProperties(String[] paramArrayOfString);
|
||||
|
||||
Locale getLocale();
|
||||
|
||||
void setLocale(Locale paramLocale) throws XNIException;
|
||||
|
||||
XMLDTDContentModelHandler getDTDContentModelHandler();
|
||||
|
||||
void setDTDContentModelHandler(XMLDTDContentModelHandler paramXMLDTDContentModelHandler);
|
||||
|
||||
XMLDTDHandler getDTDHandler();
|
||||
|
||||
void setDTDHandler(XMLDTDHandler paramXMLDTDHandler);
|
||||
|
||||
XMLDocumentHandler getDocumentHandler();
|
||||
|
||||
void setDocumentHandler(XMLDocumentHandler paramXMLDocumentHandler);
|
||||
|
||||
XMLEntityResolver getEntityResolver();
|
||||
|
||||
void setEntityResolver(XMLEntityResolver paramXMLEntityResolver);
|
||||
|
||||
XMLErrorHandler getErrorHandler();
|
||||
|
||||
void setErrorHandler(XMLErrorHandler paramXMLErrorHandler);
|
||||
|
||||
void parse(XMLInputSource paramXMLInputSource) throws XNIException, IOException;
|
||||
|
||||
Object getProperty(String paramString) throws XMLConfigurationException;
|
||||
|
||||
void setProperty(String paramString, Object paramObject) throws XMLConfigurationException;
|
||||
}
|
Reference in New Issue
Block a user