docs: def build_shapes(self):
          """
          Extract SHACL data shapes from the rdf graph.
          <http://www.w3.org/ns/shacl#>
  
          Instatiate the Shape Python objects and relate it to existing classes,
          if available.
          """
          self.all_shapes = []  # @todo: keep adding?
  
          qres = self.sparqlHelper.getShapes()
  
          for candidate in qres:
  
              test_existing_cl = self.get_any_entity(uri=candidate[0])
              if not test_existing_cl:
                  # create it
                  self.all_shapes += [OntoShape(candidate[0], None, self.namespaces)]
              else:
                  pass
  
          # add more data
          shacl = rdflib.Namespace('http://www.w3.org/ns/shacl#')
  
          for aShape in self.all_shapes:
  
              aShape.rdftype = shacl['Shape']
              aShape.triples = self.sparqlHelper.entityTriples(aShape.uri)
              aShape._buildGraph()  # force construction of mini graph
  
              aShape.sparqlHelper = self.sparqlHelper
  
              # attach to a class
              for uri in aShape.getValuesForProperty(shacl['targetClass']):
                  aclass = self.get_class(str(uri))
                  if aclass:
                      aShape.targetClasses += [aclass]
                      aclass.all_shapes += [aShape]
                      for propertyUri in aShape.getValuesForProperty(shacl['path']): #add shaped properties of this class. later can be used for ontodocs
                          propType = self.get_property(str(propertyUri))
                          if propType:
                              aclass.shapedProperties += [{'shape': aShape, 'property': propType}]
  
  
  
          # sort alphabetically
          self.all_shapes = sorted(self.all_shapes, key=lambda x: x.qname)
  
          # compute top layer
          exit = []
          for c in self.all_shapes:
              if not c.parents():
                  exit += [c]
          self.toplayer_shapes = exit