Skip to content

Commit

Permalink
*5886* Create metadata schemas for OMP - introduction of the actual M…
Browse files Browse the repository at this point in the history
…ODS meta-data schemas
  • Loading branch information
fgrandel committed Sep 20, 2010
1 parent 7d2b6ca commit 950f7e1
Show file tree
Hide file tree
Showing 3 changed files with 603 additions and 0 deletions.
22 changes: 22 additions & 0 deletions locale/en_US/submission.xml
Expand Up @@ -15,6 +15,7 @@
<message key="author.submit.submissionCitations">Provide a formatted list of references for works cited in this submission. Please separate individual references with a blank line.</message>

<!-- FIXME: move to meta-data plug-ins -->
<!-- messages used by meta-data filters -->
<message key="metadata.filters.crossref.settings.email.displayName">CrossRef Registration Email</message>
<message key="metadata.filters.crossref.settings.email.validationMessage">Please enter a valid CrossRef registration email. You can register your email for free on the CrossRef web site.</message>
<message key="metadata.filters.isbndb.settings.apiKey.displayName">ISBNdb API Key</message>
Expand All @@ -27,10 +28,14 @@
<message key="metadata.filters.paracite.settings.citationModule.validationMessage">Please select one of the given citation modules.</message>
<message key="metadata.filters.settings.isOptional.displayName">Don't use by default (will still be available to the editor)</message>
<message key="metadata.filters.settings.isOptional.validationMessage">Internal error. A non-valid value has been posted for the 'optional filter' setting. Please report this as a bug.</message>

<!-- messages shared between MD schemas -->
<message key="metadata.property.displayName.author">Authors</message>
<message key="metadata.property.validationMessage.author">For best results, authors should be entered in the following format: Coleman Jr, D. (Ralf) Dr.</message>
<message key="metadata.property.displayName.editor">Editors</message>
<message key="metadata.property.validationMessage.editor">For best results, editors should be entered in the following format: Coleman Jr, D. (Ralf) Dr.</message>

<!-- NLM-specific messages -->
<message key="metadata.property.displayName.article-title">Article/Paper Title</message>
<message key="metadata.property.validationMessage.article-title">Please enter a valid article/paper title.</message>
<message key="metadata.property.displayName.source">Journal/Book Title</message>
Expand Down Expand Up @@ -97,7 +102,24 @@
<message key="metadata.property.validationMessage.annotation">Please enter a valid annotation.</message>
<message key="metadata.property.displayName.publication-type">Publication Type</message>
<message key="metadata.property.validationMessage.publication-type">Please make sure that you always set a publication type. Currently supported values are book (for books or book chapters) and journal (for journal articles). Otherwise the citation output formatting will not work correctly.</message>

<!-- MODS-specific messages -->
<message key="metadata.property.displayName.title-type">Title Type</message>
<message key="metadata.property.validationMessage.title-type">Please make sure that you set a valid title type. Supported values are 'abbreviated', 'translated', 'alternative' and 'uniform'.</message>
<message key="metadata.property.displayName.nonSort">Part of title ignored while sorting</message>
<message key="metadata.property.validationMessage.nonSort">Please only enter the initial characters of the title that should be ignored when sorting the title.</message>
<message key="metadata.property.displayName.title">Title</message>
<message key="metadata.property.validationMessage.title">Please enter a valid title.</message>
<message key="metadata.property.displayName.subTitle">Subtitle</message>
<message key="metadata.property.validationMessage.subTitle">Please enter a valid subtitle.</message>
<message key="metadata.property.displayName.partNumber">Part Number</message>
<message key="metadata.property.validationMessage.partNumber">Please enter a valid part number.</message>
<message key="metadata.property.displayName.partName">Part Name</message>
<message key="metadata.property.validationMessage.partName">Please enter a valid part name.</message>
<message key="metadata.property.displayName.name-type">Name Type</message>
<message key="metadata.property.validationMessage.name-type">Please make sure that you set a valid name type. Supported values are 'personal', 'corporate' and 'conference'.</message>
<!-- FIXME: end -->

<message key="submission.agencies">Agencies</message>
<message key="submission.abstractViews">Abstract Views</message>
<message key="submission.accepted">Accepted</message>
Expand Down
93 changes: 93 additions & 0 deletions plugins/metadata/mods/schema/ModsNameSchema.inc.php
@@ -0,0 +1,93 @@
<?php

/**
* @file plugins/metadata/mods/schema/ModsNameSchema.inc.php
*
* Copyright (c) 2000-2010 John Willinsky
* Distributed under the GNU GPL v2. For full terms see the file docs/COPYING.
*
* @class ModsNameSchema
* @ingroup plugins_metadata_mods_schema
* @see MetadataSchema
*
* @brief Class that provides meta-data properties compliant with
* the MODS name tag from MODS Version 3.4. We only support
* those sub-elements we have use-cases for. We map elements and attributes
* from the original XML standard to 'element[@attribute="..."]' property
* names.
*
* See <http://www.loc.gov/standards/mods/mods-outline.html#name>.
*
* Wherever possible we follow the "Digital Library Federation / Aquifer
* Implementation Guidelines for Shareable MODS Records", see
* <https://wiki.dlib.indiana.edu/confluence/download/attachments/24288/DLFMODS_ImplementationGuidelines.pdf>
*
* The DLF/Aquifer Implementation Guidelines for Shareable MODS Records
* requires the use of at least one name description for the creator of the
* intellectual content of the resource, if available. Please use a type
* statement with all name descriptions for greater control and interoperability.
* In addition at least one namePart statement is a required of each name
* description.
*/


import('lib.pkp.classes.metadata.MetadataSchema');

class ModsNameSchema extends MetadataSchema {
/**
* Constructor
*/
function ModsNameSchema() {
// Configure the meta-data schema.
parent::MetadataSchema(
'mods-3.4-name',
'mods34',
array(ASSOC_TYPE_AUTHOR, ASSOC_TYPE_EDITOR)
);


// The type attribute can take the following values: personal,
// corporate and conference. This is a required attribute.
$this->addProperty('[@type]', array(METADATA_PROPERTY_TYPE_VOCABULARY => 'mods34-name-types'), false, METADATA_PROPERTY_CARDINALITY_ONE, 'metadata.property.displayName.name-type', 'metadata.property.validationMessage.name-type', true);

// The name itself is always wrapped in namePart elements. MODS allows for either
// breaking up parts of the name (given and family, for example) in different namePart
// elements or enclosing the entire name in one element. Use of the former method affords
// more control in sorting and display which is why it is the only encoding supported
// in our case.

// Use the following typeless namePart version for corporate and conference names.
$this->addProperty('namePart');

// Use the following namePart types for personal names.
$this->addProperty('namePart[@type="family"]');
$this->addProperty('namePart[@type="given"]');

// The attribute "termsOfAddress" is used to record titles and enumeration associated
// with a name, such as Jr., II, etc.
$this->addProperty('namePart[@type="termsOfAddress"]');

// The attribute "date" is used to parse dates that are not integral parts of a name,
// i.e. the lifetime of an author ("1901-1983") used to disambiguate an author name.
// Dates that are part of a name, e.g. dates within a conference name, do not use this
// attribute to separate the date, since it is an integral part of the name string.
// This attribute is not used when parsing the components of a corporate name.
$this->addProperty('namePart[@type="date"]');

// The affiliation subelement contains the name, address, etc. of an organization with which the
// name entity was associated when the resource was created. If the information is readily
// available, it may be included.
$this->addProperty('affiliation', METADATA_PROPERTY_TYPE_STRING, true);

// Use the role element as a wrapper element to contain coded and/or textual description
// of the role of the named entity. Use this element primarily with personal names. Repeat role
// for each new role. We only support coded roles which can be resolved to textual representations
// via the controlled vocabulary "mods34-name-role-roleTerms-marcrelator". See the controlled
// vocabulary for details of the allowed entries.
// NB: If we want to support various roleTerm types within one role then we'll have to create
// a separate meta-data schema for roles. We avoid this complexity for now as we don't have a
// use case for this.
$this->addProperty('role/roleTerm[@type="code" @authority="marcrelator"]', array(METADATA_PROPERTY_TYPE_VOCABULARY => 'mods34-name-role-roleTerms-marcrelator'), false, METADATA_PROPERTY_CARDINALITY_MANY);
}
}
?>

0 comments on commit 950f7e1

Please sign in to comment.