Skip to content

restructuring DALI to a multi module maven project #1

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 7 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
12 changes: 12 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
#IDEA project files
*.iml
*.ipr
*.iws

#Logfiles
*.log*

#build files
similarity/target/
optimization/target/
webservice/target/
1 change: 1 addition & 0 deletions html/js/main.js
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ requirejs.config({
});

require(['jquery', 'bootstrap', 'dot', 'spinner'], function(_$, _bootstrap, doT, $) {
//var queryEndpoint = "http://localhost:5555/getdatasets",
var queryEndpoint = "http://139.18.2.164:5555/getdatasets",
// cache dom pointers
$goBtn = $("#goBtn"),
Expand Down
95 changes: 0 additions & 95 deletions java/pom.xml

This file was deleted.

37 changes: 0 additions & 37 deletions java/src/main/java/aksw/org/doodle/similarity/QGrams.java

This file was deleted.

Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
5 changes: 0 additions & 5 deletions java/target/maven-archiver/pom.properties

This file was deleted.

Binary file removed java/target/test-classes/aksw/org/dali/AppTest.class
Binary file not shown.
129 changes: 129 additions & 0 deletions optimization/extensions/pom.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,129 @@
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>

<properties>
<groovy.version>2.1.5</groovy.version>
</properties>

<artifactId>dali-opt-extensions</artifactId>
<packaging>jar</packaging>

<parent>
<groupId>aksw.org</groupId>
<artifactId>dali</artifactId>
<version>1.0-SNAPSHOT</version>
<relativePath>../..</relativePath>
</parent>

<name>Dali-Optimization (extensions)</name>
<url>http://maven.apache.org</url>

<dependencies>
<dependency>
<groupId>aksw.org</groupId>
<artifactId>dali-sim</artifactId>
</dependency>
<!-- groovy will be added to the final jar artifact to shade the ASM 4 library (it is conflicting with
ASM 3 dependency of com.sun.jersey:jersey-server:1.16 -->
<dependency>
<groupId>org.codehaus.groovy</groupId>
<artifactId>groovy</artifactId>
<optional>true</optional>
</dependency>
<!-- a groovy dependency that doesn't have to be shaded -> so carry it on for dep. resolution -->
<dependency>
<groupId>antlr</groupId>
<artifactId>antlr</artifactId>
</dependency>
<dependency>
<groupId>com.google.guava</groupId>
<artifactId>guava</artifactId>
</dependency>
<dependency>
<groupId>org.codehaus.gpars</groupId>
<artifactId>gpars</artifactId>
</dependency>
<dependency>
<groupId>org.neodatis.odb</groupId>
<artifactId>neodatis-odb</artifactId>
</dependency>
<dependency>
<groupId>org.codehaus.groovy</groupId>
<artifactId>groovy-test</artifactId>
<scope>test</scope>
<optional>true</optional>
</dependency>
<dependency>
<groupId>junit</groupId>
<artifactId>junit</artifactId>
<scope>test</scope>
</dependency>
</dependencies>

<build>
<plugins>
<plugin>
<artifactId>maven-compiler-plugin</artifactId>
<version>3.1</version>
<configuration>
<compilerId>groovy-eclipse-compiler</compilerId>
</configuration>
<dependencies>
<dependency>
<groupId>org.codehaus.groovy</groupId>
<artifactId>groovy-eclipse-compiler</artifactId>
<version>2.8.0-01</version>
</dependency>
<dependency>
<groupId>org.codehaus.groovy</groupId>
<artifactId>groovy-eclipse-batch</artifactId>
<version>2.1.5-03</version>
</dependency>
</dependencies>
</plugin>
<plugin>
<groupId>org.codehaus.groovy</groupId>
<artifactId>groovy-eclipse-compiler</artifactId>
<version>2.8.0-01</version>
<extensions>true</extensions> <!-- ensures compilation of src/*/groovy -->
</plugin>
<!--
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-shade-plugin</artifactId>
<version>2.1</version>
<executions>
<execution>
<phase>package</phase>
<goals>
<goal>shade</goal>
</goals>
<configuration>
<artifactSet>
<includes>
<include>org.codehaus.groovy:*</include>
<inclue>org.ow2.asm:*</inclue>
</includes>
<excludes>
<exclude>antlr:antlr</exclude>
</excludes>
</artifactSet>
<relocations>
<relocation>
<pattern>org.objectweb.asm</pattern>
<shadedPattern>org.objectweb.asm4.shaded</shadedPattern>
</relocation>
</relocations>
<minimizeJar>true</minimizeJar>
<dependencyReducedPomLocation>
${project.build.directory}/dependency-reduced-pom.xml
</dependencyReducedPomLocation>
</configuration>
</execution>
</executions>
</plugin>
-->
</plugins>
</build>
</project>
Original file line number Diff line number Diff line change
@@ -0,0 +1,70 @@
package extensions

import groovy.transform.TypeChecked
import org.w3c.dom.Element

@TypeChecked
class Extensions {

static <K, V> V getWithDefault(Map<K, V> self, K key, Closure<V> defaultProvider) {
def value = self.get(key)

if (value == null && !(key in self)) {
if (defaultProvider.maximumNumberOfParameters > 1)
throw new IllegalArgumentException()
if (defaultProvider.maximumNumberOfParameters == 1 && K.class.isCase(defaultProvider.parameterTypes[0])) {
value = defaultProvider.call(key)
} else {
value = defaultProvider.call()
}
self.put(key, value)
}
return value
}

static <K,V> HashMap<K,V> filterByKeys(Map<K, V> self, Collection<K> keys) {
def ret = new HashMap<K,V>(keys.size())
self.entrySet().each { Map.Entry<K,V> e ->
if(e.key in keys) ret.put(e.key, e.value)
}
return ret
}

static <K,V,T> HashMap<K,T> convertValues(Map<K, V> self, Closure<T> converter) {
def ret = new HashMap<K,T>(self.size())
self.entrySet().each { Map.Entry<K,V> e ->
ret.put(e.key, (T) converter.call(e.value))
}
return ret
}

static Map<String,String> getAttributeMap(Element self) {
def attr = self.attributes
def ret = new HashMap<String,String>()
for(i in 0..<attr.length) {
def a = attr.item(i)
ret.put(a.nodeName, a.nodeValue)
}
(Map<String,String>) ret
}

/*static ImmutableList<String> tokenize(String self, String delim) {
def tokenizer = new StringTokenizer(self, delim)
def tokens = new LinkedList<String>()
while(tokenizer.hasMoreTokens()) tokens.add(tokenizer.nextToken())
return ImmutableList.copyOf(tokens)
}*/

// compilation fails: unable to resolve class T
/*static <T> Iterable<T> makeIterable(Iterator<T> self) {
final Iterator<T> selfVar = self

return new Iterable<T>() {

@Override
Iterator<T> iterator() {
return selfVar
}
}
}*/
}
Loading