public class XMLEntityStorage extends Object
| Modifier and Type | Field and Description |
|---|---|
protected static String |
ERROR_REPORTER
Property identifier: error reporter.
|
protected Entity.ScannedEntity |
fCurrentEntity |
protected Hashtable |
fEntities
Entities.
|
protected XMLErrorReporter |
fErrorReporter
Error reporter.
|
protected boolean |
fInExternalSubset |
protected PropertyManager |
fPropertyManager |
protected boolean |
fWarnDuplicateEntityDef
warn on duplicate Entity declaration.
|
protected static 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(String name,
String publicId,
String literalSystemId,
String baseSystemId)
Adds an external entity declaration.
|
void |
addInternalEntity(String name,
String text)
Adds an internal entity declaration.
|
void |
addUnparsedEntity(String name,
String publicId,
String systemId,
String baseSystemId,
String notation)
Adds an unparsed entity declaration.
|
void |
endExternalSubset() |
static String |
expandSystemId(String systemId)
Expands a system id and returns the system id as a URI, if
it can be expanded.
|
static String |
expandSystemId(String systemId,
String baseSystemId)
Expands a system id and returns the system id as a URI, if
it can be expanded.
|
protected static String |
fixURI(String str)
Fixes a platform dependent filename to standard URI form.
|
Entity |
getEntity(String name)
Returns entity declaration.
|
Enumeration |
getEntityKeys() |
int |
getEntitySize() |
boolean |
hasEntities() |
boolean |
isDeclaredEntity(String entityName)
Checks whether an entity given by name is declared.
|
boolean |
isEntityDeclInExternalSubset(String entityName)
Checks whether the declaration of an entity given by name is
// in the external subset.
|
boolean |
isExternalEntity(String entityName)
Checks whether an entity given by name is external.
|
boolean |
isUnparsedEntity(String entityName)
Checks whether an entity given by name is unparsed.
|
void |
reset() |
void |
reset(PropertyManager propertyManager) |
void |
reset(XMLComponentManager componentManager)
Resets the component.
|
void |
startExternalSubset() |
protected static final String ERROR_REPORTER
protected static final String WARN_ON_DUPLICATE_ENTITYDEF
protected boolean fWarnDuplicateEntityDef
protected Hashtable fEntities
protected Entity.ScannedEntity fCurrentEntity
protected XMLErrorReporter fErrorReporter
protected PropertyManager fPropertyManager
protected boolean fInExternalSubset
public XMLEntityStorage(PropertyManager propertyManager)
public XMLEntityStorage(XMLEntityManager entityManager)
public void reset(PropertyManager propertyManager)
public void reset()
public void reset(XMLComponentManager componentManager) throws 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.XMLConfigurationExceptionpublic Entity getEntity(String name)
name - The name of the entity.SymbolTablepublic boolean hasEntities()
public int getEntitySize()
public Enumeration getEntityKeys()
public void addInternalEntity(String name, 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.SymbolTablepublic void addExternalEntity(String name, String publicId, String literalSystemId, 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.SymbolTablepublic boolean isExternalEntity(String entityName)
entityName - The name of the entity to check.public boolean isEntityDeclInExternalSubset(String entityName)
entityName - The name of the entity to check.public void addUnparsedEntity(String name, String publicId, String systemId, String baseSystemId, 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.SymbolTablepublic boolean isUnparsedEntity(String entityName)
entityName - The name of the entity to check.public boolean isDeclaredEntity(String entityName)
entityName - The name of the entity to check.public static String expandSystemId(String systemId)
systemId - The systemId to be expanded.public static String expandSystemId(String systemId, String baseSystemId)
systemId - The systemId to be expanded.protected static String fixURI(String str)
str - The string to fix.public void startExternalSubset()
public void endExternalSubset()
Copyright © 2018–2021 mhoffrogge. All rights reserved.