Package edu.isi.karma.controller.command

Examples of edu.isi.karma.controller.command.Command.doIt()


      inputJSON.put(CommandInputJSONUtil.createJsonObject("worksheetId", worksheetId, ParameterType.worksheetId));
      inputJSON.put(CommandInputJSONUtil.createJsonObject("hNodeId", itr.next(), ParameterType.hNodeId));
      inputJSON.put(CommandInputJSONUtil.createJsonObject("selectionName", currentSel.getName(), ParameterType.other));
      try {
        Command c = new RefreshSelectionCommandFactory().createCommand(inputJSON, workspace);
        c.doIt(workspace);
      } catch (Exception e) {
       
      }
    }
    UpdateContainer uc = WorksheetUpdateFactory.createWorksheetHierarchicalAndCleaningResultsUpdates(worksheetId, currentSel);
View Full Code Here



        semanticTypesArray.put(semanticType);
        Command sstCommand = sstFactory.createCommand(workspace, worksheetId, nestedHNodeId, false, semanticTypesArray, false, "", selection.getName());
        appliedCommands.push(sstCommand);
        sstCommand.doIt(workspace);
        if(!resultClass.get(i).trim().isEmpty())
        {
          ChangeInternalNodeLinksCommandFactory cinlcf = new ChangeInternalNodeLinksCommandFactory();
          SetMetaPropertyCommandFactory smpcf = new SetMetaPropertyCommandFactory();
          JSONArray newEdges = new JSONArray();
View Full Code Here

            newEdge.put(ChangeInternalNodeLinksCommand.JsonKeys.edgeTargetId.name(), sourceId);
            newEdge.put(ChangeInternalNodeLinksCommand.JsonKeys.edgeId.name(), edgeUri);
          }
          newEdges.put(newEdge);
          Command changeInternalNodeLinksCommand = cinlcf.createCommand(worksheetId, alignmentId, new JSONArray(), newEdges, workspace);
          changeInternalNodeLinksCommand.doIt(workspace);
          appliedCommands.push(changeInternalNodeLinksCommand);
          Command setMetaDataCommand = smpcf.createCommand(workspace, nestedHNodeId, worksheetId, "isUriOfClass",
              targetUri, targetId, "", selection.getName());
          setMetaDataCommand.doIt(workspace);
          appliedCommands.push(setMetaDataCommand);
View Full Code Here

          Command changeInternalNodeLinksCommand = cinlcf.createCommand(worksheetId, alignmentId, new JSONArray(), newEdges, workspace);
          changeInternalNodeLinksCommand.doIt(workspace);
          appliedCommands.push(changeInternalNodeLinksCommand);
          Command setMetaDataCommand = smpcf.createCommand(workspace, nestedHNodeId, worksheetId, "isUriOfClass",
              targetUri, targetId, "", selection.getName());
          setMetaDataCommand.doIt(workspace);
          appliedCommands.push(setMetaDataCommand);
        }
      }

    }
View Full Code Here

      URL url = new URL(baseUrl + context + modelURL + "?modelRepository=" + modelRepository);

      File file = new File("tmp.ttl")
      FileUtils.copyURLToFile(url, file);
      Command cmd = factory.createCommandFromFile(worksheetId, file, workspace, override);
      UpdateContainer uc = cmd.doIt(workspace);
      workspace.getWorksheet(worksheetId).getMetadataContainer().getWorksheetProperties().setPropertyValue(Property.modelUrl, modelURL);
      workspace.getWorksheet(worksheetId).getMetadataContainer().getWorksheetProperties().setPropertyValue(Property.modelContext, modelContext);
      workspace.getWorksheet(worksheetId).getMetadataContainer().getWorksheetProperties().setPropertyValue(Property.modelRepository, modelRepository);
      file.delete();
      return uc;
View Full Code Here

          JSONArray inputParamArr = (JSONArray)rco.historyObject.get(HistoryArguments.inputParameters.name());
          String commandName = (String)rco.historyObject.get(HistoryArguments.commandName.name());
          executor.normalizeCommandHistoryJsonInput(workspace, worksheetId, inputParamArr, commandName, true);
          CommandFactory cf = commandFactoryMap.get(rco.historyObject.get(HistoryArguments.commandName.name()));
          Command comm = cf.createCommand(inputParamArr, workspace);
          effects.append(comm.doIt(workspace));
          history.add(comm);
        }catch(Exception e) {
          history.add(rco.command);
          effects.append(rco.command.doIt(workspace));
        }
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.