File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -351,7 +351,17 @@ void ROSInterface::executeTellCB(const TellGoalConstPtr &goal) {
351351
352352bool ROSInterface::executeExportCB (ExportTriples::Request &req,
353353 ExportTriples::Response &res) {
354- kb_->exportTo (req.path );
354+ // If req.format is empty or rdfxml
355+ if (req.format == " rdfxml" ) {
356+ kb_->exportTo (req.path , semweb::RDF_XML);
357+ } else if (req.format == " turtle" ) {
358+ kb_->exportTo (req.path , semweb::TURTLE);
359+ } else {
360+ // If the format is not supported, return false
361+ ROS_ERROR (" Export format not supported: %s" , req.format .c_str ());
362+ res.success = false ;
363+ return false ;
364+ }
355365 res.success = true ;
356366 return true ;
357367}
Original file line number Diff line number Diff line change 11string path
2+ string format # 'turtle' or 'rdfxml'
23---
34# The result of the query
45bool success
You can’t perform that action at this time.
0 commit comments