본문 바로가기

.주제별/일반

[Semantic] 04-02. OWL Language

  1. Syntax
    OWL은 RDF/ RDFS에 기초를 둘뿐 아니라, RDF의 XML syntax을 사용한다.
    물론 XML Syntax는 OWL의 Primary syntax이지만, 효과있는 Readable syntax가 되기에는
    한계가 있다.

    이런 이유로, OWL의 다른 Syntactic Form들이 명시된다.
    1. XML-based syntax
      RDF convention을 따르지 않는 XML-Based syntax이다.
    2. Abstract syntax
      'Language specification doc'에 사용되는 'Abstract syntax'이다.
      이는 XML syntax 또는 RDF/XML syntax보다는 좀더 readable/ compact 하다.
    3. Graphical syntax
      UML 언어 변환에 기반한 Graphical syntax이다.
  2. Header
    1. rdf:RDF
      OWL Document는 통상 'OWL Ontology'라 불리면서, RDF document이다.
      따라서, OWL ontology의 'Root(header) element'는, 여러 namespace을 명시하고 있는
      "rdf:RDF element'가 된다.

      Examples]

      <rdf:RDF
           xmlns:owl  = "http://www.w3.org/2002/07/owl#"
           xmlns:rdf   = "http://www.w3.org/1999/02/22-rdf-syntax-ns#"
           xmlns:rdfs = "http://www.w3.org/2000/01/rdf-schema#"
           xmlns:xsd  = "http://www.w3.org/2001/XMLSchema">


    2. owl:Ontology
      OWL ontology는 'housekepping' 목적으로, assertion이 들어갈 수 있다.
      이 Assertion에는, Comment, 버젼, 다른 Ontology이 명시될수 있다.

      Examples]

      <owl:Ontology rdf:about=">
          <rdfs:comment>An example OWL ontology</rdfs:comment>
          <owl:priorVersion
                   rdf:resource="http://www.mydomain.org/uni-ns-old"/>
          <owl:imports
                   rdf:resource="http://www.mydomain.org/persons"/>
          <rdfs:label>University Ontology</rdfs:label>
      </owl:Ontology>


  3. Class elements
    Class 들은 "owl:Class" element을 통해서 선언된다.

    Example I ] owl:Class
    "associateProfessor" 라는 Class을 선언

    <owl:Class rdf:ID="associateProfessor">
        <rdfs:subClassOf rdf:resource="#academicStaffMember"/>


    Example II] owl:disdjointWith
    "associateProfessor" calss와 disjoint관계의 class."professor" / "assistnatProfessor"

    <owl:Class rdf:about="associateProfessor">
        <owl:disjointWith rdf:resource="#professor">
        <owl:disjointWith rdf:resource="#assistantProfessor"/>
    </owl:Class>


    Example III] owl:equivalentCalss
    ""

    <owl:Class rdf:ID="faculty">
        <owl:equivalentClass rdf:resource="#academcStaffMember"/>
    </owl:Class>


    기타]
    "owl:Thing" : 모든것(Everything)을 포함하는 general class을 의미
    "owl:Nothing" : Empty class을 의미.

    참고]
    "owl:Class"는 "rdfs:Class"의 subclass이다.


  4. Property elements

    OWL에는, 두가지의 property 가 있다.
    1. Object Properties
      Object와 다른 Object와의 관계를 말함
      e.g., "isTaughtBy", "supervises"..

      <owl:ObjectProperty rdf:ID="isTaughtBy">
          <owl:domain rdf:resource="#course"/>
          <owl:range rdf:resource="#academicStaffMember"/>
          <rdfs:subPropertyOf rdf:resource="involves"/>
      </owl:ObjectProperty>



    2. Datatype properties
      Object와 datatype 값들과의 관계를 말함
      e.g., "phone", "title", "age"..

      <owl:DatatypeProperty rdf:ID="age">
          <rdfs:range rdf:resource="http://www.w3.org/2001/XMLSchema #nonNegativeInteger"/>
      </owl:DatatypeProperty>


    3. Inverse Properties
      e.g., 'isTaugtBy' 와 'teaches'의 inverse 속성 예제.

      <owl:ObjectProperty rdf:ID="teaches">
          <rdf:range rdf:resource="#course"/>
          <rdfs:domain rdf:resource="#academicStaffMember"/>
          <owl:inverserOf rdf:resource="#isTagugtBy"/>
      </owl:ObjectProperty>


    4. Equivalent properties
      e.g.,

      <owl:ObjectProperty rdf:ID="lecturesIn">
          <owl:equivalentProperty rdf:resource="teaches"/>
      </owl:ObjectProperty>


  5. Property restrictions
    C 라는 class가, C' Class의 subclass이라면, C의 모든 Instance 는 C'의 Instance가 된다.
    <==> (C가 어느 조건들을 만족하면, C의 모든 Instance들이 이 조건을 만족한다는 것이고,)
           C'는 이 조건들을 만족하는 모든 Object들을 포함 시킬 수 있다. 
    1. Object Properties
      Object와 다른 Object와의 관계를 말함
      e.g., "isTaughtBy", "supervises"..

      <owl:ObjectProperty rdf:ID="isTaughtBy">
          <owl:domain rdf:resource="#course"/>
          <owl:range rdf:resource="#academicStaffMember"/>
          <rdfs:subPropertyOf rdf:resource="involves"/>
      </owl:ObjectProperty>



    2. Datatype properties
      Object와 datatype 값들과의 관계를 말함
      e.g., "phone", "title", "age"..

      <owl:DatatypeProperty rdf:ID="age">
          <rdfs:range rdf:resource="http://www.w3.org/2001/XMLSchema #nonNegativeInteger"/>
      </owl:DatatypeProperty>


    3. Inverse Properties
      e.g., 'isTaugtBy' 와 'teaches'의 inverse 속성 예제.

      <owl:ObjectProperty rdf:ID="teaches">
          <rdf:range rdf:resource="#course"/>
          <rdfs:domain rdf:resource="#academicStaffMember"/>
          <owl:inverserOf rdf:resource="#isTagugtBy"/>
      </owl:ObjectProperty>


    4. Equivalent properties
      e.g.,

      <owl:ObjectProperty rdf:ID="lecturesIn">
          <owl:equivalentProperty rdf:resource="teaches"/>
      </owl:ObjectProperty>


    1. Temp
    2. Temp
    3. Temp
  6. Special properties
    1. Temp
    2. Temp
    3. Temp
  7. Boolean combinations
  8. Enumerations
  9. Datatypes
  10. Versioning information
  11. Layering of OWL