Difference between revisions of "EPrints 3 Organisation Hierarchy"

From EPrints Documentation
Jump to: navigation, search
(Modifying the subjects file)
Line 41: Line 41:
 
== Modifying the subjects file ==
 
== Modifying the subjects file ==
  
The simplest way to add your organisational structure is to modify the existing 'place-holder'.
+
The simplest way to add your organisational structure is to replace the existing 'place-holder'.
  
 
Open the subjects file:
 
Open the subjects file:

Revision as of 20:34, 22 March 2007

EPrints 3 is supplied with a 'place-holder' organisation hierarchy which should be modified to represent your organisation.

The Subjects File

An organisation hierarchy is stored in the same file as the subject tree. In fact, any number of hierarchies or trees can be stored in this file.

/opt/eprints3/archives/archive_id/cfg/subjects

The Subjects File explained

Imagine your organisation looks like this:

  • Acme Research Corporation
    • Rocket Group
      • Solid Fuel Rockets Department
      • Liquid Fuel Rockets Department
    • Spring Group
      • Large Spring Department
      • Huge Spring Department

You need to create a machine-readable representation of this.

Each hierarchy starts with a root:

acme_division:Acme Research Corporation:ROOT:0

This tells EPrints that the top (or root) of the hierarchy (or tree) has a system name of acme_division, a human readable name of "Acme Research Corporation", is the root, and is not selectable.

Now we can add the groups:

rockets:Rocket Group:acme_division:0
springs:Spring Group:acme_division:0

This defines our two groups, and also defines the parent of them. We've also chosen not to make these selectable, but you could if you wanted to.

Finally, we add the departments

solid_fuel_rockets:Solid Fuel Rockets Department:rockets:1
liquid_fuel_rockets:Liquid Fuel Rockets Department:rockets:1
large_springs:Large Spring Department:springs:1
huge_springs:Huge Sprint Department:springs:1

Generically, each line in the file is defined like this:

<system name>:<human readable name>:<parent's system name>:<selectable (0 or 1)>

Important: it's essential that every system name in the subjects file is unique across the whole file, otherwise nodes will appear in the wrong trees.

Modifying the subjects file

The simplest way to add your organisational structure is to replace the existing 'place-holder'.

Open the subjects file:

pico /opt/eprints3/<archive id>/cfg/subjects

Find the line:

divisions:University Structure:ROOT:0

This is the root of the current hierarchy. Remove the whole tree by removing from the above line to the last line in the tree:

sch_med:School of Medicine:fac_med:1

Insert your own hierarchy as described above, but be sure that the ROOT element has the system name divisions.

Importing the New Hierarchy

Run the import_subjects script:

/opt/eprints3/bin/import_subjects <archive id>

You should now see your own hierarchy in the 'Divisions' box when submitting an eprint.