protected function getResourceFilePropertiesValues($serial)
    {
        $file = $this->getResource($serial);

        if (!$file->exists()) {
            throw new \common_exception_NotFound('File reference serial "'. $serial .'" not exist as resource');
        }

        if (!$file->hasType($this->getClass(GenerisRdf::CLASS_GENERIS_FILE))) {
            throw new \common_exception_NotFound('Resource ' . $serial . ' is not a file');
        }

        $properties = [];
        $propertiesDefinition = [
            $this->getProperty(GenerisRdf::PROPERTY_FILE_FILEPATH),
            $this->getProperty(GenerisRdf::PROPERTY_FILE_FILESYSTEM),
            $this->getProperty(GenerisRdf::PROPERTY_FILE_FILENAME),
        ];

        $propertiesValues = $file->getPropertiesValues($propertiesDefinition);
        $fileSystemProperty = current($propertiesValues[GenerisRdf::PROPERTY_FILE_FILESYSTEM]);
        $properties[self::RESOURCE_FILE_FILESYSTEM_URI] = $fileSystemProperty instanceof \core_kernel_classes_Resource
            ? $fileSystemProperty->getUri()
            : $fileSystemProperty->literal;

        $filePath = current($propertiesValues[GenerisRdf::PROPERTY_FILE_FILEPATH])->literal;
        $properties[self::RESOURCE_FILE_PATH] = trim(str_replace(DIRECTORY_SEPARATOR, '/', $filePath), '/');

        if (!empty($propertiesValues[GenerisRdf::PROPERTY_FILE_FILENAME])) {
            $fileName = current($propertiesValues[GenerisRdf::PROPERTY_FILE_FILENAME])->literal;
            $properties[self::RESOURCE_FILE_NAME] = ltrim(str_replace(DIRECTORY_SEPARATOR, '/', $fileName), '/');
        }

        return $properties;
    }
protected function getResourceFilePropertiesValues($serial)
    {
        $file = $this->getResource($serial);

        if (!$file->exists()) {
            throw new \common_exception_NotFound('File reference serial "'. $serial .'" not exist as resource');
        }

        if (!$file->hasType($this->getClass(GenerisRdf::CLASS_GENERIS_FILE))) {
            throw new \common_exception_NotFound('Resource ' . $serial . ' is not a file');
        }

        $properties = [];
        $propertiesDefinition = [
            $this->getProperty(GenerisRdf::PROPERTY_FILE_FILEPATH),
            $this->getProperty(GenerisRdf::PROPERTY_FILE_FILESYSTEM),
            $this->getProperty(GenerisRdf::PROPERTY_FILE_FILENAME),
        ];

        $propertiesValues = $file->getPropertiesValues($propertiesDefinition);
        $fileSystemProperty = current($propertiesValues[GenerisRdf::PROPERTY_FILE_FILESYSTEM]);
        $properties[self::RESOURCE_FILE_FILESYSTEM_URI] = $fileSystemProperty instanceof \core_kernel_classes_Resource
            ? $fileSystemProperty->getUri()
            : $fileSystemProperty->literal;

        $filePath = current($propertiesValues[GenerisRdf::PROPERTY_FILE_FILEPATH])->literal;
        $properties[self::RESOURCE_FILE_PATH] = trim(str_replace(DIRECTORY_SEPARATOR, '/', $filePath), '/');

        if (!empty($propertiesValues[GenerisRdf::PROPERTY_FILE_FILENAME])) {
            $fileName = current($propertiesValues[GenerisRdf::PROPERTY_FILE_FILENAME])->literal;
            $properties[self::RESOURCE_FILE_NAME] = ltrim(str_replace(DIRECTORY_SEPARATOR, '/', $fileName), '/');
        }

        return $properties;
    }
protected function getResourceFilePropertiesValues ( $ serial ) { $ file = $ this -> getResource ( $ serial ) ; if ( ! $ file -> exists ( ) ) { throw new \ common_exception_NotFound ( 'File reference serial "' . $ serial . '" not exist as resource' ) ; } if ( ! $ file -> hasType ( $ this -> getClass ( GenerisRdf :: CLASS_GENERIS_FILE ) ) ) { throw new \ common_exception_NotFound ( 'Resource ' . $ serial . ' is not a file' ) ; } $ properties = [ ] ; $ propertiesDefinition = [ $ this -> getProperty ( GenerisRdf :: PROPERTY_FILE_FILEPATH ) , $ this -> getProperty ( GenerisRdf :: PROPERTY_FILE_FILESYSTEM ) , $ this -> getProperty ( GenerisRdf :: PROPERTY_FILE_FILENAME ) , ] ; $ propertiesValues = $ file -> getPropertiesValues ( $ propertiesDefinition ) ; $ fileSystemProperty = current ( $ propertiesValues [ GenerisRdf :: PROPERTY_FILE_FILESYSTEM ] ) ; $ properties [ self :: RESOURCE_FILE_FILESYSTEM_URI ] = $ fileSystemProperty instanceof \ core_kernel_classes_Resource ? $ fileSystemProperty -> getUri ( ) : $ fileSystemProperty -> literal ; $ filePath = current ( $ propertiesValues [ GenerisRdf :: PROPERTY_FILE_FILEPATH ] ) -> literal ; $ properties [ self :: RESOURCE_FILE_PATH ] = trim ( str_replace ( DIRECTORY_SEPARATOR , '/' , $ filePath ) , '/' ) ; if ( ! empty ( $ propertiesValues [ GenerisRdf :: PROPERTY_FILE_FILENAME ] ) ) { $ fileName = current ( $ propertiesValues [ GenerisRdf :: PROPERTY_FILE_FILENAME ] ) -> literal ; $ properties [ self :: RESOURCE_FILE_NAME ] = ltrim ( str_replace ( DIRECTORY_SEPARATOR , '/' , $ fileName ) , '/' ) ; } return $ properties ; }
Return an array with filesystem uri and path following serial
Serial is Resource file uri, data are extracted from database

This implementation uses resource URI as serial

@param $serial
@return array
@throws \common_exception_InvalidArgumentType
@throws FileSerializerException
Return an array with filesystem uri and path following serial Serial is Resource file uri data are extracted from database