49
07/09/07 1 DSpace: Make it you own Documentation Research and Training Centre Indian Statistical Institute Bangalore Biswanath Dutta e-mail: [email protected]

07/09/07 1 DSpace: Make it you own Documentation Research and Training Centre Indian Statistical Institute…

Embed Size (px)

DESCRIPTION

07/09/07 3 Basic understanding of XHTML Basic understanding of CSS (Not necessary) Skills Required for DSpace Customization

Citation preview

Page 1: 07/09/07 1 DSpace: Make it you own Documentation Research and Training Centre Indian Statistical Institute…

07/09/07 1

DSpace: Make it you own

Documentation Research and Training CentreIndian Statistical Institute

Bangalore

Biswanath Duttae-mail: [email protected]

Page 2: 07/09/07 1 DSpace: Make it you own Documentation Research and Training Centre Indian Statistical Institute…

07/09/07 2

Why to make it our own

• Your own institutional need• User interface enhancements

Page 3: 07/09/07 1 DSpace: Make it you own Documentation Research and Training Centre Indian Statistical Institute…

07/09/07 3

Basic understanding of XHTML Basic understanding of CSS (Not necessary)

Skills Required for DSpace Customization

Page 4: 07/09/07 1 DSpace: Make it you own Documentation Research and Training Centre Indian Statistical Institute…

07/09/07 4

Three Layers of DSpace

• Application Layer (UI) : JSPs (XHTML/CSS) & Servlets

• Business Logic Layer : Java Classes / Objects• Storage Layer : Database & Filesystem APIs

Page 5: 07/09/07 1 DSpace: Make it you own Documentation Research and Training Centre Indian Statistical Institute…

07/09/07 5

DSpace Architecture

Ref: http://dspace.org/technology/system-docs/architecture.html

Page 6: 07/09/07 1 DSpace: Make it you own Documentation Research and Training Centre Indian Statistical Institute…

07/09/07 6

• JSPs (Java Server Pages) create HTML for the browsers to display

• JSP Tags, which help to "build" the webpage, and usually contain code useful to many different JSPs.

• Java Servlets, which perform any requests a User makes through the UI, and provide JSPs with all the information they need to create the next webpage.

• Java Classes, which define and retrieve information about the "objects" within the system.

Page 7: 07/09/07 1 DSpace: Make it you own Documentation Research and Training Centre Indian Statistical Institute…

07/09/07 7

How Java Interacts in DSpace

Page 8: 07/09/07 1 DSpace: Make it you own Documentation Research and Training Centre Indian Statistical Institute…

07/09/07 8

DSpace Directories

• Source Directories ([/home/dspace/dspace-source/])All customization generally takes place here

config/ - DSpace configurations jsp/ - DSpace JSPs src/ - DSpace Servlets & Classes

• Installaed Directories ([/home/dspace/]) Home to all "live" configuration files, properties, Java libraries (including

dspace.jar) Usually home to log files, reports, search indices, and "bitstreams" themselves!

• Webapplication Directory ([/home/dspace/tomcat/webapps/]) Home to all compiled servlets and JSPs Basic customizations can also takes place here (if you decide to do after

installation)

Page 9: 07/09/07 1 DSpace: Make it you own Documentation Research and Training Centre Indian Statistical Institute…

07/09/07 9

Basic Customization: Top News & Sidebar News

Top News

Sidebar News

•This is done from DSpace Administrator Interface as shown in the next slide

Page 10: 07/09/07 1 DSpace: Make it you own Documentation Research and Training Centre Indian Statistical Institute…

07/09/07 10

Step 1Step 2

Step 3

Basic Customization: Top News

•To change the Sidebar News, follow the same steps as shown in the above for Top News, only instead of Top News, choose Sidebar News (of Step 2)

Page 11: 07/09/07 1 DSpace: Make it you own Documentation Research and Training Centre Indian Statistical Institute…

07/09/07 11

Basic Customization: Default License

Remember: After necessary changes in the file, restart the tomcat server.

•Modify the default license from DSpace Administration Interface

Page 12: 07/09/07 1 DSpace: Make it you own Documentation Research and Training Centre Indian Statistical Institute…

07/09/07 12

Basic Customization: Default License

Page 13: 07/09/07 1 DSpace: Make it you own Documentation Research and Training Centre Indian Statistical Institute…

07/09/07 13

Customization: Look and Feel (CSS)CSS file Located in: • Before Compilation:

/home/dspace/dspace-source/jsp/styles.css.jsp After Compilation:

/home/dspace/tomcat/webapps/dspace/styles.css.jsp

Example:BODY { font-family: "verdana", Arial, Helvetica, sans-serif; font-size: 10pt; font-style: normal; color: #000000; background: red; margin: 0; padding: 0; margin-left:0px; margin-right:0px; margin-top:0px; margin-bottom:0px }

Remember: After making the necessary changes, just refresh the page to get effects

Page 14: 07/09/07 1 DSpace: Make it you own Documentation Research and Training Centre Indian Statistical Institute…

07/09/07 14

Page 15: 07/09/07 1 DSpace: Make it you own Documentation Research and Training Centre Indian Statistical Institute…

07/09/07 15

Customization: Header/ Footer/ Navbar

Located in:• Before Compilation: /home/dspace/dspace-source/jsp/layout• After Compilation: /home/dspace/tomcat/webapps/dspace/layout/

N.B. If you don’t want something to be appeared in the site, just comment it using <%-- and --%>

Example: <%-- <form method="get" action="<%= request.getContextPath()

%>/simple-search"> --%>

Remember: After making the necessary changes, just refresh the page to get effects

Page 16: 07/09/07 1 DSpace: Make it you own Documentation Research and Training Centre Indian Statistical Institute…

07/09/07 16

Page 17: 07/09/07 1 DSpace: Make it you own Documentation Research and Training Centre Indian Statistical Institute…

07/09/07 17

Page 18: 07/09/07 1 DSpace: Make it you own Documentation Research and Training Centre Indian Statistical Institute…

07/09/07 18

Customization: XHTML

• In JSP pages, Java code is surrounded by <%java code%> or <%=java variable%>. Any other thing outside of that is XHTML (except for JSP Tags).

<td> <a href="<%= request.getContextPath() %>/"><a

href="http://drtc.isibang.ac.in"><img src="<%= request.getContextPath() %>/image/isilogo.jpg" alt="<fmt:message key="jsp.layout.header-default.alt"/>" width="102" height="100" border="0"/></a></a>

</td> <td class="tagLine" width="99%"> <%-- Make as wide as

possible. cellpadding repeated for broken NS 4.x --%> <h1 align="center">Dspace @ DRTC</h1></td>

Remember: After making the necessary changes, just refresh the page to get effects

Page 19: 07/09/07 1 DSpace: Make it you own Documentation Research and Training Centre Indian Statistical Institute…

07/09/07 19

Customization: XHTML

Page 20: 07/09/07 1 DSpace: Make it you own Documentation Research and Training Centre Indian Statistical Institute…

07/09/07 20

Customization: Text

• “Messages.properties” contains almost all the text of DSpace

• Located in:Before Comlilation: /home/dspace/dspace-source/config/language-packs/After Compilation: /home/dspace/tomcat/webapps/dspace/WEB-INF/classes/

Format of “Messages.properties”jsp.layout.navbar-default.authors = Authors(Navigation bar text “Authors” shared by pages in /jsp/layout/navbar-default.jsp)

Remember: If changes are made in the “Messages.properties” after compilation, then we need to “shut-down” and “re-start” the Tomcat

Page 21: 07/09/07 1 DSpace: Make it you own Documentation Research and Training Centre Indian Statistical Institute…

07/09/07 21

• Keys in Messages.properties referenced in JSP with:<fmt:message key=“jsp.layout.navbar-default.authors”/>

(/jsp/layout/navbar-default.jsp)

• Example:jsp.community-home.heading1 is a heading within /jsp/community-

home.jspjsp.general.search.button is the text that appears on ALL search

buttons in DSpace

Customization: Text

Page 22: 07/09/07 1 DSpace: Make it you own Documentation Research and Training Centre Indian Statistical Institute…

07/09/07 22

Customization: TextBefore After

Page 23: 07/09/07 1 DSpace: Make it you own Documentation Research and Training Centre Indian Statistical Institute…

07/09/07 23

Customization: Edit/ Add Metadata

Page 24: 07/09/07 1 DSpace: Make it you own Documentation Research and Training Centre Indian Statistical Institute…

07/09/07 24

Customization: Edit/ Add Metadata

Add/ Update Metadata from DSpace Administrator interface (http://192.168.1.129:8080/dspace/dspace-admin)

Page 25: 07/09/07 1 DSpace: Make it you own Documentation Research and Training Centre Indian Statistical Institute…

07/09/07 25

Customization: Submit/ Input Form

Page 26: 07/09/07 1 DSpace: Make it you own Documentation Research and Training Centre Indian Statistical Institute…

07/09/07 26

Customization: Submit/ Input Form

Submission form is located in: Before Compilation: /home/dspace/dspace-source/config/input-forms.xml

After Compilation: /home/dspace/config/input-forms.xml

Page 27: 07/09/07 1 DSpace: Make it you own Documentation Research and Training Centre Indian Statistical Institute…

07/09/07 27

Customization: Submit/ Input Form

General format of input-forms.xml

<page number="1">

<field> <dc-element>govtdocrefno</dc-element> <dc-qualifier></dc-qualifier> <repeatable></repeatable> <label>Govt. Doc</label> <input-type>onebox</input-type> <hint>Enter Govt. Doc. No.</hint> <required></required> </field>

</page>

……………….Remember: After making any changes in the input form, re-start the Tomcat server

Page 28: 07/09/07 1 DSpace: Make it you own Documentation Research and Training Centre Indian Statistical Institute…

07/09/07 28

Customization: Search

Customize Advanced Search options: /home/dspace/config/dspace.cfg

Page 29: 07/09/07 1 DSpace: Make it you own Documentation Research and Training Centre Indian Statistical Institute…

07/09/07 29

Customization: Search

•Edit the search index in: /home/dspace/config/dspace.cfg

•This can change only your search result, not search display………….search.index.11 = identifier:dc.identifier.*search.index.12 = language:dc.language.isosearch.index.13 = keyword:dc.govtdocrefno.*

…………..

The general format is:

search.index.[number] = [search field]:element.qualifier

Remember: After making changes, re-index everything (go to /home/DSpace/bin and execute the command, ./index-all

Page 30: 07/09/07 1 DSpace: Make it you own Documentation Research and Training Centre Indian Statistical Institute…

07/09/07 30

Customization: Search

•To change the search display, edit advanced.jsp, dspace.cfg and Messages.properties

advanced.jsp located in:

Before compilation: /home/dspace/dspace-source/jsp/search/

After compilation: /home/DSpace/tomcat/webapps/dspace/search/

Messages.properties located in:

Before compilation: /home/dspace/dspace-source/config/language-packs/

After compilation: /home/dspace/tomcat/webapps/dspace/WEB-INF/classes/

Page 31: 07/09/07 1 DSpace: Make it you own Documentation Research and Training Centre Indian Statistical Institute…

07/09/07 31

In advanced.jsp

<option value="govtdocrefno" <%= field1.equals("govtdocrefno") ? "selected=\"selected\"" : "" %>><fmt:message key="jsp.search.advanced.type.govtdocrefno"/></option>

In dspace.cfg

search.index.13 = govtdocrefno:dc.govtdocrefno.*

In Messages.properties

jsp.search.advanced.type.govtdocrefno = Govt Doc. No.

Customization: Search

Page 32: 07/09/07 1 DSpace: Make it you own Documentation Research and Training Centre Indian Statistical Institute…

07/09/07 32

Customization: Search

Page 33: 07/09/07 1 DSpace: Make it you own Documentation Research and Training Centre Indian Statistical Institute…

07/09/07 33

Customization: Item Display

To modify the metadata displayed in item screen, modify dspace.cfg and Messages.properties

Remember: After making changes, re-index everything (go to /home/dspace/bin and execute the command, ./index-all

Page 34: 07/09/07 1 DSpace: Make it you own Documentation Research and Training Centre Indian Statistical Institute…

07/09/07 34

Customization: Item Display

In dspace.cfg, add the new field to be displayed/ or change the order to display

webui.itemdisplay.default = dc.title, dc.title.alternative, dc.contributor.*, \ dc.subject, dc.date.issued(date), dc.publisher, \ dc.identifier.citation, dc.relation.ispartofseries, \ dc.description.abstract, dc.description, \ dc.identifier.govdoc, dc.identifier.uri(link), \ dc.identifier.isbn, dc.identifier.issn, \ dc.identifier.ismn, dc.identifier, \ dc.govtdocrefno.*

In Messages.properties, name the field to be displayedmetadata.dc.title = Titlemetadata.dc.title.alternative = Other Titlesmetadata.dc.contributor.* = Authorsmetadata.dc.contributor.author = Authors...

...metadata.dc.identifier.isbn = ISBNmetadata.dc.govtdocrefno.* = Govt Doc. Ref. No.

Page 35: 07/09/07 1 DSpace: Make it you own Documentation Research and Training Centre Indian Statistical Institute…

07/09/07 35

Manakin : DSpace XML UI Project

Page 36: 07/09/07 1 DSpace: Make it you own Documentation Research and Training Centre Indian Statistical Institute…

07/09/07 36

Manakin : DSpace XML UI Project

It is the second release of the XML UI project’s customizable DSpace interface

Currently under development by Texas A&M University

Has ability for each community and collection within DSpace to

establish a unique look-and-feel

Builds upon the Cocoon2 framework

Uses Themes to style the content

Uses packages called Aspects to modularize the generation of the

content

Page 37: 07/09/07 1 DSpace: Make it you own Documentation Research and Training Centre Indian Statistical Institute…

07/09/07 37

Goals of the Project

Allow each community & collection to maintain a distinct look and feel

Separation of business logic from stylistic design

Establish an interface-level component architecture

Java / Cocoon development Tier

XML / XSL Theme Tier

HTML / CSS style Tier

Enable internationalization & localization of content

Provide an alternative interface that does not replace the

existing JSP based interface

Page 38: 07/09/07 1 DSpace: Make it you own Documentation Research and Training Centre Indian Statistical Institute…

07/09/07 38

Where Manakin fits within DSpace

Page 39: 07/09/07 1 DSpace: Make it you own Documentation Research and Training Centre Indian Statistical Institute…

07/09/07 39

Page 40: 07/09/07 1 DSpace: Make it you own Documentation Research and Training Centre Indian Statistical Institute…

07/09/07 40

Page 41: 07/09/07 1 DSpace: Make it you own Documentation Research and Training Centre Indian Statistical Institute…

07/09/07 41

Page 42: 07/09/07 1 DSpace: Make it you own Documentation Research and Training Centre Indian Statistical Institute…

07/09/07 42

Manakin Installation

Prerequisites•Java 5

•Tomcat 5.5

•Apache Ant 1.5

•PostgreSQL

•DSpace 1.4.1

•Manakin 1.0a (http://di.tamu.edu/projects/xmlui/snapshots/)

Page 43: 07/09/07 1 DSpace: Make it you own Documentation Research and Training Centre Indian Statistical Institute…

07/09/07 43

Manakin Installation (Cont’d..1)

Step 1: Configure /config/dspace.cfg

Add the following parameters to dspace.cfg file#

# Repository metadata

#

xmlui.repository.identifier = DSpace Manakin

xmlui.repository.description = This is the default repository description

xmlui.repository.publisher = Default DSpace publisher

xmlui.repository.subject = Default repository subject

xmlui.repository.title = DSpace XMLUI :: Manakin

Step 2: Configure Manakin

• Copy the theme and aspect configuration file xmlui.xconf from Manakin's source (/home/dspace/Manakin_1.0a/config/) to your DSpace installation configuration directory

• Copy the front page news file, news.xml from Manakin's source (/home/dspace/Manakin_1.0a/config/) to your DSpace configuration directory

Page 44: 07/09/07 1 DSpace: Make it you own Documentation Research and Training Centre Indian Statistical Institute…

07/09/07 44

Manakin Installation (Cont’d..2)

Step 3: Configure Tomcat

•Update Tomcat's server.xml to include a context parameter that tells Manakin where dspace.cfg configuration is located.

•Locate the <Host> element in server.xml and add the following line:<Context path="/manakin" >

<Parameter name="dspace-config"

value="/home/dspace/config/dspace.cfg"

description="Path to the DSpace configuration file." />

</Context>

Note: Here context's path is the name of the web application and the parameter's value is the absolute path to your dspace.cfg file

Page 45: 07/09/07 1 DSpace: Make it you own Documentation Research and Training Centre Indian Statistical Institute…

07/09/07 45

Manakin Installation (Cont’d..3)

Step 4: Compile and Deploy

Compile Manakin using an existing DSpace source tree

Use the "dspace" ant parameter to tell Manakin where your DSpace source directory is, as follows:

ant -Ddspace=/home/dspace/dpace-source build_wars

[Execute this command from Manakin source directory]

Step 5: Copy buid/manakin.war files to /home/dpace/tomcat/webapps

Step 6: Restart your Tomcat server

Page 46: 07/09/07 1 DSpace: Make it you own Documentation Research and Training Centre Indian Statistical Institute…

07/09/07 46

Skills Required for Working with Manakin

•Basics of XML

•Understand absolute/ relative paths

•Understanding of XHTML

•Understanding of CSS

Page 47: 07/09/07 1 DSpace: Make it you own Documentation Research and Training Centre Indian Statistical Institute…

07/09/07 47

Some Important Online Tutorials

CSS http://www.w3schools.com/css/default.asp http://www.echoecho.com/css.htm http://www.csstutorial.net/

XHTML http://www.w3schools.com/xhtml/ http://www.freewebmasterhelp.com/tutorials/xhtml http://www.quackit.com/xhtml/xhtml_tutorial.html

Page 48: 07/09/07 1 DSpace: Make it you own Documentation Research and Training Centre Indian Statistical Institute…

07/09/07 48

References

1. Manakin - DSpace Wiki. http://wiki.dspace.org/index.php/Manakin

2. DSpace XML UI Developers Guide. http://svn.di.tamu.edu/svn/xmlui/trunk/docs/ManakinDevelopersGuide.doc

3. Making DSpace Your Own. http://mars.gmu.edu:8080/dspace/bitstream/1920/1046/1/DSpaceSlides.pdf

Page 49: 07/09/07 1 DSpace: Make it you own Documentation Research and Training Centre Indian Statistical Institute…

07/09/07 49

Thank you!