DSpace Configuration and Customization

Document Sample
DSpace Configuration and Customization Powered By Docstoc
					             DSpace
 Configuration and Customization

           Thomas Abraham
           thomas@ncsi.iisc.ernet.in

       National Centre for Science Information
             Indian Institute of Science
                     Bangalore
                       INDIA




NCSI
                How ????


• Altering the configuration files in
  [dspace]/config
• Creating modified versions of the JSPs
• Implementing a custom 'plug-in' class
• Editing the source code


NCSI
       Configuration Properties File
                        dspace.cfg

• basic information about a DSpace installation
   eg:-system path information, network host information
• property/value pairs of the form
    property.name = property value
• The property value may contain references to other
  configuration properties, in the form ${property.name}
  eg:- property.name = word1 ${other.property.name} more words
      property2.name = ${dspace.dir}/rest/of/path
• run [dspace]/bin/install-configs


NCSI
             Basic Configuration

• DSpace installation directory
  dspace.dir = /dspace
• DSpace base URL. Include port number etc.,
  but NOT trailing slash
  dspace.url = http://10.180.15.15:8080/dspace
• DSpace host name - should match base URL.
  (Do not include port number)
  dspace.hostname = 10.180.15.15
• Name of the site
  dspace.name = DSpace at NCSI
NCSI
          Database Configuration

• Database name
  (Example:-"oracle", or "postgres“)
  db.name = postgres
• Database username and password
 db.username = dspace
 db.password = dspace


NCSI
          Email Configuration

• SMTP mail server
 mail.server=localhost
• SMTP mail server authentication
  username and password (if required)
 mail.server.username = myusername
 mail.server.password = mypassword
• From address for mail
 mail.from.address = thomas@ncsi.iisc.ernet.in

NCSI
           Email Configuration
                                        Contd…

• Currently limited to one recipient!
  feedback.recipient = thomas@ncsi.iisc.ernet.in
• General site administration (Webmaster)
  e-mail
  mail.admin = thomas@ncsi.iisc.ernet.in
• Recipient for server errors and alerts
 alert.recipient = thomas@ncsi.iisc.ernet.in

NCSI
         File Storage Configuration


• assetstore.dir = ${dspace.dir}/assetstore
• We can define other directory for storage, incase
  the initial one is full. Specify extra asset stores like
  this, counting from 1 upwards
• Eg :- assetstore.dir.1 = /second/assetstore
        assetstore.dir.2 = /third/assetstore



NCSI
            General Configuration

• Directory for history serializations
  history.dir = ${dspace.dir}/history
• Where to put the logs
   log.dir = ${dspace.dir}/log
• To store temporarilyuploaded files
   upload.temp.dir = ${dspace.dir}/upload
• Maximum size of uploaded files in bytes
  eg:- upload.max = 536870912 (negative unlimited)
NCSI
                        Modifying Text
• Where to edit ????
  [dspace-source]/jsp/(JSP containing the text you want to
  change)
  [dspace-source]/config/language-
  packs/Messages.properties
• How ????
    Open Messages.properties and find the text to modify
     If Messages.properties contains the text in more than one place, open the
  relevant JSP and find the key attribute of the appropriate <fmt:message>
  element
    Change text (that corresponds to key) in messages.properties

 NCSI
           Adding New Text to a JSP
• Where to edit ????
  [dspace-source]/jsp/(JSP containing the text we
  want to change)
  [dspace-source]/config/language-
  packs/Messages.properties
• How ????
   Open the relevant JSP and add a new <fmt:message>
   element where we want the new text to appear,
   making sure that the value of the key attribute is
   unique

 NCSI
          Adding New Text to a JSP
                                               Contd…
  Open Messages.properties and find the list of key
  values for the JSP just changed. Add a new line
   corresponding to the new key.
Note:-
  Messages.properties contains pairs of “keys” and “values”.
  The “key” usually refers to the location of the JSP on
  which this text resides




NCSI
         Customizing Overall Layout
• Where to edit ????
 [dspace-source]/jsp/local/layout/*.jsp
  [dspace-source]/jsp/local/styles.css.jsp
• How ????
 Modify the HTML
   header-default.jsp (Default Header)
   footer-default.jsp (Default Footer)
   location-bar.jsp(Location Bar)
   navbar.jsp (Default Navigation Bar)
   navbar-admin.jsp (Admin Navigation Bar)
 Modify the CSS in styles.css.jsp

NCSI
     Customizing Single Page Layout

• Where to edit ????
 Any JSP in [dspace-source]/jsp/local/
• How ????
 i.Find the following JSP Tag near the top of the JSP:
 <dspace:layout … >
 ii. Pass this tag any of the following “attributes”, to
 customize the layout of this JSP :



NCSI
    Customizing Single Page Layout
                                                Contd…

  style – specifies the “style” of header/footer to display for
   this JSP
  navbar – specifies the navigation bar to use for this JSP
  locbar – specifies type of location bar to use




NCSI
                Re-indexing DSpace
• Where to edit ????
  [dspace] /bin/ index-all
• How ????
     Logon to the server as Dspace through ssh
     Change directory to [dspace] /bin
     Run the re-indexing script
     i. (Linux / Mac OSX) ./index-all
     ii. (Windows) run from command prompt
          ./dsrun org.dspace.browse.InitializeBrowse
          ./dsrun org.dspace.search.DSIndexer
     Stop and start Tomcat

 NCSI
      Configuring full text indexing

• Where to edit ????
   [dspace]/bin/filter-media
   [dspace]/config/dspace.cfg
• How ????
  alter the search.maxfieldlength field
Note:-The default value is set to the first 10,000 words.
  Setting it to the value -1 making to index for unlimited
  number of words
NCSI
          Altering browse fields

• Where to edit ????
  [dspace]/config/dspace.cfg
• Where to edit ????
 Uncomment the lines which specify metadata fields we
 would like to be browsing in Dspace's “Browse by
 Date”,“Browse Authors”, “Browse Titles” and “Browse
 Subjects” interfaces



NCSI
          Modifying browse layout

 We have the right to choose which metadata fields are
 displayed whenever user browse a list of items through any
 of the DSpace browse interfaces.
• Where to edit ????
  [dspace]/config/dspace.cfg
• How ????
 uncomment the line :
 webui.itemlist.columns = dc.date.issued(date),
 dc.title, dc.contributor.*
NCSI
  Modifying submission input forms

• Where to edit ????
 [dspace]/config/input-forms.xml
• How ????
   To change a submission form for a specific collection,
 add a new <form> element with a new and unique
 collection-related value for the name attribute.
   Create all appropriate <page> elements, numbering them
 sequentially starting from 1 in the number attribute.
 Within them, add individual <field> elements according to
 the template.
NCSI
       Modifying submission input forms
                                            Contd…

<field>
<dc-schema>dc</dc-schema>
<dc-element>identifier</dc-element>
<dc-qualifier>citation</dc-qualifier>
<repeatable>false</repeatable>
<label>Citation</label>
<input-type>onebox</input-type>
<hint>Enter the standard citation.</hint>
<required></required>
<vocabulary></vocabulary>
</field>
NCSI
         Modifying submission input forms
                                                              Contd…
Notes:
•   The <required> element contains the textual hint displayed to the
    submitter about why the field is required. Leave it empty for optional
    fields.
•   The <vocabulary> element is optional.
•   Valid input types (for <input-type>) are:
      “date”
      “name” (two text boxes, labeled last and first name)
      “onebox” (a one-line textbox)
      “twobox” (two textboxes on a single line)
      “dropdown” (for which we must specify a value-pairs-
       name attribute referring to the <value-pairs> list of
       allowed values)
NCSI
    Modifying submission input forms
                                                 Contd…
  “qualdrop_value” (a textbox, which is preceded by a
  “qualifying” dropdown of values. Requires a value-
  pairs-name attribute, similar to “dropdown”.Also
  requires <repeatable> is set to “true”)
   “textarea”
   Setting the <repeatable> element to “true” creates an
   “Add more” button, which allows us to add multiple
   values into that particular field. Examples of this
   include the authors and keywords fields in the
   standard DSpace submission process.


NCSI
           Altering a form value

• Where to edit ????
  [dspace]/config/input-forms.xml
• How ????
    Find <form-value-pairs> element in input-forms.xml.
   Look for the <value-pairs> element for the Dublin
   Core element whose values to alter.
   Add or alter a <pair> element


NCSI
     Altering displayed item metadata
• Where to edit ????
  [dspace]/config/dspace.cfg
  [dspace-source]/config/language-
  packs/Messages.properties
• How ????
 Altering the ordering of Dublin Core elements after
 webui.itemdisplay.default or add new elements.
 Altering the display name of a metadata field, search for
 its Dublin Core keyname in Messages.properties.
   metadata.dc.title.alternative = Title (French)



 NCSI
      Wording of E-mail Messages
•    DSpace send e-mail messages to users,
     Eg:-to inform about a new workflow task, as a subscription e-mail
     alert.
Where to edit ?
     The wording of emails can be changed by editing the relevant file in
     [dspace]/config/emails. Each file is commented. Be careful to keep the
     right number 'placeholders' (e.g.{2}).

    Note: You should replace the contact-information " dspace-
     help@myu.eduThis e-mail address is being protected from spam bots,
     you need JavaScript enabled to view it or call us at xxx-111-xxxx"
     with your own contact details in:
          config/emails/change_password
         config/emails/register

NCSI
              Rebuilding DSpace

• Where ????
  [dspace-source]
   [dspace-source]/build/
   [Tomcat]/webapps/
• Quick Restart
   Stop Tomcat
 1. (Linux / OS X / Solaris) [Tomcat]/bin/shutdown.sh
 2. (Windows) Use Tomcat Service Monitor (in Notification
 Area) to stop Tomcat

NCSI
                     Rebuilding DSpace
     Start Tomcat                                        Contd…
  1. (Linux / OS X / Solaris) [Tomcat]/bin/startup.sh
   2. (Windows) Use Tomcat Service Monitor (in Notification
   Area) to start Tomcat
Quick Build
(Quick build after smaller, usually JSP-based changes)
1. Logon to the server as Dspace through ssh.
2. run ant update
3. run ant build_wars (which just recompiles DSpace code)
4. cp build/*.war [Tomcat]/webapps/
5. Verify whether the changes are reflecting on the DSpace
   System
  NCSI
                    Rebuilding DSpace
                                                     Contd…
• Full Refresh/Rebuild
 1. Logon to the server as Dspace through ssh.
 2. run ant clean
 3. run ant update
 4. Stop Tomcat
  i. (Linux / OS X / Solaris) [Tomcat]/bin/shutdown.sh
  ii. (Windows) Use Tomcat Service Monitor (in Notification Area) to
      stop Tomcat
 5.   cp build/*.war [Tomcat]/webapps/

NCSI
                Rebuilding DSpace
                                                  Contd…
6. Completely remove any dspace or dspace-oai
 directories created in [Tomcat]/webapps
7. Start Tomcat
  1. (Linux / OS X / Solaris) [Tomcat]/bin/startup.sh
  2. (Windows) Use Tomcat Service Monitor (in Notification Area) to
     start Tomcat
8. Verify whether the changes are reflecting on the
   DSpace System



NCSI
       Thanking You


NCSI

				
DOCUMENT INFO
Shared By:
Categories:
Tags:
Stats:
views:4
posted:2/14/2012
language:
pages:31