Esempio n. 1
0
 public void resetToOriginalValues(
     BaseOntologyInfo ontologyInfo,
     ReviewResult_Old reviewResult_Old,
     boolean confirm,
     boolean link) {
   OntologyMetadata ontologyMetadata = ontologyInfo.getOntologyMetadata();
   String ontologyUri = ontologyInfo.getUri();
   resetToOriginalOrNewValues(
       ontologyUri, ontologyMetadata, true, reviewResult_Old, confirm, link);
 }
Esempio n. 2
0
  /**
   * Call this to review and register an new ontology (not a new version of an existing registered
   * ontology).
   */
  void reviewAndRegisterNewOntology() {
    Map<String, String> newValues = createOntologyInfo.getMetadataValues();

    BaseOntologyInfo ontologyInfo = createOntologyInfo.getBaseOntologyInfo();

    assert !(ontologyInfo instanceof RegisteredOntologyInfo);

    // Ok, put the new values in the ontologyInfo object:
    ontologyInfo.getOntologyMetadata().setNewValues(newValues);

    createOntologyInfo.setUri(ontologyInfo.getUri());

    Orr.log(
        CLASS_NAME
            + ": reviewAndRegisterNewOntology starting.  HostingType: "
            + createOntologyInfo.getHostingType());

    final MyDialog popup = new MyDialog(null);
    popup.addTextArea(null).setSize("600", "150");
    popup.getTextArea().setText("please wait ...");
    PortalControl.getInstance().notifyActivity(true);
    popup.setText("Creating ontology ...");
    popup.center();
    popup.show();

    AsyncCallback<CreateOntologyResult> callback =
        new AsyncCallback<CreateOntologyResult>() {
          public void onFailure(Throwable thr) {
            PortalControl.getInstance().notifyActivity(false);
            Window.alert(thr.toString());
          }

          public void onSuccess(CreateOntologyResult result) {
            Orr.log(CLASS_NAME + ": CreateOntologyResult obtained.");
            PortalControl.getInstance().notifyActivity(false);
            reviewCompleted(popup, result);
          }
        };

    Orr.log(CLASS_NAME + ": Calling service createOntology ...");
    Orr.service.createOntology(createOntologyInfo, callback);
  }