The ontology projection descriptor
The projection is represented in an XML document, conforming to the schema associated to the namespace
http://semanticturkey.uniroma2.it/extensions/uimast/schemas/projection-20081117#
.
Even if there isn't a projection editor, any XML editor can provide a great help (template generation, autocompletion, validation, etc...), once the schema has been added to its Catalog.
The overall projection should look as the following.
        <!ENTITY proj "http://semanticturkey.uniroma2.it/extensions/uimast/schemas/projection-20081117#"> 
        <!ENTITY base "ontology default namespace"> 
]>
<projection xmlns="&proj;">
        <typesystem location="type system URI" /> 
        <annotation type="a type" mode="xpointer"> 
                <!-- [feature initializers] -->
        </annotation> 
        <project class="source class" into="target type"> 
                <!-- [feature initializers] -->
        </project>
</projection>
It is advisable to define in the DTD internal subset two entities, which may be used later to shorten the URIs employed in the projection.
The entity proj
expands to the projection namespace URI, while the entity base
should
expand to the ontology default namespace (a symbol Foo
in the default namespace may be
identified by the URI &base;Foo
).
The mandatory element typesystem
specifies the type system location either by absolute or
relative (wrt the projection descriptor) file URI.
The mandatory element annotation
sets the annotation base type, which holds the regional reference.
The attribute mode
customizes the export mechanism: at the present it must have the value xpointer
meaning that the regional reference is an XPointer expression.
The feature initializers within the annotation
element intialize the features of that type.
There must be zero or more project
element to project an ontology class into a type.
The attribute class
specifies the URI of the source class and the attribute into
is the fully qualified name of the target type.
The feature initializers within the project
element intialize the features of the target type.
The schema can enforce that a class isn't projected more than once and that a feature isn't initialized twice in a given context.
It cannot express the constraint that given two classes A
, B
and their associated types T(A)
, T(B)
,
if A rdf:subClassOf B
then T(A) extends or is equal to T(B)
.
A feature initializer should look like the following.
The attribute name
is the short name of the feature to be initialized.
The attribute property
is the URI of a property to be used to initialize the feature. When the
data are projected, the property is resolved against the current domain object.
The attribute value
is a literal representation (according to the XML Schema standard)
of the value to be assigned to the feature.
The schema isn't able to express the following constraints:
- the feature must belong to the bounding type
the property range must be compatible either with the feature range or its element type (if it is an array feature)
xsd:boolean uima.cas.Boolean xsd:byte uima.cas.Byte xsd:short uima.cas.Short xsd:int uima.cas.Integer xsd:long uima.cas.Long xsd:float uima.cas.Float xsd:double uima.cas.Double xsd:string uima.cas.String xsd:string enumerated type In the last case each property value must be checked, to ensure that it is allowed. Indeed, at the present Semantic Turkey doesn't let the user restrict a property range to a given set of values.
-
the attribute
value
andproperty
are mutually exclusive
In the context of the element annotation
the user must initialize the
annotation base type with the regional reference of the current annotation.
It may be accessed through the wired property &proj;range
, which
evaluates to the XPointer expression associated with the current annotation.
The wired property &proj;identity
evaluates to the URI identifying the
current domain object.
Example projection
There is a sample projection in the downloads section of UIMAST project site. It is composed of the following files:
- sample_ont.owl: a simple ontology containing annotations taken about three academic researchers and the university they work in. The ontology imports the ST sample ontology:
http://art.uniroma2.it/ontologies/st_example
and reuses some of its concepts. In particular, it extends the conceptstx:Person
with two subconcepts:Professor
andResearcher
, which are used to typize the annotated individuals. - stx-mine_typesystem.xml: a type system, containing the definition of UIMA type:
XPointerAnnotation
, which is the base type for annotations accepted by UIMAST. It also contains the type:Persona
(Person), and a feature:lavoro
(job) describing the kind of position of people, and pointing to the UIMA type:Occupazione
(Position), which accepts two values: professore (professor) and ricercatore (researcher). - stx-mine_projection.xml: this projection file contains rules for projecting all the
stx:Person
subclasses in the sample ontology to the UIMA typePersona
. In particular, classProfessor
is projected over the UIMA typePersona
with thelavoro
feature set toprofessore
, while classResearcher
is projected over the UIMA typeResearcher
with thelavoro
feature set toresearcher