Skip to content

Commit

Permalink
NVDB-2660 featuretype.sensitiv
Browse files Browse the repository at this point in the history
  • Loading branch information
computerlove committed Feb 26, 2019
1 parent 0bdcb59 commit 23cbd8b
Show file tree
Hide file tree
Showing 4 changed files with 14 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,8 @@ public static FeatureType parse(Map<String, DataType> dataTypes, JsonObject obj)
parseBooleanMember(obj, "må_ha_mor"),
parseBooleanMember(obj, "er_dataserie"),
parseBooleanMember(obj, "konnekteringslenke_ok"),
parseStringMember(obj, "tilleggsinformasjon"));
parseStringMember(obj, "tilleggsinformasjon"),
parseBooleanMember(obj, "sensitiv"));
}

public static FeatureTypeCategory parseCategory(JsonObject obj) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,7 @@ public final class FeatureType implements Serializable {
private final boolean measureSet;
private final boolean connectingLinkOk;
private final String additionalInformasion;
private final boolean sensitive;

public FeatureType(Integer id,
String name,
Expand All @@ -76,7 +77,8 @@ public FeatureType(Integer id,
boolean needParent,
boolean measureSet,
boolean connectingLinkOk,
String additionalInformasion) {
String additionalInformasion,
boolean sensitive) {
this.id = id;
this.name = name;
this.shortname = shortname;
Expand All @@ -99,6 +101,7 @@ public FeatureType(Integer id,
this.measureSet = measureSet;
this.connectingLinkOk = connectingLinkOk;
this.additionalInformasion = additionalInformasion;
this.sensitive = sensitive;
}

public Integer getId() {
Expand Down Expand Up @@ -177,6 +180,10 @@ public Stream<AssociationType> associationTypes() {
return Stream.concat(children.stream(), parents.stream());
}

public boolean isSensitive() {
return sensitive;
}

/**
* Convenience method for retriving a specific attribute type
*
Expand Down
3 changes: 2 additions & 1 deletion src/test/resources/jsonresponse/vegobjekttyper/105.json
Original file line number Diff line number Diff line change
Expand Up @@ -398,5 +398,6 @@
}
}
]
}
},
"sensitiv": false
}
3 changes: 2 additions & 1 deletion src/test/resources/jsonresponse/vegobjekttyper/95.json
Original file line number Diff line number Diff line change
Expand Up @@ -2194,5 +2194,6 @@
}
}
]
}
},
"sensitiv": false
}

0 comments on commit 23cbd8b

Please sign in to comment.