Package edu.isi.karma.controller.update

Examples of edu.isi.karma.controller.update.AbstractUpdate


      if(csvFileName == null)
        return new UpdateContainer(new ErrorUpdate(
            "No data to export! Have you aligned the worksheet?"));
      final String fileName = mdbFileExport.publishMDB(csvFileName);

      return new UpdateContainer(new AbstractUpdate() {
        @Override
        public void generateJson(String prefix, PrintWriter pw,
            VWorkspace vWorkspace) {
          JSONObject outputObject = new JSONObject();
          try {
View Full Code Here


      }

      if(conn!=null)
        conn.close();
     
      return new UpdateContainer(new AbstractUpdate() {
        @Override
        public void generateJson(String prefix, PrintWriter pw,
            VWorkspace vWorkspace) {
          JSONObject outputObject = new JSONObject();
          try {
View Full Code Here

   
   
    WorksheetProperties props = worksheet.getMetadataContainer().getWorksheetProperties();
    try {
      final JSONObject propsJson = props.getJSONRepresentation();
      return new UpdateContainer(new AbstractUpdate() {
       
        @Override
        public void generateJson(String prefix, PrintWriter pw,
            VWorkspace vWorkspace) {
          JSONObject obj = new JSONObject();
View Full Code Here

      nodeSet = getClassesWithProperty(workspace, propertyURI);
    }
    else if (range == INTERNAL_NODES_RANGE.allClassesRaw) {
      final OntologyManager ontMgr = workspace.getOntologyManager();
      final HashMap<String, Label> allClasses = ontMgr.getClasses();
      UpdateContainer upd = new UpdateContainer(new AbstractUpdate() {
        @Override
        public void generateJson(String prefix, PrintWriter pw,
            VWorkspace vWorkspace) {
          JSONArray nodesArray = new JSONArray();
          JSONObject obj = new JSONObject();
          for (Entry<String, Label> entry : allClasses.entrySet()) {
            JSONObject nodeObj = new JSONObject();
            Label label = entry.getValue();
            nodeObj.put(JsonKeys.nodeLabel.name(), label.getDisplayName());
            nodeObj.put(JsonKeys.nodeId.name(), label.getUri());
            nodeObj.put(JsonKeys.nodeUri.name(), label.getUri());
            nodesArray.put(nodeObj);
          }
          obj.put(JsonKeys.nodes.name(), nodesArray);
          pw.println(obj.toString());
        }
      });
      return upd;
    }

    if (nodeSet == null) {
      nodeSet = new HashSet<Node>();
    }
    final Set<Node> finalNodeSet = nodeSet;

    UpdateContainer upd = new UpdateContainer(new AbstractUpdate() {
      @Override
      public void generateJson(String prefix, PrintWriter pw,
          VWorkspace vWorkspace) {
        JSONObject obj = new JSONObject();
        JSONArray nodesArray = new JSONArray();
View Full Code Here

   
    for (Worksheet w : vwsp.getWorkspace().getWorksheets()) {
      updateContainer.append(WorksheetUpdateFactory.createWorksheetHierarchicalUpdates(w.getId(), SuperSelectionManager.DEFAULT_SELECTION));
    }

    updateContainer.add(new AbstractUpdate() {

      @Override
      public void generateJson(String prefix, PrintWriter pw,
          VWorkspace vWorkspace) {
        //1. Load all configurations
View Full Code Here

      final boolean transfer = true;//transferFileToPublicServer(kmlFileName,file); // save this line for using networkLink in GE plugin (see geospatial.js)
      //if (!transfer) { // save this line for using networkLink in GE plugin (see geospatial.js)
      //  logger.error("Published KML file could not be moved to a public server to display on Google Maps!");
      //}

      return new UpdateContainer(new AbstractUpdate() {
        @Override
        public void generateJson(String prefix, PrintWriter pw,
            VWorkspace vWorkspace) {
          JSONObject outputObject = new JSONObject();
          try {
View Full Code Here

    try {
     
      geo.SaveSpatialDataAndReturnKMLString();
      final String zippedSpatialDataPath = geo.getZippedSpatialDataPath();

      return new UpdateContainer(new AbstractUpdate() {
        @Override
        public void generateJson(String prefix, PrintWriter pw,
            VWorkspace vWorkspace) {
          JSONObject outputObject = new JSONObject();
          try {
View Full Code Here

    final UpdateContainer uc = new UpdateContainer();
    Node node = alignment.getNodeById(nodeId);
    if(node instanceof LiteralNode) {
      final LiteralNode lNode = (LiteralNode)node;
      uc.add(new AbstractUpdate() {

        @Override
        public void generateJson(String prefix, PrintWriter pw,
            VWorkspace vWorkspace) {
          try {
View Full Code Here

      Preferences preferences = Preferences.userRoot().node("WebKarma");
      preferences.put("KARMA_USER_HOME", directory);
     
     
      uc.add(new InfoUpdate("Successfully changed Karma Home Directory"));
      uc.add(new AbstractUpdate() {
 
        @Override
        public void generateJson(String prefix, PrintWriter pw,
            VWorkspace vWorkspace) {
          JSONObject obj = new JSONObject();
View Full Code Here

    boolean result = TripleStoreUtil.clearContexts(tripleStoreUrl, graphUrl);
    if (!result) {
      return new UpdateContainer(new ErrorUpdate("Error occured while clearing R2RML model!"));
    }
    UpdateContainer uc = new UpdateContainer();
    uc.add(new AbstractUpdate() {
      public void generateJson(String prefix, PrintWriter pw, 
          VWorkspace vWorkspace) {
        JSONObject outputObject = new JSONObject();
        try {
          outputObject.put(JsonKeys.updateType.name(), "ClearGraph");
View Full Code Here

TOP

Related Classes of edu.isi.karma.controller.update.AbstractUpdate

Copyright © 2018 www.massapicom. 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.