|
From: Timo H. <t.h...@ip...> - 2009-11-02 19:02:53
|
Hello,
Im new with using RAP, so I have some really basic-questions.
My first question: Is there a check when adding a property to an instance,
whether the domain and the range is "right" for the property?
A little example:
// Creating the instances
$blade_runner = $movie->createInstance("blade_runner");
$harrison_ford = $actor->createInstance("harrison_ford");
// Creating a property
$directedBy = $ontModel->createOntProperty("directedBy");
$directedBy->addDomain($movie);
$directedBy->addRange($director);
// add the property
$blade_runner->addProperty($directedBy, $harrison_ford);
Does the RAP check that the given instance $harrison_ford is no director and
therefore may not be "connected" over $directedBy with the movie?
If no "consistency-check" exists: Why not? Would it make sense to keep the
consistency of the ontology?
Another question: How can I define the range of a property as a string, for
example to keep the name of an instance?
And my last question (for today ;-)): Is there a possibility to receive the
hierarchical structure of the classes of the ontology?
Best regards,
Timo
|