diff --git a/doc/install.html b/doc/install.html index cd048e367..22932f888 100644 --- a/doc/install.html +++ b/doc/install.html @@ -745,6 +745,21 @@ +
false
, which
- means that a cached copy of each template will be used for 60 seconds
- before the disk is checked for a new version.
- false
, which means that the language file is
- read when VIVO starts up, or when a new theme is selected.
- false
.
- false
, which means
-# that a cached copy of each template will be used for 60 seconds before
-# the disk is checked for a new version.
-#
-# developer.defeatFreemarkerCache = true
-
-#
-# For developers only: Setting this option to "true" slows down Vitro performance.
-#
-# Defeat the cache of language-specific text strings, so the language file
-# is read from disk on each request. This permits developers to immediately
-# see the effect of changes to the text strings. The default is
-# false
, which means that the language file is read when
-# VIVO starts up, or when a new theme is selected.
-#
-# developer.defeatI18nCache = true
-
-#
-# For developers only: Setting this option to "true" slows down Vitro performance.
-#
-# Add starting and ending delimiters to each Freemarker template, so you can see
-# which template were invoked by viewing the generated HTML. The default is
-# false
.
-#
-# developer.insertFreemarkerDelimiters = true
-
diff --git a/webapp/languages/example/i18n/all_es.properties b/webapp/languages/es_GO/i18n/all_es_GO.properties
similarity index 99%
rename from webapp/languages/example/i18n/all_es.properties
rename to webapp/languages/es_GO/i18n/all_es_GO.properties
index 8c8d081a5..5544aafb0 100644
--- a/webapp/languages/example/i18n/all_es.properties
+++ b/webapp/languages/es_GO/i18n/all_es_GO.properties
@@ -444,7 +444,7 @@ please_create = Por favor, cree
a_classgroup = un grupo de clase
associate_classes_with_group = y las clases asociadas con el grupo creado.
-refresh_content = Actualizar contenido
+site_maintenance = Mantenimiento del sitio
rebuild_search_index = Reconstruir índice de búsqueda
rebuild_vis_cache = Reconstruir caché de visualización
recompute_inferences_mixed_caps = Inferencias Recompute
@@ -481,6 +481,9 @@ restrict_logins_mixed_caps = Restringir conexiones
site_information = Información del sitio
user_accounts = Las cuentas de usuario
+activate_developer_panel = Activar el panel desarrollador
+activate_developer_panel_mixed_caps = Activar el panel desarrollador
+
#
# search controller ( PagedSearchController.java )
#
diff --git a/webapp/languages/example/templates/freemarker/search-help_es.ftl b/webapp/languages/es_GO/templates/freemarker/search-help_es_GO.ftl
similarity index 100%
rename from webapp/languages/example/templates/freemarker/search-help_es.ftl
rename to webapp/languages/es_GO/templates/freemarker/search-help_es_GO.ftl
diff --git a/webapp/languages/example/templates/freemarker/termsOfUse_es.ftl b/webapp/languages/es_GO/templates/freemarker/termsOfUse_es_GO.ftl
similarity index 100%
rename from webapp/languages/example/templates/freemarker/termsOfUse_es.ftl
rename to webapp/languages/es_GO/templates/freemarker/termsOfUse_es_GO.ftl
diff --git a/webapp/languages/example/templates/freemarker/userAccounts-acctCreatedEmail.ftl b/webapp/languages/es_GO/templates/freemarker/userAccounts-acctCreatedEmail_es_GO.ftl
similarity index 100%
rename from webapp/languages/example/templates/freemarker/userAccounts-acctCreatedEmail.ftl
rename to webapp/languages/es_GO/templates/freemarker/userAccounts-acctCreatedEmail_es_GO.ftl
diff --git a/webapp/languages/example/templates/freemarker/userAccounts-acctCreatedExternalOnlyEmail.ftl b/webapp/languages/es_GO/templates/freemarker/userAccounts-acctCreatedExternalOnlyEmail_es_GO.ftl
similarity index 100%
rename from webapp/languages/example/templates/freemarker/userAccounts-acctCreatedExternalOnlyEmail.ftl
rename to webapp/languages/es_GO/templates/freemarker/userAccounts-acctCreatedExternalOnlyEmail_es_GO.ftl
diff --git a/webapp/languages/example/templates/freemarker/userAccounts-confirmEmailChangedEmail.ftl b/webapp/languages/es_GO/templates/freemarker/userAccounts-confirmEmailChangedEmail_es_GO.ftl
similarity index 100%
rename from webapp/languages/example/templates/freemarker/userAccounts-confirmEmailChangedEmail.ftl
rename to webapp/languages/es_GO/templates/freemarker/userAccounts-confirmEmailChangedEmail_es_GO.ftl
diff --git a/webapp/languages/example/templates/freemarker/userAccounts-firstTimeExternalEmail.ftl b/webapp/languages/es_GO/templates/freemarker/userAccounts-firstTimeExternalEmail_es_GO.ftl
similarity index 100%
rename from webapp/languages/example/templates/freemarker/userAccounts-firstTimeExternalEmail.ftl
rename to webapp/languages/es_GO/templates/freemarker/userAccounts-firstTimeExternalEmail_es_GO.ftl
diff --git a/webapp/languages/example/templates/freemarker/userAccounts-passwordCreatedEmail.ftl b/webapp/languages/es_GO/templates/freemarker/userAccounts-passwordCreatedEmail_es_GO.ftl
similarity index 100%
rename from webapp/languages/example/templates/freemarker/userAccounts-passwordCreatedEmail.ftl
rename to webapp/languages/es_GO/templates/freemarker/userAccounts-passwordCreatedEmail_es_GO.ftl
diff --git a/webapp/languages/example/templates/freemarker/userAccounts-passwordResetCompleteEmail.ftl b/webapp/languages/es_GO/templates/freemarker/userAccounts-passwordResetCompleteEmail_es_GO.ftl
similarity index 100%
rename from webapp/languages/example/templates/freemarker/userAccounts-passwordResetCompleteEmail.ftl
rename to webapp/languages/es_GO/templates/freemarker/userAccounts-passwordResetCompleteEmail_es_GO.ftl
diff --git a/webapp/languages/example/templates/freemarker/userAccounts-passwordResetPendingEmail.ftl b/webapp/languages/es_GO/templates/freemarker/userAccounts-passwordResetPendingEmail_es_GO.ftl
similarity index 100%
rename from webapp/languages/example/templates/freemarker/userAccounts-passwordResetPendingEmail.ftl
rename to webapp/languages/es_GO/templates/freemarker/userAccounts-passwordResetPendingEmail_es_GO.ftl
diff --git a/webapp/rdf/auth/everytime/permission_config.n3 b/webapp/rdf/auth/everytime/permission_config.n3
index 9b61615f2..c4a88018a 100644
--- a/webapp/rdf/auth/everytime/permission_config.n3
+++ b/webapp/rdf/auth/everytime/permission_config.n3
@@ -24,6 +24,7 @@ auth:ADMIN
auth:hasPermission simplePermission:UseMiscellaneousAdminPages ;
auth:hasPermission simplePermission:UseSparqlQueryPage ;
auth:hasPermission simplePermission:PageViewableAdmin ;
+ auth:hasPermission simplePermission:EnableDeveloperPanel ;
# permissions for CURATOR and above.
auth:hasPermission simplePermission:EditOntology ;
diff --git a/webapp/src/edu/cornell/mannlib/vitro/webapp/auth/permissions/SimplePermission.java b/webapp/src/edu/cornell/mannlib/vitro/webapp/auth/permissions/SimplePermission.java
index cf0a7e272..33c609c5b 100644
--- a/webapp/src/edu/cornell/mannlib/vitro/webapp/auth/permissions/SimplePermission.java
+++ b/webapp/src/edu/cornell/mannlib/vitro/webapp/auth/permissions/SimplePermission.java
@@ -76,6 +76,8 @@ public class SimplePermission extends Permission {
NAMESPACE + "UseAdvancedDataToolsPages");
public static final SimplePermission USE_SPARQL_QUERY_PAGE = new SimplePermission(
NAMESPACE + "UseSparqlQueryPage");
+ public static final SimplePermission ENABLE_DEVELOPER_PANEL = new SimplePermission(
+ NAMESPACE + "EnableDeveloperPanel");
// ----------------------------------------------------------------------
diff --git a/webapp/src/edu/cornell/mannlib/vitro/webapp/controller/edit/Classes2ClassesOperationController.java b/webapp/src/edu/cornell/mannlib/vitro/webapp/controller/edit/Classes2ClassesOperationController.java
index e35b80ca0..81d8f68c1 100644
--- a/webapp/src/edu/cornell/mannlib/vitro/webapp/controller/edit/Classes2ClassesOperationController.java
+++ b/webapp/src/edu/cornell/mannlib/vitro/webapp/controller/edit/Classes2ClassesOperationController.java
@@ -57,7 +57,7 @@ public class Classes2ClassesOperationController extends BaseEditController {
return;
}
- VClassDao vcDao = request.getUnfilteredAssertionsWebappDaoFactory().getVClassDao();
+ VClassDao vcDao = request.getLanguageNeutralWebappDaoFactory().getVClassDao();
String modeStr = request.getParameter("opMode");
modeStr = (modeStr == null) ? "" : modeStr;
diff --git a/webapp/src/edu/cornell/mannlib/vitro/webapp/controller/freemarker/BaseSiteAdminController.java b/webapp/src/edu/cornell/mannlib/vitro/webapp/controller/freemarker/BaseSiteAdminController.java
index 69d25aa44..1a10c92a3 100644
--- a/webapp/src/edu/cornell/mannlib/vitro/webapp/controller/freemarker/BaseSiteAdminController.java
+++ b/webapp/src/edu/cornell/mannlib/vitro/webapp/controller/freemarker/BaseSiteAdminController.java
@@ -53,14 +53,14 @@ public class BaseSiteAdminController extends FreemarkerHttpServlet {
body.put("dataInput", getDataInputData(vreq));
body.put("siteConfig", getSiteConfigData(vreq));
- body.put("indexCacheRebuild", getIndexCacheRebuildUrls(vreq));
+ body.put("siteMaintenance", getSiteMaintenanceUrls(vreq));
body.put("ontologyEditor", getOntologyEditorData(vreq));
body.put("dataTools", getDataToolsUrls(vreq));
return new TemplateResponseValues(TEMPLATE_DEFAULT, body);
}
- protected Map- * A {@link TemplateLoader} that treats a directory and its sub-directories as a - * flat namespace. - *
- *
- * When a request is made to find a template source, the loader will search its
- * base directory and any sub-directories for a file with a matching name. So a
- * request for myFile.ftl
might return a reference to a file at
- * base/myFile.ftl
or at base/this/myFile.ftl
- *
- * The order in which the sub-directories are searched is unspecified. The first - * matching file will be returned. - *
- *
- * A path (absolute or relative) on the source name would be meaningless, so any
- * such path will be stripped before the search is made. That is, a request for
- * path/file.ftl
or /absolute/path/file.ftl
is
- * functionally identical to a request for file.ftl
- *
- *
- */ -public class FlatteningTemplateLoader implements TemplateLoader { - private static final Log log = LogFactory - .getLog(FlatteningTemplateLoader.class); - - private final File baseDir; - - public FlatteningTemplateLoader(File baseDir) { - if (baseDir == null) { - throw new NullPointerException("baseDir may not be null."); - } - if (!baseDir.exists()) { - throw new IllegalArgumentException("Template directory '" - + baseDir.getAbsolutePath() + "' does not exist"); - } - if (!baseDir.isDirectory()) { - throw new IllegalArgumentException("Template directory '" - + baseDir.getAbsolutePath() + "' is not a directory"); - } - if (!baseDir.canRead()) { - throw new IllegalArgumentException("Can't read template " - + "directory '" + baseDir.getAbsolutePath() + "'"); - } - - log.debug("Created template loader - baseDir is '" - + baseDir.getAbsolutePath() + "'"); - this.baseDir = baseDir; - } - - /** - * Look for a file by this name in the base directory, or its - * subdirectories, disregarding any path information. - * - * @return a {@link File} that can be used in subsequent calls the template - * loader methods, ornull
if no template is found.
- */
- @Override
- public Object findTemplateSource(String name) throws IOException {
- if (name == null) {
- return null;
- }
-
- int lastSlashHere = name.indexOf('/');
- String trimmedName = (lastSlashHere == -1) ? name : name
- .substring(lastSlashHere + 1);
-
- // start the recursive search.
- File source = findFile(trimmedName, baseDir);
- if (source == null) {
- log.debug("For template name '" + name
- + "', found no template file.");
- } else {
- log.debug("For template name '" + name + "', template file is "
- + source.getAbsolutePath());
- }
- return source;
- }
-
- /**
- * Recursively search for a file of this name.
- */
- private File findFile(String name, File dir) {
- for (File child : dir.listFiles()) {
- if (child.isDirectory()) {
- File file = findFile(name, child);
- if (file != null) {
- return file;
- }
- } else {
- if (child.getName().equals(name)) {
- return child;
- }
- }
- }
- return null;
- }
-
- /**
- * Ask the file when it was last modified.
- *
- * @param templateSource
- * a {@link File} that was obtained earlier from
- * {@link #findTemplateSource(String)}.
- */
- @Override
- public long getLastModified(Object templateSource) {
- if (!(templateSource instanceof File)) {
- throw new IllegalArgumentException("templateSource is not a File: "
- + templateSource);
- }
-
- return ((File) templateSource).lastModified();
- }
-
- /**
- * Get a {@link Reader} on this {@link File}. The framework will see that
- * the {@link Reader} is closed when it has been read.
- *
- * @param templateSource
- * a {@link File} that was obtained earlier from
- * {@link #findTemplateSource(String)}.
- */
- @Override
- public Reader getReader(Object templateSource, String encoding)
- throws IOException {
- if (!(templateSource instanceof File)) {
- throw new IllegalArgumentException("templateSource is not a File: "
- + templateSource);
- }
-
- return new FileReader(((File) templateSource));
- }
-
- /**
- * Nothing to do here. No resources to free up.
- *
- * @param templateSource
- * a {@link File} that was obtained earlier from
- * {@link #findTemplateSource(String)}.
- */
- @Override
- public void closeTemplateSource(Object templateSource) throws IOException {
- }
-
-}
diff --git a/webapp/src/edu/cornell/mannlib/vitro/webapp/controller/freemarker/SimpleReasonerRecomputeController.java b/webapp/src/edu/cornell/mannlib/vitro/webapp/controller/freemarker/SimpleReasonerRecomputeController.java
index fd16e2a75..47181cf4b 100644
--- a/webapp/src/edu/cornell/mannlib/vitro/webapp/controller/freemarker/SimpleReasonerRecomputeController.java
+++ b/webapp/src/edu/cornell/mannlib/vitro/webapp/controller/freemarker/SimpleReasonerRecomputeController.java
@@ -56,7 +56,7 @@ public class SimpleReasonerRecomputeController extends FreemarkerHttpServlet {
"SimpleReasonerRecomputController.Recomputer");
thread.setWorkLevel(WORKING);
thread.start();
- messageStr = "Recompute of inferences started. See vivo log for further details.";
+ messageStr = "Recompute of inferences started. See log for further details.";
} else {
body.put("formAction", UrlBuilder.getUrl("/RecomputeInferences"));
}
diff --git a/webapp/src/edu/cornell/mannlib/vitro/webapp/dao/jena/ObjectPropertyDaoJena.java b/webapp/src/edu/cornell/mannlib/vitro/webapp/dao/jena/ObjectPropertyDaoJena.java
index ecdc2bfbc..7d0e42509 100644
--- a/webapp/src/edu/cornell/mannlib/vitro/webapp/dao/jena/ObjectPropertyDaoJena.java
+++ b/webapp/src/edu/cornell/mannlib/vitro/webapp/dao/jena/ObjectPropertyDaoJena.java
@@ -71,8 +71,7 @@ public class ObjectPropertyDaoJena extends PropertyDaoJena implements ObjectProp
}
public void deleteObjectProperty(String propertyURI) {
- ObjectProperty op = new ObjectProperty();
- op.setURI(propertyURI);
+ ObjectProperty op = getObjectPropertyByURI(propertyURI);
deleteObjectProperty(op);
}
diff --git a/webapp/src/edu/cornell/mannlib/vitro/webapp/dao/jena/QueryUtils.java b/webapp/src/edu/cornell/mannlib/vitro/webapp/dao/jena/QueryUtils.java
index f2c686657..c056a28ec 100644
--- a/webapp/src/edu/cornell/mannlib/vitro/webapp/dao/jena/QueryUtils.java
+++ b/webapp/src/edu/cornell/mannlib/vitro/webapp/dao/jena/QueryUtils.java
@@ -6,6 +6,7 @@ import java.util.HashMap;
import java.util.Iterator;
import java.util.Map;
+import org.apache.commons.lang.StringUtils;
import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;
@@ -116,7 +117,11 @@ public class QueryUtils {
return getQueryResults(queryStr, vreq.getRDFService());
}
- public static ResultSet getLanguageNeutralQueryResults(String queryStr, VitroRequest vreq) {
+ public static ResultSet getQueryResults(String queryStr, QuerySolution initialBindings, RDFService rdfService) {
+ return getQueryResults(bindVariables(queryStr, initialBindings), rdfService);
+ }
+
+ public static ResultSet getLanguageNeutralQueryResults(String queryStr, VitroRequest vreq) {
return getQueryResults(queryStr, vreq.getUnfilteredRDFService());
}
@@ -130,4 +135,38 @@ public class QueryUtils {
}
}
+ /**
+ * The RDFService interface doesn't support initial bindings, so do text
+ * substitutions instead.
+ */
+ public static String bindVariables(String queryStr,
+ QuerySolution initialBindings) {
+ String bound = queryStr;
+ for (Iterator+ * "this_es_MX.ftl" matches "this_es_MX.ftl" + * "this_es.ftl" matches "this_es.ftl" or "this_es_MX.ftl" + * "this.ftl" matches "this.ftl" or "this_es.ftl" or "this_es_MX.ftl" + *+ * + * This allows Freemarker to mimic the behavior of the language filtering RDF + * service, because if Freemarker does not find a match for "this_es_MX.ftl", it + * will try again with "this_es.ftl" and "this.ftl". So the net effect is that a + * search for "silly_es_MX.ftl" would eventually return any of these, in order + * of preference: + * + *
+ * silly_es_MX.ftl + * silly_es.ftl + * silly_es_*.ftl + * silly.ftl + * silly_*.ftl + *+ * + * If more than one template file qualifies, we choose by best fit, shortest + * path, and alphabetical order, to insure that identical requests produce + * identical results. + */ +public class FreemarkerTemplateLoader implements TemplateLoader { + private static final Log log = LogFactory + .getLog(FreemarkerTemplateLoader.class); + + private final File baseDir; + + public FreemarkerTemplateLoader(File baseDir) { + if (baseDir == null) { + throw new NullPointerException("baseDir may not be null."); + } + + String path = baseDir.getAbsolutePath(); + if (!baseDir.exists()) { + throw new IllegalArgumentException("Template directory '" + path + + "' does not exist"); + } + if (!baseDir.isDirectory()) { + throw new IllegalArgumentException("Template directory '" + path + + "' is not a directory"); + } + if (!baseDir.canRead()) { + throw new IllegalArgumentException( + "Can't read template directory '" + path + "'"); + } + + log.debug("Created template loader - baseDir is '" + path + "'"); + this.baseDir = baseDir; + } + + /** + * Get the best template for this name. Walk the tree finding all possible + * matches, then choose our favorite. + */ + @Override + public Object findTemplateSource(String name) throws IOException { + if (StringUtils.isBlank(name)) { + return null; + } + + SortedSet
- * findTemplateSource - * null arg - * not found - * found in top level - * found in lower level - * with path - * - * getReader - * get it, read it, check it, close it. - * - * getLastModified - * check the create date within a range - * modify it and check again. - * - *- */ - // ---------------------------------------------------------------------- - // setup and teardown - // ---------------------------------------------------------------------- - - private static final String SUBDIRECTORY_NAME = "sub"; - - private static final String TEMPLATE_NAME_UPPER = "template.ftl"; - private static final String TEMPLATE_NAME_UPPER_WITH_PATH = "path/template.ftl"; - private static final String TEMPLATE_UPPER_CONTENTS = "The contents of the file."; - - private static final String TEMPLATE_NAME_LOWER = "another.ftl"; - private static final String TEMPLATE_LOWER_CONTENTS = "Another template file."; - - private static File tempDir; - private static File notADirectory; - private static File upperTemplate; - private static File lowerTemplate; - - private FlatteningTemplateLoader loader; - - @BeforeClass - public static void setUpFiles() throws IOException { - notADirectory = File.createTempFile( - FlatteningTemplateLoader.class.getSimpleName(), ""); - - tempDir = createTempDirectory(FlatteningTemplateLoader.class - .getSimpleName()); - upperTemplate = createFile(tempDir, TEMPLATE_NAME_UPPER, - TEMPLATE_UPPER_CONTENTS); - - File subdirectory = new File(tempDir, SUBDIRECTORY_NAME); - subdirectory.mkdir(); - lowerTemplate = createFile(subdirectory, TEMPLATE_NAME_LOWER, - TEMPLATE_LOWER_CONTENTS); - } - - @Before - public void initializeLoader() { - loader = new FlatteningTemplateLoader(tempDir); - } - - @AfterClass - public static void cleanUpFiles() throws IOException { - purgeDirectoryRecursively(tempDir); - } - - // ---------------------------------------------------------------------- - // the tests - // ---------------------------------------------------------------------- - - @Test(expected = NullPointerException.class) - public void constructorNull() { - new FlatteningTemplateLoader(null); - } - - @Test(expected = IllegalArgumentException.class) - public void constructorNonExistent() { - new FlatteningTemplateLoader(new File("bogusDirName")); - } - - @Test(expected = IllegalArgumentException.class) - public void constructorNotADirectory() { - new FlatteningTemplateLoader(notADirectory); - } - - @Test - public void findNull() throws IOException { - Object source = loader.findTemplateSource(null); - assertNull("find null", source); - } - - @Test - public void findNotFound() throws IOException { - Object source = loader.findTemplateSource("bogus"); - assertNull("not found", source); - } - - @Test - public void findInTopLevel() throws IOException { - Object source = loader.findTemplateSource(TEMPLATE_NAME_UPPER); - assertEquals("top level", upperTemplate, source); - } - - @Test - public void findInLowerLevel() throws IOException { - Object source = loader.findTemplateSource(TEMPLATE_NAME_LOWER); - assertEquals("lower level", lowerTemplate, source); - } - - @Test - public void findIgnoringPath() throws IOException { - Object source = loader - .findTemplateSource(TEMPLATE_NAME_UPPER_WITH_PATH); - assertEquals("top level", upperTemplate, source); - } - - @Test - public void checkTheReader() throws IOException { - Object source = loader.findTemplateSource(TEMPLATE_NAME_UPPER); - Reader reader = loader.getReader(source, "UTF-8"); - String contents = readAll(reader); - assertEquals("read the contents", contents, TEMPLATE_UPPER_CONTENTS); - } - - /** - * Some systems only record last-modified times to the nearest second, so we - * can't rely on them changing during the course of the test. Force the - * change, and test for it. - */ - @Test - public void teplateLastModified() throws IOException { - Object source = loader.findTemplateSource(TEMPLATE_NAME_UPPER); - long modified = loader.getLastModified(source); - long now = System.currentTimeMillis(); - assertTrue("near to now: modified=" + formatTimeStamp(modified) - + ", now=" + formatTimeStamp(now), - 2000 > Math.abs(modified - now)); - - upperTemplate.setLastModified(5000); - assertEquals("modified modified", 5000, loader.getLastModified(source)); - } - - @Test - public void closeDoesntCrash() throws IOException { - Object source = loader.findTemplateSource(TEMPLATE_NAME_UPPER); - loader.closeTemplateSource(source); - } - - // ---------------------------------------------------------------------- - // helper methods - // ---------------------------------------------------------------------- - - private String formatTimeStamp(long time) { - SimpleDateFormat formatter = new SimpleDateFormat( - "yyyy-MM-dd HH:mm:ss.SSS"); - return formatter.format(time); - } - -} diff --git a/webapp/test/edu/cornell/mannlib/vitro/webapp/dao/jena/QueryUtilsTest.java b/webapp/test/edu/cornell/mannlib/vitro/webapp/dao/jena/QueryUtilsTest.java new file mode 100644 index 000000000..837c5cf50 --- /dev/null +++ b/webapp/test/edu/cornell/mannlib/vitro/webapp/dao/jena/QueryUtilsTest.java @@ -0,0 +1,65 @@ +/* $This file is distributed under the terms of the license in /doc/license.txt$ */ + +package edu.cornell.mannlib.vitro.webapp.dao.jena; + +import static org.junit.Assert.*; + +import org.junit.Ignore; +import org.junit.Test; + +import com.hp.hpl.jena.query.QuerySolutionMap; +import com.hp.hpl.jena.rdf.model.Literal; +import com.hp.hpl.jena.rdf.model.ModelFactory; +import com.hp.hpl.jena.rdf.model.ResourceFactory; + +import edu.cornell.mannlib.vitro.testing.AbstractTestClass; + +/** + * TODO + */ +public class QueryUtilsTest extends AbstractTestClass { + private QuerySolutionMap bindings = new QuerySolutionMap(); + + @Test + public void bindResource() { + bindings.add("uri", ResourceFactory.createResource("http://my.uri")); + assertBoundQueryEquals("a resource ?uri", "a resource