tao-test/app/generis/core/kernel/persistence/interface.ResourceInterface.php

208 lines
6.4 KiB
PHP

<?php
/*
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; under version 2
* of the License (non-upgradable).
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
* Copyright (c) 2009-2012 (original work) Public Research Centre Henri Tudor (under the project TAO-SUSTAIN & TAO-DEV);
*
*
*/
/**
* Short description of class core_kernel_persistence_ResourceInterface
*
* @access public
* @author Joel Bout, <joel.bout@tudor.lu>
* @package generis
*/
interface core_kernel_persistence_ResourceInterface
{
// --- OPERATIONS ---
/**
* returns an array of types the ressource has
*
* @access public
* @author Joel Bout, <joel.bout@tudor.lu>
* @param Resource resource
* @return array
*/
public function getTypes(core_kernel_classes_Resource $resource);
/**
* Short description of method getPropertyValues
*
* @access public
* @author Joel Bout, <joel.bout@tudor.lu>
* @param Resource resource
* @param Property property
* @param array options
* @return array
*/
public function getPropertyValues(core_kernel_classes_Resource $resource, core_kernel_classes_Property $property, $options = []);
/**
* Short description of method getPropertyValuesByLg
*
* @access public
* @author Joel Bout, <joel.bout@tudor.lu>
* @param Resource resource
* @param Property property
* @param string lg
* @return core_kernel_classes_ContainerCollection
*/
public function getPropertyValuesByLg(core_kernel_classes_Resource $resource, core_kernel_classes_Property $property, $lg);
/**
* Short description of method setPropertyValue
*
* @access public
* @author Joel Bout, <joel.bout@tudor.lu>
* @param Resource resource
* @param Property property
* @param string object
* @param string lg
* @return boolean
*/
public function setPropertyValue(core_kernel_classes_Resource $resource, core_kernel_classes_Property $property, $object, $lg = null);
/**
* Short description of method setPropertiesValues
*
* @access public
* @author Joel Bout, <joel.bout@tudor.lu>
* @param Resource resource
* @param array properties
* @return boolean
*/
public function setPropertiesValues(core_kernel_classes_Resource $resource, $properties);
/**
* Short description of method setPropertyValueByLg
*
* @access public
* @author Joel Bout, <joel.bout@tudor.lu>
* @param Resource resource
* @param Property property
* @param string value
* @param string lg
* @return boolean
*/
public function setPropertyValueByLg(core_kernel_classes_Resource $resource, core_kernel_classes_Property $property, $value, $lg);
/**
* Short description of method removePropertyValues
*
* @access public
* @author Joel Bout, <joel.bout@tudor.lu>
* @param Resource resource
* @param Property property
* @param array options
* @return boolean
*/
public function removePropertyValues(core_kernel_classes_Resource $resource, core_kernel_classes_Property $property, $options = []);
/**
* Short description of method removePropertyValueByLg
*
* @access public
* @author Joel Bout, <joel.bout@tudor.lu>
* @param Resource resource
* @param Property property
* @param string lg
* @param array options
* @return boolean
*/
public function removePropertyValueByLg(core_kernel_classes_Resource $resource, core_kernel_classes_Property $property, $lg, $options = []);
/**
* Short description of method getRdfTriples
*
* @access public
* @author Joel Bout, <joel.bout@tudor.lu>
* @param Resource resource
* @return core_kernel_classes_ContainerCollection
*/
public function getRdfTriples(core_kernel_classes_Resource $resource);
/**
* Short description of method getUsedLanguages
*
* @access public
* @author Joel Bout, <joel.bout@tudor.lu>
* @param Resource resource
* @param Property property
* @return array
*/
public function getUsedLanguages(core_kernel_classes_Resource $resource, core_kernel_classes_Property $property);
/**
* Short description of method duplicate
*
* @access public
* @author Joel Bout, <joel.bout@tudor.lu>
* @param Resource resource
* @param array excludedProperties
* @return core_kernel_classes_Resource
*/
public function duplicate(core_kernel_classes_Resource $resource, $excludedProperties = []);
/**
* Short description of method delete
*
* @access public
* @author Joel Bout, <joel.bout@tudor.lu>
* @param Resource resource
* @param boolean deleteReference
* @return boolean
*/
public function delete(core_kernel_classes_Resource $resource, $deleteReference = false);
/**
* Short description of method getPropertiesValues
*
* @access public
* @author Joel Bout, <joel.bout@tudor.lu>
* @param Resource resource
* @param array properties
* @return array
*/
public function getPropertiesValues(core_kernel_classes_Resource $resource, $properties);
/**
* Short description of method setType
*
* @access public
* @author Joel Bout, <joel.bout@tudor.lu>
* @param Resource resource
* @param Class class
* @return boolean
*/
public function setType(core_kernel_classes_Resource $resource, core_kernel_classes_Class $class);
/**
* Short description of method removeType
*
* @access public
* @author Joel Bout, <joel.bout@tudor.lu>
* @param Resource resource
* @param Class class
* @return boolean
*/
public function removeType(core_kernel_classes_Resource $resource, core_kernel_classes_Class $class);
}