<?xml version='1.0' encoding='ISO-8859-1'?>
<!DOCTYPE rdf:RDF [
         <!ENTITY rdf 'http://www.w3.org/1999/02/22-rdf-syntax-ns#'>
         <!ENTITY bm 'http://www.w3.org/2002/01/bookmark#'>
         <!ENTITY ogt 'http://www.cs.helsinki.fi/group/seco/ns/2004/03/ontogator#'>
         <!ENTITY xsd 'http://www.w3.org/2000/10/XMLSchema#'>
         <!ENTITY owl 'http://www.w3.org/2002/07/owl#'>
         <!ENTITY rdfs 'http://www.w3.org/2000/01/rdf-schema#'>
]>
<rdf:RDF xml:base="&ogt;"
         xmlns="&ogt;" 
         xmlns:ogt="&ogt;" 
         xmlns:bm="&bm;" 
         xmlns:owl="&owl;" 
         xmlns:rdf="&rdf;" 
         xmlns:xsd="&xsd;" 
         xmlns:rdfs="&rdfs;">

  <owl:Ontology rdf:about="">
      <rdfs:comment>$Id: ontogator.owl,v 1.1.2.1 2004/03/18 09:51:03 ssaarela Exp $</rdfs:comment>
      <rdfs:label>View-based search ontology for Ontogator.</rdfs:label>
  </owl:Ontology>

  <owl:Class rdf:ID="CategoryBase"/>

  <owl:Class rdf:ID="Category">
    <rdfs:label>Category</rdfs:label>
    <rdfs:comment xml:lang="en">
      Categories differ from Topics in that only one super category is allowed.
      Categories are not meant to be constructed as such but to be projected 
      from an ontology based knowledge base e.g. Topic-definitions made with Amaya
      or FMS Ontology. 
                        
      A category definition should have rdfs:label and possibly also rdfs:comment.
      A category may also have weight specified, which should be interpreted as weight
      of a triple _:c1 ogt:subCategoryOf _:c2, where _:c1 ogt:weight X. 
      This interpretation is unambiguous since categories can have at most one super category. 
    </rdfs:comment>
    <rdfs:subClassOf rdf:resource="&bm;Topic"/>
  </owl:Class>

  <ogt:Category rdf:ID="RootCategory">
    <rdfs:comment xml:lang="en">
      Top level categories should be sub categories of ogt:RootCategory. 
    </rdfs:comment>
  </ogt:Category>

  <owl:ObjectProperty rdf:ID="catid">
    <rdfs:comment xml:lang="en">
      Implementation dependent identifier for category.
    </rdfs:comment>
    <rdfs:domain rdf:resource="#Category"/>
    <rdfs:range rdf:resource="&xsd;string"/>
  </owl:ObjectProperty>

  <owl:ObjectProperty rdf:ID="projectionOf">
    <rdfs:comment xml:lang="en">
      If the category is a projection of some (domain ontology) resource
      the original resource is identified using this property. 
    </rdfs:comment>
    <rdfs:domain rdf:resource="#Category"/>
    <rdfs:range rdf:resource="&rdfs;Resource"/>
  </owl:ObjectProperty>

  <owl:FunctionalProperty rdf:ID="subCategoryOf">
    <rdfs:comment xml:lang="en">
      Super category.
      Only one super category allowed per Category.
    </rdfs:comment>
    <rdfs:subPropertyOf rdf:resource="&bm;subTopicOf"/>
    <rdfs:domain rdf:resource="#Category"/>
    <rdfs:range rdf:resource="#Category"/>
  </owl:FunctionalProperty>

  <owl:FunctionalProperty rdf:ID="hasRoot">
    <rdfs:comment xml:lang="en">
      The root of the category hierarchy. 
      Only one root category allowed per Category.
    </rdfs:comment>
    <rdfs:subPropertyOf rdf:resource="&bm;subTopicOf"/>
    <rdfs:domain rdf:resource="#Category"/>
    <rdfs:range rdf:resource="#Category"/>
  </owl:FunctionalProperty>

  <owl:ObjectProperty rdf:ID="subCategories">
    <rdfs:comment xml:lang="en">
      Sub categories (ordered list).
      Values of this property are collections. 
    </rdfs:comment>
    <owl:inverseOf rdf:resource="#subCategoryOf"/>
    <rdfs:domain rdf:resource="#Category"/>
    <rdfs:range rdf:resource="#Category"/>
  </owl:ObjectProperty>

  <owl:DatatypeProperty rdf:ID="bookmarkHits">
    <rdfs:comment xml:lang="en">
      Hits provides an estimation of the size of the result set 
      with current restrictions.
    </rdfs:comment>
    <rdfs:domain rdf:resource="#Category"/>
    <rdfs:range rdf:resource="&xsd;nonNegativeInteger"/>
  </owl:DatatypeProperty>

  <owl:DatatypeProperty rdf:ID="directBookmarkHits">
    <rdfs:comment xml:lang="en">
      Number of hits related directly to this category.
    </rdfs:comment>
    <rdfs:domain rdf:resource="#Category"/>
    <rdfs:range rdf:resource="&xsd;nonNegativeInteger"/>
  </owl:DatatypeProperty>

  <owl:DatatypeProperty rdf:ID="subCategoryHits">
    <rdfs:comment xml:lang="en">
      Number of unfiltered direct sub categories.
    </rdfs:comment>
    <rdfs:domain rdf:resource="#Category"/>
    <rdfs:range rdf:resource="&xsd;nonNegativeInteger"/>
  </owl:DatatypeProperty>

  <owl:ObjectProperty rdf:ID="topicOf">
    <rdfs:comment xml:lang="en">
      TopicOf-property is used to define boomarks that 
      the category is topic of. 
    </rdfs:comment>
    <owl:inverseOf rdf:resource="&bm;hasTopic"/>
    <rdfs:domain rdf:resource="&bm;Topic"/>
    <rdfs:range rdf:resource="&bm;Bookmark"/>
  </owl:ObjectProperty>

  <owl:DatatypeProperty rdf:ID="position">
    <rdfs:comment xml:lang="en">
      Position of category or bookmark in relation to the other 
      categories/bookmarks of the same parent.
    </rdfs:comment>
    <rdfs:range rdf:resource="&xsd;nonNegativeInteger"/>
  </owl:DatatypeProperty>


  <owl:Class rdf:ID="Facet">
    <rdfs:comment xml:lang="en">
      Results for FacetSelector. 
    </rdfs:comment>
    <rdfs:label xml:lang="en">Facet</rdfs:label>
    <rdfs:subClassOf rdf:resource="#Category"/>
  </owl:Class>

  <owl:DatatypeProperty rdf:ID="remainder">
    <rdfs:comment xml:lang="en">
      Ungrouped bookmark hits. 
    </rdfs:comment>
    <rdfs:domain rdf:resource="#Facet"/>
    <rdfs:range rdf:resource="&xsd;nonNegativeInteger"/>
  </owl:DatatypeProperty>

  <owl:ObjectProperty rdf:ID="facetSelector">
    <rdfs:comment></rdfs:comment>
    <rdfs:domain rdf:resource="#Facet"/>
    <rdfs:range rdf:resource="#FacetSelector"/>
  </owl:ObjectProperty>

  <owl:Class rdf:ID="CategoryConstraint">
    <rdfs:comment xml:lang="en">
      CategoryConstraint is used to express category-based constraints
      and to select categories. 
    </rdfs:comment>
  </owl:Class>

  <owl:ObjectProperty rdf:ID="category">
    <rdfs:comment>
      Select or constraint category by its ogt:catid.
      If no category is provided the selector
      matches all (top) categories. If an instance specifies
      multiple values for ogt:category, the constraint is 
      union of these.
    </rdfs:comment>
    <rdfs:domain rdf:resource="#CategoryConstraint"/>
    <rdfs:range rdf:resource="&xsd;string"/>
  </owl:ObjectProperty>

  <owl:ObjectProperty rdf:ID="projectedFrom">
     <rdfs:comment>
       Constraint categories by of which resource they are projected from.
     </rdfs:comment>
     <rdfs:domain rdf:resource="#CategoryConstraint"/>
     <rdfs:range rdf:resource="&rdfs;Resource"/>
  </owl:ObjectProperty>
        
  <owl:ObjectProperty rdf:ID="categoryKeyword">
    <rdfs:comment>
       Select or constraint categories by keyword.
    </rdfs:comment>
    <rdfs:domain rdf:resource="#CategoryConstraint"/>
    <rdfs:range rdf:resource="&xsd;string"/>
  </owl:ObjectProperty>

  <owl:Class rdf:ID="BookmarkConstraint">
    <rdfs:comment xml:lang="en">
    </rdfs:comment>
    <rdfs:subClassOf rdf:resource="#CategoryConstraint"/>
  </owl:Class>

  <owl:ObjectProperty rdf:ID="bookmarkKeyword">
    <rdfs:comment>
      Select or constraint bookmarks by keyword.
    </rdfs:comment>
    <rdfs:domain rdf:resource="#BookmarkConstraint"/>
    <rdfs:range rdf:resource="&xsd;string"/>
  </owl:ObjectProperty>

  <owl:ObjectProperty rdf:ID="bookmark">
    <rdfs:comment></rdfs:comment>
    <rdfs:domain rdf:resource="#BookmarkConstraint"/>
    <rdfs:range rdf:resource="&rdfs;Resource"/>
  </owl:ObjectProperty>

  <owl:Class rdf:ID="FacetSelector">
    <rdfs:label>FacetSelector</rdfs:label>
    <rdfs:comment>
      Query for Ontogator.
    </rdfs:comment>
    <rdfs:subClassOf rdf:resource="#BookmarkConstraint"/>
  </owl:Class>

  <owl:ObjectProperty rdf:ID="constraint">
    <rdfs:comment xml:lang="en">
      Constraint-property is used to express bookmark-constraints of a 
      view-based query. If multiple constraints are given the result is 
      the intersection of these. Constraints are given as rdf:List
      e.g. using rdf:parseType="Collection".
    </rdfs:comment>
    <rdfs:domain rdf:resource="#FacetSelector"/>
    <rdfs:range rdf:resource="#BookmarkConstraint"/>
  </owl:ObjectProperty>

  <owl:ObjectProperty rdf:ID="acceptLanguage">
    <rdfs:comment xml:lang="en">
      Accepted xml:lang for literals (e.g. rdfs:label).
    </rdfs:comment>
    <rdfs:domain rdf:resource="#FacetSelector"/>
    <rdfs:range rdf:resource="&xsd;string"/>
  </owl:ObjectProperty>

  <owl:DatatypeProperty rdf:ID="filter">
    <rdfs:comment xml:lang="en">
      Filtering type: 

      1) NONE - no filtering, 
      2) PRE-QUERY - categories that have no bookmarks are filtered
      3) POST-QUERY - categories with no bookmark hits are filtered
    </rdfs:comment>
    <rdfs:domain rdf:resource="#FacetSelector"/>
    <rdfs:range rdf:resource="&xsd;string"/>
  </owl:DatatypeProperty>

  <owl:DatatypeProperty rdf:ID="incBookmarkHits">
    <rdfs:comment xml:lang="en">
      Should the number of bookmark hits (ogt:bookmarkHits) be included 
      in the result?
    </rdfs:comment>
    <rdfs:domain rdf:resource="#FacetSelector"/>
    <rdfs:range rdf:resource="&xsd;boolean"/>
  </owl:DatatypeProperty>

  <owl:DatatypeProperty rdf:ID="incPathBookmarkHits">
    <rdfs:comment xml:lang="en">
      Should the number of bookmark hits (ogt:bookmarkHits) be included    
      in the path (ogt:hasRoot) of the result categories?
    </rdfs:comment>
    <rdfs:domain rdf:resource="#FacetSelector"/>
    <rdfs:range rdf:resource="&xsd;boolean"/>
  </owl:DatatypeProperty>

  <owl:DatatypeProperty rdf:ID="incDirectBookmarkHits">
    <rdfs:comment xml:lang="en">
      Should the number of direct bookmark hits (ogt:directBookmarkHits) 
      be included in the result?
    </rdfs:comment>
    <rdfs:domain rdf:resource="#FacetSelector"/>
    <rdfs:range rdf:resource="&xsd;boolean"/>
  </owl:DatatypeProperty>

  <owl:DatatypeProperty rdf:ID="incRemainder">
    <rdfs:comment xml:lang="en">
      Should the number of ungrouped bookmark hits (ogt:remainder) be 
      included in the result?
    </rdfs:comment>
    <rdfs:domain rdf:resource="#FacetSelector"/>
    <rdfs:range rdf:resource="&xsd;boolean"/>
  </owl:DatatypeProperty>

  <owl:DatatypeProperty rdf:ID="incPosition">
    <rdfs:comment xml:lang="en">
      Should the postion of sub categories and bookmarks (ogt:position) 
      be included in the result?
    </rdfs:comment>
    <rdfs:domain rdf:resource="#FacetSelector"/>
    <rdfs:range rdf:resource="&xsd;boolean"/>
  </owl:DatatypeProperty>

  <owl:DatatypeProperty rdf:ID="incSubCategoryHits">
    <rdfs:comment xml:lang="en">
      Should the number of sub category hits (ogt:subCategoryHits) be 
      included in the result?
    </rdfs:comment>
    <rdfs:domain rdf:resource="#FacetSelector"/>
    <rdfs:range rdf:resource="&xsd;boolean"/>
  </owl:DatatypeProperty>

  <owl:DatatypeProperty rdf:ID="incPathSubCategoryHits">
    <rdfs:comment xml:lang="en">
      Should the number of sub category hits (ogt:subCategoryHits) 
      be included in the path (ogt:hasRoot) of the result categories?
    </rdfs:comment>
    <rdfs:domain rdf:resource="#FacetSelector"/>
    <rdfs:range rdf:resource="&xsd;boolean"/>
  </owl:DatatypeProperty>

  <owl:ObjectProperty rdf:ID="incCategoryProperty">
    <rdfs:comment xml:lang="en">
      Property of a category to be included in the results.
    </rdfs:comment>
    <rdfs:domain rdf:resource="#FacetSelector"/>
    <rdfs:range rdf:resource="&rdf;Property"/>
  </owl:ObjectProperty>

  <owl:ObjectProperty rdf:ID="incBookmarkProperty">
    <rdfs:comment xml:lang="en">
       Property of a bookmark to be included in the results.
    </rdfs:comment>
    <rdfs:domain rdf:resource="#FacetSelector"/>
    <rdfs:range rdf:resource="&rdfs;Property"/>
  </owl:ObjectProperty>

  <rdf:Property rdf:ID="ANY_PROPERTY">
    <rdfs:comment xml:lang="en">
      Selector that matches all properties. 
      To be used with incCategoryProperty and incBookmarkProperty.
    </rdfs:comment>
  </rdf:Property>

  <owl:DatatypeProperty rdf:ID="incBookmarks">
    <rdfs:comment xml:lang="en">
      Should URIs of bookmarks related to a category 
      be included in the category hierarchy?

      Default: false
    </rdfs:comment>
    <rdfs:domain rdf:resource="#FacetSelector"/>
    <rdfs:range rdf:resource="&xsd;boolean"/>
  </owl:DatatypeProperty>

  <owl:DatatypeProperty rdf:ID="incPath">
    <rdfs:comment xml:lang="en">
      Should parents (ogt:hasRoot) of the selected category 
      be included in the category hierarchy?
      In a sense this is the counter part to the 
      ogt:incSubCategories property.

      Default: true
    </rdfs:comment>
    <rdfs:domain rdf:resource="#FacetSelector"/>
    <rdfs:range rdf:resource="&xsd;boolean"/>
  </owl:DatatypeProperty>

  <owl:ObjectProperty rdf:ID="incTopics">
    <rdfs:comment xml:lang="en">
      Should topics of categories be included in the result 
      (Bookmark#hasTopic):

      1) NONE - no topics (default),
      2) DIRECT - direct topics,
      3) ALL - direct topics with paths (ogt:hasRoot). 
    </rdfs:comment>
    <rdfs:domain rdf:resource="#FacetSelector"/>
    <rdfs:range rdf:resource="&xsd;string"/>
  </owl:ObjectProperty>

  <owl:ObjectProperty rdf:ID="incSubCategories">
    <rdfs:comment xml:lang="en">
      What sub categories, ALL, DIRECT or NONE, 
      should be included in the result?

      Default: DIRECT
    </rdfs:comment>
    <rdfs:domain rdf:resource="#FacetSelector"/>
    <rdfs:range rdf:resource="&xsd;string"/>
  </owl:ObjectProperty>

  <owl:DatatypeProperty rdf:ID="maxBookmarks">
    <rdfs:comment xml:lang="en">
      Max bookmarks of a given category to be included in the result.
      This restriction is inherited, so if ogt:incSubCategories=ALL and
      ogt:maxBookmarks [ogt:limit = 4], no more than 4 bookmarks will be 
      included in the result for each category in the specified hierarchy.
    </rdfs:comment>
    <rdfs:domain rdf:resource="#FacetSelector"/>
    <rdfs:range rdf:resource="#Restriction"/>
  </owl:DatatypeProperty>

  <owl:DatatypeProperty rdf:ID="maxSubCategories">
    <rdfs:comment xml:lang="en">
      Max sub categories of a given category to be included in the result.
      This restriction is inherited, so if ogt:incSubCategories=ALL and
      ogt:maxBookmarks [ogt:limit = "4"], no more than 4 sub categories 
      will be included in the result for each category in the specified 
      hierarchy.
    </rdfs:comment>
    <rdfs:domain rdf:resource="#FacetSelector"/>
    <rdfs:range rdf:resource="#Restriction"/>
  </owl:DatatypeProperty>

  <owl:DatatypeProperty rdf:ID="skipBookmarks">
    <rdfs:comment xml:lang="en">
      Number of bookmarks of the given category to be skipped.
    </rdfs:comment>
    <rdfs:domain rdf:resource="#FacetSelector"/>
    <rdfs:range rdf:resource="#Restriction"/>
  </owl:DatatypeProperty>

  <owl:DatatypeProperty rdf:ID="skipSubCategories">
    <rdfs:comment xml:lang="en">
      Number of sub categories of the given category to be skipped.
    </rdfs:comment>
    <rdfs:domain rdf:resource="#FacetSelector"/>
    <rdfs:range rdf:resource="#Restriction"/>
  </owl:DatatypeProperty>

  <owl:Class rdf:ID="Restriction">
    <rdfs:comment xml:lang="en">
      Restriction specifies the target category and the limit. 
      If no category is specified the target is the resulting Facet.
    </rdfs:comment>
  </owl:Class>

  <owl:DatatypeProperty rdf:ID="onCategory">
    <rdfs:comment xml:lang="en">
      Specifies the target category (ogt:catid) of a restriction.
      If no category is specified the target is the resulting Facet.
    </rdfs:comment>
    <rdfs:domain rdf:resource="#Restriction"/>
    <rdfs:range rdf:resource="&xsd;string"/>
  </owl:DatatypeProperty>

  <owl:DatatypeProperty rdf:ID="limit">
    <rdfs:comment xml:lang="en">
      Specifies the limit of a restriction.
      Negative values indicate no limit. 
    </rdfs:comment>
    <rdfs:domain rdf:resource="#Restriction"/>
    <rdfs:range rdf:resource="&xsd;integer"/>
  </owl:DatatypeProperty>
</rdf:RDF>


