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

Post on 20-Jan-2018

215 views 0 download

description

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

Transcript of 07/09/07 1 DSpace: Make it you own Documentation Research and Training Centre Indian Statistical...

07/09/07 1

DSpace: Make it you own

Documentation Research and Training CentreIndian Statistical Institute

Bangalore

Biswanath Duttae-mail: bisu@drtc.isibang.ac.in

07/09/07 2

Why to make it our own

• Your own institutional need• User interface enhancements

07/09/07 3

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

Skills Required for DSpace Customization

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

07/09/07 5

DSpace Architecture

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

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.

07/09/07 7

How Java Interacts in DSpace

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)

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

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)

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

07/09/07 12

Basic Customization: Default License

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

07/09/07 14

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

07/09/07 16

07/09/07 17

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

07/09/07 19

Customization: XHTML

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

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

07/09/07 22

Customization: TextBefore After

07/09/07 23

Customization: Edit/ Add Metadata

07/09/07 24

Customization: Edit/ Add Metadata

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

07/09/07 25

Customization: Submit/ Input Form

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

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

07/09/07 28

Customization: Search

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

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

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/

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

07/09/07 32

Customization: Search

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

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.

07/09/07 35

Manakin : DSpace XML UI Project

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

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

07/09/07 38

Where Manakin fits within DSpace

07/09/07 39

07/09/07 40

07/09/07 41

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/)

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

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

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

07/09/07 46

Skills Required for Working with Manakin

•Basics of XML

•Understand absolute/ relative paths

•Understanding of XHTML

•Understanding of CSS

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

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

07/09/07 49

Thank you!