def triples_header(self): ontid = self.ontid nowish = utcnowtz() epoch = nowish.timestamp() iso = isoformat(nowish) ver_ontid = rdflib.URIRef(ontid + f'/version/{epoch}/{self.id}') sparc_methods = rdflib.URIRef('https://raw.githubusercontent.com/SciCrunch/' 'NIF-Ontology/sparc/ttl/sparc-methods.ttl') sparc_mis_helper = rdflib.URIRef('https://raw.githubusercontent.com/SciCrunch/' 'NIF-Ontology/sparc/ttl/sparc-mis-helper.ttl') pos = ( (rdf.type, owl.Ontology), (owl.versionIRI, ver_ontid), (owl.versionInfo, rdflib.Literal(iso)), (isAbout, rdflib.URIRef(self.uri_api)), (TEMP.hasUriHuman, rdflib.URIRef(self.uri_human)), (rdfs.label, rdflib.Literal(f'{self.folder_name} curation export graph')), (rdfs.comment, self.header_graph_description), (owl.imports, sparc_methods), (owl.imports, sparc_mis_helper), (TEMP.TimestampExportStart, rdflib.Literal(self.timestamp_export_start)), ) for p, o in pos: yield ontid, p, o
def triples_header(self): ontid = self.ontid nowish = utcnowtz() epoch = nowish.timestamp() iso = isoformat(nowish) ver_ontid = rdflib.URIRef(ontid + f'/version/{epoch}/{self.id}') pos = ( (rdf.type, owl.Ontology), (owl.versionIRI, ver_ontid), (owl.versionInfo, rdflib.Literal(iso)), (rdfs.comment, self.header_graph_description), (TEMP.TimestampExportStart, rdflib.Literal(self.timestamp_export_start)), ) for p, o in pos: yield ontid, p, o
def triples_header(self): # TODO TODO ontid = self.ontid nowish = utcnowtz() # FIXME pass in so we can align all times per export?? epoch = nowish.timestamp() iso = isoformat(nowish) ver_ontid = rdflib.URIRef(ontid + f'/version/{epoch}/{self.id}') #sparc_methods = rdflib.URIRef('https://raw.githubusercontent.com/SciCrunch/' #'NIF-Ontology/sparc/ttl/sparc-methods.ttl') pos = ( (a, owl.Ontology), (owl.versionIRI, ver_ontid), (owl.versionInfo, rdflib.Literal(iso)), #(isAbout, rdflib.URIRef(self.uri_api)), #(TEMP.hasHumanUri, rdflib.URIRef(self.uri_human)), (rdfs.label, rdflib.Literal(f'TODO export graph')), #(rdfs.comment, self.header_graph_description), #(owl.imports, sparc_methods), ) for p, o in pos: yield ontid, p, o
def __init__(self): self._start_time = utcnowtz() self._start_local_tz = TZLOCAL() # usually PST PDT