Package org.exolab.castor.xml.dtd
Class GeneralEntity
java.lang.Object
org.exolab.castor.xml.dtd.GeneralEntity
Implementation of DTD General Entity declaration specification.
- Version:
- $Revision$ $Date: 2003-03-03 00:05:44 -0700 (Mon, 03 Mar 2003) $
- Author:
- Alexander Totok
-
Constructor Summary
ConstructorsConstructorDescriptionDefault constructor.GeneralEntity
(DTDdocument document, String name) Constructor, setting name and owning DTD document of the general entity. -
Method Summary
Modifier and TypeMethodDescriptionReturn DTD document owning this General Entity declaration.getName()
Returns the name of the general entity.Returns name of associated notation, if external entity, null otherwise.Returns public identifier, if EXTERNAL_PUBLIC entity, null otherwise.Returns system identifier, if EXTERNAL_PUBLIC or EXTERNAL_SYSTEM entity, null otherwise.getValue()
Returns the value of the entity (replacement text) if internal entity, null otherwise.boolean
True if EXTERNAL_PUBLIC entity, false otherwise.boolean
True if EXTERNAL_SYSTEM entity, false otherwise.boolean
True if external unparsed entity, that is if external and associated notation name is specified, false otherwise.boolean
True if internal entity, false otherwise.void
setExternalPublic
(String pubId, String sysId) Sets the general entity to EXTERNAL_PUBLIC.void
setExternalSystem
(String sysId) Sets the general entity to EXTERNAL_SYSTEM.void
Sets the associated notation.void
Sets the value (replacement text) of the general entity, making it internal parsed entity.
-
Constructor Details
-
GeneralEntity
public GeneralEntity()Default constructor. -
GeneralEntity
Constructor, setting name and owning DTD document of the general entity.- Parameters:
document
- must not be null.name
- must not be null or equal to empty String.
-
-
Method Details
-
getName
Returns the name of the general entity. -
getDocument
Return DTD document owning this General Entity declaration. -
setValue
Sets the value (replacement text) of the general entity, making it internal parsed entity.- Parameters:
value
- must not be null.
-
isInternal
public boolean isInternal()True if internal entity, false otherwise. -
getValue
Returns the value of the entity (replacement text) if internal entity, null otherwise. -
setExternalPublic
-
isExternalPublic
public boolean isExternalPublic()True if EXTERNAL_PUBLIC entity, false otherwise. -
setExternalSystem
Sets the general entity to EXTERNAL_SYSTEM.- Parameters:
sysId
- system identifier - must not be null.
-
isExternalSystem
public boolean isExternalSystem()True if EXTERNAL_SYSTEM entity, false otherwise. -
getSysIdentifier
Returns system identifier, if EXTERNAL_PUBLIC or EXTERNAL_SYSTEM entity, null otherwise. -
getPubIdentifier
Returns public identifier, if EXTERNAL_PUBLIC entity, null otherwise. -
setNDATA
Sets the associated notation.- Parameters:
notationName
- - must not be null or equal to empty String.
-
isExternalUnparsed
public boolean isExternalUnparsed()True if external unparsed entity, that is if external and associated notation name is specified, false otherwise. -
getNotation
Returns name of associated notation, if external entity, null otherwise.
-