Open Journal Systems
3.3.0
|
Public Member Functions | |
__construct ($metadataSchemaName, $assocType) | |
addStatement ($propertyName, $value, $locale=null, $replace=false) | |
getAssoc () | |
getAssocId () | |
getAssocType () | |
getDisplayName () | |
& | getMetadataSchema () |
getMetadataSchemaName () | |
getNamespacedPropertyId ($propertyName) | |
& | getProperties () |
& | getProperty ($propertyName) |
getPropertyNames () | |
getPropertyNamesByType ($propertyType) | |
getSequence () | |
getSetPropertyNames () | |
& | getStatement ($propertyName, $locale=null) |
& | getStatements () |
& | getStatementTranslations ($propertyName) |
hasProperty ($propertyName) | |
hasStatement ($propertyName) | |
isTranslatedProperty ($propertyName) | |
removeStatement ($propertyName, $locale=null) | |
setAssocId ($assocId) | |
setDisplayName ($displayName) | |
setSequence ($seq) | |
setStatements (&$statements, $replace=METADATA_DESCRIPTION_REPLACE_PROPERTIES) | |
Public Member Functions inherited from DataObject | |
__construct () | |
addSupportedMetadataAdapter ($metadataAdapter) | |
extractMetadata ($metadataSchema) | |
getAdditionalMetadataFieldNames () | |
& | getAllData () |
getDAO () | |
& | getData ($key, $locale=null) |
getHasLoadableAdapters () | |
getId () | |
getLocaleMetadataFieldNames () | |
getLocalizedData ($key, $preferredLocale=null) | |
getMetadataFieldNames ($translated=true) | |
getSetMetadataFieldNames ($translated=true) | |
getSupportedExtractionAdapters () | |
getSupportedInjectionAdapters () | |
getSupportedMetadataSchemas () | |
hasData ($key, $locale=null) | |
injectMetadata ($metadataDescription) | |
removeSupportedMetadataAdapter ($metadataSchemaName) | |
setAllData (&$data) | |
setData ($key, $value, $locale=null) | |
setHasLoadableAdapters ($hasLoadableAdapters) | |
setId ($id) | |
unsetData ($key, $locale=null) | |
upcastTo ($targetObject) | |
Static Public Member Functions | |
static | _allowedReplaceLevels () |
Data Fields | |
$_assocId | |
$_assocType | |
$_displayName | |
$_metadataSchema | |
$_metadataSchemaName | |
$_seq | |
Data Fields inherited from DataObject | |
$_data = array() | |
$_extractionAdaptersLoaded = false | |
$_hasLoadableAdapters = false | |
$_injectionAdaptersLoaded = false | |
$_metadataExtractionAdapters = array() | |
$_metadataInjectionAdapters = array() | |
Class modeling a description (DCMI abstract model) or subject- predicate-object graph (RDF). This class and its children provide meta-data (DCMI abstract model: statements of property-value pairs, RDF: assertions of predicate-object pairs) about a given PKP application entity instance (DCMI abstract model: described resource, RDF: subject).
This class has primarily been designed to describe journals, journal issues, articles, conferences, conference proceedings (conference papers), monographs (books), monograph components (book chapters) or citations.
It is, however, flexible enough to be extended to describe any application entity in the future. Descriptions can be retrieved from any application object that implements the MetadataProvider interface.
Special attention has been paid to the compatibility of the class implementation with the implementation of several meta-data standards that we consider especially relevant to our use cases.
We distinguish two main use cases for meta-data: discovery and delivery of described resources. We have chosen the element-citation tag from the NLM standard http://dtd.nlm.nih.gov/publishing/tag-library/3.0/n-8xa0.html as our primary representation of delivery meta-data and dcterms http://dublincore.org/documents/dcmi-terms/ as our primary representation of discovery meta-data.
Our specific use of meta-data has important implications and determines our design goals:
We took the following design decisions to achieve these goals:
Definition at line 109 of file MetadataDescription.inc.php.
MetadataDescription::__construct | ( | $metadataSchemaName, | |
$assocType | |||
) |
Constructor
Definition at line 155 of file MetadataDescription.inc.php.
|
static |
The allowed replace levels for the setStatements() method.
Definition at line 574 of file MetadataDescription.inc.php.
Referenced by setStatements().
MetadataDescription::addStatement | ( | $propertyName, | |
$value, | |||
$locale = null , |
|||
$replace = false |
|||
) |
Add a meta-data statement. Statements can only be added for properties that are part of the meta-data schema. This method will also check the validity of the value for the given property before adding the statement.
$propertyName | string The name of the property |
$value | mixed The value to be assigned to the property |
$locale | string |
$replace | boolean whether to replace an existing statement |
Definition at line 267 of file MetadataDescription.inc.php.
References AppLocale\getLocale(), getProperty(), getStatement(), and DataObject\setData().
Referenced by setStatements().
MetadataDescription::getAssoc | ( | ) |
Construct a meta-data application entity id (described resource id / subject id) for this meta-data description object.
Definition at line 217 of file MetadataDescription.inc.php.
References getAssocId(), and getAssocType().
MetadataDescription::getAssocId | ( | ) |
Get the association id (described resource identifier)
Definition at line 199 of file MetadataDescription.inc.php.
References $_assocId.
Referenced by getAssoc().
MetadataDescription::getAssocType | ( | ) |
Get the association type (described resource type)
Definition at line 191 of file MetadataDescription.inc.php.
References $_assocType.
Referenced by getAssoc().
MetadataDescription::getDisplayName | ( | ) |
Get the (optional) display name
Definition at line 236 of file MetadataDescription.inc.php.
References $_displayName.
& MetadataDescription::getMetadataSchema | ( | ) |
Get the metadata schema
Definition at line 177 of file MetadataDescription.inc.php.
References $_metadataSchema, getMetadataSchemaName(), and instantiate().
Referenced by getNamespacedPropertyId(), getProperties(), getProperty(), getPropertyNames(), getPropertyNamesByType(), and hasProperty().
MetadataDescription::getMetadataSchemaName | ( | ) |
Get the fully qualified class name of the supported meta-data schema.
Definition at line 169 of file MetadataDescription.inc.php.
References $_metadataSchemaName.
Referenced by getMetadataSchema().
MetadataDescription::getNamespacedPropertyId | ( | $propertyName | ) |
Convenience method that returns a property id the underlying meta-data schema.
$propertyName | string |
Definition at line 498 of file MetadataDescription.inc.php.
References getMetadataSchema().
& MetadataDescription::getProperties | ( | ) |
Convenience method that returns the properties of the underlying meta-data schema.
Definition at line 476 of file MetadataDescription.inc.php.
References getMetadataSchema().
& MetadataDescription::getProperty | ( | $propertyName | ) |
Convenience method that returns a property from the underlying meta-data schema.
$propertyName | string |
Definition at line 487 of file MetadataDescription.inc.php.
References getMetadataSchema().
Referenced by addStatement(), getStatement(), and isTranslatedProperty().
MetadataDescription::getPropertyNames | ( | ) |
Convenience method that returns the valid property names of the underlying meta-data schema.
Definition at line 508 of file MetadataDescription.inc.php.
References getMetadataSchema().
MetadataDescription::getPropertyNamesByType | ( | $propertyType | ) |
Convenience method that returns the names of properties with a given data type of the underlying meta-data schema.
$propertyType | string |
Definition at line 519 of file MetadataDescription.inc.php.
References getMetadataSchema().
MetadataDescription::getSequence | ( | ) |
Get the sequence id
Definition at line 252 of file MetadataDescription.inc.php.
References $_seq.
MetadataDescription::getSetPropertyNames | ( | ) |
Returns an array of property names for which statements exist.
Definition at line 529 of file MetadataDescription.inc.php.
References getStatements().
& MetadataDescription::getStatement | ( | $propertyName, | |
$locale = null |
|||
) |
Get a specific statement
$propertyName | string |
$locale | string |
Definition at line 355 of file MetadataDescription.inc.php.
References DataObject\getData(), AppLocale\getLocale(), and getProperty().
Referenced by addStatement().
& MetadataDescription::getStatements | ( | ) |
Get all statements
Definition at line 337 of file MetadataDescription.inc.php.
References DataObject\getAllData().
Referenced by getSetPropertyNames(), and hasStatement().
& MetadataDescription::getStatementTranslations | ( | $propertyName | ) |
Returns all translations of a translated property
$propertyName | string |
Definition at line 380 of file MetadataDescription.inc.php.
References DataObject\getData(), and isTranslatedProperty().
MetadataDescription::hasProperty | ( | $propertyName | ) |
Convenience method that checks the existence of a property in the underlying meta-data schema.
$propertyName | string |
Definition at line 539 of file MetadataDescription.inc.php.
References getMetadataSchema().
MetadataDescription::hasStatement | ( | $propertyName | ) |
Check the existence of a statement for the given property.
$propertyName | string |
Definition at line 549 of file MetadataDescription.inc.php.
References getStatements().
MetadataDescription::isTranslatedProperty | ( | $propertyName | ) |
Convenience method that checks whether a given property is translated.
$propertyName | string |
Definition at line 560 of file MetadataDescription.inc.php.
References getProperty().
Referenced by getStatementTranslations().
MetadataDescription::removeStatement | ( | $propertyName, | |
$locale = null |
|||
) |
Remove statement. If the property has cardinality 'many' then all statements for the property will be removed at once. If the property is translated and the locale is null then the statements for all locales will be removed.
$propertyName | string |
$locale | string |
Definition at line 323 of file MetadataDescription.inc.php.
References DataObject\hasData(), and DataObject\setData().
MetadataDescription::setAssocId | ( | $assocId | ) |
Set the association id (described resource identifier)
$assocId | int |
Definition at line 207 of file MetadataDescription.inc.php.
MetadataDescription::setDisplayName | ( | $displayName | ) |
Set the (optional) display name
$displayName | string |
Definition at line 228 of file MetadataDescription.inc.php.
MetadataDescription::setSequence | ( | $seq | ) |
Set the sequence id
$seq | integer |
Definition at line 244 of file MetadataDescription.inc.php.
MetadataDescription::setStatements | ( | & | $statements, |
$replace = METADATA_DESCRIPTION_REPLACE_PROPERTIES |
|||
) |
Add several statements at once. If one of the statements is invalid then the meta-data description will remain in its initial state.
$statements | array statements |
$replace | integer one of the allowed replace levels. |
Definition at line 399 of file MetadataDescription.inc.php.
References _allowedReplaceLevels(), addStatement(), DataObject\getAllData(), and DataObject\setAllData().
int MetadataDescription::$_assocId |
association id (the identifier of the described resource)
Definition at line 132 of file MetadataDescription.inc.php.
Referenced by getAssocId().
int MetadataDescription::$_assocType |
association type (the type of the described resource)
Definition at line 126 of file MetadataDescription.inc.php.
Referenced by getAssocType().
string MetadataDescription::$_displayName |
an (optional) display name that describes the contents of this meta-data description to the end user.
Definition at line 141 of file MetadataDescription.inc.php.
Referenced by getDisplayName().
MetadataSchema MetadataDescription::$_metadataSchema |
the schema this description complies to
Definition at line 120 of file MetadataDescription.inc.php.
Referenced by getMetadataSchema().
string MetadataDescription::$_metadataSchemaName |
fully qualified class name of the meta-data schema this description complies to
Definition at line 114 of file MetadataDescription.inc.php.
Referenced by getMetadataSchemaName().
integer MetadataDescription::$_seq |
sequence id used when saving several descriptions of the same subject.
Definition at line 150 of file MetadataDescription.inc.php.
Referenced by getSequence().