src_fm_fc_ms_ff
stringlengths
43
86.8k
target
stringlengths
20
276k
Configuration extends AbstractConfiguration { public int getSearchHitMetadataValueNumber() { return getLocalInt("metadata.searchHitMetadataList.valueNumber", 1); } Configuration(String configFilePath); Set<String> getStopwords(); boolean reloadingRequired(); String getConfigLocalPath(); String getLocalRessourceBundleFi...
@Test public void getSearchHitMetadataValueNumber_shouldReturnCorrectValue() throws Exception { Assert.assertEquals(17, DataManager.getInstance().getConfiguration().getSearchHitMetadataValueNumber()); }
Configuration extends AbstractConfiguration { public int getSidebarTocInitialCollapseLevel() { return this.getLocalInt("sidebar.sidebarToc.initialCollapseLevel", 2); } Configuration(String configFilePath); Set<String> getStopwords(); boolean reloadingRequired(); String getConfigLocalPath(); String getLocalRessourceBund...
@Test public void getSidebarTocInitialCollapseLevel_shouldReturnCorrectValue() throws Exception { Assert.assertEquals(22, DataManager.getInstance().getConfiguration().getSidebarTocInitialCollapseLevel()); }
Configuration extends AbstractConfiguration { public int getSidebarTocLengthBeforeCut() { return this.getLocalInt("sidebar.sidebarToc.lengthBeforeCut", 10); } Configuration(String configFilePath); Set<String> getStopwords(); boolean reloadingRequired(); String getConfigLocalPath(); String getLocalRessourceBundleFile();...
@Test public void getSidebarTocLengthBeforeCut_shouldReturnCorrectValue() throws Exception { Assert.assertEquals(21, DataManager.getInstance().getConfiguration().getSidebarTocLengthBeforeCut()); }
Configuration extends AbstractConfiguration { public boolean getSidebarTocPageNumbersVisible() { return this.getLocalBoolean("sidebar.sidebarToc.pageNumbersVisible", false); } Configuration(String configFilePath); Set<String> getStopwords(); boolean reloadingRequired(); String getConfigLocalPath(); String getLocalResso...
@Test public void getSidebarTocPageNumbersVisible_shouldReturnCorrectValue() throws Exception { Assert.assertEquals(true, DataManager.getInstance().getConfiguration().getSidebarTocPageNumbersVisible()); }
Configuration extends AbstractConfiguration { public boolean isSidebarTocTreeView() { return getLocalBoolean("sidebar.sidebarToc.useTreeView", true); } Configuration(String configFilePath); Set<String> getStopwords(); boolean reloadingRequired(); String getConfigLocalPath(); String getLocalRessourceBundleFile(); int ge...
@Test public void isSidebarTocTreeView_shouldReturnCorrectValue() throws Exception { Assert.assertFalse(DataManager.getInstance().getConfiguration().isSidebarTocTreeView()); }
Configuration extends AbstractConfiguration { public boolean isTocTreeView(String docStructType) { HierarchicalConfiguration hc = getLocalConfigurationAt("toc.useTreeView"); String docStructTypes = hc.getString("[@showDocStructs]"); boolean allowed = hc.getBoolean("."); if (!allowed) { logger.trace("Tree view disabled"...
@Test public void isTocTreeView_shouldReturnTrueForAllowedDocstructs() throws Exception { Assert.assertTrue(DataManager.getInstance().getConfiguration().isTocTreeView("Monograph")); Assert.assertTrue(DataManager.getInstance().getConfiguration().isTocTreeView("Manuscript")); Assert.assertTrue(DataManager.getInstance().g...
Configuration extends AbstractConfiguration { public String getSmtpPassword() { return getLocalString("user.smtpPassword"); } Configuration(String configFilePath); Set<String> getStopwords(); boolean reloadingRequired(); String getConfigLocalPath(); String getLocalRessourceBundleFile(); int getViewerThumbnailsPerPage()...
@Test public void getSmtpPassword_shouldReturnCorrectValue() throws Exception { Assert.assertEquals("smtpPassword_value", DataManager.getInstance().getConfiguration().getSmtpPassword()); }
Configuration extends AbstractConfiguration { public String getSmtpSecurity() { return getLocalString("user.smtpSecurity", "none"); } Configuration(String configFilePath); Set<String> getStopwords(); boolean reloadingRequired(); String getConfigLocalPath(); String getLocalRessourceBundleFile(); int getViewerThumbnailsP...
@Test public void getSmtpSecurity_shouldReturnCorrectValue() throws Exception { Assert.assertEquals("smtpSecurity_value", DataManager.getInstance().getConfiguration().getSmtpSecurity()); }
Configuration extends AbstractConfiguration { public String getSmtpSenderAddress() { return getLocalString("user.smtpSenderAddress"); } Configuration(String configFilePath); Set<String> getStopwords(); boolean reloadingRequired(); String getConfigLocalPath(); String getLocalRessourceBundleFile(); int getViewerThumbnail...
@Test public void getSmtpSenderAddress_shouldReturnCorrectValue() throws Exception { Assert.assertEquals("smtpSenderAddress_value", DataManager.getInstance().getConfiguration().getSmtpSenderAddress()); }
Configuration extends AbstractConfiguration { public String getSmtpSenderName() { return getLocalString("user.smtpSenderName"); } Configuration(String configFilePath); Set<String> getStopwords(); boolean reloadingRequired(); String getConfigLocalPath(); String getLocalRessourceBundleFile(); int getViewerThumbnailsPerPa...
@Test public void getSmtpSenderName_shouldReturnCorrectValue() throws Exception { Assert.assertEquals("smtpSenderName_value", DataManager.getInstance().getConfiguration().getSmtpSenderName()); }
Configuration extends AbstractConfiguration { public String getSmtpServer() { return getLocalString("user.smtpServer"); } Configuration(String configFilePath); Set<String> getStopwords(); boolean reloadingRequired(); String getConfigLocalPath(); String getLocalRessourceBundleFile(); int getViewerThumbnailsPerPage(); in...
@Test public void getSmtpServer_shouldReturnCorrectValue() throws Exception { Assert.assertEquals("smtpServer_value", DataManager.getInstance().getConfiguration().getSmtpServer()); }
Configuration extends AbstractConfiguration { public String getSmtpUser() { return getLocalString("user.smtpUser"); } Configuration(String configFilePath); Set<String> getStopwords(); boolean reloadingRequired(); String getConfigLocalPath(); String getLocalRessourceBundleFile(); int getViewerThumbnailsPerPage(); int ge...
@Test public void getSmtpUser_shouldReturnCorrectValue() throws Exception { Assert.assertEquals("smtpUser_value", DataManager.getInstance().getConfiguration().getSmtpUser()); }
Configuration extends AbstractConfiguration { public String getAnonymousUserEmailAddress() { return getLocalString("user.anonymousUserEmailAddress"); } Configuration(String configFilePath); Set<String> getStopwords(); boolean reloadingRequired(); String getConfigLocalPath(); String getLocalRessourceBundleFile(); int ge...
@Test public void getAnonymousUserEmailAddress_shouldReturnCorrectValue() throws Exception { Assert.assertEquals("we.are@anonymous.lulz", DataManager.getInstance().getConfiguration().getAnonymousUserEmailAddress()); }
Configuration extends AbstractConfiguration { public String getSolrUrl() { String value = getLocalString("urls.solr", "http: if (value.charAt(value.length() - 1) == '/') { value = value.substring(0, value.length() - 1); } return value; } Configuration(String configFilePath); Set<String> getStopwords(); boolean reloadin...
@Test public void getSolrUrl_shouldReturnCorrectValue() throws Exception { Assert.assertEquals("https: }
Configuration extends AbstractConfiguration { public String getCollectionSplittingChar(String field) { HierarchicalConfiguration subConfig = getCollectionConfiguration(field); if (subConfig != null) { return subConfig.getString("splittingCharacter", "."); } return getLocalString("viewer.splittingCharacter", "."); } Con...
@Test public void getCollectionSplittingChar_shouldReturnCorrectValue() throws Exception { Assert.assertEquals(".", DataManager.getInstance().getConfiguration().getCollectionSplittingChar(SolrConstants.DC)); Assert.assertEquals("/", DataManager.getInstance().getConfiguration().getCollectionSplittingChar("MD_KNOWLEDGEFI...
Configuration extends AbstractConfiguration { public String getPageSelectionFormat() { return getLocalString("viewer.pageSelectionFormat", "{pageno}:{pagenolabel}"); } Configuration(String configFilePath); Set<String> getStopwords(); boolean reloadingRequired(); String getConfigLocalPath(); String getLocalRessourceBund...
@Test public void getPageSelectionFormat_shouldReturnCorrectValue() throws Exception { Assert.assertEquals("{order} {msg.of} {numpages}", DataManager.getInstance().getConfiguration().getPageSelectionFormat()); }
Configuration extends AbstractConfiguration { protected static Set<String> loadStopwords(String stopwordsFilePath) throws FileNotFoundException, IOException { if (StringUtils.isEmpty(stopwordsFilePath)) { throw new IllegalArgumentException("stopwordsFilePath may not be null or empty"); } if (StringUtils.isEmpty(stopwor...
@Test public void loadStopwords_shouldLoadAllStopwords() throws Exception { Set<String> stopwords = Configuration.loadStopwords("src/test/resources/stopwords.txt"); Assert.assertNotNull(stopwords); Assert.assertEquals(5, stopwords.size()); } @Test public void loadStopwords_shouldRemovePartsStartingWithPipe() throws Exc...
Configuration extends AbstractConfiguration { public Set<String> getStopwords() { return stopwords; } Configuration(String configFilePath); Set<String> getStopwords(); boolean reloadingRequired(); String getConfigLocalPath(); String getLocalRessourceBundleFile(); int getViewerThumbnailsPerPage(); int getViewerMaxImageW...
@Test public void getStopwords_shouldReturnAllStopwords() throws Exception { Assert.assertEquals(5, DataManager.getInstance().getConfiguration().getStopwords().size()); }
Configuration extends AbstractConfiguration { public String getStopwordsFilePath() { return getLocalString("stopwordsFile"); } Configuration(String configFilePath); Set<String> getStopwords(); boolean reloadingRequired(); String getConfigLocalPath(); String getLocalRessourceBundleFile(); int getViewerThumbnailsPerPage(...
@Test public void getStopwordsFilePath_shouldReturnCorrectValue() throws Exception { Assert.assertEquals("src/test/resources/stopwords.txt", DataManager.getInstance().getConfiguration().getStopwordsFilePath()); }
Configuration extends AbstractConfiguration { public String getSubthemeMainTheme() { String theme = getLocalString("viewer.theme[@mainTheme]"); if (StringUtils.isEmpty(theme)) { logger.error("Theme name could not be read - config_viewer.xml may not be well-formed."); } return getLocalString("viewer.theme[@mainTheme]");...
@Test public void getSubthemeMainTheme_shouldReturnCorrectValue() throws Exception { Assert.assertEquals("mainTheme_value", DataManager.getInstance().getConfiguration().getSubthemeMainTheme()); }
AccessConditionUtils { static String[] generateAccessCheckQuery(String identifier, String fileName) { if (StringUtils.isEmpty(fileName)) { return new String[2]; } String[] ret = new String[2]; StringBuilder sbQuery = new StringBuilder(); String useFileField = SolrConstants.FILENAME; String useFileName = FileTools.getPa...
@Test public void generateAccessCheckQuery_shouldUseCorrectFieldNameForAVFiles() throws Exception { { String[] result = AccessConditionUtils.generateAccessCheckQuery("PPN123456789", "00000001.tif"); Assert.assertEquals("+" + SolrConstants.PI_TOPSTRUCT + ":PPN123456789 +" + SolrConstants.FILENAME + ":\"00000001.tif\"", ...
ViewerResourceBundle extends ResourceBundle { public static List<Locale> getLocalesFromFile(Path facesConfigPath) throws FileNotFoundException, IOException, JDOMException { Document doc = XmlTools.readXmlFile(facesConfigPath); Namespace xsi = Namespace.getNamespace("xsi", "http: Namespace javaee = Namespace.getNamespac...
@Test public void testGetLocalesFromFile() throws FileNotFoundException, IOException, JDOMException { Path configPath = Paths.get("src/test/resources/localConfig/faces-config.xml"); assumeTrue(Files.isRegularFile(configPath)); List<Locale> locales = ViewerResourceBundle.getLocalesFromFile(configPath); assertEquals(6, l...
Configuration extends AbstractConfiguration { public String getSubthemeDiscriminatorField() { return getLocalString("viewer.theme[@discriminatorField]", ""); } Configuration(String configFilePath); Set<String> getStopwords(); boolean reloadingRequired(); String getConfigLocalPath(); String getLocalRessourceBundleFile()...
@Test public void getSubthemeDiscriminatorField_shouldReturnCorrectValue() throws Exception { Assert.assertEquals("FACET_VIEWERSUBTHEME", DataManager.getInstance().getConfiguration().getSubthemeDiscriminatorField()); }
Configuration extends AbstractConfiguration { public int getTagCloudSampleSize(String fieldName) { return getLocalInt("tagclouds.sampleSizes." + fieldName, Integer.MAX_VALUE); } Configuration(String configFilePath); Set<String> getStopwords(); boolean reloadingRequired(); String getConfigLocalPath(); String getLocalRes...
@Test public void getTagCloudSampleSize_shouldReturnCorrectValueForExistingFields() throws Exception { Assert.assertEquals(20, DataManager.getInstance().getConfiguration().getTagCloudSampleSize("MD_TITLE")); } @Test public void getTagCloudSampleSize_shouldReturnINT_MAXForOtherFields() throws Exception { Assert.assertEq...
Configuration extends AbstractConfiguration { public String getTheme() { return getSubthemeMainTheme(); } Configuration(String configFilePath); Set<String> getStopwords(); boolean reloadingRequired(); String getConfigLocalPath(); String getLocalRessourceBundleFile(); int getViewerThumbnailsPerPage(); int getViewerMaxIm...
@Test public void getTheme_shouldReturnCorrectValue() throws Exception { Assert.assertEquals("mainTheme_value", DataManager.getInstance().getConfiguration().getTheme()); }
Configuration extends AbstractConfiguration { public String getName() { return getLocalString("viewer.name", "Goobi viewer"); } Configuration(String configFilePath); Set<String> getStopwords(); boolean reloadingRequired(); String getConfigLocalPath(); String getLocalRessourceBundleFile(); int getViewerThumbnailsPerPage...
@Test public void getName_shouldReturnCorrectValue() throws Exception { Assert.assertEquals("Goobi viewer TEST", DataManager.getInstance().getConfiguration().getName()); }
Configuration extends AbstractConfiguration { public String getDescription() { return getLocalString("viewer.description", "Goobi viewer"); } Configuration(String configFilePath); Set<String> getStopwords(); boolean reloadingRequired(); String getConfigLocalPath(); String getLocalRessourceBundleFile(); int getViewerThu...
@Test public void getDescription_shouldReturnCorrectValue() throws Exception { Assert.assertEquals("Goobi viewer TEST desc", DataManager.getInstance().getConfiguration().getDescription()); }
Configuration extends AbstractConfiguration { public int getThumbnailsHeight() { return getLocalInt("viewer.thumbnailsHeight", 120); } Configuration(String configFilePath); Set<String> getStopwords(); boolean reloadingRequired(); String getConfigLocalPath(); String getLocalRessourceBundleFile(); int getViewerThumbnails...
@Test public void getThumbnailsHeight_shouldReturnCorrectValue() throws Exception { Assert.assertEquals(11, DataManager.getInstance().getConfiguration().getThumbnailsHeight()); }
Configuration extends AbstractConfiguration { public int getThumbnailsWidth() { return getLocalInt("viewer.thumbnailsWidth", 100); } Configuration(String configFilePath); Set<String> getStopwords(); boolean reloadingRequired(); String getConfigLocalPath(); String getLocalRessourceBundleFile(); int getViewerThumbnailsPe...
@Test public void getThumbnailsWidth_shouldReturnCorrectValue() throws Exception { Assert.assertEquals(10, DataManager.getInstance().getConfiguration().getThumbnailsWidth()); }
Configuration extends AbstractConfiguration { public int getThumbnailsCompression() { return getLocalInt("viewer.thumbnailsCompression", 85); } Configuration(String configFilePath); Set<String> getStopwords(); boolean reloadingRequired(); String getConfigLocalPath(); String getLocalRessourceBundleFile(); int getViewerT...
@Test public void getThumbnailsCompressionTest() throws Exception { Assert.assertEquals(30, DataManager.getInstance().getConfiguration().getThumbnailsCompression()); }
Configuration extends AbstractConfiguration { public List<Metadata> getTitleBarMetadata() { List<HierarchicalConfiguration> elements = getLocalConfigurationsAt("metadata.titleBarMetadataList.metadata"); if (elements == null) { return Collections.emptyList(); } List<Metadata> ret = new ArrayList<>(elements.size()); for ...
@Test public void getTitleBarMetadata_shouldReturnAllConfiguredMetadataElements() throws Exception { Assert.assertEquals(2, DataManager.getInstance().getConfiguration().getTitleBarMetadata().size()); }
Configuration extends AbstractConfiguration { public int getUnconditionalImageAccessMaxWidth() { return getLocalInt("accessConditions.unconditionalImageAccessMaxWidth", 120); } Configuration(String configFilePath); Set<String> getStopwords(); boolean reloadingRequired(); String getConfigLocalPath(); String getLocalRess...
@Test public void getUnconditionalImageAccessMaxWidth_shouldReturnCorrectValue() throws Exception { Assert.assertEquals(1, DataManager.getInstance().getConfiguration().getUnconditionalImageAccessMaxWidth()); }
Configuration extends AbstractConfiguration { public String getViewerHome() { return getLocalString("viewerHome"); } Configuration(String configFilePath); Set<String> getStopwords(); boolean reloadingRequired(); String getConfigLocalPath(); String getLocalRessourceBundleFile(); int getViewerThumbnailsPerPage(); int get...
@Test public void getViewerHome_shouldReturnCorrectValue() throws Exception { Assert.assertEquals("src/test/resources/data/viewer/", DataManager.getInstance().getConfiguration().getViewerHome()); }
Configuration extends AbstractConfiguration { public int getViewerThumbnailsPerPage() { return getLocalInt("viewer.thumbnailsPerPage", 10); } Configuration(String configFilePath); Set<String> getStopwords(); boolean reloadingRequired(); String getConfigLocalPath(); String getLocalRessourceBundleFile(); int getViewerThu...
@Test public void getViewerThumbnailsPerPage_shouldReturnCorrectValue() throws Exception { Assert.assertEquals(9, DataManager.getInstance().getConfiguration().getViewerThumbnailsPerPage()); }
Configuration extends AbstractConfiguration { public List<String> getWatermarkIdField() { return getLocalList("viewer.watermarkIdField", Collections.singletonList(SolrConstants.DC)); } Configuration(String configFilePath); Set<String> getStopwords(); boolean reloadingRequired(); String getConfigLocalPath(); String getL...
@Test public void getWatermarkIdField_shouldReturnCorrectValue() throws Exception { Assert.assertEquals(Collections.singletonList("watermarkIdField_value"), DataManager.getInstance().getConfiguration().getWatermarkIdField()); }
Configuration extends AbstractConfiguration { public List<String> getWatermarkTextConfiguration() { List<String> list = getLocalList("viewer.watermarkTextConfiguration.text"); return list; } Configuration(String configFilePath); Set<String> getStopwords(); boolean reloadingRequired(); String getConfigLocalPath(); Strin...
@Test public void getWatermarkTextConfiguration_shouldReturnAllConfiguredElementsInTheCorrectOrder() throws Exception { Assert.assertEquals(3, DataManager.getInstance().getConfiguration().getWatermarkTextConfiguration().size()); }
Configuration extends AbstractConfiguration { public String getZoomFullscreenViewType() throws ViewerConfigurationException { return getZoomImageViewType(PageType.viewFullscreen, null); } Configuration(String configFilePath); Set<String> getStopwords(); boolean reloadingRequired(); String getConfigLocalPath(); String g...
@Test public void getZoomFullscreenViewType_shouldReturnCorrectValue() throws Exception { Assert.assertEquals("classic", DataManager.getInstance().getConfiguration().getZoomFullscreenViewType()); }
Configuration extends AbstractConfiguration { public String getImageViewType() throws ViewerConfigurationException { return getZoomImageViewType(PageType.viewImage, null); } Configuration(String configFilePath); Set<String> getStopwords(); boolean reloadingRequired(); String getConfigLocalPath(); String getLocalRessour...
@Test public void getZoomImageViewType_shouldReturnCorrectValue() throws Exception { Assert.assertEquals("openSeadragon", DataManager.getInstance().getConfiguration().getImageViewType()); }
Configuration extends AbstractConfiguration { public boolean isBookmarksEnabled() { return getLocalBoolean("bookmarks.bookmarksEnabled", true); } Configuration(String configFilePath); Set<String> getStopwords(); boolean reloadingRequired(); String getConfigLocalPath(); String getLocalRessourceBundleFile(); int getViewe...
@Test public void isBookshelvesEnabled_shouldReturnCorrectValue() throws Exception { Assert.assertEquals(false, DataManager.getInstance().getConfiguration().isBookmarksEnabled()); }
Configuration extends AbstractConfiguration { public boolean isBrowsingMenuEnabled() { return getLocalBoolean("metadata.browsingMenu.enabled", false); } Configuration(String configFilePath); Set<String> getStopwords(); boolean reloadingRequired(); String getConfigLocalPath(); String getLocalRessourceBundleFile(); int g...
@Test public void isBrowsingMenuEnabled_shouldReturnCorrectValue() throws Exception { Assert.assertEquals(false, DataManager.getInstance().getConfiguration().isBrowsingMenuEnabled()); }
Configuration extends AbstractConfiguration { public boolean isDisplaySearchResultNavigation() { return this.getLocalBoolean("webGuiDisplay.displaySearchResultNavigation", true); } Configuration(String configFilePath); Set<String> getStopwords(); boolean reloadingRequired(); String getConfigLocalPath(); String getLocal...
@Test public void isDisplaySearchResultNavigation_shouldReturnCorrectValue() throws Exception { Assert.assertEquals(false, DataManager.getInstance().getConfiguration().isDisplaySearchResultNavigation()); }
Configuration extends AbstractConfiguration { public boolean isDisplayStatistics() { return this.getLocalBoolean("webGuiDisplay.displayStatistics", true); } Configuration(String configFilePath); Set<String> getStopwords(); boolean reloadingRequired(); String getConfigLocalPath(); String getLocalRessourceBundleFile(); i...
@Test public void isDisplayStatistics_shouldReturnCorrectValue() throws Exception { Assert.assertEquals(false, DataManager.getInstance().getConfiguration().isDisplayStatistics()); }
Configuration extends AbstractConfiguration { public boolean isDisplayTagCloudNavigation() { return this.getLocalBoolean("webGuiDisplay.displayTagCloudNavigation", true); } Configuration(String configFilePath); Set<String> getStopwords(); boolean reloadingRequired(); String getConfigLocalPath(); String getLocalRessourc...
@Test public void isDisplayTagCloudNavigation_shouldReturnCorrectValue() throws Exception { Assert.assertEquals(false, DataManager.getInstance().getConfiguration().isDisplayTagCloudNavigation()); }
Configuration extends AbstractConfiguration { public boolean isDisplayTagCloudStartpage() { return this.getLocalBoolean("webGuiDisplay.displayTagCloudStartpage", true); } Configuration(String configFilePath); Set<String> getStopwords(); boolean reloadingRequired(); String getConfigLocalPath(); String getLocalRessourceB...
@Test public void isDisplayTagCloudStartpage_shouldReturnCorrectValue() throws Exception { Assert.assertEquals(false, DataManager.getInstance().getConfiguration().isDisplayTagCloudStartpage()); }
Configuration extends AbstractConfiguration { public boolean isDisplayUserNavigation() { return this.getLocalBoolean("webGuiDisplay.userAccountNavigation", true); } Configuration(String configFilePath); Set<String> getStopwords(); boolean reloadingRequired(); String getConfigLocalPath(); String getLocalRessourceBundleF...
@Test public void isDisplayUserNavigation_shouldReturnCorrectValue() throws Exception { Assert.assertEquals(false, DataManager.getInstance().getConfiguration().isDisplayUserNavigation()); }
Configuration extends AbstractConfiguration { public boolean isAddDublinCoreMetaTags() { return getLocalBoolean("metadata.addDublinCoreMetaTags", false); } Configuration(String configFilePath); Set<String> getStopwords(); boolean reloadingRequired(); String getConfigLocalPath(); String getLocalRessourceBundleFile(); in...
@Test public void isAddDublinCoreMetaTags_shouldReturnCorrectValue() throws Exception { Assert.assertEquals(true, DataManager.getInstance().getConfiguration().isAddDublinCoreMetaTags()); }
Configuration extends AbstractConfiguration { public boolean isAddHighwirePressMetaTags() { return getLocalBoolean("metadata.addHighwirePressMetaTags", false); } Configuration(String configFilePath); Set<String> getStopwords(); boolean reloadingRequired(); String getConfigLocalPath(); String getLocalRessourceBundleFile...
@Test public void isAddHighwirePressMetaTags_shouldReturnCorrectValue() throws Exception { Assert.assertEquals(true, DataManager.getInstance().getConfiguration().isAddHighwirePressMetaTags()); }
Configuration extends AbstractConfiguration { public int getMetadataParamNumber() { return getLocalInt("metadata.metadataParamNumber", 10); } Configuration(String configFilePath); Set<String> getStopwords(); boolean reloadingRequired(); String getConfigLocalPath(); String getLocalRessourceBundleFile(); int getViewerThu...
@Test public void getMetadataParamNumber_shouldReturnCorrectValue() throws Exception { Assert.assertEquals(5, DataManager.getInstance().getConfiguration().getMetadataParamNumber()); }
Configuration extends AbstractConfiguration { public boolean isMetadataPdfEnabled() { return getLocalBoolean("pdf.metadataPdfEnabled", true); } Configuration(String configFilePath); Set<String> getStopwords(); boolean reloadingRequired(); String getConfigLocalPath(); String getLocalRessourceBundleFile(); int getViewerT...
@Test public void isMetadataPdfEnabled_shouldReturnCorrectValue() throws Exception { Assert.assertEquals(false, DataManager.getInstance().getConfiguration().isMetadataPdfEnabled()); }
Configuration extends AbstractConfiguration { public boolean isOriginalContentDownload() { return getLocalBoolean("content.originalContentDownload", false); } Configuration(String configFilePath); Set<String> getStopwords(); boolean reloadingRequired(); String getConfigLocalPath(); String getLocalRessourceBundleFile();...
@Test public void isOriginalContentDownload_shouldReturnCorrectValue() throws Exception { Assert.assertEquals(false, DataManager.getInstance().getConfiguration().isOriginalContentDownload()); }
Configuration extends AbstractConfiguration { public boolean isGeneratePdfInTaskManager() { return getLocalBoolean("pdf.externalPdfGeneration", false); } Configuration(String configFilePath); Set<String> getStopwords(); boolean reloadingRequired(); String getConfigLocalPath(); String getLocalRessourceBundleFile(); int ...
@Test public void isGeneratePdfInTaskManager_shouldReturnCorrectValue() throws Exception { Assert.assertTrue(DataManager.getInstance().getConfiguration().isGeneratePdfInTaskManager()); }
Configuration extends AbstractConfiguration { public boolean isPdfApiDisabled() { return getLocalBoolean("pdf.pdfApiDisabled", false); } Configuration(String configFilePath); Set<String> getStopwords(); boolean reloadingRequired(); String getConfigLocalPath(); String getLocalRessourceBundleFile(); int getViewerThumbnai...
@Test public void isPdfApiDisabled_shouldReturnCorrectValue() throws Exception { Assert.assertEquals(false, DataManager.getInstance().getConfiguration().isPdfApiDisabled()); }
Configuration extends AbstractConfiguration { public boolean isTitlePdfEnabled() { boolean enabled = getLocalBoolean("pdf.titlePdfEnabled", true); return enabled; } Configuration(String configFilePath); Set<String> getStopwords(); boolean reloadingRequired(); String getConfigLocalPath(); String getLocalRessourceBundleF...
@Test public void isTitlePdfEnabled_shouldReturnCorrectValue() throws Exception { Assert.assertEquals(false, DataManager.getInstance().getConfiguration().isTitlePdfEnabled()); }
Configuration extends AbstractConfiguration { public boolean isTocPdfEnabled() { return getLocalBoolean("pdf.tocPdfEnabled", true); } Configuration(String configFilePath); Set<String> getStopwords(); boolean reloadingRequired(); String getConfigLocalPath(); String getLocalRessourceBundleFile(); int getViewerThumbnailsP...
@Test public void isTocPdfEnabled_shouldReturnCorrectValue() throws Exception { Assert.assertEquals(false, DataManager.getInstance().getConfiguration().isTocPdfEnabled()); }
Configuration extends AbstractConfiguration { public boolean isPagePdfEnabled() { return getLocalBoolean("pdf.pagePdfEnabled", false); } Configuration(String configFilePath); Set<String> getStopwords(); boolean reloadingRequired(); String getConfigLocalPath(); String getLocalRessourceBundleFile(); int getViewerThumbnai...
@Test public void isPagePdfEnabled_shouldReturnCorrectValue() throws Exception { Assert.assertEquals(true, DataManager.getInstance().getConfiguration().isPagePdfEnabled()); }
Configuration extends AbstractConfiguration { public boolean isDocHierarchyPdfEnabled() { return getLocalBoolean("pdf.docHierarchyPdfEnabled", false); } Configuration(String configFilePath); Set<String> getStopwords(); boolean reloadingRequired(); String getConfigLocalPath(); String getLocalRessourceBundleFile(); int g...
@Test public void isDocHierarchyPdfEnabled_shouldReturnCorrectValue() throws Exception { Assert.assertEquals(true, DataManager.getInstance().getConfiguration().isDocHierarchyPdfEnabled()); }
Configuration extends AbstractConfiguration { public boolean isTitleEpubEnabled() { return getLocalBoolean("epub.titleEpubEnabled", false); } Configuration(String configFilePath); Set<String> getStopwords(); boolean reloadingRequired(); String getConfigLocalPath(); String getLocalRessourceBundleFile(); int getViewerThu...
@Test public void isTitleEpubEnabled_shouldReturnCorrectValue() throws Exception { Assert.assertFalse(DataManager.getInstance().getConfiguration().isTitleEpubEnabled()); }
Configuration extends AbstractConfiguration { public boolean isTocEpubEnabled() { return getLocalBoolean("epub.tocEpubEnabled", false); } Configuration(String configFilePath); Set<String> getStopwords(); boolean reloadingRequired(); String getConfigLocalPath(); String getLocalRessourceBundleFile(); int getViewerThumbna...
@Test public void isTocEpubEnabled_shouldReturnCorrectValue() throws Exception { Assert.assertFalse(DataManager.getInstance().getConfiguration().isTocEpubEnabled()); }
Configuration extends AbstractConfiguration { public boolean isMetadataEpubEnabled() { return getLocalBoolean("epub.metadataEpubEnabled", false); } Configuration(String configFilePath); Set<String> getStopwords(); boolean reloadingRequired(); String getConfigLocalPath(); String getLocalRessourceBundleFile(); int getVie...
@Test public void isMetadataEpubEnabled_shouldReturnCorrectValue() throws Exception { Assert.assertFalse(DataManager.getInstance().getConfiguration().isMetadataEpubEnabled()); }
Configuration extends AbstractConfiguration { public String getDownloadFolder(String type) { switch (type.toLowerCase()) { case "pdf": return getLocalString("pdf.downloadFolder", "/opt/digiverso/viewer/pdf_download"); case "epub": return getLocalString("epub.downloadFolder", "/opt/digiverso/viewer/epub_download"); defa...
@Test public void getDownloadFolder_shouldReturnCorrectValueForPdf() throws Exception { Assert.assertEquals("/opt/digiverso/viewer/download_test_pdf", DataManager.getInstance().getConfiguration().getDownloadFolder("pdf")); } @Test public void getDownloadFolder_shouldReturnCorrectValueForEpub() throws Exception { Assert...
AccessConditionUtils { public static int getPdfDownloadQuotaForRecord(String pi) throws PresentationException, IndexUnreachableException, DAOException, RecordNotFoundException { if (StringUtils.isEmpty(pi)) { return 0; } SolrDocument doc = DataManager.getInstance() .getSearchIndex() .getFirstDoc("+" + SolrConstants.PI ...
@Test(expected = RecordNotFoundException.class) public void getPdfDownloadQuotaForRecord_shouldThrowRecordNotFoundExceptionIfRecordNotFound() throws Exception { AccessConditionUtils.getPdfDownloadQuotaForRecord("notfound"); } @Test public void getPdfDownloadQuotaForRecord_shouldReturn100IfRecordHasNoQuotaValue() throws...
Configuration extends AbstractConfiguration { public boolean isPreventProxyCaching() { return getLocalBoolean(("performance.preventProxyCaching"), false); } Configuration(String configFilePath); Set<String> getStopwords(); boolean reloadingRequired(); String getConfigLocalPath(); String getLocalRessourceBundleFile(); i...
@Test public void isPreventProxyCaching_shouldReturnCorrectValue() throws Exception { Assert.assertEquals(true, DataManager.getInstance().getConfiguration().isPreventProxyCaching()); }
Configuration extends AbstractConfiguration { public boolean isSolrCompressionEnabled() { return getLocalBoolean(("performance.solr.compressionEnabled"), true); } Configuration(String configFilePath); Set<String> getStopwords(); boolean reloadingRequired(); String getConfigLocalPath(); String getLocalRessourceBundleFil...
@Test public void isSolrCompressionEnabled_shouldReturnCorrectValue() throws Exception { Assert.assertFalse(DataManager.getInstance().getConfiguration().isSolrCompressionEnabled()); }
Configuration extends AbstractConfiguration { public boolean isSolrBackwardsCompatible() { return getLocalBoolean(("performance.solr.backwardsCompatible"), false); } Configuration(String configFilePath); Set<String> getStopwords(); boolean reloadingRequired(); String getConfigLocalPath(); String getLocalRessourceBundle...
@Test public void isSolrBackwardsCompatible_shouldReturnCorrectValue() throws Exception { Assert.assertTrue(DataManager.getInstance().getConfiguration().isSolrBackwardsCompatible()); }
Configuration extends AbstractConfiguration { public boolean isShowSidebarEventMetadata() { return getLocalBoolean("sidebar.metadata.showEventMetadata", true); } Configuration(String configFilePath); Set<String> getStopwords(); boolean reloadingRequired(); String getConfigLocalPath(); String getLocalRessourceBundleFile...
@Test public void isShowSidebarEventMetadata_shouldReturnCorrectValue() throws Exception { Assert.assertEquals(false, DataManager.getInstance().getConfiguration().isShowSidebarEventMetadata()); }
Configuration extends AbstractConfiguration { public boolean isShowRecordLabelIfNoOtherViews() { return getLocalBoolean("sidebar.metadata.showRecordLabelIfNoOtherViews", false); } Configuration(String configFilePath); Set<String> getStopwords(); boolean reloadingRequired(); String getConfigLocalPath(); String getLocalR...
@Test public void isShowRecordLabelIfNoOtherViews_shouldReturnCorrectValue() throws Exception { Assert.assertTrue(DataManager.getInstance().getConfiguration().isShowRecordLabelIfNoOtherViews()); }
Configuration extends AbstractConfiguration { public boolean isSidebarFulltextLinkVisible() { return getLocalBoolean("sidebar.fulltext.visible", true); } Configuration(String configFilePath); Set<String> getStopwords(); boolean reloadingRequired(); String getConfigLocalPath(); String getLocalRessourceBundleFile(); int ...
@Test public void isSidebarFulltextLinkVisible_shouldReturnCorrectValue() throws Exception { Assert.assertEquals(false, DataManager.getInstance().getConfiguration().isSidebarFulltextLinkVisible()); }
Configuration extends AbstractConfiguration { public boolean isSidebarMetadataViewLinkVisible() { return getLocalBoolean("sidebar.metadata.visible", true); } Configuration(String configFilePath); Set<String> getStopwords(); boolean reloadingRequired(); String getConfigLocalPath(); String getLocalRessourceBundleFile(); ...
@Test public void isSidebarMetadataLinkVisible_shouldReturnCorrectValue() throws Exception { Assert.assertEquals(false, DataManager.getInstance().getConfiguration().isSidebarMetadataViewLinkVisible()); }
Configuration extends AbstractConfiguration { public boolean isSidebarPageViewLinkVisible() { return getLocalBoolean("sidebar.page.visible", true); } Configuration(String configFilePath); Set<String> getStopwords(); boolean reloadingRequired(); String getConfigLocalPath(); String getLocalRessourceBundleFile(); int getV...
@Test public void isSidebarPageLinkVisible_shouldReturnCorrectValue() throws Exception { Assert.assertEquals(false, DataManager.getInstance().getConfiguration().isSidebarPageViewLinkVisible()); }
Configuration extends AbstractConfiguration { public boolean isSidebarCalendarViewLinkVisible() { return getLocalBoolean("sidebar.calendar.visible", true); } Configuration(String configFilePath); Set<String> getStopwords(); boolean reloadingRequired(); String getConfigLocalPath(); String getLocalRessourceBundleFile(); ...
@Test public void isSidebarCalendarLinkVisible_shouldReturnCorrectValue() throws Exception { Assert.assertEquals(false, DataManager.getInstance().getConfiguration().isSidebarCalendarViewLinkVisible()); }
Configuration extends AbstractConfiguration { public boolean isSidebarThumbsViewLinkVisible() { return getLocalBoolean("sidebar.thumbs.visible", true); } Configuration(String configFilePath); Set<String> getStopwords(); boolean reloadingRequired(); String getConfigLocalPath(); String getLocalRessourceBundleFile(); int ...
@Test public void isSidebarThumbsLinkVisible_shouldReturnCorrectValue() throws Exception { Assert.assertEquals(false, DataManager.getInstance().getConfiguration().isSidebarThumbsViewLinkVisible()); }
Configuration extends AbstractConfiguration { public boolean isSidebarOpacLinkVisible() { return this.getLocalBoolean("sidebar.opac.visible", false); } Configuration(String configFilePath); Set<String> getStopwords(); boolean reloadingRequired(); String getConfigLocalPath(); String getLocalRessourceBundleFile(); int ge...
@Test public void isSidebarOpacLinkVisible_shouldReturnCorrectValue() throws Exception { Assert.assertTrue(DataManager.getInstance().getConfiguration().isSidebarOpacLinkVisible()); }
Configuration extends AbstractConfiguration { public boolean isSidebarTocViewLinkVisible() { return getLocalBoolean("sidebar.toc.visible", true); } Configuration(String configFilePath); Set<String> getStopwords(); boolean reloadingRequired(); String getConfigLocalPath(); String getLocalRessourceBundleFile(); int getVie...
@Test public void isSidebarTocLinkVisible_shouldReturnCorrectValue() throws Exception { Assert.assertEquals(false, DataManager.getInstance().getConfiguration().isSidebarTocViewLinkVisible()); }
Configuration extends AbstractConfiguration { public boolean isSidebarTocWidgetVisible() { return this.getLocalBoolean("sidebar.sidebarToc.visible", true); } Configuration(String configFilePath); Set<String> getStopwords(); boolean reloadingRequired(); String getConfigLocalPath(); String getLocalRessourceBundleFile(); ...
@Test public void isSidebarTocVisible_shouldReturnCorrectValue() throws Exception { Assert.assertEquals(false, DataManager.getInstance().getConfiguration().isSidebarTocWidgetVisible()); }
Configuration extends AbstractConfiguration { public boolean isSidebarTocWidgetVisibleInFullscreen() { return this.getLocalBoolean("sidebar.sidebarToc.visibleInFullscreen", true); } Configuration(String configFilePath); Set<String> getStopwords(); boolean reloadingRequired(); String getConfigLocalPath(); String getLoca...
@Test public void isSidebarTocVisibleInFullscreen_shouldReturnCorrectValue() throws Exception { Assert.assertEquals(false, DataManager.getInstance().getConfiguration().isSidebarTocWidgetVisibleInFullscreen()); }
Configuration extends AbstractConfiguration { public boolean isSortingEnabled() { return getLocalBoolean("search.sorting.enabled", true); } Configuration(String configFilePath); Set<String> getStopwords(); boolean reloadingRequired(); String getConfigLocalPath(); String getLocalRessourceBundleFile(); int getViewerThumb...
@Test public void isSortingEnabled_shouldReturnCorrectValue() throws Exception { Assert.assertEquals(false, DataManager.getInstance().getConfiguration().isSortingEnabled()); }
Configuration extends AbstractConfiguration { public String getDefaultSortField() { return getLocalString("search.sorting.defaultSortField", null); } Configuration(String configFilePath); Set<String> getStopwords(); boolean reloadingRequired(); String getConfigLocalPath(); String getLocalRessourceBundleFile(); int getV...
@Test public void getDefaultSortField_shouldReturnCorrectValue() throws Exception { Assert.assertEquals("SORT_DEFAULT1;SORT_DEFAULT2;SORT_DEFAULT3", DataManager.getInstance().getConfiguration().getDefaultSortField()); }
Configuration extends AbstractConfiguration { public boolean isUrnDoRedirect() { return getLocalBoolean("urnresolver.doRedirectInsteadofForward", false); } Configuration(String configFilePath); Set<String> getStopwords(); boolean reloadingRequired(); String getConfigLocalPath(); String getLocalRessourceBundleFile(); in...
@Test public void isUrnDoRedirect_shouldReturnCorrectValue() throws Exception { Assert.assertEquals(true, DataManager.getInstance().getConfiguration().isUrnDoRedirect()); }
Configuration extends AbstractConfiguration { public boolean isUserCommentsEnabled() { return getLocalBoolean(("userComments.enabled"), false); } Configuration(String configFilePath); Set<String> getStopwords(); boolean reloadingRequired(); String getConfigLocalPath(); String getLocalRessourceBundleFile(); int getViewe...
@Test public void isUserCommentsEnabled_shouldReturnCorrectValue() throws Exception { Assert.assertEquals(true, DataManager.getInstance().getConfiguration().isUserCommentsEnabled()); }
Configuration extends AbstractConfiguration { public String getUserCommentsConditionalQuery() { return getLocalString("userComments.conditionalQuery"); } Configuration(String configFilePath); Set<String> getStopwords(); boolean reloadingRequired(); String getConfigLocalPath(); String getLocalRessourceBundleFile(); int ...
@Test public void getUserCommentsConditionalQuery_shouldReturnCorrectValue() throws Exception { Assert.assertEquals("DC:varia", DataManager.getInstance().getConfiguration().getUserCommentsConditionalQuery()); }
Configuration extends AbstractConfiguration { public boolean useTiles() throws ViewerConfigurationException { return useTiles(PageType.viewImage, null); } Configuration(String configFilePath); Set<String> getStopwords(); boolean reloadingRequired(); String getConfigLocalPath(); String getLocalRessourceBundleFile(); int...
@Test public void useTiles_shouldReturnCorrectValue() throws Exception { Assert.assertEquals(true, DataManager.getInstance().getConfiguration().useTiles()); }
Configuration extends AbstractConfiguration { public boolean useTilesFullscreen() throws ViewerConfigurationException { return useTiles(PageType.viewFullscreen, null); } Configuration(String configFilePath); Set<String> getStopwords(); boolean reloadingRequired(); String getConfigLocalPath(); String getLocalRessourceBu...
@Test public void useTilesFullscreen_shouldReturnCorrectValue() throws Exception { Assert.assertEquals(true, DataManager.getInstance().getConfiguration().useTilesFullscreen()); }
Configuration extends AbstractConfiguration { public List<Metadata> getSidebarMetadataForTemplate(String template) { List<HierarchicalConfiguration> templateList = getLocalConfigurationsAt("metadata.sideBarMetadataList.template"); if (templateList == null) { return Collections.emptyList(); } return getMetadataForTempla...
@Test public void getSidebarMetadataForTemplate_shouldReturnCorrectTemplateConfiguration() throws Exception { Assert.assertEquals(5, DataManager.getInstance().getConfiguration().getSidebarMetadataForTemplate("Map").size()); } @Test public void getSidebarMetadataForTemplate_shouldReturnEmptyListIfTemplateNotFound() thro...
Configuration extends AbstractConfiguration { public List<String> getSortFields() { return getLocalList("search.sorting.luceneField"); } Configuration(String configFilePath); Set<String> getStopwords(); boolean reloadingRequired(); String getConfigLocalPath(); String getLocalRessourceBundleFile(); int getViewerThumbnai...
@Test public void getSortFields_shouldReturnReturnAllConfiguredElements() throws Exception { Assert.assertEquals(4, DataManager.getInstance().getConfiguration().getSortFields().size()); }
Configuration extends AbstractConfiguration { public List<String> getStaticSortFields() { return getLocalList("search.sorting.static.field"); } Configuration(String configFilePath); Set<String> getStopwords(); boolean reloadingRequired(); String getConfigLocalPath(); String getLocalRessourceBundleFile(); int getViewerT...
@Test public void getStaticSortFields_shouldReturnReturnAllConfiguredElements() throws Exception { Assert.assertEquals(1, DataManager.getInstance().getConfiguration().getStaticSortFields().size()); }
Configuration extends AbstractConfiguration { public int getViewerMaxImageHeight() { return getLocalInt("viewer.maxImageHeight", 2000); } Configuration(String configFilePath); Set<String> getStopwords(); boolean reloadingRequired(); String getConfigLocalPath(); String getLocalRessourceBundleFile(); int getViewerThumbna...
@Test public void getViewerMaxImageHeight_shouldReturnCorrectValue() throws Exception { Assert.assertEquals(7, DataManager.getInstance().getConfiguration().getViewerMaxImageHeight()); }
Configuration extends AbstractConfiguration { public int getViewerMaxImageScale() { return getLocalInt("viewer.maxImageScale", 500); } Configuration(String configFilePath); Set<String> getStopwords(); boolean reloadingRequired(); String getConfigLocalPath(); String getLocalRessourceBundleFile(); int getViewerThumbnails...
@Test public void getViewerMaxImageScale_shouldReturnCorrectValue() throws Exception { Assert.assertEquals(8, DataManager.getInstance().getConfiguration().getViewerMaxImageScale()); }
Configuration extends AbstractConfiguration { public int getViewerMaxImageWidth() { return getLocalInt("viewer.maxImageWidth", 2000); } Configuration(String configFilePath); Set<String> getStopwords(); boolean reloadingRequired(); String getConfigLocalPath(); String getLocalRessourceBundleFile(); int getViewerThumbnail...
@Test public void getViewerMaxImageWidth_shouldReturnCorrectValue() throws Exception { Assert.assertEquals(6, DataManager.getInstance().getConfiguration().getViewerMaxImageWidth()); }
AccessConditionUtils { public static boolean isConcurrentViewsLimitEnabledForAnyAccessCondition(List<String> accessConditions) throws DAOException { if (accessConditions == null || accessConditions.isEmpty()) { return false; } List<LicenseType> licenseTypes = DataManager.getInstance().getDao().getLicenseTypes(accessCon...
@Test public void isConcurrentViewsLimitEnabledForAnyAccessCondition_shouldReturnFalseIfAccessConditionsNullOrEmpty() throws Exception { Assert.assertFalse(AccessConditionUtils.isConcurrentViewsLimitEnabledForAnyAccessCondition(null)); Assert.assertFalse(AccessConditionUtils.isConcurrentViewsLimitEnabledForAnyAccessCon...
Configuration extends AbstractConfiguration { public List<String> getNormdataFieldsForTemplate(String template) { List<HierarchicalConfiguration> templateList = getLocalConfigurationsAt("metadata.normdataList.template"); if (templateList == null) { return Collections.emptyList(); } HierarchicalConfiguration usingTempla...
@Test public void getNormdataFieldsForTemplate_shouldReturnCorrectTemplateConfiguration() throws Exception { Assert.assertEquals(2, DataManager.getInstance().getConfiguration().getNormdataFieldsForTemplate("CORPORATION").size()); }
Configuration extends AbstractConfiguration { public boolean isDisplayTopstructLabel() { return this.getLocalBoolean("metadata.searchHitMetadataList.displayTopstructLabel", false); } Configuration(String configFilePath); Set<String> getStopwords(); boolean reloadingRequired(); String getConfigLocalPath(); String getLoc...
@Test public void isDisplayTopstructLabel_shouldReturnCorrectValue() throws Exception { Assert.assertEquals(true, DataManager.getInstance().getConfiguration().isDisplayTopstructLabel()); }
Configuration extends AbstractConfiguration { public int getAdvancedSearchDefaultItemNumber() { return getLocalInt("search.advanced.defaultItemNumber", 2); } Configuration(String configFilePath); Set<String> getStopwords(); boolean reloadingRequired(); String getConfigLocalPath(); String getLocalRessourceBundleFile(); ...
@Test public void getAdvancedSearchDefaultItemNumber_shouldReturnCorrectValue() throws Exception { Assert.assertEquals(3, DataManager.getInstance().getConfiguration().getAdvancedSearchDefaultItemNumber()); }
Configuration extends AbstractConfiguration { public List<AdvancedSearchFieldConfiguration> getAdvancedSearchFields() { List<HierarchicalConfiguration> fieldList = getLocalConfigurationsAt("search.advanced.searchFields.field"); if (fieldList == null) { Collections.emptyList(); } List<AdvancedSearchFieldConfiguration> r...
@Test public void getAdvancedSearchFields_shouldReturnAllValues() throws Exception { List<AdvancedSearchFieldConfiguration> result = DataManager.getInstance().getConfiguration().getAdvancedSearchFields(); Assert.assertEquals(11, result.size()); Assert.assertTrue(result.get(0).isHierarchical()); Assert.assertTrue(result...
Configuration extends AbstractConfiguration { public boolean isAdvancedSearchFieldRange(String field) { return isAdvancedSearchFieldHasAttribute(field, "range"); } Configuration(String configFilePath); Set<String> getStopwords(); boolean reloadingRequired(); String getConfigLocalPath(); String getLocalRessourceBundleFi...
@Test public void isAdvancedSearchFieldRange_shouldReturnCorrectValue() throws Exception { Assert.assertFalse(DataManager.getInstance().getConfiguration().isAdvancedSearchFieldRange(SolrConstants.DC)); Assert.assertTrue(DataManager.getInstance().getConfiguration().isAdvancedSearchFieldRange("MD_YEARPUBLISH")); }
Configuration extends AbstractConfiguration { public boolean isAdvancedSearchFieldUntokenizeForPhraseSearch(String field) { return isAdvancedSearchFieldHasAttribute(field, "untokenizeForPhraseSearch"); } Configuration(String configFilePath); Set<String> getStopwords(); boolean reloadingRequired(); String getConfigLocal...
@Test public void isAdvancedSearchFieldUntokenizeForPhraseSearch_shouldReturnCorrectValue() throws Exception { Assert.assertFalse(DataManager.getInstance().getConfiguration().isAdvancedSearchFieldUntokenizeForPhraseSearch(SolrConstants.DC)); Assert.assertTrue(DataManager.getInstance().getConfiguration().isAdvancedSearc...
Configuration extends AbstractConfiguration { public String getAdvancedSearchFieldSeparatorLabel(String field) { List<HierarchicalConfiguration> fieldList = getLocalConfigurationsAt("search.advanced.searchFields.field"); if (fieldList == null) { return null; } for (Iterator<HierarchicalConfiguration> it = fieldList.ite...
@Test public void getAdvancedSearchFieldSeparatorLabel_shouldReturnCorrectValue() throws Exception { Assert.assertEquals("-----", DataManager.getInstance().getConfiguration().getAdvancedSearchFieldSeparatorLabel("#SEPARATOR1#")); }
Configuration extends AbstractConfiguration { public int getSidebarTocCollapseLengthThreshold() { return this.getLocalInt("sidebar.sidebarToc.collapseLengthThreshold", 10); } Configuration(String configFilePath); Set<String> getStopwords(); boolean reloadingRequired(); String getConfigLocalPath(); String getLocalRessou...
@Test public void getSidebarTocCollapseLengthThreshold_shouldReturnCorrectValue() throws Exception { Assert.assertEquals(141, DataManager.getInstance().getConfiguration().getSidebarTocCollapseLengthThreshold()); }
Configuration extends AbstractConfiguration { public int getSidebarTocLowestLevelToCollapseForLength() { return this.getLocalInt("sidebar.sidebarToc.collapseLengthThreshold[@lowestLevelToTest]", 2); } Configuration(String configFilePath); Set<String> getStopwords(); boolean reloadingRequired(); String getConfigLocalPat...
@Test public void getSidebarTocLowestLevelToCollapseForLength_shouldReturnCorrectValue() throws Exception { Assert.assertEquals(333, DataManager.getInstance().getConfiguration().getSidebarTocLowestLevelToCollapseForLength()); }
Configuration extends AbstractConfiguration { public boolean getDisplayTitleBreadcrumbs() { return getLocalBoolean("webGuiDisplay.displayTitleBreadcrumbs", false); } Configuration(String configFilePath); Set<String> getStopwords(); boolean reloadingRequired(); String getConfigLocalPath(); String getLocalRessourceBundle...
@Test public void getDisplayTitleBreadcrumbs_shouldReturnCorrectValue() throws Exception { Assert.assertTrue(DataManager.getInstance().getConfiguration().getDisplayTitleBreadcrumbs()); }
Configuration extends AbstractConfiguration { public boolean getIncludeAnchorInTitleBreadcrumbs() { return this.getLocalBoolean("webGuiDisplay.displayTitleBreadcrumbs[@includeAnchor]", false); } Configuration(String configFilePath); Set<String> getStopwords(); boolean reloadingRequired(); String getConfigLocalPath(); S...
@Test public void getIncludeAnchorInTitleBreadcrumbs_shouldReturnCorrectValue() throws Exception { Assert.assertTrue(DataManager.getInstance().getConfiguration().getIncludeAnchorInTitleBreadcrumbs()); }