Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
M
marcus-lodspeakr
Manage
Activity
Members
Labels
Plan
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Deploy
Releases
Container Registry
Model registry
Analyze
Value stream analytics
Contributor analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
uib-ub
Spesialsamlingene
marcus-lodspeakr
Commits
4fbaab84
Commit
4fbaab84
authored
13 years ago
by
Alvaro Graves
Browse files
Options
Downloads
Patches
Plain Diff
Added configuration script
parent
4e65667d
No related branches found
No related tags found
No related merge requests found
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
common.inc.php
+44
-0
44 additions, 0 deletions
common.inc.php
endpoint.php
+8
-6
8 additions, 6 deletions
endpoint.php
example.ttl
+0
-0
0 additions, 0 deletions
example.ttl
install.sh
+91
-0
91 additions, 0 deletions
install.sh
with
143 additions
and
6 deletions
common.inc.php
0 → 100644
+
44
−
0
View file @
4fbaab84
<?
include_once
(
'settings.inc.php'
);
$conf
[
'endpoint'
][
'config'
][
'output'
]
=
'json'
;
$conf
[
'endpoint'
][
'config'
][
'named_graph'
]
=
''
;
$conf
[
'endpoint'
][
'config'
][
'show_inline'
]
=
0
;
$conf
[
'metaendpoint'
][
'config'
][
'output'
]
=
'json'
;
$conf
[
'metaendpoint'
][
'config'
][
'show_inline'
]
=
0
;
$conf
[
'metaendpoint'
][
'config'
][
'named_graph'
]
=
'http://slodps.org/metadata'
;
$conf
[
'ns'
][
'rdf'
]
=
'http://www.w3.org/1999/02/22-rdf-syntax-ns#'
;
$conf
[
'ns'
][
'rdfs'
]
=
'http://www.w3.org/2000/01/rdf-schema#'
;
$conf
[
'ns'
][
'dcterms'
]
=
'http://purl.org/dc/terms/'
;
$conf
[
'ns'
][
'foaf'
]
=
'http://xmlns.com/foaf/0.1/'
;
$conf
[
'ns'
][
'skos'
]
=
'http://www.w3.org/2004/02/skos/core#'
;
$conf
[
'ns'
][
'og'
]
=
'http://opengraphprotocol.org/schema/'
;
$conf
[
'ns'
][
'owl'
]
=
'http://www.w3.org/2002/07/owl#'
;
$conf
[
'ns'
][
'ov'
]
=
'http://open.vocab.org/terms/'
;
$conf
[
'ns'
][
'conv'
]
=
'http://purl.org/twc/vocab/conversion/'
;
$conf
[
'model'
][
'directory'
]
=
'models/'
;
#include trailing slash!
$conf
[
'model'
][
'extension'
]
=
'.model'
;
$conf
[
'model'
][
'default'
]
=
'default'
;
$conf
[
'view'
][
'directory'
]
=
'views/'
;
#include trailing slash!
$conf
[
'view'
][
'extension'
]
=
'.view'
;
$conf
[
'view'
][
'default'
]
=
'default'
;
$conf
[
'view'
][
'standard'
][
'baseUrl'
]
=
$conf
[
'basedir'
];
$conf
[
'resource'
][
'url_delimiter'
]
=
"%u"
;
$conf
[
'http_accept'
][
'text/html'
]
=
'html'
;
$conf
[
'http_accept'
][
'application/rdf+xml'
]
=
'rdf'
;
$conf
[
'http_accept'
][
'text/turtle'
]
=
'ttl'
;
$conf
[
'http_accept'
][
'text/plain'
]
=
'nt'
;
/* TODO: more generalizable formats
'xhtml' => 'application/xhtml+xml',
'xml' => 'application/xml',
'n3' => 'text/n3',
*/
$conf
[
'http_accept'
][
'default'
]
=
'html'
;
?>
This diff is collapsed.
Click to expand it.
endpoint.php
+
8
−
6
View file @
4fbaab84
<?php
<?php
/* ARC2 static class inclusion */
/* ARC2 static class inclusion */
include_once
(
'lib/arc2/ARC2.php'
);
include_once
(
'lib/arc2/ARC2.php'
);
include_once
(
'settings.inc.php'
);
set_time_limit
(
0
);
set_time_limit
(
0
);
/* MySQL and endpoint configuration */
/* MySQL and endpoint configuration */
$config
=
array
(
$config
=
array
(
/* db */
/* db */
'db_host'
=>
'localhost'
,
/* optional, default is local
host
*/
'db_host'
=>
$conf
[
'metaendpoint'
][
'config'
][
'
host
'
],
'db_name'
=>
'slodp'
,
'db_name'
=>
$conf
[
'metaendpoint'
][
'config'
][
'dbname'
]
,
'db_user'
=>
'sl'
,
'db_user'
=>
$conf
[
'metaendpoint'
][
'config'
][
'user'
]
,
'db_pwd'
=>
'l
s'
,
'db_pwd'
=>
$conf
[
'metaendpoint'
][
'config'
][
'pas
s'
]
,
/* store name */
/* store name */
'store_name'
=>
'my_endpoint_store'
,
'store_name'
=>
'my_endpoint_store'
,
...
@@ -20,8 +22,8 @@ $config = array(
...
@@ -20,8 +22,8 @@ $config = array(
'dump'
/* dump is a special command for streaming SPOG export */
'dump'
/* dump is a special command for streaming SPOG export */
),
),
'endpoint_timeout'
=>
60
,
/* not implemented in ARC2 preview */
'endpoint_timeout'
=>
60
,
/* not implemented in ARC2 preview */
'endpoint_read_key'
=>
''
,
/* optional */
'endpoint_read_key'
=>
''
,
'endpoint_write_key'
=>
'5A9av7zuDA3'
,
/* optional */
'endpoint_write_key'
=>
$conf
[
'metaendpoint'
][
'config'
][
'key'
],
'endpoint_max_limit'
=>
0
'endpoint_max_limit'
=>
0
);
);
...
...
This diff is collapsed.
Click to expand it.
example
→
example
.ttl
+
0
−
0
View file @
4fbaab84
File moved
This diff is collapsed.
Click to expand it.
install.sh
0 → 100755
+
91
−
0
View file @
4fbaab84
#!/bin/bash
mysql_port
=
"3360"
mysql_host
=
"localhost"
mysql_user
=
"root"
mysql_pass
=
""
basedir
=
"http://localhost/"
ns
=
$basedir
endpoint
=
"http://localhost/sparql?"
everything_ok
=
"n"
while
[
"
$everything_ok
"
!=
"y"
]
do
echo
"==Basic Information=="
echo
"slodps needs to gather some basic information first to configure the installation properly"
echo
-n
"Type the base url of your site where slodps' index.php will be located (default '
$basedir
'): "
read
aux_basedir
echo
""
if
[
"
$aux_basedir
"
!=
""
]
then
basedir
=
$aux_basedir
fi
echo
-n
"Type the local namespace you will use (default '
$ns
'): "
read
aux_ns
echo
""
if
[
"
$aux_ns
"
!=
""
]
then
ns
=
$aux_ns
fi
echo
-n
"What is the URL of your SPARQL endpoint? (default
$endpoint
): "
read
aux_endpoint
echo
""
if
[
"
$aux_endpoint
"
!=
""
]
then
endpoint
=
$aux_endpoint
fi
echo
"==Internal SPARQL endpoint=="
echo
"slodps reads from your SPARQL endpoint, however it needs to add metadata to its own SPARQL endpoint"
echo
""
echo
"Ok, to create slodps' endpoint I need a MySQL database"
echo
-n
"What is host where the database is located (default
$mysql_host
)? "
echo
""
read
aux_mysql_host
if
[
"
$aux_mysql_host
"
!=
""
]
then
mysql_host
=
$aux_mysql_host
fi
echo
-n
"What is port the database is listening to (default
$mysql_port
)? "
read
aux_mysql_port
echo
""
if
[
"
$aux_mysql_port
"
!=
""
]
then
mysql_port
=
$aux_mysql_port
fi
echo
-n
"What is user for this database (default
$mysql_user
)? "
read
mysql_user
echo
""
if
[
"
$aux_mysql_user
"
!=
""
]
then
mysql_user
=
$aux_mysql_user
fi
echo
-n
"What is password for
$mysql_user
? "
read
mysql_pass
echo
""
if
[
"
$aux_mysql_pass
"
!=
""
]
then
mysql_pass
=
$aux_mysql_pass
fi
echo
"==Configuration=="
echo
"Ok, so I have the following configuration:"
echo
"slodps is installed at
$basedir
"
echo
"The local namespace is
$ns
"
echo
"Your SPARQL endpoint is located at
$endpoint
"
echo
"For slodps internal sparql endpoint the configuration is as follows:"
echo
"Host:
$mysql_host
"
echo
"Port:
$mysql_port
"
echo
"User:
$mysql_user
"
echo
"Pass:
$mysql_pass
"
echo
-n
"Is everything ok (y/n)?"
read
everything_ok
done
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment