40
EPrints Web Configura tion Managemen t

EPrints Web Configuratio n Management. SQL database Web server Scripts to configure repository activities Configuration files EPrints - the Administrator's

Embed Size (px)

Citation preview

Page 1: EPrints Web Configuratio n Management. SQL database Web server Scripts to configure repository activities Configuration files EPrints - the Administrator's

EPrintsWebConfiguration Management

Page 2: EPrints Web Configuratio n Management. SQL database Web server Scripts to configure repository activities Configuration files EPrints - the Administrator's

SQL database Web server Scripts to configure repository activities Configuration files

EPrints - the Administrator's View

Page 3: EPrints Web Configuratio n Management. SQL database Web server Scripts to configure repository activities Configuration files EPrints - the Administrator's

Orientation

Where is the configuration information?

Page 4: EPrints Web Configuratio n Management. SQL database Web server Scripts to configure repository activities Configuration files EPrints - the Administrator's

On the Server: The EPrints Folder

Page 5: EPrints Web Configuratio n Management. SQL database Web server Scripts to configure repository activities Configuration files EPrints - the Administrator's

EPrints Folder: Configuration

Global configuration for all repositories

Repository-specific configuration for each repository

One EPrints install can run multiple repositories

each may be very different in style & functionality

Page 6: EPrints Web Configuratio n Management. SQL database Web server Scripts to configure repository activities Configuration files EPrints - the Administrator's

EPrints Folder: All of the Archives

Page 7: EPrints Web Configuratio n Management. SQL database Web server Scripts to configure repository activities Configuration files EPrints - the Administrator's

Contents of archives Folder

A subdirectory for every active repository

Page 8: EPrints Web Configuratio n Management. SQL database Web server Scripts to configure repository activities Configuration files EPrints - the Administrator's

Contents of individual archive folder

The configuration files for this repository

Page 9: EPrints Web Configuratio n Management. SQL database Web server Scripts to configure repository activities Configuration files EPrints - the Administrator's

Contents of individual archive directory

PDFs etc.

Page 10: EPrints Web Configuratio n Management. SQL database Web server Scripts to configure repository activities Configuration files EPrints - the Administrator's

Contents of individual archive directory

Processed static webpages (e.g. home page, abstract pages and views). This is where content gets served from.

Page 11: EPrints Web Configuratio n Management. SQL database Web server Scripts to configure repository activities Configuration files EPrints - the Administrator's

Contents of individual archive directory

Temporary files

Page 12: EPrints Web Configuratio n Management. SQL database Web server Scripts to configure repository activities Configuration files EPrints - the Administrator's

Contents of individual archive directory

Page 13: EPrints Web Configuratio n Management. SQL database Web server Scripts to configure repository activities Configuration files EPrints - the Administrator's

Layers of Configuration Management give a wide range of power and flexibility

Page 14: EPrints Web Configuratio n Management. SQL database Web server Scripts to configure repository activities Configuration files EPrints - the Administrator's

Configuration Files

Every repository on each server has many dozens of configuration files.

Page 15: EPrints Web Configuratio n Management. SQL database Web server Scripts to configure repository activities Configuration files EPrints - the Administrator's

Command line Editing

Command line editing requires the authorisation to get terminal access to the server, and the skill to use the command line shell and text editors.

Page 16: EPrints Web Configuratio n Management. SQL database Web server Scripts to configure repository activities Configuration files EPrints - the Administrator's

Web Configuration Editing

Web configuration editing allows config files to be edited in a web page. You still need to understand the config file contents and where they go, but it is more convenient.

Page 17: EPrints Web Configuratio n Management. SQL database Web server Scripts to configure repository activities Configuration files EPrints - the Administrator's

Phrase Editor Application

Lists all phrases used by the repository Edit or add new ones

You don’t need to know about the config files at all - the phrase editor reads and writes them for you and shows their contents in an easy-to-understand way.

Page 18: EPrints Web Configuratio n Management. SQL database Web server Scripts to configure repository activities Configuration files EPrints - the Administrator's

Metadata Editor Application

Lists all metadata used by the repository Add new metadata fields

You don’t need to know about the config files at all - the metadata editor reads and writes them for you and shows their contents in an easy-to-understand way.

Page 19: EPrints Web Configuratio n Management. SQL database Web server Scripts to configure repository activities Configuration files EPrints - the Administrator's

Web Page Editor Application

Allows you to edit the repository template and home pages You don’t need to know about the config files at all - the

web page editor reads and writes them for you and shows their contents in an easy-to-understand way.

Page 20: EPrints Web Configuratio n Management. SQL database Web server Scripts to configure repository activities Configuration files EPrints - the Administrator's

Now in Web browser

Configuration can now be viewed and edited from the web browser instead of the command line

The config file structure is mimicked in the display’s tree structure

Some tasks have bespoke interface Phrases, subjects, metadata schema All the underlying config files can still

be accessed on command line

Page 21: EPrints Web Configuratio n Management. SQL database Web server Scripts to configure repository activities Configuration files EPrints - the Administrator's

Caveat Administrator

Config files contain either XML Raw data Perl data

Perl files are programs! EPrints does not allow Perl

editing by default You must specify +config/edit/perl in the administrator’s roles

Page 22: EPrints Web Configuratio n Management. SQL database Web server Scripts to configure repository activities Configuration files EPrints - the Administrator's

Introduction to Configuration

We will some of the more important configuration by looking at common tasks

1. Page Editing2. Metadata Schema Management3. Phrase Management4. Deposit workflow5. Bibliographic styles6. Views7. Searches

Page 23: EPrints Web Configuratio n Management. SQL database Web server Scripts to configure repository activities Configuration files EPrints - the Administrator's

Task 1: Editing EPrints pages

All EPrints pagesAll EPrints pages

templatetemplate

page contentpage content

++

equalsequals

Page 24: EPrints Web Configuratio n Management. SQL database Web server Scripts to configure repository activities Configuration files EPrints - the Administrator's

The template provides a uniform style

It sets the layout and visual structure e.g. 1-column fixed width vs 3-column liquid

It imports all the necessary stylesheets and scripts

It uses “university brand” images, colours and designs

Page 25: EPrints Web Configuratio n Management. SQL database Web server Scripts to configure repository activities Configuration files EPrints - the Administrator's

Templates assemble many different fragments of content into a complete Web page

The template is a skeleton HTML file with named “pins” that insert different bits of content in the right place in the page structure

repositoryURL

page

content

page title

repositoryname

Page 26: EPrints Web Configuratio n Management. SQL database Web server Scripts to configure repository activities Configuration files EPrints - the Administrator's

Examples

Page 27: EPrints Web Configuratio n Management. SQL database Web server Scripts to configure repository activities Configuration files EPrints - the Administrator's

EPrints provides for static and dynamic page contents

Home Page

About PageHelp Page

Search Page

Browse View

Abstract Page

STATIC

STATIC

DYNAMIC

DYNAMIC

Page 28: EPrints Web Configuratio n Management. SQL database Web server Scripts to configure repository activities Configuration files EPrints - the Administrator's

Editing Repository Pages

The Edit Page screen assembles the template and page content into a single HTML file for editing by a web page editor.

Or, you can separately edit the template

 

and the page contents  

cfg/lang/en/templates/default.xml

cfg/lang/en/static/index.xpage

Page 29: EPrints Web Configuratio n Management. SQL database Web server Scripts to configure repository activities Configuration files EPrints - the Administrator's

Task 2: Metadata Schema Control

EPrints uses the same familiar metadata workflow interface to enter new metadata and to define new kinds of metadata for eprints, documents and users.

• add new fields for local requirements• text, dates, booleans, names, compound• restricted vocabularies

Page 30: EPrints Web Configuratio n Management. SQL database Web server Scripts to configure repository activities Configuration files EPrints - the Administrator's

Metadata Schema

The “Manage Metadata Fields” screen lists the current set of fields in the

database Allows you to easily create new fields on

the fly It allows you to add new fields to

eprints , documents , users

As well as creating the fields, it adds phrases for names and help text places in the deposit workflow

Page 31: EPrints Web Configuratio n Management. SQL database Web server Scripts to configure repository activities Configuration files EPrints - the Administrator's

Task 3: EPrints Phrases

All EPrints screens and fields and buttons are given structured ids e.g. eprint_fieldname_creators

and each id is given a phrase in one or more languages The Phrase Editor lists all the structured ids and lets you change

the human language phrases.

Page 32: EPrints Web Configuratio n Management. SQL database Web server Scripts to configure repository activities Configuration files EPrints - the Administrator's

Task 4: Deposit Workflow

The deposit pages are shown to users in a specific order

this is specified in a workflow configuration file: cfg/workflows/eprint/default.xml <flow>

<stage ref="type"/> <stage ref="files"/> <stage ref="core"/> <stage ref="subjects"/> </flow>

Page 33: EPrints Web Configuratio n Management. SQL database Web server Scripts to configure repository activities Configuration files EPrints - the Administrator's

flowflow

type

type

files

files

subject

subject

core

core

typetypefiles

format, license, embargo

filesformat, license,

embargocoretitle, abstract, creators, date,

journal, volume, publisher, keywords

coretitle, abstract, creators, date,

journal, volume, publisher, keywords

subjectsubject

The EPrints deposit workflow is specified by an XML document.

It contains a flow element which points to a number of stages. Each stage will appear in a separate web page.

Each stage element contains a number of components and fields.

Components are boxes on the web page. Fields are metadata input items.

Components can be divided between any number of stages.

EPrints Workflow

Page 34: EPrints Web Configuratio n Management. SQL database Web server Scripts to configure repository activities Configuration files EPrints - the Administrator's

<stage name="core"> <component> <field ref="title" required="yes"/> </component> <component> <field ref="abstract"/> </component></stage>

<stage name="core"> <component> <field ref="title" required="yes"/> </component> <component> <field ref="abstract"/> </component></stage>

Notes

The EPrints phrase used for the ‘core’ stage is “Details”. You can change it in the phrase editor.

The title field is required, so it gets a red star next to it.

Sample Workflow with Displayed Result

Page 35: EPrints Web Configuratio n Management. SQL database Web server Scripts to configure repository activities Configuration files EPrints - the Administrator's

<component collapse="yes"><field ref="note"/></component><component collapse="yes"><field ref="note"/></component>

A component can be set to collapse and its contained field is hidden by default.It appears again when the user clicks on the reveal button.

collapsed revealed

Collapsed Components

Page 36: EPrints Web Configuratio n Management. SQL database Web server Scripts to configure repository activities Configuration files EPrints - the Administrator's

Conditional Components

A component can be made conditional, using elements from the EPrints Control (or epc) format.

Here the thesis_type field will only be shown for eprints if they are declared to be of type thesis, and not for books or journal articles.

epc:choose provides another kind of conditional test.

For more details about controlling the visibility of components, see

EPrints Control format (EPC)http://wiki.eprints.org/w/EPrints_Control_Format

EPScript language http://wiki.eprints.org/w/EPScript

<epc:if test="type = 'thesis'"> <component><field ref="thesis_type"/></component></epc:if>

<epc:if test="type = 'thesis'"> <component><field ref="thesis_type"/></component></epc:if>

Page 37: EPrints Web Configuratio n Management. SQL database Web server Scripts to configure repository activities Configuration files EPrints - the Administrator's

Task 5: Bibliographic Formats

EPrints uses rules to create “bibliographic references” whenever it refers to an eprint

In the abstract page In a list of search results On a view page

These rules (the bibliographic styles) are expressed in an XML language

(Same language as used in workflows)

Page 38: EPrints Web Configuratio n Management. SQL database Web server Scripts to configure repository activities Configuration files EPrints - the Administrator's

Task 5: Bibliographic Formats (2)

Galil, L. and Utsunomiya, R. (2005) Mexican Musk Turtles and Man. Animal Issues, 18 (19). pp. 146-193.

<choose> <when test="type = 'book' and is_set( creators )"> <print expr="creators_name"/> </when> <when test="type = 'book' and !is_set( creators )"> <print expr="editors_name"/>, ed<if test="length(editors_name) gt 1">s</if>. </when> <when test="type = 'patent'"> <print expr="patent_applicant"/> </when> <otherwise> <print expr="creators_name"/> </otherwise></choose><if test="date">(<print expr="date" opts="res=year"/>)</if><cite:linkhere><xhtml:em><print expr="title" opts="magicstop"/></xhtml:em></cite:linkhere>

cfg/citations/eprint/default.xml

Page 39: EPrints Web Configuratio n Management. SQL database Web server Scripts to configure repository activities Configuration files EPrints - the Administrator's

Task 6: Making Views

Rules for generating the views / collections cfg/cfg.d/views.pl

{ id => "types", fields => "type", order => "-date/title", hideempty => 1,},

Page 40: EPrints Web Configuratio n Management. SQL database Web server Scripts to configure repository activities Configuration files EPrints - the Administrator's

Task 7: Making Searches

Rules for making different searchescfg/cfg.d/search.pl

$c->{search}->{simple} = { search_fields => [{id => "q", meta_fields => [$EPrints::Utils::FULLTEXT,"title","abstract","creators_name","date" ] },], preamble_phrase => "cgi/search:preamble", title_phrase => "cgi/search:simple_search", citation => "result", page_size => 20, order_methods => { "byyear" => "-date/creators_name/title", "byyearoldest" => "date/creators_name/title", "byname" => "creators_name/-date/title”, "bytitle" => "title/creators_name/-date"}, default_order => "byyear", show_zero_results => 1, };