Ejemplo n.º 1
0
def genfor():
    """
    generate base FOR ontology. for.owl

    This ontology combines RFCD and FOR and defines their relations
    """
    g = Graph()
    g.add((FOR, RDF.type, OWL.Ontology))
    g.add((FOR, RDFS.label, Literal(u'FOR Ontology')))
    g.add((FOR, RDFS.comment,
           Literal(u'An ontology that provides some base '
                   u'definitions for RFCD 1998 and '
                   u'FOR 2008 ontologies.')))
    ontoannot(g, FOR)
    ontoversion(g, FOR)

    g.add((FOR.FOR, RDF.type, OWL.Class))
    g.add((FOR.FOR, RDFS.label, Literal(u'FOR code')))
    g.add((FOR.FOR, RDFS.comment, Literal(u'Superclass for FOR codes')))
    g.add((FOR.FOR, RDFS.subClassOf, SKOS.Concept))

    g.add((FOR08.FOR, RDFS.subClassOf, FOR.FOR))
    g.add((RFCD.RFCD, RDFS.subClassOf, FOR.FOR))

    add_matchingproperties(g)

    genformatches(g)

    return g
Ejemplo n.º 2
0
def genseo():
    """
    generate base SEO ontology. seo.owl

    this ontology combines SEO08 and SEO98 and defines their relations

    TODO: add owl:versionInfo
    """
    g = Graph()
    g.add((SEO, RDF.type, OWL.Ontology))
    g.add((SEO, RDFS.label, Literal(u'SEO Ontology')))
    g.add((SEO, RDFS.comment,
           Literal(u'An ontology that provides some base '
                   u'definitions for SEO 1998 and SEO 2008 '
                   u'ontologies.')))
    ontoannot(g, SEO)
    ontoversion(g, SEO)

    g.add((SEO.SEO, RDF.type, OWL.Class))
    g.add((SEO.SEO, RDFS.label, Literal(u'SEO Code')))
    g.add((SEO.SEO, RDFS.comment, Literal(u'Superclass for SEO codes')))
    g.add((SEO.SEO, RDFS.subClassOf, SKOS.Concept))

    g.add((SEO98.SEO, RDFS.subClassOf, SEO.SEO))
    g.add((SEO08.SEO, RDFS.subClassOf, SEO.SEO))

    add_matchingproperties(g)

    genseomatches(g)
    return g
Ejemplo n.º 3
0
def genseo():
    """
    generate base SEO ontology. seo.owl

    this ontology combines SEO08 and SEO98 and defines their relations

    TODO: add owl:versionInfo
    """
    g = Graph()
    g.add((SEO, RDF.type, OWL.Ontology))
    g.add((SEO, RDFS.label, Literal(u'SEO Ontology')))
    g.add((SEO, RDFS.comment, Literal(u'An ontology that provides some base '
                                     u'definitions for SEO 1998 and SEO 2008 '
                                     u'ontologies.')))
    ontoannot(g, SEO)
    ontoversion(g, SEO)

    g.add((SEO.SEO, RDF.type, OWL.Class))
    g.add((SEO.SEO, RDFS.label, Literal(u'SEO Code')))
    g.add((SEO.SEO, RDFS.comment,
           Literal(u'Superclass for SEO codes')))
    g.add((SEO.SEO, RDFS.subClassOf, SKOS.Concept))

    g.add((SEO98.SEO, RDFS.subClassOf, SEO.SEO))
    g.add((SEO08.SEO, RDFS.subClassOf, SEO.SEO))

    add_matchingproperties(g)

    genseomatches(g)
    return g