Skip to content

Commit

Permalink
Stardog 3.0 support
Browse files Browse the repository at this point in the history
  • Loading branch information
AlBaker committed Mar 31, 2015
1 parent b5bf6a5 commit d88b931
Show file tree
Hide file tree
Showing 4 changed files with 27 additions and 42 deletions.
25 changes: 7 additions & 18 deletions stardog-spring-batch/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -6,13 +6,10 @@ apply plugin:"signing"
apply from:'https://raw.github.com/breskeby/gradleplugins/master/emmaPlugin/emma.gradle'

group = 'com.complexible.stardog'
version = '2.2.4'

// Used for testing with the embedded server
def stardogLocation= "/Users/albaker/tools/stardog/stardog-2.2.4/server"
System.setProperty('STARDOG_HOME', "/Users/albaker/opt/stardog-224")
version = '3.0.0'

repositories {
maven { url "http://maven.stardog.com" }
mavenLocal()
mavenCentral()

Expand All @@ -36,21 +33,13 @@ dependencies {
compile ('org.springframework:spring-tx:4.1.2.RELEASE')
compile ('org.slf4j:slf4j-api:1.6.1')

compile ('com.complexible.stardog.protocols.snarl:client:2.2.4')
compile ('com.complexible.stardog:common-rdf:2.2.4')
compile ('com.complexible.stardog:openrdf-utils:2.2.4')
compile ('com.complexible.stardog:shared:2.2.4')
compile ('org.openrdf.sesame:sesame:2.7.14')
compile ('com.complexible.stardog:api:2.2.4')

compile ('com.complexible.stardog:stardog-spring:2.2.4')

compile ('org.springframework.batch:spring-batch-core:2.2.6.RELEASE')
compile ('org.springframework.batch:spring-batch-infrastructure:2.2.6.RELEASE')

// gremlin in stardog/lib comes with groovy, we don't want to pick that up for gradle
// remove springframework
testCompile fileTree(dir: stardogLocation, include: '**/*.jar', exclude:"**/spring*.jar")

compile ('com.complexible.stardog:client-http:3.0')
compile ('com.complexible.stardog:client-snarl:3.0')
compile ('com.complexible.stardog:stardog-spring:3.0.0')
testCompile ('com.complexible.stardog:server:3.0')

testCompile group: 'junit', name: 'junit', version: '4.8.2'
testCompile group: 'org.springframework', name:'spring-test', version:'3.0.5.RELEASE'
Expand Down
26 changes: 11 additions & 15 deletions stardog-spring/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -6,14 +6,11 @@ apply plugin:"signing"
apply from:'https://raw.github.com/breskeby/gradleplugins/master/emmaPlugin/emma.gradle'

group = 'com.complexible.stardog'
version = '2.2.4'

// Used for testing with the embedded server
def stardogLocation= "/Users/albaker/tools/stardog/stardog-2.2.4/server"
System.setProperty('STARDOG_HOME', "/Users/albaker/opt/stardog-224")
version = '3.0.0'

repositories {
mavenLocal()
maven { url "http://maven.stardog.com" }
mavenLocal()
mavenCentral()
mavenRepo urls:"http://repository.springsource.com/maven/bundles/release"
mavenRepo urls:"http://repository.springsource.com/maven/bundles/external"
Expand All @@ -35,18 +32,17 @@ dependencies {
compile ('org.springframework:spring-tx:4.1.2.RELEASE')
compile ('org.slf4j:slf4j-api:1.6.1')

compile ('com.complexible.stardog.protocols.snarl:client:2.2.4')
//compile ('com.complexible.stardog:common-rdf:2.2.4')
compile ('com.complexible.stardog:openrdf-utils:2.2.4')
compile ('com.complexible.stardog:shared:2.2.4')
compile ('com.complexible.stardog:client-http:3.0')
compile ('com.complexible.stardog:client-snarl:3.0')
testCompile ('com.complexible.stardog:server:3.0')

/*
compile ('org.openrdf.sesame:sesame:2.7.14') {
exclude group:'org.slf4j'
}
compile ('com.complexible.stardog:api:2.2.4')
*/

// gremlin in stardog/lib comes with groovy, we don't want to pick that up for gradle
// remove springframework
testCompile fileTree(dir: stardogLocation, include: '**/*.jar', exclude:"**/spring*.jar")
//testCompile fileTree(dir: stardogLocation, include: '**/*.jar', exclude:"**/spring*.jar")

testCompile group: 'junit', name: 'junit', version: '4.8.2'
testCompile group: 'org.springframework', name:'spring-test', version:'3.0.5.RELEASE'
Expand Down Expand Up @@ -125,7 +121,7 @@ uploadArchives {
// Used for "gradle install"
configure(install.repositories.mavenInstaller) {
pom.project {
version '2.2.4'
version '3.0.0'
artifactId 'stardog-spring'
groupId 'com.complexible.stardog'
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ public class DataSourceFactoryBean implements FactoryBean<DataSource>, Initializ

private String password;

private ReasoningType reasoningType;
private boolean reasoningType = false;

private String to;

Expand Down Expand Up @@ -168,9 +168,9 @@ public void afterPropertiesSet() throws Exception {
connectionConfig = connectionConfig.with((new OptionParser()).getOptions(aOptionsList));
}

if (reasoningType != null) {
connectionConfig = connectionConfig.reasoning(reasoningType);
}

connectionConfig = connectionConfig.reasoning(reasoningType);


connectionConfig = connectionConfig.credentials(username, password);

Expand Down Expand Up @@ -208,14 +208,14 @@ public void setUrl(String url) {
/**
* @return the reasoningType
*/
public ReasoningType getReasoningType() {
public boolean getReasoningType() {
return reasoningType;
}

/**
* @param reasoningType the reasoningType to set
*/
public void setReasoningType(ReasoningType reasoningType) {
public void setReasoningType(boolean reasoningType) {
this.reasoningType = reasoningType;
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,6 @@
import com.complexible.stardog.api.Adder;
import com.complexible.stardog.api.Connection;
import com.complexible.stardog.api.Remover;
import com.complexible.stardog.reasoning.api.ReasoningType;
import com.complexible.stardog.ext.spring.mapper.SimpleRowMapper;
import com.complexible.stardog.ext.spring.mapper.SingleMapper;

Expand Down Expand Up @@ -97,6 +96,7 @@ public void cleanUpStreams() {
public void setUp() throws Exception {
System.setOut(new PrintStream(outContent));
System.setErr(new PrintStream(errContent));
assertNotNull(dataSource);
SnarlTemplate tmp = new SnarlTemplate();
tmp.setDataSource(dataSource);
DataImporter importer = new DataImporter();
Expand Down Expand Up @@ -691,7 +691,7 @@ public void testLifecycle() {
dfb.setPassword("test");
dfb.setUsername("test");
dfb.setUrl("http://test.com");
dfb.setReasoningType(ReasoningType.NONE);
dfb.setReasoningType(false);
dfb.setTo("testdb");

dfb.getUsername();
Expand All @@ -706,7 +706,7 @@ public void testLifecycle() {
dfb.getPassword();
dfb.getUsername();
dfb.getUrl();
assertEquals(dfb.getReasoningType(), ReasoningType.NONE);
assertEquals(dfb.getReasoningType(), false);
dfb.getTo();
dfb.getUsername();

Expand Down

0 comments on commit d88b931

Please sign in to comment.