• 沒有找到結果。

文件資料處理

N/A
N/A
Protected

Academic year: 2021

Share "文件資料處理"

Copied!
50
0
0

加載中.... (立即查看全文)

全文

(1)

台大圖書館系統資訊組 江玉婷

2019/03/26

NTU Scholars

文件資料處理

TAIR團隊

陳光華館長、陳慧華組長

吳瑟量、江玉婷、林柏源、蔡玉紋、邱莉媛

(2)

大綱

• 系統資料結構

• 資料移轉

• 相關設定

(3)

資料架構

研究人員視角(學術庫) 文件視角(機構典藏)

檔案 檔案集

文件 系所

學院

Community

Collection

Item Item

Collection

Item

Bundle

Bitstream Bitstream

Bundle

Bitstream Item

子單位

單位

研究

RP Relation

人員

(Authority)

(4)

資料架構

機構典藏文件 (機構成員產出)

學術庫收錄文件

(現職人員著作)

(5)

資料結構

• Metadata內容種類

• Descriptive Metadata

• 描述物件相關資訊,可以提供檢索

• 預設為Dublin Core

• Administrative Metadata

• 管理用資訊,如版權,存取權限,版本控制等

• Structural Metadata

• 描述欄位與其他欄位的關係

• Preservation Metadata

• 物件建立及變更等歷史資訊

(6)

資料結構

• 所有物件都有Metadata

• Communities, Collections, Items, EPeople, Groups

• 使用預設DC格式

• Metadatavalue table

• Collection name: dc.title

(7)

資料結構

• 彈性的Metadata 資料欄位 (table: metadatavalue)

• Text-Field:欄位內容

• Authority:權威資料代碼參照

• Confidence:可信度

• Place:出現順序

• Lang :語言

• Resource_type

• 新增其他物件如:eperson group(6), eperson(7)…

resource_type resource_id metadata_field metadata_value

Item 55 title 臺灣原住民基本法之回…

Item 55 author 王泰升

item 55 date 1997

title author date

臺灣原住民基本法之回… 王泰升 1997

(8)

資料移轉 • Community & Collection

• 文件及檔案

• 帳號

• 權限

• 姓名權威資料

(9)

注意事項

由於新舊系統架構差異,

請勿直接於資料庫表格中新增/編輯資料,

均需透過系統後台或command line指令工具

(10)

Community & Collection

• 資料架構

• Collection:Dspace裝資料的容器,item一定要放在collection下

• Community:collection的類別,可以有一層或多層

• 建議

• 以異動性低的最小實體單位為collection

• 不再以資料類型作collection

• 建立方式

• 單筆重新建立

• 以xml檔匯入

(11)

Community & Collection

• xml匯入資料格式

• 匯入指令

[dspace]/bin/dspace structure-builder -f /path/to/source.xml -o path/to/output.xml -e admin@user.com

<community identifier="123456789/1">

<name>Community Name</name>

<description>Descriptive text</description>

<intro>Introductory text</intro>

<copyright>Special copyright notice</copyright>

<sidebar>Sidebar text</sidebar>

<community identifier="123456789/2">

<name>Sub Community Name</name>

<community identifier="123456789/3"> ...[ad infinitum]...

</community>

</community>

<collection identifier="123456789/4">

<name>Collection Name</name>

<description>Descriptive text</description>

…….

<license>Special licence</license>

<provenance>Provenance information</provenance>

</collection>

</community>

</import_structure>

(12)

Community & Collection

• Community架構設定

• 建立解除關聯

[dspace]/bin/dspace community-filiator --set --parent=parentID -- child=childID

[dspace]/bin/dspace community-filiator --remove --parent=parentID -

-child=childID

(13)

OAI資料同步

• 安裝NTUR patch程式以支援OAI-ORE

• Open Archives Initiative Object Exchange and Reuse

• 設定更新

• config/dspace.cfg

• config/oaicat.properties

• 程式更新

org.dspace.app.oai.DSpaceRecordCatalog org.dspace.app.oai.PluginCrosswalk

org.dspace.content.crosswalk.OREDisseminationCrosswalk org.dspace.content.crosswalk.OREIngestionCrosswalk

org.dspace.content.crosswalk.XHTMLHeadDisseminationCrosswalk Crosswalks.ore=org.dspace.app.oai.PluginCrosswalk

ore.authoritative.source = oai

plugin.named.org.dspace.content.crosswalk.IngestionCrosswalk = \

…..

org.dspace.content.crosswalk.OREIngestionCrosswalk

= ORE

plugin.selfnamed.org.dspace.content.crosswalk.IngestionCrosswalk = ……

org.dspace.content.crosswalk.OREIngestionCrosswalk

(14)

OAI資料同步

(Open Archives Initiative Object Exchange and Reuse)

• 欄位轉換及對應

• 自動產生所需欄位

• dc.date.issued

• dc.contributor.author (dc.creator)

• dc.relation.journalVolume, dc.relation.journalIssue, dc.relation.pages (dc.relation)

• 多值欄位切分:dc.subject及dc.contributor.author

• 以利權威代碼資料對應

• 隱藏資料無法移轉

(15)

OAI資料同步

• 設定collection OAI來源

• 後台設定

• 資料表直接設定

• harvested_collection

• 排程:定時與來源資料端同步

$DSPACE/bin/dspace oai import

• 手動同步單一collection

dspace dsrun

org.dspace.app.harvest.Harvest -r -e admin@ntu.edu.tw -c [collection

internal id]

(16)

整批匯入

• 將舊系統資料匯出,整理成CRIS系統所需資料格式

• 需選擇特定collection

• 內容格式

• DSpace Simple Archive Format

• CSV Metadata:管理介面匯出資料

(17)

• DSpace Simple Archive Format (SAF)

archive_directory/

item_000/

dublin_core.xml -- qualified Dublin Core metadata for metadata fields belonging to the dc schema

metadata_[prefix].xml -- metadata in another schema, the prefix is the name of the schema as registered with the metadata registry

contents -- text file containing one line per filename

collections -- text file that contains the handles of the collections the item will belong two. Optional. Each handle in a row.

-- Collection in first line will be the owning collection file_1.doc -- files to be added as bitstreams to the item

file_2.pdf item_001/

dublin_core.xml contents

file_1.png ...

整批匯入— SAF

(18)

整批匯入— SAF

• NTUR SAF匯出

[dspace]/bin/dspace export --type=COLLECTION --id=collectionID_or_handle - -dest=/path/to/destination --number=seq_num

• 執行匯入

• 管理整批匯入(有檔案大小限制)

• 伺服器執行指令

[dspace]/bin/dspace import

--add --eperson=joe@user.com

--collection=CollectionID

--source=items_dir

(19)

整批匯入— MetadataOnly

• 匯出現有清單

• 後台文件管理瀏覽 單一系統後匯出

• 整理成所需格式

• 轉換為utf-8 csv檔

• 內容結構

• 標題列:id,

collection, action, [metadata_column]

• 新增:在id欄位寫+

(20)

整批匯入— MetadataOnly

• 匯入執行方式

• 管理介面

• 有筆數限制,可設定

${dspace.dir}/config/module/bulkedit.cfg

• 可一次匯入多個collection

• 管理內容匯入後設資料

• 執行指令

${dspace.dir}/bin/metadata-import –f [file full path] –e [eperson

email]

(21)

整批匯入— MetadataOnly

(22)

整批匯入—MetadataOnly

• 其他匯入格式

• 管理內容整批匯入

• Biblio-Transformation-Engine (BTE)

• arXiv

• BibTeX (*.bib)

• CiNii

• CrossRef

• CSV (*.csv)

• EndNote

• OAI-PMH

• PubMed

• RIS (*.ris)

• TSV (*.tsv)

[dspace]/bin/dspace import -b -m mapFile -e [email] -c 123456789/1 -s

path-to-my-

(23)

資料取得介面(API) —資料物件

• REST API http://<dspace-webapp>/rest/

• 資料物件處理

• 登入/登出

功能

Community Collection Item Bitstream

查詢所有列表 V V V V

查詢子物件 V V V

查詢單一物件資訊 V V V V

建立物件 V V V V

更新物件及Metadata V V V V

刪除物件 V V V V

查詢/更新存取政策 V V

(24)

資料取得介面(API)—資料物件

• 執行方式

• GET:查詢

• GET /communities/{communityId}/collections - Returns an array of collections

• GET /items/{item id}/metadata - Return metadata of the specified item.

• POST:新增、修改、刪除、登入

• POST /items/{item id}/bitstreams - Add a bitstream to the specified item.

• DELETE /communities/{communityId}/collections/{collectionId}

• POST /login - Method for logging into the DSpace RESTful API.

{"email":"test@dspace","password":"pass"}. Returns a token which must be included in future requests in the "rest-dspace-token" header.

• 回傳物件: JSON OR XML

Item Object

{"id":14301,"name":"2015 Annual

Report","handle":"123456789/13470","type":"item","link":"/rest/items/14301","lastModi

(25)

登入授權機制(Authentication)

• 本地端密碼登入

• SSO標準協定

• Shibboleth

• LDAP

• X.509

• IP授權

${dspace.dir}/config/dspace.cfg

plugin.sequence.org.dspace.authenticate.AuthenticationMethod = org.dspace.authenticate.IPAuthentication

${dspace.dir}/config/modules/authentication-ip.cfg

ip.GROUPNAME = iprange[, iprange ...]

• 外部登入

• ORCiD

• 客製化:NTUAuthentication

(26)

登入授權機制(Authentication)

${dspace.dir}/config/modules/authentication.cfg

plugin.sequence.org.dspace.authenticate.AuthenticationMethod = org.dspace.authenticate.OAuthAuthenticationMethod,

org.dspace.authenticate.PasswordAuthentication, org.dspace.authenticate.NTUAuthentication

${dspace.dir}/config/modules/authentication-[method].cfg

(27)

帳號

• 主機本地端帳號:Dspace EPerson

• 新系統管理介面無整批建立帳號功能

• command line使用者操作

• 新增,修改,刪除

• 整批處理

• 刪除久未登入的使用者

[dspace]/bin/dspace user --add --email jquser@example.com -g John -s User --password hiddensecret [dspace]/bin/dspace user --modify -m george@example.com

[dspace]/bin/dspace user --delete -n martha

[DSpace]/bin/dsrun org.dspace.eperson.Groomer -a -b 07/20/1969

[DSpace]/bin/dsrun org.dspace.eperson.Groomer -a -b 07/20/1969 -d

(28)

帳號

• ORCiD

• 不存在的帳號自動建立

config/modules/authentication-oauth.cfg autoregister=true

• 單一簽入(台大規格)

• 提供single sign on 之介接API (web service)

• 需有技術人員開發界接程式

• 運作概念

• 遠端認證介面 (各校提供url)

• 回傳認證結果 (各校提供 session)

• 若認證通過,以session number取回使用者資料 (各校提供API)

• 若使用者第一次登入,則新建帳號 (NTUR)

依使用者所屬系所自動授予上傳權限給名稱相同的社群 (NTUR)

(29)

權限—系統功能使用權限

• 功能使用權限:EpersonGroup

• 讀取、上傳、編輯、刪除、審核、整批上傳、類別管理

• 系統無提供整批設定工具

• 資料庫處理

• 取得新舊資料表之collection_id, eperson_id, epersongroup_id對應後,

以程式整批處理

• epersongroup:群組主表

• 到metadatavalue table查詢群組名稱:resource_type_id=6

• 命名規則:COLLECTION_[collection_id]_ACTION_NAME

• Epersongroup2eperson:群組與使用者關聯

• Group2group:群組間關聯

(30)

資料取用控制(Authorization)

• 資料主體

• Community

• Collection

• Item

• Bitstream

• 授權對象

• Eperson

• Eperson Group

• Anonymous

• Administrator

• COLLECTION_XXX_SUBMIT

• COLLECTION_XXX_WORKFLOW

• COLLECTION_XXX_ADMIN

• 存取權限

• 適用日期

POLICY NAME

說明 適用物件

READ 讀取 Community

Collection ItemBitstream

WRITE 寫入/編輯

ADD/REMOVE 新增/刪除

WORKFLOW XX 審核

ADMIN 管理

DEFAULT_ITEM_READ 預設讀取文件 Collection DEFAULT_BITSTREAM_READ 預設讀取檔案

WITHDRAWN_READ 讀者隱藏文件

(31)

資料取用控制(Authorization)

• 一般使用者權限設定

• Collection上傳權限:COLLECTION_XXXX_SUBMIT

• 上傳後之item並無自動給予WRITE/REMOVE權限

• 需具有COLLECTION_ADMIN以上角色的使用者(群組)才能修改和刪除

• 以版本控制取代文件編輯:上傳者可建立版本

(32)

資料取用控制(Authorization)

• 資料認領 (claim publication)

• 資料存取申請 (request a copy)

• 檔案不開放下載時,向原上傳者申請資料存取權

(33)

權限—資料存取

• 權限設定元件

• 設定資料主體:社群、類別、文件、檔案

• 授權對象:使用者或群組

• 動作:讀取、新增、編輯、刪除、審核、類別管理員、整批 上傳…

• 存取日期限制:正向標示可讀取日期

• 整批設定

• 管理存取控制授權進階/文件大量政策管理工具

• 無法整批設定開放存取日期

• 以IP群組設定方式取代舊有各文件瀏覽限制設定

${dspace.dir}/config/modules/authentication-ip.cfg

ip.GROUPNAME = iprange[, iprange ...]

(34)

姓名權威資料

• NTUR做法:

• 於後台建立作者姓名變異表

• 以作者查詢文件時,系統自動做詞彙擴展,增加搜尋廣度

• 無法解決同名同姓問題

• NTU Scholars做法:

• 於研究人員(RP)主檔中建立別名

• 查詢研究人員時,會依作者各種姓名的建檔查詢可能符合資料,再選 擇特定研究人員進入取得其所屬文件

• 匯入研究人員主檔時,可一併匯入姓名權威資料

(35)

相關設定

• 權威資料及下拉式選單

• 外部資料來源參照

• 各種key值設定

• SOLR索引

• 背景排程工作

(36)

權威資料管理 (Authority Management)

• 權威代碼 (Authority Key)

• 欄位權威參照設定

${dspace.dir}/config/dspace.cfg

• 研究物件權威資料定義 (ChoiceAuthority plugin)

• 欄位關聯設定

• 新增文件資料時

• 自動建立新的權威物件

• 自動建立文件與權威物件連結

choices.plugin.dc.contributor.author = RPAuthority choices.presentation.dc.contributor.author = suggest authority.controlled.dc.contributor.author = true

plugin.named.org.dspace.content.authority.ChoiceAuthority = org.dspace.app.cris.integration.RPAuthority = RPAuthority,\

org.dspace.app.cris.integration.OUAuthority = OUAuthority,\

(37)

權威資料管理 (Authority Management)

• 設定item與權威物件之關聯

(38)

權威資料管理 (Authority Management)

• 權威資料參照統計:管理內容權威管埋

(39)

資料選擇管理 (Choice Management)

• 應用時機

• 單筆資料上傳

• 單筆資料編輯

• Metadata輸入之選項參照

• Input-form.xml檔內簡單參照

• 階層性控制詞彙

• OWL或RDF相容

choices.plugin.dc.type = common_types choices.presentation.dc.type = select

${dspace.dir}/config/input-forms.xml

<field>

<dc-schema>dc</dc-schema>

<dc-element>type</dc-element>

<dc-qualifier></dc-qualifier>

<repeatable>true</repeatable>

<label>Type</label>

<input-type value-pairs-

name="common_types">dropdown</input-type>

<hint></hint>

<required></required>

<vocabulary closed=“false”>abc</vocabulary>

</field>

<select name="common_types">

<option VALUE=“article">Article</option>

<option VALUE=“book”>Book</option>

……

</select>

config/controlled-vocabularies/abc.xml

(40)

外部資料來源參照欄位對應

• Biblio-Transformation-Engine (BTE)

• 整批匯入指令

[dspace]/bin/dspace import -b -m mapFile -e example@email.com -c 123456789/1 -s path-to-my-xxxxx-file -i

[xxxxXML]

• 欄位對應設定[dspace]/config/spring/api/bte.xml

<bean name="wosInputMap" class="java.util.HashMap"

scope="prototype">

<constructor-arg>

<map key-type="java.lang.String" value- type="java.lang.String">

<entry key="isiId" value="isiId" />

<entry key="doi" value="doi" />

<entry key="issn" value="jissn" />

<entry key="journalTitle" value="journal" />

<entry key="title" value="title" />

<entry key="year" value="issued" />

<entry key="volume" value="volume" />

<bean name="outputMap" class="java.util.HashMap" scope="prototype">

<constructor-arg>

<map key-type="java.lang.String" value-type="java.lang.String">

<entry value="jissn" key="dc.identifier.issn" />

<entry value="jeissn" key="dc.identifier.eissn" />

<entry value="pisbn" key="dc.identifier.isbn" />

<entry value="eisbn" key="dc.identifier.eisbn" />

<entry value="journal" key="dc.relation.ispartof" />

<entry value="proceedingsPaper.journal"

key="dc.relation.ispartofbook" />

(41)

外部資料來源參照欄位對應

• crosswalks

[dspace]/config/crosswalks/

• oaidc.properties

• orcid-work-metadata.properties

• bibtex.template

• citation.template

• endnote.template

# <schema>.<element>.(<qualifier|*>) = element oai_dc

# you can map more then one metadata to the same oai_dc element,

# see for example (dc.contributor.editor, dc.contributor.advisor, etc.) dc.title.* = title

dc.contributor.author = creator dc.contributor = contributor dc.contributor.editor = contributor dc.contributor.advisor = contributor dc.contributor.illustrator = contributor dc.contributor.other = contributor dc.date.* = date

dc.description = description

dc.description.abstract = description dc.description.sponsorship = description

dc.description.statementofresponsibility = description

(42)

外部資料來源參照欄位對應

• Google索引優化

• Google Scholar Metadata對應

• Highwire press tag (in HTML HEAD tag)

• Prefix: citation_

• 系統設定

• 開啟highware press tag功能

${dspace.dir}/config/dspace.cfg google-metadata.enable = true

• 設定欄位對應

${dspace.dir}/config/crosswalks/google-metadata.properties

google.citation_title = dc.title

google.citation_publisher = dc.publisher

<meta name="citation_keywords" content="article" />

<meta name="citation_title" content="Examining the socio-technical determinants influencing government agencies' open data publication: A study in Taiwan"

<meta name="citation_issn" content="0740-624X" />

<meta name="citation_language" content="aaa" />

<meta name="citation_author" content="TUNG-MOU YANG" />

<meta name="citation_date" content="2016" />

<meta name="citation_abstract_html_url" content="https://scholars.lib.ntu.edu.tw/handle/123456789/25612" />

(43)

各種key值設定

• google:[dspace]/config/dspace.cfg

jspui.google.analytics.key=

key.googleapi.maps =

• 查詢外部資料庫API [dspace]/config/dspace.cfg

#### Lookup submission provider ####

submission.lookup.scopus.apikey =

submission.lookup.scivalcontent.apikey =

submission.lookup.webofknowledge.ip.authentication = true submission.lookup.webofknowledge.user =

submission.lookup.webofknowledge.password =

(44)

Solr索引

• 索引指令

[dspace]/bin/dspace index-discovery [-cbhf[r <item handle>]]

• 索引設定

• [dspace]/config/modules/discovery.cfg

discovery.search.server

discovery.search.server=[http://localhost:8080/solr/search]

discovery.index.authority.ignore[.field]

discovery.index.authority.ignore=true

discovery.index.authority.ignore.dc.contributor.author=false discovery.index.authority.ignore-prefered[.field]

discovery.index.authority.ignore-prefered=true

discovery.index.authority.ignore-prefered.dc.contributor.author=false

(45)

Solr索引設定

• [dspace]/config/spring/api/discovery.xml

• Sidebar facets:searchFilterAuthor,searchFilterSubject,searchFilterIssued

• Search filters:searchFilterTitle , searchFilterAuthor , searchFilterSubject ,

searchFilterIssued

• Sort fields:sortTitle,sortDateIssued

• defaultFilterQueries

• Recent Submissions.

• Hit highlighting

• The fields dc.title, dc.contributor.author & dc.subject can contain hit highlighting.

• The dc.description.abstract & full text field are used to render search snippets.

• Non indexed metadata fields

Community/Collections: dc.rights (copyright text)

Items: dc.description.provenance

(46)

背景排程工作

• 本機索引

• $DSPACE/bin/dspace index-discovery > /dev/null

• $DSPACE/bin/dspace index-authority > /dev/null

• $DSPACE/bin/network-builder:研究人員網路

• $DSPACE/bin/dspace generate-sitemaps

• 統計

• $DSPACE/bin/view-and-download-retrieve:瀏覽及下載統計

• $DSPACE/bin/dspace stats-util –I

• 批次工作

• $DSPACE/bin/subscribe-*:訂閱紀錄發送

• $DSPACE/bin/dspace checker -l –p

(47)

背景排程工作

• 資料同步

• OAI:$DSPACE/bin/dspace oai import > /dev/null

• ORCiD:$DSPACE/bin/dspace dsrun org.dspace.app.cris.batch.ScriptPushOrcid

• Scopus: ./dspace dsrun org.dspace.app.cris.batch.ScopusFeed -p <submitter-email> -c collectionID

• Web of Knowledge: ./dspace dsrun org.dspace.app.cris.batch.WosFeed -p <submitter- email> -c collectionID

• Pubmed Europe: ./dspace dsrun org.dspace.app.cris.batch.PMCEuropeFeed -p <submitter- email> -c collectionID

• 引文資訊查詢

• Scopus: $DSPACE/bin/scopus-retrieve

• Web of Knowledge: $DSPACE/bin/wos-retrieve

• PMC: $DSPACE/bin/pubmed-retrieve-citation-second

(48)

備份

• 系統檔案:dspace主目錄

• 文件檔案: [dspace]/assetstore

• 參數設定檔: [dspace]/config

• 資料庫

• postgresql

• 歷史紀錄(無法重建)

• [dspace]/log/*, [dspace]/reports/*, ….等

• 系統程式(可重建)

• [tomcat]/webapps/*

• [dspace]/bin/*, [dspace]/lib/*

• 索引檔(可重建)

• [dspace]/search/*, [dspace]/solr/*, [dspace]/sitemaps/*,

(49)

障礙排除

• 查看log

• [dspace]/log/solr.log :索引類錯誤

• [dspace]/log/dspace.log.[date] :內部系統錯誤

• [tomcat]/log/catalina.*,localhost.*:其他錯誤(如畫面一片空白)

• 設定log模式為debug模式

• 修改/opt/dspace/config/log4j.properties

• 把INFO改為DEBUG

(50)

感謝聆聽 敬請指教

參考文獻

相關文件

在撰寫網頁應用程式 HTML 的語法當中,以下何者錯誤?(A)&lt;a&gt;是用來製作超連結的標記(Tag) (B)HREF 是一個在&lt;a&gt;與&lt;/a&gt;中指定其他

檢附附件八至 附件十二等資 料送核轉機關 審查;核轉機 關應於收受接 受補助單位送 請審查十五日 內,檢附附件 八至附件十及 附件十二等資 料送本部辦理

校長備忘 入營前及隨營 文件... (ii)

(intensive physical training). (最好印備5日4夜之活動時間表交學生讓醫生評估)

操作流程: 系統選單-&gt;財產管理系統-&gt;點選報廢申請單-&gt;填寫報廢申請單資料(主 單、明細)-&gt;點選確認

Client: Angular 、 Cordova Server: Node.js(Express) 資料庫: MySQL. 套件管理: Node Package

 for…迴圈自初值開始判斷 &lt;條件判斷&gt; 是否為 true,若為 true 則執行 for 迴圈內的敘述,並依 &lt;增量值&gt;,每次增 加 (或減少) 指定的增量值,直至 &lt;條件判斷&gt;

(主頁 &gt; 學校行政及管理 &gt; 財務管理 &gt; 學校財務注意 事項 &gt; 學校及其教職員收受利益和捐贈事宜參考資料 ). EDB ScExO Ind Prog