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
package org.test.quartz.jobs; | |
import org.springframework.batch.core.JobParameters; | |
import org.springframework.batch.core.JobParametersBuilder; | |
import org.springframework.batch.core.launch.JobLauncher; | |
class DailyBatch { | |
static triggers = { | |
simple name:'simpleTrigger', startDelay:90000, repeatInterval: 600000 |
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
package testjena; | |
import static org.junit.Assert.*; | |
import org.junit.Test | |
import org.junit.Before; | |
import com.hp.hpl.jena.query.ResultSetFormatter; | |
import com.hp.hpl.jena.query.Query; |
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
package mypackage; | |
import java.text.SimpleDateFormat; | |
import java.util.Calendar; | |
import java.util.Date; | |
import org.springframework.stereotype.Controller; | |
import org.springframework.beans.propertyeditors.CustomDateEditor; | |
import org.springframework.web.bind.WebDataBinder; | |
import org.springframework.web.bind.annotation.InitBinder; |
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
@Grab('com.hp.hpl.jena:jena:2.6.4') | |
@Grab('com.hp.hpl.jena:arq:2.8.8') | |
import groovy.sparql.Sparql | |
// Can also take a Jena model as an argument | |
def sparql = new Sparql("http://dbpedia.org/sparql") | |
def query = """ | |
SELECT ?abstract |
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
configure(install.repositories.mavenInstaller) { | |
pom.project { | |
version '1.0' | |
artifactId 'your.artifact.id' | |
groupId 'your.group.id' | |
} | |
} |
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
package com.example; | |
import org.springframework.data.rdf.sparql.*; | |
import org.springframework.data.rdf.jena.*; | |
import org.junit.Before; | |
import org.junit.Test; | |
public class TestSpringJena { | |
private Model model; |
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
<?xml version="1.0"?> | |
<ivysettings> | |
<settings defaultResolver="downloadGrapes"/> | |
<resolvers> | |
<chain name="downloadGrapes"> | |
<!-- todo add 'endorsed groovy extensions' resolver here --> | |
<ibiblio name="local" root="file:${user.home}/.m2/repository/" m2compatible="true"/> | |
<filesystem name="cachedGrapes"> | |
<ivy pattern="${user.home}/.groovy/grapes/[organisation]/[module]/ivy-[revision].xml"/> | |
<artifact pattern="${user.home}/.groovy/grapes/[organisation]/[module]/[type]s/[artifact]-[revision].[ext]"/> |
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
@Grab('org.codehaus.groovy.sparql:groovy-sparql:0.1') | |
import groovy.sparql.* | |
def sparql = new Sparql("http://dbpedia.org/sparql") | |
def query = """ | |
PREFIX owl: <http://www.w3.org/2002/07/owl#> | |
SELECT distinct ?c ?p WHERE { ?c a owl:Class } LIMIT 10 | |
""" |
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
@Grab('org.codehaus.groovy.sparql:groovy-sparql:0.2') | |
import groovy.sparql.* | |
/** | |
Can be constructed with: | |
- Outputstream | |
- PrintWriter | |
- Model (all statements built will be copied into the input model | |
via model.add(List<Statement>) |
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
<plugin> | |
<groupId>org.codehaus.gmaven</groupId> | |
<artifactId>gmaven-plugin</artifactId> | |
<version>1.3</version> | |
<dependencies> | |
<dependency> | |
<groupId>org.codehaus.groovy</groupId> | |
<artifactId>groovy-all</artifactId> | |
<version>1.8.0</version> | |
</dependency> |
OlderNewer