Create MetadataExporterForm with class uri

@param core_kernel_classes_Resource $resource
@return \tao_helpers_form_Form
491201
public function getExportForm(core_kernel_classes_Resource $resource)
    {
        if ($resource instanceof \core_kernel_classes_Class) {
            $formData = ['class' => $resource];
        } else {
            $formData = ['class' => $this->getClass($resource)];
        }
        $form = new MetadataExporterForm($formData);

        return $form->getForm();
    }
566083
protected function resolveTransformerForResource($resource)
    {
        $transformer = null;

        if ($this->transformerResolver !== null) {
            $transformer = $this->transformerResolver->resolve($resource);
        }

        return $transformer;
    }
1108292
private function createDomainManagerDefinition(ResourceInterface $resource)
    {
        $definition = new Definition($resource->getDomainManager(), [
            new Reference('lug.resource.'.$resource->getName()),
            new Reference('lug.resource.domain.event_dispatcher'),
            new Reference('lug.manager.'.$resource->getName()),
            new Reference('lug.repository.'.$resource->getName()),
        ]);

        $definition->addTag('lug.domain_manager', ['resource' => $resource->getName()]);

        return $definition;
    }
293477
public static function create($product, $resource, ClientContext $context)
    {
        $rm = new ResourceMetadata($product, $resource);
        $resourceServiceClass = $rm->resourceServiceClass;
        return new $resourceServiceClass($rm, $context);
    }
912376
public function create($resource)
    {
        $className = $this->getResourceClassName($resource->type);
        if (!class_exists($className)) {
            throw new Exception(
                'Unknown resource type "' . $resource->type . '".',
                Exception::UNKNOWN_RESOURCE_TYPE
            );
        }

        /** @var AbstractResource $object */
        $object = $this->objectManager->get($className);

        foreach ($resource as $property => $value) {
            if (!ObjectAccess::isPropertySettable($object, $property)) {
                continue;
            }
            ObjectAccess::setProperty($object, $property, $value);
        }

        $this->postProcessResources($object);

        return $object;
    }
725984
public function create(ResourceManager $resourceManager, ApiRequest $request, int $version, string $resource)
    {
        $resourceManager->version($version);

        /** @var HandlesPostRequest $handler */
        $handler = $this->initializeHandler($resourceManager, $resource, $request, HandlesPostRequest::class);

        $parameters = $request->asParameters();

        $result = $handler->store($request, $parameters);

        if ($result === null) {
            return $this->respondNoContent();
        }

        $document = $this->makeDocumentFromResource($resourceManager, $resource, $result, $parameters, $handler);

        return $this->respondCreated($document);
    }
174160
public function getClassForm(core_kernel_classes_Class $clazz)
    {
        $propMode = 'simple';
        if($this->hasSessionAttribute('property_mode')){
            $propMode = $this->getSessionAttribute('property_mode');
        }

        $options = array(
            'property_mode' => $propMode,
            'topClazz' => $this->getClass(GenerisRdf::CLASS_GENERIS_RESOURCE)
        );
        $data = $this->getRequestParameters();
        $formContainer = new tao_actions_form_Clazz($clazz, $this->extractClassData($data), $this->extractPropertyData($data), $propMode);
        $myForm = $formContainer->getForm();

        if($myForm->isSubmited()){
            if($myForm->isValid()){
                //get the data from parameters

                // get class data and save them
                if(isset($data['class'])){
                    $classValues = array();
                    foreach($data['class'] as $key => $value){
                        $classKey =  tao_helpers_Uri::decode($key);
                        $classValues[$classKey] =  tao_helpers_Uri::decode($value);
                    }

                    $this->bindProperties($clazz, $classValues);
                }

                //save all properties values
                if(isset($data['properties'])){
                    foreach($data['properties'] as $i => $propertyValues) {
                        //get index values
                        $indexes = null;
                        if(isset($propertyValues['indexes'])){
                            $indexes = $propertyValues['indexes'];
                            unset($propertyValues['indexes']);
                        }
                        if($propMode === 'simple') {
                            $this->saveSimpleProperty($propertyValues);
                        } else {
                            $this->saveAdvProperty($propertyValues);
                        }

                        //save index
                        if(!is_null($indexes)){
                            foreach($indexes as $indexValues){
                                $this->savePropertyIndex($indexValues);
                            }
                        }
                    }
                }
            }
        }
        return $myForm;
    }
835928
public function getResourceMetadata($resource)
    {
        if (is_object($resource)) {
            $className = get_class($resource);
        } else {
            $className = $resource;
        }
        if (!isset($this->resources[$className])) {
            throw new \Exception('Resource class "'.$className.'" not found');
        }
        return $this->resources[$className];
    }
490617
public function getValue( core_kernel_classes_Resource $resource,  tao_models_classes_table_Column $column)
    {
        $returnValue = (string) '';

        
        $result = $resource->getOnePropertyValue($column->getProperty());
        $returnValue = $result instanceof core_kernel_classes_Resource ? $result->getLabel() : (string)$result;
        

        return (string) $returnValue;
    }
533953
public function onResourceCreated(\core_kernel_classes_Resource $resource) {
        foreach ($this->getInner() as $impl) {
            $impl->onResourceCreated($resource);
        }
    }
216639
protected function getItemContentTokenizer(core_kernel_classes_Resource $resource)
    {
        $itemService= taoItems_models_classes_ItemsService::singleton();
        $model = $itemService->getItemModel($resource);
        if (! is_null($model)) {
            $impl = $itemService->getItemModelImplementation($model);
            if (! is_null($impl)) {
                if ($impl instanceof IndexableItemModel) {
                    return $impl->getItemContentTokenizer();
                }
            }
        }
        return null;
    }
765911
private function createChoiceFormDefinition(ResourceInterface $resource)
    {
        $definition = new Definition($resource->getChoiceForm(), [
            new Reference('lug.resource.'.$resource->getName()),
        ]);

        $definition->addTag('form.type');

        return $definition;
    }
479980
public function searchForm($resource=null)
    {

        $resource = $this->passedOrCurrent($resource);

        if (!$formClass = $this->searchFormClass($resource)) {
            return '';
        }

        return $this->makeSearchForm($resource, $formClass);

    }
444363
protected function makeForm($resource, $class, $model)
    {
        $form = $this->container->make($class);

        if (!$this->formRules($form) && $rules = $this->rules($resource)) {
            $form->getValidator()->setRules($rules);
        }

        if ($model) {
            $form->setModel($model);
        }

        $this->publish($resource, 'form.created', [$form]);

        return $form;
    }
198943
protected function _createContainer( $resource, $key )
	{
		$config = $this->_getContext()->getConfig();

		$type = $config->get( $key . '/type', 'Zip' );
		$format = $config->get( $key . '/format', 'CSV' );
		$options = $config->get( $key . '/options', array() );

		return MW_Container_Factory::getContainer( $resource, $type, $format, $options );
	}
897696
public function newInstance($uri) : ResourceObject
    {
        if (is_string($uri)) {
            $uri = new Uri($uri);
        }
        $adapter = $this->scheme->getAdapter($uri);

        return $adapter->get($uri);
    }
501637
public function getReportByLinkedResource(\core_kernel_classes_Resource $resource)
    {
        $taskResource = $this->getTaskResource($resource);
        if ($taskResource !== null) {
            $report = $taskResource->getOnePropertyValue($this->getProperty(Task::PROPERTY_REPORT));
            if ($report) {
                $report = \common_report_Report::jsonUnserialize($report->literal);
            } else {
                $task = $this->getTask($taskResource->getUri());
                if ($task) {
                    $report = \common_report_Report::createInfo(__('Task is in \'%s\' state', $task->getStatus()));
                } else {
                    //this is an assumption.
                    //in case if sync implementation is used task may not be found.
                    $report = \common_report_Report::createInfo(__('Task is in progress'));
                }
            }
        } else {
            $report = \common_report_Report::createFailure(__('Resource is not the task placeholder'));
        }
        return $report;
    }