$fedora
$fedora : \acdhOeaw\fedora\Fedora
Fedora connection object
Set of helper methods for writing tests.
$fedora : \acdhOeaw\fedora\Fedora
Fedora connection object
init(\acdhOeaw\fedora\Fedora $fedora)
Initializes the ResourceFactory class
\acdhOeaw\fedora\Fedora | $fedora | Fedora connection object |
createMeta(array $properties = array(), boolean $addId = false, boolean $addTitle = false) : Resource
Generates metadata from an associative array (keys as properties, values as values).
array | $properties | array of metadata properties; keys should be fully-qualified URIs with two exceptions - 'title' is automatically mapped to the config:fedoraTitleProp, 'id' to config:fedoraIdProp, 'type' to rdfs:type and 'parent' to config:relProp() |
boolean | $addId | should an id property be generated if it's not provided in $properties? |
boolean | $addTitle | should a title property be generated if it's not provided in $properties? |
create(array $properties = array(), string $location = '/', string $method = 'POST', string $binary = '') : \acdhOeaw\fedora\FedoraResource
Creates a new resource
array | $properties | list of RDF properties (key - property, value - property value); 'id', 'title', type' and 'parent' are handled automatically |
string | $location | where to create the resource |
string | $method | creation method (POST or PUT) |
string | $binary | resource content (if empty string, an RDF resource is created) |
removeAcl(\acdhOeaw\fedora\Fedora $fedora, boolean $verbose = true)
Removes all access control rules from the repository
\acdhOeaw\fedora\Fedora | $fedora | Fedora connection object |
boolean | $verbose | should progess messages be displayed |