Ejemplo n.º 1
0
    ns.Continuant,
    graph=g,
    comment=Literal('Material entity. Examples: cells, molecules, joints'))
occ = Class(
    ns.Occurent,
    graph=g,
    comment=Literal('Occuring processes, which start and end at some point'))
condition = Class(
    ns.Condition,
    graph=g,
    comment=Literal('Medical condition. Could be a pathology or a disorder'))

# ##  Properties

# Main properties, such as `capable of`, `negatively regulates`
capable_of = Property(ns.capable_of, graph=g, domain=[occ], range=[occ])
negatively_regulates = Property(ns.negatively_regulates,
                                graph=g,
                                domain=[occ],
                                range=[occ])
positively_regulates = Property(ns.positively_regulates,
                                graph=g,
                                domain=[occ],
                                range=[occ])
reduces_levels_of = Property(ns.reduces_levels_of,
                             graph=g,
                             domain=[occ],
                             range=[con])
increases_levels_of = Property(ns.increases_levels_of,
                               graph=g,
                               domain=[occ],
Ejemplo n.º 2
0
        ns.identifier,
        comment=Literal('defined by: Asan Agibetov, Marta Ondresik, Ernesto Jimenez-Ruiz'),
        graph=g)


# ## Main classes
#
con = Class(ns.Continuant, graph=g, comment=Literal('Material entity. Examples: cells, molecules, joints'))
occ = Class(ns.Occurent, graph=g, comment=Literal('Occuring processes, which start and end at some point'))
condition = Class(ns.Condition, graph=g, comment=Literal('Medical condition. Could be a pathology or a disorder'))

# ##  Properties

# Main properties, such as `capable of`, `negatively regulates`
# capable_of = Property(ns.capable_of, graph=g, domain=[occ], range=[occ])
negatively_regulates = Property(ns.negatively_regulates, graph=g, domain=[occ], range=[occ])
positively_regulates = Property(ns.positively_regulates, graph=g, domain=[occ], range=[occ])
# reduces_levels_of = Property(ns.reduces_levels_of, graph=g, domain=[occ], range=[con])
# increases_levels_of = Property(ns.increases_levels_of, graph=g, domain=[occ], range=[con])
# inhibits = Property(ns.inhibits, graph=g, domain=[occ], range=[occ])
# activates = Property(ns.activates, graph=g, domain=[occ], range=[occ])
results_in = Property(ns.results_in, graph=g, domain=[occ], range=[occ])
causes = Property(ns.causes, graph=g, domain=[occ], range=[occ])

# ## Atomic continuants
#
# We model basic classes in our hypothesis ontology, which represent bio
# macro-molecules, biomolecules and cells in the cartillage
#
# * chondrocytes (cells)
# * cytokines (biomolecules), pro-inflammatory guys
Ejemplo n.º 3
0
 def start_property(graph):
     return Property(
         identifier=URIRef(SCENARIO['start']),
         subPropertyOf=[OWL['topObjectProperty'], SCENARIO['start']],
         graph=graph)
Ejemplo n.º 4
0
 def initial_property(graph):
     return Property(
         identifier=URIRef(SCENARIO['initial']),
         subPropertyOf=[OWL['topObjectProperty'], SCENARIO['initial']],
         graph=graph)
Ejemplo n.º 5
0
 def namespace_property(graph):
     return Property(identifier=URIRef(SCENARIO['time']),
                     baseType=OWL['AnnotationProperty'],
                     graph=graph)
Ejemplo n.º 6
0
from rdflib import Graph, Namespace
from rdflib.extras.infixowl import OWL_NS, Class, Restriction, Property
from rdflib.namespace import NamespaceManager

ccf = Namespace('http://purl.org/ccf/')
namespace_manager = NamespaceManager(Graph())
namespace_manager.bind('ccf', ccf, override=False)
namespace_manager.bind('owl', OWL_NS, override=False)

g = Graph()
g.namespace_manager = namespace_manager

part_of = Property(ccf.part_of, graph=g)

organ = Class(
    ccf.Organ,
    graph=g,
    subClassOf=[Restriction(part_of, graph=g, someValuesFrom=ccf.Body)])

organ_part = Class(ccf.OrganPart, graph=g)
organ_part.subClassOf = [Restriction(part_of, graph=g, someValuesFrom=organ)]

kidney_capsule = Class(ccf.KidneyCapsule, graph=g)
kidney_capsule.subClassOf = [
    ccf.OrganPart,
    Restriction(part_of, graph=g, someValuesFrom=ccf.Kidney)
]

kidney = Class(ccf.Kidney, graph=g, subClassOf=[organ])

left_kidney = Class(ccf.LeftKidney, graph=g, subClassOf=[kidney])