wiki:InstallationInstructions

Version 20 (modified by anonymous, 18 years ago) (diff)

--

Short installation overview

Check out the rdfhomepage package:

cd ~homer/public_html/whereever/
svn co https://rdfhomepage.opendfki.de/repos/rdfhomepage/trunk/rdfhomepage

The rdfhomepage package also contains a directory myrdfhomepage providing you with some initial files you can use to view, edit, and replace. Copy or move the contents (not the folder!) of the myrdfhomepage/ directory to your public html space.

Before you start something else, you should call install.sh if you are installing rdfhomepage on a UNIX machine.

Then, you should edit the files (especially config.php and homepage.rdf), and then test and play around a bit.

Well, and you MUST have several RDF files for rdfhomepage to work:

  • a FOAF file specifying yourself and your "friends" and colleagues
  • a bibtex files, that is, the text version PLUS the RDF version(!) of your publications
  • an organizational model, that is, your organizational properties and relations (your projects, department(s), roles...)

FOAF / RDF

First of all: You MUST have a FOAF file for rdfhomepage to work!
But: Care has to be taken when creating a FOAF file.

There are a lot of tools out there for creation and management of your foaf file, however, (nearly) all of them produce a more or less crappy/ugly/bad/impractical RDF file. I am sorry, but I must advise to use a text editor for that concern. If you adapt the foaf RDFS to contain the right domain and range constraints, then Protege may also be useful, but a text editor together with disciplined(!) indentation is the best, fastest and easiest way.
The easiest way to come up with a good foaf file is to copy mine: http://www.dfki.uni-kl.de/~schwarz/foaf.xml open it in some text editor and edit everything ;)

For all RDF files to be used in rdfhomepage you have to follow the following rules (btw, you should follow these rules for all software using RDF). This holds especially for your FOAF file:

  • Resources to be referenced from outside the RDF file need a URI => Your foaf:Person needs a URI.
  • Blank/anonymous nodes can't be referenced from outside the RDF file. => Your foaf:Person needs a URI, no blank/anonymous node! So: don't use nodeID="...", but use rdf:about="...".
  • Some (most!) RDF parsers do not like relative URIs (or NodeIDs). => It is generally better to use ABSOLUTE URIs. So: don't use rdf:about="#me" in your foaf file, better use something like rdf:about="http://www.dfki.uni-kl.de/~schwarz/foaf.xml#me".
  • Generally, every thing described in an RDF file, that could be relevant and/or referenced outside the RDF file, should have an absolute URI. However, the foaf:Persons I link with foaf:knows do not have a URI, because so many people out there do not have a URI for their foaf:Person.

If you have a FOAF file and a foaf description of your foaf:Person, then the URI of that foaf:Person has to be set in your config.php:

// The location of your FOAF file on the web (This is also the data source)
$MY_FOAF_FILE_URL = "http://www.dfki.uni-kl.de/~schwarz/foaf.xml";

// Your URI in your FOAF file - Look this one up!
$MY_FOAF_URI = "http://www.dfki.uni-kl.de/~schwarz/foaf.xml#me";

BIBTEX

We used bibtex2rdf from L3S (Hannover) to convert a text bibtex file to some RDF representation. Unfortunately the bibtex2rdf tool is NOT (YET?) open-source, and therefore the jar-file is not includes in the rdfhomepage package. But if you install rdfhomepage and drop me (Sven) an email, and you will get the jar-file.

Using the bibtex2jar tool, you can call the following to create/update your bibtex RDF file:

set BIBFILE=ss.bib
set URI=http://www.dfki.uni-kl.de/~schwarz/rdf/ss_bib.rdf#
set OUT=bib_ss.rdf
java -jar bibtex2rdf.jar -baseuri %URI% %BIBFILE% %OUT%

At the END of the bibtex-file there is a rdf:Seq like this

  <rdf:Seq rdf:about="http://www.dfki.uni-kl.de/~schwarz/rdf/ss_bib.rdf#referenceList">
    <rdf:li rdf:resource="http://www.dfki.uni-kl.de/~schwarz/rdf/ss_bib.rdf#Schwarz05"/>
    <rdf:li rdf:resource="http://www.dfki.uni-kl.de/~schwarz/rdf/ss_bib.rdf#Schwarz06"/>
    <rdf:li rdf:resource="http://www.dfki.uni-kl.de/~schwarz/rdf/ss_bib.rdf#GrimnesSchwarzSauermann06"/>
    . . .
  </rdf:Seq>

Take the URI of that rdf:Seq (here this is http://www.dfki.uni-kl.de/~schwarz/rdf/ss_bib.rdf#referenceList ) and paste that URI in your config.php:

// The name (not path) of your bibtex.rdf
define("BIBTEX_FILE_NAME", "bib_ss.rdf");

// The URL of your BibTeX file. (real BibTeX format, not RDF!)
$MY_BIB_TEX_URL = "http://www.dfki.uni-kl.de/~schwarz/ss.bib";

// The URI of a sequence of all the articles in your bibtex file
$MY_BIB_TEX_SEQ_URI = "http://www.dfki.uni-kl.de/~schwarz/rdf/ss_bib.rdf#referenceList";

OrgRep

The OrgRep models our/your organizational structure, that is, your organizational properties and relations, your projects, project leaders, department, research groups, etc. Especially the relations between people and projects will be used for rdfhomepage. You may have a look at our OrgRep -> see {rdfhomepage/vocabulary/OrgRepDFKI.* -> best viewed with Protege, http://protege.stanford.edu/

There is also a better, nearly-empty Protege-Projekt + RDF + RDFS, which you could use to model your own organizational structure(s): {rdfhomepage/vocabulary/OrgRep.*
I advise you take the following steps:

  1. Open OrgRep.pprj with Protege
  2. Save it again (File/Save as), maybe use other filenames like OrgRepACME.* - the important thing here is: choose an OTHER default namespace -> last edit field in the "Save as" dialog (initially, the value will be http://rdfhomepage.opendfki.de/please_choose_another_namespace#).
  3. Open it again (with Protege) and add your people, projects, etc. therein.
  4. There are some inverse properties, which may need manual care, e.g. between org:Project <--> org:Person

I would suggest better URIs than the automatically generated ones by Protege, but as Protege does not provide a GUI component to edit the URI (or does it?), you would have to edit/replace the URIs later using a text editor or shell command or whatever.

Anyway, you've got to look up the URI of your org:Person and enter that in the config.php:

// Your URI in the OrgRep ontology
// If in doubt, look it up in the OrgRep RDF File or ask somebody!
$MY_ORGREP_URI = "http://km.dfki.de/model/org#OrganisationalModel_00077";

homepage.rdf

This RDF contains your personal, *homepage relevant*(!) information, that is, your Curriculum Vita, your personal interpretation of your job in your projects, etc.

The most important thing is - again - that your hp:Homepage resource has got a URI. We use the URL of the homepage without the trailing slash as the URI, but that is not obligatory, you can choose whatever URI you like as long as it is unique and differs from the other URIs you use!

Copy the URI of your hp:Homepage resource to the config.php file:

// The URI of the RDF node anchoring the homepage data
// as it can be found in the rdfhomepage.rdf file.
// You may commit to the default URI scheme, which is like
//     http://www.dfki.uni-kl.de/~schwarz    <-- note: no trailing slash!!!
// or change this value
$MY_HOMEPAGE_URI= "http://www.dfki.uni-kl.de/~schwarz";

Another important thing in the homepage.rdf is the information about the name that is used in your bibtex. Unfortunately this information should be better stored in config.php, but it is in homepage.rdf for several reasons... ;)

    <hp:bibtexName>Sven Schwarz</hp:bibtexName>

Edit this to match the name (or abbreviation!) you use IN YOUR BIBTEX FILE. Currently, you have to decide on exactly ONE version! So: do not mix full names with abbreviations in your bibtex file!

short bio (homepage.rdf)

There could be a chunk containing short information about yourself:

    <hp:shortBio>
    <![CDATA[
        <p align="justify">
            My name is Bob. I am a researcher aiming at...
        </p>
        <p align="justify">
            I like tennis and swimming...
        </p>
    ]]>
    </hp:shortBio>

projects (homepage.rdf)

Most probably, there will be one or more chunks about projects you work for:

    <hp:inProject>
        <hp:Project rdf:about="http://orgrep_namespace#OrgRep_0815">
            <hp:htmlText>
            <![CDATA[
                <p align="justify">
                    This is one of two projects I work for.<br/>
                    I took talk hours about this project...
                </p>
            ]]>
            </hp:htmlText>
            <hp:next rdf:resource="http://orgrep_namespace#OrgRep_0816"/>
        </hp:Project>
    </hp:inProject>

    <hp:inProject>
        <hp:Project rdf:about="http://orgrep_namespace#OrgRep_0816">
            <hp:htmlText>
            <![CDATA[
                <p align="justify">
                    And this is the second of the two projects I work for.
                </p>
            ]]>
            </hp:htmlText>
            <!-- no next project -->
        </hp:Project>
    </hp:inProject>

We see several things here:

  1. homepage.rdf contains your PERSONAL INTERPRETATION of the project. In contrast, the orgrep contains a SHARED description.
  2. The projects's URIs should be exactly the same as in the orgrep file.
  3. The project descriptions in homepage.rdf are ordered and chained like a linked list using a property hp:next. This list has to be normal, one-dimensional list, i.e.:
    • there should be exactly one first project (no project is pointing at the first one with hp:next)
    • there should be exactly one last project (this project has no hp:next project)
    • every project inbetween (project 2 to project n-1) has exactly one hp:next project

interests (homepage.rdf)

There can be one or more chunks about your (research) interest. As "interests" are quite manifold, each interest belongs to (exactly!) one "section". I personally distinguish between "research contributions" and "research applications" (however, you do not have to do so as well):

    <hp:hasInterest>
        <hp:Interest rdf:about="http://some_namespace#MayorResearch"
             rdfs:label="Mayor Research Questions">
            <hp:section>
                <hp:Section rdf:about="http://some_namespace#MyContribution"
                     hp:htmlText="My Contribution to Research"/>
            </hp:section>
            <hp:htmlText>
            <![CDATA[
                <p align="justify">
                    My mayor research questions:
                    <ul>
                      <li><b>research in ABC</b>: ABC is my personal dream... </li>
                      <li><b>DEF for GHI</b>: In the next 2 months, ... </li>
                    </ul>
                </p>
            ]]>
            </hp:htmlText>
            <hp:next rdf:resource="http://some_namespace#MinorResearch"/>
        </hp:Interest>
    </hp:hasInterest>
    <hp:hasInterest>
        <hp:Interest rdf:about="http://some_namespace#MinorResearch"
             rdfs:label="Minor Research Questions">
            <hp:section rdf:resource="http://some_namespace#MyContribution"/>   <!-- same section!!! -->
            <hp:htmlText>
            <![CDATA[
                <p align="justify">
                    I'm also interested in
                    <ol>
                      <li>JKL, and</li>
                      <li>MNO</li>
                    </ol>
                </p>
            ]]>
            </hp:htmlText>
            <hp:next rdf:resource="http://some_namespace#ResearchApplication1"/>
        </hp:Interest>
    </hp:hasInterest>
    
    <hp:hasInterest>
        <hp:Interest rdf:about="http://some_namespace#ResearchApplication1"
             rdfs:label="Research Application (1)">
            <hp:section>
                <hp:Section rdf:about="http://some_namespace#ResearchApplication"
                     hp:htmlText="Research I Apply"/>
            </hp:section>
            <hp:htmlText>
            <![CDATA[
                <p align="justify">
                    I'm heavily allying and relying of the following research areas:
                    <ul>
                      <li><b>XXX</b>: nobody can't without... </li>
                      <li><b>XYY</b>: also very important, because... </li>
                      <li><b>XYZ</b>: very interesting, but not yet really applicable... </li>
                    </ul>
                </p>
            ]]>
            </hp:htmlText>
            <!-- no hp:next -->
        </hp:Interest>
    </hp:hasInterest>

We see several things here:

  1. Like the projects, also the interests are linked/chained using the hp:next property with the same chaining constraints.
  2. As already said, each interest MUST be assigned to exactly(!) one section. The section could be created in one interest chunk once and referenced in other interest chunks - see example RDF snippet above.

nice URLs via htaccess

This paragraph is about having "nice" URLs, i.e., we want to allow the following TWO possible versions to access rdfhomepage pages:

old version: http://www.dfki.uni-kl.de/~schwarz/index.php?page=projects
new version: http://www.dfki.uni-kl.de/~schwarz/projects

For this to work, you first have to copy or rename the htaccess to .htaccess in your myrdfhomepage directory (i.e., the directory where your config.php, homepage.rdf, etc. is in).

Then for each page you have in rdfhomepage, you have to

  1. Edit the .htaccess file and add one mappings there. For each index.php?page=xxx, you will have an entry in .htaccess for xxx. Example for pages "projects" and "interests":
    <Files projects>
    ForceType application/x-httpd-php
    </Files>
    <Files interests>
    ForceType application/x-httpd-php
    </Files>
    
  2. Create a symbolic link to index.php with the name of the page. Following the example with the "projects" page, you have to execute (unix/linux)
    ln -s index.php projects
    ln -s index.php interests
    

own CSS (style sheet)

You can customize the look and feel of your rdfhomepage as you like. There are at least three possibilities for your look and feel:

  1. You can just take the predefined look and feel that comes with rdfhomepage. For this, there is actually nothing to do.
  2. You can have your own style sheet and use the predefined rdfhomepage style sheet and override some of the styles. This would be done by creating a file homepage.css in your myrdfhomepage directory (the directory where your config.php resides). In that CSS file you would include the homepage.css of the rdfhomepage package. Example:
    @import url("rdfhomepage/homepage.css");
    
    a {
        background:red;
    }
    
  3. You can, of course have you very own style sheet without depending on predefined styles. This would be done by creating a file homepage.css in your myrdfhomepage directory. In that CSS file you will have to specify the style for every class (div) generated by the rdfhomepage scripts. However, this alternative is in no way better than the 2nd alternative...
    [TODO: We shall provide a documentation about the used classes.]

The style sheet of rdfhomepage is divided into three style sheets.
homepage.css includes color_and_font.css and template.css.

  • template.css defines the layout for the multi-column layout.
  • color_and_font.css defines the colors and fonts to be used.
  • homepage.css defines ordering and spacing of the <div>s.

If you just like to override the coloring or some fonts, then you could create an own homepage.css in your myrdfhomepage directory containing

@import url("rdfhomepage/homepage.css");
@import url("color_and_font.css");         // <--- private color_and_font.css

a {
    background:red;
}

Then you can also create an own color_and_font.css in that directory containing

@import url("rdfhomepage/color_and_font.css");

a.menuItem:hover {
    font-weight:bold;
    background: red;
    text-decoration: none;
}

You see, that both CSS files include and override the predefined style sheet that comes with rdfhomepage.

Note, that for the examples above it is assumed, that the rdfhomepage package can be found directly inside your myrdfhomepage directory. If you put the rdfhomepage package to let's say /home/share/rdfhomepage to share the rdfhomepage core, then the import statements have to be modified in the code above, i.e., changed to
@import url("/home/share/rdfhomepage/homepage.css");
@import url("/home/share/rdfhomepage/color_and_font.css");