Class GeneralEntity


  • public class GeneralEntity
    extends java.lang.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 Summary

      Constructors 
      Constructor Description
      GeneralEntity()
      Default constructor.
      GeneralEntity​(DTDdocument document, java.lang.String name)
      Constructor, setting name and owning DTD document of the general entity.
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      DTDdocument getDocument()
      Return DTD document owning this General Entity declaration.
      java.lang.String getName()
      Returns the name of the general entity.
      java.lang.String getNotation()
      Returns name of associated notation, if external entity, null otherwise.
      java.lang.String getPubIdentifier()
      Returns public identifier, if EXTERNAL_PUBLIC entity, null otherwise.
      java.lang.String getSysIdentifier()
      Returns system identifier, if EXTERNAL_PUBLIC or EXTERNAL_SYSTEM entity, null otherwise.
      java.lang.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​(java.lang.String pubId, java.lang.String sysId)
      Sets the general entity to EXTERNAL_PUBLIC.
      void setExternalSystem​(java.lang.String sysId)
      Sets the general entity to EXTERNAL_SYSTEM.
      void setNDATA​(java.lang.String notationName)
      Sets the associated notation.
      void setValue​(java.lang.String value)
      Sets the value (replacement text) of the general entity, making it internal parsed entity.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • GeneralEntity

        public GeneralEntity()
        Default constructor.
      • GeneralEntity

        public GeneralEntity​(DTDdocument document,
                             java.lang.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 Detail

      • getName

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

        public void setExternalPublic​(java.lang.String pubId,
                                      java.lang.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​(java.lang.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 java.lang.String getSysIdentifier()
        Returns system identifier, if EXTERNAL_PUBLIC or EXTERNAL_SYSTEM entity, null otherwise.
      • getPubIdentifier

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

        public void setNDATA​(java.lang.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 java.lang.String getNotation()
        Returns name of associated notation, if external entity, null otherwise.