示例#1
0
文件: core.py 项目: gsanou/pyontutils
obo, RO, prov, *_ = makeNamespaces('obo', 'RO', 'prov')
filename = 'methods-core'
prefixes = None
OntCuries['HBP_MEM'] = 'http://www.hbp.FIXME.org/hbp_measurement_methods/'
imports = NIFTTL['nif_backend.ttl'],
#imports = obo['bfo.owl'], obo['ro.owl']
#imports = tuple()
comment = 'The core components for modelling techniques and methods.'
branch = 'methods'
_repo = True
debug = True

triples = (
    # data properties
    odp(ilxtr.hasAspectValue),
    odp(ilxtr.hasConstrainingAspect_value,
        ilxtr.isConstrainedBy),  # data type properties spo object property
    (ilxtr.hasConstrainingAspect_value, rdfs.subPropertyOf,
     ilxtr.hasAspectValue),
    olit(ilxtr.hasConstrainingAspect_value, rdfs.label,
         'has constraining aspect value'),
    olit(ilxtr.hasConstrainingAspect_value, definition, (
        'In some cases a protocol is classified based on the value '
        'that a constraining aspect has, not just that it is constrained on that aspect. '
    )),
    olit(ilxtr.hasConstrainingAspect_value, rdfs.comment, (
        'For example, dead and alive are 0 and 1 on livingness respectively. '
        'we can also define dead and alive, as disjoint, but that does not effectively '
        'model that they are two sides of the same coin for any binary definition. '
        'Note that this implies that these are not just qualities, they must have an '
示例#2
0
    oc(ilxtr.classificationCriteria, ilxtr.informationEntity),
    oc(ilxtr.identificationCriteria, ilxtr.informationEntity),
    oc(ilxtr.categoryNames, ilxtr.informationEntity),
    oc(ilxtr.categoryAssignments, ilxtr.informationEntity),
    oc(ilxtr.nameIdentityMapping, ilxtr.informationEntity),
)

triples += (
    # results
    oc(ilxtr.result),
    olit(ilxtr.result, definition, ('The result of a measurement.')),
    oop(ilxtr.resultAspect),
    (ilxtr.resultAspect, rdfs.domain, ilxtr.result),
    (ilxtr.resultAspect, rdfs.range,
     ilxtr.aspect),  # these are preferably units?
    odp(ilxtr.resultValue),
    oop(ilxtr.hasResult),  # or hadResult ...
    (ilxtr.hasResult, rdfs.subClassOf, prov.generated),
    (ilxtr.hasResult, rdfs.domain, ilxtr.protocolExecution),
    # FIXME this domain restriction may not work quite like we want it to
    # ideally we would like to take an instance of a material entity + an aspect
    # and bind the result to that pair, with some additional sematics outside owl
    # you could use [ a protc:Result; protc:onAspect asp:myAspect; protc:resultValue 100; protc:impl <some impl id>; protc:prov <id>]
    # we could then and lift that to [ a owl:Restriction; owl:onProperty asp:myAspect; owl:hasValue 100]
    # or we could create a new iri from the intersection of the aspect and the implementation or better yet the execution prov id ...
    (ilxtr.hasResult, rdfs.range, ilxtr.result),
    oc_(
        ilxtr.protocolExecution,
        oec(ilxtr.technique,
            *restrictions((ilxtr.isConstrainedBy, ilxtr.protocol), )),
    ),