Permalink
Browse files

Initial commit

  • Loading branch information...
robstewart57 committed Jun 15, 2012
1 parent e7a65fe commit f2c1639a354236c9e9b84b9aba31055d62c0abe4
View
@@ -1,4 +1,43 @@
-discover-me-semantically
-========================
+# Introduction
-A web tool enabling authorship and download of RDF, and RDF visualization in Linked Open Data
+Discover·me·Semantically is an online web tool enabling authorship and download of RDF, and RDF visualization in Linked Open Data.
+
+Discover·me·Semantically eases the pain of:
+- Downloading personalized RDF files
+- Visualizing the embedded RDF content in Linked Open Data (with [LodLive](http://en.lodlive.it/))
+
+This work has been carried out in the [SerenA](http://www.serena.ac.uk) project, as part of a larger investigation on the potential of serendipitous discovery with linked open data.
+
+# Installation
+
+- PHP rdf libraries
+
+Due to the large file size, I have omitted the php libraries from this repository.
+
+To add it, [download it](http://sourceforge.net/projects/rdfapi-php/files/latest/download)
+
+```
+unzip rap-v096.zip
+mv rdfapi-php/ /location/to/discover-me-semantically/include/
+```
+
+- Apache write permissions
+
+Apache needs to write RDF files to the rdf/ directory when a user wishes to visualize their RDF with LodLive. To allow Apache to do this:
+
+```
+chmod 777 rdf/
+```
+
+# TODO
+
+- Achieve triple-A [compliance](http://jigsaw.w3.org/css-validator/) for CSS code
+- Enable the feature to publish RDF to [Sindice](http://sindice.com/) using their ping service (currently disabled)
+- Add a URI description mechanism, allowing users to confidently select the most appropriate URIs
+- Add more searching backends. Currently the DBpedia lookup and Sindice search services are used. Ideas... FactForge, British Library. What else?
+- More input fields. What other properties might users want to declare? The current form is a fairly minimal list
+- Formalize the goal ontology. The current select box presents four types of goals. What other goals might people have, and what should the vocabulary look like. It is also desirable to be able to resolve the namespace for the SerenA vocabulary.
+
+## Collaboration
+
+We're **very** open to pull requests! If you'd like to collaborate, offer feedback, or best of all - better code, feel free to do so. Please use the issues section on this github repository.
View

Large diffs are not rendered by default.

Oops, something went wrong.
View

Some generated files are not rendered by default. Learn more.

Oops, something went wrong.
View
@@ -0,0 +1,218 @@
+.ui-autocomplete {
+ height: 150px;
+ overflow-y: scroll;
+ overflow-x: hidden;
+}
+
+a {
+ font-size: 10px;
+}
+
+button {
+ -webkit-box-shadow: rgba(0, 0, 0, 0.0976562) 0px 1px 0px 0px;
+ background-color: #EEE;
+ border: 1px solid #999;
+ color: #666;
+ font-family: 'Lucida Grande', Tahoma, Verdana, Arial, Sans-serif;
+ font-size: 9px;
+ font-weight: bold;
+ padding: 2px 6px;
+ height: 18px;
+}
+
+input {
+ -webkit-box-shadow: rgba(0, 0, 0, 0.0976562) 0px 1px 0px 0px;
+ background-color: #EEE;
+ border: 1px dotted #999;
+ color: #666;
+ font-family: 'Lucida Grande', Tahoma, Verdana, Arial, Sans-serif;
+ font-size: 12px;
+ font-weight: bold;
+ padding: 2px 6px;
+}
+
+
+.inputProcess {
+ display: inline-block;
+ outline: none;
+ cursor: pointer;
+ text-align: center;
+ text-decoration: none;
+ font: 14px/100% Arial, Helvetica, sans-serif;
+ padding: .5em 2em .55em;
+ text-shadow: 0 1px 1px rgba(0,0,0,.3);
+ -webkit-border-radius: .5em;
+ -moz-border-radius: .5em;
+ border-radius: .5em;
+ -webkit-box-shadow: 0 1px 2px rgba(0,0,0,.2);
+ -moz-box-shadow: 0 1px 2px rgba(0,0,0,.2);
+ box-shadow: 0 1px 2px rgba(0,0,0,.2);
+ border: 1px solid #999;
+}
+.inputProcess:hover {
+ text-decoration: none;
+ color: black;
+}
+.inputProcess:active {
+ position: relative;
+ top: 1px;
+}
+
+body{
+ position:relative;
+ margin-left:auto;
+ margin-right:auto;
+ /* top:5px; */
+ width:1200px;
+ border:0px solid black;
+ font-size: small;
+}
+
+
+
+h2 {
+ display: block;
+ margin-top: 0.5em;
+ font-family: Verdana;
+ font-size: 1.5em;
+ font-weight: normal;
+ letter-spacing: 0em;
+ text-shadow: none;
+ color: rgb(142,11,0);
+}
+
+h3 {
+ display: block;
+ margin-top: 0.5em;
+ font-family: Verdana;
+ font-size: 1em;
+ font-weight: normal;
+ letter-spacing: 0em;
+ text-shadow: none;
+ color: rgb(142,11,0);
+}
+
+h4 {
+ display: block;
+ margin-top: 0.5em;
+ margin-left: 1em;
+ font-family: Verdana;
+ font-size: 1em;
+ font-weight: normal;
+ letter-spacing: 0em;
+ text-shadow: none;
+ color: rgb(142,11,0);
+ font-style:italic;
+}
+
+input:focus
+{
+ background-color: rgb(255,252,170);
+}
+
+textarea:focus
+{
+ background-color: rgb(255,252,170);
+}
+
+
+.centerAll
+{
+ text-align:center;
+}
+
+pre {
+ font-family: "courier new", courier, monospace;
+ font-size: 11px;
+}
+
+.tinyFont {
+ font-size:x-small
+}
+
+.ui-autocomplete-loading {
+ background:url('../img/loading.gif')
+ no-repeat right;
+}
+
+
+
+#footer {
+ height: 90px;
+ padding-top:10px;
+ position:fixed;
+ bottom:0px;
+ width:100%;
+}
+
+
+
+td.footerTableCell {
+ padding-right: 40px;
+ padding-left: 40px;
+ text-align: center;
+}
+
+td.mainTableCell {
+ min-width: 400px;
+ padding-right: 20px;
+ padding-left: 20px;
+ vertical-align: top;
+}
+
+td.rdfOutputCell {
+ vertical-align: top;
+}
+
+
+a.footerLink {
+ font-size: 12px;
+}
+
+
+#rdfPrettyPrint {
+ width: 700px;
+ overflow-x: hidden;
+ font-size: 10px;
+ text-align: left;
+}
+
+img.topLogo {
+ display: block;
+ margin-left: auto;
+ margin-right: auto;
+}
+
+table.inputTable {
+ margin: auto;
+}
+
+tr.whatNextRow {
+ height: 120px;
+ text-align: center;
+}
+
+
+div.footerWrapper {
+ position: absolute;
+ bottom: 0px;
+ width: 100%
+}
+
+div.footerTDiv {
+ margin: 0 auto;
+ width: 60%;
+}
+
+div.centerButton {
+ display: block;
+ margin-left: auto;
+ margin-right: auto;
+ width: 100px;
+ text-align: center;
+}
+
+div.centerDiv {
+ margin: auto;
+ width: 800px;
+}
View
@@ -0,0 +1,81 @@
+<!DOCTYPE html>
+<!--
+Copyright (C) 2012 Rob Stewart <robstewart57@gmail.com>, SerenA <http://www.serena.ac.uk>
+
+This file is part of Discover-me-Semantically.
+
+Discover-me-Semantically is free software: you can redistribute it and/or modify
+it under the terms of the GNU General Public License as published by
+the Free Software Foundation, either version 3 of the License, or
+(at your option) any later version.
+
+This program is distributed in the hope that it will be useful,
+but WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+GNU General Public License for more details.
+
+You should have received a copy of the GNU General Public License
+along with this program. If not, see <http://www.gnu.org/licenses/>
+-->
+
+<html>
+
+ <head>
+ <title>Discover Me Semantically</title>
+ <link rel="stylesheet" href="css/style.css" type="text/css">
+
+ <link href="css/jquery-ui.css" rel="stylesheet" type="text/css"/>
+ <script src="js/jquery.min.js"></script>
+ <script src="js/jquery-ui.min.js"></script>
+ <script src="js/jquery.ez-pinned-footer.js"></script>
+
+ <link href='css/prettify.css' type='text/css' rel='stylesheet' />
+ <script type="text/javascript" src="js/prettify.js"></script>
+
+ <script>
+ $(window).resize(function() {
+ $("#footer").pinFooter("relative");
+ });
+
+ $(document).ready(function() {
+ $("#footer").pinFooter();
+ });
+
+ </script>
+
+ </head>
+
+
+ <body >
+
+ <img class="topLogo" src="img/logo.png"/>
+
+ <div class="centerDiv">
+ <h3>Step 1 - Download the RDF file</h3>
+
+ <div class="centerButton">
+ <form name="input" target="_blank" action="downloadRDF.php" method="post" >
+
+ <input type="hidden" name="fileName" id="fileName" value="<?php echo $_POST['fileName']; ?>">
+ <input type="hidden" name="fileLoc" id="fileLoc" value="<?php echo $_POST['fileLoc']; ?>">
+ <input type="hidden" name="rawRDF" id="rawRDF" value="<?php echo $_POST['rawRDF']; ?>">
+
+ <button type="submit" id="btnDownload">Download RDF</button>
+
+ </form>
+ </div>
+
+ <h3>Step 2 - Edit the document URI</h3>
+
+ ... to where ever you save your RDF file to e.g. <code>http://www.mydomain.com/joe-bloggs.rdf</code>
+ <br><br>
+ <img class="something" src="img/rdf_output.png" />
+ </div>
+
+
+<?php
+ include("footer.php");
+?>
+
+ </body>
+</html>
View
@@ -0,0 +1,30 @@
+<?php
+
+error_reporting(E_ALL);
+ini_set('display_errors', '1');
+
+include("include/Serializer.php");
+define("RDFAPI_INCLUDE_DIR", "include/rdfapi-php/api/");
+include(RDFAPI_INCLUDE_DIR . "RdfAPI.php");
+include(RDFAPI_INCLUDE_DIR . "syntax/RdfSerializer.php");
+include( RDFAPI_INCLUDE_DIR . 'vocabulary/RDFS_C.php');
+include( RDFAPI_INCLUDE_DIR . 'vocabulary/DC_C.php');
+include( RDFAPI_INCLUDE_DIR . 'vocabulary/FOAF_C.php');
+
+header("Content-Type: application/rdf+xml");
+header("Content-Disposition: attachment; filename=" . $_POST['fileName']);
+
+function saveToFile($rawRDF, $fileName) {
+
+ $myFile = "rdf/" . $fileName;
+ $fh = fopen($myFile, 'w') or die("can't open file");
+ fwrite($fh, urldecode($rawRDF));
+ fclose($fh);
+}
+
+saveToFile($_POST['rawRDF'], $_POST['fileName']);
+
+readfile($_POST['fileLoc']);
+
+unlink("rdf/" . $_POST['fileName']);
+?>
Oops, something went wrong.

0 comments on commit f2c1639

Please sign in to comment.