Skip to content

Commit

Permalink
return a list
Browse files Browse the repository at this point in the history
  • Loading branch information
lambdamusic committed Dec 8, 2021
1 parent 8ea2ce8 commit 4f13005
Showing 1 changed file with 2 additions and 16 deletions.
18 changes: 2 additions & 16 deletions ontospy/core/entities.py
Original file line number Diff line number Diff line change
Expand Up @@ -344,23 +344,9 @@ def __repr__(self):

@property
def instances(self): # = all instances
if not self._instances:
return []
return self._instances
# if self._instances == False:
# # calculate and set
# self._instances = []
# if self.sparqlHelper:
# qres = self.sparqlHelper.getClassInstances(self.uri)
# for uri in [x[0] for x in qres]:
# instance = RdfEntity(uri, self.uri, self.namespaces)
# instance.triples = self.sparqlHelper.entityTriples(
# instance.uri)
# instance._buildGraph() # force construction of mini graph
# self._instances += [instance]

# return self._instances
# else:
# # it's been calc already, hence return
# return self._instances

def count(self):
return len(self.instances)
Expand Down

0 comments on commit 4f13005

Please sign in to comment.