Examples of toJSON()


Examples of io.lumify.core.ingest.video.VideoTranscript.toJson()

        VideoTranscript videoTranscript = MediaLumifyProperties.VIDEO_TRANSCRIPT.getPropertyValue(artifactVertex, propertyKey);
        if (videoTranscript != null) {
            LOGGER.debug("returning video transcript for vertexId:%s property:%s", artifactVertex.getId(), propertyKey);
            Iterable<Vertex> termMentions = termMentionRepository.findBySourceGraphVertexAndPropertyKey(artifactVertex.getId(), propertyKey, authorizations);
            VideoTranscript highlightedVideoTranscript = entityHighlighter.getHighlightedVideoTranscript(videoTranscript, termMentions, workspaceId, authorizations);
            respondWithJson(response, highlightedVideoTranscript.toJson());
            return;
        }

        videoTranscript = JsonSerializer.getSynthesisedVideoTranscription(artifactVertex, propertyKey);
        if (videoTranscript != null) {
View Full Code Here

Examples of io.lumify.core.model.PropertyJustificationMetadata.toJson()

            sourceJson = new JSONObject();
        }

        if (justificationText != null) {
            PropertyJustificationMetadata propertyJustificationMetadata = new PropertyJustificationMetadata(justificationText);
            mutation.setProperty(PropertyJustificationMetadata.PROPERTY_JUSTIFICATION, propertyJustificationMetadata.toJson().toString(), lumifyVisibility.getVisibility());
        } else if (sourceJson.length() > 0) {
            PropertySourceMetadata sourceMetadata = createPropertySourceMetadata(sourceJson);
            mutation.setProperty(PropertySourceMetadata.PROPERTY_SOURCE_METADATA, sourceMetadata.toJson().toString(), lumifyVisibility.getVisibility());
        }
    }
View Full Code Here

Examples of io.lumify.core.model.PropertySourceMetadata.toJson()

        if (justificationText != null) {
            PropertyJustificationMetadata propertyJustificationMetadata = new PropertyJustificationMetadata(justificationText);
            mutation.setProperty(PropertyJustificationMetadata.PROPERTY_JUSTIFICATION, propertyJustificationMetadata.toJson().toString(), lumifyVisibility.getVisibility());
        } else if (sourceJson.length() > 0) {
            PropertySourceMetadata sourceMetadata = createPropertySourceMetadata(sourceJson);
            mutation.setProperty(PropertySourceMetadata.PROPERTY_SOURCE_METADATA, sourceMetadata.toJson().toString(), lumifyVisibility.getVisibility());
        }
    }

    // TODO remove me?
    public static VisibilityJson updateVisibilitySource(VisibilityJson visibilityJson, String visibilitySource) {
View Full Code Here

Examples of io.lumify.core.model.longRunningProcess.FindPathLongRunningProcessQueueItem.toJson()

            respondWithNotFound(response, "Destination vertex not found");
            return;
        }

        FindPathLongRunningProcessQueueItem findPathQueueItem = new FindPathLongRunningProcessQueueItem(sourceVertex.getId(), destVertex.getId(), hops, workspaceId, authorizations);
        String id = this.longRunningProcessRepository.enqueue(findPathQueueItem.toJson(), user, authorizations);

        respondWithClientApiObject(response, new ClientApiLongRunningProcessSubmitResponse(id));
    }
}
View Full Code Here

Examples of io.lumify.opennlpDictionary.model.DictionaryEntry.toJson()

        DictionaryEntry entry = dictionaryEntryRepository.saveNew(tokens, concept, resolvedName, user);

        JSONObject resultJson = new JSONObject();
        resultJson.put("success", true);
        resultJson.put("entry", entry.toJson());

        respondWithJson(response, resultJson);
    }

}
View Full Code Here

Examples of io.vertx.core.DeploymentOptions.toJson()

    options.setHa(ha);
    options.setExtraClasspath(cp);
    options.setRedeploy(true);
    options.setRedeployGracePeriod(gracePeriod);
    options.setRedeployScanPeriod(scanPeriod);
    JsonObject json = options.toJson();
    DeploymentOptions copy = new DeploymentOptions(json);
    assertEquals(worker, copy.isWorker());
    assertEquals(multiThreaded, copy.isMultiThreaded());
    assertEquals(isolationGroup, copy.getIsolationGroup());
    assertEquals("bar", copy.getConfig().getString("foo"));
View Full Code Here

Examples of it.cnr.isti.hpc.wikipedia.article.Article.toJson()

      article.setTimestamp(timestamp);
      article.setType(type);
      parser.parse(article, page.getText());

      try {
        out.write(article.toJson());
        out.write("\n");
      } catch (IOException e) {
        logger.error("writing the output file {}", e.toString());
        System.exit(-1);
      }
View Full Code Here

Examples of jsonij.json.JSON.toJSON()

                + "         \"Country\":   \"US\""
                + "      }"
                + "   ]";
        for (int i = 0; i < 10000; i++) {
            JSON json = JSON.parse(input);
            String outputJSON = json.toJSON();
        }
    }
}
View Full Code Here

Examples of juzu.impl.plugin.module.metamodel.ModuleMetaModel.toJSON()

          list("controllers").
          set("handle", "ElementHandle.Package[qn=metamodel.application]").
          list("templates")
        )
      );
    assertEquals(expected, mm.toJSON());
  }

  @Test
  public void testUpdate() throws Exception {
    CompilerAssert<File, File> helper = incrementalCompiler("metamodel.application");
View Full Code Here

Examples of lesson6.json.adapters.JsonDataAdapter.toJson()

            if(!f.isAnnotationPresent(UseDataAdapter.class))
                m.put(f.getName(), JsonSerializer.serialize(f.get(o)));
            else{
                jda = f.getAnnotation(UseDataAdapter.class).value().newInstance();
                m.put(f.getName(), jda.toJson(f.get(o)));
            }
        }

        return m;
    }
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.