Esempio n. 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, LumifyProperties.TEXT.getPropertyName());
   }
 }
Esempio n. 2
0
 protected void addVideoTranscriptAsTextPropertiesToMutation(
     ExistingElementMutation<Vertex> mutation,
     String propertyKey,
     VideoTranscript videoTranscript,
     Map<String, Object> metadata,
     Visibility visibility) {
   metadata.put(LumifyProperties.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);
     LumifyProperties.TEXT.addPropertyValue(
         mutation, textPropertyKey, value, metadata, visibility);
   }
 }