@@ -27,7 +27,7 @@ function TimegateController(options) {
27
27
timemap : sortTimemap ( _ . map ( _ . pick ( options . datasources , mementos . versions ) ,
28
28
function ( datasource , key ) {
29
29
return _ . assign ( datasource . memento , {
30
- dataSource : key ,
30
+ datasource : key ,
31
31
interval : ( datasource . memento . interval || [ 0 , 0 ] ) . map ( toDate ) ,
32
32
} ) ;
33
33
} ) )
@@ -52,7 +52,7 @@ TimegateController.prototype._handleRequest = function (request, response, next)
52
52
memento = this . _getClosestMemento ( timemapDetails . timemap , acceptDatetime ) ;
53
53
if ( memento ) {
54
54
// Determine the URL of the memento
55
- var mementoUrl = _ . assign ( request . parsedUrl , { pathname : memento . dataSource } ) ;
55
+ var mementoUrl = _ . assign ( request . parsedUrl , { pathname : memento . datasource } ) ;
56
56
mementoUrl = url . format ( mementoUrl ) ;
57
57
58
58
// Determine the URL of the original resource
@@ -78,17 +78,17 @@ TimegateController.prototype._handleRequest = function (request, response, next)
78
78
} ;
79
79
80
80
/*
81
- * @param timemap: [{"dataSource ": "data source name", "interval": [start, end]}, ...]
81
+ * @param timemap: [{"datasource ": "data source name", "interval": [start, end]}, ...]
82
82
the start, end values can either be Date objects, or ISO 8601 string.
83
83
* @param accept_datetime: the requested datetime value as Date object, or ISO 8601 string.
84
84
* @param sorted: bool. If not sorted, the timemap will be sorted using the start time in the interval.
85
85
86
86
* eg:
87
87
var timemap = [
88
- {"dataSource ": "dbpedia_2012", "interval": ["2011-10-20T12:22:24Z", new Date("2012-10-19T12:22:24Z")]},
89
- {"dataSource ": "dbpedia_2015", "interval": ["2014-10-20T12:22:24Z", ""]},
90
- {"dataSource ": "dbpedia_2013", "interval": [new Date("2012-10-20T12:22:24Z"), new Date("2013-10-19T12:22:24Z")]},
91
- {"dataSource ": "dbpedia_2014", "interval": ["2013-10-20T12:22:24Z", "2014-10-19T12:22:24Z"]}
88
+ {"datasource ": "dbpedia_2012", "interval": ["2011-10-20T12:22:24Z", new Date("2012-10-19T12:22:24Z")]},
89
+ {"datasource ": "dbpedia_2015", "interval": ["2014-10-20T12:22:24Z", ""]},
90
+ {"datasource ": "dbpedia_2013", "interval": [new Date("2012-10-20T12:22:24Z"), new Date("2013-10-19T12:22:24Z")]},
91
+ {"datasource ": "dbpedia_2014", "interval": ["2013-10-20T12:22:24Z", "2014-10-19T12:22:24Z"]}
92
92
];
93
93
get_closest_memento(timemap, "2011-10-20T12:22:24Z", false);
94
94
*/
@@ -127,7 +127,7 @@ TimegateController.prototype._getClosestMemento = function (timemap, acceptDatet
127
127
128
128
// check if the accept datetime falls within any intervals defined in the data sources.
129
129
for ( var i = 0 , memento ; memento = timemap [ i ] ; i ++ ) {
130
- var dataSource = memento . dataSource ,
130
+ var datasource = memento . datasource ,
131
131
startTime = memento . interval [ 0 ] . getTime ( ) ,
132
132
endTime = memento . interval [ 1 ] . getTime ( ) ;
133
133
0 commit comments