public static void STARTUP_XML_SCHEMA_INSTANCE() {
    {
      Object OLD_$MODULE$_000 = Stella.$MODULE$.get();
      Object OLD_$CONTEXT$_000 = Stella.$CONTEXT$.get();

      try {
        Native.setSpecial(
            Stella.$MODULE$,
            Stella.getStellaModule("/STELLA/XML-OBJECTS/XSI", Stella.$STARTUP_TIME_PHASE$ > 1));
        Native.setSpecial(Stella.$CONTEXT$, ((Module) (Stella.$MODULE$.get())));
        if (Stella.currentStartupTimePhaseP(2)) {
          Xsi.SYM_XSI_STARTUP_XML_SCHEMA_INSTANCE =
              ((Symbol)
                  (GeneralizedSymbol.internRigidSymbolWrtModule(
                      "STARTUP-XML-SCHEMA-INSTANCE", null, 0)));
        }
        if (Stella.currentStartupTimePhaseP(6)) {
          Stella.finalizeClasses();
        }
        if (Stella.currentStartupTimePhaseP(7)) {
          Stella.defineFunctionObject(
              "STARTUP-XML-SCHEMA-INSTANCE",
              "(DEFUN STARTUP-XML-SCHEMA-INSTANCE () :PUBLIC? TRUE)",
              Native.find_java_method(
                  "edu.isi.webtools.objects.xmlschemainstance._StartupXmlSchemaInstance",
                  "STARTUP_XML_SCHEMA_INSTANCE",
                  new java.lang.Class[] {}),
              null);
          {
            MethodSlot function = Symbol.lookupFunction(Xsi.SYM_XSI_STARTUP_XML_SCHEMA_INSTANCE);

            KeyValueList.setDynamicSlotValue(
                function.dynamicSlots,
                edu.isi.webtools.http.Http.SYM_STELLA_METHOD_STARTUP_CLASSNAME,
                StringWrapper.wrapString("_StartupXmlSchemaInstance"),
                Stella.NULL_STRING_WRAPPER);
          }
        }
        if (Stella.currentStartupTimePhaseP(8)) {
          Stella.finalizeSlots();
          Stella.cleanupUnfinalizedClasses();
        }
        if (Stella.currentStartupTimePhaseP(9)) {
          Stella_Object.inModule(
              ((StringWrapper) (Stella_Object.copyConsTree(StringWrapper.wrapString("XSI")))));
          XmlObjects.$NAMESPACE_PREFIX_URI_TABLE$.insertAt(
              StringWrapper.wrapString("XSI"),
              StringWrapper.wrapString("http://www.w3.org/2001/XMLSchema-instance"));
          XmlObjects.$NAMESPACE_URI_PREFIX_TABLE$.insertAt(
              StringWrapper.wrapString("http://www.w3.org/2001/XMLSchema-instance"),
              StringWrapper.wrapString("XSI"));
        }

      } finally {
        Stella.$CONTEXT$.set(OLD_$CONTEXT$_000);
        Stella.$MODULE$.set(OLD_$MODULE$_000);
      }
    }
  }
Esempio n. 2
0
  public boolean vizAllowedObjectP(Stella_Object renamed_Object) {
    {
      VizInfo self = this;

      return (((self.allowedObjects == null)
          ? (!self.vizExcludedModuleP(renamed_Object.homeModule()))
          : self.allowedObjects.memberP(renamed_Object)));
    }
  }
Esempio n. 3
0
  public void propagateFramePartialTruth(ControlFrame target) {
    {
      PartialMatchFrame source = this;

      {
        PartialMatchFrame targetpmf = target.partialMatchFrame;
        boolean flippolarityP = !(source.controlFrame.reversePolarityP == target.reversePolarityP);

        if (targetpmf == null) {
          if (flippolarityP) {
            targetpmf =
                ((PartialMatchFrame)
                    (Surrogate.createObject(
                        source.primaryType(),
                        Stella_Object.cons(
                            Logic.KWD_CONTROL_FRAME,
                            Stella_Object.cons(
                                target,
                                Stella_Object.cons(
                                    Logic.KWD_KIND,
                                    Stella_Object.cons(target.state, Stella.NIL)))))));
            targetpmf.parent = source.parent;
            targetpmf.child = source;
          } else {
            targetpmf = source;
          }
          target.partialMatchFrame = targetpmf;
        }
        if (flippolarityP) {
          targetpmf.positiveScore = 0 - source.positiveScore;
          targetpmf.negativeScore = source.positiveScore;
        } else {
          targetpmf.positiveScore = source.positiveScore;
          targetpmf.negativeScore = source.negativeScore;
        }
        KeyValueList.setDynamicSlotValue(
            ((QueryIterator) (Logic.$QUERYITERATOR$.get())).dynamicSlots,
            Logic.SYM_LOGIC_LATEST_POSITIVE_SCORE,
            FloatWrapper.wrapFloat(targetpmf.positiveScore),
            Stella.NULL_FLOAT_WRAPPER);
      }
    }
  }
Esempio n. 4
0
  public void vizExportConcepts(Module module) {
    {
      VizInfo self = this;

      {
        Stella_Object concept = null;
        edu.isi.powerloom.PlIterator iter000 =
            edu.isi.powerloom.PLI.getConceptInstances(
                ((LogicObject) (Logic.getInstance(OntosaurusUtil.SGT_PL_KERNEL_KB_CONCEPT))),
                module,
                null);

        while (iter000.nextP()) {
          concept = iter000.value;
          if (Surrogate.subtypeOfP(
              Stella_Object.safePrimaryType(concept), OntosaurusUtil.SGT_LOGIC_LOGIC_OBJECT)) {
            {
              LogicObject concept000 = ((LogicObject) (concept));

              if ((concept000.homeModule() == module) && self.vizAllowedObjectP(concept000)) {
                self.vizExportConcept(concept000, module);
              }
            }
          } else {
            {
              OutputStringStream stream000 = OutputStringStream.newOutputStringStream();

              stream000.nativeStream.print(
                  "viz-export-concepts: concept not handled: `" + concept + "'");
              throw ((StellaException)
                  (StellaException.newStellaException(stream000.theStringReader())
                      .fillInStackTrace()));
            }
          }
        }
      }
    }
  }
  public static void startupControlPanelScript() {
    {
      Object old$Module$000 = Stella.$MODULE$.get();
      Object old$Context$000 = Stella.$CONTEXT$.get();

      try {
        Native.setSpecial(
            Stella.$MODULE$,
            Stella.getStellaModule("/ONTOSAURUS", Stella.$STARTUP_TIME_PHASE$ > 1));
        Native.setSpecial(Stella.$CONTEXT$, ((Module) (Stella.$MODULE$.get())));
        if (Stella.currentStartupTimePhaseP(2)) {
          OntosaurusUtil.SYM_ONTOSAURUS_STARTUP_CONTROL_PANEL_SCRIPT =
              ((Symbol)
                  (GeneralizedSymbol.internRigidSymbolWrtModule(
                      "STARTUP-CONTROL-PANEL-SCRIPT", null, 0)));
        }
        if (Stella.currentStartupTimePhaseP(6)) {
          Stella.finalizeClasses();
        }
        if (Stella.currentStartupTimePhaseP(7)) {
          Stella.defineFunctionObject(
              "WRITE-CONTROL-PANEL-SCRIPT",
              "(DEFUN WRITE-CONTROL-PANEL-SCRIPT ((STREAM NATIVE-OUTPUT-STREAM)))",
              Native.find_java_method(
                  "edu.isi.ontosaurus.OntosaurusUtil",
                  "writeControlPanelScript",
                  new java.lang.Class[] {Native.find_java_class("java.io.PrintStream")}),
              null);
          Stella.defineFunctionObject(
              "STARTUP-CONTROL-PANEL-SCRIPT",
              "(DEFUN STARTUP-CONTROL-PANEL-SCRIPT () :PUBLIC? TRUE)",
              Native.find_java_method(
                  "edu.isi.ontosaurus._StartupControlPanelScript",
                  "startupControlPanelScript",
                  new java.lang.Class[] {}),
              null);
          {
            MethodSlot function =
                Symbol.lookupFunction(OntosaurusUtil.SYM_ONTOSAURUS_STARTUP_CONTROL_PANEL_SCRIPT);

            KeyValueList.setDynamicSlotValue(
                function.dynamicSlots,
                OntosaurusUtil.SYM_STELLA_METHOD_STARTUP_CLASSNAME,
                StringWrapper.wrapString("_StartupControlPanelScript"),
                Stella.NULL_STRING_WRAPPER);
          }
        }
        if (Stella.currentStartupTimePhaseP(8)) {
          Stella.finalizeSlots();
          Stella.cleanupUnfinalizedClasses();
        }
        if (Stella.currentStartupTimePhaseP(9)) {
          Stella_Object.inModule(
              ((StringWrapper)
                  (Stella_Object.copyConsTree(StringWrapper.wrapString("ONTOSAURUS")))));
        }

      } finally {
        Stella.$CONTEXT$.set(old$Context$000);
        Stella.$MODULE$.set(old$Module$000);
      }
    }
  }
  public static void startupHttpServerImpl() {
    {
      Object old$Module$000 = Stella.$MODULE$.get();
      Object old$Context$000 = Stella.$CONTEXT$.get();

      try {
        Native.setSpecial(
            Stella.$MODULE$,
            Stella.getStellaModule("/HTTP/TOMCAT", Stella.$STARTUP_TIME_PHASE$ > 1));
        Native.setSpecial(Stella.$CONTEXT$, ((Module) (Stella.$MODULE$.get())));
        if (Stella.currentStartupTimePhaseP(2)) {
          Tomcat.SGT_TOMCAT_HTTP_SERVER_TOMCAT =
              ((Surrogate)
                  (GeneralizedSymbol.internRigidSymbolWrtModule("HTTP-SERVER-TOMCAT", null, 1)));
          Tomcat.KWD_OK = ((Keyword) (GeneralizedSymbol.internRigidSymbolWrtModule("OK", null, 2)));
          Tomcat.SGT_TOMCAT_HTTP_EXCHANGE_TOMCAT =
              ((Surrogate)
                  (GeneralizedSymbol.internRigidSymbolWrtModule("HTTP-EXCHANGE-TOMCAT", null, 1)));
          Tomcat.SYM_TOMCAT_RESPONSE_CODE =
              ((Symbol) (GeneralizedSymbol.internRigidSymbolWrtModule("RESPONSE-CODE", null, 0)));
          Tomcat.SYM_TOMCAT_HANDLER_OPTIONS =
              ((Symbol) (GeneralizedSymbol.internRigidSymbolWrtModule("HANDLER-OPTIONS", null, 0)));
          Tomcat.KWD_BLOCK =
              ((Keyword) (GeneralizedSymbol.internRigidSymbolWrtModule("BLOCK", null, 2)));
          Tomcat.SGT_STELLA_PROPERTY_LIST =
              ((Surrogate)
                  (GeneralizedSymbol.internRigidSymbolWrtModule(
                      "PROPERTY-LIST", Stella.getStellaModule("/STELLA", true), 1)));
          Tomcat.KWD_PATH =
              ((Keyword) (GeneralizedSymbol.internRigidSymbolWrtModule("PATH", null, 2)));
          Tomcat.KWD_HANDLER_TYPE =
              ((Keyword) (GeneralizedSymbol.internRigidSymbolWrtModule("HANDLER-TYPE", null, 2)));
          Tomcat.KWD_ERROR =
              ((Keyword) (GeneralizedSymbol.internRigidSymbolWrtModule("ERROR", null, 2)));
          Tomcat.KWD_HANDLER =
              ((Keyword) (GeneralizedSymbol.internRigidSymbolWrtModule("HANDLER", null, 2)));
          Tomcat.KWD_FILE =
              ((Keyword) (GeneralizedSymbol.internRigidSymbolWrtModule("FILE", null, 2)));
          Tomcat.KWD_DIRECTORY =
              ((Keyword) (GeneralizedSymbol.internRigidSymbolWrtModule("DIRECTORY", null, 2)));
          Tomcat.KWD_CONTENT_TYPE =
              ((Keyword) (GeneralizedSymbol.internRigidSymbolWrtModule("CONTENT-TYPE", null, 2)));
          Tomcat.KWD_HTML =
              ((Keyword) (GeneralizedSymbol.internRigidSymbolWrtModule("HTML", null, 2)));
          Tomcat.SYM_TOMCAT_STARTUP_HTTP_SERVER_IMPL =
              ((Symbol)
                  (GeneralizedSymbol.internRigidSymbolWrtModule(
                      "STARTUP-HTTP-SERVER-IMPL", null, 0)));
          Tomcat.SYM_STELLA_METHOD_STARTUP_CLASSNAME =
              ((Symbol)
                  (GeneralizedSymbol.internRigidSymbolWrtModule(
                      "METHOD-STARTUP-CLASSNAME", Stella.getStellaModule("/STELLA", true), 0)));
        }
        if (Stella.currentStartupTimePhaseP(5)) {
          {
            Stella_Class renamed_Class =
                Stella.defineClassFromStringifiedSource(
                    "HTTP-SERVER-TOMCAT",
                    "(DEFCLASS HTTP-SERVER-TOMCAT (HTTP-SERVER) :PUBLIC? TRUE)");

            renamed_Class.classConstructorCode =
                Native.find_java_method(
                    "edu.isi.webtools.http.tomcat.HttpServerTomcat",
                    "newHttpServerTomcat",
                    new java.lang.Class[] {});
          }
          Stella.defineClassFromStringifiedSource(
              "NATIVE-HTTP-SERVLET-REQUEST",
              "(DEFCLASS NATIVE-HTTP-SERVLET-REQUEST () :JAVA-NATIVE-TYPE \"javax.servlet.http.HttpServletRequest\")");
          Stella.defineClassFromStringifiedSource(
              "NATIVE-HTTP-SERVLET-RESPONSE",
              "(DEFCLASS NATIVE-HTTP-SERVLET-RESPONSE () :JAVA-NATIVE-TYPE \"javax.servlet.http.HttpServletResponse\")");
          {
            Stella_Class renamed_Class =
                Stella.defineClassFromStringifiedSource(
                    "HTTP-EXCHANGE-TOMCAT",
                    "(DEFCLASS HTTP-EXCHANGE-TOMCAT (HTTP-EXCHANGE) :SLOTS ((NATIVE-REQUEST :TYPE NATIVE-HTTP-SERVLET-REQUEST) (NATIVE-RESPONSE :TYPE NATIVE-HTTP-SERVLET-RESPONSE) (RESPONSE-CODE :TYPE INTEGER :INITIALLY (GET-HTTP-RESPONSE-CODE :OK NULL)) (REPLY-STREAM :TYPE NATIVE-OUTPUT-STREAM) (HANDLER-OPTIONS :TYPE PROPERTY-LIST)))");

            renamed_Class.classConstructorCode =
                Native.find_java_method(
                    "edu.isi.webtools.http.tomcat.HttpExchangeTomcat",
                    "newHttpExchangeTomcat",
                    new java.lang.Class[] {});
            renamed_Class.classSlotAccessorCode =
                Native.find_java_method(
                    "edu.isi.webtools.http.tomcat.HttpExchangeTomcat",
                    "accessHttpExchangeTomcatSlotValue",
                    new java.lang.Class[] {
                      Native.find_java_class("edu.isi.webtools.http.tomcat.HttpExchangeTomcat"),
                      Native.find_java_class("edu.isi.stella.Symbol"),
                      Native.find_java_class("edu.isi.stella.Stella_Object"),
                      java.lang.Boolean.TYPE
                    });
          }
        }
        if (Stella.currentStartupTimePhaseP(6)) {
          Stella.finalizeClasses();
        }
        if (Stella.currentStartupTimePhaseP(7)) {
          Stella.defineMethodObject(
              "(DEFMETHOD (START-HTTP-SERVER-IMPL STRING) ((SERVER HTTP-SERVER-TOMCAT) (PORT INTEGER)))",
              Native.find_java_method(
                  "edu.isi.webtools.http.tomcat.HttpServerTomcat",
                  "startHttpServerImpl",
                  new java.lang.Class[] {java.lang.Integer.TYPE}),
              ((java.lang.reflect.Method) (null)));
          Stella.defineMethodObject(
              "(DEFMETHOD STOP-HTTP-SERVER-IMPL ((SERVER HTTP-SERVER-TOMCAT)))",
              Native.find_java_method(
                  "edu.isi.webtools.http.tomcat.HttpServerTomcat",
                  "stopHttpServerImpl",
                  new java.lang.Class[] {}),
              ((java.lang.reflect.Method) (null)));
          Stella.defineMethodObject(
              "(DEFMETHOD (GET-HEADER-VALUE-IMPL STRING) ((SERVER HTTP-SERVER-TOMCAT) (XCHG HTTP-EXCHANGE) (KEY KEYWORD)))",
              Native.find_java_method(
                  "edu.isi.webtools.http.tomcat.HttpServerTomcat",
                  "getHeaderValueImpl",
                  new java.lang.Class[] {
                    Native.find_java_class("edu.isi.webtools.http.HttpExchange"),
                    Native.find_java_class("edu.isi.stella.Keyword")
                  }),
              ((java.lang.reflect.Method) (null)));
          Stella.defineMethodObject(
              "(DEFMETHOD (GET-REPLY-HEADER-VALUE-IMPL STRING) ((SERVER HTTP-SERVER-TOMCAT) (XCHG HTTP-EXCHANGE) (KEY KEYWORD)))",
              Native.find_java_method(
                  "edu.isi.webtools.http.tomcat.HttpServerTomcat",
                  "getReplyHeaderValueImpl",
                  new java.lang.Class[] {
                    Native.find_java_class("edu.isi.webtools.http.HttpExchange"),
                    Native.find_java_class("edu.isi.stella.Keyword")
                  }),
              ((java.lang.reflect.Method) (null)));
          Stella.defineMethodObject(
              "(DEFMETHOD SET-REPLY-HEADER-VALUE-IMPL ((SERVER HTTP-SERVER-TOMCAT) (XCHG HTTP-EXCHANGE) (KEY KEYWORD) (VALUE STRING)))",
              Native.find_java_method(
                  "edu.isi.webtools.http.tomcat.HttpServerTomcat",
                  "setReplyHeaderValueImpl",
                  new java.lang.Class[] {
                    Native.find_java_class("edu.isi.webtools.http.HttpExchange"),
                    Native.find_java_class("edu.isi.stella.Keyword"),
                    Native.find_java_class("java.lang.String")
                  }),
              ((java.lang.reflect.Method) (null)));
          Stella.defineMethodObject(
              "(DEFMETHOD (GET-REQUEST-URI-IMPL STRING) ((SERVER HTTP-SERVER-TOMCAT) (XCHG HTTP-EXCHANGE)))",
              Native.find_java_method(
                  "edu.isi.webtools.http.tomcat.HttpServerTomcat",
                  "getRequestUriImpl",
                  new java.lang.Class[] {
                    Native.find_java_class("edu.isi.webtools.http.HttpExchange")
                  }),
              ((java.lang.reflect.Method) (null)));
          Stella.defineMethodObject(
              "(DEFMETHOD (GET-REQUEST-URI-QUERY-IMPL STRING) ((SERVER HTTP-SERVER-TOMCAT) (XCHG HTTP-EXCHANGE)))",
              Native.find_java_method(
                  "edu.isi.webtools.http.tomcat.HttpServerTomcat",
                  "getRequestUriQueryImpl",
                  new java.lang.Class[] {
                    Native.find_java_class("edu.isi.webtools.http.HttpExchange")
                  }),
              ((java.lang.reflect.Method) (null)));
          Stella.defineMethodObject(
              "(DEFMETHOD (GET-REQUEST-URI-PATH-IMPL STRING) ((SERVER HTTP-SERVER-TOMCAT) (XCHG HTTP-EXCHANGE)))",
              Native.find_java_method(
                  "edu.isi.webtools.http.tomcat.HttpServerTomcat",
                  "getRequestUriPathImpl",
                  new java.lang.Class[] {
                    Native.find_java_class("edu.isi.webtools.http.HttpExchange")
                  }),
              ((java.lang.reflect.Method) (null)));
          Stella.defineMethodObject(
              "(DEFMETHOD (GET-REQUEST-METHOD-IMPL KEYWORD) ((SERVER HTTP-SERVER-TOMCAT) (XCHG HTTP-EXCHANGE)))",
              Native.find_java_method(
                  "edu.isi.webtools.http.tomcat.HttpServerTomcat",
                  "getRequestMethodImpl",
                  new java.lang.Class[] {
                    Native.find_java_class("edu.isi.webtools.http.HttpExchange")
                  }),
              ((java.lang.reflect.Method) (null)));
          Stella.defineMethodObject(
              "(DEFMETHOD (GET-REQUEST-PROTOCOL-IMPL STRING) ((SERVER HTTP-SERVER-TOMCAT) (XCHG HTTP-EXCHANGE)))",
              Native.find_java_method(
                  "edu.isi.webtools.http.tomcat.HttpServerTomcat",
                  "getRequestProtocolImpl",
                  new java.lang.Class[] {
                    Native.find_java_class("edu.isi.webtools.http.HttpExchange")
                  }),
              ((java.lang.reflect.Method) (null)));
          Stella.defineMethodObject(
              "(DEFMETHOD (GET-REQUEST-BODY-IMPL STRING) ((SERVER HTTP-SERVER-TOMCAT) (XCHG HTTP-EXCHANGE)))",
              Native.find_java_method(
                  "edu.isi.webtools.http.tomcat.HttpServerTomcat",
                  "getRequestBodyImpl",
                  new java.lang.Class[] {
                    Native.find_java_class("edu.isi.webtools.http.HttpExchange")
                  }),
              ((java.lang.reflect.Method) (null)));
          Stella.defineMethodObject(
              "(DEFMETHOD (GET-REQUEST-LOCAL-ADDRESS-IMPL STRING) ((SERVER HTTP-SERVER-TOMCAT) (XCHG HTTP-EXCHANGE)))",
              Native.find_java_method(
                  "edu.isi.webtools.http.tomcat.HttpServerTomcat",
                  "getRequestLocalAddressImpl",
                  new java.lang.Class[] {
                    Native.find_java_class("edu.isi.webtools.http.HttpExchange")
                  }),
              ((java.lang.reflect.Method) (null)));
          Stella.defineMethodObject(
              "(DEFMETHOD (GET-REQUEST-REMOTE-ADDRESS-IMPL STRING) ((SERVER HTTP-SERVER-TOMCAT) (XCHG HTTP-EXCHANGE)))",
              Native.find_java_method(
                  "edu.isi.webtools.http.tomcat.HttpServerTomcat",
                  "getRequestRemoteAddressImpl",
                  new java.lang.Class[] {
                    Native.find_java_class("edu.isi.webtools.http.HttpExchange")
                  }),
              ((java.lang.reflect.Method) (null)));
          Stella.defineMethodObject(
              "(DEFMETHOD (GET-REPLY-STREAM-IMPL NATIVE-OUTPUT-STREAM) ((SERVER HTTP-SERVER-TOMCAT) (XCHG HTTP-EXCHANGE)))",
              Native.find_java_method(
                  "edu.isi.webtools.http.tomcat.HttpServerTomcat",
                  "getReplyStreamImpl",
                  new java.lang.Class[] {
                    Native.find_java_class("edu.isi.webtools.http.HttpExchange")
                  }),
              ((java.lang.reflect.Method) (null)));
          Stella.defineMethodObject(
              "(DEFMETHOD SET-RESPONSE-CODE-IMPL ((SERVER HTTP-SERVER-TOMCAT) (XCHG HTTP-EXCHANGE) (CODE KEYWORD)))",
              Native.find_java_method(
                  "edu.isi.webtools.http.tomcat.HttpServerTomcat",
                  "setResponseCodeImpl",
                  new java.lang.Class[] {
                    Native.find_java_class("edu.isi.webtools.http.HttpExchange"),
                    Native.find_java_class("edu.isi.stella.Keyword")
                  }),
              ((java.lang.reflect.Method) (null)));
          Stella.defineMethodObject(
              "(DEFMETHOD PUBLISH-FILE-IMPL ((SERVER HTTP-SERVER-TOMCAT) (PATH STRING) (FILE STRING) (OPTIONS PROPERTY-LIST)))",
              Native.find_java_method(
                  "edu.isi.webtools.http.tomcat.HttpServerTomcat",
                  "publishFileImpl",
                  new java.lang.Class[] {
                    Native.find_java_class("java.lang.String"),
                    Native.find_java_class("java.lang.String"),
                    Native.find_java_class("edu.isi.stella.PropertyList")
                  }),
              ((java.lang.reflect.Method) (null)));
          Stella.defineMethodObject(
              "(DEFMETHOD PUBLISH-DIRECTORY-IMPL ((SERVER HTTP-SERVER-TOMCAT) (PATH STRING) (DIRECTORY STRING) (OPTIONS PROPERTY-LIST)))",
              Native.find_java_method(
                  "edu.isi.webtools.http.tomcat.HttpServerTomcat",
                  "publishDirectoryImpl",
                  new java.lang.Class[] {
                    Native.find_java_class("java.lang.String"),
                    Native.find_java_class("java.lang.String"),
                    Native.find_java_class("edu.isi.stella.PropertyList")
                  }),
              ((java.lang.reflect.Method) (null)));
          Stella.defineMethodObject(
              "(DEFMETHOD PUBLISH-HANDLER-IMPL ((SERVER HTTP-SERVER-TOMCAT) (PATH STRING) (HANDLER FUNCTION-CODE) (OPTIONS PROPERTY-LIST)))",
              Native.find_java_method(
                  "edu.isi.webtools.http.tomcat.HttpServerTomcat",
                  "publishHandlerImpl",
                  new java.lang.Class[] {
                    Native.find_java_class("java.lang.String"),
                    Native.find_java_class("java.lang.reflect.Method"),
                    Native.find_java_class("edu.isi.stella.PropertyList")
                  }),
              ((java.lang.reflect.Method) (null)));
          Stella.defineMethodObject(
              "(DEFMETHOD (GET-HANDLER-OPTIONS-IMPL PROPERTY-LIST) ((SERVER HTTP-SERVER-TOMCAT) (XCHG HTTP-EXCHANGE)))",
              Native.find_java_method(
                  "edu.isi.webtools.http.tomcat.HttpServerTomcat",
                  "getHandlerOptionsImpl",
                  new java.lang.Class[] {
                    Native.find_java_class("edu.isi.webtools.http.HttpExchange")
                  }),
              ((java.lang.reflect.Method) (null)));
          Stella.defineMethodObject(
              "(DEFMETHOD (SERVLET-HANDLE-REQUEST HTTP-EXCHANGE-TOMCAT) ((SERVER HTTP-SERVER-TOMCAT) (REQUEST NATIVE-HTTP-SERVLET-REQUEST) (RESPONSE NATIVE-HTTP-SERVLET-RESPONSE)))",
              Native.find_java_method(
                  "edu.isi.webtools.http.tomcat.HttpServerTomcat",
                  "servletHandleRequest",
                  new java.lang.Class[] {
                    Native.find_java_class("javax.servlet.http.HttpServletRequest"),
                    Native.find_java_class("javax.servlet.http.HttpServletResponse")
                  }),
              ((java.lang.reflect.Method) (null)));
          Stella.defineFunctionObject(
              "STARTUP-HTTP-SERVER-IMPL",
              "(DEFUN STARTUP-HTTP-SERVER-IMPL () :PUBLIC? TRUE)",
              Native.find_java_method(
                  "edu.isi.webtools.http.tomcat._StartupHttpServerImpl",
                  "startupHttpServerImpl",
                  new java.lang.Class[] {}),
              null);
          {
            MethodSlot function = Symbol.lookupFunction(Tomcat.SYM_TOMCAT_STARTUP_HTTP_SERVER_IMPL);

            KeyValueList.setDynamicSlotValue(
                function.dynamicSlots,
                Tomcat.SYM_STELLA_METHOD_STARTUP_CLASSNAME,
                StringWrapper.wrapString("_StartupHttpServerImpl"),
                Stella.NULL_STRING_WRAPPER);
          }
        }
        if (Stella.currentStartupTimePhaseP(8)) {
          Stella.finalizeSlots();
          Stella.cleanupUnfinalizedClasses();
        }
        if (Stella.currentStartupTimePhaseP(9)) {
          Stella_Object.inModule(
              ((StringWrapper)
                  (Stella_Object.copyConsTree(StringWrapper.wrapString("HTTP/TOMCAT")))));
          if ((Http.$HTTP_SERVER_IMPLEMENTATION$ != null)
              && (!Stella_Object.isaP(
                  Http.$HTTP_SERVER_IMPLEMENTATION$, Tomcat.SGT_TOMCAT_HTTP_SERVER_TOMCAT))) {
            throw ((StellaException)
                (StellaException.newStellaException(
                        "Conflicting HTTP server implementation already loaded")
                    .fillInStackTrace()));
          } else {
            Http.$HTTP_SERVER_IMPLEMENTATION$ = HttpServerTomcat.newHttpServerTomcat();
          }
        }

      } finally {
        Stella.$CONTEXT$.set(old$Context$000);
        Stella.$MODULE$.set(old$Module$000);
      }
    }
  }
Esempio n. 7
0
  public void vizConceptLinksToDotEdges(LogicObject concept, Module module) {
    {
      VizInfo self = this;

      {
        OutputStream stream = self.stream;
        int count = 0;

        {
          LogicObject renamed_Super = null;
          edu.isi.powerloom.PlIterator iter000 =
              edu.isi.powerloom.PLI.getDirectSuperrelations(concept, module, null);

          while (iter000.nextP()) {
            renamed_Super = ((LogicObject) (iter000.value));
            if (Surrogate.subtypeOfP(
                Stella_Object.safePrimaryType(renamed_Super),
                OntosaurusUtil.SGT_LOGIC_NAMED_DESCRIPTION)) {
              {
                NamedDescription super000 = ((NamedDescription) (renamed_Super));

                if (self.vizAllowedObjectP(super000)) {
                  stream.nativeStream.println(
                      "  \""
                          + OntosaurusUtil.vizDotObjectName(super000)
                          + "\" -> \""
                          + OntosaurusUtil.vizDotObjectName(concept)
                          + "\" [dir=back]");
                  count = count + 1;
                } else {
                  stream.nativeStream.print(
                      "  \""
                          + OntosaurusUtil.vizDotObjectName(super000)
                          + "\" [shape=box, style=filled, fillcolor=grey,URL=\""
                          + self.vizGenerateOntosaurusHandle(super000)
                          + "\"]");
                  stream.nativeStream.println(
                      "  \""
                          + OntosaurusUtil.vizDotObjectName(super000)
                          + "\" -> \""
                          + OntosaurusUtil.vizDotObjectName(concept)
                          + "\" [dir=back]");
                  count = count + 1;
                }
              }
            } else {
              {
                OutputStringStream stream000 = OutputStringStream.newOutputStringStream();

                stream000.nativeStream.print(
                    "viz-concept-links-to-dot-edges: unhandled super concept: `"
                        + renamed_Super
                        + "'");
                throw ((StellaException)
                    (StellaException.newStellaException(stream000.theStringReader())
                        .fillInStackTrace()));
              }
            }
          }
        }
        if ((count == 0) && self.addTopP) {
          stream.nativeStream.println(
              "  \""
                  + OntosaurusUtil.VIZ_TOP
                  + "\" -> \""
                  + OntosaurusUtil.vizDotObjectName(concept)
                  + "\" [dir=back]");
        }
        if (self.showRelationsP) {
          {
            LogicObject range = null;
            String relcolor = self.relationColor;
            String relstyle = self.relationStyle;

            {
              Object old$Module$000 = Stella.$MODULE$.get();
              Object old$Context$000 = Stella.$CONTEXT$.get();

              try {
                Native.setSpecial(Stella.$MODULE$, module);
                Native.setSpecial(Stella.$CONTEXT$, ((Module) (Stella.$MODULE$.get())));
                {
                  LogicObject relation = null;
                  Cons iter001 = self.vizGetBinaryRelationsOf(concept);

                  for (; !(iter001 == Stella.NIL); iter001 = iter001.rest) {
                    relation = ((LogicObject) (iter001.value));
                    range = edu.isi.powerloom.PLI.getRange(relation);
                    if (self.vizAllowedObjectP(relation)) {
                      stream.nativeStream.println(
                          "  \""
                              + OntosaurusUtil.vizDotObjectName(concept)
                              + "\" -> \""
                              + OntosaurusUtil.vizDotObjectName(range)
                              + "\" [label=\""
                              + OntosaurusUtil.vizDotObjectName(relation)
                              + "\", color="
                              + relcolor
                              + ", style="
                              + relstyle
                              + "]");
                    }
                  }
                }

              } finally {
                Stella.$CONTEXT$.set(old$Context$000);
                Stella.$MODULE$.set(old$Module$000);
              }
            }
          }
        }
      }
    }
  }
Esempio n. 8
0
  public void vizExportConceptTree(LogicObject concept, Module module) {
    {
      VizInfo self = this;

      self.nodeColor = "palegreen";
      self.vizExportConcept(concept, module);
      self.nodeColor = "yellow";
      self.vizAllowObject(concept);
      {
        LogicObject renamed_Super = null;
        edu.isi.powerloom.PlIterator iter000 =
            edu.isi.powerloom.PLI.getProperSuperrelations(concept, module, null);

        while (iter000.nextP()) {
          renamed_Super = ((LogicObject) (iter000.value));
          self.vizAllowObject(renamed_Super);
        }
      }
      {
        LogicObject sub = null;
        edu.isi.powerloom.PlIterator iter001 =
            edu.isi.powerloom.PLI.getProperSubrelations(concept, module, null);

        while (iter001.nextP()) {
          sub = ((LogicObject) (iter001.value));
          self.vizAllowObject(sub);
        }
      }
      {
        LogicObject renamed_Super = null;
        edu.isi.powerloom.PlIterator iter002 =
            edu.isi.powerloom.PLI.getProperSuperrelations(concept, module, null);

        while (iter002.nextP()) {
          renamed_Super = ((LogicObject) (iter002.value));
          if (Surrogate.subtypeOfP(
              Stella_Object.safePrimaryType(renamed_Super),
              OntosaurusUtil.SGT_LOGIC_LOGIC_OBJECT)) {
            {
              LogicObject super000 = ((LogicObject) (renamed_Super));

              self.vizExportConcept(super000, module);
            }
          } else {
            {
              OutputStringStream stream000 = OutputStringStream.newOutputStringStream();

              stream000.nativeStream.print(
                  "viz-export-concept-tree: concept not handled: `" + renamed_Super + "'");
              throw ((StellaException)
                  (StellaException.newStellaException(stream000.theStringReader())
                      .fillInStackTrace()));
            }
          }
        }
      }
      {
        LogicObject sub = null;
        edu.isi.powerloom.PlIterator iter003 =
            edu.isi.powerloom.PLI.getProperSubrelations(concept, module, null);

        while (iter003.nextP()) {
          sub = ((LogicObject) (iter003.value));
          if (Surrogate.subtypeOfP(
              Stella_Object.safePrimaryType(sub), OntosaurusUtil.SGT_LOGIC_LOGIC_OBJECT)) {
            {
              LogicObject sub000 = ((LogicObject) (sub));

              self.vizExportConcept(sub000, module);
            }
          } else {
            {
              OutputStringStream stream001 = OutputStringStream.newOutputStringStream();

              stream001.nativeStream.print(
                  "viz-export-concept-tree: concept not handled: `" + sub + "'");
              throw ((StellaException)
                  (StellaException.newStellaException(stream001.theStringReader())
                      .fillInStackTrace()));
            }
          }
        }
      }
    }
  }