[ rdfs:comment
""" I think there are three major ways we can advance the ViPER 
data format. We could rewrite ViPER to use MPEG-7 natively, switch to an
OWL/RDF based description logic system, or more conservatively expand
the system to include <is a> relations and take links to descriptors as
attributes.

The first would be to take on the often-suggested MPEG-7
format. While this appears to be a simple proposition at first, it would
involve modifying the format to have the description definitions in a
seperate file, or something. I haven't quite figured it out. This goes
back to something I thought about when switching over to XML - using
XML-Schema as the <config> section of the files. I didn't do it at the
time, since there wasn't a convenient method of accessing the datatype
information through the DOM.

ViPER should be rewritten as rdf using owl. This would give it a
stronger advantage over mpeg-7 while also giving some tools and a neater
format (n3). Should it use rdf for the viper and xsd for the data? I
would choose to allow the user to select the type of attribute. The main
problem I see is developing a robust and straightforward representation
of "temporally qualified triples". I find this particularly interesting
in light of other work to describe media using description logics like
OWL.

Finally, a more conservative approach would extend the current model
with a 'extends' attribute on the 'config' tag. There would also be two
additional data types, 'relation' and 'subtype-value'. The first one
would be like having an ObjectProperty that is restricted to other
descriptors, and the second is roughly equivalent to restricting the
ObjectProperty to be a subclass of a given class, or disjunction of
classes.

This page represents an idea for representing ViPER data in OWl. First
is the ontology: """ ] .

###################################################################
# preliminary OWL schema 
# will require an xml schema document, still, to define
# interval and range data types.
######

:MediaFile a owl:Class ;
        rdfs:comment "A Media file that is described by some viper:Descriptors.
" ;
        rdfs:subClassOf [
                a owl:Restriction ;
                owl:onProperty :hasFileDescriptor ;
                owl:maxCardinality "1" ] .
# Without going to OWL-DL, there is no way to do this.
# So I have to have 3 different :hasDescriptor
# properties that do not inherit from one place.
# If I could use owl:oneOf, then I could 
# do it. This goes to an OWL-DL v. OWL-Lite debate.
# see http://www.w3.org/TR/owl-guide/#OwlVarieties

:hasFileDescriptor a owl:ObjectProperty ;
        rdfs:range :MediaFile ;
        rdfs:domain :FileDescriptor .
:hasContentDescriptor a owl:ObjectProperty ;
        rdfs:range :MediaFile ;
        rdfs:domain :ContentDescriptor .
:hasObjectDescriptor a owl:ObjectProperty ;
        rdfs:range :MediaFile ;
        rdfs:domain :ObjectDescriptor .

:Descriptor a owl:Class.
:frameRange a owl:DatatypeProperty ;
        rdfs:range :Descriptor ;
        rdfs:domain vd:spanList .
:timeRange a owl:DatatypeProperty ;
        rdfs:range :Descriptor ;
        rdfs:domain vd:spanList .
        # like "12:13 16:17"

# Don't need an id, that is handled by rdf.
# should have a name, perhaps? Or maybe have
# the name be handled by the rdfs:label
# of the class. Too bad you can't say that
# a Descriptor can't be directly instantiated.

:FileDescriptor a owl:Class;
        rdfs:subClassOf :descriptor ;
        rdfs:subClassOf [
                a owl:Restriction ;
                owl:onProperty :hasAttribute ;
                owl:allValuesFrom :StaticAttribute ] .

:ContentDescriptor a owl:Class;
        rdfs:subClassOf :descriptor ;
        rdfs:subClassOf [
                a owl:Restriction ;
                owl:onProperty :hasAttribute ;
                owl:allValuesFrom :StaticAttribute ] .

:ObjectDescriptor a owl:Class;
        rdfs:subClassOf :descriptor .

:hasAttribute a owl:ObjectProperty ;
        rdfs:domain :Descriptor ;
        rdfs:range :Attribute .
# If we want to use anything less than 
# OWL Full and have reference types mixed with 
# data types, we need to make everything Objects
:Attribute a owl:Class .
:DynamicAttribute a owl:Class ;
        rdfs:subClassOf :Attribute .
:frameSpan a owl:DatatypeProperty ;
        rdfs:range :DynamicAttribute ;
        rdfs:domain vd:span .
:timeSpan a owl:DatatypeProperty ;
        rdfs:range :DynamicAttribute ;
        rdfs:domain vd:span .

:StaticAttribute a owl:Class ;
        rdfs:subClassOf :Attribute .


#########################################
# Next comes an example document.
# 

owl:Ontology rdf:about <> ;
        owl:imports <owl> ;
        owl:imports <viper> .
:FileInformation rdfs:subClassOf viper:FileDescriptor .
:named a owl:ObjectProperty ;
        rdfs:subPropertyOf viper:hasAttribute ;
        rdfs:label "has file name of" ;
        rdfs:range :FileInformation ;
        rdfs:domain viperdata:svalue . 

:Movement rdfs:subClassOf viper:ObjectDescriptor .
:Arrive rdfs:subClassOf :Movement . # appear on scene
:Exit rdfs:subClassOf :Arrive . # from inside a vehicle
:Depart rdfs:subClassOf :Movement . #leave scene
:Enter rdfs:subClassOf :Depart . # get into a vehicle, disappearing
:Pass rdfs:subClassOf :Arrive ; # Walk through the scene
      rdfs:subClassOf :Depart .
:Approach rdfs:subClassOf :Movement .
:Leave rdfs:subClassOf :Movement .
:Move rdfs:subClassOf :Movement . # w/o entering or exiting scene.
    # perhaps should be subclass of leave and approach

:goTowards a rdfs:ObjectProperty . # applies to approach activities
:goFrom a rdfs:ObjectProperty . # applies to leave activities

:involvesPerson a rdfs:ObjectProperty . # applies to Movements
:involvesVehicle a rdfs:ObjectProperty . # also to Movements

<a.mpg> a viper:Sourcefile ;
        viper:hasFileDescriptor
                [       a :FileInformation ;
                        :someAttribute [
                                a :svalue ;
                                :hasValue "A file" ] ] ;
        viper:hasObjectDescriptor
		[	a :Leave ;
			:- :leaveEvent01 ;
			:goFrom :person01 ] ; # what about dynamic
 						# attributes?
	viper:hasObjectDescriptor
		[	a :Person ;
			:- :person01 ;
			:

] .

###########################################
How to express in the old format?

First, allow inheritance of descriptors.
<descriptor name="Movement" type="OBJECT"> ....
<descriptor name="Arrival" type="OBJECT" subDescOf="Movement"> ....
 will inherit all Movement's attributes. Not sure how to handle
overloading yet.

<attribute name="goFrom" type="relation" dynamic="false">
  <data:relationConstraint type="isa">Locale</data:relationConstraint>
</attribute>

This should be easy to build into the API. Not sure how difficult it
would be to add to viper-gt 3.6, and not clear about how to evaluate
these.
