// try node first, then relationship
Syncable syncable = (Syncable)app.nodeQuery().and(GraphObject.id, rootNodeId).includeDeletedAndHidden().getFirst();
if (syncable == null) {
syncable = (Syncable)app.relationshipQuery().and(GraphObject.id, rootNodeId).includeDeletedAndHidden().getFirst();
}
if (syncable != null) {
final ExportSet exportSet = ExportSet.getInstance(syncable, recursive);