public static void htmlWriteUrl(org.powerloom.PrintableStringWriter stream, String action, StandardObject renamed_Object) {
    { String objecttype = null;

      { Surrogate testValue000 = Stella_Object.safePrimaryType(renamed_Object);

        if (Surrogate.subtypeOfP(testValue000, OntosaurusUtil.SGT_LOGIC_LOGIC_OBJECT)) {
          { LogicObject object000 = ((LogicObject)(renamed_Object));

            { Module writemodule = object000.homeModule();

              if (Stella_Object.isaP(((Module)(Stella.$MODULE$.get())), OntosaurusUtil.SGT_STELLA_MODULE) &&
                  ((Module)(Stella.$MODULE$.get())).allSuperContexts.memberP(writemodule)) {
                writemodule = ((Module)(Stella.$MODULE$.get()));
              }
              if (Logic.classP(object000)) {
                objecttype = "concept";
              }
              else if (Logic.relationP(object000)) {
                objecttype = "relation";
              }
              else {
                objecttype = "object";
              }
              OntosaurusUtil.htmlWriteUrlInDetail(stream, action, objecttype, writemodule.name(), Logic.objectName(object000).visibleName(true));
            }
          }
        }
        else if (Surrogate.subtypeOfP(testValue000, OntosaurusUtil.SGT_STELLA_MODULE)) {
          { Module object000 = ((Module)(renamed_Object));

            OntosaurusUtil.htmlWriteUrlInDetail(stream, action, "context", object000.name(), object000.name());
          }
        }
        else {
          Stella.STANDARD_ERROR.nativeStream.println("Don't know how to write URL for object " + renamed_Object);
        }
      }
      return;
    }
  }