This repository has been archived by the owner on Mar 7, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* feat: zoom buttons styled + knowledgegraph set right * feat: slider + buttons styled + global header + right fonts used + margins added * feat: wrong placed scoped placed on a styling block * feat: init of modals and checkboxtiles * feat: z-stack bug fixed + checkboxtile finished * Feat: Add membercounter (#19) Co-authored-by: WouterLefever <wouter.lefever@hotmail.com> * fix: removal of member on map resolved + addition of styling of MemberCounter * Feat: Add linechart * Feat: minor * feat: polygon styling * feat: legend styled * feat: minor update IngestedMemberDto * feat: Add collection as field * feat: add collection to member * feat: add collection to in rectangle * feat: fix tests * WIP * WIP * WIP * custom code * fix: set broken test to disabled * custom code * custom code * feat: markers styled with flanders icon + icon grows when clicked * fix: broken tests repaired * WIP: added logic to the checkbox tiles * feat: layers are added/removed based on checkbox state * chore: update page title and favicon * WIP: custom icon for clusters * feat: cluster icons customized * feat: zoom buttons styled + knowledgegraph set right * temp * feat: unsubscribe websocket client on different ldes * feat: add multiple stream logic for updates * feat: add multiple stream logic for updates * feat: first attempt to dockerize * feat: fixes for dockerizing --------- Co-authored-by: Wouter Lefever <wouter.lefever@cegeka.com> Co-authored-by: WouterLefever <wouter.lefever@hotmail.com> Co-authored-by: pj-cegeka <pieterjan.livens@cegeka.com> Co-authored-by: Jan Robert <jan.robert@cegeka.com>
- Loading branch information
1 parent
8a8d990
commit 0d94d74
Showing
105 changed files
with
2,457 additions
and
338 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
16 changes: 16 additions & 0 deletions
16
...rmatievlaanderen/vsds/demonstrator/member/application/exceptions/MembertypeException.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
package be.informatievlaanderen.vsds.demonstrator.member.application.exceptions; | ||
|
||
public class MembertypeException extends RuntimeException{ | ||
private final String membertype; | ||
private final String member; | ||
|
||
public MembertypeException(String membertype, String member) { | ||
this.membertype = membertype; | ||
this.member = member; | ||
} | ||
|
||
@Override | ||
public String getMessage() { | ||
return "Member " + member + " was not of expected type " + membertype; | ||
} | ||
} |
14 changes: 14 additions & 0 deletions
14
...laanderen/vsds/demonstrator/member/application/exceptions/MissingCollectionException.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
package be.informatievlaanderen.vsds.demonstrator.member.application.exceptions; | ||
|
||
public class MissingCollectionException extends RuntimeException{ | ||
private final String collectionName; | ||
|
||
public MissingCollectionException(String collectionName) { | ||
this.collectionName = collectionName; | ||
} | ||
|
||
@Override | ||
public String getMessage() { | ||
return "Eventstream with name " + collectionName + " could not be found."; | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
7 changes: 7 additions & 0 deletions
7
...e/informatievlaanderen/vsds/demonstrator/member/application/services/MemberValidator.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
package be.informatievlaanderen.vsds.demonstrator.member.application.services; | ||
|
||
import org.apache.jena.rdf.model.Model; | ||
|
||
public interface MemberValidator { | ||
void validate(Model member, String collectionName); | ||
} |
37 changes: 37 additions & 0 deletions
37
...formatievlaanderen/vsds/demonstrator/member/application/services/MemberValidatorImpl.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,37 @@ | ||
package be.informatievlaanderen.vsds.demonstrator.member.application.services; | ||
|
||
import be.informatievlaanderen.vsds.demonstrator.member.application.config.EventStreamConfig; | ||
import be.informatievlaanderen.vsds.demonstrator.member.application.config.StreamsConfig; | ||
import be.informatievlaanderen.vsds.demonstrator.member.application.exceptions.MembertypeException; | ||
import be.informatievlaanderen.vsds.demonstrator.member.application.exceptions.MissingCollectionException; | ||
import org.apache.jena.rdf.model.Model; | ||
import org.springframework.stereotype.Service; | ||
|
||
import java.util.Objects; | ||
import java.util.Optional; | ||
|
||
@Service | ||
public class MemberValidatorImpl implements MemberValidator { | ||
|
||
private final StreamsConfig streams; | ||
|
||
public MemberValidatorImpl(StreamsConfig streams) { | ||
this.streams = streams; | ||
} | ||
|
||
@Override | ||
public void validate(Model member, String collectionName) { | ||
Optional<EventStreamConfig> streamConfig = streams.getStreams().stream().filter(streams -> Objects.equals(streams.getName(), collectionName)).findFirst(); | ||
if(streamConfig.isEmpty()) { | ||
throw new MissingCollectionException(collectionName); | ||
} else if (!testMembertype(member, streamConfig.get().getMemberType())) { | ||
throw new MembertypeException("todo", streamConfig.get().getMemberType()); | ||
} | ||
|
||
} | ||
|
||
private boolean testMembertype(Model member, String memberType) { | ||
//TODO | ||
return true; | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
54 changes: 54 additions & 0 deletions
54
...main/java/be/informatievlaanderen/vsds/demonstrator/member/custom/MeetPuntRepository.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,54 @@ | ||
package be.informatievlaanderen.vsds.demonstrator.member.custom; | ||
|
||
import be.informatievlaanderen.vsds.demonstrator.member.application.valueobjects.IngestedMemberDto; | ||
import jakarta.annotation.PostConstruct; | ||
import org.apache.jena.datatypes.TypeMapper; | ||
import org.apache.jena.rdf.model.Model; | ||
import org.apache.jena.rdf.model.Statement; | ||
import org.jsoup.Jsoup; | ||
import org.jsoup.nodes.Document; | ||
import org.jsoup.nodes.Element; | ||
import org.jsoup.parser.Parser; | ||
import org.springframework.stereotype.Component; | ||
import org.springframework.web.bind.annotation.*; | ||
import org.springframework.web.reactive.function.client.ExchangeStrategies; | ||
import org.springframework.web.reactive.function.client.WebClient; | ||
import reactor.core.publisher.Mono; | ||
|
||
import java.util.HashMap; | ||
import java.util.List; | ||
import java.util.Map; | ||
|
||
import static org.apache.jena.rdf.model.ResourceFactory.*; | ||
|
||
@Component | ||
public class MeetPuntRepository { | ||
|
||
private final Map<String, Statement> meetpuntLocaties; | ||
|
||
public MeetPuntRepository() { | ||
this.meetpuntLocaties = new HashMap<>(); | ||
} | ||
|
||
@PostConstruct | ||
private void initializeMeetpunten() { | ||
final int size = 16 * 1024 * 1024; | ||
final ExchangeStrategies strategies = ExchangeStrategies.builder() | ||
.codecs(codecs -> codecs.defaultCodecs().maxInMemorySize(size)) | ||
.build(); | ||
String content = WebClient.builder().exchangeStrategies(strategies).baseUrl("http://miv.opendata.belfla.be/miv/configuratie/xml").build().get().retrieve() | ||
.bodyToMono(String.class).block(); | ||
Document doc = Jsoup.parse(content, "", Parser.xmlParser()); | ||
for (Element e : doc.select("meetpunt")) { | ||
String meetpuntId = e.attr("unieke_id"); | ||
String wkt = "POINT (" + e.select("lengtegraad_EPSG_4326").get(0).text().replace(",", ".") + " " + e.select("breedtegraad_EPSG_4326").get(0).text().replace(",", ".") + ")"; | ||
|
||
meetpuntLocaties.put(meetpuntId, createStatement(createResource("http://custom"), createProperty("http://www.opengis.net/ont/geosparql#asWKT"), createTypedLiteral(wkt, TypeMapper.getInstance().getTypeByName("http://www.opengis.net/ont/geosparql#wktLiteral")))); | ||
} | ||
} | ||
|
||
|
||
public List<Statement> get(String s) { | ||
return List.of(meetpuntLocaties.get(s)); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.