org.exolab.castor.xml.dtd

Class GeneralEntity


public class GeneralEntity
extends java.lang.Object

Implementation of DTD General Entity declaration specification.
Version:
$Revision: 1.1.1.1 $ $Date: 2003/03/03 07:09:20 $
Author:
Alexander Totok

Constructor Summary

GeneralEntity()
Default constructor.
GeneralEntity(DTDdocument document, String name)
Constructor, setting name and owning DTD document of the general entity.

Method Summary

DTDdocument
getDocument()
Return DTD document owning this General Entity declaration.
String
getName()
Returns the name of the general entity.
String
getNotation()
Returns name of associated notation, if external entity, null otherwise.
String
getPubIdentifier()
Returns public identifier, if EXTERNAL_PUBLIC entity, null otherwise.
String
getSysIdentifier()
Returns system identifier, if EXTERNAL_PUBLIC or EXTERNAL_SYSTEM entity, null otherwise.
String
getValue()
Returns the value of the entity (replacement text) if internal entity, null otherwise.
boolean
isExternalPublic()
True if EXTERNAL_PUBLIC entity, false otherwise.
boolean
isExternalSystem()
True if EXTERNAL_SYSTEM entity, false otherwise.
boolean
isExternalUnparsed()
True if external unparsed entity, that is if external and associated notation name is specified, false otherwise.
boolean
isInternal()
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
setNDATA(String notationName)
Sets the associated notation.
void
setValue(String value)
Sets the value (replacement text) of the general entity, making it internal parsed entity.

Constructor Details

GeneralEntity

public GeneralEntity()
Default constructor.

GeneralEntity

public GeneralEntity(DTDdocument document,
                     String name)
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

getDocument

public DTDdocument getDocument()
Return DTD document owning this General Entity declaration.

getName

public String getName()
Returns the name of the general entity.

getNotation

public String getNotation()
Returns name of associated notation, if external entity, null otherwise.

getPubIdentifier

public String getPubIdentifier()
Returns public identifier, if EXTERNAL_PUBLIC entity, null otherwise.

getSysIdentifier

public String getSysIdentifier()
Returns system identifier, if EXTERNAL_PUBLIC or EXTERNAL_SYSTEM entity, null otherwise.

getValue

public String getValue()
Returns the value of the entity (replacement text) if internal entity, null otherwise.

isExternalPublic

public boolean isExternalPublic()
True if EXTERNAL_PUBLIC entity, false otherwise.

isExternalSystem

public boolean isExternalSystem()
True if EXTERNAL_SYSTEM entity, false otherwise.

isExternalUnparsed

public boolean isExternalUnparsed()
True if external unparsed entity, that is if external and associated notation name is specified, false otherwise.

isInternal

public boolean isInternal()
True if internal entity, false otherwise.

setExternalPublic

public void setExternalPublic(String pubId,
                              String sysId)
Sets the general entity to EXTERNAL_PUBLIC.
Parameters:
pubId - public identifier - must not be null.
sysId - system identifier - must not be null.

setExternalSystem

public void setExternalSystem(String sysId)
Sets the general entity to EXTERNAL_SYSTEM.
Parameters:
sysId - system identifier - must not be null.

setNDATA

public void setNDATA(String notationName)
Sets the associated notation.
Parameters:
notationName - - must not be null or equal to empty String.

setValue

public void setValue(String value)
Sets the value (replacement text) of the general entity, making it internal parsed entity.
Parameters:
value - must not be null.

Intalio Inc. (C) 1999-2003. All rights reserved http://www.intalio.com