Last change
on this file since 322 was
322,
checked in by hendrikvanantwerpen, 13 years ago
|
Added Play! framework and application with Jena dependency. Working on
the basic things now (login/register), after that start implementing
our data model.
|
File size:
770 bytes
|
Line | |
---|
1 | package database; |
---|
2 | |
---|
3 | import jena; |
---|
4 | |
---|
5 | class DB { |
---|
6 | |
---|
7 | public static final String NS = "http://tbm.tudelft.nl/researchtool/"; |
---|
8 | public static final String RESOURCES_NS = "http://tbm.tudelft.nl/researchtool/resources/"; |
---|
9 | public static final String PREDICATES_NS = "http://tbm.tudelft.nl/researchtool/predicates/"; |
---|
10 | |
---|
11 | public static final String PREFIX = "PREFIX rtr:"+RESOURCES_NS+"\nPREFIX rtp:"+PREDICATES_NS+"\n"; |
---|
12 | |
---|
13 | Model model; |
---|
14 | |
---|
15 | private DB() { |
---|
16 | String directory = "data" ; |
---|
17 | model = TDBFactory.createModel(directory) ; |
---|
18 | } |
---|
19 | |
---|
20 | public Model getModel() { |
---|
21 | return model; |
---|
22 | } |
---|
23 | |
---|
24 | private static DB db = null; |
---|
25 | public static DB getDefault() { |
---|
26 | if ( db == null ) { |
---|
27 | db = new DB(); |
---|
28 | } |
---|
29 | return db; |
---|
30 | } |
---|
31 | |
---|
32 | } |
---|
Note: See
TracBrowser
for help on using the repository browser.