print(list(flight_plan_ontology.individuals()))# At this point "Plano_Teste" exists and appears when listing individuals
flight_plan_ontology.Plano_Teste.departureAirport = flight_plan_ontology.SBGL#trying to create a relationship between two #individuals : "Plano_Teste" and "SBGL" using the ObjProperty "departureAirport"
print(flight_plan_ontology.search(type = flight_plan_ontology.Flight_Plan_BR, departureAirport = flight_plan_ontology.SBGL))#trying to find the matching individual
Shell results presents all individuals including Plano_Teste but presents empty for the search method.
Why python doesn't create the relation : flight_plan_ontology.Plano_Teste.departureAirport = flight_plan_ontology.SBGL?
I've opened the ontology with Protegé and the triple is really not there.
Re: Trying to create triples between two instances, but...
Hi Jiba, very thanks for answering,
Everything works, but I have a suggestion:
The 0.37 online documentation presents the same name for the instances and for the python variables:
>>> my_drug = Drug("my_drug")
>>> acetaminophen = Ingredient("acetaminophen")
>>> my_drug.has_for_ingredient = [acetaminophen]
I've implemented different names for both and I was using the name of the instance as a parameter and I should use the python variable, when I've done this way, it has worked. This situation could be highlighted at the official documentation to guide new users like me to avoid that!! :-)