parameters: (self, inst, logger)
return_statement: return facet_evaluation(val == self.value, msg)
docstring: Validate an ifc instance against that property facet.
  
          :param inst: IFC entity element
          :type inst: IFC entity
          :param logger: Logging object
          :type logger: logging
          :return: result of the validation as bool and message
          :rtype: facet_evaluation(bool, str)
docstring_summary: Validate an ifc instance against that property facet.
docstring_tokens: Validate an ifc instance against that property facet .
function: def __call__(self, inst, logger):
          """Validate an ifc instance against that property facet.
  
          :param inst: IFC entity element
          :type inst: IFC entity
          :param logger: Logging object
          :type logger: logging
          :return: result of the validation as bool and message
          :rtype: facet_evaluation(bool, str)
          """
  
          self.location = self.node["@location"]
  
          if self.propertyset == "attribute":
              val = {k.lower(): v for k, v in inst.get_info().items()}.get(self.name, None)
          else:
              # TODO sometimes AttributeError: 'str' object has no attribute 'wrappedValue'
              instance_props = ifcopenshell.util.element.get_psets(inst)
  
              if ifcopenshell.util.element.get_type(inst):
                  type_props = ifcopenshell.util.element.get_psets(ifcopenshell.util.element.get_type(inst))
              else:
                  type_props = {}
  
              if self.location == "instance":
                  props = instance_props
              elif self.location == "type" and type_props:
                  props = type_props
              elif self.location == "any" and (instance_props or type_props):
                  props = {**instance_props, **type_props}
              else:
                  props = {}
  
              pset = props.get(self.propertyset)
              val = pset.get(self.name) if pset else None
  
          self.location_msg = location[self.location]
          di = {"name": self.name, "propertyset": self.propertyset, "value": "'%s'" % val, "location": self.location_msg}
  
          if val is not None:
              msg = self.message % di
          else:
              if pset:
                  msg = "does not have %(location)sproperty '%(name)s' in a set '%(propertyset)s'" % di
              else:
                  msg = "does not have %(location)sset '%(propertyset)s'" % di
  
          # TODO implement data type comparison
          # xs:string
          # xs:decimal
          # xs:integer
          # xs:boolean
          # xs:anyURI
          # xs:date 		YYYY-MM-DD
          # xs:time 		hh:mm:ss
          # xs:dateTime 	YYYY-MM-DDThh:mm:ss
          # xs:duration	PnYnMnDTnHnMnS
  
          return facet_evaluation(val == self.value, msg)
function_tokens: def __call__ ( self , inst , logger ) : self . location = self . node [ "@location" ] if self . propertyset == "attribute" : val = { k . lower ( ) : v for k , v in inst . get_info ( ) . items ( ) } . get ( self . name , None ) else : # TODO sometimes AttributeError: 'str' object has no attribute 'wrappedValue' instance_props = ifcopenshell . util . element . get_psets ( inst ) if ifcopenshell . util . element . get_type ( inst ) : type_props = ifcopenshell . util . element . get_psets ( ifcopenshell . util . element . get_type ( inst ) ) else : type_props = { } if self . location == "instance" : props = instance_props elif self . location == "type" and type_props : props = type_props elif self . location == "any" and ( instance_props or type_props ) : props = { * * instance_props , * * type_props } else : props = { } pset = props . get ( self . propertyset ) val = pset . get ( self . name ) if pset else None self . location_msg = location [ self . location ] di = { "name" : self . name , "propertyset" : self . propertyset , "value" : "'%s'" % val , "location" : self . location_msg } if val is not None : msg = self . message % di else : if pset : msg = "does not have %(location)sproperty '%(name)s' in a set '%(propertyset)s'" % di else : msg = "does not have %(location)sset '%(propertyset)s'" % di # TODO implement data type comparison # xs:string # xs:decimal # xs:integer # xs:boolean # xs:anyURI # xs:date 		YYYY-MM-DD # xs:time 		hh:mm:ss # xs:dateTime 	YYYY-MM-DDThh:mm:ss # xs:duration	PnYnMnDTnHnMnS return facet_evaluation ( val == self . value , msg )