public function createNamedEntitiesExtractionDBpediaSpotlightApiSoftwareAgent() { if (!\MongoDB\SoftwareAgent::find('dbpediaspotlightextractor')) { $softwareAgent = new \MongoDB\SoftwareAgent(); $softwareAgent->_id = "dbpediaspotlightextractor"; $softwareAgent->label = "This component uses the DBpediaSpotlight API in order to extract named entities from video metadata description"; $softwareAgent->save(); } }
public function createVideoSegmentingSoftwareAgent() { if (!\MongoDB\SoftwareAgent::find('videosegmenting')) { $softwareAgent = new \MongoDB\SoftwareAgent(); $softwareAgent->_id = "videosegmenting"; $softwareAgent->label = "This component (pre)processes video documents by splitting the video into segments"; $softwareAgent->save(); } }
public function createPostSoftwareAgent($data) { if (isset($data['softwareAgent_id'])) { if (!\MongoDB\SoftwareAgent::find($data['softwareAgent_id'])) { $softwareAgent = new \MongoDB\SoftwareAgent(); $softwareAgent->_id = strtolower($data['softwareAgent_id']); if (isset($data['softwareAgent_label'])) { $softwareAgent->label = $data['softwareAgent_label']; } $softwareAgent->save(); } return true; } throw new Exception("Error creating SoftwareAgent"); }