Class GeneralEntity

java.lang.Object
org.exolab.castor.xml.dtd.GeneralEntity

public class GeneralEntity extends Object
Implementation of DTD General Entity declaration specification.
Version:
$Revision: 5951 $ $Date: 2003-03-03 00:05:44 -0700 (Mon, 03 Mar 2003) $
Author:
Alexander Totok
  • 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

    • getName

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

      public DTDdocument getDocument()
      Return DTD document owning this General Entity declaration.
    • 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.
    • isInternal

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

      public String getValue()
      Returns the value of the entity (replacement text) if internal entity, null 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.
    • isExternalPublic

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

      public void setExternalSystem(String sysId)
      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

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

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

      public void setNDATA(String notationName)
      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

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