コード例 #1
0
  public void vizExportModule(Module module) {
    {
      VizInfo self = this;

      Logic.plLog(
          OntosaurusUtil.KWD_MEDIUM,
          Cons.cons(
              StringWrapper.wrapString("powerloom-viz: exporting module: "),
              Cons.cons(module, Stella.NIL)));
      {
        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())));
          self.vizExportConcepts(module);

        } finally {
          Stella.$CONTEXT$.set(old$Context$000);
          Stella.$MODULE$.set(old$Module$000);
        }
      }
    }
  }
コード例 #2
0
  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);
      }
    }
  }
コード例 #3
0
  public static Stella_Object accessVizInfoSlotValue(
      VizInfo self, Symbol slotname, Stella_Object value, boolean setvalueP) {
    if (slotname == OntosaurusUtil.SYM_STELLA_STREAM) {
      if (setvalueP) {
        self.stream = ((OutputStream) (value));
      } else {
        value = self.stream;
      }
    } else if (slotname == OntosaurusUtil.SYM_ONTOSAURUS_ALLOWED_OBJECTS) {
      if (setvalueP) {
        self.allowedObjects = ((HashSet) (value));
      } else {
        value = self.allowedObjects;
      }
    } else if (slotname == OntosaurusUtil.SYM_ONTOSAURUS_SHOW_RELATIONSp) {
      if (setvalueP) {
        self.showRelationsP =
            BooleanWrapper.coerceWrappedBooleanToBoolean(((BooleanWrapper) (value)));
      } else {
        value = (self.showRelationsP ? Stella.TRUE_WRAPPER : Stella.FALSE_WRAPPER);
      }
    } else if (slotname == OntosaurusUtil.SYM_ONTOSAURUS_SHOW_ATTRIBUTESp) {
      if (setvalueP) {
        self.showAttributesP =
            BooleanWrapper.coerceWrappedBooleanToBoolean(((BooleanWrapper) (value)));
      } else {
        value = (self.showAttributesP ? Stella.TRUE_WRAPPER : Stella.FALSE_WRAPPER);
      }
    } else if (slotname == OntosaurusUtil.SYM_ONTOSAURUS_SHOW_RULESp) {
      if (setvalueP) {
        self.showRulesP = BooleanWrapper.coerceWrappedBooleanToBoolean(((BooleanWrapper) (value)));
      } else {
        value = (self.showRulesP ? Stella.TRUE_WRAPPER : Stella.FALSE_WRAPPER);
      }
    } else if (slotname == OntosaurusUtil.SYM_ONTOSAURUS_ADD_TOPp) {
      if (setvalueP) {
        self.addTopP = BooleanWrapper.coerceWrappedBooleanToBoolean(((BooleanWrapper) (value)));
      } else {
        value = (self.addTopP ? Stella.TRUE_WRAPPER : Stella.FALSE_WRAPPER);
      }
    } else if (slotname == OntosaurusUtil.SYM_ONTOSAURUS_NODE_COLOR) {
      if (setvalueP) {
        self.nodeColor = ((StringWrapper) (value)).wrapperValue;
      } else {
        value = StringWrapper.wrapString(self.nodeColor);
      }
    } else if (slotname == OntosaurusUtil.SYM_ONTOSAURUS_RELATION_COLOR) {
      if (setvalueP) {
        self.relationColor = ((StringWrapper) (value)).wrapperValue;
      } else {
        value = StringWrapper.wrapString(self.relationColor);
      }
    } else if (slotname == OntosaurusUtil.SYM_ONTOSAURUS_RELATION_STYLE) {
      if (setvalueP) {
        self.relationStyle = ((StringWrapper) (value)).wrapperValue;
      } else {
        value = StringWrapper.wrapString(self.relationStyle);
      }
    } else if (slotname == OntosaurusUtil.SYM_ONTOSAURUS_FONT_SIZE) {
      if (setvalueP) {
        self.fontSize = ((IntegerWrapper) (value)).wrapperValue;
      } else {
        value = IntegerWrapper.wrapInteger(self.fontSize);
      }
    } else {
      {
        OutputStringStream stream000 = OutputStringStream.newOutputStringStream();

        stream000.nativeStream.print("`" + slotname + "' is not a valid case option");
        throw ((StellaException)
            (StellaException.newStellaException(stream000.theStringReader()).fillInStackTrace()));
      }
    }
    return (value);
  }