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
mvn -DskipTests test-compile jar:test-jar install | |
the similar command below, will not compile or package the jar file (if you are using the surefire plugin) so, don't use it if you want to distribute the test jar file without running the tests | |
mvn -Dmaven.test.skip test-compile jar:test-jar install |
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
<!-- Application class name --> | |
<context-param> | |
<param-name>org.restlet.application</param-name> | |
<param-value> | |
mypackage.WebSiteApplication | |
</param-value> | |
</context-param> | |
<!-- Restlet adapter --> | |
<servlet> |
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
1. Create class QueryTypeEnum extends QueryAllEnum | |
2. Create interface QueryTypeParser extends QueryAllParser<QueryType> | |
3. Create interface QueryTypeFactory extends QueryAllFactory<QueryTypeEnum, QueryTypeParser, QueryType> | |
4. Create class QueryTypeRegistry extends AbstractServiceLoader<QueryTypeEnum, QueryTypeFactory> |
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
private static class CompositeClassLoader extends ClassLoader { | |
private Vector<ClassLoader> classLoaders = new Vector<ClassLoader>(); | |
@Override | |
public URL getResource(String name) { | |
for (ClassLoader cl : classLoaders) { | |
URL resource = cl.getResource(name); |
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
import org.restlet.Context; | |
import org.restlet.Request; | |
import org.restlet.Response; | |
import org.restlet.data.Reference; | |
import org.restlet.resource.Directory; | |
public class ClassLoaderDirectory extends Directory { | |
private ClassLoader _cl; | |
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
michaels-imac:stardog-1.2.1 mhgrove$ ./stardog-admin db drop -n testRulesDB | |
Successfully deleted database 'testRulesDB'. | |
michaels-imac:stardog-1.2.1 mhgrove$ ./stardog-admin db create -n testRulesDB | |
Successfully created database 'testRulesDB'. | |
michaels-imac:stardog-1.2.1 mhgrove$ ./stardog data add -u admin -p admin testRulesDB ~/Downloads/rules.ttl | |
Adding data from file: /Users/mhgrove/Downloads/rules.ttl | |
Added 42 RDF triples. |
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
Results : | |
Failed tests: | |
NativeCascadeValueExceptionTest>CascadeValueExceptionTest.testValueExceptionEqual:61 null | |
NativeSPARQLQueryTest>SPARQLQueryTest.runTest:221->SPARQLQueryTest.compareTupleQueryResults:380 | |
============ open-eq-12 ======================= | |
Unexpected bindings: | |
[v1="xyz"^^<http://www.w3.org/2001/XMLSchema#string>;y=http://example/x2;v2="xyz"@en;x=http://example/x1] | |
[v1="xyz"^^<http://www.w3.org/2001/XMLSchema#string>;y=http://example/x3;v2="xyz"@en;x=http://example/x1] | |
[v1="xyz"@en;y=http://example/x1;v2="xyz"^^<http://www.w3.org/2001/XMLSchema#string>;x=http://example/x2] |
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
{ | |
"urn:podd:repository:3efbe347-408b-4476-ad06-e8dec8eb368e" : { | |
"http://purl.org/podd/ns/repository#containsSchemaIRI" : [ { | |
"value" : "http://purl.org/podd/ns/dcTerms", | |
"type" : "uri" | |
}, { | |
"value" : "http://purl.org/podd/ns/foaf", | |
"type" : "uri" | |
}, { | |
"value" : "http://purl.org/podd/ns/poddBase", |
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
import org.junit.Before; | |
import org.junit.Test; | |
import sun.misc.Unsafe; | |
import sun.reflect.ReflectionFactory; | |
import java.lang.reflect.Constructor; | |
import java.lang.reflect.Field; | |
import java.lang.reflect.Modifier; | |
import static org.junit.Assert.assertEquals; |
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
/** | |
* Finds a unique result in the given file, based on examining rows from the CSV and comparing | |
* them sequentially down the file using the given value aggregator function. | |
* | |
* @param <T> | |
* The type of the value that is being compared. | |
* @param <R> | |
* The type of the value that is being returned as the aggregation. | |
* @param nextFile | |
* The file to check |
OlderNewer