Skip to content

ontModel 说明文档

Junchao Wu edited this page May 17, 2022 · 3 revisions

ontModel模块

ontModel封装了owl本体规则中常涉及到的四种基本概念规则:类(Class),实例(Individual),实体关系(Object Property),实体属性(Data Property),这些概念类别共享了3个基本类属性字段:

  • className:类名
  • domainName:owl领域名
  • owlLines:类下本体资源owl描述

oneClass

OneClass的基类

# 定义对象
oneClass = OneClass(domainName, className, owlLines)

# comment
oneClass.addComment(comment)
oneClass.updateComment(comment)
oneClass.deleteComment()

# EquivalentClass
oneClass.addEquivalentClass(equivalentClassName)
oneClass.updateEquivalentClass(equivalentClassName)
oneClass.deleteEquivalentClass()

# SuperClass
oneClass.addSuperClass(superClassName)
oneClass.updateSuperClass(superClassName)
oneClass.deleteSuperClass()

# disjointClassName
oneClass.addDisjointClass(disjointClassName)
oneClass.updateDisjointClass(disjointClassName)
oneClass.deleteDisjointClass()

objectProperty

Object property的基类

# 定义对象
op = OP(domainName, className, owlLines)

# comment
op.addComment(comment)
op.updateComment(comment)
op.deleteComment()

# Equivalentop
op.addEquivalentop(equivalentOPName)
op.updateEquivalentop(equivalentOPName)
op.deleteEquivalentop()

# InverseOf
op.addInverseOf(inverseOfOPName)
op.updateInverseOf(inverseOfOPName)
op.deleteInverseOf()

# SubPropertyOf
op.addSubPropertyOf(subPropertyOfOPName)
op.updateSubPropertyOf(subPropertyOfOPName)
op.deleteSubPropertyOf()

# Domain
op.addDomain(domainName)
op.updateDomain(domainName)
op.deleteDomain()

# Range
op.addRange(rangeName)
op.updateRange(rangeName)
op.deleteRange()

# DisjointOP
op.addDisjointOP(disjointOPName)
op.updateDisjointOP(disjointOPName)
op.deleteDisjointOP()

dataProperty

Data property的基类

# 定义对象
dp = DP(domainName, className, owlLines)

# comment
dp.addComment(comment)
dp.updateComment(comment)
dp.deleteComment()

# Equivalentdp
dp.addEquivalentdp(equivalentDPName)
dp.updateEquivalentdp(equivalentDPName)
dp.deleteEquivalentdp()

# SubPropertyOf
dp.addSubPropertyOf(subPropertyOfDPName)
dp.updateSubPropertyOf(subPropertyOfDPName)
dp.deleteSubPropertyOf()

# Domain
dp.addDomain(domainName)
dp.updateDomain(domainName)
dp.deleteDomain()

# Range
dp.addRange(rangeName)
dp.updateRange(rangeName)
dp.deleteRange()

# DisjointDP
dp.addDisjointDP(disjointDPName)
dp.updateDisjointDP(disjointDPName)
dp.deleteDisjointDP()

individual

Individual的基类

# 定义对象
individual = Individual(domainName, className, owlLines)

# type
individual.addType(typeName)
individual.updateType(typeName)
individual.deleteType()

# comment
individual.addComment(comment)
individual.updateComment(comment)
individual.deleteComment()

# SameAs
individual.addSameAs(indName)
individual.updateSameAs(indName)
individual.deleteSameAs()

# DataProperty
individual.addDataProperty(dpName, dpValue)
individual.updateDataProperty(dpName, dpValue)
individual.deleteDataProperty(dpName)

# ObjectProperty
individual.addObjectProperty(opName, opValue)
individual.updateObjectProperty(opName, opValue)
individual.deleteObjectProperty(opName)

generalAxioms

General axioms的基类

# 定义对象
ga = GA(domainName, className, owlLines)

#DiferentInds
ga.addDiferentInds(indsList)

Clone this wiki locally