コード例 #1
0
    def common(self):
        yield workflow.hasNextStep, a, owl.ObjectProperty
        yield workflow.hasTagOrReplyTag, a, owl.ObjectProperty
        yield workflow.hasTag, a, owl.ObjectProperty
        yield workflow.hasTag, rdfs.subPropertyOf, wf.hasTagOrReplyTag
        yield workflow.hasReplyTag, a, owl.ObjectProperty
        yield workflow.hasReplyTag, rdfs.subPropertyOf, wf.hasTagOrReplyTag

        yield workflow.hasOutput, a, owl.ObjectProperty
        yield workflow.hasOutputTag, a, owl.ObjectProperty
        yield workflow.hasOutputTag, rdfs.subPropertyOf, workflow.hasOutput
        yield workflow.hasOutputExact, a, owl.ObjectProperty
        yield workflow.hasOutputExact, rdfs.subPropertyOf, workflow.hasOutput

        yield wf.state, a, owl.Class

        yield wf.annotation, a, owl.Class
        yield wf.pageNote, a, owl.Class
        yield wf.exact, a, owl.Class
        yield wf.reply, a, owl.Class
        yield wf.tag, a, owl.Class
        if self.do_restrictions:
            # prevent double up if both are imported at the same time
            isAttachedTo = restriction(wf.isAttachedTo, wf.annotation)
            yield from isAttachedTo(wf.exact)
            yield from isAttachedTo(wf.tag)
            refersTo = restriction(wf.refersTo, wf.annotation)
            yield from refersTo(wf.reply)

        yield wf.pageNoteInstance, a, wf.pageNote  # wf.exactNull ...
コード例 #2
0
    def base(self):
        yield from self.common()

        yield workflow.initiatesAction, a, owl.ObjectProperty

        # FIXME these should not have to be asserted
        # but the order of nodes is all wrong :/
        yield RRIDCUR.Kill, a, wf.tagCurator
        yield RRIDCUR.Validated, a, wf.tagCurator
        yield RRIDCUR.UnresolvedCur, a, wf.tagScibot
        yield RRIDCUR.MetadataMismatch, a, wf.tagCurator

        yield wf.tagScibot, a, owl.Class
        yield wf.tagScibot, rdfs.subClassOf, wf.tag
        yield wf.tagCurator, a, owl.Class
        yield wf.tagCurator, rdfs.subClassOf, wf.tag

        hasCurator = restriction(wf.isAttachedTo,
                                 restrictionN(wf.hasCurator, workflow.curator))
        yield from hasCurator(wf.tagCurator)

        yield wf.putativeRRID, a, owl.Class
        yield wf.scibotRRID, a, owl.Class
        yield wf.scibotRRID, rdfs.subClassOf, wf.putativeRRID
        yield wf.resolvingRRID, a, owl.Class
        yield wf.resolvingRRID, rdfs.subClassOf, wf.putativeRRID
        yield wf.canonicalRRID, a, owl.Class
        yield wf.canonicalRRID, rdfs.subClassOf, wf.resolvingRRID

        yield wf.RRID, a, wf.tagCurator
コード例 #3
0
ファイル: simple.py プロジェクト: memartone/pyontutils
 def combinator(self):
     """ yes, this is a property that returns a function """
     return cmb.restriction(self.predicate, self.object)
コード例 #4
0
ファイル: core.py プロジェクト: gsanou/pyontutils
 # for example a word count for a document?
 # I guess all implementations of symbolic systems are physical
 # and ultimately the distinction between symbolic and physical
 # isn't actually useful for aspects
 # we do however need a notation of bottom for aspects which
 # says that for certain inputs the aspect cannot return a
 # meaningful (correctly typed non null) value
 (asp.Local, owl.disjointWith, asp.nonLocal),
 oc(asp.Local,
    ilxtr.aspect),  # aka unqualified or does not need qualification
 olit(asp.Local, rdfs.label, 'aspect unqualified'),
 olit(asp.Local, definition,
      'aspect of thing that is invariant to context'),
 oc(asp.nonLocal, ilxtr.aspect),  # qualified
 olit(asp.nonLocal, rdfs.label, 'aspect qualified'),
 oc_(asp.nonLocal, restriction(ilxtr.hasContext, BFO['0000002'])),
 # FIXME context isn't just the material entity it is the aspects thereof
 # the context probably also needs to be a technique that binds all
 # intersectionOf for multiple aspects? hrm
 # the additional aspects?
 # context dealt with below
 # binding a nonLocal aspect to a single entity will
 # lead to construction of a context
 olit(asp.nonLocal, definition,
      'aspect of thing that varies depending on context'),
 oop_(hasParticipant,
      propertyChainAxiom(ilxtr.processHasAspect, ilxtr.hasContext)),
 restG(
     blankc(owl.onProperty, ilxtr.hasPrimaryAspect_dAdT),
     blankc(owl.someValuesFrom, ilxtr.nonZero),
     blankc(rdfs.subClassOf,
コード例 #5
0
ファイル: helper.py プロジェクト: gsanou/pyontutils
    # 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), )),
    ),
    (ilxtr.protocolExecution, rdfs.subClassOf, prov.Activity),
    olit(ilxtr.protocolExecution, rdfs.label, 'protocol execution'),
)

triples += (  # material entities

    ## material entity
    (ilxtr.materialEntity, owl.equivalentClass, BFO['0000040']),
    oc_(ilxtr.materialEntity, restriction(ilxtr.hasAspect, asp.livingness),
        restriction(ilxtr.hasAspect, asp['is'])),
    oc(ilxtr.compositeMaterialEntity, ilxtr.materialEntity),

    # more real than real
    oc(ilxtr.theObservableUniverse,
       ilxtr.compositeMaterialEntity),  # or is it a process...
    oc_(
        ilxtr.theObservableUniverse,
        restriction(ilxtr.hasExpAspect, asp.speedOfLight),
        restriction(ilxtr.hasExpAspect, asp.PlankAspect),
        restriction(ilxtr.hasExpAspect, asp.elementaryCharge),
        restriction(ilxtr.hasExpAspect, asp.JosephsonAspect),
        restriction(ilxtr.hasExpAspect, asp.vonKlitzingAspect),
        restriction(ilxtr.hasExpAspect, asp.GravitationalAspect),
        restriction(ilxtr.hasExpAspect, asp.BoltzmannAspect),