View Javadoc

    1   /* Generated By:JJTree: Do not edit this line. ASTDoctypeExternalId.java */
    2
    3   package net.sourceforge.pmd.jsp.ast;
    4
    5   public class ASTDoctypeExternalId extends SimpleNode {
    6
    7   /* BEGIN CUSTOM CODE */
    8
    9       /**
    10       * URI of the external entity. Cannot be null.
    11       */
    12      private String uri;
    13
    14      /**
    15       * Public ID of the external entity. This is optional.
    16       */
    17      private String publicId;
    18
    19      public boolean isHasPublicId() {
    20          return (null != publicId);
    21      }
    22
    23      /**
    24       * @return Returns the name.
    25       */
    26      public String getUri() {
    27          return uri;
    28      }
    29
    30      /**
    31       * @param name The name to set.
    32       */
    33      public void setUri(String name) {
    34          this.uri = name;
    35      }
    36
    37      /**
    38       * @return Returns the publicId (or an empty string if there is none
    39       *         for this external entity id).
    40       */
    41      public String getPublicId() {
    42          return (null == publicId ? "" : publicId);
    43      }
    44
    45      /**
    46       * @param publicId The publicId to set.
    47       */
    48      public void setPublicId(String publicId) {
    49          this.publicId = publicId;
    50      }
    51
    52      /* (non-Javadoc)
    53       * @see com.applicationengineers.pmd4jsp.ast.SimpleNode#toString(java.lang.String)
    54       */
    55      public String toString(String prefix) {
    56          return
    57                  super.toString(prefix)
    58                  + " uri=[" + uri + "] "
    59                  + (null == publicId ? "" : "publicId=[" + publicId + "] ");
    60      }
    61
    62  /* END CUSTOM CODE */
    63
    64
    65      public ASTDoctypeExternalId(int id) {
    66          super(id);
    67      }
    68
    69      public ASTDoctypeExternalId(JspParser p, int id) {
    70          super(p, id);
    71      }
    72
    73
    74      /**
    75       * Accept the visitor. *
    76       */
    77      public Object jjtAccept(JspParserVisitor visitor, Object data) {
    78          return visitor.visit(this, data);
    79      }
    80  }