|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.apache.torque.generator.configuration.source.EntityReferences
public class EntityReferences
Resolves system Ids for schema files to the schema file content.
Constructor Summary | |
---|---|
EntityReferences()
|
Method Summary | |
---|---|
void |
addEntityReference(String systemId,
byte[] content)
Adds a new entity reference. |
boolean |
containsSystemId(String systemId)
Returns whether the given system id is known. |
Map<String,byte[]> |
getEntityReferences()
Returns a copy of the entity reference map. |
InputSource |
resolveEntity(String publicId,
String systemId)
An implementation of the SAX EntityResolver
interface to be called by the XML parser. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public EntityReferences()
Method Detail |
---|
public void addEntityReference(String systemId, byte[] content)
systemId
- the systemId of the entity, not null.content
- the content of the entity, not null.
NullPointerException
- if systemId or content are null.
IllegalArgumentException
- if the systemId is already defined.public boolean containsSystemId(String systemId)
systemId
- the system id to check.
public Map<String,byte[]> getEntityReferences()
public InputSource resolveEntity(String publicId, String systemId) throws IOException, SAXException
EntityResolver
interface to be called by the XML parser. If the systemId is known,
the corresponding resource from the jar is returned.
In all other cases, null is returned to indicate that the parser
should open a regular connection to the systemId URI.
resolveEntity
in interface EntityResolver
publicId
- The public identifier of the external entitysystemId
- The system identifier of the external entity
InputSource
for the entity if the
systemId is known, or null otherwise.
IOException
SAXException
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |