{{'''
select distinct ?np ?about ?quoted ?contributor ?created ?modified (coalesce(?modified, ?created) as ?updated) ?derived_from ?generation_type ?content ?reply_of where {
  { graph ?np { ?np sio:isAbout ?e.}}
  UNION
  {graph ?assertion { ?e ?p ?o.}}
  ?np a np:Nanopublication;
        np:hasProvenance ?provenance;
        np:hasPublicationInfo ?pubinfo;
        np:hasAssertion ?assertion.
  optional {
    ?np sio:isAbout ?about
  }
  optional {
    ?assertion prov:wasQuotedFrom ?quoted
  }
  optional {
    ?assertion dc:contributor ?contributor
  }
  optional {
    graph ?pubinfo {
        ?assertion dc:created ?created.
    }
  }
  optional {
    graph ?pubinfo {
        ?assertion dc:modified ?modified.
    }
  }
  optional {
    ?assertion prov:wasDerivedFrom ?derived_from.
  }
  optional {
    ?assertion prov:wasGeneratedBy ?generating_event.
    ?generating_event a ?generation_type.
  }
  optional {
    ?assertion sioc:content ?content.
  }
  optional {
    ?assertion sioc:reply_of ?reply_of.
  }
}''' | query(values={"e":this.identifier}) | iter_labelize(key="contributor", label_key="contributor_label") | iter_labelize(key="generation_type", label_key="generation_type_label") | tojson }}
