Hi,
I tested your ontology. First, it appears that
http://localhost/HRBModel/HBOnto.owl#time is both declared as a DataProperty and a Class. This is not supported by Owlready, and is not clearly defined in OWL. I removed the DataProperty definition, as it is not used in the ontology.
Then, it appears that there is no instances of the "working" class. This explains why the SPARQL query returns an empty list.
You may want to search for subclasses of "working", as follows:
from owlready2 import *
onto_path.append("/tmp")
onto = get_ontology("/tmp/HBOnto.owl").load()
graph = default_world.as_rdflib_graph()
print(list(graph.query("""
SELECT ?x WHERE {
?x rdfs:subClassOf* <
http://localhost/HRBModel/HBOnto.owl#working> .
}
""")))
Jiba