protected function evaluateSPX($variable = array())
    {
        
    	common_Logger::d('SPX TYPE', array('Generis Term evaluateSPX'));
    	$resource = $this->getUniquePropertyValue(new core_kernel_classes_Property(RulesRdf::PROPERTY_TERM_SPX_SUBJET));
    	if($resource instanceof core_kernel_classes_Resource){
    		if(array_key_exists($resource->getUri(),$variable)) {
    			common_Logger::d('Variable uri : ' .  $resource->getUri() . ' found', array('Generis Term evaluateSPX'));
    			common_Logger::d('Variable name : ' .  $resource->getLabel() . ' found', array('Generis Term evaluateSPX'));
    			$resource = new core_kernel_classes_Resource($variable[$resource->getUri()]);
    			common_Logger::d('Variable repaced uri : ' .  $resource->getUri(), array('Generis Term evaluateSPX'));
    			common_Logger::d('Variable repaced name : ' .  $resource->getLabel(), array('Generis Term evaluateSPX'));
    		}
    		
    		try
    		{
    			$propertyInstance = $this->getUniquePropertyValue(new core_kernel_classes_Property(RulesRdf::PROPERTY_TERM_SPX_PREDICATE));
    		}
    		catch (common_Exception $e)
    		{
    			echo $e;
    			var_dump($this);
    			die('unable to get property value in Term');
    		}
//    		if(array_key_exists($propertyInstance->getUri(),$variable)) {
//				$logger->debug('Variable uri : ' .  $propertyInstance->getUri() . ' found' , __FILE__, __LINE__);
//    			$logger->debug('Variable name : ' .  $propertyInstance->getLabel() . ' found' , __FILE__, __LINE__);
//				$propertyInstance = new core_kernel_classes_Resource($variable[$resource->getUri()]);
//    			$logger->debug('Variable repaced uri : ' .  $propertyInstance->getUri() , __FILE__, __LINE__);
//    			$logger->debug('Variable repaced name : ' .  $propertyInstance->getLabel() , __FILE__, __LINE__);
//    	    }
    		$property = new core_kernel_classes_Property($propertyInstance->getUri());
    		common_Logger::d('Property uri ' . $property->getUri(), array('Generis Term evaluateSPX'));
    		common_Logger::d('Property name ' . $property->getLabel(), array('Generis Term evaluateSPX'));
       		$returnValue = $resource->getPropertyValuesCollection($property);
       		common_Logger::d($returnValue->count() . ' values returned ', array('Generis Term evaluateSPX'));

       		if($returnValue->isEmpty()) {
       			$newEmptyTerm = new core_kernel_rules_Term(RulesRdf::INSTANCE_TERM_IS_NULL,__METHOD__);
       			common_Logger::d('Empty Term Created', array('Generis Term evaluateSPX'));
       			$property = new core_kernel_classes_Property(RulesRdf::PROPERTY_TERM_VALUE);
       			$returnValue = $newEmptyTerm->getUniquePropertyValue($property);	
       		}
       		else {
				if($returnValue->count() == 1 ) {
       					$returnValue = $returnValue->get(0);
       			}
       		}

       		
    	}
    	return $returnValue;
        
    }