Exemple #1
0
 def profile(self, name_or_type):
     """
     Returns the reference to an ontology profile class given it's name.
     :type name_or_type: T <= OWLProfile|str
     :rtype: class
     """
     return self._profileDict.get(OWLProfile.forValue(name_or_type), None)
Exemple #2
0
 def createProfile(self, name_or_type, project=None):
     """
     Creates an instance of an ontology profile for the given name.
     :type name_or_type: T <= OWLProfile|str
     :type project: Project
     :rtype: AbstractProfile
     """
     profile = self.profile(OWLProfile.forValue(name_or_type))
     if not profile:
         LOGGER.warning("Missing profile %s: defaulting to OWL 2", name_or_type)
         profile = self.profile(OWLProfile.OWL2)
     return profile(project)