com.sun.xml.stream
public class XMLEntityStorage extends java.lang.Object
Modifier and Type | Field and Description |
---|---|
protected static java.lang.String |
ERROR_REPORTER
Property identifier: error reporter.
|
protected Entity.ScannedEntity |
fCurrentEntity |
protected java.util.Hashtable |
fEntities
Entities.
|
protected XMLErrorReporter |
fErrorReporter
Error reporter.
|
protected PropertyManager |
fPropertyManager |
protected boolean |
fWarnDuplicateEntityDef
warn on duplicate Entity declaration.
|
protected static java.lang.String |
WARN_ON_DUPLICATE_ENTITYDEF
Feature identifier: warn on duplicate EntityDef
|
Constructor and Description |
---|
XMLEntityStorage(PropertyManager propertyManager)
Creates a new instance of XMLEntityStorage
|
XMLEntityStorage(XMLEntityManager entityManager)
Creates a new instance of XMLEntityStorage
|
Modifier and Type | Method and Description |
---|---|
void |
addExternalEntity(java.lang.String name,
java.lang.String publicId,
java.lang.String literalSystemId,
java.lang.String baseSystemId)
Adds an external entity declaration.
|
void |
addInternalEntity(java.lang.String name,
java.lang.String text)
Adds an internal entity declaration.
|
void |
addUnparsedEntity(java.lang.String name,
java.lang.String publicId,
java.lang.String systemId,
java.lang.String baseSystemId,
java.lang.String notation)
Adds an unparsed entity declaration.
|
static java.lang.String |
expandSystemId(java.lang.String systemId)
Expands a system id and returns the system id as a URI, if
it can be expanded.
|
static java.lang.String |
expandSystemId(java.lang.String systemId,
java.lang.String baseSystemId)
Expands a system id and returns the system id as a URI, if
it can be expanded.
|
protected static java.lang.String |
fixURI(java.lang.String str)
Fixes a platform dependent filename to standard URI form.
|
java.util.Hashtable |
getDeclaredEntities()
Returns the hashtable of declared entities.
|
boolean |
isDeclaredEntity(java.lang.String entityName)
Checks whether an entity given by name is declared.
|
boolean |
isEntityDeclInExternalSubset(java.lang.String entityName)
Checks whether the declaration of an entity given by name is
// in the external subset.
|
boolean |
isExternalEntity(java.lang.String entityName)
Checks whether an entity given by name is external.
|
boolean |
isUnparsedEntity(java.lang.String entityName)
Checks whether an entity given by name is unparsed.
|
void |
reset() |
void |
reset(PropertyManager propertyManager) |
void |
reset(org.apache.xerces.xni.parser.XMLComponentManager componentManager)
Resets the component.
|
protected static final java.lang.String ERROR_REPORTER
protected static final java.lang.String WARN_ON_DUPLICATE_ENTITYDEF
protected boolean fWarnDuplicateEntityDef
protected java.util.Hashtable fEntities
protected Entity.ScannedEntity fCurrentEntity
protected XMLErrorReporter fErrorReporter
protected PropertyManager fPropertyManager
public XMLEntityStorage(PropertyManager propertyManager)
public XMLEntityStorage(XMLEntityManager entityManager)
public void reset(PropertyManager propertyManager)
public void reset()
public void reset(org.apache.xerces.xni.parser.XMLComponentManager componentManager) throws org.apache.xerces.xni.parser.XMLConfigurationException
componentManager
- The component manager.SAXException
- Thrown by component on initialization error.
For example, if a feature or property is
required for the operation of the component, the
component manager may throw a
SAXNotRecognizedException or a
SAXNotSupportedException.org.apache.xerces.xni.parser.XMLConfigurationException
public java.util.Hashtable getDeclaredEntities()
REVISIT: This should be done the "right" way by designing a better way to enumerate the declared entities. For now, this method is needed by the constructor that takes an XMLEntityManager parameter. XXX Making this method public, return all the declared entities.
public void addInternalEntity(java.lang.String name, java.lang.String text)
Note: This method ignores subsequent entity declarations.
Note: The name should be a unique symbol. The SymbolTable can be used for this purpose.
name
- The name of the entity.text
- The text of the entity.SymbolTable
public void addExternalEntity(java.lang.String name, java.lang.String publicId, java.lang.String literalSystemId, java.lang.String baseSystemId)
Note: This method ignores subsequent entity declarations.
Note: The name should be a unique symbol. The SymbolTable can be used for this purpose.
name
- The name of the entity.publicId
- The public identifier of the entity.literalSystemId
- The system identifier of the entity.baseSystemId
- The base system identifier of the entity.
This is the system identifier of the entity
where the entity being added and
is used to expand the system identifier when
the system identifier is a relative URI.
When null the system identifier of the first
external entity on the stack is used instead.SymbolTable
public boolean isExternalEntity(java.lang.String entityName)
entityName
- The name of the entity to check.public boolean isEntityDeclInExternalSubset(java.lang.String entityName)
entityName
- The name of the entity to check.public void addUnparsedEntity(java.lang.String name, java.lang.String publicId, java.lang.String systemId, java.lang.String baseSystemId, java.lang.String notation)
Note: This method ignores subsequent entity declarations.
Note: The name should be a unique symbol. The SymbolTable can be used for this purpose.
name
- The name of the entity.publicId
- The public identifier of the entity.systemId
- The system identifier of the entity.notation
- The name of the notation.SymbolTable
public boolean isUnparsedEntity(java.lang.String entityName)
entityName
- The name of the entity to check.public boolean isDeclaredEntity(java.lang.String entityName)
entityName
- The name of the entity to check.public static java.lang.String expandSystemId(java.lang.String systemId)
systemId
- The systemId to be expanded.public static java.lang.String expandSystemId(java.lang.String systemId, java.lang.String baseSystemId)
systemId
- The systemId to be expanded.protected static java.lang.String fixURI(java.lang.String str)
str
- The string to fix.Copyright ? 2002-2003 Apache XML Project. All Rights Reserved.