diff --git a/java-vtl-ssb-api-connector/src/main/java/no/ssb/vtl/connectors/SsbKlassApiConnector.java b/java-vtl-ssb-api-connector/src/main/java/no/ssb/vtl/connectors/SsbKlassApiConnector.java new file mode 100644 index 00000000..0e3c9c5e --- /dev/null +++ b/java-vtl-ssb-api-connector/src/main/java/no/ssb/vtl/connectors/SsbKlassApiConnector.java @@ -0,0 +1,254 @@ +package no.ssb.vtl.connectors; + +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.core.JsonGenerator; +import com.fasterxml.jackson.core.JsonParseException; +import com.fasterxml.jackson.core.JsonParser; +import com.fasterxml.jackson.databind.DeserializationContext; +import com.fasterxml.jackson.databind.JsonNode; +import com.fasterxml.jackson.databind.ObjectMapper; +import com.fasterxml.jackson.databind.deser.std.StdDeserializer; +import com.fasterxml.jackson.databind.module.SimpleModule; +import com.fasterxml.jackson.datatype.guava.GuavaModule; +import com.fasterxml.jackson.datatype.jdk8.Jdk8Module; +import com.fasterxml.jackson.datatype.jsr310.JavaTimeModule; +import com.google.common.collect.Lists; +import com.google.common.collect.Maps; +import no.ssb.vtl.connector.Connector; +import no.ssb.vtl.connector.ConnectorException; +import no.ssb.vtl.connector.NotFoundException; +import no.ssb.vtl.model.Component; +import no.ssb.vtl.model.DataStructure; +import no.ssb.vtl.model.Dataset; +import org.springframework.http.HttpEntity; +import org.springframework.http.HttpHeaders; +import org.springframework.http.HttpMethod; +import org.springframework.http.MediaType; +import org.springframework.http.ResponseEntity; +import org.springframework.http.converter.json.MappingJackson2HttpMessageConverter; +import org.springframework.web.client.RestClientException; +import org.springframework.web.client.RestTemplate; +import org.springframework.web.util.UriTemplate; + +import java.io.IOException; +import java.lang.String; +import java.text.ParseException; +import java.text.SimpleDateFormat; +import java.time.Instant; +import java.util.Arrays; +import java.util.Date; +import java.util.HashMap; +import java.util.List; +import java.util.Map; +import java.util.Optional; +import java.util.Set; +import java.util.stream.Stream; + +import static com.google.common.base.Preconditions.*; +import static java.lang.String.format; +import static java.util.Arrays.*; + + +/** + * A VTL connector that gets data from KLASS part of api.ssb.no. + */ +public class SsbKlassApiConnector implements Connector { + + private static final String SERVICE_URL = "http://data.ssb.no/api/klass/v1"; + private static final String[] DATA_PATHS = new String[]{ + "/classifications/{classificationId}/codes?from={codesFrom}" + //for example "/classifications/{classificationId}/codes?from={codesFrom}&to={codesTo}" + }; + private static final String KLASS_DATE_PATTERN = "yyyy-MM-dd"; + private static final String FIELD_CODE = "code"; + private static final String FIELD_VALID_FROM = "validFrom"; + private static final String FIELD_VALID_TO = "validTo"; + private static final String FIELD_NAME = "name"; + + private static final DataStructure DATA_STRUCTURE = + DataStructure.builder() + .put(FIELD_CODE, Component.Role.IDENTIFIER, String.class) + .put(FIELD_VALID_FROM, Component.Role.IDENTIFIER, Instant.class) + //Note: validTo can contain nulls and VTL specification states that ICs cannot contain null values (VTL 1.1, user manual, line 2283). + //Nevertheless we set validTo to be an Identifier as we're not sure at this point what implications we + //could come upon. + .put(FIELD_VALID_TO, Component.Role.IDENTIFIER, Instant.class) + .put(FIELD_NAME, Component.Role.MEASURE, String.class) + .build(); + + private final List dataTemplates; + private final ObjectMapper mapper; + private final RestTemplate restTemplate; + + /* + The list of available datasets: + http://data.ssb.no/api/klass/v1/classifications/search?query=kommune + + Example dataset: + http://data.ssb.no/api/klass/v1/classifications/131/codes?from=2016-01-01 + + */ + + public SsbKlassApiConnector(ObjectMapper mapper) { + + this.dataTemplates = Lists.newArrayList(); + for (String path : DATA_PATHS) { + this.dataTemplates.add(new UriTemplate(SERVICE_URL + path)); + } + + this.mapper = checkNotNull(mapper, "the mapper was null").copy(); + + this.mapper.configure(JsonParser.Feature.AUTO_CLOSE_SOURCE, false); + this.mapper.configure(JsonGenerator.Feature.AUTO_CLOSE_TARGET, false); + + this.mapper.registerModule(new GuavaModule()); + this.mapper.registerModule(new Jdk8Module()); + this.mapper.registerModule(new JavaTimeModule()); + + SimpleModule module = new SimpleModule(); + module.addDeserializer(Map.class, new KlassDeserializer()); + this.mapper.registerModule(module); + + MappingJackson2HttpMessageConverter jacksonConverter; + jacksonConverter = new MappingJackson2HttpMessageConverter(this.mapper); + + this.restTemplate = new RestTemplate(asList( + jacksonConverter + )); + + } + + /** + * Gives access to the rest template to tests. + */ + RestTemplate getRestTemplate() { + return restTemplate; + } + + public boolean canHandle(String url) { + UriTemplate matchFound = findFirstMatchingUriTemplate(url).orElse(null); + return matchFound != null; + } + + private Optional findFirstMatchingUriTemplate(String url) { + return dataTemplates.stream() + .filter(t -> t.matches(url)) + .findFirst(); + } + + public Dataset getDataset(String url) throws ConnectorException { + + try { + HttpHeaders headers = new HttpHeaders(); + headers.setAccept(Arrays.asList(MediaType.APPLICATION_JSON)); + HttpEntity entity = new HttpEntity<>("parameters", headers); + + //http://data.ssb.no/api/klass/v1/classifications/131/codes?from=2016-01-01 + ResponseEntity exchange = restTemplate.exchange( + url, + HttpMethod.GET, + entity, DatasetWrapper.class); + + if (exchange.getBody() == null || exchange.getBody().getCodes().size() == 0) { + throw new NotFoundException(format("empty dataset returned for the identifier %s", url)); + } + + List> datasets = exchange.getBody().getCodes(); + + return new Dataset() { + @Override + public DataStructure getDataStructure() { + return DATA_STRUCTURE; + } + + @Override + public Stream get() { + DataStructure dataStructure = getDataStructure(); + Set codeFields = dataStructure.keySet(); + return datasets.stream() + .map(d -> Maps.filterKeys(d, codeFields::contains)) + .map(d -> convertType(d)) + .map(dataStructure::wrap); + } + }; + + } catch (RestClientException rce) { + throw new ConnectorException( + format("error when accessing the dataset with ids %s", url), + rce + ); + } + } + + private Map convertType(Map d) { + Map copy = Maps.newLinkedHashMap(d); + Map> types = DATA_STRUCTURE.getTypes(); + + d.forEach((k, v) -> copy.put(k, mapper.convertValue(v, types.get(k)))); + + return copy; + } + + public Dataset putDataset(String identifier, Dataset dataset) throws ConnectorException { + throw new ConnectorException("not supported"); + } + + static class DatasetWrapper { + @JsonProperty + private List> codes; + + public DatasetWrapper() { + } + + public List> getCodes() { + return codes; + } + + public void setCodes(List> codes) { + this.codes = codes; + } + } + + private static class KlassDeserializer extends StdDeserializer> { + + public KlassDeserializer() { + this(null); + } + + public KlassDeserializer(Class vc) { + super(vc); + } + + @Override + public Map deserialize(JsonParser jp, DeserializationContext ctxt) + throws IOException { + JsonNode node = jp.getCodec().readTree(jp); + String code = node.get(FIELD_CODE).asText(); + String name = node.get(FIELD_NAME).asText(); + String validFromAsString = node.get(FIELD_VALID_FROM).asText(); + String validToAsString = node.get(FIELD_VALID_TO).asText(); + + HashMap entry = Maps.newHashMap(); + entry.put(FIELD_CODE, code); + entry.put(FIELD_NAME, name); + entry.put(FIELD_VALID_FROM, parseKlassDate(validFromAsString)); + entry.put(FIELD_VALID_TO, parseKlassDate(validToAsString)); + + return entry; + } + } + + public static Instant parseKlassDate(String input) throws JsonParseException { + SimpleDateFormat dateFormat = new SimpleDateFormat(KLASS_DATE_PATTERN); + if (input != null && !input.isEmpty() && !input.toLowerCase().equals("null")) { + try { + Date date = dateFormat.parse(input); + return (date != null) ? date.toInstant() : null; + } catch (ParseException e) { + throw new JsonParseException(null, "Could not parse input to date. Data: " + + input + ", required format: " + KLASS_DATE_PATTERN); + } + } + return null; + } +} diff --git a/java-vtl-ssb-api-connector/src/test/java/no/ssb/vtl/connectors/SsbKlassApiConnectorTest.java b/java-vtl-ssb-api-connector/src/test/java/no/ssb/vtl/connectors/SsbKlassApiConnectorTest.java new file mode 100644 index 00000000..3a9ac78a --- /dev/null +++ b/java-vtl-ssb-api-connector/src/test/java/no/ssb/vtl/connectors/SsbKlassApiConnectorTest.java @@ -0,0 +1,90 @@ +package no.ssb.vtl.connectors; + +import static org.assertj.core.api.Assertions.*; +import static org.springframework.test.web.client.match.MockRestRequestMatchers.*; +import static org.springframework.test.web.client.response.MockRestResponseCreators.*; + +import java.io.InputStream; +import java.time.Instant; +import java.time.OffsetDateTime; + +import org.junit.Before; +import org.junit.Test; +import org.springframework.core.io.InputStreamResource; +import org.springframework.http.HttpMethod; +import org.springframework.http.MediaType; +import org.springframework.test.web.client.MockRestServiceServer; + +import com.fasterxml.jackson.databind.ObjectMapper; +import com.google.common.io.Resources; + +import no.ssb.vtl.connector.Connector; +import no.ssb.vtl.model.Component; +import no.ssb.vtl.model.DataPoint; +import no.ssb.vtl.model.Dataset; + +public class SsbKlassApiConnectorTest { + + private ObjectMapper mapper; + private Connector connector; + private MockRestServiceServer mockServer; + + @Before + public void setUp() throws Exception { + this.mapper = new ObjectMapper(); + SsbKlassApiConnector ssbConnector = new SsbKlassApiConnector(this.mapper); + this.connector = ssbConnector; + mockServer = MockRestServiceServer.createServer(ssbConnector.getRestTemplate()); + } + + + @Test + public void testCanHandle() throws Exception { + + String testUri = "http://data.ssb.no/api/klass/v1/classifications/131/codes?from=2013-01-01"; + assertThat(this.connector.canHandle(testUri)); + + testUri = "http://data.ssb.no/api/v0/dataset/1106.json?lang=en"; + assertThat(!this.connector.canHandle(testUri)); + + } + + @Test + public void testGetDataset() throws Exception { + + InputStream fileStream = Resources.getResource(this.getClass(), "/codes131_from2013.json").openStream(); + + mockServer.expect(requestTo("http://data.ssb.no/api/klass/v1/classifications/131/codes?from=2013-01-01")) + .andExpect(method(HttpMethod.GET)) + .andRespond(withSuccess( + new InputStreamResource(fileStream), + MediaType.APPLICATION_JSON) + ); + + Dataset dataset = this.connector.getDataset("http://data.ssb.no/api/klass/v1/classifications/131/codes?from=2013-01-01"); + + assertThat(dataset.getDataStructure().getRoles()).containsOnly( + entry("code", Component.Role.IDENTIFIER), + entry("name", Component.Role.MEASURE), + entry("validFrom", Component.Role.IDENTIFIER), + entry("validTo", Component.Role.IDENTIFIER) + ); + + assertThat(dataset.getDataStructure().getTypes()).containsOnly( + entry("code", String.class), + entry("name", String.class), + entry("validFrom", Instant.class), + entry("validTo", Instant.class) + ); + + assertThat(dataset.get()) + .flatExtracting(input -> input) + .extracting(DataPoint::get) + .containsSequence( + "0101", "Halden", OffsetDateTime.parse("2012-12-31T23:00:00Z").toInstant(), null, + "0104", "Moss", OffsetDateTime.parse("2012-12-31T23:00:00Z").toInstant(), null + ); + + } + +} diff --git a/java-vtl-ssb-api-connector/src/test/resources/codes131_from2013.json b/java-vtl-ssb-api-connector/src/test/resources/codes131_from2013.json new file mode 100644 index 00000000..67121512 --- /dev/null +++ b/java-vtl-ssb-api-connector/src/test/resources/codes131_from2013.json @@ -0,0 +1,3990 @@ +{ + "codes" : [ { + "code" : "0101", + "parentCode" : null, + "level" : "1", + "name" : "Halden", + "shortName" : "", + "presentationName" : "", + "validFrom" : "2013-01-01", + "validTo" : null + }, { + "code" : "0104", + "parentCode" : null, + "level" : "1", + "name" : "Moss", + "shortName" : "", + "presentationName" : "", + "validFrom" : "2013-01-01", + "validTo" : null + }, { + "code" : "0105", + "parentCode" : null, + "level" : "1", + "name" : "Sarpsborg", + "shortName" : "", + "presentationName" : "", + "validFrom" : "2013-01-01", + "validTo" : null + }, { + "code" : "0106", + "parentCode" : null, + "level" : "1", + "name" : "Fredrikstad", + "shortName" : "", + "presentationName" : "", + "validFrom" : "2013-01-01", + "validTo" : null + }, { + "code" : "0111", + "parentCode" : null, + "level" : "1", + "name" : "Hvaler", + "shortName" : "", + "presentationName" : "", + "validFrom" : "2013-01-01", + "validTo" : null + }, { + "code" : "0118", + "parentCode" : null, + "level" : "1", + "name" : "Aremark", + "shortName" : "", + "presentationName" : "", + "validFrom" : "2013-01-01", + "validTo" : null + }, { + "code" : "0119", + "parentCode" : null, + "level" : "1", + "name" : "Marker", + "shortName" : "", + "presentationName" : "", + "validFrom" : "2013-01-01", + "validTo" : null + }, { + "code" : "0121", + "parentCode" : null, + "level" : "1", + "name" : "Rømskog", + "shortName" : "", + "presentationName" : "", + "validFrom" : "2013-01-01", + "validTo" : null + }, { + "code" : "0122", + "parentCode" : null, + "level" : "1", + "name" : "Trøgstad", + "shortName" : "", + "presentationName" : "", + "validFrom" : "2013-01-01", + "validTo" : null + }, { + "code" : "0123", + "parentCode" : null, + "level" : "1", + "name" : "Spydeberg", + "shortName" : "", + "presentationName" : "", + "validFrom" : "2013-01-01", + "validTo" : null + }, { + "code" : "0124", + "parentCode" : null, + "level" : "1", + "name" : "Askim", + "shortName" : "", + "presentationName" : "", + "validFrom" : "2013-01-01", + "validTo" : null + }, { + "code" : "0125", + "parentCode" : null, + "level" : "1", + "name" : "Eidsberg", + "shortName" : "", + "presentationName" : "", + "validFrom" : "2013-01-01", + "validTo" : null + }, { + "code" : "0127", + "parentCode" : null, + "level" : "1", + "name" : "Skiptvet", + "shortName" : "", + "presentationName" : "", + "validFrom" : "2013-01-01", + "validTo" : null + }, { + "code" : "0128", + "parentCode" : null, + "level" : "1", + "name" : "Rakkestad", + "shortName" : "", + "presentationName" : "", + "validFrom" : "2013-01-01", + "validTo" : null + }, { + "code" : "0135", + "parentCode" : null, + "level" : "1", + "name" : "Råde", + "shortName" : "", + "presentationName" : "", + "validFrom" : "2013-01-01", + "validTo" : null + }, { + "code" : "0136", + "parentCode" : null, + "level" : "1", + "name" : "Rygge", + "shortName" : "", + "presentationName" : "", + "validFrom" : "2013-01-01", + "validTo" : null + }, { + "code" : "0137", + "parentCode" : null, + "level" : "1", + "name" : "Våler", + "shortName" : "", + "presentationName" : "", + "validFrom" : "2013-01-01", + "validTo" : null + }, { + "code" : "0138", + "parentCode" : null, + "level" : "1", + "name" : "Hobøl", + "shortName" : "", + "presentationName" : "", + "validFrom" : "2013-01-01", + "validTo" : null + }, { + "code" : "0211", + "parentCode" : null, + "level" : "1", + "name" : "Vestby", + "shortName" : "", + "presentationName" : "", + "validFrom" : "2013-01-01", + "validTo" : null + }, { + "code" : "0213", + "parentCode" : null, + "level" : "1", + "name" : "Ski", + "shortName" : "", + "presentationName" : "", + "validFrom" : "2013-01-01", + "validTo" : null + }, { + "code" : "0214", + "parentCode" : null, + "level" : "1", + "name" : "Ås", + "shortName" : "", + "presentationName" : "", + "validFrom" : "2013-01-01", + "validTo" : null + }, { + "code" : "0215", + "parentCode" : null, + "level" : "1", + "name" : "Frogn", + "shortName" : "", + "presentationName" : "", + "validFrom" : "2013-01-01", + "validTo" : null + }, { + "code" : "0216", + "parentCode" : null, + "level" : "1", + "name" : "Nesodden", + "shortName" : "", + "presentationName" : "", + "validFrom" : "2013-01-01", + "validTo" : null + }, { + "code" : "0217", + "parentCode" : null, + "level" : "1", + "name" : "Oppegård", + "shortName" : "", + "presentationName" : "", + "validFrom" : "2013-01-01", + "validTo" : null + }, { + "code" : "0219", + "parentCode" : null, + "level" : "1", + "name" : "Bærum", + "shortName" : "", + "presentationName" : "", + "validFrom" : "2013-01-01", + "validTo" : null + }, { + "code" : "0220", + "parentCode" : null, + "level" : "1", + "name" : "Asker", + "shortName" : "", + "presentationName" : "", + "validFrom" : "2013-01-01", + "validTo" : null + }, { + "code" : "0221", + "parentCode" : null, + "level" : "1", + "name" : "Aurskog-Høland", + "shortName" : "", + "presentationName" : "", + "validFrom" : "2013-01-01", + "validTo" : null + }, { + "code" : "0226", + "parentCode" : null, + "level" : "1", + "name" : "Sørum", + "shortName" : "", + "presentationName" : "", + "validFrom" : "2013-01-01", + "validTo" : null + }, { + "code" : "0227", + "parentCode" : null, + "level" : "1", + "name" : "Fet", + "shortName" : "", + "presentationName" : "", + "validFrom" : "2013-01-01", + "validTo" : null + }, { + "code" : "0228", + "parentCode" : null, + "level" : "1", + "name" : "Rælingen", + "shortName" : "", + "presentationName" : "", + "validFrom" : "2013-01-01", + "validTo" : null + }, { + "code" : "0229", + "parentCode" : null, + "level" : "1", + "name" : "Enebakk", + "shortName" : "", + "presentationName" : "", + "validFrom" : "2013-01-01", + "validTo" : null + }, { + "code" : "0230", + "parentCode" : null, + "level" : "1", + "name" : "Lørenskog", + "shortName" : "", + "presentationName" : "", + "validFrom" : "2013-01-01", + "validTo" : null + }, { + "code" : "0231", + "parentCode" : null, + "level" : "1", + "name" : "Skedsmo", + "shortName" : "", + "presentationName" : "", + "validFrom" : "2013-01-01", + "validTo" : null + }, { + "code" : "0233", + "parentCode" : null, + "level" : "1", + "name" : "Nittedal", + "shortName" : "", + "presentationName" : "", + "validFrom" : "2013-01-01", + "validTo" : null + }, { + "code" : "0234", + "parentCode" : null, + "level" : "1", + "name" : "Gjerdrum", + "shortName" : "", + "presentationName" : "", + "validFrom" : "2013-01-01", + "validTo" : null + }, { + "code" : "0235", + "parentCode" : null, + "level" : "1", + "name" : "Ullensaker", + "shortName" : "", + "presentationName" : "", + "validFrom" : "2013-01-01", + "validTo" : null + }, { + "code" : "0236", + "parentCode" : null, + "level" : "1", + "name" : "Nes", + "shortName" : "", + "presentationName" : "", + "validFrom" : "2013-01-01", + "validTo" : null + }, { + "code" : "0237", + "parentCode" : null, + "level" : "1", + "name" : "Eidsvoll", + "shortName" : "", + "presentationName" : "", + "validFrom" : "2013-01-01", + "validTo" : null + }, { + "code" : "0238", + "parentCode" : null, + "level" : "1", + "name" : "Nannestad", + "shortName" : "", + "presentationName" : "", + "validFrom" : "2013-01-01", + "validTo" : null + }, { + "code" : "0239", + "parentCode" : null, + "level" : "1", + "name" : "Hurdal", + "shortName" : "", + "presentationName" : "", + "validFrom" : "2013-01-01", + "validTo" : null + }, { + "code" : "0301", + "parentCode" : null, + "level" : "1", + "name" : "Oslo", + "shortName" : "", + "presentationName" : "", + "validFrom" : "2013-01-01", + "validTo" : null + }, { + "code" : "0402", + "parentCode" : null, + "level" : "1", + "name" : "Kongsvinger", + "shortName" : "", + "presentationName" : "", + "validFrom" : "2013-01-01", + "validTo" : null + }, { + "code" : "0403", + "parentCode" : null, + "level" : "1", + "name" : "Hamar", + "shortName" : "", + "presentationName" : "", + "validFrom" : "2013-01-01", + "validTo" : null + }, { + "code" : "0412", + "parentCode" : null, + "level" : "1", + "name" : "Ringsaker", + "shortName" : "", + "presentationName" : "", + "validFrom" : "2013-01-01", + "validTo" : null + }, { + "code" : "0415", + "parentCode" : null, + "level" : "1", + "name" : "Løten", + "shortName" : "", + "presentationName" : "", + "validFrom" : "2013-01-01", + "validTo" : null + }, { + "code" : "0417", + "parentCode" : null, + "level" : "1", + "name" : "Stange", + "shortName" : "", + "presentationName" : "", + "validFrom" : "2013-01-01", + "validTo" : null + }, { + "code" : "0418", + "parentCode" : null, + "level" : "1", + "name" : "Nord-Odal", + "shortName" : "", + "presentationName" : "", + "validFrom" : "2013-01-01", + "validTo" : null + }, { + "code" : "0419", + "parentCode" : null, + "level" : "1", + "name" : "Sør-Odal", + "shortName" : "", + "presentationName" : "", + "validFrom" : "2013-01-01", + "validTo" : null + }, { + "code" : "0420", + "parentCode" : null, + "level" : "1", + "name" : "Eidskog", + "shortName" : "", + "presentationName" : "", + "validFrom" : "2013-01-01", + "validTo" : null + }, { + "code" : "0423", + "parentCode" : null, + "level" : "1", + "name" : "Grue", + "shortName" : "", + "presentationName" : "", + "validFrom" : "2013-01-01", + "validTo" : null + }, { + "code" : "0425", + "parentCode" : null, + "level" : "1", + "name" : "Åsnes", + "shortName" : "", + "presentationName" : "", + "validFrom" : "2013-01-01", + "validTo" : null + }, { + "code" : "0426", + "parentCode" : null, + "level" : "1", + "name" : "Våler", + "shortName" : "", + "presentationName" : "", + "validFrom" : "2013-01-01", + "validTo" : null + }, { + "code" : "0427", + "parentCode" : null, + "level" : "1", + "name" : "Elverum", + "shortName" : "", + "presentationName" : "", + "validFrom" : "2013-01-01", + "validTo" : null + }, { + "code" : "0428", + "parentCode" : null, + "level" : "1", + "name" : "Trysil", + "shortName" : "", + "presentationName" : "", + "validFrom" : "2013-01-01", + "validTo" : null + }, { + "code" : "0429", + "parentCode" : null, + "level" : "1", + "name" : "Åmot", + "shortName" : "", + "presentationName" : "", + "validFrom" : "2013-01-01", + "validTo" : null + }, { + "code" : "0430", + "parentCode" : null, + "level" : "1", + "name" : "Stor-Elvdal", + "shortName" : "", + "presentationName" : "", + "validFrom" : "2013-01-01", + "validTo" : null + }, { + "code" : "0432", + "parentCode" : null, + "level" : "1", + "name" : "Rendalen", + "shortName" : "", + "presentationName" : "", + "validFrom" : "2013-01-01", + "validTo" : null + }, { + "code" : "0434", + "parentCode" : null, + "level" : "1", + "name" : "Engerdal", + "shortName" : "", + "presentationName" : "", + "validFrom" : "2013-01-01", + "validTo" : null + }, { + "code" : "0436", + "parentCode" : null, + "level" : "1", + "name" : "Tolga", + "shortName" : "", + "presentationName" : "", + "validFrom" : "2013-01-01", + "validTo" : null + }, { + "code" : "0437", + "parentCode" : null, + "level" : "1", + "name" : "Tynset", + "shortName" : "", + "presentationName" : "", + "validFrom" : "2013-01-01", + "validTo" : null + }, { + "code" : "0438", + "parentCode" : null, + "level" : "1", + "name" : "Alvdal", + "shortName" : "", + "presentationName" : "", + "validFrom" : "2013-01-01", + "validTo" : null + }, { + "code" : "0439", + "parentCode" : null, + "level" : "1", + "name" : "Folldal", + "shortName" : "", + "presentationName" : "", + "validFrom" : "2013-01-01", + "validTo" : null + }, { + "code" : "0441", + "parentCode" : null, + "level" : "1", + "name" : "Os", + "shortName" : "", + "presentationName" : "", + "validFrom" : "2013-01-01", + "validTo" : null + }, { + "code" : "0501", + "parentCode" : null, + "level" : "1", + "name" : "Lillehammer", + "shortName" : "", + "presentationName" : "", + "validFrom" : "2013-01-01", + "validTo" : null + }, { + "code" : "0502", + "parentCode" : null, + "level" : "1", + "name" : "Gjøvik", + "shortName" : "", + "presentationName" : "", + "validFrom" : "2013-01-01", + "validTo" : null + }, { + "code" : "0511", + "parentCode" : null, + "level" : "1", + "name" : "Dovre", + "shortName" : "", + "presentationName" : "", + "validFrom" : "2013-01-01", + "validTo" : null + }, { + "code" : "0512", + "parentCode" : null, + "level" : "1", + "name" : "Lesja", + "shortName" : "", + "presentationName" : "", + "validFrom" : "2013-01-01", + "validTo" : null + }, { + "code" : "0513", + "parentCode" : null, + "level" : "1", + "name" : "Skjåk", + "shortName" : "", + "presentationName" : "", + "validFrom" : "2013-01-01", + "validTo" : null + }, { + "code" : "0514", + "parentCode" : null, + "level" : "1", + "name" : "Lom", + "shortName" : "", + "presentationName" : "", + "validFrom" : "2013-01-01", + "validTo" : null + }, { + "code" : "0515", + "parentCode" : null, + "level" : "1", + "name" : "Vågå", + "shortName" : "", + "presentationName" : "", + "validFrom" : "2013-01-01", + "validTo" : null + }, { + "code" : "0516", + "parentCode" : null, + "level" : "1", + "name" : "Nord-Fron", + "shortName" : "", + "presentationName" : "", + "validFrom" : "2013-01-01", + "validTo" : null + }, { + "code" : "0517", + "parentCode" : null, + "level" : "1", + "name" : "Sel", + "shortName" : "", + "presentationName" : "", + "validFrom" : "2013-01-01", + "validTo" : null + }, { + "code" : "0519", + "parentCode" : null, + "level" : "1", + "name" : "Sør-Fron", + "shortName" : "", + "presentationName" : "", + "validFrom" : "2013-01-01", + "validTo" : null + }, { + "code" : "0520", + "parentCode" : null, + "level" : "1", + "name" : "Ringebu", + "shortName" : "", + "presentationName" : "", + "validFrom" : "2013-01-01", + "validTo" : null + }, { + "code" : "0521", + "parentCode" : null, + "level" : "1", + "name" : "Øyer", + "shortName" : "", + "presentationName" : "", + "validFrom" : "2013-01-01", + "validTo" : null + }, { + "code" : "0522", + "parentCode" : null, + "level" : "1", + "name" : "Gausdal", + "shortName" : "", + "presentationName" : "", + "validFrom" : "2013-01-01", + "validTo" : null + }, { + "code" : "0528", + "parentCode" : null, + "level" : "1", + "name" : "Østre Toten", + "shortName" : "", + "presentationName" : "", + "validFrom" : "2013-01-01", + "validTo" : null + }, { + "code" : "0529", + "parentCode" : null, + "level" : "1", + "name" : "Vestre Toten", + "shortName" : "", + "presentationName" : "", + "validFrom" : "2013-01-01", + "validTo" : null + }, { + "code" : "0532", + "parentCode" : null, + "level" : "1", + "name" : "Jevnaker", + "shortName" : "", + "presentationName" : "", + "validFrom" : "2013-01-01", + "validTo" : null + }, { + "code" : "0533", + "parentCode" : null, + "level" : "1", + "name" : "Lunner", + "shortName" : "", + "presentationName" : "", + "validFrom" : "2013-01-01", + "validTo" : null + }, { + "code" : "0534", + "parentCode" : null, + "level" : "1", + "name" : "Gran", + "shortName" : "", + "presentationName" : "", + "validFrom" : "2013-01-01", + "validTo" : null + }, { + "code" : "0536", + "parentCode" : null, + "level" : "1", + "name" : "Søndre Land", + "shortName" : "", + "presentationName" : "", + "validFrom" : "2013-01-01", + "validTo" : null + }, { + "code" : "0538", + "parentCode" : null, + "level" : "1", + "name" : "Nordre Land", + "shortName" : "", + "presentationName" : "", + "validFrom" : "2013-01-01", + "validTo" : null + }, { + "code" : "0540", + "parentCode" : null, + "level" : "1", + "name" : "Sør-Aurdal", + "shortName" : "", + "presentationName" : "", + "validFrom" : "2013-01-01", + "validTo" : null + }, { + "code" : "0541", + "parentCode" : null, + "level" : "1", + "name" : "Etnedal", + "shortName" : "", + "presentationName" : "", + "validFrom" : "2013-01-01", + "validTo" : null + }, { + "code" : "0542", + "parentCode" : null, + "level" : "1", + "name" : "Nord-Aurdal", + "shortName" : "", + "presentationName" : "", + "validFrom" : "2013-01-01", + "validTo" : null + }, { + "code" : "0543", + "parentCode" : null, + "level" : "1", + "name" : "Vestre Slidre", + "shortName" : "", + "presentationName" : "", + "validFrom" : "2013-01-01", + "validTo" : null + }, { + "code" : "0544", + "parentCode" : null, + "level" : "1", + "name" : "Øystre Slidre", + "shortName" : "", + "presentationName" : "", + "validFrom" : "2013-01-01", + "validTo" : null + }, { + "code" : "0545", + "parentCode" : null, + "level" : "1", + "name" : "Vang", + "shortName" : "", + "presentationName" : "", + "validFrom" : "2013-01-01", + "validTo" : null + }, { + "code" : "0602", + "parentCode" : null, + "level" : "1", + "name" : "Drammen", + "shortName" : "", + "presentationName" : "", + "validFrom" : "2013-01-01", + "validTo" : null + }, { + "code" : "0604", + "parentCode" : null, + "level" : "1", + "name" : "Kongsberg", + "shortName" : "", + "presentationName" : "", + "validFrom" : "2013-01-01", + "validTo" : null + }, { + "code" : "0605", + "parentCode" : null, + "level" : "1", + "name" : "Ringerike", + "shortName" : "", + "presentationName" : "", + "validFrom" : "2013-01-01", + "validTo" : null + }, { + "code" : "0612", + "parentCode" : null, + "level" : "1", + "name" : "Hole", + "shortName" : "", + "presentationName" : "", + "validFrom" : "2013-01-01", + "validTo" : null + }, { + "code" : "0615", + "parentCode" : null, + "level" : "1", + "name" : "Flå", + "shortName" : "", + "presentationName" : "", + "validFrom" : "2013-01-01", + "validTo" : null + }, { + "code" : "0616", + "parentCode" : null, + "level" : "1", + "name" : "Nes", + "shortName" : "", + "presentationName" : "", + "validFrom" : "2013-01-01", + "validTo" : null + }, { + "code" : "0617", + "parentCode" : null, + "level" : "1", + "name" : "Gol", + "shortName" : "", + "presentationName" : "", + "validFrom" : "2013-01-01", + "validTo" : null + }, { + "code" : "0618", + "parentCode" : null, + "level" : "1", + "name" : "Hemsedal", + "shortName" : "", + "presentationName" : "", + "validFrom" : "2013-01-01", + "validTo" : null + }, { + "code" : "0619", + "parentCode" : null, + "level" : "1", + "name" : "Ål", + "shortName" : "", + "presentationName" : "", + "validFrom" : "2013-01-01", + "validTo" : null + }, { + "code" : "0620", + "parentCode" : null, + "level" : "1", + "name" : "Hol", + "shortName" : "", + "presentationName" : "", + "validFrom" : "2013-01-01", + "validTo" : null + }, { + "code" : "0621", + "parentCode" : null, + "level" : "1", + "name" : "Sigdal", + "shortName" : "", + "presentationName" : "", + "validFrom" : "2013-01-01", + "validTo" : null + }, { + "code" : "0622", + "parentCode" : null, + "level" : "1", + "name" : "Krødsherad", + "shortName" : "", + "presentationName" : "", + "validFrom" : "2013-01-01", + "validTo" : null + }, { + "code" : "0623", + "parentCode" : null, + "level" : "1", + "name" : "Modum", + "shortName" : "", + "presentationName" : "", + "validFrom" : "2013-01-01", + "validTo" : null + }, { + "code" : "0624", + "parentCode" : null, + "level" : "1", + "name" : "Øvre Eiker", + "shortName" : "", + "presentationName" : "", + "validFrom" : "2013-01-01", + "validTo" : null + }, { + "code" : "0625", + "parentCode" : null, + "level" : "1", + "name" : "Nedre Eiker", + "shortName" : "", + "presentationName" : "", + "validFrom" : "2013-01-01", + "validTo" : null + }, { + "code" : "0626", + "parentCode" : null, + "level" : "1", + "name" : "Lier", + "shortName" : "", + "presentationName" : "", + "validFrom" : "2013-01-01", + "validTo" : null + }, { + "code" : "0627", + "parentCode" : null, + "level" : "1", + "name" : "Røyken", + "shortName" : "", + "presentationName" : "", + "validFrom" : "2013-01-01", + "validTo" : null + }, { + "code" : "0628", + "parentCode" : null, + "level" : "1", + "name" : "Hurum", + "shortName" : "", + "presentationName" : "", + "validFrom" : "2013-01-01", + "validTo" : null + }, { + "code" : "0631", + "parentCode" : null, + "level" : "1", + "name" : "Flesberg", + "shortName" : "", + "presentationName" : "", + "validFrom" : "2013-01-01", + "validTo" : null + }, { + "code" : "0632", + "parentCode" : null, + "level" : "1", + "name" : "Rollag", + "shortName" : "", + "presentationName" : "", + "validFrom" : "2013-01-01", + "validTo" : null + }, { + "code" : "0633", + "parentCode" : null, + "level" : "1", + "name" : "Nore og Uvdal", + "shortName" : "", + "presentationName" : "", + "validFrom" : "2013-01-01", + "validTo" : null + }, { + "code" : "0701", + "parentCode" : null, + "level" : "1", + "name" : "Horten", + "shortName" : "", + "presentationName" : "", + "validFrom" : "2013-01-01", + "validTo" : null + }, { + "code" : "0702", + "parentCode" : null, + "level" : "1", + "name" : "Holmestrand", + "shortName" : "", + "presentationName" : "", + "validFrom" : "2013-01-01", + "validTo" : null + }, { + "code" : "0704", + "parentCode" : null, + "level" : "1", + "name" : "Tønsberg", + "shortName" : "", + "presentationName" : "", + "validFrom" : "2013-01-01", + "validTo" : null + }, { + "code" : "0706", + "parentCode" : null, + "level" : "1", + "name" : "Sandefjord", + "shortName" : "", + "presentationName" : "", + "validFrom" : "2013-01-01", + "validTo" : "2017-01-01" + }, { + "code" : "0709", + "parentCode" : null, + "level" : "1", + "name" : "Larvik", + "shortName" : "", + "presentationName" : "", + "validFrom" : "2013-01-01", + "validTo" : null + }, { + "code" : "0710", + "parentCode" : null, + "level" : "1", + "name" : "Sandefjord", + "shortName" : "", + "presentationName" : "", + "validFrom" : "2017-01-01", + "validTo" : null + }, { + "code" : "0711", + "parentCode" : null, + "level" : "1", + "name" : "Svelvik", + "shortName" : "", + "presentationName" : "", + "validFrom" : "2013-01-01", + "validTo" : null + }, { + "code" : "0713", + "parentCode" : null, + "level" : "1", + "name" : "Sande", + "shortName" : "", + "presentationName" : "", + "validFrom" : "2013-01-01", + "validTo" : null + }, { + "code" : "0714", + "parentCode" : null, + "level" : "1", + "name" : "Hof", + "shortName" : "", + "presentationName" : "", + "validFrom" : "2013-01-01", + "validTo" : null + }, { + "code" : "0716", + "parentCode" : null, + "level" : "1", + "name" : "Re", + "shortName" : "", + "presentationName" : "", + "validFrom" : "2013-01-01", + "validTo" : null + }, { + "code" : "0719", + "parentCode" : null, + "level" : "1", + "name" : "Andebu", + "shortName" : "", + "presentationName" : "", + "validFrom" : "2013-01-01", + "validTo" : "2017-01-01" + }, { + "code" : "0720", + "parentCode" : null, + "level" : "1", + "name" : "Stokke", + "shortName" : "", + "presentationName" : "", + "validFrom" : "2013-01-01", + "validTo" : "2017-01-01" + }, { + "code" : "0722", + "parentCode" : null, + "level" : "1", + "name" : "Nøtterøy", + "shortName" : "", + "presentationName" : "", + "validFrom" : "2013-01-01", + "validTo" : null + }, { + "code" : "0723", + "parentCode" : null, + "level" : "1", + "name" : "Tjøme", + "shortName" : "", + "presentationName" : "", + "validFrom" : "2013-01-01", + "validTo" : null + }, { + "code" : "0728", + "parentCode" : null, + "level" : "1", + "name" : "Lardal", + "shortName" : "", + "presentationName" : "", + "validFrom" : "2013-01-01", + "validTo" : null + }, { + "code" : "0805", + "parentCode" : null, + "level" : "1", + "name" : "Porsgrunn", + "shortName" : "", + "presentationName" : "", + "validFrom" : "2013-01-01", + "validTo" : null + }, { + "code" : "0806", + "parentCode" : null, + "level" : "1", + "name" : "Skien", + "shortName" : "", + "presentationName" : "", + "validFrom" : "2013-01-01", + "validTo" : null + }, { + "code" : "0807", + "parentCode" : null, + "level" : "1", + "name" : "Notodden", + "shortName" : "", + "presentationName" : "", + "validFrom" : "2013-01-01", + "validTo" : null + }, { + "code" : "0811", + "parentCode" : null, + "level" : "1", + "name" : "Siljan", + "shortName" : "", + "presentationName" : "", + "validFrom" : "2013-01-01", + "validTo" : null + }, { + "code" : "0814", + "parentCode" : null, + "level" : "1", + "name" : "Bamble", + "shortName" : "", + "presentationName" : "", + "validFrom" : "2013-01-01", + "validTo" : null + }, { + "code" : "0815", + "parentCode" : null, + "level" : "1", + "name" : "Kragerø", + "shortName" : "", + "presentationName" : "", + "validFrom" : "2013-01-01", + "validTo" : null + }, { + "code" : "0817", + "parentCode" : null, + "level" : "1", + "name" : "Drangedal", + "shortName" : "", + "presentationName" : "", + "validFrom" : "2013-01-01", + "validTo" : null + }, { + "code" : "0819", + "parentCode" : null, + "level" : "1", + "name" : "Nome", + "shortName" : "", + "presentationName" : "", + "validFrom" : "2013-01-01", + "validTo" : null + }, { + "code" : "0821", + "parentCode" : null, + "level" : "1", + "name" : "Bø", + "shortName" : "", + "presentationName" : "", + "validFrom" : "2013-01-01", + "validTo" : null + }, { + "code" : "0822", + "parentCode" : null, + "level" : "1", + "name" : "Sauherad", + "shortName" : "", + "presentationName" : "", + "validFrom" : "2013-01-01", + "validTo" : null + }, { + "code" : "0826", + "parentCode" : null, + "level" : "1", + "name" : "Tinn", + "shortName" : "", + "presentationName" : "", + "validFrom" : "2013-01-01", + "validTo" : null + }, { + "code" : "0827", + "parentCode" : null, + "level" : "1", + "name" : "Hjartdal", + "shortName" : "", + "presentationName" : "", + "validFrom" : "2013-01-01", + "validTo" : null + }, { + "code" : "0828", + "parentCode" : null, + "level" : "1", + "name" : "Seljord", + "shortName" : "", + "presentationName" : "", + "validFrom" : "2013-01-01", + "validTo" : null + }, { + "code" : "0829", + "parentCode" : null, + "level" : "1", + "name" : "Kviteseid", + "shortName" : "", + "presentationName" : "", + "validFrom" : "2013-01-01", + "validTo" : null + }, { + "code" : "0830", + "parentCode" : null, + "level" : "1", + "name" : "Nissedal", + "shortName" : "", + "presentationName" : "", + "validFrom" : "2013-01-01", + "validTo" : null + }, { + "code" : "0831", + "parentCode" : null, + "level" : "1", + "name" : "Fyresdal", + "shortName" : "", + "presentationName" : "", + "validFrom" : "2013-01-01", + "validTo" : null + }, { + "code" : "0833", + "parentCode" : null, + "level" : "1", + "name" : "Tokke", + "shortName" : "", + "presentationName" : "", + "validFrom" : "2013-01-01", + "validTo" : null + }, { + "code" : "0834", + "parentCode" : null, + "level" : "1", + "name" : "Vinje", + "shortName" : "", + "presentationName" : "", + "validFrom" : "2013-01-01", + "validTo" : null + }, { + "code" : "0901", + "parentCode" : null, + "level" : "1", + "name" : "Risør", + "shortName" : "", + "presentationName" : "", + "validFrom" : "2013-01-01", + "validTo" : null + }, { + "code" : "0904", + "parentCode" : null, + "level" : "1", + "name" : "Grimstad", + "shortName" : "", + "presentationName" : "", + "validFrom" : "2013-01-01", + "validTo" : null + }, { + "code" : "0906", + "parentCode" : null, + "level" : "1", + "name" : "Arendal", + "shortName" : "", + "presentationName" : "", + "validFrom" : "2013-01-01", + "validTo" : null + }, { + "code" : "0911", + "parentCode" : null, + "level" : "1", + "name" : "Gjerstad", + "shortName" : "", + "presentationName" : "", + "validFrom" : "2013-01-01", + "validTo" : null + }, { + "code" : "0912", + "parentCode" : null, + "level" : "1", + "name" : "Vegårshei", + "shortName" : "", + "presentationName" : "", + "validFrom" : "2013-01-01", + "validTo" : null + }, { + "code" : "0914", + "parentCode" : null, + "level" : "1", + "name" : "Tvedestrand", + "shortName" : "", + "presentationName" : "", + "validFrom" : "2013-01-01", + "validTo" : null + }, { + "code" : "0919", + "parentCode" : null, + "level" : "1", + "name" : "Froland", + "shortName" : "", + "presentationName" : "", + "validFrom" : "2013-01-01", + "validTo" : null + }, { + "code" : "0926", + "parentCode" : null, + "level" : "1", + "name" : "Lillesand", + "shortName" : "", + "presentationName" : "", + "validFrom" : "2013-01-01", + "validTo" : null + }, { + "code" : "0928", + "parentCode" : null, + "level" : "1", + "name" : "Birkenes", + "shortName" : "", + "presentationName" : "", + "validFrom" : "2013-01-01", + "validTo" : null + }, { + "code" : "0929", + "parentCode" : null, + "level" : "1", + "name" : "Åmli", + "shortName" : "", + "presentationName" : "", + "validFrom" : "2013-01-01", + "validTo" : null + }, { + "code" : "0935", + "parentCode" : null, + "level" : "1", + "name" : "Iveland", + "shortName" : "", + "presentationName" : "", + "validFrom" : "2013-01-01", + "validTo" : null + }, { + "code" : "0937", + "parentCode" : null, + "level" : "1", + "name" : "Evje og Hornnes", + "shortName" : "", + "presentationName" : "", + "validFrom" : "2013-01-01", + "validTo" : null + }, { + "code" : "0938", + "parentCode" : null, + "level" : "1", + "name" : "Bygland", + "shortName" : "", + "presentationName" : "", + "validFrom" : "2013-01-01", + "validTo" : null + }, { + "code" : "0940", + "parentCode" : null, + "level" : "1", + "name" : "Valle", + "shortName" : "", + "presentationName" : "", + "validFrom" : "2013-01-01", + "validTo" : null + }, { + "code" : "0941", + "parentCode" : null, + "level" : "1", + "name" : "Bykle", + "shortName" : "", + "presentationName" : "", + "validFrom" : "2013-01-01", + "validTo" : null + }, { + "code" : "1001", + "parentCode" : null, + "level" : "1", + "name" : "Kristiansand", + "shortName" : "", + "presentationName" : "", + "validFrom" : "2013-01-01", + "validTo" : null + }, { + "code" : "1002", + "parentCode" : null, + "level" : "1", + "name" : "Mandal", + "shortName" : "", + "presentationName" : "", + "validFrom" : "2013-01-01", + "validTo" : null + }, { + "code" : "1003", + "parentCode" : null, + "level" : "1", + "name" : "Farsund", + "shortName" : "", + "presentationName" : "", + "validFrom" : "2013-01-01", + "validTo" : null + }, { + "code" : "1004", + "parentCode" : null, + "level" : "1", + "name" : "Flekkefjord", + "shortName" : "", + "presentationName" : "", + "validFrom" : "2013-01-01", + "validTo" : null + }, { + "code" : "1014", + "parentCode" : null, + "level" : "1", + "name" : "Vennesla", + "shortName" : "", + "presentationName" : "", + "validFrom" : "2013-01-01", + "validTo" : null + }, { + "code" : "1017", + "parentCode" : null, + "level" : "1", + "name" : "Songdalen", + "shortName" : "", + "presentationName" : "", + "validFrom" : "2013-01-01", + "validTo" : null + }, { + "code" : "1018", + "parentCode" : null, + "level" : "1", + "name" : "Søgne", + "shortName" : "", + "presentationName" : "", + "validFrom" : "2013-01-01", + "validTo" : null + }, { + "code" : "1021", + "parentCode" : null, + "level" : "1", + "name" : "Marnardal", + "shortName" : "", + "presentationName" : "", + "validFrom" : "2013-01-01", + "validTo" : null + }, { + "code" : "1026", + "parentCode" : null, + "level" : "1", + "name" : "Åseral", + "shortName" : "", + "presentationName" : "", + "validFrom" : "2013-01-01", + "validTo" : null + }, { + "code" : "1027", + "parentCode" : null, + "level" : "1", + "name" : "Audnedal", + "shortName" : "", + "presentationName" : "", + "validFrom" : "2013-01-01", + "validTo" : null + }, { + "code" : "1029", + "parentCode" : null, + "level" : "1", + "name" : "Lindesnes", + "shortName" : "", + "presentationName" : "", + "validFrom" : "2013-01-01", + "validTo" : null + }, { + "code" : "1032", + "parentCode" : null, + "level" : "1", + "name" : "Lyngdal", + "shortName" : "", + "presentationName" : "", + "validFrom" : "2013-01-01", + "validTo" : null + }, { + "code" : "1034", + "parentCode" : null, + "level" : "1", + "name" : "Hægebostad", + "shortName" : "", + "presentationName" : "", + "validFrom" : "2013-01-01", + "validTo" : null + }, { + "code" : "1037", + "parentCode" : null, + "level" : "1", + "name" : "Kvinesdal", + "shortName" : "", + "presentationName" : "", + "validFrom" : "2013-01-01", + "validTo" : null + }, { + "code" : "1046", + "parentCode" : null, + "level" : "1", + "name" : "Sirdal", + "shortName" : "", + "presentationName" : "", + "validFrom" : "2013-01-01", + "validTo" : null + }, { + "code" : "1101", + "parentCode" : null, + "level" : "1", + "name" : "Eigersund", + "shortName" : "", + "presentationName" : "", + "validFrom" : "2013-01-01", + "validTo" : null + }, { + "code" : "1102", + "parentCode" : null, + "level" : "1", + "name" : "Sandnes", + "shortName" : "", + "presentationName" : "", + "validFrom" : "2013-01-01", + "validTo" : null + }, { + "code" : "1103", + "parentCode" : null, + "level" : "1", + "name" : "Stavanger", + "shortName" : "", + "presentationName" : "", + "validFrom" : "2013-01-01", + "validTo" : null + }, { + "code" : "1106", + "parentCode" : null, + "level" : "1", + "name" : "Haugesund", + "shortName" : "", + "presentationName" : "", + "validFrom" : "2013-01-01", + "validTo" : null + }, { + "code" : "1111", + "parentCode" : null, + "level" : "1", + "name" : "Sokndal", + "shortName" : "", + "presentationName" : "", + "validFrom" : "2013-01-01", + "validTo" : null + }, { + "code" : "1112", + "parentCode" : null, + "level" : "1", + "name" : "Lund", + "shortName" : "", + "presentationName" : "", + "validFrom" : "2013-01-01", + "validTo" : null + }, { + "code" : "1114", + "parentCode" : null, + "level" : "1", + "name" : "Bjerkreim", + "shortName" : "", + "presentationName" : "", + "validFrom" : "2013-01-01", + "validTo" : null + }, { + "code" : "1119", + "parentCode" : null, + "level" : "1", + "name" : "Hå", + "shortName" : "", + "presentationName" : "", + "validFrom" : "2013-01-01", + "validTo" : null + }, { + "code" : "1120", + "parentCode" : null, + "level" : "1", + "name" : "Klepp", + "shortName" : "", + "presentationName" : "", + "validFrom" : "2013-01-01", + "validTo" : null + }, { + "code" : "1121", + "parentCode" : null, + "level" : "1", + "name" : "Time", + "shortName" : "", + "presentationName" : "", + "validFrom" : "2013-01-01", + "validTo" : null + }, { + "code" : "1122", + "parentCode" : null, + "level" : "1", + "name" : "Gjesdal", + "shortName" : "", + "presentationName" : "", + "validFrom" : "2013-01-01", + "validTo" : null + }, { + "code" : "1124", + "parentCode" : null, + "level" : "1", + "name" : "Sola", + "shortName" : "", + "presentationName" : "", + "validFrom" : "2013-01-01", + "validTo" : null + }, { + "code" : "1127", + "parentCode" : null, + "level" : "1", + "name" : "Randaberg", + "shortName" : "", + "presentationName" : "", + "validFrom" : "2013-01-01", + "validTo" : null + }, { + "code" : "1129", + "parentCode" : null, + "level" : "1", + "name" : "Forsand", + "shortName" : "", + "presentationName" : "", + "validFrom" : "2013-01-01", + "validTo" : null + }, { + "code" : "1130", + "parentCode" : null, + "level" : "1", + "name" : "Strand", + "shortName" : "", + "presentationName" : "", + "validFrom" : "2013-01-01", + "validTo" : null + }, { + "code" : "1133", + "parentCode" : null, + "level" : "1", + "name" : "Hjelmeland", + "shortName" : "", + "presentationName" : "", + "validFrom" : "2013-01-01", + "validTo" : null + }, { + "code" : "1134", + "parentCode" : null, + "level" : "1", + "name" : "Suldal", + "shortName" : "", + "presentationName" : "", + "validFrom" : "2013-01-01", + "validTo" : null + }, { + "code" : "1135", + "parentCode" : null, + "level" : "1", + "name" : "Sauda", + "shortName" : "", + "presentationName" : "", + "validFrom" : "2013-01-01", + "validTo" : null + }, { + "code" : "1141", + "parentCode" : null, + "level" : "1", + "name" : "Finnøy", + "shortName" : "", + "presentationName" : "", + "validFrom" : "2013-01-01", + "validTo" : null + }, { + "code" : "1142", + "parentCode" : null, + "level" : "1", + "name" : "Rennesøy", + "shortName" : "", + "presentationName" : "", + "validFrom" : "2013-01-01", + "validTo" : null + }, { + "code" : "1144", + "parentCode" : null, + "level" : "1", + "name" : "Kvitsøy", + "shortName" : "", + "presentationName" : "", + "validFrom" : "2013-01-01", + "validTo" : null + }, { + "code" : "1145", + "parentCode" : null, + "level" : "1", + "name" : "Bokn", + "shortName" : "", + "presentationName" : "", + "validFrom" : "2013-01-01", + "validTo" : null + }, { + "code" : "1146", + "parentCode" : null, + "level" : "1", + "name" : "Tysvær", + "shortName" : "", + "presentationName" : "", + "validFrom" : "2013-01-01", + "validTo" : null + }, { + "code" : "1149", + "parentCode" : null, + "level" : "1", + "name" : "Karmøy", + "shortName" : "", + "presentationName" : "", + "validFrom" : "2013-01-01", + "validTo" : null + }, { + "code" : "1151", + "parentCode" : null, + "level" : "1", + "name" : "Utsira", + "shortName" : "", + "presentationName" : "", + "validFrom" : "2013-01-01", + "validTo" : null + }, { + "code" : "1160", + "parentCode" : null, + "level" : "1", + "name" : "Vindafjord", + "shortName" : "", + "presentationName" : "", + "validFrom" : "2013-01-01", + "validTo" : null + }, { + "code" : "1201", + "parentCode" : null, + "level" : "1", + "name" : "Bergen", + "shortName" : "", + "presentationName" : "", + "validFrom" : "2013-01-01", + "validTo" : null + }, { + "code" : "1211", + "parentCode" : null, + "level" : "1", + "name" : "Etne", + "shortName" : "", + "presentationName" : "", + "validFrom" : "2013-01-01", + "validTo" : null + }, { + "code" : "1216", + "parentCode" : null, + "level" : "1", + "name" : "Sveio", + "shortName" : "", + "presentationName" : "", + "validFrom" : "2013-01-01", + "validTo" : null + }, { + "code" : "1219", + "parentCode" : null, + "level" : "1", + "name" : "Bømlo", + "shortName" : "", + "presentationName" : "", + "validFrom" : "2013-01-01", + "validTo" : null + }, { + "code" : "1221", + "parentCode" : null, + "level" : "1", + "name" : "Stord", + "shortName" : "", + "presentationName" : "", + "validFrom" : "2013-01-01", + "validTo" : null + }, { + "code" : "1222", + "parentCode" : null, + "level" : "1", + "name" : "Fitjar", + "shortName" : "", + "presentationName" : "", + "validFrom" : "2013-01-01", + "validTo" : null + }, { + "code" : "1223", + "parentCode" : null, + "level" : "1", + "name" : "Tysnes", + "shortName" : "", + "presentationName" : "", + "validFrom" : "2013-01-01", + "validTo" : null + }, { + "code" : "1224", + "parentCode" : null, + "level" : "1", + "name" : "Kvinnherad", + "shortName" : "", + "presentationName" : "", + "validFrom" : "2013-01-01", + "validTo" : null + }, { + "code" : "1227", + "parentCode" : null, + "level" : "1", + "name" : "Jondal", + "shortName" : "", + "presentationName" : "", + "validFrom" : "2013-01-01", + "validTo" : null + }, { + "code" : "1228", + "parentCode" : null, + "level" : "1", + "name" : "Odda", + "shortName" : "", + "presentationName" : "", + "validFrom" : "2013-01-01", + "validTo" : null + }, { + "code" : "1231", + "parentCode" : null, + "level" : "1", + "name" : "Ullensvang", + "shortName" : "", + "presentationName" : "", + "validFrom" : "2013-01-01", + "validTo" : null + }, { + "code" : "1232", + "parentCode" : null, + "level" : "1", + "name" : "Eidfjord", + "shortName" : "", + "presentationName" : "", + "validFrom" : "2013-01-01", + "validTo" : null + }, { + "code" : "1233", + "parentCode" : null, + "level" : "1", + "name" : "Ulvik", + "shortName" : "", + "presentationName" : "", + "validFrom" : "2013-01-01", + "validTo" : null + }, { + "code" : "1234", + "parentCode" : null, + "level" : "1", + "name" : "Granvin", + "shortName" : "", + "presentationName" : "", + "validFrom" : "2013-01-01", + "validTo" : null + }, { + "code" : "1235", + "parentCode" : null, + "level" : "1", + "name" : "Voss", + "shortName" : "", + "presentationName" : "", + "validFrom" : "2013-01-01", + "validTo" : null + }, { + "code" : "1238", + "parentCode" : null, + "level" : "1", + "name" : "Kvam", + "shortName" : "", + "presentationName" : "", + "validFrom" : "2013-01-01", + "validTo" : null + }, { + "code" : "1241", + "parentCode" : null, + "level" : "1", + "name" : "Fusa", + "shortName" : "", + "presentationName" : "", + "validFrom" : "2013-01-01", + "validTo" : null + }, { + "code" : "1242", + "parentCode" : null, + "level" : "1", + "name" : "Samnanger", + "shortName" : "", + "presentationName" : "", + "validFrom" : "2013-01-01", + "validTo" : null + }, { + "code" : "1243", + "parentCode" : null, + "level" : "1", + "name" : "Os", + "shortName" : "", + "presentationName" : "", + "validFrom" : "2013-01-01", + "validTo" : null + }, { + "code" : "1244", + "parentCode" : null, + "level" : "1", + "name" : "Austevoll", + "shortName" : "", + "presentationName" : "", + "validFrom" : "2013-01-01", + "validTo" : null + }, { + "code" : "1245", + "parentCode" : null, + "level" : "1", + "name" : "Sund", + "shortName" : "", + "presentationName" : "", + "validFrom" : "2013-01-01", + "validTo" : null + }, { + "code" : "1246", + "parentCode" : null, + "level" : "1", + "name" : "Fjell", + "shortName" : "", + "presentationName" : "", + "validFrom" : "2013-01-01", + "validTo" : null + }, { + "code" : "1247", + "parentCode" : null, + "level" : "1", + "name" : "Askøy", + "shortName" : "", + "presentationName" : "", + "validFrom" : "2013-01-01", + "validTo" : null + }, { + "code" : "1251", + "parentCode" : null, + "level" : "1", + "name" : "Vaksdal", + "shortName" : "", + "presentationName" : "", + "validFrom" : "2013-01-01", + "validTo" : null + }, { + "code" : "1252", + "parentCode" : null, + "level" : "1", + "name" : "Modalen", + "shortName" : "", + "presentationName" : "", + "validFrom" : "2013-01-01", + "validTo" : null + }, { + "code" : "1253", + "parentCode" : null, + "level" : "1", + "name" : "Osterøy", + "shortName" : "", + "presentationName" : "", + "validFrom" : "2013-01-01", + "validTo" : null + }, { + "code" : "1256", + "parentCode" : null, + "level" : "1", + "name" : "Meland", + "shortName" : "", + "presentationName" : "", + "validFrom" : "2013-01-01", + "validTo" : null + }, { + "code" : "1259", + "parentCode" : null, + "level" : "1", + "name" : "Øygarden", + "shortName" : "", + "presentationName" : "", + "validFrom" : "2013-01-01", + "validTo" : null + }, { + "code" : "1260", + "parentCode" : null, + "level" : "1", + "name" : "Radøy", + "shortName" : "", + "presentationName" : "", + "validFrom" : "2013-01-01", + "validTo" : null + }, { + "code" : "1263", + "parentCode" : null, + "level" : "1", + "name" : "Lindås", + "shortName" : "", + "presentationName" : "", + "validFrom" : "2013-01-01", + "validTo" : null + }, { + "code" : "1264", + "parentCode" : null, + "level" : "1", + "name" : "Austrheim", + "shortName" : "", + "presentationName" : "", + "validFrom" : "2013-01-01", + "validTo" : null + }, { + "code" : "1265", + "parentCode" : null, + "level" : "1", + "name" : "Fedje", + "shortName" : "", + "presentationName" : "", + "validFrom" : "2013-01-01", + "validTo" : null + }, { + "code" : "1266", + "parentCode" : null, + "level" : "1", + "name" : "Masfjorden", + "shortName" : "", + "presentationName" : "", + "validFrom" : "2013-01-01", + "validTo" : null + }, { + "code" : "1401", + "parentCode" : null, + "level" : "1", + "name" : "Flora", + "shortName" : "", + "presentationName" : "", + "validFrom" : "2013-01-01", + "validTo" : null + }, { + "code" : "1411", + "parentCode" : null, + "level" : "1", + "name" : "Gulen", + "shortName" : "", + "presentationName" : "", + "validFrom" : "2013-01-01", + "validTo" : null + }, { + "code" : "1412", + "parentCode" : null, + "level" : "1", + "name" : "Solund", + "shortName" : "", + "presentationName" : "", + "validFrom" : "2013-01-01", + "validTo" : null + }, { + "code" : "1413", + "parentCode" : null, + "level" : "1", + "name" : "Hyllestad", + "shortName" : "", + "presentationName" : "", + "validFrom" : "2013-01-01", + "validTo" : null + }, { + "code" : "1416", + "parentCode" : null, + "level" : "1", + "name" : "Høyanger", + "shortName" : "", + "presentationName" : "", + "validFrom" : "2013-01-01", + "validTo" : null + }, { + "code" : "1417", + "parentCode" : null, + "level" : "1", + "name" : "Vik", + "shortName" : "", + "presentationName" : "", + "validFrom" : "2013-01-01", + "validTo" : null + }, { + "code" : "1418", + "parentCode" : null, + "level" : "1", + "name" : "Balestrand", + "shortName" : "", + "presentationName" : "", + "validFrom" : "2013-01-01", + "validTo" : null + }, { + "code" : "1419", + "parentCode" : null, + "level" : "1", + "name" : "Leikanger", + "shortName" : "", + "presentationName" : "", + "validFrom" : "2013-01-01", + "validTo" : null + }, { + "code" : "1420", + "parentCode" : null, + "level" : "1", + "name" : "Sogndal", + "shortName" : "", + "presentationName" : "", + "validFrom" : "2013-01-01", + "validTo" : null + }, { + "code" : "1421", + "parentCode" : null, + "level" : "1", + "name" : "Aurland", + "shortName" : "", + "presentationName" : "", + "validFrom" : "2013-01-01", + "validTo" : null + }, { + "code" : "1422", + "parentCode" : null, + "level" : "1", + "name" : "Lærdal", + "shortName" : "", + "presentationName" : "", + "validFrom" : "2013-01-01", + "validTo" : null + }, { + "code" : "1424", + "parentCode" : null, + "level" : "1", + "name" : "Årdal", + "shortName" : "", + "presentationName" : "", + "validFrom" : "2013-01-01", + "validTo" : null + }, { + "code" : "1426", + "parentCode" : null, + "level" : "1", + "name" : "Luster", + "shortName" : "", + "presentationName" : "", + "validFrom" : "2013-01-01", + "validTo" : null + }, { + "code" : "1428", + "parentCode" : null, + "level" : "1", + "name" : "Askvoll", + "shortName" : "", + "presentationName" : "", + "validFrom" : "2013-01-01", + "validTo" : null + }, { + "code" : "1429", + "parentCode" : null, + "level" : "1", + "name" : "Fjaler", + "shortName" : "", + "presentationName" : "", + "validFrom" : "2013-01-01", + "validTo" : null + }, { + "code" : "1430", + "parentCode" : null, + "level" : "1", + "name" : "Gaular", + "shortName" : "", + "presentationName" : "", + "validFrom" : "2013-01-01", + "validTo" : null + }, { + "code" : "1431", + "parentCode" : null, + "level" : "1", + "name" : "Jølster", + "shortName" : "", + "presentationName" : "", + "validFrom" : "2013-01-01", + "validTo" : null + }, { + "code" : "1432", + "parentCode" : null, + "level" : "1", + "name" : "Førde", + "shortName" : "", + "presentationName" : "", + "validFrom" : "2013-01-01", + "validTo" : null + }, { + "code" : "1433", + "parentCode" : null, + "level" : "1", + "name" : "Naustdal", + "shortName" : "", + "presentationName" : "", + "validFrom" : "2013-01-01", + "validTo" : null + }, { + "code" : "1438", + "parentCode" : null, + "level" : "1", + "name" : "Bremanger", + "shortName" : "", + "presentationName" : "", + "validFrom" : "2013-01-01", + "validTo" : null + }, { + "code" : "1439", + "parentCode" : null, + "level" : "1", + "name" : "Vågsøy", + "shortName" : "", + "presentationName" : "", + "validFrom" : "2013-01-01", + "validTo" : null + }, { + "code" : "1441", + "parentCode" : null, + "level" : "1", + "name" : "Selje", + "shortName" : "", + "presentationName" : "", + "validFrom" : "2013-01-01", + "validTo" : null + }, { + "code" : "1443", + "parentCode" : null, + "level" : "1", + "name" : "Eid", + "shortName" : "", + "presentationName" : "", + "validFrom" : "2013-01-01", + "validTo" : null + }, { + "code" : "1444", + "parentCode" : null, + "level" : "1", + "name" : "Hornindal", + "shortName" : "", + "presentationName" : "", + "validFrom" : "2013-01-01", + "validTo" : null + }, { + "code" : "1445", + "parentCode" : null, + "level" : "1", + "name" : "Gloppen", + "shortName" : "", + "presentationName" : "", + "validFrom" : "2013-01-01", + "validTo" : null + }, { + "code" : "1449", + "parentCode" : null, + "level" : "1", + "name" : "Stryn", + "shortName" : "", + "presentationName" : "", + "validFrom" : "2013-01-01", + "validTo" : null + }, { + "code" : "1502", + "parentCode" : null, + "level" : "1", + "name" : "Molde", + "shortName" : "", + "presentationName" : "", + "validFrom" : "2013-01-01", + "validTo" : null + }, { + "code" : "1504", + "parentCode" : null, + "level" : "1", + "name" : "Ålesund", + "shortName" : "", + "presentationName" : "", + "validFrom" : "2013-01-01", + "validTo" : null + }, { + "code" : "1505", + "parentCode" : null, + "level" : "1", + "name" : "Kristiansund", + "shortName" : "", + "presentationName" : "", + "validFrom" : "2013-01-01", + "validTo" : null + }, { + "code" : "1511", + "parentCode" : null, + "level" : "1", + "name" : "Vanylven", + "shortName" : "", + "presentationName" : "", + "validFrom" : "2013-01-01", + "validTo" : null + }, { + "code" : "1514", + "parentCode" : null, + "level" : "1", + "name" : "Sande", + "shortName" : "", + "presentationName" : "", + "validFrom" : "2013-01-01", + "validTo" : null + }, { + "code" : "1515", + "parentCode" : null, + "level" : "1", + "name" : "Herøy", + "shortName" : "", + "presentationName" : "", + "validFrom" : "2013-01-01", + "validTo" : null + }, { + "code" : "1516", + "parentCode" : null, + "level" : "1", + "name" : "Ulstein", + "shortName" : "", + "presentationName" : "", + "validFrom" : "2013-01-01", + "validTo" : null + }, { + "code" : "1517", + "parentCode" : null, + "level" : "1", + "name" : "Hareid", + "shortName" : "", + "presentationName" : "", + "validFrom" : "2013-01-01", + "validTo" : null + }, { + "code" : "1519", + "parentCode" : null, + "level" : "1", + "name" : "Volda", + "shortName" : "", + "presentationName" : "", + "validFrom" : "2013-01-01", + "validTo" : null + }, { + "code" : "1520", + "parentCode" : null, + "level" : "1", + "name" : "Ørsta", + "shortName" : "", + "presentationName" : "", + "validFrom" : "2013-01-01", + "validTo" : null + }, { + "code" : "1523", + "parentCode" : null, + "level" : "1", + "name" : "Ørskog", + "shortName" : "", + "presentationName" : "", + "validFrom" : "2013-01-01", + "validTo" : null + }, { + "code" : "1524", + "parentCode" : null, + "level" : "1", + "name" : "Norddal", + "shortName" : "", + "presentationName" : "", + "validFrom" : "2013-01-01", + "validTo" : null + }, { + "code" : "1525", + "parentCode" : null, + "level" : "1", + "name" : "Stranda", + "shortName" : "", + "presentationName" : "", + "validFrom" : "2013-01-01", + "validTo" : null + }, { + "code" : "1526", + "parentCode" : null, + "level" : "1", + "name" : "Stordal", + "shortName" : "", + "presentationName" : "", + "validFrom" : "2013-01-01", + "validTo" : null + }, { + "code" : "1528", + "parentCode" : null, + "level" : "1", + "name" : "Sykkylven", + "shortName" : "", + "presentationName" : "", + "validFrom" : "2013-01-01", + "validTo" : null + }, { + "code" : "1529", + "parentCode" : null, + "level" : "1", + "name" : "Skodje", + "shortName" : "", + "presentationName" : "", + "validFrom" : "2013-01-01", + "validTo" : null + }, { + "code" : "1531", + "parentCode" : null, + "level" : "1", + "name" : "Sula", + "shortName" : "", + "presentationName" : "", + "validFrom" : "2013-01-01", + "validTo" : null + }, { + "code" : "1532", + "parentCode" : null, + "level" : "1", + "name" : "Giske", + "shortName" : "", + "presentationName" : "", + "validFrom" : "2013-01-01", + "validTo" : null + }, { + "code" : "1534", + "parentCode" : null, + "level" : "1", + "name" : "Haram", + "shortName" : "", + "presentationName" : "", + "validFrom" : "2013-01-01", + "validTo" : null + }, { + "code" : "1535", + "parentCode" : null, + "level" : "1", + "name" : "Vestnes", + "shortName" : "", + "presentationName" : "", + "validFrom" : "2013-01-01", + "validTo" : null + }, { + "code" : "1539", + "parentCode" : null, + "level" : "1", + "name" : "Rauma", + "shortName" : "", + "presentationName" : "", + "validFrom" : "2013-01-01", + "validTo" : null + }, { + "code" : "1543", + "parentCode" : null, + "level" : "1", + "name" : "Nesset", + "shortName" : "", + "presentationName" : "", + "validFrom" : "2013-01-01", + "validTo" : null + }, { + "code" : "1545", + "parentCode" : null, + "level" : "1", + "name" : "Midsund", + "shortName" : "", + "presentationName" : "", + "validFrom" : "2013-01-01", + "validTo" : null + }, { + "code" : "1546", + "parentCode" : null, + "level" : "1", + "name" : "Sandøy", + "shortName" : "", + "presentationName" : "", + "validFrom" : "2013-01-01", + "validTo" : null + }, { + "code" : "1547", + "parentCode" : null, + "level" : "1", + "name" : "Aukra", + "shortName" : "", + "presentationName" : "", + "validFrom" : "2013-01-01", + "validTo" : null + }, { + "code" : "1548", + "parentCode" : null, + "level" : "1", + "name" : "Fræna", + "shortName" : "", + "presentationName" : "", + "validFrom" : "2013-01-01", + "validTo" : null + }, { + "code" : "1551", + "parentCode" : null, + "level" : "1", + "name" : "Eide", + "shortName" : "", + "presentationName" : "", + "validFrom" : "2013-01-01", + "validTo" : null + }, { + "code" : "1554", + "parentCode" : null, + "level" : "1", + "name" : "Averøy", + "shortName" : "", + "presentationName" : "", + "validFrom" : "2013-01-01", + "validTo" : null + }, { + "code" : "1557", + "parentCode" : null, + "level" : "1", + "name" : "Gjemnes", + "shortName" : "", + "presentationName" : "", + "validFrom" : "2013-01-01", + "validTo" : null + }, { + "code" : "1560", + "parentCode" : null, + "level" : "1", + "name" : "Tingvoll", + "shortName" : "", + "presentationName" : "", + "validFrom" : "2013-01-01", + "validTo" : null + }, { + "code" : "1563", + "parentCode" : null, + "level" : "1", + "name" : "Sunndal", + "shortName" : "", + "presentationName" : "", + "validFrom" : "2013-01-01", + "validTo" : null + }, { + "code" : "1566", + "parentCode" : null, + "level" : "1", + "name" : "Surnadal", + "shortName" : "", + "presentationName" : "", + "validFrom" : "2013-01-01", + "validTo" : null + }, { + "code" : "1567", + "parentCode" : null, + "level" : "1", + "name" : "Rindal", + "shortName" : "", + "presentationName" : "", + "validFrom" : "2013-01-01", + "validTo" : null + }, { + "code" : "1571", + "parentCode" : null, + "level" : "1", + "name" : "Halsa", + "shortName" : "", + "presentationName" : "", + "validFrom" : "2013-01-01", + "validTo" : null + }, { + "code" : "1573", + "parentCode" : null, + "level" : "1", + "name" : "Smøla", + "shortName" : "", + "presentationName" : "", + "validFrom" : "2013-01-01", + "validTo" : null + }, { + "code" : "1576", + "parentCode" : null, + "level" : "1", + "name" : "Aure", + "shortName" : "", + "presentationName" : "", + "validFrom" : "2013-01-01", + "validTo" : null + }, { + "code" : "1601", + "parentCode" : null, + "level" : "1", + "name" : "Trondheim", + "shortName" : "", + "presentationName" : "", + "validFrom" : "2013-01-01", + "validTo" : null + }, { + "code" : "1612", + "parentCode" : null, + "level" : "1", + "name" : "Hemne", + "shortName" : "", + "presentationName" : "", + "validFrom" : "2013-01-01", + "validTo" : null + }, { + "code" : "1613", + "parentCode" : null, + "level" : "1", + "name" : "Snillfjord", + "shortName" : "", + "presentationName" : "", + "validFrom" : "2013-01-01", + "validTo" : null + }, { + "code" : "1617", + "parentCode" : null, + "level" : "1", + "name" : "Hitra", + "shortName" : "", + "presentationName" : "", + "validFrom" : "2013-01-01", + "validTo" : null + }, { + "code" : "1620", + "parentCode" : null, + "level" : "1", + "name" : "Frøya", + "shortName" : "", + "presentationName" : "", + "validFrom" : "2013-01-01", + "validTo" : null + }, { + "code" : "1621", + "parentCode" : null, + "level" : "1", + "name" : "Ørland", + "shortName" : "", + "presentationName" : "", + "validFrom" : "2013-01-01", + "validTo" : null + }, { + "code" : "1622", + "parentCode" : null, + "level" : "1", + "name" : "Agdenes", + "shortName" : "", + "presentationName" : "", + "validFrom" : "2013-01-01", + "validTo" : null + }, { + "code" : "1624", + "parentCode" : null, + "level" : "1", + "name" : "Rissa", + "shortName" : "", + "presentationName" : "", + "validFrom" : "2013-01-01", + "validTo" : null + }, { + "code" : "1627", + "parentCode" : null, + "level" : "1", + "name" : "Bjugn", + "shortName" : "", + "presentationName" : "", + "validFrom" : "2013-01-01", + "validTo" : null + }, { + "code" : "1630", + "parentCode" : null, + "level" : "1", + "name" : "Åfjord", + "shortName" : "", + "presentationName" : "", + "validFrom" : "2013-01-01", + "validTo" : null + }, { + "code" : "1632", + "parentCode" : null, + "level" : "1", + "name" : "Roan", + "shortName" : "", + "presentationName" : "", + "validFrom" : "2013-01-01", + "validTo" : null + }, { + "code" : "1633", + "parentCode" : null, + "level" : "1", + "name" : "Osen", + "shortName" : "", + "presentationName" : "", + "validFrom" : "2013-01-01", + "validTo" : null + }, { + "code" : "1634", + "parentCode" : null, + "level" : "1", + "name" : "Oppdal", + "shortName" : "", + "presentationName" : "", + "validFrom" : "2013-01-01", + "validTo" : null + }, { + "code" : "1635", + "parentCode" : null, + "level" : "1", + "name" : "Rennebu", + "shortName" : "", + "presentationName" : "", + "validFrom" : "2013-01-01", + "validTo" : null + }, { + "code" : "1636", + "parentCode" : null, + "level" : "1", + "name" : "Meldal", + "shortName" : "", + "presentationName" : "", + "validFrom" : "2013-01-01", + "validTo" : null + }, { + "code" : "1638", + "parentCode" : null, + "level" : "1", + "name" : "Orkdal", + "shortName" : "", + "presentationName" : "", + "validFrom" : "2013-01-01", + "validTo" : null + }, { + "code" : "1640", + "parentCode" : null, + "level" : "1", + "name" : "Røros", + "shortName" : "", + "presentationName" : "", + "validFrom" : "2013-01-01", + "validTo" : null + }, { + "code" : "1644", + "parentCode" : null, + "level" : "1", + "name" : "Holtålen", + "shortName" : "", + "presentationName" : "", + "validFrom" : "2013-01-01", + "validTo" : null + }, { + "code" : "1648", + "parentCode" : null, + "level" : "1", + "name" : "Midtre Gauldal", + "shortName" : "", + "presentationName" : "", + "validFrom" : "2013-01-01", + "validTo" : null + }, { + "code" : "1653", + "parentCode" : null, + "level" : "1", + "name" : "Melhus", + "shortName" : "", + "presentationName" : "", + "validFrom" : "2013-01-01", + "validTo" : null + }, { + "code" : "1657", + "parentCode" : null, + "level" : "1", + "name" : "Skaun", + "shortName" : "", + "presentationName" : "", + "validFrom" : "2013-01-01", + "validTo" : null + }, { + "code" : "1662", + "parentCode" : null, + "level" : "1", + "name" : "Klæbu", + "shortName" : "", + "presentationName" : "", + "validFrom" : "2013-01-01", + "validTo" : null + }, { + "code" : "1663", + "parentCode" : null, + "level" : "1", + "name" : "Malvik", + "shortName" : "", + "presentationName" : "", + "validFrom" : "2013-01-01", + "validTo" : null + }, { + "code" : "1664", + "parentCode" : null, + "level" : "1", + "name" : "Selbu", + "shortName" : "", + "presentationName" : "", + "validFrom" : "2013-01-01", + "validTo" : null + }, { + "code" : "1665", + "parentCode" : null, + "level" : "1", + "name" : "Tydal", + "shortName" : "", + "presentationName" : "", + "validFrom" : "2013-01-01", + "validTo" : null + }, { + "code" : "1702", + "parentCode" : null, + "level" : "1", + "name" : "Steinkjer", + "shortName" : "", + "presentationName" : "", + "validFrom" : "2013-01-01", + "validTo" : null + }, { + "code" : "1703", + "parentCode" : null, + "level" : "1", + "name" : "Namsos", + "shortName" : "", + "presentationName" : "", + "validFrom" : "2013-01-01", + "validTo" : null + }, { + "code" : "1711", + "parentCode" : null, + "level" : "1", + "name" : "Meråker", + "shortName" : "", + "presentationName" : "", + "validFrom" : "2013-01-01", + "validTo" : null + }, { + "code" : "1714", + "parentCode" : null, + "level" : "1", + "name" : "Stjørdal", + "shortName" : "", + "presentationName" : "", + "validFrom" : "2013-01-01", + "validTo" : null + }, { + "code" : "1717", + "parentCode" : null, + "level" : "1", + "name" : "Frosta", + "shortName" : "", + "presentationName" : "", + "validFrom" : "2013-01-01", + "validTo" : null + }, { + "code" : "1718", + "parentCode" : null, + "level" : "1", + "name" : "Leksvik", + "shortName" : "", + "presentationName" : "", + "validFrom" : "2013-01-01", + "validTo" : null + }, { + "code" : "1719", + "parentCode" : null, + "level" : "1", + "name" : "Levanger", + "shortName" : "", + "presentationName" : "", + "validFrom" : "2013-01-01", + "validTo" : null + }, { + "code" : "1721", + "parentCode" : null, + "level" : "1", + "name" : "Verdal", + "shortName" : "", + "presentationName" : "", + "validFrom" : "2013-01-01", + "validTo" : null + }, { + "code" : "1724", + "parentCode" : null, + "level" : "1", + "name" : "Verran", + "shortName" : "", + "presentationName" : "", + "validFrom" : "2013-01-01", + "validTo" : null + }, { + "code" : "1725", + "parentCode" : null, + "level" : "1", + "name" : "Namdalseid", + "shortName" : "", + "presentationName" : "", + "validFrom" : "2013-01-01", + "validTo" : null + }, { + "code" : "1736", + "parentCode" : null, + "level" : "1", + "name" : "Snåase - Snåsa", + "shortName" : "", + "presentationName" : "", + "validFrom" : "2014-01-01", + "validTo" : null + }, { + "code" : "1736", + "parentCode" : null, + "level" : "1", + "name" : "Snåase Snåsa", + "shortName" : "", + "presentationName" : "", + "validFrom" : "2013-01-01", + "validTo" : "2014-01-01" + }, { + "code" : "1738", + "parentCode" : null, + "level" : "1", + "name" : "Lierne", + "shortName" : "", + "presentationName" : "", + "validFrom" : "2013-01-01", + "validTo" : null + }, { + "code" : "1739", + "parentCode" : null, + "level" : "1", + "name" : "Røyrvik", + "shortName" : "", + "presentationName" : "", + "validFrom" : "2013-01-01", + "validTo" : "2014-01-01" + }, { + "code" : "1739", + "parentCode" : null, + "level" : "1", + "name" : "Raarvihke - Røyrvik", + "shortName" : "", + "presentationName" : "", + "validFrom" : "2014-01-01", + "validTo" : null + }, { + "code" : "1740", + "parentCode" : null, + "level" : "1", + "name" : "Namsskogan", + "shortName" : "", + "presentationName" : "", + "validFrom" : "2013-01-01", + "validTo" : null + }, { + "code" : "1742", + "parentCode" : null, + "level" : "1", + "name" : "Grong", + "shortName" : "", + "presentationName" : "", + "validFrom" : "2013-01-01", + "validTo" : null + }, { + "code" : "1743", + "parentCode" : null, + "level" : "1", + "name" : "Høylandet", + "shortName" : "", + "presentationName" : "", + "validFrom" : "2013-01-01", + "validTo" : null + }, { + "code" : "1744", + "parentCode" : null, + "level" : "1", + "name" : "Overhalla", + "shortName" : "", + "presentationName" : "", + "validFrom" : "2013-01-01", + "validTo" : null + }, { + "code" : "1748", + "parentCode" : null, + "level" : "1", + "name" : "Fosnes", + "shortName" : "", + "presentationName" : "", + "validFrom" : "2013-01-01", + "validTo" : null + }, { + "code" : "1749", + "parentCode" : null, + "level" : "1", + "name" : "Flatanger", + "shortName" : "", + "presentationName" : "", + "validFrom" : "2013-01-01", + "validTo" : null + }, { + "code" : "1750", + "parentCode" : null, + "level" : "1", + "name" : "Vikna", + "shortName" : "", + "presentationName" : "", + "validFrom" : "2013-01-01", + "validTo" : null + }, { + "code" : "1751", + "parentCode" : null, + "level" : "1", + "name" : "Nærøy", + "shortName" : "", + "presentationName" : "", + "validFrom" : "2013-01-01", + "validTo" : null + }, { + "code" : "1755", + "parentCode" : null, + "level" : "1", + "name" : "Leka", + "shortName" : "", + "presentationName" : "", + "validFrom" : "2013-01-01", + "validTo" : null + }, { + "code" : "1756", + "parentCode" : null, + "level" : "1", + "name" : "Inderøy", + "shortName" : "", + "presentationName" : "", + "validFrom" : "2013-01-01", + "validTo" : null + }, { + "code" : "1804", + "parentCode" : null, + "level" : "1", + "name" : "Bodø", + "shortName" : "", + "presentationName" : "", + "validFrom" : "2013-01-01", + "validTo" : null + }, { + "code" : "1805", + "parentCode" : null, + "level" : "1", + "name" : "Narvik", + "shortName" : "", + "presentationName" : "", + "validFrom" : "2013-01-01", + "validTo" : null + }, { + "code" : "1811", + "parentCode" : null, + "level" : "1", + "name" : "Bindal", + "shortName" : "", + "presentationName" : "", + "validFrom" : "2013-01-01", + "validTo" : null + }, { + "code" : "1812", + "parentCode" : null, + "level" : "1", + "name" : "Sømna", + "shortName" : "", + "presentationName" : "", + "validFrom" : "2013-01-01", + "validTo" : null + }, { + "code" : "1813", + "parentCode" : null, + "level" : "1", + "name" : "Brønnøy", + "shortName" : "", + "presentationName" : "", + "validFrom" : "2013-01-01", + "validTo" : null + }, { + "code" : "1815", + "parentCode" : null, + "level" : "1", + "name" : "Vega", + "shortName" : "", + "presentationName" : "", + "validFrom" : "2013-01-01", + "validTo" : null + }, { + "code" : "1816", + "parentCode" : null, + "level" : "1", + "name" : "Vevelstad", + "shortName" : "", + "presentationName" : "", + "validFrom" : "2013-01-01", + "validTo" : null + }, { + "code" : "1818", + "parentCode" : null, + "level" : "1", + "name" : "Herøy", + "shortName" : "", + "presentationName" : "", + "validFrom" : "2013-01-01", + "validTo" : null + }, { + "code" : "1820", + "parentCode" : null, + "level" : "1", + "name" : "Alstahaug", + "shortName" : "", + "presentationName" : "", + "validFrom" : "2013-01-01", + "validTo" : null + }, { + "code" : "1822", + "parentCode" : null, + "level" : "1", + "name" : "Leirfjord", + "shortName" : "", + "presentationName" : "", + "validFrom" : "2013-01-01", + "validTo" : null + }, { + "code" : "1824", + "parentCode" : null, + "level" : "1", + "name" : "Vefsn", + "shortName" : "", + "presentationName" : "", + "validFrom" : "2013-01-01", + "validTo" : null + }, { + "code" : "1825", + "parentCode" : null, + "level" : "1", + "name" : "Grane", + "shortName" : "", + "presentationName" : "", + "validFrom" : "2013-01-01", + "validTo" : null + }, { + "code" : "1826", + "parentCode" : null, + "level" : "1", + "name" : "Hattfjelldal", + "shortName" : "", + "presentationName" : "", + "validFrom" : "2013-01-01", + "validTo" : null + }, { + "code" : "1827", + "parentCode" : null, + "level" : "1", + "name" : "Dønna", + "shortName" : "", + "presentationName" : "", + "validFrom" : "2013-01-01", + "validTo" : null + }, { + "code" : "1828", + "parentCode" : null, + "level" : "1", + "name" : "Nesna", + "shortName" : "", + "presentationName" : "", + "validFrom" : "2013-01-01", + "validTo" : null + }, { + "code" : "1832", + "parentCode" : null, + "level" : "1", + "name" : "Hemnes", + "shortName" : "", + "presentationName" : "", + "validFrom" : "2013-01-01", + "validTo" : null + }, { + "code" : "1833", + "parentCode" : null, + "level" : "1", + "name" : "Rana", + "shortName" : "", + "presentationName" : "", + "validFrom" : "2013-01-01", + "validTo" : null + }, { + "code" : "1834", + "parentCode" : null, + "level" : "1", + "name" : "Lurøy", + "shortName" : "", + "presentationName" : "", + "validFrom" : "2013-01-01", + "validTo" : null + }, { + "code" : "1835", + "parentCode" : null, + "level" : "1", + "name" : "Træna", + "shortName" : "", + "presentationName" : "", + "validFrom" : "2013-01-01", + "validTo" : null + }, { + "code" : "1836", + "parentCode" : null, + "level" : "1", + "name" : "Rødøy", + "shortName" : "", + "presentationName" : "", + "validFrom" : "2013-01-01", + "validTo" : null + }, { + "code" : "1837", + "parentCode" : null, + "level" : "1", + "name" : "Meløy", + "shortName" : "", + "presentationName" : "", + "validFrom" : "2013-01-01", + "validTo" : null + }, { + "code" : "1838", + "parentCode" : null, + "level" : "1", + "name" : "Gildeskål", + "shortName" : "", + "presentationName" : "", + "validFrom" : "2013-01-01", + "validTo" : null + }, { + "code" : "1839", + "parentCode" : null, + "level" : "1", + "name" : "Beiarn", + "shortName" : "", + "presentationName" : "", + "validFrom" : "2013-01-01", + "validTo" : null + }, { + "code" : "1840", + "parentCode" : null, + "level" : "1", + "name" : "Saltdal", + "shortName" : "", + "presentationName" : "", + "validFrom" : "2013-01-01", + "validTo" : null + }, { + "code" : "1841", + "parentCode" : null, + "level" : "1", + "name" : "Fauske - Fuossko", + "shortName" : "", + "presentationName" : "", + "validFrom" : "2017-01-01", + "validTo" : null + }, { + "code" : "1841", + "parentCode" : null, + "level" : "1", + "name" : "Fauske", + "shortName" : "", + "presentationName" : "", + "validFrom" : "2013-01-01", + "validTo" : "2017-01-01" + }, { + "code" : "1845", + "parentCode" : null, + "level" : "1", + "name" : "Sørfold", + "shortName" : "", + "presentationName" : "", + "validFrom" : "2013-01-01", + "validTo" : null + }, { + "code" : "1848", + "parentCode" : null, + "level" : "1", + "name" : "Steigen", + "shortName" : "", + "presentationName" : "", + "validFrom" : "2013-01-01", + "validTo" : null + }, { + "code" : "1849", + "parentCode" : null, + "level" : "1", + "name" : "Hábmer Hamarøy", + "shortName" : "", + "presentationName" : "", + "validFrom" : "2013-01-01", + "validTo" : "2014-01-01" + }, { + "code" : "1849", + "parentCode" : null, + "level" : "1", + "name" : "Hamarøy - Hábmer", + "shortName" : "", + "presentationName" : "", + "validFrom" : "2014-01-01", + "validTo" : null + }, { + "code" : "1850", + "parentCode" : null, + "level" : "1", + "name" : "Divtasvuodna - Tysfjord", + "shortName" : "", + "presentationName" : "", + "validFrom" : "2014-01-01", + "validTo" : null + }, { + "code" : "1850", + "parentCode" : null, + "level" : "1", + "name" : "Divtasvuodna Tysfjord", + "shortName" : "", + "presentationName" : "", + "validFrom" : "2013-01-01", + "validTo" : "2014-01-01" + }, { + "code" : "1851", + "parentCode" : null, + "level" : "1", + "name" : "Lødingen", + "shortName" : "", + "presentationName" : "", + "validFrom" : "2013-01-01", + "validTo" : null + }, { + "code" : "1852", + "parentCode" : null, + "level" : "1", + "name" : "Tjeldsund", + "shortName" : "", + "presentationName" : "", + "validFrom" : "2013-01-01", + "validTo" : null + }, { + "code" : "1853", + "parentCode" : null, + "level" : "1", + "name" : "Evenes", + "shortName" : "", + "presentationName" : "", + "validFrom" : "2013-01-01", + "validTo" : null + }, { + "code" : "1854", + "parentCode" : null, + "level" : "1", + "name" : "Ballangen", + "shortName" : "", + "presentationName" : "", + "validFrom" : "2013-01-01", + "validTo" : null + }, { + "code" : "1856", + "parentCode" : null, + "level" : "1", + "name" : "Røst", + "shortName" : "", + "presentationName" : "", + "validFrom" : "2013-01-01", + "validTo" : null + }, { + "code" : "1857", + "parentCode" : null, + "level" : "1", + "name" : "Værøy", + "shortName" : "", + "presentationName" : "", + "validFrom" : "2013-01-01", + "validTo" : null + }, { + "code" : "1859", + "parentCode" : null, + "level" : "1", + "name" : "Flakstad", + "shortName" : "", + "presentationName" : "", + "validFrom" : "2013-01-01", + "validTo" : null + }, { + "code" : "1860", + "parentCode" : null, + "level" : "1", + "name" : "Vestvågøy", + "shortName" : "", + "presentationName" : "", + "validFrom" : "2013-01-01", + "validTo" : null + }, { + "code" : "1865", + "parentCode" : null, + "level" : "1", + "name" : "Vågan", + "shortName" : "", + "presentationName" : "", + "validFrom" : "2013-01-01", + "validTo" : null + }, { + "code" : "1866", + "parentCode" : null, + "level" : "1", + "name" : "Hadsel", + "shortName" : "", + "presentationName" : "", + "validFrom" : "2013-01-01", + "validTo" : null + }, { + "code" : "1867", + "parentCode" : null, + "level" : "1", + "name" : "Bø", + "shortName" : "", + "presentationName" : "", + "validFrom" : "2013-01-01", + "validTo" : null + }, { + "code" : "1868", + "parentCode" : null, + "level" : "1", + "name" : "Øksnes", + "shortName" : "", + "presentationName" : "", + "validFrom" : "2013-01-01", + "validTo" : null + }, { + "code" : "1870", + "parentCode" : null, + "level" : "1", + "name" : "Sortland", + "shortName" : "", + "presentationName" : "", + "validFrom" : "2013-01-01", + "validTo" : null + }, { + "code" : "1871", + "parentCode" : null, + "level" : "1", + "name" : "Andøy", + "shortName" : "", + "presentationName" : "", + "validFrom" : "2013-01-01", + "validTo" : null + }, { + "code" : "1874", + "parentCode" : null, + "level" : "1", + "name" : "Moskenes", + "shortName" : "", + "presentationName" : "", + "validFrom" : "2013-01-01", + "validTo" : null + }, { + "code" : "1902", + "parentCode" : null, + "level" : "1", + "name" : "Tromsø", + "shortName" : "", + "presentationName" : "", + "validFrom" : "2013-01-01", + "validTo" : null + }, { + "code" : "1903", + "parentCode" : null, + "level" : "1", + "name" : "Harstad", + "shortName" : "", + "presentationName" : "", + "validFrom" : "2013-01-01", + "validTo" : null + }, { + "code" : "1911", + "parentCode" : null, + "level" : "1", + "name" : "Kvæfjord", + "shortName" : "", + "presentationName" : "", + "validFrom" : "2013-01-01", + "validTo" : null + }, { + "code" : "1913", + "parentCode" : null, + "level" : "1", + "name" : "Skånland", + "shortName" : "", + "presentationName" : "", + "validFrom" : "2013-01-01", + "validTo" : null + }, { + "code" : "1917", + "parentCode" : null, + "level" : "1", + "name" : "Ibestad", + "shortName" : "", + "presentationName" : "", + "validFrom" : "2013-01-01", + "validTo" : null + }, { + "code" : "1919", + "parentCode" : null, + "level" : "1", + "name" : "Gratangen", + "shortName" : "", + "presentationName" : "", + "validFrom" : "2013-01-01", + "validTo" : null + }, { + "code" : "1920", + "parentCode" : null, + "level" : "1", + "name" : "Loabák - Lavangen", + "shortName" : "", + "presentationName" : "", + "validFrom" : "2014-01-01", + "validTo" : null + }, { + "code" : "1920", + "parentCode" : null, + "level" : "1", + "name" : "Lavangen", + "shortName" : "", + "presentationName" : "", + "validFrom" : "2013-01-01", + "validTo" : "2014-01-01" + }, { + "code" : "1922", + "parentCode" : null, + "level" : "1", + "name" : "Bardu", + "shortName" : "", + "presentationName" : "", + "validFrom" : "2013-01-01", + "validTo" : null + }, { + "code" : "1923", + "parentCode" : null, + "level" : "1", + "name" : "Salangen", + "shortName" : "", + "presentationName" : "", + "validFrom" : "2013-01-01", + "validTo" : null + }, { + "code" : "1924", + "parentCode" : null, + "level" : "1", + "name" : "Målselv", + "shortName" : "", + "presentationName" : "", + "validFrom" : "2013-01-01", + "validTo" : null + }, { + "code" : "1925", + "parentCode" : null, + "level" : "1", + "name" : "Sørreisa", + "shortName" : "", + "presentationName" : "", + "validFrom" : "2013-01-01", + "validTo" : null + }, { + "code" : "1926", + "parentCode" : null, + "level" : "1", + "name" : "Dyrøy", + "shortName" : "", + "presentationName" : "", + "validFrom" : "2013-01-01", + "validTo" : null + }, { + "code" : "1927", + "parentCode" : null, + "level" : "1", + "name" : "Tranøy", + "shortName" : "", + "presentationName" : "", + "validFrom" : "2013-01-01", + "validTo" : null + }, { + "code" : "1928", + "parentCode" : null, + "level" : "1", + "name" : "Torsken", + "shortName" : "", + "presentationName" : "", + "validFrom" : "2013-01-01", + "validTo" : null + }, { + "code" : "1929", + "parentCode" : null, + "level" : "1", + "name" : "Berg", + "shortName" : "", + "presentationName" : "", + "validFrom" : "2013-01-01", + "validTo" : null + }, { + "code" : "1931", + "parentCode" : null, + "level" : "1", + "name" : "Lenvik", + "shortName" : "", + "presentationName" : "", + "validFrom" : "2013-01-01", + "validTo" : null + }, { + "code" : "1933", + "parentCode" : null, + "level" : "1", + "name" : "Balsfjord", + "shortName" : "", + "presentationName" : "", + "validFrom" : "2013-01-01", + "validTo" : null + }, { + "code" : "1936", + "parentCode" : null, + "level" : "1", + "name" : "Karlsøy", + "shortName" : "", + "presentationName" : "", + "validFrom" : "2013-01-01", + "validTo" : null + }, { + "code" : "1938", + "parentCode" : null, + "level" : "1", + "name" : "Lyngen", + "shortName" : "", + "presentationName" : "", + "validFrom" : "2013-01-01", + "validTo" : null + }, { + "code" : "1939", + "parentCode" : null, + "level" : "1", + "name" : "Storfjord", + "shortName" : "", + "presentationName" : "", + "validFrom" : "2013-01-01", + "validTo" : "2014-01-01" + }, { + "code" : "1939", + "parentCode" : null, + "level" : "1", + "name" : "Storfjord - Omasvuotna - Omasvuono", + "shortName" : "", + "presentationName" : "", + "validFrom" : "2014-01-01", + "validTo" : null + }, { + "code" : "1940", + "parentCode" : null, + "level" : "1", + "name" : "Gáivuotna - Kåfjord - Kaivuono", + "shortName" : "", + "presentationName" : "", + "validFrom" : "2017-01-01", + "validTo" : null + }, { + "code" : "1940", + "parentCode" : null, + "level" : "1", + "name" : "Gáivuotna - Kåfjord", + "shortName" : "", + "presentationName" : "", + "validFrom" : "2014-01-01", + "validTo" : "2017-01-01" + }, { + "code" : "1940", + "parentCode" : null, + "level" : "1", + "name" : "Gáivuotna Kåfjord", + "shortName" : "", + "presentationName" : "", + "validFrom" : "2013-01-01", + "validTo" : "2014-01-01" + }, { + "code" : "1941", + "parentCode" : null, + "level" : "1", + "name" : "Skjervøy", + "shortName" : "", + "presentationName" : "", + "validFrom" : "2013-01-01", + "validTo" : null + }, { + "code" : "1942", + "parentCode" : null, + "level" : "1", + "name" : "Nordreisa", + "shortName" : "", + "presentationName" : "", + "validFrom" : "2013-01-01", + "validTo" : null + }, { + "code" : "1943", + "parentCode" : null, + "level" : "1", + "name" : "Kvænangen", + "shortName" : "", + "presentationName" : "", + "validFrom" : "2013-01-01", + "validTo" : null + }, { + "code" : "2002", + "parentCode" : null, + "level" : "1", + "name" : "Vardø", + "shortName" : "", + "presentationName" : "", + "validFrom" : "2013-01-01", + "validTo" : null + }, { + "code" : "2003", + "parentCode" : null, + "level" : "1", + "name" : "Vadsø", + "shortName" : "", + "presentationName" : "", + "validFrom" : "2013-01-01", + "validTo" : null + }, { + "code" : "2004", + "parentCode" : null, + "level" : "1", + "name" : "Hammerfest", + "shortName" : "", + "presentationName" : "", + "validFrom" : "2013-01-01", + "validTo" : null + }, { + "code" : "2011", + "parentCode" : null, + "level" : "1", + "name" : "Guovdageaidnu - Kautokeino", + "shortName" : "", + "presentationName" : "", + "validFrom" : "2014-01-01", + "validTo" : null + }, { + "code" : "2011", + "parentCode" : null, + "level" : "1", + "name" : "Guovdageaidnu Kautokeino", + "shortName" : "", + "presentationName" : "", + "validFrom" : "2013-01-01", + "validTo" : "2014-01-01" + }, { + "code" : "2012", + "parentCode" : null, + "level" : "1", + "name" : "Alta", + "shortName" : "", + "presentationName" : "", + "validFrom" : "2013-01-01", + "validTo" : null + }, { + "code" : "2014", + "parentCode" : null, + "level" : "1", + "name" : "Loppa", + "shortName" : "", + "presentationName" : "", + "validFrom" : "2013-01-01", + "validTo" : null + }, { + "code" : "2015", + "parentCode" : null, + "level" : "1", + "name" : "Hasvik", + "shortName" : "", + "presentationName" : "", + "validFrom" : "2013-01-01", + "validTo" : null + }, { + "code" : "2017", + "parentCode" : null, + "level" : "1", + "name" : "Kvalsund", + "shortName" : "", + "presentationName" : "", + "validFrom" : "2013-01-01", + "validTo" : null + }, { + "code" : "2018", + "parentCode" : null, + "level" : "1", + "name" : "Måsøy", + "shortName" : "", + "presentationName" : "", + "validFrom" : "2013-01-01", + "validTo" : null + }, { + "code" : "2019", + "parentCode" : null, + "level" : "1", + "name" : "Nordkapp", + "shortName" : "", + "presentationName" : "", + "validFrom" : "2013-01-01", + "validTo" : null + }, { + "code" : "2020", + "parentCode" : null, + "level" : "1", + "name" : "Porsanger - Porsángu - Porsanki", + "shortName" : "", + "presentationName" : "", + "validFrom" : "2014-01-01", + "validTo" : null + }, { + "code" : "2020", + "parentCode" : null, + "level" : "1", + "name" : "Porsanger Porsángu Porsanki", + "shortName" : "", + "presentationName" : "", + "validFrom" : "2013-01-01", + "validTo" : "2014-01-01" + }, { + "code" : "2021", + "parentCode" : null, + "level" : "1", + "name" : "Kárásjohka - Karasjok", + "shortName" : "", + "presentationName" : "", + "validFrom" : "2014-01-01", + "validTo" : null + }, { + "code" : "2021", + "parentCode" : null, + "level" : "1", + "name" : "Kárásjohka Karasjok", + "shortName" : "", + "presentationName" : "", + "validFrom" : "2013-01-01", + "validTo" : "2014-01-01" + }, { + "code" : "2022", + "parentCode" : null, + "level" : "1", + "name" : "Lebesby", + "shortName" : "", + "presentationName" : "", + "validFrom" : "2013-01-01", + "validTo" : null + }, { + "code" : "2023", + "parentCode" : null, + "level" : "1", + "name" : "Gamvik", + "shortName" : "", + "presentationName" : "", + "validFrom" : "2013-01-01", + "validTo" : null + }, { + "code" : "2024", + "parentCode" : null, + "level" : "1", + "name" : "Berlevåg", + "shortName" : "", + "presentationName" : "", + "validFrom" : "2013-01-01", + "validTo" : null + }, { + "code" : "2025", + "parentCode" : null, + "level" : "1", + "name" : "Deatnu Tana", + "shortName" : "", + "presentationName" : "", + "validFrom" : "2013-01-01", + "validTo" : null + }, { + "code" : "2027", + "parentCode" : null, + "level" : "1", + "name" : "Unjárga Nesseby", + "shortName" : "", + "presentationName" : "", + "validFrom" : "2013-01-01", + "validTo" : "2014-01-01" + }, { + "code" : "2027", + "parentCode" : null, + "level" : "1", + "name" : "Unjárga - Nesseby", + "shortName" : "", + "presentationName" : "", + "validFrom" : "2014-01-01", + "validTo" : null + }, { + "code" : "2028", + "parentCode" : null, + "level" : "1", + "name" : "Båtsfjord", + "shortName" : "", + "presentationName" : "", + "validFrom" : "2013-01-01", + "validTo" : null + }, { + "code" : "2030", + "parentCode" : null, + "level" : "1", + "name" : "Sør-Varanger", + "shortName" : "", + "presentationName" : "", + "validFrom" : "2013-01-01", + "validTo" : null + }, { + "code" : "9999", + "parentCode" : null, + "level" : "1", + "name" : "Uoppgitt", + "shortName" : "", + "presentationName" : "", + "validFrom" : "2013-01-01", + "validTo" : null + } ] +} \ No newline at end of file diff --git a/java-vtl-tools/src/main/java/no/ssb/vtl/tools/termd/TtyConsole.java b/java-vtl-tools/src/main/java/no/ssb/vtl/tools/termd/TtyConsole.java index e41d81b3..b35e17f4 100644 --- a/java-vtl-tools/src/main/java/no/ssb/vtl/tools/termd/TtyConsole.java +++ b/java-vtl-tools/src/main/java/no/ssb/vtl/tools/termd/TtyConsole.java @@ -7,14 +7,19 @@ import io.termd.core.readline.Readline; import io.termd.core.tty.TtyConnection; import io.termd.core.util.Helper; +import no.ssb.vtl.connectors.SsbApiConnector; +import no.ssb.vtl.connectors.SsbKlassApiConnector; import no.ssb.vtl.model.Component; import no.ssb.vtl.model.DataStructure; import no.ssb.vtl.model.Dataset; import no.ssb.vtl.parser.VTLLexer; import no.ssb.vtl.parser.VTLParser; import no.ssb.vtl.script.VTLScriptEngine; -import no.ssb.vtl.connectors.SsbApiConnector; -import org.antlr.v4.runtime.*; +import org.antlr.v4.runtime.ANTLRInputStream; +import org.antlr.v4.runtime.CommonTokenStream; +import org.antlr.v4.runtime.LexerNoViableAltException; +import org.antlr.v4.runtime.RecognitionException; +import org.antlr.v4.runtime.Token; import org.antlr.v4.runtime.tree.ParseTree; import javax.script.Bindings; @@ -30,7 +35,9 @@ import java.util.function.Consumer; import java.util.stream.Collectors; -import static java.lang.String.format; +import static java.lang.String.*; + +import java.lang.String; /** * A termd interpreter. @@ -83,8 +90,9 @@ public void apply(Readline.Interaction interaction) { // ScriptEngineManager manager = new ScriptEngineManager(); // engine = checkNotNull(manager.getEngineByName("VTLJava")); - engine = new VTLScriptEngine(new SsbApiConnector(new ObjectMapper())); - + engine = new VTLScriptEngine( + new SsbKlassApiConnector(new ObjectMapper()), + new SsbApiConnector(new ObjectMapper())); read(ttyConnection, readline); } diff --git a/java-vtl-tools/src/main/java/no/ssb/vtl/tools/webconsole/Application.java b/java-vtl-tools/src/main/java/no/ssb/vtl/tools/webconsole/Application.java index 7adb8af2..09387ad2 100644 --- a/java-vtl-tools/src/main/java/no/ssb/vtl/tools/webconsole/Application.java +++ b/java-vtl-tools/src/main/java/no/ssb/vtl/tools/webconsole/Application.java @@ -4,6 +4,7 @@ import com.google.common.collect.Lists; import no.ssb.vtl.connector.Connector; import no.ssb.vtl.connectors.SsbApiConnector; +import no.ssb.vtl.connectors.SsbKlassApiConnector; import no.ssb.vtl.script.VTLScriptEngine; import org.springframework.boot.SpringApplication; import org.springframework.boot.autoconfigure.SpringBootApplication; @@ -29,6 +30,7 @@ public static void main(String[] args) { @Bean List getConnectors(ObjectMapper mapper) { return Lists.newArrayList( + new SsbKlassApiConnector(mapper), new SsbApiConnector(mapper) ); }