From 9ad37c250e0e607960ee3068465976752992f7b9 Mon Sep 17 00:00:00 2001 From: Christopher Baines Date: Fri, 11 Apr 2014 12:21:30 +0100 Subject: Some more ref validation --- create-data.js | 10 ++++++++++ 1 file changed, 10 insertions(+) (limited to 'create-data.js') diff --git a/create-data.js b/create-data.js index 149a5b4..001c0ae 100755 --- a/create-data.js +++ b/create-data.js @@ -281,6 +281,16 @@ function createRooms(buildings, workstations, callback) { if ("uri" in part.properties) { buildingPartsByURI[part.properties.uri] = part; + + var expectedRef = part.properties.uri.split("/").slice(-1)[0].split("-")[1]; + + if ("ref" in part.properties) { + if (part.properties.ref !== expectedRef) { + console.warn("Unexpected ref \"" + part.properties.ref + "\" for room " + part.properties.uri); + } + } else { + console.warn("Missing ref \"" + expectedRef + "\" for room " + part.properties.uri); + } } async.parallel([ -- cgit v1.2.3