|
From: <es...@gm...> - 2006-04-11 08:48:00
|
Hello.
I am a new user from RDFAPI-PHP and I can 't assume a owl to read.
I want to mount all of classes, properties and instances defined in owl fil=
e
to memory.
Exactly, I can load the file but don 't know how I can get the classes,
properties and instances.
OntModel only supports the API, listClasses() to get classes. Am I right??
listClasses() returns Resource data type. How can I change Resource to
OntClass..
This is the part of code to get classes in owl file.
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
//create new memory model
$ontModel =3D ModelFactory::getOntModel(MEMMODEL,RDFS_VOCABULARY);
//load the parse document
$ontModel->load(ROOT_DIRECTORY."software.owl");
// load classes
$array =3D $ontModel->listClasses("http://ozzy.cbnu.ac.kr/ontology/ ");
foreach( $array as $resource ){
echo $resouce->getLabel();
// How can I get the classes, properties and instances ??
}
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
I'll very happy if you give me a answer
Thank you.
Yang.
|