-
Notifications
You must be signed in to change notification settings - Fork 63
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
finished first pass at nokogiri datastream with solr indexing
- Loading branch information
1 parent
965b369
commit 11fd295
Showing
6 changed files
with
248 additions
and
49 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,47 @@ | ||
class ModsArticle < ActiveFedora::NokogiriDatastream | ||
|
||
# have to call this in order to set namespace & schema | ||
root_property :mods, "mods", "http://www.loc.gov/mods/v3", :attributes=>["id", "version"], :schema=>"http://www.loc.gov/standards/mods/v3/mods-3-2.xsd" | ||
|
||
accessor :title_info, :relative_xpath=>'oxns:titleInfo', :children=>[ | ||
{:main_title=>{:relative_xpath=>'oxns:title'}}, | ||
{:language =>{:relative_xpath=>{:attribute=>"lang"} }} | ||
] | ||
accessor :abstract | ||
accessor :topic_tag, :relative_xpath=>'oxns:subject/oxns:topic' | ||
accessor :person, :relative_xpath=>'oxns:name[@type="personal"]', :children=>[ | ||
{:last_name=>{:relative_xpath=>'oxns:namePart[@type="family"]'}}, | ||
{:first_name=>{:relative_xpath=>'oxns:namePart[@type="given"]'}}, | ||
{:institution=>{:relative_xpath=>'oxns:affiliation'}}, | ||
{:role=>{:children=>[ | ||
{:text=>{:relative_xpath=>'oxns:roleTerm[@type="text"]'}}, | ||
{:code=>{:relative_xpath=>'oxns:roleTerm[@type="code"]'}} | ||
]}} | ||
] | ||
accessor :organization, :relative_xpath=>'oxns:name[@type="institutional"]', :children=>[ | ||
{:role=>{:children=>[ | ||
{:text=>{:relative_xpath=>'oxns:roleTerm[@type="text"]'}}, | ||
{:code=>{:relative_xpath=>'oxns:roleTerm[@type="code"]'}} | ||
]}} | ||
] | ||
accessor :conference, :relative_xpath=>'oxns:name[@type="conference"]', :children=>[ | ||
{:role=>{:children=>[ | ||
{:text=>{:relative_xpath=>'oxns:roleTerm[@type="text"]'}}, | ||
{:code=>{:relative_xpath=>'oxns:roleTerm[@type="code"]'}} | ||
]}} | ||
] | ||
accessor :journal, :relative_xpath=>'oxns:relatedItem[@type="host"]', :children=>[ | ||
{:title=>{:relative_xpath=>'oxns:titleInfo/oxns:title'}}, | ||
{:publisher=>{:relative_xpath=>'oxns:originInfo/oxns:publisher'}}, | ||
{:issn=>{:relative_xpath=>'oxns:identifier[@type="issn"]'}}, | ||
{:date_issued=>{:relative_xpath=>'oxns:originInfo/oxns:dateIssued'}}, | ||
{:issue => {:relative_xpath=>"oxns:part", :children=>[ | ||
{:volume=>{:relative_xpath=>'oxns:detail[@type="volume"]'}}, | ||
{:level=>{:relative_xpath=>'oxns:detail[@type="level"]'}}, | ||
{:start_page=>{:relative_xpath=>'oxns:extent[@unit="pages"]/oxns:start'}}, | ||
{:end_page=>{:relative_xpath=>'oxns:extent[@unit="pages"]/oxns:end'}}, | ||
{:publication_date=>{:relative_xpath=>'oxns:date'}} | ||
]}} | ||
] | ||
|
||
end |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,90 @@ | ||
<mods version="3.0" xsi:schemaLocation="http://www.loc.gov/mods/v3 | ||
http://www.loc.gov/standards/mods/v3/mods-3-0.xsd" xmlns="http://www.loc.gov/mods/v3" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"> | ||
|
||
<titleInfo> | ||
<nonSort>THE</nonSort> | ||
<title>ARTICLE TITLE HYDRANGEA ARTICLE 1</title> | ||
<subTitle>SUBTITLE</subTitle> | ||
</titleInfo> | ||
<titleInfo lang="finnish"> | ||
<title>Artikkelin otsikko Hydrangea artiklan 1</title> | ||
</titleInfo> | ||
|
||
<name type="personal"> | ||
<namePart type="family">FAMILY NAME</namePart> | ||
<namePart type="given">GIVEN NAMES</namePart> | ||
<namePart type="termsOfAddress">DR.</namePart> | ||
<displayForm>NAME AS IT APPEARS</displayForm> | ||
<affiliation>FACULTY, UNIVERSITY</affiliation> | ||
<role> | ||
<roleTerm authority="marcrelator" type="text">creator</roleTerm> | ||
</role> | ||
<role> | ||
<roleTerm type="text">submitter</roleTerm> | ||
</role> | ||
</name> | ||
|
||
<name type="personal"> | ||
<namePart type="family">Gautama</namePart> | ||
<namePart type="given">Siddartha</namePart> | ||
<namePart type="termsOfAddress">Prince</namePart> | ||
<affiliation>Nirvana</affiliation> | ||
<role> | ||
<roleTerm authority="marcrelator" type="text">teacher</roleTerm> | ||
</role> | ||
</name> | ||
|
||
<typeOfResource>text</typeOfResource> | ||
<genre authority="local">journal article</genre> | ||
|
||
<abstract>ABSTRACT</abstract> | ||
<subject> | ||
<topic>TOPIC 1</topic> | ||
<topic>TOPIC 2</topic> | ||
</subject> | ||
<subject authority="AUTHORITY SOURCE (RFCD, LCSH)"> | ||
<topic>CONTROLLED TERM</topic> | ||
</subject> | ||
|
||
<language> | ||
<languageTerm authority="iso639-2b" type="code">en-aus </languageTerm> | ||
</language> | ||
|
||
<physicalDescription> | ||
<internetMediaType>application/pdf</internetMediaType> | ||
<extent>36 p.</extent> | ||
</physicalDescription> | ||
|
||
<relatedItem type="host"> | ||
<titleInfo> | ||
<title>TITLE OF HOST JOURNAL</title> | ||
</titleInfo> | ||
<originInfo> | ||
<publisher>PUBLISHER</publisher> | ||
<dateIssued>DATE</dateIssued> | ||
</originInfo> | ||
<identifier type="issn">0013-8908</identifier> | ||
<part> | ||
<detail type="volume"> | ||
<number>2</number> | ||
</detail> | ||
<detail type="level"> | ||
<number>2</number> | ||
</detail> | ||
<extent unit="pages"> | ||
<start>195</start> | ||
<end>230</end> | ||
</extent> | ||
<date>FEB. 2007</date> | ||
</part> | ||
</relatedItem> | ||
|
||
<identifier type="uri">http://URL.edu.au/</identifier> | ||
<identifier type="doi">doi:10.1006/jmbi.1995.0238</identifier> | ||
<location> | ||
<url>http://URL.edu.au/</url> | ||
</location> | ||
<accessCondition type="restrictionOnAccess">EMBARGO NOTE</accessCondition> | ||
<accessCondition type="use and reproduction">OPEN ACCESS</accessCondition> | ||
|
||
</mods> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters