Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Created new classes for the landing pages

  • Loading branch information...
commit 704184850243a55c067b86876ebac6f3d1ebf65b 1 parent 486f8a2
@cgueret authored
View
17 server/IDSWrapper/src/uk/ac/ids/Main.java
@@ -12,8 +12,10 @@
import uk.ac.ids.data.Constants;
import uk.ac.ids.data.Mappings;
import uk.ac.ids.data.Namespaces;
+import uk.ac.ids.resources.ClassResource;
import uk.ac.ids.resources.ConfigResource;
import uk.ac.ids.resources.GenericResource;
+import uk.ac.ids.resources.HomePageResource;
import uk.ac.ids.resources.VocabularyResource;
import freemarker.template.Configuration;
@@ -43,14 +45,14 @@
*/
@Override
public Restlet createInboundRoot() {
- // Initialize Freemarker's configuration
+ // Initialise Freemarker's configuration
configuration = new Configuration();
configuration.setTemplateLoader(new ContextTemplateLoader(getContext(), Constants.TEMPLATES_DIR));
- // Initialize the mappings
+ // Initialise the mappings
mappings = new Mappings(getContext(), Constants.MAPPINGS_DIR);
- // Initialize the namespaces
+ // Initialise the namespaces
namespaces = new Namespaces();
// Create the router
@@ -59,6 +61,15 @@ public Restlet createInboundRoot() {
// Handler for requests to generic resources
router.attach("/{DB}/resource/{TYPE}/{ID}", GenericResource.class);
+ // Handler for the home page of a data set
+ router.attach("/{DB}/resource/{TYPE}", ClassResource.class);
+
+ // Handler for requests to vocabulary terms
+ router.attach("/{DB}/term/{TERM}", VocabularyResource.class);
+
+ // Handler for the home page of a data set
+ router.attach("/{DB}", HomePageResource.class);
+
// Handler for requests to vocabulary resources
router.attach("/vocabulary", VocabularyResource.class);
View
14 server/IDSWrapper/src/uk/ac/ids/resources/ClassResource.java
@@ -0,0 +1,14 @@
+/**
+ *
+ */
+package uk.ac.ids.resources;
+
+import org.restlet.resource.ServerResource;
+
+/**
+ * @author Christophe Guéret <christophe.gueret@gmail.com>
+ *
+ */
+public class ClassResource extends ServerResource {
+
+}
View
14 server/IDSWrapper/src/uk/ac/ids/resources/HomePageResource.java
@@ -0,0 +1,14 @@
+/**
+ *
+ */
+package uk.ac.ids.resources;
+
+import org.restlet.resource.ServerResource;
+
+/**
+ * @author Christophe Guéret <christophe.gueret@gmail.com>
+ *
+ */
+public class HomePageResource extends ServerResource {
+
+}
Please sign in to comment.
Something went wrong with that request. Please try again.