 |
Here is a tiny example of how to use the OWL support in Pike.
The program reads an OWL file and lists all OWL classes that
occurred in the file.
int main(int argc, array argv)
{
object owlset = Web.OWL();
string input = Stdio.read_file(argv[1]);
owlset->parse_xml(input);
write("Classes:\n");
foreach(owlset->find_statements(0,
owlset->rdf_type,
owlset->owl_Class),
array statement)
write("- %O\n", statement[0]);
return 0;
}
|