コード例 #1
0
 protected void pushVideoTranscriptTextPropertiesOnWorkQueue(
     Element element, String propertyKey, VideoTranscript videoTranscript) {
   for (VideoTranscript.TimedText entry : videoTranscript.getEntries()) {
     String textPropertyKey = getVideoTranscriptTimedTextPropertyKey(propertyKey, entry);
     getWorkQueueRepository()
         .pushGraphPropertyQueue(
             element, textPropertyKey, RawLumifyProperties.TEXT.getPropertyName());
   }
 }
コード例 #2
0
 protected void addVideoTranscriptAsTextPropertiesToMutation(
     ExistingElementMutation<Vertex> mutation,
     String propertyKey,
     VideoTranscript videoTranscript,
     Map<String, Object> metadata,
     Visibility visibility) {
   metadata.put(RawLumifyProperties.META_DATA_MIME_TYPE, "text/plain");
   for (VideoTranscript.TimedText entry : videoTranscript.getEntries()) {
     String textPropertyKey = getVideoTranscriptTimedTextPropertyKey(propertyKey, entry);
     StreamingPropertyValue value =
         new StreamingPropertyValue(
             new ByteArrayInputStream(entry.getText().getBytes()), String.class);
     RawLumifyProperties.TEXT.addPropertyValue(
         mutation, textPropertyKey, value, metadata, visibility);
   }
 }