Merge branch 'develop' into feature/fauxEditing
This commit is contained in:
commit
ef6f92539f
113 changed files with 1463 additions and 9883 deletions
|
@ -3,7 +3,9 @@
|
|||
package stubs.edu.cornell.mannlib.vitro.webapp.modelaccess;
|
||||
|
||||
import static edu.cornell.mannlib.vitro.webapp.modelaccess.ModelAccess.ReasoningOption.ASSERTIONS_AND_INFERENCES;
|
||||
import static edu.cornell.mannlib.vitro.webapp.modelaccess.ModelAccess.WhichService.CONTENT;
|
||||
|
||||
import java.util.EnumMap;
|
||||
import java.util.HashMap;
|
||||
import java.util.Map;
|
||||
|
||||
|
@ -30,6 +32,7 @@ public class ContextModelAccessStub implements ContextModelAccess {
|
|||
// ----------------------------------------------------------------------
|
||||
|
||||
private final Map<ReasoningOption, WebappDaoFactory> wadfMap = new HashMap<>();
|
||||
private final Map<WhichService, RDFService> rdfServiceMap = new EnumMap<>(WhichService.class);
|
||||
|
||||
public void setWebappDaoFactory(WebappDaoFactory wadf) {
|
||||
setWebappDaoFactory(wadf, ASSERTIONS_AND_INFERENCES);
|
||||
|
@ -39,6 +42,10 @@ public class ContextModelAccessStub implements ContextModelAccess {
|
|||
ReasoningOption option) {
|
||||
wadfMap.put(option, wadf);
|
||||
}
|
||||
|
||||
public void setRDFService(WhichService which, RDFService rdfService) {
|
||||
rdfServiceMap.put(which, rdfService);
|
||||
}
|
||||
|
||||
// ----------------------------------------------------------------------
|
||||
// Stub methods
|
||||
|
@ -49,22 +56,20 @@ public class ContextModelAccessStub implements ContextModelAccess {
|
|||
return wadfMap.get(ASSERTIONS_AND_INFERENCES);
|
||||
}
|
||||
|
||||
@Override
|
||||
public RDFService getRDFService() {
|
||||
return getRDFService(CONTENT);
|
||||
}
|
||||
|
||||
@Override
|
||||
public RDFService getRDFService(WhichService which) {
|
||||
return rdfServiceMap.get(which);
|
||||
}
|
||||
|
||||
// ----------------------------------------------------------------------
|
||||
// Un-implemented methods
|
||||
// ----------------------------------------------------------------------
|
||||
|
||||
@Override
|
||||
public RDFService getRDFService() {
|
||||
throw new RuntimeException(
|
||||
"ContextModelAccessStub.getRDFService() not implemented.");
|
||||
}
|
||||
|
||||
@Override
|
||||
public RDFService getRDFService(WhichService which) {
|
||||
throw new RuntimeException(
|
||||
"ContextModelAccessStub.getRDFService() not implemented.");
|
||||
}
|
||||
|
||||
@Override
|
||||
public Dataset getDataset() {
|
||||
throw new RuntimeException(
|
||||
|
|
|
@ -7,10 +7,13 @@ import java.lang.reflect.Field;
|
|||
import javax.servlet.ServletContext;
|
||||
|
||||
import edu.cornell.mannlib.vitro.webapp.application.ApplicationUtils;
|
||||
import edu.cornell.mannlib.vitro.webapp.application.VitroHomeDirectory;
|
||||
import edu.cornell.mannlib.vitro.webapp.modules.Application;
|
||||
import edu.cornell.mannlib.vitro.webapp.modules.fileStorage.FileStorage;
|
||||
import edu.cornell.mannlib.vitro.webapp.modules.imageProcessor.ImageProcessor;
|
||||
import edu.cornell.mannlib.vitro.webapp.modules.searchEngine.SearchEngine;
|
||||
import edu.cornell.mannlib.vitro.webapp.modules.tripleSource.ConfigurationTripleSource;
|
||||
import edu.cornell.mannlib.vitro.webapp.modules.tripleSource.ContentTripleSource;
|
||||
|
||||
/**
|
||||
* TODO
|
||||
|
@ -61,6 +64,12 @@ public class ApplicationStub implements Application {
|
|||
// Un-implemented methods
|
||||
// ----------------------------------------------------------------------
|
||||
|
||||
@Override
|
||||
public VitroHomeDirectory getHomeDirectory() {
|
||||
throw new RuntimeException(
|
||||
"ApplicationStub.getHomeDirectory() not implemented.");
|
||||
}
|
||||
|
||||
@Override
|
||||
public ImageProcessor getImageProcessor() {
|
||||
throw new RuntimeException(
|
||||
|
@ -74,4 +83,22 @@ public class ApplicationStub implements Application {
|
|||
"ApplicationStub.getFileStorage() not implemented.");
|
||||
}
|
||||
|
||||
@Override
|
||||
public void shutdown() {
|
||||
throw new RuntimeException(
|
||||
"ApplicationStub.shutdown() not implemented.");
|
||||
}
|
||||
|
||||
@Override
|
||||
public ContentTripleSource getContentTripleSource() {
|
||||
throw new RuntimeException(
|
||||
"ApplicationStub.getContentTripleSource() not implemented.");
|
||||
}
|
||||
|
||||
@Override
|
||||
public ConfigurationTripleSource getConfigurationTripleSource() {
|
||||
throw new RuntimeException(
|
||||
"ApplicationStub.getConfigurationTripleSource() not implemented.");
|
||||
}
|
||||
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue