public static void plguiHtmlPprintAtomicObject(Stella_Object self, org.powerloom.PrintableStringWriter stream) {
    if (!(self == null)) {
      { Surrogate testValue000 = Stella_Object.safePrimaryType(self);

        if (Surrogate.subtypeOfP(testValue000, GuiServer.SGT_STELLA_LITERAL_WRAPPER)) {
          { LiteralWrapper self000 = ((LiteralWrapper)(self));

            edu.isi.ontosaurus.OntosaurusUtil.pprintLiteralWrapperForHtml(self000, stream);
          }
        }
        else if (Surrogate.subtypeOfP(testValue000, GuiServer.SGT_LOGIC_PATTERN_VARIABLE)) {
          { PatternVariable self000 = ((PatternVariable)(self));

            edu.isi.ontosaurus.OntosaurusUtil.pprintAtomicObject(self000, stream);
          }
        }
        else if (Surrogate.subtypeOfP(testValue000, GuiServer.SGT_LOGIC_SKOLEM)) {
          { Skolem self000 = ((Skolem)(self));

            if (Logic.nativeValueOf(self000) != null) {
              edu.isi.ontosaurus.OntosaurusUtil.pprintAtomicObject(Logic.nativeValueOf(self000), stream);
            }
            else if (Logic.innermostOf(self000) != null) {
              if (Logic.innermostOf(self000) == self000) {
                {
                  stream.print("<FONT COLOR='#666666'>");
                  stream.print(Native.stringDowncase(Skolem.getSkolemPrintName(self000)));
                  stream.print("</FONT>");
                }
              }
              else {
                {
                  {
                    stream.print("<FONT COLOR='#996633'>");
                    stream.print(Native.stringDowncase(Skolem.getSkolemPrintName(self000)));
                    stream.print(Logic.VALUE_OF_SEPARATOR);
                    stream.print("</FONT>");
                  }
                  edu.isi.ontosaurus.OntosaurusUtil.pprintObject(Logic.innermostOf(self000), stream);
                }
              }
            }
            else {
              stream.print(Skolem.generateSkolem(self000));
            }
          }
        }
        else if (Surrogate.subtypeOfP(testValue000, GuiServer.SGT_LOGIC_LOGIC_OBJECT)) {
          { LogicObject self000 = ((LogicObject)(self));

            if (self000.surrogateValueInverse != null) {
              GuiServer.printPlguiUrl(self000, stream);
            }
            else {
              stream.print("Unamed_Object");
            }
          }
        }
        else if (Surrogate.subtypeOfSurrogateP(testValue000)) {
          { Surrogate self000 = ((Surrogate)(self));

            if (self000.surrogateValue != null) {
              edu.isi.ontosaurus.OntosaurusUtil.pprintObject(self000.surrogateValue, stream);
            }
            else {
              stream.print(Surrogate.surrogateToSymbol(self000));
            }
          }
        }
        else if (Surrogate.subtypeOfP(testValue000, GuiServer.SGT_STELLA_GENERALIZED_SYMBOL)) {
          { GeneralizedSymbol self000 = ((GeneralizedSymbol)(self));

            Stella.writeHtmlQuotingSpecialCharacters(stream, self000.symbolName);
          }
        }
        else if (Surrogate.subtypeOfP(testValue000, GuiServer.SGT_STELLA_MODULE)) {
          { Module self000 = ((Module)(self));

            GuiServer.plguiWriteUrl(stream, ((String)(GuiServer.$PLGUI_URL_ACTION$.get())), "context", self000);
          }
        }
        else if (Surrogate.subtypeOfP(testValue000, GuiServer.SGT_STELLA_THING)) {
          { Thing self000 = ((Thing)(self));

            if (self000.surrogateValueInverse != null) {
              stream.print(self000.surrogateValueInverse.symbolName);
            }
            else {
              stream.print(self000);
            }
          }
        }
        else {
          stream.print(self);
        }
      }
    }
  }