Skip to content
This repository has been archived by the owner on Nov 3, 2022. It is now read-only.

Commit

Permalink
[#76] removed graphstream, jgrapht, sqlite from cqengine
Browse files Browse the repository at this point in the history
  • Loading branch information
bonndan committed Jan 8, 2020
1 parent f52f96a commit 06ddc85
Show file tree
Hide file tree
Showing 12 changed files with 12 additions and 650 deletions.
36 changes: 6 additions & 30 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -50,19 +50,6 @@
<version>2.3.0</version>
</dependency>

<!-- graphing, deprecated -->
<dependency>
<groupId>org.jgrapht</groupId>
<artifactId>jgrapht-io</artifactId>
<version>1.1.0</version>
<exclusions>
<exclusion><!-- conflicts with cqengine -->
<groupId>org.antlr</groupId>
<artifactId>antlr4-runtime</artifactId>
</exclusion>
</exclusions>
</dependency>

<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-test</artifactId>
Expand Down Expand Up @@ -128,23 +115,6 @@
<artifactId>spring-boot-starter-mail</artifactId>
</dependency>

<dependency>
<groupId>org.graphstream</groupId>
<artifactId>gs-core</artifactId>
<version>1.3</version>
</dependency>
<dependency>
<groupId>org.graphstream</groupId>
<artifactId>gs-ui</artifactId>
<version>1.3</version>
</dependency>

<dependency>
<groupId>org.asciidoctor</groupId>
<artifactId>asciidoctorj</artifactId>
<version>1.5.8</version>
</dependency>

<dependency>
<groupId>com.github.jgraph</groupId>
<artifactId>jgraphx</artifactId>
Expand Down Expand Up @@ -179,6 +149,12 @@
<groupId>com.googlecode.cqengine</groupId>
<artifactId>cqengine</artifactId>
<version>3.4.0</version>
<exclusions>
<exclusion>
<groupId>org.xerial</groupId>
<artifactId>sqlite-jdbc</artifactId>
</exclusion>
</exclusions>
</dependency>

<!-- hateoas -->
Expand Down
7 changes: 3 additions & 4 deletions src/main/java/de/bonndan/nivio/output/Color.java
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
package de.bonndan.nivio.output;

import com.lowagie.text.html.WebColors;
import de.bonndan.nivio.model.Group;
import de.bonndan.nivio.model.GroupItem;
import de.bonndan.nivio.model.Item;
Expand Down Expand Up @@ -38,10 +37,10 @@ public static String nameToRGB(String name, String defaultColor) {

public static String lighten(String color) {
try {
java.awt.Color col = WebColors.getRGBColor("#" + color).brighter();
return Integer.toHexString(col.getRGB());
java.awt.Color col = java.awt.Color.decode(color.startsWith("#") ? color : "#" + color);
return Integer.toHexString(col.brighter().getRGB());
} catch (IllegalArgumentException ex) {
LOGGER.error(color + " --> "+ ex.getMessage());
LOGGER.error(color + " --> " + ex.getMessage());
return color;
}
}
Expand Down
34 changes: 0 additions & 34 deletions src/main/java/de/bonndan/nivio/output/docs/DocsController.java
Original file line number Diff line number Diff line change
Expand Up @@ -4,12 +4,7 @@
import de.bonndan.nivio.model.LandscapeImpl;
import de.bonndan.nivio.model.LandscapeRepository;
import de.bonndan.nivio.output.IconService;
import org.asciidoctor.Asciidoctor;

import static org.asciidoctor.Asciidoctor.Factory.create;

import org.asciidoctor.Attributes;
import org.asciidoctor.OptionsBuilder;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.http.HttpHeaders;
import org.springframework.http.HttpStatus;
Expand All @@ -35,35 +30,6 @@ public DocsController(LandscapeRepository landscapeRepository, IconService iconS
this.iconService = iconService;
}

@RequestMapping(method = RequestMethod.GET, path = "/{landscape}")
public ResponseEntity<String> docResource(@PathVariable(name = "landscape") final String landscapeIdentifier) {

LandscapeImpl landscape = landscapeRepository.findDistinctByIdentifier(landscapeIdentifier).orElseThrow(
() -> new NotFoundException("Landscape " + landscapeIdentifier + " not found")
);

Map<String, Object> attributes = new HashMap<String, Object>();
//attributes.put(Attributes.LINK_CSS, true);
attributes.put(Attributes.COPY_CSS, true);
attributes.put(Attributes.STYLESHEET_NAME, "http://themes.asciidoctor.org/stylesheets/github.css");
Map<String, Object> options = OptionsBuilder.options()
.headerFooter(true)
.attributes(attributes)
.asMap();

AsciiDocGenerator generator = new AsciiDocGenerator();
Asciidoctor asciidoctor = create();
HttpHeaders headers = new HttpHeaders();
headers.add(HttpHeaders.CONTENT_TYPE, "text/html");
return new ResponseEntity<>(
asciidoctor.convert(generator.toDocument(landscape), options),
//generator.toDocument(landscape),
headers,
HttpStatus.OK
);

}

@RequestMapping(method = RequestMethod.GET, path = "/{landscape}/report.html")
public ResponseEntity<String> htmlResource(@PathVariable(name = "landscape") final String landscapeIdentifier) {

Expand Down

This file was deleted.

Loading

0 comments on commit 06ddc85

Please sign in to comment.