Skip to content

Commit f89f124

Browse files
author
Sascha Jongebloed
authored
Fixed logger settings (#19)
* Added correct configuration for logger * Extended export interface
1 parent 263c3e9 commit f89f124

2 files changed

Lines changed: 12 additions & 1 deletion

File tree

src/ROSInterface.cpp

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -351,7 +351,17 @@ void ROSInterface::executeTellCB(const TellGoalConstPtr &goal) {
351351

352352
bool 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
}

srv/ExportTriples.srv

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
string path
2+
string format # 'turtle' or 'rdfxml'
23
---
34
# The result of the query
45
bool success

0 commit comments

Comments
 (0)