diff --git a/sandbox/README b/sandbox/README deleted file mode 100644 index e575a9ed7..000000000 --- a/sandbox/README +++ /dev/null @@ -1,2 +0,0 @@ -See http://code.google.com/p/ontopia/wiki/TheSandbox for a description -of what this is. \ No newline at end of file diff --git a/sandbox/eclipse/README b/sandbox/eclipse/README deleted file mode 100644 index c276100d0..000000000 --- a/sandbox/eclipse/README +++ /dev/null @@ -1,10 +0,0 @@ - -This directory contains Eclipse utilities. - -Currently, it contains a profile and the code templates which follow the - - -- ontopiaprofile.xml - Ontopia profile for Eclipse -- codetemplates.xml - Code templates for Eclipse diff --git a/sandbox/eclipse/codetemplates.xml b/sandbox/eclipse/codetemplates.xml deleted file mode 100644 index b1a4e371d..000000000 --- a/sandbox/eclipse/codetemplates.xml +++ /dev/null @@ -1,39 +0,0 @@ - \ No newline at end of file diff --git a/sandbox/eclipse/ontopiaprofile.xml b/sandbox/eclipse/ontopiaprofile.xml deleted file mode 100644 index 9bd3e50f4..000000000 --- a/sandbox/eclipse/ontopiaprofile.xml +++ /dev/null @@ -1,264 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/sandbox/emacs/README b/sandbox/emacs/README deleted file mode 100644 index bd3fc70a9..000000000 --- a/sandbox/emacs/README +++ /dev/null @@ -1,4 +0,0 @@ - -This directory contains Emacs utilities. For the time being, the only -thing found here is the LTM Emacs mode that was part of the old OKS -distribution. With time, more utilities may appear here. \ No newline at end of file diff --git a/sandbox/emacs/ltm-mode.el b/sandbox/emacs/ltm-mode.el deleted file mode 100644 index 0e1f152f1..000000000 --- a/sandbox/emacs/ltm-mode.el +++ /dev/null @@ -1,117 +0,0 @@ - -;;;; A major mode for editing LTM (Linear Topic Map notation). -;;;; Adds font locking support. - -(defvar ltmm-version "0.02" - "The current version number of ltm-mode.") - -;;; copyright (c) 2003 Ontopia AS, -;;; $Id: ltm-mode.el,v 1.7 2008/12/04 12:46:39 lars.garshol Exp $ - -;;; ltm-mode is free software; you can redistribute it and/or modify -;;; it under the terms of the GNU General Public License as published -;;; by the Free Software Foundation; either version 2, or (at your -;;; option) any later version. -;;; -;;; ltm-mode is distributed in the hope that it will be useful, but -;;; WITHOUT ANY WARRANTY; without even the implied warranty of -;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -;;; General Public License for more details. -;;; -;;; You should have received a copy of the GNU General Public License -;;; along with GNU Emacs; see the file COPYING. If not, write to the -;;; Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA. - -; Send me an email if you want new features (or if you add them -; yourself). I will do my best to preserve the API to functions not -; explicitly marked as internal and variables shown as customizable. I -; make no promises about the rest. - -; Bug reports are very welcome. - -; To install, put this in your .emacs: -; -; (autoload 'ltm-mode "ltm-mode") -; (setq auto-mode-alist -; (cons '("\\.ltm\\'" . ltm-mode) auto-mode-alist)) - -;; Required modules -(require 'font-lock) - -;;; XEmacs compatibility - -(when (not (boundp 'font-lock-constant-face)) - (defvar font-lock-constant-face font-lock-reference-face)) - -;;; The code itself - -(defvar ltm-font-lock-keywords - (list - (cons "\\[\\[[^]]*\\]\\]" font-lock-constant-face) - (cons "#[A-Z]+" font-lock-reference-face) - ;(cons ":\\([ \t\r\n]+[A-Za-z_][-A-Za-z_0-9.]+\\)+" font-lock-builtin-face) - (cons "/\\([ \t\r\n]*[A-Za-z_][-A-Za-z_0-9.]+\\)+" font-lock-keyword-face) - (cons "{[A-Za-z_][-A-Za-z_0-9.]+" font-lock-type-face) - (cons "[A-Za-z_][-A-Za-z_0-9.]*([^)]+)" font-lock-function-name-face) - (cons "[^]]\\[[A-Za-z_][-A-Za-z_0-9.]*\\( \\|]\\)" font-lock-variable-name-face)) - "Rules for highlighting LTM topic maps.") - -(defvar ltm-mode-map () - "Keymap used in LTM mode.") -(when (not ltm-mode-map) - (setq ltm-mode-map (make-sparse-keymap)) - (define-key ltm-mode-map (read-kbd-macro "C-c C-i") 'ltm-add-int-occurrence) - (define-key ltm-mode-map (read-kbd-macro "C-c C-o") 'ltm-add-int-occurrence-yank) - (define-key ltm-mode-map (read-kbd-macro "C-c C-v") 'ltm-add-ext-occurrence-yank)) - -(defun ltm-add-int-occurrence(topicid occtypeid) - (interactive "sTopic: \nsOccurrence type: ") - (insert "{" topicid ", " occtypeid ", [[]]}\n") - (backward-char 4)) -(defun ltm-add-int-occurrence-yank(topicid occtypeid) - (interactive "sTopic: \nsOccurrence type: ") - (insert "{" topicid ", " occtypeid ", [[") - (yank) - (insert "]]}\n")) -(defun ltm-add-ext-occurrence-yank(topicid occtypeid) - (interactive "sTopic: \nsOccurrence type: ") - (insert "{" topicid ", " occtypeid ", \"") - (yank) - (insert "\"}\n")) - -(defun ltm-mode() - "Major mode for editing topic maps in LTM format. -\\{ltm-mode-map}" - (interactive) - - ; Initializing - (kill-all-local-variables) - - ; Setting up font-locking - (make-local-variable 'font-lock-defaults) - (setq font-lock-defaults '(ltm-font-lock-keywords nil t nil nil)) - - ; Setting up keymap - (use-local-map ltm-mode-map) - - ; Setting up syntax recognition - (make-local-variable 'comment-start) - (make-local-variable 'comment-end) - (make-local-variable 'comment-start-skip) - - (setq comment-start "/* " - comment-end " */" - comment-start-skip "/\\*[ \n\t]+") - - ; Setting up syntax table - (modify-syntax-entry ?* ". 23") - (modify-syntax-entry ?/ ". 14") - - ; Final stuff, then we're done - (setq mode-name "LTM" - major-mode 'ltm-mode) - (run-hooks 'ltm-mode-hook)) - -(provide 'ltm-mode) - -;; ltm-mode ends here \ No newline at end of file diff --git a/sandbox/liferay-integration/WEB-INF/jsps/html/portlet/journal/edit_article.jsp b/sandbox/liferay-integration/WEB-INF/jsps/html/portlet/journal/edit_article.jsp deleted file mode 100644 index 27b34e2f7..000000000 --- a/sandbox/liferay-integration/WEB-INF/jsps/html/portlet/journal/edit_article.jsp +++ /dev/null @@ -1,984 +0,0 @@ -<% -/** - * Copyright (c) 2000-2010 Liferay, Inc. All rights reserved. - * - * This library is free software; you can redistribute it and/or modify it under - * the terms of the GNU Lesser General Public License as published by the Free - * Software Foundation; either version 2.1 of the License, or (at your option) - * any later version. - * - * This library is distributed in the hope that it will be useful, but WITHOUT - * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS - * FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more - * details. - */ -%> - -<%@ include file="/html/portlet/journal/init.jsp" %> - -<% -String portletResource = ParamUtil.getString(request, "portletResource"); - -String tabs2 = ParamUtil.getString(request, "tabs2"); - -String redirect = ParamUtil.getString(request, "redirect"); - -// Make sure the redirect is correct. This is a workaround for a layout that -// has both the Journal and Journal Content portlets and the user edits an -// article through the Journal Content portlet and then hits cancel. - -/*if (redirect.indexOf("p_p_id=" + PortletKeys.JOURNAL_CONTENT) != -1) { - if (layoutTypePortlet.hasPortletId(PortletKeys.JOURNAL)) { - PortletURL portletURL = renderResponse.createRenderURL(); - - portletURL.setWindowState(WindowState.NORMAL); - portletURL.setPortletMode(PortletMode.VIEW); - - redirect = portletURL.toString(); - } -}*/ - -String originalRedirect = ParamUtil.getString(request, "originalRedirect", StringPool.BLANK); - -if (originalRedirect.equals(StringPool.BLANK)) { - originalRedirect = redirect; -} -else { - redirect = originalRedirect; -} - -String referringPortletResource = ParamUtil.getString(request, "referringPortletResource"); - -JournalArticle article = (JournalArticle)request.getAttribute(WebKeys.JOURNAL_ARTICLE); - -long groupId = BeanParamUtil.getLong(article, request, "groupId", scopeGroupId); - -String articleId = BeanParamUtil.getString(article, request, "articleId"); -String newArticleId = ParamUtil.getString(request, "newArticleId"); -String instanceIdKey = PwdGenerator.KEY1 + PwdGenerator.KEY2 + PwdGenerator.KEY3; - -double version = BeanParamUtil.getDouble(article, request, "version", JournalArticleConstants.DEFAULT_VERSION); - -Calendar displayDate = CalendarFactoryUtil.getCalendar(timeZone, locale); - -if (article != null) { - if (article.getDisplayDate() != null) { - displayDate.setTime(article.getDisplayDate()); - } -} - -boolean neverExpire = ParamUtil.getBoolean(request, "neverExpire", true); - -Calendar expirationDate = CalendarFactoryUtil.getCalendar(timeZone, locale); - -expirationDate.add(Calendar.YEAR, 1); - -if (article != null) { - if (article.getExpirationDate() != null) { - neverExpire = false; - - expirationDate.setTime(article.getExpirationDate()); - } -} - -boolean neverReview = ParamUtil.getBoolean(request, "neverReview", true); - -Calendar reviewDate = CalendarFactoryUtil.getCalendar(timeZone, locale); - -reviewDate.add(Calendar.MONTH, 9); - -if (article != null) { - if (article.getReviewDate() != null) { - neverReview = false; - - reviewDate.setTime(article.getReviewDate()); - } -} - -String type = BeanParamUtil.getString(article, request, "type", "general"); - -String structureId = BeanParamUtil.getString(article, request, "structureId"); - -JournalStructure structure = null; - -String parentStructureId = StringPool.BLANK; -String structureName = LanguageUtil.get(pageContext, "default"); -String structureDescription = StringPool.BLANK; -String structureXSD = StringPool.BLANK; - -if (Validator.isNotNull(structureId)) { - try { - structure = JournalStructureLocalServiceUtil.getStructure(groupId, structureId); - - parentStructureId = structure.getParentStructureId(); - structureName = structure.getName(); - structureDescription = structure.getDescription(); - structureXSD = structure.getMergedXsd(); - } - catch (NoSuchStructureException nsse) { - } -} - -List templates = new ArrayList(); - -if (structure != null) { - templates = JournalTemplateLocalServiceUtil.getStructureTemplates(groupId, structureId); -} - -String templateId = BeanParamUtil.getString(article, request, "templateId"); - -if ((structure == null) && Validator.isNotNull(templateId)) { - JournalTemplate template = null; - - try { - template = JournalTemplateLocalServiceUtil.getTemplate(groupId, templateId); - - structureId = template.getStructureId(); - - structure = JournalStructureLocalServiceUtil.getStructure(groupId, structureId); - - structureName = structure.getName(); - - templates = JournalTemplateLocalServiceUtil.getStructureTemplates(groupId, structureId); - } - catch (NoSuchTemplateException nste) { - } -} - -String languageId = LanguageUtil.getLanguageId(request); - -String defaultLanguageId = ParamUtil.getString(request, "defaultLanguageId"); - -if (article == null) { - defaultLanguageId = languageId; -} -else { - if (Validator.isNull(defaultLanguageId)) { - defaultLanguageId = article.getDefaultLocale(); - } -} - -Locale defaultLocale = LocaleUtil.fromLanguageId(defaultLanguageId); - -String content = null; - -if (article != null) { - content = ParamUtil.getString(request, "content"); - - if (Validator.isNull(content)) { - content = article.getContent(); - } - - content = JournalArticleImpl.getContentByLocale(content, Validator.isNotNull(structureId), languageId); -} -else { - content = ParamUtil.getString(request, "content"); -} - -Document contentDoc = null; - -String[] availableLocales = null; - -if (Validator.isNotNull(content)) { - try { - contentDoc = SAXReaderUtil.read(content); - - Element contentEl = contentDoc.getRootElement(); - - availableLocales = StringUtil.split(contentEl.attributeValue("available-locales")); - - if (!ArrayUtil.contains(availableLocales, defaultLanguageId)) { - availableLocales = ArrayUtil.append(availableLocales, defaultLanguageId); - } - - if (structure == null) { - content = contentDoc.getRootElement().element("static-content").getText(); - } - } - catch (Exception e) { - contentDoc = null; - } -} - -boolean smallImage = BeanParamUtil.getBoolean(article, request, "smallImage"); -String smallImageURL = BeanParamUtil.getString(article, request, "smallImageURL"); -%> - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
- - - - - - - - - - - - - - - - - - <%-- START OF ONTOPIA PLUGIN CODE --%> - - <%-- END OF ONTOPIA PLUGIN CODE --%> -
- - - - - - - - - - - - - - - - - - -
- -
- - - - - - - - -
- - - <% - Locale[] locales = LanguageUtil.getAvailableLocales(); - - for (int i = 0; i < locales.length; i++) { - %> - - - - <% - } - %> - - - - - - - - - - - -
- - - <% - if ((availableLocales != null) && (availableLocales.length > 0)) { - boolean wasLanguageId = false; - - for (int i = 0; i < availableLocales.length; i++) { - if (availableLocales[i].equals(languageId)) { - wasLanguageId = true; - } - - Locale availableLocale = LocaleUtil.fromLanguageId(availableLocales[i]); - %> - - - - <% - } - - if (!wasLanguageId) { - Locale languageLocale = LocaleUtil.fromLanguageId(languageId); - %> - - - - <% - } - } - else { - %> - - - - <% - } - %> - - - - - - -
-
-
- Ontopoly: - <% - /* Ontopia Plugin Code */ - /* Note: Only works with tweaked catalina config. See Docs */ - String topicId = ""; - String topicTypeId = ""; - String topicMapId = ""; - String viewId = ""; - tm.OntopiaAdapterIF ont = tm.OntopiaAdapter.getInstance(true); - if(article == null) - article = (JournalArticle)request.getAttribute(WebKeys.JOURNAL_ARTICLE); - if(article != null) { - topicMapId = ont.getTopicMapId(); - topicTypeId = ont.getTopicTypeIdForUuid(article.getUuid()); - topicId = ont.getObjectIdForUuid(article.getUuid()); - viewId = ont.getConceptViewId(); - } - %> - - - -
- -
- -
- - -
-
    -
  • - - - -
    -
    - - - -
    - -
    - -
    - -
    - -
    - - - - - -
    -
    - -
      -
      -
    • -
    -
    -
    - - - <% - Document xsdDoc = SAXReaderUtil.read(structure.getMergedXsd()); - - if (contentDoc != null) { - %> - - - - <% - boolean languageFound = false; - - if ((availableLocales != null) && (availableLocales.length > 0)) { - for (int i = 0; i < availableLocales.length ; i++) { - if (!availableLocales[i].equals(defaultLanguageId)) { - %> - - - - - document.fm1.languageId.options[getChoice('<%= availableLocales[i] %>')].className = 'focused'; - - - <% - } - else{ - %> - - - document.fm1.languageId.options[getChoice('<%= availableLocales[i] %>')].className = 'focused'; - - - <% - } - - if (availableLocales[i].equals(languageId)) { - languageFound = true; - } - } - } - - if (!languageFound && !languageId.equals(defaultLanguageId)) { - %> - - - - - document.fm1.removeArticleLocaleButton.disabled = true; - - - <% - } - } - else { - contentDoc = SAXReaderUtil.createDocument(SAXReaderUtil.createElement("root")); - %> - - - - <% - } - %> - -
    -
      - <% _format(groupId, contentDoc.getRootElement(), xsdDoc.getRootElement(), new IntegerWrapper(0), new Integer(-1), true, pageContext, request); %> -
    -
    -
    -
    - - - - - - -
    - -
    - - - - - <% - String[] imageExtensions = PrefsPropsUtil.getStringArray(PropsKeys.JOURNAL_IMAGE_EXTENSIONS, StringPool.COMMA); - %> - - <%= StringUtil.merge(imageExtensions, ", ") %>. - - - - - - - - - - - - -- <%= LanguageUtil.get(pageContext, "or").toUpperCase() %> -- - - - - - - - - - - -
    - - - - - - - - <% - for (int i = 0; i < JournalArticleConstants.TYPES.length; i++) { - %> - - - - <% - } - %> - - - - <% - long classPK = 0; - - if (article != null) { - classPK = article.getResourcePrimKey(); - - if (!article.isApproved() && (article.getVersion() != JournalArticleConstants.DEFAULT_VERSION)) { - try { - AssetEntryLocalServiceUtil.getEntry(JournalArticle.class.getName(), article.getPrimaryKey()); - - classPK = article.getPrimaryKey(); - } - catch (NoSuchEntryException nsee) { - } - } - } - %> - - - - - - - - - -
    - - <% - boolean approved = false; - boolean pending = false; - - if (article != null) { - approved = article.isApproved(); - pending = article.isPending(); - } - %> - - -
    - -
    -
    - - -
    - -
    -
    - - - - <% - boolean hasSavePermission = false; - - if (article != null) { - hasSavePermission = JournalArticlePermission.contains(permissionChecker, article, ActionKeys.UPDATE); - } - else { - hasSavePermission = JournalPermission.contains(permissionChecker, scopeGroupId, ActionKeys.ADD_ARTICLE); - } - - String saveButtonLabel = "save"; - - if ((article == null) || article.isDraft() || article.isApproved()) { - saveButtonLabel = "save-as-draft"; - } - - String publishButtonLabel = "publish"; - - if (WorkflowDefinitionLinkLocalServiceUtil.hasWorkflowDefinitionLink(themeDisplay.getCompanyId(), scopeGroupId, JournalArticle.class.getName())) { - publishButtonLabel = "submit-for-publication"; - } - - String deleteButtonLabel = "delete-version"; - - if ((article != null) && article.isDraft()) { - deleteButtonLabel = "discard-draft"; - } - %> - - - - - - - - - - - - - - - - - - - - - - - - - -
    - <%@ include file="edit_article_extra.jspf" %> -
    -
    - -<%@ include file="edit_article_structure_extra.jspf" %> - - - var documentLibraryInput = null; - var imageGalleryInput = null; - var contentChangedFlag = false; - - function contentChanged() { - contentChangedFlag = true; - } - - function deleteArticle() { - - - var confirmationMessage = '<%= UnicodeLanguageUtil.get(pageContext, "are-you-sure-you-want-to-discard-this-draft") %>'; - - - var confirmationMessage = '<%= UnicodeLanguageUtil.get(pageContext, "are-you-sure-you-want-to-delete-this-article-version") %>'; - - - - if (confirm(confirmationMessage)) { - document.fm1.<%= Constants.CMD %>.value = "<%= Constants.DELETE %>"; - submitForm(document.fm1); - } - } - - function editorContentChanged(text) { - contentChanged(); - } - - function expireArticle() { - document.fm1.<%= Constants.CMD %>.value = "<%= Constants.EXPIRE %>"; - submitForm(document.fm1); - } - - function getChoice(value) { - for (var i = 0; i < document.fm1.languageId.length; i++) { - if (document.fm1.languageId.options[i].value == value) { - return document.fm1.languageId.options[i].index; - } - } - - return null; - } - - function getLanguageViewURL(languageId) { - return "&languageId=" + languageId; - } - - function initEditor() { - return "<%= UnicodeFormatter.toString(content) %>"; - } - - function removeArticleLocale() { - if (confirm("<%= UnicodeLanguageUtil.get(pageContext, "are-you-sure-you-want-to-deactivate-this-language") %>")) { - document.fm1.<%= Constants.CMD %>.value = "removeArticlesLocale"; - document.fm1.redirect.value = "&languageId=<%= defaultLanguageId %>"; - submitForm(document.fm1); - } - } - - function selectDocumentLibrary(url) { - document.getElementById(documentLibraryInput).value = url; - } - - function selectImageGallery(url) { - document.getElementById(imageGalleryInput).value = url; - } - - function selectStructure(structureId) { - if (document.fm1.structureId.value != structureId) { - document.fm1.structureId.value = structureId; - document.fm1.templateId.value = ""; - submitForm(document.fm1); - } - } - - function selectTemplate(structureId, templateId) { - document.fm1.structureId.value = structureId; - document.fm1.templateId.value = templateId; - submitForm(document.fm1); - } - - Liferay.provide( - window, - 'disableInputDate', - function(date, checked) { - var A = AUI(); - - document.fm1["" + date + "Hour"].disabled = checked; - document.fm1["" + date + "Minute"].disabled = checked; - document.fm1["" + date + "AmPm"].disabled = checked; - - var calendarWidgetId = document.fm1["" + date + "Month"].getAttribute('data-auiComponentID'); - - var calendarWidget = A.Component.getById(calendarWidgetId); - - if (calendarWidget) { - calendarWidget.set('disabled', checked); - } - }, - ['aui-base'] - ); - - Liferay.Util.disableToggleBoxes('autoArticleIdCheckbox','newArticleId', true); - - - - - Liferay.Util.focusFormField(document.fm1.title); - - - Liferay.Util.focusFormField(document.fm1.<%= (article == null) ? "newArticleId" : "title" %>); - - - - - - - - <% - String doAsUserId = themeDisplay.getDoAsUserId(); - - if (Validator.isNull(doAsUserId)) { - doAsUserId = Encryptor.encrypt(company.getKeyObj(), String.valueOf(themeDisplay.getUserId())); - } - %> - - Liferay.Portlet.Journal.PROXY = {}; - Liferay.Portlet.Journal.PROXY.doAsUserId = '<%= HttpUtil.encodeURL(doAsUserId) %>'; - Liferay.Portlet.Journal.PROXY.editorImpl = '<%= PropsUtil.get(EDITOR_WYSIWYG_IMPL_KEY) %>'; - Liferay.Portlet.Journal.PROXY.instanceIdKey = '<%= instanceIdKey %>'; - Liferay.Portlet.Journal.PROXY.pathThemeCss = '<%= HttpUtil.encodeURL(themeDisplay.getPathThemeCss()) %>'; - Liferay.Portlet.Journal.PROXY.portletNamespace = ''; - - new Liferay.Portlet.Journal(Liferay.Portlet.Journal.PROXY.portletNamespace, '<%= HtmlUtil.escape(articleId) %>'); - - -<%! -public static final String EDITOR_WYSIWYG_IMPL_KEY = "editor.wysiwyg.portal-web.docroot.html.portlet.journal.edit_article_content.jsp"; - -private void _format(long groupId, Element contentParentElement, Element xsdParentElement, IntegerWrapper count, Integer depth, boolean repeatablePrototype, PageContext pageContext, HttpServletRequest request) throws Exception { - depth = new Integer(depth.intValue() + 1); - - String languageId = LanguageUtil.getLanguageId(request); - - List xsdElements = xsdParentElement.elements(); - - for (Element xsdElement : xsdElements) { - String nodeName = xsdElement.getName(); - - if (nodeName.equals("meta-data") || nodeName.equals("entry")) { - continue; - } - - String elName = xsdElement.attributeValue("name", StringPool.BLANK); - String elType = xsdElement.attributeValue("type", StringPool.BLANK); - String elIndexType = xsdElement.attributeValue("index-type", StringPool.BLANK); - String repeatable = xsdElement.attributeValue("repeatable"); - boolean elRepeatable = GetterUtil.getBoolean(repeatable); - String elParentStructureId = xsdElement.attributeValue("parent-structure-id"); - - Map elMetaData = _getMetaData(xsdElement, elName); - - List elSiblings = null; - - List contentElements = contentParentElement.elements(); - - for (Element contentElement : contentElements) { - if (elName.equals(contentElement.attributeValue("name", StringPool.BLANK))) { - elSiblings = _getSiblings(contentParentElement, elName); - - break; - } - } - - if (elSiblings == null) { - elSiblings = new ArrayList(); - - Element contentElement = SAXReaderUtil.createElement("dynamic-element"); - - contentElement.addAttribute("instance-id", PwdGenerator.getPassword()); - contentElement.addAttribute("name", elName); - contentElement.addAttribute("type", elType); - contentElement.addAttribute("index-type", elIndexType); - - contentElement.add(SAXReaderUtil.createElement("dynamic-content")); - - elSiblings.add(contentElement); - } - - for (int siblingIndex = 0; siblingIndex < elSiblings.size(); siblingIndex++) { - Element contentElement = elSiblings.get(siblingIndex); - - String elInstanceId = contentElement.attributeValue("instance-id"); - - String elContent = GetterUtil.getString(contentElement.elementText("dynamic-content")); - - if (!elType.equals("document_library") && !elType.equals("image_gallery") && !elType.equals("text") && !elType.equals("text_area") && !elType.equals("text_box")) { - elContent = HtmlUtil.toInputSafe(elContent); - } - - String elLanguageId = StringPool.BLANK; - - Element dynamicContentEl = contentElement.element("dynamic-content"); - - if (dynamicContentEl != null) { - elLanguageId = dynamicContentEl.attributeValue("language-id", StringPool.BLANK); - } - else { - elLanguageId = languageId; - } - - if (repeatablePrototype) { - repeatablePrototype = (siblingIndex == 0); - } - - request.setAttribute(WebKeys.JOURNAL_ARTICLE_GROUP_ID, String.valueOf(groupId)); - - request.setAttribute(WebKeys.JOURNAL_ARTICLE_CONTENT_EL, contentElement); - request.setAttribute(WebKeys.JOURNAL_STRUCTURE_EL, xsdElement); - request.setAttribute(WebKeys.JOURNAL_STRUCTURE_EL_CONTENT, elContent); - request.setAttribute(WebKeys.JOURNAL_STRUCTURE_EL_COUNT, count); - request.setAttribute(WebKeys.JOURNAL_STRUCTURE_EL_DEPTH, depth); - request.setAttribute(WebKeys.JOURNAL_STRUCTURE_EL_INSTANCE_ID, elInstanceId); - request.setAttribute(WebKeys.JOURNAL_STRUCTURE_EL_LANGUAGE_ID, elLanguageId); - request.setAttribute(WebKeys.JOURNAL_STRUCTURE_EL_META_DATA, elMetaData); - request.setAttribute(WebKeys.JOURNAL_STRUCTURE_EL_NAME, elName); - request.setAttribute(WebKeys.JOURNAL_STRUCTURE_EL_PARENT_ID, elParentStructureId); - request.setAttribute(WebKeys.JOURNAL_STRUCTURE_EL_REPEATABLE, String.valueOf(elRepeatable)); - request.setAttribute(WebKeys.JOURNAL_STRUCTURE_EL_REPEATABLE_PROTOTYPE, String.valueOf(repeatablePrototype)); - request.setAttribute(WebKeys.JOURNAL_STRUCTURE_EL_TYPE, elType); - request.setAttribute(WebKeys.JOURNAL_STRUCTURE_EL_INDEX_TYPE, elIndexType); - - pageContext.include("/html/portlet/journal/edit_article_content_xsd_el.jsp"); - - count.increment(); - - if (!elType.equals("list") && !elType.equals("multi-list") && !contentElement.elements().isEmpty()) { - pageContext.include("/html/portlet/journal/edit_article_content_xsd_el_top.jsp"); - - _format(groupId, contentElement, xsdElement, count, depth, repeatablePrototype, pageContext, request); - - request.setAttribute(WebKeys.JOURNAL_STRUCTURE_CLOSE_DROPPABLE_TAG, Boolean.TRUE.toString()); - - pageContext.include("/html/portlet/journal/edit_article_content_xsd_el_bottom.jsp"); - } - - request.setAttribute(WebKeys.JOURNAL_STRUCTURE_CLOSE_DROPPABLE_TAG, Boolean.FALSE.toString()); - - pageContext.include("/html/portlet/journal/edit_article_content_xsd_el_bottom.jsp"); - } - } -} - -private Map _getMetaData(Element xsdElement, String elName) { - Map elMetaData = new HashMap(); - - Element metaData = xsdElement.element("meta-data"); - - if (Validator.isNotNull(metaData)) { - List elMetaDataements = metaData.elements(); - - for (Element elMetaDataement : elMetaDataements) { - String name = elMetaDataement.attributeValue("name"); - String content = elMetaDataement.getText().trim(); - - elMetaData.put(name, content); - } - } - else { - elMetaData.put("label", elName); - } - - return elMetaData; -} - -private List _getSiblings(Element element, String name) { - List elements = new ArrayList(); - - Iterator itr = element.elements().iterator(); - - while (itr.hasNext()) { - Element curElement = itr.next(); - - if (name.equals(curElement.attributeValue("name", StringPool.BLANK))) { - elements.add(curElement); - } - } - - return elements; -} -%> \ No newline at end of file diff --git a/sandbox/liferay-integration/WEB-INF/jsps/html/portlet/journal/edit_article_5.2.jsp b/sandbox/liferay-integration/WEB-INF/jsps/html/portlet/journal/edit_article_5.2.jsp deleted file mode 100644 index 9f61fbcfa..000000000 --- a/sandbox/liferay-integration/WEB-INF/jsps/html/portlet/journal/edit_article_5.2.jsp +++ /dev/null @@ -1,1225 +0,0 @@ -<% -/** - * Copyright (c) 2000-2009 Liferay, Inc. All rights reserved. - * - * Permission is hereby granted, free of charge, to any person obtaining a copy - * of this software and associated documentation files (the "Software"), to deal - * in the Software without restriction, including without limitation the rights - * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell - * copies of the Software, and to permit persons to whom the Software is - * furnished to do so, subject to the following conditions: - * - * The above copyright notice and this permission notice shall be included in - * all copies or substantial portions of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE - * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, - * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE - * SOFTWARE. - */ -%> - -<%@ include file="/html/portlet/journal/init.jsp" %> - -<% -String portletResource = ParamUtil.getString(request, "portletResource"); - -String tabs2 = ParamUtil.getString(request, "tabs2"); - -String redirect = ParamUtil.getString(request, "redirect"); - -// Make sure the redirect is correct. This is a workaround for a layout that -// has both the Journal and Journal Content portlets and the user edits an -// article through the Journal Content portlet and then hits cancel. - -/*if (redirect.indexOf("p_p_id=" + PortletKeys.JOURNAL_CONTENT) != -1) { - if (layoutTypePortlet.hasPortletId(PortletKeys.JOURNAL)) { - PortletURL portletURL = renderResponse.createRenderURL(); - - portletURL.setWindowState(WindowState.NORMAL); - portletURL.setPortletMode(PortletMode.VIEW); - - redirect = portletURL.toString(); - } -}*/ - -String originalRedirect = ParamUtil.getString(request, "originalRedirect", StringPool.BLANK); - -if (originalRedirect.equals(StringPool.BLANK)) { - originalRedirect = redirect; -} -else { - redirect = originalRedirect; -} - -String referringPortletResource = ParamUtil.getString(request, "referringPortletResource"); - -JournalArticle article = (JournalArticle)request.getAttribute(WebKeys.JOURNAL_ARTICLE); - -long groupId = BeanParamUtil.getLong(article, request, "groupId", scopeGroupId); - -String articleId = BeanParamUtil.getString(article, request, "articleId"); -String newArticleId = ParamUtil.getString(request, "newArticleId"); - -double version = BeanParamUtil.getDouble(article, request, "version", JournalArticleImpl.DEFAULT_VERSION); -boolean incrementVersion = ParamUtil.getBoolean(request, "incrementVersion"); - -Calendar displayDate = CalendarFactoryUtil.getCalendar(timeZone, locale); - -if (article != null) { - if (article.getDisplayDate() != null) { - displayDate.setTime(article.getDisplayDate()); - } -} - -boolean neverExpire = ParamUtil.getBoolean(request, "neverExpire", true); - -Calendar expirationDate = CalendarFactoryUtil.getCalendar(timeZone, locale); - -expirationDate.add(Calendar.YEAR, 1); - -if (article != null) { - if (article.getExpirationDate() != null) { - neverExpire = false; - - expirationDate.setTime(article.getExpirationDate()); - } -} - -boolean neverReview = ParamUtil.getBoolean(request, "neverReview", true); - -Calendar reviewDate = CalendarFactoryUtil.getCalendar(timeZone, locale); - -reviewDate.add(Calendar.MONTH, 9); - -if (article != null) { - if (article.getReviewDate() != null) { - neverReview = false; - - reviewDate.setTime(article.getReviewDate()); - } -} - -String type = BeanParamUtil.getString(article, request, "type", "general"); - -String structureId = BeanParamUtil.getString(article, request, "structureId"); - -JournalStructure structure = null; - -String structureName = StringPool.BLANK; - -if (Validator.isNotNull(structureId)) { - try { - structure = JournalStructureLocalServiceUtil.getStructure(groupId, structureId); - - structureName = structure.getName(); - } - catch (NoSuchStructureException nsse) { - } -} - -List templates = new ArrayList(); - -if (structure != null) { - templates = JournalTemplateLocalServiceUtil.getStructureTemplates(groupId, structureId); -} - -String templateId = BeanParamUtil.getString(article, request, "templateId"); - -if ((structure == null) && Validator.isNotNull(templateId)) { - JournalTemplate template = null; - - try { - template = JournalTemplateLocalServiceUtil.getTemplate(groupId, templateId); - - structureId = template.getStructureId(); - - structure = JournalStructureLocalServiceUtil.getStructure(groupId, structureId); - - structureName = structure.getName(); - - templates = JournalTemplateLocalServiceUtil.getStructureTemplates(groupId, structureId); - } - catch (NoSuchTemplateException nste) { - } -} - -String languageId = LanguageUtil.getLanguageId(request); - -String defaultLanguageId = ParamUtil.getString(request, "defaultLanguageId"); - -if (article == null) { - defaultLanguageId = languageId; -} -else { - if (Validator.isNull(defaultLanguageId)) { - defaultLanguageId = article.getDefaultLocale(); - } -} - -Locale defaultLocale = LocaleUtil.fromLanguageId(defaultLanguageId); - -String content = null; - -if (article != null) { - content = ParamUtil.getString(request, "content"); - - if (Validator.isNull(content)) { - content = article.getContent(); - } - - content = JournalArticleImpl.getContentByLocale(content, Validator.isNotNull(structureId), languageId); -} -else { - content = ParamUtil.getString(request, "content"); -} - -Document contentDoc = null; - -String[] availableLocales = null; - -if (Validator.isNotNull(content)) { - try { - contentDoc = SAXReaderUtil.read(content); - - Element contentEl = contentDoc.getRootElement(); - - availableLocales = StringUtil.split(contentEl.attributeValue("available-locales")); - - if (structure == null) { - content = contentDoc.getRootElement().element("static-content").getTextTrim(); - } - } - catch (Exception e) { - contentDoc = null; - } -} - -boolean disableIncrementVersion = false; - -if (PropsValues.JOURNAL_ARTICLE_FORCE_INCREMENT_VERSION) { - boolean latestVersion = (article == null) || (article != null && JournalArticleLocalServiceUtil.isLatestVersion(article.getGroupId(), articleId, version)); - - if (!latestVersion) { - incrementVersion = true; - disableIncrementVersion = true; - } - - if ((article != null) && article.isApproved()) { - incrementVersion = true; - disableIncrementVersion = true; - } -} - -boolean smallImage = BeanParamUtil.getBoolean(article, request, "smallImage"); -String smallImageURL = BeanParamUtil.getString(article, request, "smallImageURL"); -%> - - - -
    - - - - - -
    - -
    ">" enctype="multipart/form-data" method="post" name="fm1" onSubmit="saveArticle(); return false;"> - - - - - - - - - - -">" /> - - - - - - - - - - - - -
    - - - - - - - - - - - - - - - - - - - - - -
    - - - - - - - - - - - - - <%= articleId %> - - - - - - - - - -
    - - - - - - <%= articleId %> - - - - - - - - -
    -
    -
    -
    - - - -
    - - - - - - - - - -
    - - - - " onClick="removeArticleLocale();" /> - - - - - - - -
    - - - - - - - -
    -
    -
    Ontopoly: <% - /* Ontopia Plugin Code */ - /* Note: Does only work with tweaked catalina config. See Docs */ - String topicId = ""; - String topicTypeId = ""; - String topicMapId = ""; - String viewId = ""; - if(article == null){ - article = (JournalArticle)request.getAttribute(WebKeys.JOURNAL_ARTICLE); - } - if(article != null){ - topicMapId = tm.OntopiaAdapter.instance.getTopicMapId(); - topicTypeId = tm.OntopiaAdapter.instance.getTopicTypeIdForUuid(article.getUuid()); - topicId = tm.OntopiaAdapter.instance.getObjectIdForUuid(article.getUuid()); - viewId = tm.OntopiaAdapter.instance.getConceptViewId(); - }%> - - - -
    - -
    - - - -
    - -
    -
    - - - - - - <% - Document xsdDoc = SAXReaderUtil.read(structure.getMergedXsd()); - - if (contentDoc != null) { - %> - - - - <% - boolean languageFound = false; - - if ((availableLocales != null) && (availableLocales.length > 0)) { - for (int i = 0; i < availableLocales.length ;i++) { - if (!availableLocales[i].equals(defaultLanguageId)) { - %> - - - - - - <% - } - else{ - %> - - - - <% - } - - if (availableLocales[i].equals(languageId)) { - languageFound = true; - } - } - } - - if (!languageFound && !languageId.equals(defaultLanguageId)) { - %> - - - - - - <% - } - } - else { - contentDoc = SAXReaderUtil.createDocument(SAXReaderUtil.createElement("root")); - %> - - - - <% - } - - _format(groupId, contentDoc.getRootElement(), xsdDoc.getRootElement(), new IntegerWrapper(0), new Integer(-1), pageContext, request); - %> - -
    -
    -
    - - - - - - - - - - -
    -
    -
    - - - -
    -
    - -
    - - <% - String abstractId = portletDisplay.getNamespace() + "abstract"; - String abstractTitle = LanguageUtil.get(pageContext, "abstract"); - %> - - - - - <% - String[] imageExtensions = PrefsPropsUtil.getStringArray(PropsKeys.JOURNAL_IMAGE_EXTENSIONS, StringPool.COMMA); - %> - - <%= StringUtil.merge(imageExtensions, ", ") %>. - - - - - - - - - - - - - - - - - - - - - - - - -
    - - - -
    -
    -
    - - - -
    - -- <%= LanguageUtil.get(pageContext, "or").toUpperCase() %> -- - - -
    - - - -
    -
    - -
    - -
    - <% - boolean hasSavePermission = false; - - if (article != null) { - hasSavePermission = JournalArticlePermission.contains(permissionChecker, groupId, articleId, ActionKeys.UPDATE); - } - else { - hasSavePermission = JournalPermission.contains(permissionChecker, scopeGroupId, ActionKeys.ADD_ARTICLE); - } - %> - - - " /> - - " onClick="saveAndContinueArticle();" /> - - - " onClick="saveAndApproveArticle();" /> - - - - - " onClick="previewArticle();" /> - - - - " onClick="downloadArticleContent();" /> - - - " onClick="location.href = '<%= HtmlUtil.escape(redirect) %>';" /> -
    -
    - <%@ include file="edit_article_extra.jspf" %> -
    - - - - - - - -<%! -public static final String EDITOR_WYSIWYG_IMPL_KEY = "editor.wysiwyg.portal-web.docroot.html.portlet.journal.edit_article_content.jsp"; - -private void _format(long groupId, Element contentParentElement, Element xsdParentElement, IntegerWrapper count, Integer depth, PageContext pageContext, HttpServletRequest request) throws Exception { - depth = new Integer(depth.intValue() + 1); - - String languageId = LanguageUtil.getLanguageId(request); - - List xsdElements = xsdParentElement.elements(); - - for (Element xsdElement : xsdElements) { - String elName = xsdElement.attributeValue("name", StringPool.BLANK); - String elType = xsdElement.attributeValue("type", StringPool.BLANK); - boolean elRepeatable = GetterUtil.getBoolean(xsdElement.attributeValue("repeatable")); - - List elSiblings = null; - - List contentElements = contentParentElement.elements(); - - for (Element contentElement : contentElements) { - if (elName.equals(contentElement.attributeValue("name", StringPool.BLANK))) { - elSiblings = _getSiblings(contentParentElement, elName); - - break; - } - } - - if (elSiblings == null) { - elSiblings = new ArrayList(); - - Element contentElement = SAXReaderUtil.createElement("dynamic-element"); - - contentElement.addAttribute("instance-id", PwdGenerator.getPassword()); - contentElement.addAttribute("name", elName); - contentElement.addAttribute("type", elType); - - contentElement.add(SAXReaderUtil.createElement("dynamic-content")); - - elSiblings.add(contentElement); - } - - for (int i = 0; i < elSiblings.size(); i++) { - Element contentElement = elSiblings.get(i); - - String elInstanceId = contentElement.attributeValue("instance-id"); - - String elContent = GetterUtil.getString(contentElement.elementText("dynamic-content")); - - if (!elType.equals("text_area")) { - elContent = HtmlUtil.toInputSafe(elContent); - } - - String elLanguageId = StringPool.BLANK; - - Element dynamicContentEl = contentElement.element("dynamic-content"); - - if (dynamicContentEl != null) { - elLanguageId = dynamicContentEl.attributeValue("language-id", StringPool.BLANK); - } - else { - elLanguageId = languageId; - } - - request.setAttribute(WebKeys.JOURNAL_ARTICLE_GROUP_ID, String.valueOf(groupId)); - - request.setAttribute(WebKeys.JOURNAL_STRUCTURE_EL, xsdElement); - request.setAttribute(WebKeys.JOURNAL_STRUCTURE_EL_COUNT, count); - request.setAttribute(WebKeys.JOURNAL_STRUCTURE_EL_DEPTH, depth); - - request.setAttribute(WebKeys.JOURNAL_STRUCTURE_EL_INSTANCE_ID, elInstanceId); - request.setAttribute(WebKeys.JOURNAL_STRUCTURE_EL_NAME, elName); - request.setAttribute(WebKeys.JOURNAL_STRUCTURE_EL_TYPE, elType); - request.setAttribute(WebKeys.JOURNAL_STRUCTURE_EL_REPEATABLE, String.valueOf(elRepeatable)); - request.setAttribute(WebKeys.JOURNAL_STRUCTURE_EL_REPEATABLE_PROTOTYPE, (i == 0) ? "1" : "0"); - request.setAttribute(WebKeys.JOURNAL_STRUCTURE_EL_CONTENT, elContent); - request.setAttribute(WebKeys.JOURNAL_STRUCTURE_EL_LANGUAGE_ID, elLanguageId); - - request.setAttribute(WebKeys.JOURNAL_ARTICLE_CONTENT_EL, contentElement); - - pageContext.include("/html/portlet/journal/edit_article_content_xsd_el.jsp"); - - count.increment(); - - if (!elType.equals("list") && !elType.equals("multi-list")) { - _format(groupId, contentElement, xsdElement, count, depth, pageContext, request); - } - } - } -} - -private List _getSiblings(Element element, String name) { - List elements = new ArrayList(); - - Iterator itr = element.elements().iterator(); - - while (itr.hasNext()) { - Element curElement = itr.next(); - - if (name.equals(curElement.attributeValue("name", StringPool.BLANK))) { - elements.add(curElement); - } - } - - return elements; -} -%> \ No newline at end of file diff --git a/sandbox/liferay-integration/WEB-INF/jsps/html/portlet/wiki/edit_page.jsp b/sandbox/liferay-integration/WEB-INF/jsps/html/portlet/wiki/edit_page.jsp deleted file mode 100644 index 3a501605a..000000000 --- a/sandbox/liferay-integration/WEB-INF/jsps/html/portlet/wiki/edit_page.jsp +++ /dev/null @@ -1,482 +0,0 @@ -<% -/** - * Copyright (c) 2000-2009 Liferay, Inc. All rights reserved. - * - * Permission is hereby granted, free of charge, to any person obtaining a copy - * of this software and associated documentation files (the "Software"), to deal - * in the Software without restriction, including without limitation the rights - * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell - * copies of the Software, and to permit persons to whom the Software is - * furnished to do so, subject to the following conditions: - * - * The above copyright notice and this permission notice shall be included in - * all copies or substantial portions of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE - * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, - * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE - * SOFTWARE. - */ -%> - -<%@ include file="/html/portlet/wiki/init.jsp" %> - -<% -String redirect = ParamUtil.getString(request, "redirect"); - -String originalRedirect = ParamUtil.getString(request, "originalRedirect", StringPool.BLANK); - -if (originalRedirect.equals(StringPool.BLANK)) { - originalRedirect = redirect; -} -else { - redirect = originalRedirect; -} - -boolean followRedirect = false; - -WikiNode node = (WikiNode)request.getAttribute(WebKeys.WIKI_NODE); -WikiPage wikiPage = (WikiPage)request.getAttribute(WebKeys.WIKI_PAGE); - -WikiPage redirectPage = null; - -long nodeId = BeanParamUtil.getLong(wikiPage, request, "nodeId"); -String title = BeanParamUtil.getString(wikiPage, request, "title"); - -boolean editTitle = ParamUtil.getBoolean(request, "editTitle"); - -String content = BeanParamUtil.getString(wikiPage, request, "content"); -String format = BeanParamUtil.getString(wikiPage, request, "format", WikiPageImpl.DEFAULT_FORMAT); -String parentTitle = BeanParamUtil.getString(wikiPage, request, "parentTitle"); - -String[] attachments = new String[0]; - -boolean preview = ParamUtil.getBoolean(request, "preview"); - -boolean newPage = false; - -if (wikiPage == null) { - newPage = true; -} - -boolean editable = false; - -if (wikiPage != null) { - attachments = wikiPage.getAttachmentsFiles(); - - editable = true; -} -else if (Validator.isNotNull(title)) { - try { - WikiPageLocalServiceUtil.validateTitle(title); - - editable = true; - } - catch (PortalException pe) { - } -} -else if ((wikiPage == null) && editTitle) { - editable = true; - - wikiPage = new WikiPageImpl(); - - wikiPage.setNew(true); - wikiPage.setNodeId(node.getNodeId()); - wikiPage.setFormat(format); - wikiPage.setParentTitle(parentTitle); -} - -long templateNodeId = ParamUtil.getLong(request, "templateNodeId"); -String templateTitle = ParamUtil.getString(request, "templateTitle"); - -WikiPage templatePage = null; - -if ((templateNodeId > 0) && Validator.isNotNull(templateTitle)) { - try { - templatePage = WikiPageServiceUtil.getPage(templateNodeId, templateTitle); - - if (Validator.isNull(parentTitle)) { - parentTitle = templatePage.getParentTitle(); - - if (wikiPage.isNew()) { - format = templatePage.getFormat(); - - wikiPage.setContent(templatePage.getContent()); - wikiPage.setFormat(format); - wikiPage.setParentTitle(parentTitle); - } - } - } - catch (Exception e) { - } -} - -PortletURL viewPageURL = renderResponse.createRenderURL(); - -viewPageURL.setParameter("struts_action", "/wiki/view"); -viewPageURL.setParameter("nodeName", node.getName()); -viewPageURL.setParameter("title", title); - -PortletURL editPageURL = renderResponse.createRenderURL(); - -editPageURL.setParameter("struts_action", "/wiki/edit_page"); -editPageURL.setParameter("redirect", currentURL); -editPageURL.setParameter("nodeId", String.valueOf(node.getNodeId())); -editPageURL.setParameter("title", title); - -if (Validator.isNull(redirect)) { - redirect = viewPageURL.toString(); -} -%> - - - - - - - - - - - <%@ include file="/html/portlet/wiki/page_name.jspf" %> - - - - - - <% - if (wikiPage == null) { - wikiPage = new WikiPageImpl(); - } - - wikiPage.setContent(content); - wikiPage.setFormat(format); - %> - - : - -
    - <%@ include file="/html/portlet/wiki/view_page_content.jspf" %> -
    - -
    -
    - - - -
    " method="post" name="fm" onSubmit="savePage(); return false;"> - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    - -
    -
    - -
    - -
    - - " onClick="document.location = '<%= HtmlUtil.escape(redirect) %>'" /> -
    -
    -
    - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    - - - -
    - - - <%= parentTitle %> -
    - - - -
    - -
    - -
    - - <% - request.setAttribute("edit_page.jsp-wikiPage", wikiPage); - %> - - -
    - -
    - - - - - - - - - - - - - - <% - long classPK = 0; - - if (!newPage) { - classPK = wikiPage.getResourcePrimKey(); - } - else if (Validator.isNotNull(templatePage)) { - classPK = templatePage.getResourcePrimKey(); - } - %> - - <% - /* Ontopia Plugin Code */ - String topicId = null; - String topicTypeId = null; - String topicMapId = null; - String viewId = null; - - if(wikiPage != null) { - if(!wikiPage.isNew()) { - topicId = tm.OntopiaAdapter.instance.getObjectIdForUuid(wikiPage.getUuid()); - topicTypeId = tm.OntopiaAdapter.instance.getTopicTypeIdForUuid(wikiPage.getUuid()); - topicMapId = tm.OntopiaAdapter.instance.getTopicMapId(); - viewId = tm.OntopiaAdapter.instance.getConceptViewId(); - } - } - %> - - - - - - - - <% /* Ontopia Plugin Code end */ %> - - - - - - - - - - - - - - - - - - - - - - - - -
    - - - - <% - for (int i = 0; i < attachments.length; i++) { - String fileName = FileUtil.getShortFileName(attachments[i]); - long fileSize = DLServiceUtil.getFileSize(company.getCompanyId(), CompanyConstants.SYSTEM, attachments[i]); - %> - - ">"><%= fileName %> (<%= TextFormatter.formatKB(fileSize, locale) %>k)<%= (i < (attachments.length - 1)) ? ", " : "" %> - - <% - } - %> - -
    -
    -
    - - -
    - - - -
    -
    -
    - - - -
    -
    -
    - - - -
    -
    -
    - - - -
    - -
    - - " /> - - " onClick="saveAndContinuePage();" /> - - " onClick="previewPage();" /> - - " onClick="document.location = '<%= HtmlUtil.escape(redirect) %>'" /> - - - - - - -
    \ No newline at end of file diff --git a/sandbox/liferay-integration/WEB-INF/liferay-hook.xml b/sandbox/liferay-integration/WEB-INF/liferay-hook.xml deleted file mode 100644 index 075b5438b..000000000 --- a/sandbox/liferay-integration/WEB-INF/liferay-hook.xml +++ /dev/null @@ -1,6 +0,0 @@ - - - - portal-ext.properties - /WEB-INF/jsps - diff --git a/sandbox/liferay-integration/WEB-INF/liferay-plugin-package.properties b/sandbox/liferay-integration/WEB-INF/liferay-plugin-package.properties deleted file mode 100644 index b50978fad..000000000 --- a/sandbox/liferay-integration/WEB-INF/liferay-plugin-package.properties +++ /dev/null @@ -1,8 +0,0 @@ -name=Ontopia on Liferay -module-group-id=ontopia -module-incremental-version=1 -tags= -short-description=This hook contains custom configuration used for Ontopia plugin. -change-log= -page-url=http://www.ontopia.net -author=Matthias Fischer, Bouvet ASA diff --git a/sandbox/liferay-integration/WEB-INF/src/listener/GroupListener.java b/sandbox/liferay-integration/WEB-INF/src/listener/GroupListener.java deleted file mode 100644 index 1b13fa812..000000000 --- a/sandbox/liferay-integration/WEB-INF/src/listener/GroupListener.java +++ /dev/null @@ -1,40 +0,0 @@ -package listener; - -import com.liferay.portal.ModelListenerException; -import com.liferay.portal.model.BaseModelListener; -import com.liferay.portal.model.Group; - -import org.slf4j.LoggerFactory; -import org.slf4j.Logger; - -import tm.OntopiaAdapter; - -/** - * This class is notified by liferay whenever changes in Group objects - * occur. It passes these information on to the integration. Groups - * in Liferay comprehend user groups and communities among others. - * Check group.is* methods for an idea what else there is. - * - * @author mfi - */ - -public class GroupListener extends BaseModelListener{ - - private static Logger log = LoggerFactory.getLogger(GroupListener.class); - - public void onAfterCreate(Group group) throws ModelListenerException { - log.debug("### onAfterCreateGroup ###"); - OntopiaAdapter.getInstance().addGroup(group); - } - - public void onAfterRemove(Group group) throws ModelListenerException { - log.debug("### onAfterRemoveGroup ###"); - OntopiaAdapter.getInstance().deleteGroup(group); - } - - - public void onAfterUpdate(Group group) throws ModelListenerException { - log.debug("### onAfterUpdateGroup ###"); - OntopiaAdapter.getInstance().updateGroup(group); - } -} diff --git a/sandbox/liferay-integration/WEB-INF/src/listener/JournalStructureListener.java b/sandbox/liferay-integration/WEB-INF/src/listener/JournalStructureListener.java deleted file mode 100644 index 486354295..000000000 --- a/sandbox/liferay-integration/WEB-INF/src/listener/JournalStructureListener.java +++ /dev/null @@ -1,46 +0,0 @@ -package listener; - -import tm.OntopiaAdapter; - -import com.liferay.portal.ModelListenerException; -import com.liferay.portal.model.BaseModelListener; -import com.liferay.portlet.journal.model.JournalStructure; - -import org.slf4j.LoggerFactory; -import org.slf4j.Logger; - -/** - * This class is notified by Liferay whenever changes in - * JournalStructure objects occur. It passes these events on to - * the integration. - * - *

    Structures are used by Liferay whenever a user wants to design - * her own forms. In Liferay structures require templates to be used. - * Templates define the visual appeal of a structure. There is no - * template listener yet. - * - * @author mfi - */ - -public class JournalStructureListener extends BaseModelListener{ - - private static Logger log = LoggerFactory.getLogger(JournalStructureListener.class); - - public void onAfterCreate(JournalStructure structure) - throws ModelListenerException { - log.debug("### onAfterCreateJournalStructure ###"); - OntopiaAdapter.getInstance().addStructure(structure); - } - - public void onAfterRemove(JournalStructure structure) - throws ModelListenerException { - log.debug("### onAfterRemoveJournalStructure ###"); - OntopiaAdapter.getInstance().deleteStructure(structure.getUuid()); - } - - public void onAfterUpdate(JournalStructure structure) - throws ModelListenerException { - log.debug("### onAfterUpdateJournalStructure ###"); - OntopiaAdapter.getInstance().updateStructure(structure); - } -} diff --git a/sandbox/liferay-integration/WEB-INF/src/listener/UserListener.java b/sandbox/liferay-integration/WEB-INF/src/listener/UserListener.java deleted file mode 100644 index d1b7bb532..000000000 --- a/sandbox/liferay-integration/WEB-INF/src/listener/UserListener.java +++ /dev/null @@ -1,35 +0,0 @@ -package listener; - -import tm.OntopiaAdapter; - -import com.liferay.portal.ModelListenerException; -import com.liferay.portal.model.BaseModelListener; -import com.liferay.portal.model.User; - -import org.slf4j.LoggerFactory; -import org.slf4j.Logger; - -/** - * This class is notified by liferay whenever changes in User objects occur. - * It passes these information on to the integration. - * - * @author mfi - */ -public class UserListener extends BaseModelListener { - private static Logger log = LoggerFactory.getLogger(UserListener.class); - - public void onAfterCreate(User user) throws ModelListenerException { - log.debug("### User Created! ###"); - OntopiaAdapter.getInstance().addUser(user); - } - - public void onAfterRemove(User user) throws ModelListenerException { - log.debug("### User Removed! ###"); - OntopiaAdapter.getInstance().deleteUser(user.getUuid()); - } - - public void onAfterUpdate(User user) throws ModelListenerException { - log.debug("### User updated! ###"); - OntopiaAdapter.getInstance().updateUser(user); - } -} diff --git a/sandbox/liferay-integration/WEB-INF/src/listener/WebcontentListener.java b/sandbox/liferay-integration/WEB-INF/src/listener/WebcontentListener.java deleted file mode 100644 index 80b147a85..000000000 --- a/sandbox/liferay-integration/WEB-INF/src/listener/WebcontentListener.java +++ /dev/null @@ -1,45 +0,0 @@ -package listener; - -import tm.OntopiaAdapter; - -import com.liferay.portal.ModelListenerException; -import com.liferay.portal.model.BaseModelListener; -import com.liferay.portlet.journal.model.JournalArticle; - -import org.slf4j.LoggerFactory; -import org.slf4j.Logger; - -/** - * This class is notified by Liferay whenever changes in - * JournalArticle objects occur. It passes this information on to the - * integration. - * - *

    In Liferay JournalArticle is everything that is called - * "Webcontent" in the Controlpanel (with the obvious exception of - * structures and templates). Whenever content for a - * WebcontentDisplay or a page is created/updated/deleted, this - * listener will be triggered. The name JournalArticle is there for - * historical reasons in Liferay, as "Webcontent" was formerly called - * "Journal". - * - * @author mfi - */ -public class WebcontentListener extends BaseModelListener { - - private static Logger log = LoggerFactory.getLogger(WebcontentListener.class); - - public void onAfterCreate(JournalArticle article) throws ModelListenerException { - log.info("### OnAfterCreateArticle ###"); - OntopiaAdapter.getInstance().addWebContent(article); - } - - public void onAfterRemove(JournalArticle article) throws ModelListenerException { - log.info("### OnAfterRemoveArticle ###"); - OntopiaAdapter.getInstance().deleteWebContent(article.getUuid()); - } - - public void onAfterUpdate(JournalArticle article) throws ModelListenerException { - log.info("### OnAfterUpdateArticle ###"); - OntopiaAdapter.getInstance().updateWebContent(article); - } -} diff --git a/sandbox/liferay-integration/WEB-INF/src/listener/WikiNodeListener.java b/sandbox/liferay-integration/WEB-INF/src/listener/WikiNodeListener.java deleted file mode 100644 index 9e55a07fe..000000000 --- a/sandbox/liferay-integration/WEB-INF/src/listener/WikiNodeListener.java +++ /dev/null @@ -1,46 +0,0 @@ -package listener; - -import com.liferay.portal.ModelListenerException; -import com.liferay.portal.model.BaseModelListener; -import com.liferay.portlet.wiki.model.WikiNode; - - -import org.slf4j.LoggerFactory; -import org.slf4j.Logger; - -import tm.OntopiaAdapter; - -/** - * This class is notified by liferay whenever changes in WikiNode - * objects occur. It passes these information on to the integration. - * - * WikiNodes is a liferay term for a Wiki as such (containing WikiPages). - * @see WikiPageListener - * - * Whenever a user creates/updates/deletes a Wiki in liferay, this - * listener will be triggered. This listener will also be triggered - * whenever a WikiPage inside a WikiNode has been updated, as the - * WikiNode contains information about the last change to that wiki. - * - * @author mfi - */ - -public class WikiNodeListener extends BaseModelListener{ - - private static Logger log = LoggerFactory.getLogger(WikiNodeListener.class); - - public void onAfterCreate(WikiNode node) throws ModelListenerException { - log.debug("### onAfterCreate WikiNode ###"); - OntopiaAdapter.getInstance().addWikiNode(node); - } - - public void onAfterRemove(WikiNode node) throws ModelListenerException { - log.debug("### onAfterRemove WikiNode ###"); - OntopiaAdapter.getInstance().deleteWikiNode(node.getUuid()); - } - - public void onAfterUpdate(WikiNode node) throws ModelListenerException { - log.debug("### onAfterUpdate WikiNode ###"); - OntopiaAdapter.getInstance().updateWikiNode(node); - } -} diff --git a/sandbox/liferay-integration/WEB-INF/src/listener/WikiPageListener.java b/sandbox/liferay-integration/WEB-INF/src/listener/WikiPageListener.java deleted file mode 100644 index 271e99c48..000000000 --- a/sandbox/liferay-integration/WEB-INF/src/listener/WikiPageListener.java +++ /dev/null @@ -1,40 +0,0 @@ -package listener; - -import com.liferay.portal.ModelListenerException; -import com.liferay.portal.model.BaseModelListener; -import com.liferay.portlet.wiki.model.WikiPage; - -import org.slf4j.LoggerFactory; -import org.slf4j.Logger; - -import tm.OntopiaAdapter; - -/** - * This class is notified by liferay whenever changes in WikiPage objects occur. - * It passes these information on to the integration. - * - * WikiPages are contained inside Wikis, which liferay calls "WikiNodes". - * @see WikiNodeListener - * - * @author mfi - */ - -public class WikiPageListener extends BaseModelListener{ - - private static Logger log = LoggerFactory.getLogger(WikiPageListener.class); - - public void onAfterCreate(WikiPage page) throws ModelListenerException { - log.debug("### OnAfterCreate WikiPage ###"); - OntopiaAdapter.getInstance().addWikiPage(page); - } - - public void onAfterRemove(WikiPage page) throws ModelListenerException { - log.debug("### OnAfterRemove WikiPage ###"); - OntopiaAdapter.getInstance().deleteWikiPage(page.getUuid()); - } - - public void onAfterUpdate(WikiPage page) throws ModelListenerException { - log.debug("### OnAfterUpdate WikiPage ###"); - OntopiaAdapter.getInstance().updateWikiPage(page); - } -} diff --git a/sandbox/liferay-integration/WEB-INF/src/listener/package.html b/sandbox/liferay-integration/WEB-INF/src/listener/package.html deleted file mode 100644 index 6655aca0e..000000000 --- a/sandbox/liferay-integration/WEB-INF/src/listener/package.html +++ /dev/null @@ -1,10 +0,0 @@ - - - This package provides all the listeners for the integration. - Listeners are triggered by Liferay whenever a change in the model occurrs. - Listeners are provided with objects from Liferay representing the changed entities (WikiPage, JournalArticle, WikiNode ...) - The integration is fed with information through these listeners. - - diff --git a/sandbox/liferay-integration/WEB-INF/src/portal-ext.properties b/sandbox/liferay-integration/WEB-INF/src/portal-ext.properties deleted file mode 100644 index edc600086..000000000 --- a/sandbox/liferay-integration/WEB-INF/src/portal-ext.properties +++ /dev/null @@ -1,6 +0,0 @@ -value.object.listener.com.liferay.portlet.journal.model.JournalArticle=listener.WebcontentListener -value.object.listener.com.liferay.portlet.journal.model.JournalStructure=listener.JournalStructureListener -value.object.listener.com.liferay.portal.model.User=listener.UserListener -value.object.listener.com.liferay.portal.model.Group=listener.GroupListener -value.object.listener.com.liferay.portlet.wiki.model.WikiNode=listener.WikiNodeListener -value.object.listener.com.liferay.portlet.wiki.model.WikiPage=listener.WikiPageListener \ No newline at end of file diff --git a/sandbox/liferay-integration/WEB-INF/src/tm/FragmentOntopiaAdapter.java b/sandbox/liferay-integration/WEB-INF/src/tm/FragmentOntopiaAdapter.java deleted file mode 100644 index a9b9bbab6..000000000 --- a/sandbox/liferay-integration/WEB-INF/src/tm/FragmentOntopiaAdapter.java +++ /dev/null @@ -1,71 +0,0 @@ -package tm; - -import java.io.InputStream; -import java.io.IOException; -import java.net.MalformedURLException; -import java.util.Collection; -import java.util.HashMap; -import java.util.Iterator; -import java.util.Map; -import java.util.Properties; - -import com.liferay.portal.model.Group; -import com.liferay.portal.model.User; -import com.liferay.portlet.journal.model.JournalArticle; -import com.liferay.portlet.journal.model.JournalStructure; -import com.liferay.portlet.wiki.model.WikiNode; -import com.liferay.portlet.wiki.model.WikiPage; -import com.liferay.portal.kernel.exception.SystemException; - -import net.ontopia.utils.OntopiaRuntimeException; -import net.ontopia.infoset.core.LocatorIF; -import net.ontopia.infoset.impl.basic.GenericLocator; -import net.ontopia.infoset.impl.basic.URILocator; -import net.ontopia.topicmaps.core.AssociationIF; -import net.ontopia.topicmaps.core.TopicIF; -import net.ontopia.topicmaps.core.TopicMapIF; -import net.ontopia.topicmaps.core.TopicMapStoreIF; -import net.ontopia.topicmaps.core.TopicNameIF; -import net.ontopia.topicmaps.entry.TopicMaps; -import net.ontopia.topicmaps.impl.basic.InMemoryTopicMapStore; -import net.ontopia.topicmaps.query.core.InvalidQueryException; -import net.ontopia.topicmaps.query.core.QueryProcessorIF; -import net.ontopia.topicmaps.query.core.QueryResultIF; -import net.ontopia.topicmaps.query.utils.QueryUtils; -import net.ontopia.topicmaps.query.utils.QueryWrapper; -import net.ontopia.topicmaps.utils.TopicMapSynchronizer; - -import org.slf4j.LoggerFactory; -import org.slf4j.Logger; - -import util.DateFormatter; - -/** - * This is a specialized version of the adapter which is used to - * create an in-memory fragment representing some Liferay object. That - * fragment is then used synchronized into the main topic map using - * TMSync. This approach greatly simplifies updates. - */ -public class FragmentOntopiaAdapter extends OntopiaAdapter { - private OntopiaAdapter base; - - protected FragmentOntopiaAdapter(OntopiaAdapter base) { - // since we don't have a reference to the main topic map we cannot - // look up needed information, and so we delegate to the base - // adapter for these methods. - this.base = base; - - // the main difference with the normal adapter is the next line, which - // ensures modifications go into the fragment TM instead of the main TM - setup(new InMemoryTopicMapStore()); - } - - protected TopicIF getTopicByGroupId(String groupId) { - return base.getTopicByGroupId(groupId); - } - - protected String findStructureUrnByStructureId(String structureId) { - return base.findStructureUrnByStructureId(structureId); - } - -} diff --git a/sandbox/liferay-integration/WEB-INF/src/tm/JournalArticleWrapper.java b/sandbox/liferay-integration/WEB-INF/src/tm/JournalArticleWrapper.java deleted file mode 100644 index 8610fec2a..000000000 --- a/sandbox/liferay-integration/WEB-INF/src/tm/JournalArticleWrapper.java +++ /dev/null @@ -1,195 +0,0 @@ - -package tm; - -import java.util.Date; -import java.lang.reflect.Method; -import java.lang.reflect.InvocationTargetException; - -import net.ontopia.utils.OntopiaRuntimeException; - -import com.liferay.portlet.journal.model.JournalArticle; -import com.liferay.portal.kernel.exception.SystemException; - -public class JournalArticleWrapper { - private JournalArticle article; - protected static final Class[] NO_PARAMS = new Class[] { }; - protected static final Object[] NO_ARGS = new Object[] { }; - - public JournalArticleWrapper(JournalArticle article) { - this.article = article; - } - - /** - * Returns a UUID identifying this particular article. - */ - public String getUuid() { - return article.getUuid(); - } - - /** - * Returns the database ID of this particular article. - */ - public String getArticleId() { - return article.getArticleId(); - } - - /** - * Returns the title of the article. - */ - public String getTitle() { - return article.getTitle(); - } - - /** - * Returns the last version number of the article. - */ - public double getVersion() { - return article.getVersion(); - } - - /** - * Returns the database ID of the structure this article uses. If - * the article has no structure it returns the empty string. - */ - public String getStructureId() { - return article.getStructureId(); - } - - // so, what does this method actually do? wish I knew. - public String getUserUuid() throws SystemException { - return article.getUserUuid(); - } - - // so, what does this method actually do? wish I knew. - public long getUserId() throws SystemException { - return article.getUserId(); - } - - // so, what does this method actually do? wish I knew. - public long getGroupId() { - return article.getGroupId(); - } - - /** - * Returns true iff this article is approved. - */ - public boolean isApproved() { - return article.isApproved(); - } - - /** - * Returns true iff this article is expired. - */ - public boolean isExpired() { - return article.isExpired(); - } - - /** - * Returns the time when the article was created. - */ - public Date getCreateDate() { - return article.getCreateDate(); - } - - /** - * Returns the time of the article's last modification. - */ - public Date getModifiedDate() { - return article.getModifiedDate(); - } - - // ??? - public Date getReviewDate() { - return article.getReviewDate(); - } - - // ??? - public Date getDisplayDate() { - return article.getDisplayDate(); - } - - // ??? - public Date getExpirationDate() { - return article.getExpirationDate(); - } - - // not entirely clear what this method does. it seems to return the - // uuid of the user which put the article into its current workflow - // state. in 5.2 this was called getApprovedByUserUuid, so here we - // must take Liferay version into account. - public String getStatusByUserUuid() { - String methodname; - if (WrapperFactory.getLiferayVersion() == 60) - methodname = "getStatusByUserUuid"; - else if (WrapperFactory.getLiferayVersion() == 52) - methodname = "getApprovedByUserUuid"; - else - throw new OntopiaRuntimeException("Unknown Liferay version"); - - return (String) invoke(methodname); - } - - // not entirely clear what this method does. it seems to return the - // database id of the user which put the article into its current - // workflow state. in 5.2 this was called getApprovedByUserId, so - // here we must take Liferay version into account. - public long getStatusByUserId() { - String methodname; - if (WrapperFactory.getLiferayVersion() == 60) - methodname = "getStatusByUserId"; - else if (WrapperFactory.getLiferayVersion() == 52) - methodname = "getApprovedByUserId"; - else - throw new OntopiaRuntimeException("Unknown Liferay version"); - - return ((Long) invoke(methodname)).longValue(); - } - - // not entirely clear what this method does. it seems to return the - // some form of name for the user which put the article into its - // current workflow state. in 5.2 this was called - // getApprovedByUserName, so here we must take Liferay version into - // account. - public String getStatusByUserName() { - String methodname; - if (WrapperFactory.getLiferayVersion() == 60) - methodname = "getStatusByUserName"; - else if (WrapperFactory.getLiferayVersion() == 52) - methodname = "getApprovedByUserName"; - else - throw new OntopiaRuntimeException("Unknown Liferay version"); - - return (String) invoke(methodname); - } - - // not entirely clear what this method does. it seems to return the - // when the article entered its current workflow state. in 5.2 this - // was called getApprovedDate, so here we must take Liferay - // version into account. - public Date getStatusDate() { - String methodname; - if (WrapperFactory.getLiferayVersion() == 60) - methodname = "getStatusDate"; - else if (WrapperFactory.getLiferayVersion() == 52) - methodname = "getApprovedDate"; - else - throw new OntopiaRuntimeException("Unknown Liferay version"); - - return (Date) invoke(methodname); - } - - // --- - - private Object invoke(String methodname) { - try { - Method method = article.getClass().getMethod(methodname, NO_PARAMS); - return method.invoke(article, NO_ARGS); - } catch (NoSuchMethodException e) { - throw new OntopiaRuntimeException(e); - } catch (IllegalAccessException e) { - throw new OntopiaRuntimeException(e); - } catch (InvocationTargetException e) { - throw new OntopiaRuntimeException(e); - } - } -} \ No newline at end of file diff --git a/sandbox/liferay-integration/WEB-INF/src/tm/OntopiaAdapter.java b/sandbox/liferay-integration/WEB-INF/src/tm/OntopiaAdapter.java deleted file mode 100644 index 29a57e9aa..000000000 --- a/sandbox/liferay-integration/WEB-INF/src/tm/OntopiaAdapter.java +++ /dev/null @@ -1,1137 +0,0 @@ -package tm; - -import java.io.InputStream; -import java.io.IOException; -import java.net.MalformedURLException; -import java.util.Collection; -import java.util.HashMap; -import java.util.Iterator; -import java.util.Map; -import java.util.Properties; - -import com.liferay.portal.model.Group; -import com.liferay.portal.model.User; -import com.liferay.portlet.journal.model.JournalArticle; -import com.liferay.portlet.journal.model.JournalStructure; -import com.liferay.portlet.wiki.model.WikiNode; -import com.liferay.portlet.wiki.model.WikiPage; -import com.liferay.portal.kernel.exception.SystemException; - -import net.ontopia.utils.OntopiaRuntimeException; -import net.ontopia.infoset.core.LocatorIF; -import net.ontopia.infoset.impl.basic.GenericLocator; -import net.ontopia.infoset.impl.basic.URILocator; -import net.ontopia.topicmaps.core.AssociationIF; -import net.ontopia.topicmaps.core.TopicIF; -import net.ontopia.topicmaps.core.TopicMapIF; -import net.ontopia.topicmaps.core.TopicMapStoreIF; -import net.ontopia.topicmaps.core.TopicNameIF; -import net.ontopia.topicmaps.entry.TopicMaps; -import net.ontopia.topicmaps.impl.basic.InMemoryTopicMapStore; -import net.ontopia.topicmaps.query.core.InvalidQueryException; -import net.ontopia.topicmaps.query.core.QueryProcessorIF; -import net.ontopia.topicmaps.query.core.QueryResultIF; -import net.ontopia.topicmaps.query.utils.QueryUtils; -import net.ontopia.topicmaps.query.utils.QueryWrapper; -import net.ontopia.topicmaps.utils.TopicMapSynchronizer; - -import org.slf4j.LoggerFactory; -import org.slf4j.Logger; - -import util.DateFormatter; - -/** - * The Liferay/Ontopia data integration, which builds a topic map - * reflecting the data in Liferay, allowing web content, wiki pages, - * and so on to be annotated in the topic map. - */ -public class OntopiaAdapter implements OntopiaAdapterIF { - private static Logger log = LoggerFactory.getLogger(OntopiaAdapter.class); - - // this prefix is pretty much the same in all tolog queries - private static final String PSI_PREFIX = "http://psi.ontopia.net/liferay/"; - - // these are referenced from other classes, but not in this one - public static final String ASSOC_CREATED_BY_PSI = PSI_PREFIX + "created_by"; - public static final String ASSOC_USER_APPROVING_PSI = PSI_PREFIX + "approved_by"; - public static final String ASSOC_HAS_WORKFLOW_STATE_PSI = PSI_PREFIX + "has_workflow_state"; - public static final String SUB_SUPERTYPE_PSI = "http://psi.topicmaps.org/iso13250/model/supertype-subtype"; - public static final String ASSOC_CONTAINS_PSI = PSI_PREFIX + "contains"; - public static final String ASSOC_PARENT_CHILD_PSI = PSI_PREFIX + "parent-child"; - public static final String ASSOC_IS_ABOUT_PSI = PSI_PREFIX + "is-about"; - - // constants - private static final String TOPICMAPNAMEKEY = "topicmapname"; - private static final String PROPERTYFILENAME ="ontopia.properties"; - - // static members - private static String tmName; // ID of the Liferay TM in the TM registry - - // dynamic members - protected TopicMapStoreIF store; - protected TopicMapIF topicmap; - protected QueryWrapper queryWrapper; - - /** - * The constructor is private, so that instances can only be - * produced via the getInstance() method. Note that the class is not - * a singleton. - */ - private OntopiaAdapter(boolean readonly) { - configure(); - setup(TopicMaps.createStore(tmName, readonly)); - } - - /** - * Needed by subclass FragmentOntopiaAdapter. - */ - protected OntopiaAdapter() { - } - - /** - * Sets up the adapter with a specific store. - */ - protected void setup(TopicMapStoreIF store) { - this.store = store; - topicmap = store.getTopicMap(); - queryWrapper = new QueryWrapper(topicmap); - queryWrapper.setDeclarations("using lr for i\"" + PSI_PREFIX + "\" "); - } - - private void configure() { - if (tmName != null) - return; - - Properties props = new Properties(); - // read topicmapName from properties file - try { - ClassLoader cloader = OntopiaAdapter.class.getClassLoader(); - InputStream istream = cloader.getResourceAsStream(PROPERTYFILENAME); - if (istream == null) - throw new OntopiaRuntimeException("Couldn't load property file " + - PROPERTYFILENAME + " from classpath"); - props.load(istream); - } catch (IOException e) { - log.warn("Couldn't load " + PROPERTYFILENAME, e); - throw new OntopiaRuntimeException("Couldn't load " + PROPERTYFILENAME, e); - } - - tmName = (String) props.getProperty(TOPICMAPNAMEKEY); - } - - /** - * Use this method to get modifiable instances of the adapter. - */ - public static synchronized OntopiaAdapterIF getInstance() { - return getInstance(false); - } - - /** - * Use this method to get modifiable or readonly instances of the - * adapter. Used by the JSPs, since they only need readonly access. - */ - public static synchronized OntopiaAdapterIF getInstance(boolean readonly) { - return new OntopiaAdapter(readonly); - } - - // ----------------------------------- - // Implementing OntopiaAdapterIF - // ----------------------------------- - - public void addWebContent(JournalArticle content) { - try { - addWebContent(WrapperFactory.wrap(content)); - store.commit(); - } catch (Exception e) { - store.abort(); - throw new OntopiaRuntimeException("Couldn't add article", e); - } finally { - store.close(); - } - } - - public void deleteWebContent(String uuid) { - try { - deleteByUuid(uuid); - store.commit(); - } catch (Exception e) { - store.abort(); - throw new OntopiaRuntimeException("Couldn't delete article", e); - } finally { - store.close(); - } - } - - public void updateWebContent(JournalArticle content) { - try { - update(WrapperFactory.wrap(content)); - store.commit(); - } catch (Exception e) { - store.abort(); - throw new OntopiaRuntimeException("Couldn't update article", e); - } finally { - store.close(); - } - } - - - public void addUser(User user) { - try { - addUser_(user); - store.commit(); - } catch (Exception e) { - store.abort(); - throw new OntopiaRuntimeException("Couldn't add user", e); - } finally { - store.close(); - } - } - - public void deleteUser(String uuid) { - try { - deleteByUuid(uuid); - store.commit(); - } catch (Exception e) { - store.abort(); - throw new OntopiaRuntimeException("Couldn't delete user", e); - } finally { - store.close(); - } - } - - public void updateUser(User user) { - try { - update(user); - store.commit(); - } catch (Exception e) { - store.abort(); - throw new OntopiaRuntimeException("Couldn't update user", e); - } finally { - store.close(); - } - } - - - public void addStructure(JournalStructure structure) { - try { - // TODO: Shall structures have information on their group as well? - addStructure_(structure); - store.commit(); - } catch (Exception e) { - store.abort(); - throw new OntopiaRuntimeException("Couldn't add structure", e); - } finally { - store.close(); - } - } - - public void deleteStructure(String uuid) { - try { - deleteByUuid(uuid); - store.commit(); - } catch (Exception e) { - store.abort(); - throw new OntopiaRuntimeException("Couldn't delete structure", e); - } finally { - store.close(); - } - } - - public void updateStructure(JournalStructure structure) { - try { - update(structure); - store.commit(); - } catch (Exception e) { - store.abort(); - throw new OntopiaRuntimeException("Couldn't update structure", e); - } finally { - store.close(); - } - } - - - public void addWikiNode(WikiNode node) { - try { - addWikiNode_(node); - store.commit(); - } catch (Exception e) { - store.abort(); - throw new OntopiaRuntimeException("Couldn't add wiki node", e); - } finally { - store.close(); - } - } - - public void deleteWikiNode(String uuid) { - try { - deleteByUuid(uuid); - store.commit(); - } catch (Exception e) { - store.abort(); - throw new OntopiaRuntimeException("Couldn't delete wiki node", e); - } finally { - store.close(); - } - } - - public void updateWikiNode(WikiNode wikinode) { - try { - update(wikinode); - store.commit(); - } catch (Exception e) { - store.abort(); - throw new OntopiaRuntimeException("Couldn't update wiki node", e); - } finally { - store.close(); - } - } - - - public void addWikiPage(WikiPage wikipage) { - try { - addWikiPage_(wikipage); - store.commit(); - } catch (Exception e) { - store.abort(); - throw new OntopiaRuntimeException("Couldn't add wiki page", e); - } finally { - store.close(); - } - } - - public void deleteWikiPage(String uuid) { - try { - deleteByUuid(uuid); - store.commit(); - } catch (Exception e) { - store.abort(); - throw new OntopiaRuntimeException("Couldn't delete wiki page", e); - } finally { - store.close(); - } - } - - public void updateWikiPage(WikiPage wikipage) { - try { - update(wikipage); - store.commit(); - } catch (Exception e) { - store.abort(); - throw new OntopiaRuntimeException("Couldn't update wiki page", e); - } finally { - store.close(); - } - } - - - public void addGroup(Group group) { - if (!group.isCommunity()) - return; - - try { - // TODO: Handling of parent-groups? - addCommunity_(group); - store.commit(); - } catch (Exception e) { - store.abort(); - throw new OntopiaRuntimeException("Couldn't add group", e); - } finally { - store.close(); - } - } - - public void deleteGroup(Group group) { - try { - deleteGroup_(group); - store.commit(); - } catch (Exception e) { - store.abort(); - throw new OntopiaRuntimeException("Couldn't delete group", e); - } finally { - store.close(); - } - } - - public void updateGroup(Group group) { - if (!group.isCommunity()) - return; - - try { - update(group); - store.commit(); - } catch (Exception e) { - store.abort(); - throw new OntopiaRuntimeException("Couldn't update group", e); - } finally { - store.close(); - } - } - - // ---------------------------- - // static method - // ---------------------------- - - /** - * Is called by DeciderIF implementations to check if the PSI - * provided is the type of the Association provided - * - * @param psi The PSI as a String - * @param assoc The association to check (as AssociationIF) - * @return true/false - */ - public static boolean isInAssociation(String psi, AssociationIF assoc) { - TopicIF type = assoc.getType(); - try { - LocatorIF locator = new URILocator(psi); - Collection locators = type.getSubjectIdentifiers(); - if (locators.contains(locator)) - return true; - - } catch (MalformedURLException ex) { - throw new OntopiaRuntimeException(ex); - } - return false; - } - - - // ------------------------------------------------------------------- - // The following methods are used by some of the JSP's in the portlets - // ------------------------------------------------------------------- - - /** - * Returns the ObjectId for the topic identified by the uuid provided. - * - * @param uuid The UUID identifying the Object from Liferay - * @return A String representing the objectId of the topic in the tm - */ - public String getObjectIdForUuid(String uuid) { - // May raise exception if topic can not be found. That's ok. - TopicIF topic = retrieveTopicByUuid(uuid); - if (topic != null) - return topic.getObjectId(); - else - return null; - } - - /** - * Returns the identifier of the topicmap - * - * @return a String containing the identifier of the topicmap - */ - public String getTopicMapId() { - return tmName; - } - - /** - * Returns the topic map itself. - */ - public TopicMapIF getTopicMap() { - return topicmap; - } - - /** - * Returns the objectId of the *first* type of a topic which is - * identified by a uuid that it finds. - * - * @param uuid The uuid of the topic in question - * @return A String containing the objectId for the type of the - * topic in question - */ - public String getTopicTypeIdForUuid(String uuid) { - TopicIF topic = retrieveTopicByUuid(uuid); - if (topic != null) - for (TopicIF type : topic.getTypes()) - return type.getObjectId(); - return null; - } - - /** - * Returns the objectId of the "conceptView" topic by trying to look - * up the PSI: http://psi.ontopia.net/liferay/conceptview - * Will throw an exception if the PSI can not be found. - * - * @return The objectId of the "conceptView" topic - */ - public String getConceptViewId() { - TopicIF conceptView = topicmap.getTopicBySubjectIdentifier(new GenericLocator("uri", "http://psi.ontopia.net/liferay/conceptview")); - return conceptView.getObjectId(); - } - - /** - * Returns the object id for the topic that represents the article - * that will be displayed, providing an articleId. The rule is: The - * topic, with the highest version AND which has an "approved" - * state, is returned. - * - * @param articleId the article id from liferay - * @return The object ID for the topic - */ - public String getCurrentObjectIdForArticleId(String articleId) { - String query = - "select $id, $number from \n" + - "object-id($topic, $id), \n"+ - "occurrence($topic , $aid), \n" + - "type($aid, lr:article_id), \n" + - "value($aid, \"" + articleId +"\"), \n" + - "lr:has_workflow_state($topic : lr:work, lr:workflow_approved : lr:state), \n" + - "occurrence($topic, $version), \n" + - "type($version, lr:version), \n" + - "value($version, $number) \n" + - "order by $number desc?"; - - String id = queryWrapper.queryForString(query); - if (id == null) - throw new OntopiaRuntimeException("No article with articleId " + - articleId + " found!"); - return id; - } - - - // ------------------------------------------ - // some non-public methods acting as helpers - // ------------------------------------------ - - /** - * Creates an article and sets created_by and approved_by associations. - */ - protected void addWebContent(JournalArticleWrapper content) - throws SystemException { - createWebContent(content); - setWorkflowstate(content); - - String creatorUuid = content.getUserUuid(); - setCreator(content.getUuid(), creatorUuid); - - if (content.isApproved()) - setUserApproving(content); - - setGroupContains(String.valueOf(content.getGroupId()), content.getUuid()); - } - - - /** - * Assembles one rather big tolog query to create a topic for a - * JournalArticle - */ - private void createWebContent(JournalArticleWrapper content) - throws SystemException { - Map valueMap = getWebContentMap(content); - String classname; - if (content.getStructureId().equals("")) - classname = "lr:article"; - else { - classname = "<" + findStructureUrnByStructureId(content.getStructureId()) + ">"; - if (classname == null) - throw new OntopiaRuntimeException("Structure with id + " + - content.getStructureId() + - " not found!"); - } - - String approvedDateString = ""; - String approvedMapString = ""; - if(content.isApproved()) { - approvedDateString = "lr:approved_date : $approvedDate; \n"; - approvedMapString = "$approvedDate = %approvedDate%, \n"; - } - - String reviewDateString = ""; - String reviewMapString = ""; - if(valueMap.get("reviewDate") != null) { - reviewDateString = "lr:review_date : $reviewDate; \n"; - reviewMapString = "$reviewDate = %reviewDate%, \n"; - } - - String expiryDateString = ""; - String expiryMapString =""; - if(valueMap.get("expiryDate") != null) { - expiryDateString = "lr:expiry_date : $expiryDate; \n"; - expiryMapString = "$expiryDate = %expiryDate%, \n"; - } - - String urn = urnifyCtm(valueMap.get("uuid")); - - String query = - "insert " + urn + " isa " + classname + "; \n" + - "- $title ;\n" + - "lr:create_date : $createDate; \n" + - approvedDateString + - reviewDateString + - expiryDateString + - "lr:modified_date : $modifyDate; \n" + - "lr:display_date : $displayDate; \n" + - "lr:version : $version; \n" + - "lr:article_id : $articleId . from \n" + - approvedMapString + - reviewMapString + - expiryMapString + - "$createDate = %createDate%, \n" + - "$modifyDate = %modifyDate%, \n" + - "$displayDate = %displayDate%, \n" + - "$version = %version%, \n" + - "$title = %title%, \n" + - "$articleId = %articleId%"; - queryWrapper.update(query, valueMap); - } - - /** - * Adds a JournalStructure to the topicmap by - * assembling and running a tolog query. - * JournalStructures are inserted as subclasses of - * whether "Liferay_WebContent" or another - * JournalStructure if the latter is set as parent - * structure inside die JournalStructure object. - * - * @param structure The JournalStructure from Liferay - */ - protected void addStructure_(JournalStructure structure) { - Map valueMap = getStructureMap(structure); - String structureUrn = urnifyCtm(structure.getUuid()); - String parentStructureUrn = - findStructureUrnByStructureId(structure.getParentStructureId()); - - String parent; - if (parentStructureUrn == null) - parent = PSI_PREFIX + "webcontent"; - else - parent = "<" + parentStructureUrn + ">"; - - String query ="insert " + structureUrn + " ako " + parent + ";\n" + - " isa http://psi.ontopia.net/ontology/topic-type ;\n" + - " - $name; lr:structure-id: $id . " + - "from" + - " $id = %structureId%, " + - " $name = %name%"; - queryWrapper.update(query, valueMap); - } - - - /** - * Adds a User to the topicmap by assembling and - * running a tolog query. - * - * @param user The User object from Liferay - */ - protected void addUser_(User user) { - Map valueMap = getUserMap(user); - - String query = "insert " + urnifyCtm(user.getUuid()) +" isa lr:user;\n" + - "- $username. from \n" + - "$username = %username%"; - queryWrapper.update(query, valueMap); - } - - - /** - * Adds a WikiNode into the topicmap by calling createWikiNode. - * Also sets "created_by" association. - * - * @param wikinode The WikiNode from Liferay - */ - protected void addWikiNode_(WikiNode wikinode) throws SystemException { - createWikiNode(wikinode); - - setCreator(wikinode.getUuid(), wikinode.getUserUuid()); - - setGroupContains(String.valueOf(wikinode.getGroupId()), wikinode.getUuid()); - } - - - /** - * Adds a new WikiNode to the topicmap by assembling - * and running a tolog query. - * - * @param wikinode The WikiNode from Liferay - */ - private void createWikiNode(WikiNode wikinode) { - String nodeUrn = urnifyCtm(wikinode.getUuid()); - - String lastPostDateString = ""; - String lastPostDateMapString = ""; - if(wikinode.getLastPostDate() != null){ - lastPostDateString = "lr:lastpostdate : $lastPostDate; \n"; - lastPostDateMapString = "$lastPostDate = %lastPostDate%, \n"; - } - - Map valueMap = getWikiNodeMap(wikinode); - String query = - "insert " + nodeUrn + " isa lr:wikinode; \n" + - "- $name; \n" + - "lr:create_date : $createDate; \n" + - "lr:modified_date : $modifiedDate; \n" + - lastPostDateString + - "lr:wikinodeid : $nodeId . from \n" + - "$name = %name%, \n" + - "$createDate = %createDate%, \n" + - "$modifiedDate = %modifiedDate%, \n" + - lastPostDateMapString + - "$nodeId = %nodeId%"; - queryWrapper.update(query, valueMap); - } - - - /** - * Calls createWikiPage to create a topic for a - * wikipage and then sets all necessary associations if applicable. - * @param wikipage The wikipage containing the information - */ - private void addWikiPage_(WikiPage wikipage) throws SystemException { - createWikiPage(wikipage); - for (WikiPage wpd : wikipage.getParentPages()) - setParentChild(wpd.getUuid(), wikipage.getUuid()); - - // setting the parent-child assocs in both ways is needed when - // updating a single page. - for(WikiPage wpd : wikipage.getChildPages()) - setParentChild(wikipage.getUuid(), wpd.getUuid()); - - setCreator(wikipage.getUuid(), wikipage.getUserUuid()); - - setContains(wikipage.getNode().getUuid(), wikipage.getUuid()); - } - - /** - * Creates a topic representing a WikiPage in liferay. - * - * @param wikipage The wikipage from liferay containing the information - */ - private void createWikiPage(WikiPage wikipage) { - String pageUrn = urnifyCtm(wikipage.getUuid()); - Map valueMap = getWikiPageMap(wikipage); - String query = - "insert " + pageUrn + " isa lr:wikipage; \n" + - "- $title; \n" + - "lr:wikipageid : $pageId; \n"+ - "lr:create_date : $createDate; \n" + - "lr:modified_date : $modifyDate; \n" + - "lr:version : $version . from \n" + - "$title = %title%, \n" + - "$pageId = %pageId%, \n" + - "$createDate = %createDate%, \n" + - "$modifyDate = %modifyDate%, \n" + - "$version = %version%"; - queryWrapper.update(query, valueMap); - } - - - /** - * Adds a community to the topicmap by assembling and running a tolog query - * - * @param group The Group object from Liferay - */ - private void addCommunity_(Group group) { - Map valueMap = getGroupMap(group); - String query = - "insert ?group isa lr:community; \n" + - "- $name; \n" + - "lr:groupid : $groupId . from \n" + - "$name = %name%, \n" + - "$groupId = %groupId%"; - queryWrapper.update(query, valueMap); - } - - public void deleteGroup_(Group group) { - String query = - "delete $TOPIC from \n" + - "value($OCCURRENCE, \"" + group.getGroupId() + "\")," + - "type($OCCURRENCE, lr:groupid)," + - "occurrence($TOPIC, $OCCURRENCE)," + - "instance-of($TOPIC, lr:community)"; - queryWrapper.update(query); - } - - - /** - * This methods delets a topic that is identified by a uuid - * @param uuid The UUID identifying the topic which is to be deleted - */ - private void deleteByUuid(String uuid) { - queryWrapper.update("delete i\"" + urnify(uuid) +"\""); - } - - - /** - * Creates an "created_by" association between a topic playing the - * "work" role and a topic playing the "creator" role - * - * @param workUuid The UUID of the topic that shall be the player of - * the "work" role - * @param creatorUuid The UUID of the topic that shall be the player - * of the "creator" role - */ - private void setCreator(String workUuid, String creatorUuid) { - String workUrn = urnifyCtm(workUuid); - String creatorUrn = urnifyCtm(creatorUuid); - - String query = - "insert lr:created_by( lr:creator : " + creatorUrn + " , lr:work : " + workUrn + " )"; - queryWrapper.update(query); - } - - - /** - * Creates an "approved_by" association between a - * JournalArticle> and a User using the approver's uuid - * as contained in the JournalArticle object. - */ - private void setUserApproving(JournalArticleWrapper content) - throws SystemException { - String workUrn = urnifyCtm(content.getUuid()); - - String approverUrn = urnifyCtm(content.getStatusByUserUuid()); - String query = "insert lr:approved_by( lr:approver : " + approverUrn + " , lr:work : " + workUrn + " )"; - queryWrapper.update(query); - } - - - /** - * Creates an "has_workflow_state" association between a - * JournalArticle and an instance of the - * "Workflow_state" class according to the workflow state in - * Liferay. - */ - private void setWorkflowstate(JournalArticleWrapper content) { - String workplayerUrn = urnifyCtm(content.getUuid()); - String state; - - if (content.isExpired()) { - state = "workflow_expired"; - } else if(content.isApproved()) { - state = "workflow_approved"; - } else { - state ="workflow_new"; - } - - String query = - "insert lr:has_workflow_state( lr:state : lr:"+ state +" , lr:work : " + workplayerUrn + " )"; - queryWrapper.update(query); - } - - /** - * Returns the UUID as a URN as described in RFC XXXX - * - * @param uuid The UUID to use - * @return A String containing the urn made from the UUID - */ - private String urnify(String uuid) { - return "urn:uuid:" + uuid; - } - - /** - * Creates a ctm-compatible urn from a UUID - * - * @param uuid The UUID to use - * @return A String, containing the URN made from the UUID, inside - * '<' and '>' to make it processable by ctm. - */ - private String urnifyCtm(String uuid) { - // in ctm uuid's need to be put into < > in order to process them - return "<" + urnify(uuid) + ">"; - } - - /** - * Returns the URN of a JournalStructure by looking it - * up using its structure id - * - * @param structureId The structure's id - * @return The Urn of the structure if lookup succeeded, null otherwise. - */ - protected String findStructureUrnByStructureId(String structureId) { - Map params = new HashMap(); - params.put("id", structureId); - - String query ="select $PSI from\n" + - "subject-identifier($TOPIC, $PSI),\n" + - "lr:structure-id($TOPIC, %id%)?"; - - return queryWrapper.queryForString(query, params); - } - - /** - * Carries out updates for different types of objects using TmSync - * - * @param obj The updated object from Liferay - * @param topicmap The topic map to update - */ - private void update(Object obj) - throws MalformedURLException, SystemException { - // the deciders are filters for features not to be updated - log.debug("*** update called for {} ***", obj.getClass()); - - // making a temporary in-memory topicmap for sync inside adapter - FragmentOntopiaAdapter adapter = new FragmentOntopiaAdapter(this); - - if (obj instanceof JournalArticleWrapper) { - JournalArticleWrapper article = (JournalArticleWrapper) obj; - adapter.addWebContent(article); - TopicIF source = adapter.retrieveTopicByUuid(article.getUuid()); - TopicMapSynchronizer.update(topicmap, source, - new WebContentDecider(), - new WebContentDecider()); - - } else if (obj instanceof JournalStructure) { - JournalStructure structure = (JournalStructure) obj; - adapter.addStructure_(structure); - TopicIF source = adapter.retrieveTopicByUuid(structure.getUuid()); - TopicMapSynchronizer.update(topicmap, source, - new StructureDecider(), - new StructureDecider()); - - } else if (obj instanceof User) { - User user = (User) obj; - adapter.addUser_(user); - TopicIF source = adapter.retrieveTopicByUuid(user.getUuid()); - TopicMapSynchronizer.update(topicmap, source, - new UserDecider(), new UserDecider()); - - } else if (obj instanceof WikiNode) { - WikiNode node = (WikiNode) obj; - adapter.addWikiNode_(node); - TopicIF source = adapter.retrieveTopicByUuid(node.getUuid()); - TopicMapSynchronizer.update(topicmap, source, - new WikiNodeDecider(), - new WikiNodeDecider()); - - } else if (obj instanceof WikiPage) { - WikiPage page = (WikiPage) obj; - adapter.addWikiPage(page); - TopicIF source = adapter.retrieveTopicByUuid(page.getUuid()); - TopicMapSynchronizer.update(topicmap, source, new WikiPageDecider(), - new WikiPageDecider()); - - } else if (obj instanceof Group) { - // TODO: See if the update code should go into an extra method - Group group = (Group) obj; - TopicIF topic = getTopicByGroupId("" + group.getGroupId()); - if (topic != null) { - TopicNameIF oldName = (TopicNameIF) topic.getTopicNames().iterator().next(); - Map valueMap = new HashMap(); - valueMap.put("name", group.getName()); - valueMap.put("oldName", oldName); - - // This changes names only because as of now this is the only - // value that can be changed by users - String query = "update value($oldName, $name) from " + - "$oldName = %oldName%," + - "$name = %name%"; - - queryWrapper.update(query, valueMap); - } else - throw new OntopiaRuntimeException("Object of unknown type: " + obj); - } - log.debug("*** update ended! ***"); - } - - /** - * Returns a TopicIF for a UUID - * - * @param uuid The UUID identifying the topic - * @return A TopicIF implementation of the topic which is identified - * by the UUID - */ - protected TopicIF retrieveTopicByUuid(String uuid) { - LocatorIF identifiablePsiLocator = new GenericLocator("uri",urnify(uuid)); - TopicIF source = topicmap.getTopicBySubjectIdentifier(identifiablePsiLocator); - return source; - } - - - /** - * Creates a "parent-child" association between two topics - * - * @param parentUuid The topic playing the "parent" role identified - * by this UUID - * @param childUuid The topic playing the "child" role identified by - * this UUID - */ - private void setParentChild(String parentUuid, String childUuid) { - String parentUrn = urnifyCtm(parentUuid); - String childUrn = urnifyCtm(childUuid); - - String query = "insert lr:parent-child(lr:parent : " + parentUrn + ", lr:child : " + childUrn + ")"; - queryWrapper.update(query); - } - - - /** - * Creates a "contains" association between two topics - * - * @param containerUuid The topic playing the role "container" - * identified by this UUID - * @param containeeUuid The topic playing the role "containee" - * identified by this UUID - */ - private void setContains(String containerUuid, String containeeUuid) { - String containeeUrn = urnifyCtm(containeeUuid); - String containerUrn = urnifyCtm(containerUuid); - String query = - "insert lr:contains( lr:container : " + containerUrn + " , lr:containee : " + containeeUrn + " )"; - queryWrapper.update(query); - } - - /** - * Creates a "contains" association between two topics, one of which - * being the group. - * - * @param groupId The topic playing the role "container" identified - * by this group id - * @param uuid The topic playing the role "containee" identified by this UUID - */ - private void setGroupContains(String groupId, String uuid) { - //TODO: Could expect a long value instead of string for groupId - //then be renamed to setContains() - - TopicIF group = getTopicByGroupId(groupId); - if (group == null) { - // this means there is no topic for the group. it's tempting to create - // one automatically (would be nice for the default group, for example), - // but there appears to be no way to find the name of the group. so we - // stick with the hardcoded approach for now. - throw new OntopiaRuntimeException("No topic for group with id " + - groupId); - } - - // the tricky thing is that 'group' at this point may contain a - // topic in the in-memory fragment we use for syncing, and not in - // the main topic map. therefore we need to get some sort of - // identifier for the topic that's independent of which of the two - // topic maps we're in. - String groupref = getCtmReference(group); - String query = - "insert lr:contains( lr:container : " + groupref + " , " + - " lr:containee : " + urnifyCtm(uuid) + " )"; - log.warn("groupref: '" + groupref + "'"); - queryWrapper.update(query); - } - - - /** - * Returns the topic for the Group with the given group - * id. - * - * @param groupId The group id of the group to look up - * @return The topic for the group, or null if none were found. - */ - protected TopicIF getTopicByGroupId(String groupId) { - String query = - "select $TOPIC from \n" + - "value($OCCURRENCE, \"" + groupId + "\")," + - "type($OCCURRENCE, i\"http://psi.ontopia.net/liferay/groupid\"), " + - "occurrence($TOPIC, $OCCURRENCE)?"; - return queryWrapper.queryForTopic(query); - } - - /** - * Returns a reference to the topic in CTM syntax, ready for - * inclusion in any CTM file. - */ - public static String getCtmReference(TopicIF topic) { - for (LocatorIF loc : topic.getSubjectIdentifiers()) - return loc.getExternalForm(); - for (LocatorIF loc : topic.getSubjectLocators()) - return "= " + loc.getExternalForm(); - for (LocatorIF loc : topic.getItemIdentifiers()) - return "^ <" + loc.getExternalForm() + ">"; - throw new OntopiaRuntimeException("No suitable identifier for " + topic); - } - - // --------------------------------------------------------------------------- - // Maps methods follow - // - // The Maps methods job is to fill a Map with values from the - // Liferay Objects. While about it, it also converts the values to - // other types if nessecary. Through doing this it is possible to - // pass the map to the tolog QueryProcessor and to substitute String - // in tolog queries with values from the map (using their keys). - // See the tolog documentation and the JavaDoc of the - // QueryProcessorIF for more details. - // --------------------------------------------------------------------------- - - private Map getWebContentMap(JournalArticleWrapper content) - throws SystemException { - Map retval = new HashMap(); - retval.put("title", content.getTitle()); - retval.put("uuid", content.getUuid()); - retval.put("createDate", DateFormatter.format(content.getCreateDate())); - retval.put("displayDate", DateFormatter.format(content.getDisplayDate())); - retval.put("modifyDate", DateFormatter.format(content.getModifiedDate())); - retval.put("reviewDate", DateFormatter.format(content.getReviewDate())); - retval.put("expiryDate", DateFormatter.format(content.getExpirationDate())); - retval.put("articleId", content.getArticleId()); - retval.put("version", String.valueOf(content.getVersion())); - retval.put("userId", String.valueOf(content.getUserId())); - retval.put("structureId", content.getStructureId()); - retval.put("approvingUserId", String.valueOf(content.getStatusByUserId())); - retval.put("approvingUserName", content.getStatusByUserName()); - retval.put("approvedDate", DateFormatter.format(content.getStatusDate())); - retval.put("approvingUserUuid", content.getStatusByUserUuid()); - retval.put("useruuid", content.getUserUuid()); - return retval; - } - - private Map getUserMap(User user) { - Map retval = new HashMap(); - - retval.put("uuid", user.getUuid()); - retval.put("username", user.getEmailAddress()); - retval.put("urnCtm", urnify(user.getUuid())); - return retval; - } - - private Map getStructureMap(JournalStructure structure) { - Map retval = new HashMap(); - - retval.put("uuid", structure.getUuid()); - retval.put("structureId", structure.getStructureId()); - retval.put("parentId", structure.getParentStructureId()); - retval.put("name", structure.getName()); - return retval; - } - - private Map getGroupMap(Group group) { - Map retval = new HashMap(); - - retval.put("groupId", String.valueOf(group.getGroupId())); - retval.put("parentGroupId", String.valueOf(group.getParentGroupId())); - retval.put("name", group.getName()); - return retval; - } - - private Map getWikiNodeMap(WikiNode node) { - Map retval = new HashMap(); - - retval.put("uuid", node.getUuid()); - retval.put("nodeId", String.valueOf(node.getNodeId())); - retval.put("name", node.getName()); - retval.put("createDate", DateFormatter.format(node.getCreateDate())); - retval.put("modifiedDate", DateFormatter.format(node.getModifiedDate())); - retval.put("lastPostDate", DateFormatter.format(node.getLastPostDate())); - try { - retval.put("userUuid", node.getUserUuid()); - } catch (SystemException ex) { - throw new OntopiaRuntimeException(ex); - } - return retval; - } - - private Map getWikiPageMap(WikiPage page) { - Map retval = new HashMap(); - - retval.put("uuid", page.getUuid()); - retval.put("pageId", String.valueOf(page.getPageId())); - retval.put("title", page.getTitle()); - retval.put("version", String.valueOf(page.getVersion())); - retval.put("createDate", DateFormatter.format(page.getCreateDate())); - retval.put("modifyDate", DateFormatter.format(page.getModifiedDate())); - - if(page.getParentPage() != null) { - retval.put("parentPageUuid", page.getParentPage().getUuid()); - } - - try { - retval.put("userUuid", page.getUserUuid()); - } catch (SystemException ex) { - throw new OntopiaRuntimeException(ex); - } - return retval; - } -} diff --git a/sandbox/liferay-integration/WEB-INF/src/tm/OntopiaAdapterIF.java b/sandbox/liferay-integration/WEB-INF/src/tm/OntopiaAdapterIF.java deleted file mode 100644 index 66daabf9a..000000000 --- a/sandbox/liferay-integration/WEB-INF/src/tm/OntopiaAdapterIF.java +++ /dev/null @@ -1,227 +0,0 @@ -package tm; - -import com.liferay.portal.model.Group; -import com.liferay.portal.model.User; -import com.liferay.portlet.journal.model.JournalArticle; -import com.liferay.portlet.journal.model.JournalStructure; -import com.liferay.portlet.wiki.model.WikiNode; -import com.liferay.portlet.wiki.model.WikiPage; - -import net.ontopia.topicmaps.core.TopicMapIF; - -/** - * This interface defines the featureset offered by the integration as of now. - * - *

    The add/delete/update methods are triggered by their according listeners. - * @see listener - * - * @author mfi - */ -public interface OntopiaAdapterIF { - - /** - * Adds WebContent as provided by the object from liferay. Includes - * setting all applicable associations (created_by, - * contains, etc.) - * - * @param content A Liferay JournalArticle object - */ - public void addWebContent(JournalArticle content); - - /** - * Removes WebContent from the topicmap identified by the UUID - * - * @param uuid The UUID identifying the WebContent to be deleted - */ - public void deleteWebContent(String uuid); - - /** - * Updates the values of WebContent represented by the - * JournalArticle object. Updates also associations that originate - * from Liferay (Metainfo from the portal), but not associations - * that were user-made. - * - * @param content The updated JournalArticle object from Liferay - */ - public void updateWebContent(JournalArticle content); - - - /** - * Adds a User using it's emailaddress value as a topicname. - * - * @param user The User object from Liferay - */ - public void addUser(User user); - - /** - * Deletes a user from the topicmap - * - * @param uuid The UUID identifying the user. - */ - public void deleteUser(String uuid); - - /** - * Updates the values of the User represented by the User object. - * Associations (like created_by or approved_by) are preserved. - * - * @param user The updated User object from Liferay. - */ - public void updateUser(User user); - - /** - * Adds a Structure to the topicmap using its structureId as a topicname. - * - * @param structure The JournalStructure object as provided by Liferay - */ - public void addStructure(JournalStructure structure); - - /** - * Deletes a Structure form the topicmap. - * - * @param uuid The UUID identifying the Structure to be deleted. - */ - public void deleteStructure(String uuid); - - /** - * Updates the values of the Structure represented by the Structure object. - * - * @param structure The updated JournalStructure object from Liferay. - */ - public void updateStructure(JournalStructure structure); - - - /** - * Adds a new Wiki (called WikiNode in Liferay) to the topicmap. - * Sets applicable associations (i.e. contains). - * - * @param wikinode The WikiNode object as provided by Liferay. - */ - public void addWikiNode(WikiNode wikinode); - - /** - * Deletes a WikiNode from the topicmap - * - * @param uuid The UUID identifying the WikiNode to be deleted. - */ - public void deleteWikiNode(String uuid); - - /** - * Updates the values of the WikiNode represented by the WikiNode object. - * - * @param wikinode The updated WikiNode from Liferay. - */ - public void updateWikiNode(WikiNode wikinode); - - - /** - * Adds a WikiPage into the topicmap. - * - * @param wikipage The WikiPage object as provided by Liferay. - */ - public void addWikiPage(WikiPage wikipage); - - /** - * Deletes a WikiPage from the topicmap. - * - * @param uuid The UUID identifying the WikiPage to be deleted. - */ - public void deleteWikiPage(String uuid); - - /** - * Updates the values of the WikiPage represented by the WikiPage object. - * - * @param wikipage The updated WikiPage from Liferay. - */ - public void updateWikiPage(WikiPage wikipage); - - /** - * Adds a Group into the topicmap. - * Note that as of now only Communities are supported as a subclass of Groups. - * - * @param group The Group object as provided by Liferay. - */ - public void addGroup(Group group); - - /** - * Deletes a Group from the topicmap. - * Note that this is *not* done using a UUID, because Groups can not be referenced to by the means of UUIDs. - * - * @param group The Group object to be deleted from the topicmap. - */ - public void deleteGroup(Group group); - - /** - * Updates the name the Group represented by the Group object. - * Note that as of now there is not more to update than the name of the group. - * Associations are not touched by this update as of now. - * - * @param group The updated Group object from Liferay. - */ - public void updateGroup(Group group); - - - /** - * The following methods are used by the jsp integration and some of the portlets to allow quick code-wise access to - * some information from the topicmap. - */ - - /** - * Returns a String containing the object id of anything that can be referred to by using an UUID. - * Is being used to gather all necessayry information the build the iFrame url for the ontopoly integration. - * - * @param uuid The UUID identifying the entity - * @return A String containing the object Id of the entity. - */ - public String getObjectIdForUuid(String uuid); - - /** - * Checks what the Id of the current topicmap is, and returns the id - * as a String. Is being used to gather all necessayry information - * the build the iFrame url for the ontopoly integration. - * - * @return A String representing the current topicmap id that is being used. - */ - public String getTopicMapId(); - - /** - * Returns the topic map itself. - */ - public TopicMapIF getTopicMap(); - - /** - * Returns the object id of the typing topic, that types another - * topic which is only identified by the given UUID. That sounds a - * lot more complicated than it is. Seeing the code might bring - * clarification. Is being used to gather all necessayry - * information the build the iFrame url for the ontopoly - * integration. - * - * @param uuid The UUID of the topic, which type's object Id is to be found out. - * @return The object id of the type of the topic identified by the UUID. - */ - public String getTopicTypeIdForUuid(String uuid); - - /** - * Returns the object id of the topic representing the - * "conceptView". The concept view is used to show users a custom - * part of ontopoly to enable them to set custom associations (like - * "is-about"). Is being used to gather all necessayry information - * the build the iFrame url for the ontopoly integration. - * - * @return A String containing the object id of the topic representing the "conceptView". - */ - public String getConceptViewId(); - - /** - * Finds out the latest (that is highest versioned) AND approved - * article-topic in the topicmap using the article id provided. - * This might be of use when trying to show a user references to - * other articles. You would not want to point to an article the - * user won't be able to view, because it hasn't been approved yet, - * or is out of date. - * - * @param articleId The article id of an article in liferay - * @return A String containing the object id of that topic, which is represents the latest approved version for this article id. - */ - public String getCurrentObjectIdForArticleId(String articleId); -} diff --git a/sandbox/liferay-integration/WEB-INF/src/tm/StructureDecider.java b/sandbox/liferay-integration/WEB-INF/src/tm/StructureDecider.java deleted file mode 100644 index a06c719cc..000000000 --- a/sandbox/liferay-integration/WEB-INF/src/tm/StructureDecider.java +++ /dev/null @@ -1,29 +0,0 @@ -package tm; - -import net.ontopia.topicmaps.core.AssociationIF; -import net.ontopia.utils.DeciderIF; - -/** - * This class provides a way to find out whether this should be part of an update or not. - * All associations shall not be updated except for sub/supertype. - * Everythings that's not an association shall be updated. - * - * @see DeciderIF - * @author mfi - */ - -public class StructureDecider implements DeciderIF{ - - public boolean ok(Object arg0) { - if(arg0 instanceof AssociationIF ){ - AssociationIF assoc = (AssociationIF) arg0; - if(OntopiaAdapter.isInAssociation(OntopiaAdapter.SUB_SUPERTYPE_PSI, assoc)){ - // If this structure is moved to an other superclass we would want to know that - return true; - } - return false; // Within associations: Only the above shall be update. All other associations shall not be updated. - } - return true; // The complement of associations might be updated - } - -} diff --git a/sandbox/liferay-integration/WEB-INF/src/tm/UserDecider.java b/sandbox/liferay-integration/WEB-INF/src/tm/UserDecider.java deleted file mode 100644 index b95d48851..000000000 --- a/sandbox/liferay-integration/WEB-INF/src/tm/UserDecider.java +++ /dev/null @@ -1,36 +0,0 @@ -package tm; - -import net.ontopia.topicmaps.core.AssociationIF; -import net.ontopia.utils.DeciderIF; - -/** - * This class provides a way to find out whether this should be part of an update or not. - * No associations shall be updated. - * Those that might be included in the future are listed anyway. Just change the returnvalue to true to enable updates. - * - * @see DeciderIF - * @author mfi - */ - -public class UserDecider implements DeciderIF{ - - - public boolean ok(Object arg0) { - if(arg0 instanceof AssociationIF){ - AssociationIF assoc = (AssociationIF) arg0; - if(OntopiaAdapter.isInAssociation(OntopiaAdapter.ASSOC_CREATED_BY_PSI, assoc)){ - return false; - } - if(OntopiaAdapter.isInAssociation(OntopiaAdapter.ASSOC_USER_APPROVING_PSI, assoc)){ - return false; - } - - return false; // It is an association that does not match any of the above. Do not update! - - } else { - return true; // it is not an association. It has to be updated! - } - - } - -} diff --git a/sandbox/liferay-integration/WEB-INF/src/tm/WebContentDecider.java b/sandbox/liferay-integration/WEB-INF/src/tm/WebContentDecider.java deleted file mode 100644 index 26c9948ab..000000000 --- a/sandbox/liferay-integration/WEB-INF/src/tm/WebContentDecider.java +++ /dev/null @@ -1,45 +0,0 @@ -package tm; - -import net.ontopia.topicmaps.core.AssociationIF; -import net.ontopia.utils.DeciderIF; - -/** - * This class provides a way to find out whether this should be part of an update or not. - * No associations shall be updated except: - * - Created By - * - Has_workflow_state - * - approving - * - * "is-about" shall explicitly NOT be updated, because that would break user's tagging on any WebContent whenever it is changed in Liferay. - * - * @see DeciderIF - * @author mfi - */ - -public class WebContentDecider implements DeciderIF { - - public boolean ok(Object obj) { - if(obj instanceof AssociationIF){ - AssociationIF assoc = (AssociationIF) obj; - if(OntopiaAdapter.isInAssociation(OntopiaAdapter.ASSOC_CREATED_BY_PSI, assoc)){ - return true; - } - if(OntopiaAdapter.isInAssociation(OntopiaAdapter.ASSOC_HAS_WORKFLOW_STATE_PSI, assoc)){ - return true; - } - if(OntopiaAdapter.isInAssociation(OntopiaAdapter.ASSOC_USER_APPROVING_PSI, assoc)){ - return true; - } - if(OntopiaAdapter.isInAssociation(OntopiaAdapter.ASSOC_IS_ABOUT_PSI, assoc)){ - return false; - } - - return false; // it is an association of none of the above mentioned types. Do not update! - - } else { - return true; // it is not an association. It has to be updated! - } - } -} - - diff --git a/sandbox/liferay-integration/WEB-INF/src/tm/WikiNodeDecider.java b/sandbox/liferay-integration/WEB-INF/src/tm/WikiNodeDecider.java deleted file mode 100644 index 647a3e3fd..000000000 --- a/sandbox/liferay-integration/WEB-INF/src/tm/WikiNodeDecider.java +++ /dev/null @@ -1,34 +0,0 @@ - -package tm; - -import net.ontopia.topicmaps.core.AssociationIF; -import net.ontopia.utils.DeciderIF; - -/** - * This class provides a way to find out whether this should be part of an update or not. - * Do not update any associations. - * Should the future require one of the explicitly named ones here to be updated, just set the returnvalue to true. - * - * @see DeciderIF - * @author mfi - */ - -public class WikiNodeDecider implements DeciderIF { - - public boolean ok(Object arg0) { - if(arg0 instanceof AssociationIF){ - AssociationIF assoc = (AssociationIF) arg0; - if(OntopiaAdapter.isInAssociation(OntopiaAdapter.ASSOC_CONTAINS_PSI, assoc)){ - return false; - } - if(OntopiaAdapter.isInAssociation(OntopiaAdapter.ASSOC_CREATED_BY_PSI, assoc)){ - return false; - } - - return false; // == return false if you are an association - - } else { - return true; // == return true if you are anything but an association - } - } -} diff --git a/sandbox/liferay-integration/WEB-INF/src/tm/WikiPageDecider.java b/sandbox/liferay-integration/WEB-INF/src/tm/WikiPageDecider.java deleted file mode 100644 index 32cc2669b..000000000 --- a/sandbox/liferay-integration/WEB-INF/src/tm/WikiPageDecider.java +++ /dev/null @@ -1,44 +0,0 @@ - -package tm; - -import net.ontopia.topicmaps.core.AssociationIF; -import net.ontopia.utils.DeciderIF; - -/** - * This class provides a way to find out whether this should be part of an update or not. - * Do not update any associations except for: - * - parent-child - * - created-by - * - * Should the future require to change "contains" just change the returnvalue. - * Again "is-about" is explicitly not updated because that would break user's tagging of the wikipage whenever the wikipage changes. - * - * @see DeciderIF - * @author mfi - */ - -public class WikiPageDecider implements DeciderIF { - - public boolean ok(Object arg0) { - if(arg0 instanceof AssociationIF ){ - AssociationIF assoc = (AssociationIF) arg0; - if(OntopiaAdapter.isInAssociation(OntopiaAdapter.ASSOC_PARENT_CHILD_PSI, assoc)){ - return true; - } - if(OntopiaAdapter.isInAssociation(OntopiaAdapter.ASSOC_CREATED_BY_PSI, assoc)){ - return true; - } - if(OntopiaAdapter.isInAssociation(OntopiaAdapter.ASSOC_CONTAINS_PSI, assoc)){ - return false; - } - if(OntopiaAdapter.isInAssociation(OntopiaAdapter.ASSOC_IS_ABOUT_PSI, assoc)){ - return false; - } - - return false; // do not update if you are anything but one of the above mentioned association types (i.e. 'is-about') - - } - return true; - } - -} diff --git a/sandbox/liferay-integration/WEB-INF/src/tm/WrapperFactory.java b/sandbox/liferay-integration/WEB-INF/src/tm/WrapperFactory.java deleted file mode 100644 index 1f3475533..000000000 --- a/sandbox/liferay-integration/WEB-INF/src/tm/WrapperFactory.java +++ /dev/null @@ -1,62 +0,0 @@ -package tm; - -import com.liferay.portlet.journal.model.JournalArticle; - -/** - * INTERNAL: Factory class used to create wrappers around certain - * Liferay objects. This is necessary because the Liferay API changes - * incompatibly from release to release, and these wrappers can handle - * the API changes. The factory itself is a singleton, so that we - * don't have to keep checking what Liferay version we are using. Not - * using synchronization or any fancy singleton patterns, because - * there's no real harm done if we create the singleton more than - * once. - * - *

    So far we are only wrapping JournalArticle objects, because this - * is the only class whose API changed from 5.2 to 6.0. - */ -public class WrapperFactory { - private static WrapperFactory instance; - private static int liferay_version; // 60 = 6.0, 52 = 5.2 - - // --- External static interface - - public static WrapperFactory getInstance() { - if (instance == null) - instance = new WrapperFactory(); - return instance; - } - - public static int getLiferayVersion() { - return liferay_version; - } - - // --- Factory interface - - public static JournalArticleWrapper wrap(JournalArticle article) { - return getInstance().wrapArticle(article); - } - - // --- Implementation - - private WrapperFactory() { - if (liferay_version == 0) // means not initialized - liferay_version = findLiferayVersion(); - } - - private int findLiferayVersion() { - try { - JournalArticleWrapper.class.getMethod("getStatusByUserUuid", JournalArticleWrapper.NO_PARAMS); - return 60; // this method was introduced in 6.0 - } catch (NoSuchMethodException e) { - // since we only support 6.0 and 5.2 we assume this means that we - // are using 5.2. - return 52; - } - } - - private JournalArticleWrapper wrapArticle(JournalArticle article) { - return new JournalArticleWrapper(article); - } - -} \ No newline at end of file diff --git a/sandbox/liferay-integration/WEB-INF/src/tm/package.html b/sandbox/liferay-integration/WEB-INF/src/tm/package.html deleted file mode 100644 index 5d94b6e3a..000000000 --- a/sandbox/liferay-integration/WEB-INF/src/tm/package.html +++ /dev/null @@ -1,14 +0,0 @@ - - - - Contains all classes that are directly ontopia/topicmaps related. - The integration itself resides inside this package. - Covers not only the OntopiaAdapterIF + implementation but also DeciderIF implementations for TmSync. - - Methods from the integration can be accessed like -

    -        String topicmapId = OntopiaAdapter.instance.getTopicMapId();
    -    
    - diff --git a/sandbox/liferay-integration/WEB-INF/src/util/DateFormatter.java b/sandbox/liferay-integration/WEB-INF/src/util/DateFormatter.java deleted file mode 100644 index d389d8eb5..000000000 --- a/sandbox/liferay-integration/WEB-INF/src/util/DateFormatter.java +++ /dev/null @@ -1,24 +0,0 @@ - -package util; - -import java.text.SimpleDateFormat; -import java.util.Date; - -/** - * This class provides a convenient way to tranform Date objects into strings that fit into ontopoly - * @author mfi - */ - -public class DateFormatter { - - private static SimpleDateFormat simpleDateFormat = new SimpleDateFormat("yyyy'-'MM'-'dd HH:mm:ss"); - - public static String format(Date date){ - - String result = null; - if(date != null){ - result = simpleDateFormat.format(date); - } - return result; - } -} diff --git a/sandbox/liferay-integration/WEB-INF/src/util/PortletUtils.java b/sandbox/liferay-integration/WEB-INF/src/util/PortletUtils.java deleted file mode 100644 index 666927bd5..000000000 --- a/sandbox/liferay-integration/WEB-INF/src/util/PortletUtils.java +++ /dev/null @@ -1,97 +0,0 @@ - -package util; - -import java.util.Map; -import java.util.HashMap; -import java.util.Collections; -import net.ontopia.utils.StringTemplateUtils; -import net.ontopia.utils.OntopiaRuntimeException; -import net.ontopia.topicmaps.core.TopicIF; -import net.ontopia.topicmaps.query.utils.QueryWrapper; - -/** - * A collection of utility methods used by the portlets to perform - * various tasks. - */ -public class PortletUtils { - - /** - * Produces the correct link to the given topic using the URL template - * for the topic type as stored in the topic map. - */ - public static String makeLinkTo(TopicIF topic) { - // set up - QueryWrapper w = new QueryWrapper(topic.getTopicMap()); - w.setDeclarations("using lr for i\"http://psi.ontopia.net/liferay/\" "); - - // find the template - Map params = w.makeParams("topic", topic); - String template = w.queryForString( - "select $URL from " + - "direct-instance-of(%topic%, $TYPE), " + - "lr:url-template($TYPE, $URL)?", params); - - // if there's no template we can't make a link, so just returning an - // error - if (template == null) - return "No template set"; // FIXME: throw exception? - - // start setting up templates - Map templateparams = new HashMap(); - templateparams.put("topicid", topic.getObjectId()); - - // is this Liferay web content? if so, we need two more parameters - if (w.isTrue("instance-of(%topic%, lr:webcontent)?", params)) { - String gid = w.queryForString( - "select $GID from " + - "lr:contains(%topic% : lr:containee, $GROUP : lr:container), " + - "lr:groupid($GROUP, $GID)?", params); - - String aid = w.queryForString("lr:article_id(%topic%, $AID)?", params); - - templateparams.put("groupid", gid); - templateparams.put("articleid", gid); - } - - // evaluate the template - return StringTemplateUtils.replace(template, templateparams); - } - - /** - * Parses the query string to extract the query parameters as a map. - */ - public static Map parseQueryString(String str) { - if (str == null) - return Collections.EMPTY_MAP; - - Map params = new HashMap(); - int prevamp = -1; - int preveq = -1; - for (int ix = 0; ix < str.length(); ix++) { - char ch = str.charAt(ix); - - if (ch == '=') { - if (preveq != -1) - throw new OntopiaRuntimeException("Bad query string " + str); - preveq = ix; - } else if (ch == '&') { - if (preveq == -1) - throw new OntopiaRuntimeException("Bad query string " + str); - String name = str.substring(prevamp + 1, preveq); - String value = str.substring(preveq + 1, ix); - params.put(name, value); - prevamp = ix; - preveq = -1; - } - } - - // must also do last pair - if (preveq == -1) - throw new OntopiaRuntimeException("Bad query string " + str); - String name = str.substring(prevamp + 1, preveq); - String value = str.substring(preveq + 1); - params.put(name, value); - - return params; - } -} \ No newline at end of file diff --git a/sandbox/liferay-integration/WEB-INF/src/util/package.html b/sandbox/liferay-integration/WEB-INF/src/util/package.html deleted file mode 100644 index b9747fad0..000000000 --- a/sandbox/liferay-integration/WEB-INF/src/util/package.html +++ /dev/null @@ -1,9 +0,0 @@ - - - - This package contains a utility class for formatting dates in the right fashion. - Other (future) utilities should go here as well. - - diff --git a/sandbox/liferay-integration/build.xml b/sandbox/liferay-integration/build.xml deleted file mode 100644 index cf7368188..000000000 --- a/sandbox/liferay-integration/build.xml +++ /dev/null @@ -1,37 +0,0 @@ - - - - - - - - - - - - - - - - - - - - Compiling Ontopia/Liferay classes... - - - - - - - - - Making ontopia-liferay.jar... - - - - - - \ No newline at end of file diff --git a/sandbox/liferay-integration/misc/liferay.ltm b/sandbox/liferay-integration/misc/liferay.ltm deleted file mode 100644 index 9a496fc02..000000000 --- a/sandbox/liferay-integration/misc/liferay.ltm +++ /dev/null @@ -1,1739 +0,0 @@ -@"utf-8" -#VERSION "1.3" -/* - Generator: Ontopia - Date: 2010-02-16 16:52 -*/ - -/* ----------------- TOPIC MAP ----------------- */ - -#TOPICMAP~ id249 -[id249 : id225 = "Liferay" - @"file:/Users/mfi/Desktop/FH/ontopia-read-only/ontopia/build/dists/ontopia-5.1.0b1/apache-tomcat/webapps/ontopoly/WEB-INF/config/ontopoly-ontology.xtm#reified-id68" - @"file:/Users/mfi/Desktop/FH/ontopia-read-only/ontopia/build/dists/ontopia-5.1.0b1/apache-tomcat/webapps/ontopoly/WEB-INF/config/ontopoly-ontology.xtm#reified-id206"] - {id249, id138, [[This topicmap shall provide a framework of topics to model entities from liferay portal into topicmaps]]} - {id249, id14, [[0.49]]} - {id249, id177, [[1.9]]} - {id249, id200, [[Matthias Fischer]]} - -/* ----------------- ONTOLOGY ------------------ */ - -/* ----------------- Topic Types --------------- */ - - -/* -- TT: id134 -- */ -[id101 : id134 id58 id63 = "Occurrence type" - @"http://psi.ontopia.net/ontology/occurrence-type"] - {id101, id223, [[000000000]]} / id277 - {id101, id223, [[000001000]]} / id188 - {id101, id223, [[000003000]]} / id91 - {id101, id223, [[000017000]]} / id89 - {id101, id223, [[000018000]]} / id59 - {id101, id223, [[000038000]]} / id236 -[id235 : id134 id58 id63 = "Association role type" - @"http://psi.ontopia.net/ontology/role-type"] - {id235, id223, [[000000000]]} / id277 - {id235, id223, [[000001000]]} / id188 - {id235, id223, [[000003000]]} / id91 - {id235, id223, [[000017000]]} / id89 - {id235, id223, [[000018000]]} / id59 - {id235, id223, [[000026000]]} / id61 - {id235, id223, [[000068000]]} / id47 - {id235, id223, [[000070000]]} / id62 -[id237 : id134 id58 id63 = "Name type" - @"http://psi.ontopia.net/ontology/name-type"] - {id237, id223, [[000000000]]} / id277 - {id237, id223, [[000001000]]} / id188 - {id237, id223, [[000003000]]} / id91 - {id237, id223, [[000017000]]} / id89 - {id237, id223, [[000018000]]} / id59 - {id237, id223, [[000036000]]} / id260 -[id4 : id134 id58 id63 = "Association type" - @"http://psi.ontopia.net/ontology/association-type"] - {id4, id223, [[000000000]]} / id277 - {id4, id223, [[000001000]]} / id188 - {id4, id223, [[000003000]]} / id91 - {id4, id223, [[000017000]]} / id89 - {id4, id223, [[000018000]]} / id59 - {id4, id223, [[000020000]]} / id120 - {id4, id223, [[000022000]]} / id187 - {id4, id223, [[000067000]]} / id98 - {id4, id223, [[000069000]]} / id97 - {id4, id223, [[000071000]]} / id90 -[id63 : id134 id58 id63 = "Topic type" - @"http://psi.ontopia.net/ontology/topic-type"] - {id63, id223, [[000000000]]} / id277 - {id63, id223, [[000001000]]} / id188 - {id63, id223, [[000003000]]} / id91 - {id63, id223, [[000014000]]} / id102 - {id63, id223, [[000017000]]} / id89 - {id63, id223, [[000018000]]} / id59 - {id63, id223, [[000030000]]} / id6 - {id63, id223, [[000039000]]} / id39 - {id63, id223, [[000072000]]} / id189 - {id63, id223, [[000080000]]} / id19 - -/* -- TT: id58 -- */ -[id112 : id58 id63 = "Identity field" - @"http://psi.ontopia.net/ontology/identity-field"] - {id112, id223, [[000000000]]} / id277 - {id112, id223, [[000001000]]} / id188 - {id112, id223, [[000019000]]} / id194 - {id112, id223, [[000029000]]} / id238 - {id112, id223, [[000032000]]} / id141 - {id112, id223, [[000033000]]} / id104 - {id112, id223, [[000041000]]} / id54 - {id112, id223, [[000043000]]} / id195 - {id112, id223, [[000044000]]} / id83 - {id112, id223, [[000048000]]} / id86 - {id112, id223, [[000051000]]} / id92 -[id134 : id58 id63 = "Ontology type" - @"http://psi.ontopia.net/ontology/ontology-type"] - {id134, id223, [[000000000]]} / id277 -[id136 : id58 id63 = "Role field" - @"http://psi.ontopia.net/ontology/role-field"] - {id136, id223, [[000000000]]} / id277 - {id136, id223, [[000001000]]} / id188 - {id136, id223, [[000019000]]} / id194 - {id136, id223, [[000024000]]} / id203 - {id136, id223, [[000025000]]} / id72 - {id136, id223, [[000029000]]} / id238 - {id136, id223, [[000032000]]} / id141 - {id136, id223, [[000041000]]} / id54 - {id136, id223, [[000043000]]} / id195 - {id136, id223, [[000044000]]} / id83 - {id136, id223, [[000046000]]} / id93 - {id136, id223, [[000048000]]} / id86 - {id136, id223, [[000051000]]} / id92 - {id136, id223, [[000075000]]} / id164 - {id136, id223, [[000076000]]} / id196 - {id136, id223, [[000077000]]} / id197 -[id137 : id58 id63 = "Public system topic" - @"http://psi.ontopia.net/ontology/public-system-topic"] - {id137, id223, [[000000000]]} / id277 -[id144 : id58 id63 = "View mode" - @"http://psi.ontopia.net/ontology/view-mode"] - {id144, id223, [[000000000]]} / id277 - {id144, id223, [[000001000]]} / id188 - {id144, id223, [[000050000]]} / id279 -[id176 : id58 id63 = "Create action" - @"http://psi.ontopia.net/ontology/create-action"] - {id176, id223, [[000000000]]} / id277 - {id176, id223, [[000001000]]} / id188 - {id176, id223, [[000042000]]} / id163 -[id212 : id58 id63 = "Datatype" - @"http://psi.ontopia.net/ontology/datatype"] - {id212, id223, [[000000000]]} / id277 - {id212, id223, [[000001000]]} / id188 - {id212, id223, [[000008000]]} / id25 - {id212, id223, [[000027000]]} / id202 -[id229 : id58 id63 = "Superordinate Role Type" - @"http://www.techquila.com/psi/hierarchy/#superordinate-role-type"] - {id229, id223, [[000000000]]} / id277 -[id24 : id58 id63 = "Name field" - @"http://psi.ontopia.net/ontology/name-field"] - {id24, id223, [[000000000]]} / id277 - {id24, id223, [[000001000]]} / id188 - {id24, id223, [[000019000]]} / id194 - {id24, id223, [[000029000]]} / id238 - {id24, id223, [[000032000]]} / id141 - {id24, id223, [[000035000]]} / id183 - {id24, id223, [[000041000]]} / id54 - {id24, id223, [[000043000]]} / id195 - {id24, id223, [[000044000]]} / id83 - {id24, id223, [[000048000]]} / id86 - {id24, id223, [[000051000]]} / id92 -[id246 : id58 id63 = "Interface control" - @"http://psi.ontopia.net/ontology/interface-control"] - {id246, id223, [[000000000]]} / id277 - {id246, id223, [[000001000]]} / id188 - {id246, id223, [[000047000]]} / id250 -[id257 : id58 id63 = "Hierarchical Relation Type" - @"http://www.techquila.com/psi/hierarchy/#hierarchical-relation-type"] - {id257, id223, [[000000000]]} / id277 -[id268 : id58 id63 = "Fields view" - @"http://psi.ontopia.net/ontology/fields-view"] - {id268, id223, [[000000000]]} / id277 - {id268, id223, [[000001000]]} / id188 - {id268, id223, [[000015000]]} / id158 - {id268, id223, [[000016000]]} / id108 - {id268, id223, [[000045000]]} / id96 - {id268, id223, [[000049000]]} / id186 - {id268, id223, [[000052000]]} / id263 - {id268, id223, [[000053000]]} / id211 -[id269 : id58 id63 = "Subordinate Role Type" - @"http://www.techquila.com/psi/hierarchy/#subordinate-role-type"] - {id269, id223, [[000000000]]} / id277 -[id276 : id58 id63 = "Occurrence field" - @"http://psi.ontopia.net/ontology/occurrence-field"] - {id276, id223, [[000000000]]} / id277 - {id276, id223, [[000001000]]} / id188 - {id276, id223, [[000019000]]} / id194 - {id276, id223, [[000028000]]} / id245 - {id276, id223, [[000029000]]} / id238 - {id276, id223, [[000032000]]} / id141 - {id276, id223, [[000037000]]} / id9 - {id276, id223, [[000041000]]} / id54 - {id276, id223, [[000043000]]} / id195 - {id276, id223, [[000044000]]} / id83 - {id276, id223, [[000048000]]} / id86 - {id276, id223, [[000051000]]} / id92 - {id276, id223, [[000073000]]} / id243 - {id276, id223, [[000074000]]} / id65 -[id36 : id58 id63 = "Identity type" - @"http://psi.ontopia.net/ontology/identity-type"] - {id36, id223, [[000000000]]} / id277 - {id36, id223, [[000001000]]} / id188 - {id36, id223, [[000003000]]} / id91 - {id36, id223, [[000017000]]} / id89 - {id36, id223, [[000018000]]} / id59 - {id36, id223, [[000034000]]} / id57 -[id40 : id58 id63 = "Cardinality" - @"http://psi.ontopia.net/ontology/cardinality"] - {id40, id223, [[000000000]]} / id277 - {id40, id223, [[000001000]]} / id188 - {id40, id223, [[000031000]]} / id110 - {id40, id223, [[000078000]]} / id69 - {id40, id223, [[000079000]]} / id166 -[id58 : id58 id63 = "System topic" - @"http://psi.ontopia.net/ontology/system-topic"] - {id58, id223, [[000000000]]} / id277 -[id76 : id58 id63 = "Ontology" - @"http://psi.ontopia.net/ontology/ontology"] - {id76, id223, [[000000000]]} / id277 -[id80 : id58 id63 = "Edit mode" - @"http://psi.ontopia.net/ontology/edit-mode"] - {id80, id223, [[000000000]]} / id277 - {id80, id223, [[000001000]]} / id188 - {id80, id223, [[000040000]]} / id147 -[id88 : id58 id63 = "Association field" - @"http://psi.ontopia.net/ontology/association-field"] - {id88, id223, [[000000000]]} / id277 - {id88, id223, [[000001000]]} / id188 - {id88, id223, [[000021000]]} / id173 - {id88, id223, [[000023000]]} / id7 - -/* -- TT: id63 -- */ -[id157 : id63 = "Workflow state" - @"http://psi.ontopia.net/liferay/workflow_state"] - {id157, id138, [[The state of a document within the workflow of liferay portal]]} - {id157, id223, [[000000001]]} / id277 - {id157, id223, [[000000002]]} / id132 - {id157, id223, [[000000003]]} / id188 -[id204 : id63 = "Community" - @"http://psi.ontopia.net/liferay/community"] - {id204, id138, [[A community is a group and will be treated as one]]} - {id204, id223, [[000000001]]} / id277 - {id204, id223, [[000000002]]} / id26 - -/* ----------------- Type Hierarchy ------------ */ - -id292( id182 : id293, id175 : id266 ) -id292( id285 : id293, id112 : id266 ) -id292( id285 : id293, id136 : id266 ) -id292( id285 : id293, id24 : id266 ) -id292( id285 : id293, id276 : id266 ) -id292( id5 : id293, id204 : id266 ) -id292( id58 : id293, id137 : id266 ) - -/* ----------------- Role Types ---------------- */ - - -/* -- TT: id229 -- */ -[id293 : id229 id235 id58 = "Superclass" - @"http://www.topicmaps.org/xtm/1.0/core.xtm#superclass" - @"http://psi.ontopia.net/ontology/superclass"] - -/* -- TT: id235 -- */ -[id209 : id235 id58 = "Child view" - @"http://psi.ontopia.net/ontology/child-view"] -[id266 : id235 id269 id58 = "Subclass" - @"http://psi.ontopia.net/ontology/subclass" - @"http://www.topicmaps.org/xtm/1.0/core.xtm#subclass"] -[id3 : id235 id58 = "Parent view" - @"http://psi.ontopia.net/ontology/parent-view"] -[id73 : id235 id58 = "Field owner" - @"http://psi.ontopia.net/ontology/field-owner"] - -/* -- TT: id58 -- */ -[id285 : id58 id63 = "Field definition" - @"http://psi.ontopia.net/ontology/field-definition"] - {id285, id223, [[000000000]]} / id277 - {id285, id223, [[000001000]]} / id188 - {id285, id223, [[000019000]]} / id194 - {id285, id223, [[000029000]]} / id238 - {id285, id223, [[000032000]]} / id141 - {id285, id223, [[000041000]]} / id54 - {id285, id223, [[000043000]]} / id195 - {id285, id223, [[000044000]]} / id83 - {id285, id223, [[000048000]]} / id86 - {id285, id223, [[000051000]]} / id92 - -/* ----------------- Association Types --------- */ - - -/* -- TT: id257 -- */ -[id292 : id257 id4 id58 = "Superclass/subclass" - = "Subclass of" / id266 - = "Superclass of" / id293 - @"http://psi.ontopia.net/ontology/superclass-subclass" - @"http://www.topicmaps.org/xtm/1.0/core.xtm#superclass-subclass"] - -/* -- TT: id4 -- */ -[id105 : id4 id58 = "Use edit mode" - @"http://psi.ontopia.net/ontology/use-edit-mode"] -[id11 : id4 id58 = "Is hidden view" - @"http://psi.ontopia.net/ontology/is-hidden-view"] -[id111 : id4 id58 = "Has datatype" - @"http://psi.ontopia.net/ontology/has-datatype"] -[id113 : id4 id58 = "Subordinate role" - @"http://psi.ontopia.net/ontology/subordinate-role-type"] -[id130 : id4 id58 = "Has name type" - @"http://psi.ontopia.net/ontology/has-name-type"] -[id133 : id4 id58 = "Has association field" - @"http://psi.ontopia.net/ontology/has-association-field"] -[id145 : id4 id58 = "Has occurrence type" - @"http://psi.ontopia.net/ontology/has-occurrence-type"] -[id146 : id4 id58 = "Is abstract" - @"http://psi.ontopia.net/ontology/is-abstract"] -[id148 : id4 id58 = "Has field" - @"http://psi.ontopia.net/ontology/has-field"] -[id15 : id4 id58 = "Has identity type" - @"http://psi.ontopia.net/ontology/has-identity-type"] -[id190 : id4 id58 = "Use View mode" - @"http://psi.ontopia.net/ontology/use-view-mode"] -[id217 : id4 id58 = "Is embedded view" - @"http://psi.ontopia.net/ontology/is-embedded-view"] -[id222 : id4 id58 = "Has association type" - @"http://psi.ontopia.net/ontology/has-association-type"] -[id228 : id4 id58 = "Superordinate role" - @"http://psi.ontopia.net/ontology/superordinate-role-type"] -[id240 : id4 id58 = "Has role type" - @"http://psi.ontopia.net/ontology/has-role-type"] -[id281 : id4 id58 = "Has cardinality" - @"http://psi.ontopia.net/ontology/has-cardinality"] -[id38 : id4 id58 = "Field in view" - @"http://psi.ontopia.net/ontology/field-in-view"] -[id64 : id4 id58 = "Use interface control" - @"http://psi.ontopia.net/ontology/use-interface-control"] -[id84 : id4 id58 = "Is hidden type" - @"http://psi.ontopia.net/ontology/is-hidden-type"] -[id85 : id4 id58 = "Use value view" - @"http://psi.ontopia.net/ontology/use-value-view"] - -/* ----------------- Occurrence Types ---------- */ - - -/* -- TT: id101 -- */ -[id103 : id101 id58 = "Minimum cardinality" - @"http://psi.ontopia.net/ontology/min-cardinality"] -[id12 : id101 = "GroupId" - @"http://psi.ontopia.net/liferay/groupid"] - {id12, id138, [[The groupId used in liferay to identify different groups]]} -[id138 : id101 id137 = "Description" - @"http://purl.org/dc/elements/1.1/description" - @"http://psi.ontopia.net/ontology/description"] -[id160 : id101 id58 = "Height" - @"http://psi.ontopia.net/ontology/height"] -[id165 : id101 id58 = "Width" - @"http://psi.ontopia.net/ontology/width"] -[id17 : id101 id58 = "Maximum cardinality" - @"http://psi.ontopia.net/ontology/max-cardinality"] -[id22 : id101 id58 = "Players types query" - @"http://psi.ontopia.net/ontology/allowed-players-types-query"] -[id220 : id101 id58 = "Datatype locator" - @"http://psi.ontopia.net/ontology/datatype-locator"] -[id223 : id101 id58 = "Field order" - @"http://psi.ontopia.net/ontology/field-order"] -[id258 : id101 = "Url-Template" - @"http://psi.ontopia.net/liferay/url-template"] -[id41 : id101 id58 = "Players query" - @"http://psi.ontopia.net/ontology/allowed-players-query"] - -/* ----------------- INSTANCES ----------------- */ - -/* ----------------- Topics -------------------- */ - - -/* -- TT: id101 -- */ -[id117 : id101 id58 = "Hierarchy definition query" - @"http://psi.ontopia.net/ontology/hierarchy-definition-query"] -[id121 : id101 = "Create Date" - @"http://psi.ontopia.net/liferay/create_date"] - {id121, id138, [[Date of creation]]} -[id139 : id101 = "NodeId" - @"http://psi.ontopia.net/liferay/wikinodeid"] - {id139, id138, [[The NodeId of a WikiNode]]} -[id14 : id101 = "Version" - @"http://psi.ontopia.net/ontology/version" - @"http://purl.org/dc/elements/1.1/version"] -[id143 : id101 = "Last Post Date" - @"http://psi.ontopia.net/liferay/lastpostdate"] - {id143, id138, [[The date on which the last post has been made.]]} -[id159 : id101 = "Expiry Date" - @"http://psi.ontopia.net/liferay/expiry_date"] - {id159, id138, [[The date of expiry]]} -[id177 : id101 id58 = "Ontology Version" - @"http://psi.ontopia.net/ontology/ted-ontology-version"] -[id198 : id101 = "PageId" - @"http://psi.ontopia.net/liferay/wikipageid"] - {id198, id138, [[The id of a wikipage]]} -[id200 : id101 = "Creator" - @"http://psi.ontopia.net/ontology/creator" - @"http://purl.org/dc/elements/1.1/creator"] -[id226 : id101 id58 = "Tolog declarations" - @"http://psi.ontopia.net/ontology/tolog-declarations"] -[id251 : id101 = "ArticleID" - @"http://psi.ontopia.net/liferay/article_id"] - {id251, id138, [[The ID of an article, composed in Liferay portal. Through the ID it is possible to find different versions of the same article within the topicmap.]]} -[id254 : id101 = "Approved Date" - @"http://psi.ontopia.net/liferay/approved_date"] - {id254, id138, [[Date of approval]]} -[id264 : id101 id58 = "Players search query" - @"http://psi.ontopia.net/ontology/allowed-players-search-query"] -[id271 : id101 = "Modified Date" - @"http://psi.ontopia.net/liferay/modified_date"] - {id271, id138, [[The date of modification]]} -[id272 : id101 id58 = "Field value order" - @"http://psi.ontopia.net/ontology/field-value-order"] -[id274 : id101 = "Version" - @"http://psi.ontopia.net/liferay/version"] - {id274, id138, [[The version of an article]]} -[id288 : id101 = "Review Date" - @"http://psi.ontopia.net/liferay/review_date"] - {id288, id138, [[The date of review]]} -[id31 : id101 = "Display Date" - @"http://psi.ontopia.net/liferay/display_date"] - {id31, id138, [[The date of display]]} - -/* -- TT: id112 -- */ -[id185 : id112] -[id188 : id112 id58 - @"http://psi.ontopia.net/ontology/if-subject-identifier"] -[id26 : id112 = "Unique ID:" - @"http://psi.ontopia.net/liferay/unique_id"] - -/* -- TT: id136 -- */ -[id102 : id136 id58 = "Abstract" - @"http://psi.ontopia.net/ontology/rf-topic-type_is-abstract"] -[id104 : id136 id58 = "Identity type" - @"http://psi.ontopia.net/ontology/rf-identity-field_has-identity-type"] -[id108 : id136 id58 = "Is embedded view" - @"http://psi.ontopia.net/ontology/rf-fields-view_is-embedded-view"] -[id110 : id136 id58 = "Field cardinalities" - @"http://psi.ontopia.net/ontology/rf-cardinality_has-cardinality"] -[id120 : id136 id58 = "Symmetric" - @"http://psi.ontopia.net/ontology/rf-association-type_is-symmetric"] -[id13 : id136 = "Concept"] -[id132 : id136 = "has_state"] -[id141 : id136 id58 = "Cardinality" - @"http://psi.ontopia.net/ontology/rf-field-definition_has-cardinality"] -[id147 : id136 id58 = "Used by" - @"http://psi.ontopia.net/ontology/rf-edit-mode_use-edit-mode"] -[id149 : id136 = "Child"] -[id150 : id136 = "created work"] -[id151 : id136 = "Parent"] -[id158 : id136 id58 = "Is hidden view" - @"http://psi.ontopia.net/ontology/rf-fields-view_is-hidden-view"] -[id163 : id136 id58 = "Used by" - @"http://psi.ontopia.net/ontology/rf-create-action_use-create-action"] -[id168 : id136 = "creator of work" - @"http://psi.ontopia.net/liferay/created_work"] -[id173 : id136 id58 = "Association type" - @"http://psi.ontopia.net/ontology/rf-association-field_has-association-type"] -[id183 : id136 id58 = "Name type" - @"http://psi.ontopia.net/ontology/rf-name-field_has-name-type"] -[id184 : id136 = "Broader Term"] -[id186 : id136 id58 = "Used by" - @"http://psi.ontopia.net/ontology/rf-fields-view_use-view-mode"] -[id187 : id136 id58 = "Association field" - @"http://psi.ontopia.net/ontology/rf-association-type_has-association-type"] -[id189 : id136 id58 = "Hierarchical associations" - @"http://psi.ontopia.net/ontology/rf-topic-type_forms-hierarchy-for"] -[id194 : id136 id58 = "Sortable" - @"http://psi.ontopia.net/ontology/rf-field-definition_is-sortable-field"] -[id195 : id136 id58 = "Create actions" - @"http://psi.ontopia.net/ontology/rf-field-definition_use-create-action"] -[id202 : id136 id58 = "Occurrence field" - @"http://psi.ontopia.net/ontology/rf-datatype_has-datatype"] -[id203 : id136 id58 = "Association field" - @"http://psi.ontopia.net/ontology/rf-role-field_has-association-field"] -[id210 : id136 = "the contained thing"] -[id211 : id136 id58 = "Child view" - @"http://psi.ontopia.net/ontology/rf-child-view_use-value-view"] -[id215 : id136 = "Narrower Term"] -[id233 : id136 = "the container"] -[id236 : id136 id58 = "Occurrence field" - @"http://psi.ontopia.net/ontology/rf-occurrence-type_has-occurrence-type"] -[id238 : id136 id58 = "Used by" - @"http://psi.ontopia.net/ontology/rf-field-definition_has-field"] -[id245 : id136 id58 = "Data type" - @"http://psi.ontopia.net/ontology/rf-field-definition_has-datatype"] -[id250 : id136 id58 = "Field" - @"http://psi.ontopia.net/ontology/rf-interface-control_use-interface-control"] -[id255 : id136 = "Approved work"] -[id260 : id136 id58 = "Name field" - @"http://psi.ontopia.net/ontology/rf-name-type_has-name-type"] -[id263 : id136 id58 = "Parent view" - @"http://psi.ontopia.net/ontology/rf-parent-view_use-value-view"] -[id265 : id136 = "User approving"] -[id279 : id136 id58 = "View mode" - @"http://psi.ontopia.net/ontology/rf-view-mode_use-view-mode"] -[id39 : id136 id58 = "Large instance set" - @"http://psi.ontopia.net/ontology/rf-topic-type_has-large-instance-set"] -[id46 : id136 = "workflow_state"] -[id47 : id136 id58 = "Superordinate role type for" - @"http://psi.ontopia.net/ontology/rf-role-type_superordinate-role-type"] -[id54 : id136 id58 = "Edit modes" - @"http://psi.ontopia.net/ontology/rf-field-definition_use-edit-mode"] -[id57 : id136 id58 = "Identity field" - @"http://psi.ontopia.net/ontology/rf-identity-type_has-identity-type"] -[id59 : id136 id58 = "Read-only" - @"http://psi.ontopia.net/ontology/rf-ontology-type_is-readonly-type"] -[id6 : id136 id58 = "Fields" - @"http://psi.ontopia.net/ontology/rf-field-owner_has-field"] -[id60 : id136 id58 = "Superclass" - @"http://psi.ontopia.net/ontology/rf-subclass_superclass-subclass"] - {id60, id22, [[select $TT from direct-instance-of(%topic%, $TT), {$TT = on:topic-type | $TT = on:association-type | $TT = on:occurrence-type | $TT = on:name-type | $TT = on:role-type}?]]} - {id60, id41, [[select $T from direct-instance-of(%topic%, $TT), direct-instance-of($T, $TT), $T /= %topic%?]]} -[id61 : id136 id58 = "Role field" - @"http://psi.ontopia.net/ontology/rf-role-type_has-role-type"] - {id61, id41, [[select $T from { instance-of($T, on:topic-type) | instance-of($T, on:role-type) }?]]} -[id62 : id136 id58 = "Subordinate role type for" - @"http://psi.ontopia.net/ontology/rf-role-type_subordinate-role-type"] -[id66 : id136 id58 = "Subclass" - @"http://psi.ontopia.net/ontology/rf-superclass_superclass-subclass"] - {id66, id22, [[select $TT from direct-instance-of(%topic%, $TT), {$TT = on:topic-type | $TT = on:association-type | $TT = on:occurrence-type | $TT = on:name-type | $TT = on:role-type}?]]} - {id66, id41, [[select $T from direct-instance-of(%topic%, $TT), direct-instance-of($T, $TT), $T /= %topic%?]]} -[id67 : id136 = "Work"] -[id7 : id136 id58 = "Roles" - @"http://psi.ontopia.net/ontology/rf-association-field_has-association-field"] -[id72 : id136 id58 = "Role type" - @"http://psi.ontopia.net/ontology/rf-role-field_has-role-type"] -[id83 : id136 id58 = "Part of views" - @"http://psi.ontopia.net/ontology/rf-field-definition_field-in-view"] -[id86 : id136 id58 = "View mode" - @"http://psi.ontopia.net/ontology/rf-field-definition_use-view-mode"] -[id89 : id136 id58 = "Hidden" - @"http://psi.ontopia.net/ontology/rf-ontology-type_is-hidden-type"] -[id9 : id136 id58 = "Occurrence type" - @"http://psi.ontopia.net/ontology/rf-occurrence-field_has-occurrence-type"] -[id90 : id136 id58 = "Hierarchical for" - @"http://psi.ontopia.net/ontology/rf-association-type_forms-hierarchy-for"] -[id92 : id136 id58 = "Value view" - @"http://psi.ontopia.net/ontology/rf-field-definition_use-value-view"] -[id93 : id136 id58 = "Interface control" - @"http://psi.ontopia.net/ontology/rf-field-definition_use-interface-control"] -[id96 : id136 id58 = "Fields in view" - @"http://psi.ontopia.net/ontology/rf-fields-view_field-in-view"] -[id97 : id136 id58 = "Subordinate role type" - @"http://psi.ontopia.net/ontology/rf-association-type_subordinate-role-type"] -[id98 : id136 id58 = "Superordinate role type" - @"http://psi.ontopia.net/ontology/rf-association-type_superordinate-role-type"] - -/* -- TT: id137 -- */ -[id107 : id137 id80 = "Normal" - @"http://psi.ontopia.net/ontology/edit-mode-normal"] -[id115 : id137 id40 = "Exactly one" - @"http://psi.ontopia.net/ontology/cardinality-1-1"] - {id115, id103, [[1]]} - {id115, id17, [[1]]} -[id122 : id137 id212 = "String" - @"http://www.w3.org/2001/XMLSchema#string" - @"http://psi.ontopia.net/ontology/datatype-string"] - {id122, id220, "http://www.w3.org/2001/XMLSchema#string"} -[id124 : id137 id212 = "URI" - @"http://psi.ontopia.net/ontology/datatype-uri" - @"http://www.w3.org/2001/XMLSchema#anyURI"] - {id124, id220, "http://www.w3.org/2001/XMLSchema#anyURI"} -[id126 : id137 id246 = "Auto-complete" - @"http://psi.ontopia.net/ontology/auto-complete"] -[id156 : id137 id40 = "Zero or one" - @"http://psi.ontopia.net/ontology/cardinality-0-1"] - {id156, id103, [[0]]} - {id156, id17, [[1]]} -[id161 : id137 id212 = "HTML" - @"http://psi.ontopia.net/ontology/datatype-html"] - {id161, id220, "http://psi.ontopia.net/ontology/datatype-html"} -[id162 : id137 id40 = "Zero or more" - @"http://psi.ontopia.net/ontology/cardinality-0-M"] - {id162, id103, [[0]]} -[id174 : id137 id80 = "No edit" - @"http://psi.ontopia.net/ontology/edit-mode-no-edit"] -[id18 : id137 id246 = "Drop-down list" - @"http://psi.ontopia.net/ontology/drop-down-list"] -[id181 : id137 id144 = "Embedded" - @"http://psi.ontopia.net/ontology/view-mode-embedded"] -[id193 : id137 id144 = "Not traversable" - @"http://psi.ontopia.net/ontology/view-mode-not-traversable"] -[id208 : id137 id144 = "Read-only" - @"http://psi.ontopia.net/ontology/view-mode-readonly"] -[id21 : id137 id80 = "Owned values" - @"http://psi.ontopia.net/ontology/edit-mode-owned-values"] -[id218 : id137 id40 = "One or more" - @"http://psi.ontopia.net/ontology/cardinality-1-M"] - {id218, id103, [[1]]} -[id230 : id137 id237 = "Name" - @"http://psi.ontopia.net/ontology/untyped-name" - @"http://psi.topicmaps.org/iso13250/model/topic-name"] -[id231 : id137 id246 = "Browse dialog" - @"http://psi.ontopia.net/ontology/browse-dialog"] -[id252 : id137 id268 = "Advanced" - @"http://psi.ontopia.net/ontology/advanced-fields-view"] -[id262 : id137 id212 = "Date" - @"http://www.w3.org/2001/XMLSchema#date" - @"http://psi.ontopia.net/ontology/datatype-date"] - {id262, id220, "http://www.w3.org/2001/XMLSchema#date"} -[id277 : id137 id24 = "Name" - @"http://psi.ontopia.net/ontology/nf-untyped-name"] -[id282 : id137 id176 = "Go to new topic" - @"http://psi.ontopia.net/ontology/create-action-navigate"] -[id284 : id137 id212 = "Number" - @"http://psi.ontopia.net/ontology/datatype-number" - @"http://www.w3.org/2001/XMLSchema#decimal"] - {id284, id220, "http://www.w3.org/2001/XMLSchema#decimal"} -[id290 : id137 id80 = "New values only" - @"http://psi.ontopia.net/ontology/edit-mode-new-values-only"] -[id35 : id137 id246 = "Search dialog" - @"http://psi.ontopia.net/ontology/search-dialog"] -[id44 : id137 id80 = "Existing values only" - @"http://psi.ontopia.net/ontology/edit-mode-existing-values-only"] -[id52 : id137 id176 = "Edit new topic in popup window" - @"http://psi.ontopia.net/ontology/create-action-popup"] -[id53 : id137 id212 = "Datetime" - @"http://psi.ontopia.net/ontology/datatype-datetime" - @"http://www.w3.org/2001/XMLSchema#dateTime"] - {id53, id220, "http://www.w3.org/2001/XMLSchema#dateTime"} -[id56 : id137 id212 = "Image" - @"http://psi.ontopia.net/ontology/datatype-image"] - {id56, id220, "http://psi.ontopia.net/ontology/datatype-image"} -[id78 : id137 id176 = "None" - @"http://psi.ontopia.net/ontology/create-action-none"] -[id82 : id137 id144 = "Hidden" - @"http://psi.ontopia.net/ontology/view-mode-hidden"] -[id87 : id137 id268 = "Default" - @"http://psi.ontopia.net/ontology/default-fields-view"] -[id91 : id137 id276 - @"http://psi.ontopia.net/ontology/of-description"] - {id91, id160, [[5]]} - {id91, id165, [[50]]} - -/* -- TT: id157 -- */ -[id155 : id157 = "New" - @"http://psi.ontopia.net/liferay/workflow_new"] -[id45 : id157 = "Approved" - @"http://psi.ontopia.net/liferay/workflow_approved"] -[id77 : id157 = "Expired" - @"http://psi.ontopia.net/liferay/workflow_expired"] - -/* -- TT: id204 -- */ -[id278 : id204 = "Guest"] - {id278, id12, [[18]]} - -/* -- TT: id235 -- */ -[id180 : id235 = "Broader" - @"http://www.techquila.com/psi/thesaurus/#broader-term"] - {id180, id138, [[A more general notion of a certain concept]]} -[id247 : id235 = "Narrower Term" - @"http://www.techquila.com/psi/thesaurus/#narrower-term"] - {id247, id138, [[A more specific notion of a certain concept]]} -[id256 : id235 = "State" - @"http://psi.ontopia.net/liferay/state"] - {id256, id138, [[The representation of a state]]} -[id270 : id235 = "Creator" - @"http://psi.ontopia.net/liferay/creator"] - {id270, id138, [[A person who created a certain thing]]} -[id280 : id235 = "Containee" - @"http://psi.ontopia.net/liferay/containee"] -[id33 : id235 = "Child" - @"http://psi.ontopia.net/liferay/child"] - {id33, id138, [[The child in a parent-child relationship]]} -[id50 : id235 = "Container" - @"http://psi.ontopia.net/liferay/container"] -[id51 : id235 = "Concept" - @"http://psi.ontopia.net/liferay/concept"] - {id51, id138, [[A concept on which a work can be about]]} -[id75 : id235 = "Parent" - @"http://psi.ontopia.net/liferay/parent"] - {id75, id138, [[The parent in a parent-child relation]]} -[id81 : id235 = "Approver" - @"http://psi.ontopia.net/liferay/approver"] - {id81, id138, [[A person (usually a user) who is approving of a certain webcontent.]]} -[id99 : id235 = "Work" - @"http://psi.ontopia.net/liferay/work"] - {id99, id138, [[A work that has been created by a person]]} - -/* -- TT: id268 -- */ -[id125 : id268 = "conceptView" - @"http://psi.ontopia.net/liferay/conceptview"] -[id127 : id268 id58 = "Association field view" - @"http://psi.ontopia.net/ontology/association-field-embedded-view"] -[id167 : id268 id58 = "Name field view" - @"http://psi.ontopia.net/ontology/name-field-embedded-view"] -[id20 : id268 id58 = "Declared fields" - @"http://psi.ontopia.net/ontology/declared-fields-view"] -[id28 : id268 id58 = "Identity field view" - @"http://psi.ontopia.net/ontology/identity-field-embedded-view"] -[id49 : id268 id58 = "Occurrence field view" - @"http://psi.ontopia.net/ontology/occurrence-field-embedded-view"] -[id74 : id268 id58 = "Role field view" - @"http://psi.ontopia.net/ontology/role-field-embedded-view"] - -/* -- TT: id276 -- */ -[id1 : id276 = "PageId"] -[id114 : id276 = "Create Date"] -[id128 : id276 id58 - @"http://psi.ontopia.net/ontology/of-tolog-declarations"] - {id128, id160, [[5]]} - {id128, id165, [[50]]} -[id135 : id276 = "Approved Date"] -[id154 : id276 = "Version"] -[id164 : id276 id58 - @"http://psi.ontopia.net/ontology/of-allowed-players-query"] - {id164, id160, [[5]]} - {id164, id165, [[50]]} -[id166 : id276 id58 - @"http://psi.ontopia.net/ontology/of-max-cardinality"] -[id171 : id276 = "Last Post Date"] -[id178 : id276 = "GroupId"] -[id179 : id276 = "Review Date"] -[id19 : id276 id58 - @"http://psi.ontopia.net/ontology/of-hierarchy-definition-query"] - {id19, id160, [[5]]} - {id19, id165, [[50]]} -[id191 : id276 = "ArticleID"] -[id196 : id276 id58 - @"http://psi.ontopia.net/ontology/of-allowed-players-search-query"] - {id196, id160, [[5]]} - {id196, id165, [[50]]} -[id197 : id276 id58 - @"http://psi.ontopia.net/ontology/of-allowed-players-types-query"] - {id197, id160, [[5]]} - {id197, id165, [[50]]} -[id199 : id276 = "Modify Date"] -[id216 : id276 = "NodeId"] -[id221 : id276] -[id239 : id276 = "Display Date"] -[id243 : id276 id58 - @"http://psi.ontopia.net/ontology/of-height"] -[id25 : id276 id58 - @"http://psi.ontopia.net/ontology/of-datatype-locator"] -[id287 : id276 = "Expiry Date"] -[id43 : id276] -[id65 : id276 id58 - @"http://psi.ontopia.net/ontology/of-width"] -[id69 : id276 id58 - @"http://psi.ontopia.net/ontology/of-min-cardinality"] -[id95 : id276 = "template" - @"http://psi.ontopia.net/liferay/template"] - -/* -- TT: id36 -- */ -[id32 : id36 id58 = "Subject identifier" - @"http://psi.ontopia.net/ontology/subject-identifier"] -[id42 : id36 id58 = "Subject locator" - @"http://psi.ontopia.net/ontology/subject-locator"] -[id94 : id36 id58 = "Item identifier" - @"http://psi.ontopia.net/ontology/item-identifier"] - -/* -- TT: id4 -- */ -[id123 : id4 id58 = "Forms hierarchy for" - = "Forms hierarchy for" / id4 - = "Hierarchy" / id63 - @"http://psi.ontopia.net/ontology/forms-hierarchy-for"] -[id169 : id4 = "Has_workflow_state" - @"http://psi.ontopia.net/liferay/has_workflow_state"] - {id169, id138, [[This association indicates the state of a work within the workflow as described by the liferay portal system.]]} -[id192 : id4 id58 = "Is symmetric" - @"http://psi.ontopia.net/ontology/is-symmetric"] -[id219 : id4 id58 = "Has large instance set" - @"http://psi.ontopia.net/ontology/has-large-instance-set"] -[id224 : id4 id58 = "Is read-only type" - @"http://psi.ontopia.net/ontology/is-readonly-type"] -[id23 : id4 = "Contains" - @"http://psi.ontopia.net/liferay/contains"] -[id248 : id4 id58 = "Use create action" - @"http://psi.ontopia.net/ontology/use-create-action"] -[id261 : id4 = "Parent_Child" - @"http://psi.ontopia.net/liferay/parent-child"] - {id261, id138, [[A parent-child relation for WikiPages]]} -[id267 : id4 = "is-about" - @"http://psi.ontopia.net/liferay/is-about"] - {id267, id138, [[An association stating that a work is about a certain concept]]} -[id286 : id4 id58 = "Is sortable" - @"http://psi.ontopia.net/ontology/is-sortable-field"] -[id30 : id4 = "Created_by" - @"http://psi.ontopia.net/liferay/created_by"] - {id30, id138, [[Connects a creator and his/her work to indicate, that it has been created by him/her.]]} -[id48 : id4 = "broader-narrower" - @"http://www.techquila.com/psi/thesaurus/#broader-narrower"] - {id48, id138, [[An association between two category terms. The "broader" role referring to a more general concept whereas the "narrower" role refers to a more specifiy concept.]]} -[id70 : id4 = "Approved_by" - @"http://psi.ontopia.net/liferay/approved_by"] - {id70, id138, [[This relation shows who (which user) approved a certain document (webcontent).]]} - -/* -- TT: id58 -- */ -[id10 : id58 id88 = "Has occurrence type" - @"http://psi.ontopia.net/ontology/af-has-occurrence-type"] -[id106 : id58 id88 = "Has association field" - @"http://psi.ontopia.net/ontology/af-has-association-field"] -[id109 : id58 id88 = "Has large instance set" - @"http://psi.ontopia.net/ontology/af-has-large-instance-set"] -[id116 : id58 id88 = "Use edit mode" - @"http://psi.ontopia.net/ontology/af-use-edit-mode"] -[id119 : id58 id88 = "Uses interface control" - @"http://psi.ontopia.net/ontology/af-use-interface-control"] -[id129 : id58 id88 = "Hidden views" - @"http://psi.ontopia.net/ontology/af-is-hidden-view"] -[id131 : id58 id88 = "Has identity type" - @"http://psi.ontopia.net/ontology/af-has-identity-type"] -[id140 : id58 id88 = "Has data type" - @"http://psi.ontopia.net/ontology/af-has-datatype"] -[id152 : id58 id88 = "Superordinate role type" - @"http://psi.ontopia.net/ontology/af-superordinate-role-type"] -[id153 : id58 id88 = "Use view mode" - @"http://psi.ontopia.net/ontology/af-use-view-mode"] -[id16 : id58 id88 = "Is hidden type" - @"http://psi.ontopia.net/ontology/af-is-hidden-type"] -[id170 : id58 id88 = "Is sortable field" - @"http://psi.ontopia.net/ontology/af-is-sortable-field"] -[id2 : id58 id88 = "Has cardinality" - @"http://psi.ontopia.net/ontology/af-has-cardinality"] -[id201 : id58 id76 = "User-interface ontology" - @"http://psi.ontopia.net/ontology/ontopoly-ui-ontology"] -[id205 : id58 id88 = "Is abstract" - @"http://psi.ontopia.net/ontology/af-is-abstract"] -[id206 : id58 id88 = "Is symmetric" - @"http://psi.ontopia.net/ontology/af-is-symmetric"] -[id214 : id58 id88 = "Superclass-subclass" - @"http://psi.ontopia.net/ontology/af-superclass-subclass"] -[id225 : id58 id63 = "Topic map" - @"http://psi.ontopia.net/ontology/topic-map"] - {id225, id223, [[000000000]]} / id277 - {id225, id223, [[000003000]]} / id91 - {id225, id223, [[000007000]]} / id128 - {id225, id223, [[000012000]]} / id43 - {id225, id223, [[000013000]]} / id221 -[id232 : id58 id88 = "Has field" - @"http://psi.ontopia.net/ontology/af-has-field"] -[id241 : id58 id76 = "Topic Maps ontology" - @"http://psi.ontopia.net/ontology/ontopoly-topicmaps-ontology"] -[id242 : id58 id88 = "Fields in view" - @"http://psi.ontopia.net/ontology/af-field-in-view"] -[id253 : id58 id88 = "Subordinate role type" - @"http://psi.ontopia.net/ontology/af-subordinate-role-type"] -[id259 : id58 id88 = "Has role type" - @"http://psi.ontopia.net/ontology/af-has-role-type"] -[id27 : id58 id88 = "Has association type" - @"http://psi.ontopia.net/ontology/af-has-association-type"] -[id273 : id58 id88 = "Is read-only type" - @"http://psi.ontopia.net/ontology/af-is-readonly-type"] -[id275 : id58 id88 = "Use create action" - @"http://psi.ontopia.net/ontology/af-use-create-action"] -[id283 : id58 id88 = "Embedded views" - @"http://psi.ontopia.net/ontology/af-is-embedded-view"] -[id289 : id58 id88 = "Use value view" - @"http://psi.ontopia.net/ontology/af-use-value-view"] -[id34 : id58 id88 = "Has name type" - @"http://psi.ontopia.net/ontology/af-has-name-type"] -[id55 : id58 id88 = "Forms hierarchy for" - @"http://psi.ontopia.net/ontology/af-forms-hierarchy-for"] - -/* -- TT: id63 -- */ -[id118 : id63 = "WikiNode" - @"http://psi.ontopia.net/liferay/wikinode"] - {id118, id138, [[The wikinode represents a wiki]]} - {id118, id223, [[000000001]]} / id277 - {id118, id223, [[000000002]]} / id188 - {id118, id223, [[000000003]]} / id114 - {id118, id223, [[000000004]]} / id199 - {id118, id223, [[000000005]]} / id216 - {id118, id223, [[000000006]]} / id171 -[id172 : id63 = "User" - @"http://psi.ontopia.net/liferay/user"] - {id172, id138, [[A user of the liferay portal system]]} - {id172, id223, [[000000001]]} / id277 - {id172, id223, [[000000002]]} / id150 - {id172, id223, [[000000003]]} / id255 - {id172, id223, [[000000004]]} / id188 -[id175 : id63 = "Article" - @"http://psi.ontopia.net/liferay/article"] - {id175, id138, [[An Article authored within the liferay portal]]} - {id175, id223, [[000000001]]} / id277 - {id175, id223, [[000000002]]} / id114 - {id175, id223, [[000000007]]} / id135 - {id175, id223, [[000000008]]} / id179 - {id175, id223, [[000000009]]} / id287 - {id175, id223, [[000000010]]} / id199 - {id175, id223, [[000000011]]} / id239 - {id175, id223, [[000000012]]} / id265 - {id175, id223, [[000000013]]} / id168 - {id175, id223, [[000000014]]} / id233 - {id175, id223, [[000000015]]} / id46 - {id175, id223, [[000000016]]} / id154 - {id175, id223, [[000000018]]} / id191 - {id175, id223, [[000000019]]} / id188 - {id175, id258, [[http://localhost:8080/web/guest/home/-/journal_content/56/${groupid}/${articleid}]]} -[id182 : id63 = "Liferay_Webcontent" - @"http://psi.ontopia.net/liferay/webcontent"] - {id182, id138, [[Webcontent created within the liferay portal]]} - {id182, id223, [[000000002]]} / id135 - {id182, id223, [[000000005]]} / id114 - {id182, id223, [[000000006]]} / id233 - {id182, id223, [[000000007]]} / id46 - {id182, id223, [[000000008]]} / id168 - {id182, id223, [[000000009]]} / id277 - {id182, id223, [[000000010]]} / id179 - {id182, id223, [[000000011]]} / id287 - {id182, id223, [[000000012]]} / id199 - {id182, id223, [[000000013]]} / id239 - {id182, id223, [[000000015]]} / id265 - {id182, id223, [[000000016]]} / id154 - {id182, id223, [[000000017]]} / id188 - {id182, id223, [[000000018]]} / id13 - {id182, id258, [[http://localhost:8080/web/guest/home/-/journal_content/56/${groupid}/${articleid}]]} -[id213 : id63 = "Category" - @"http://psi.ontopia.net/liferay/category"] - {id213, id138, [[A general notion of the things contained by it.]]} - {id213, id223, [[000000001]]} / id277 - {id213, id223, [[000000002]]} / id210 - {id213, id223, [[000000003]]} / id188 - {id213, id223, [[000000004]]} / id215 - {id213, id223, [[000000005]]} / id67 - {id213, id223, [[000000006]]} / id184 - {id213, id258, [[http://localhost:8080/web/guest/something?topic=${topicid}]]} -[id5 : id63 = "Group" - @"http://psi.ontopia.net/liferay/group"] - {id5, id138, [[A Group in liferay covers the following subclasses: User, UserGroup, Organization, Community, Staging Group. None of these subclasses are subclasses in an OOP-way because they are all represented by a Group-Object]]} - {id5, id223, [[000000001]]} / id277 - {id5, id223, [[000000002]]} / id178 - {id5, id223, [[000000003]]} / id26 -[id8 : id63 = "WikiPage" - @"http://psi.ontopia.net/liferay/wikipage"] - {id8, id138, [[The page of a certain wiki]]} - {id8, id223, [[000000001]]} / id277 - {id8, id223, [[000000002]]} / id188 - {id8, id223, [[000000003]]} / id114 - {id8, id223, [[000000004]]} / id199 - {id8, id223, [[000000005]]} / id154 - {id8, id223, [[000000006]]} / id1 - -/* -- TT: id88 -- */ -[id142 : id88] -[id234 : id88] -[id244 : id88] -[id29 : id88] -[id291 : id88] -[id37 : id88] -[id68 : id88] - -/* -- TT: (untyped) -- */ -[contains] -[id100 - @"http://psi.ontopia.net/liferaycontainee"] -[id207 - @"file:/Users/mfi/Projects/liferay/523/tomcat-5.5.27/webapps/omnigator/WEB-INF/topicmaps/@2654"] -[id227 - @"file:/Users/mfi/Projects/liferay/523/tomcat-5.5.27/webapps/omnigator/WEB-INF/topicmaps/@2655"] -[id71 - @"file:/Users/mfi/Projects/liferay/523/tomcat-5.5.27/webapps/omnigator/WEB-INF/topicmaps/@2649"] -[id79 - @"http://psi.ontopia.net/liferaycontainer"] - -/* ----------------- Associations -------------- */ - -/* -- AT: id105 */ -id105( id174 : id80, id61 : id285 ) -id105( id174 : id80, id95 : id285 ) -id105( id21 : id80, id187 : id285 ) -id105( id21 : id80, id236 : id285 ) -id105( id21 : id80, id260 : id285 ) -id105( id21 : id80, id57 : id285 ) -id105( id21 : id80, id7 : id285 ) -id105( id44 : id80, id195 : id285 ) -id105( id44 : id80, id47 : id285 ) -id105( id44 : id80, id54 : id285 ) -id105( id44 : id80, id62 : id285 ) -id105( id44 : id80, id97 : id285 ) -id105( id44 : id80, id98 : id285 ) - -/* -- AT: id11 */ -id11( id20 : id268 ) - -/* -- AT: id111 */ -id111( id122 : id212, id1 : id285 ) -id111( id122 : id212, id128 : id285 ) -id111( id122 : id212, id164 : id285 ) -id111( id122 : id212, id178 : id285 ) -id111( id122 : id212, id19 : id285 ) -id111( id122 : id212, id191 : id285 ) -id111( id122 : id212, id196 : id285 ) -id111( id122 : id212, id197 : id285 ) -id111( id122 : id212, id216 : id285 ) -id111( id122 : id212, id221 : id285 ) -id111( id122 : id212, id43 : id285 ) -id111( id122 : id212, id91 : id285 ) -id111( id122 : id212, id95 : id285 ) -id111( id124 : id212, id25 : id285 ) -id111( id284 : id212, id154 : id285 ) -id111( id284 : id212, id166 : id285 ) -id111( id284 : id212, id243 : id285 ) -id111( id284 : id212, id65 : id285 ) -id111( id284 : id212, id69 : id285 ) -id111( id53 : id212, id114 : id285 ) -id111( id53 : id212, id135 : id285 ) -id111( id53 : id212, id171 : id285 ) -id111( id53 : id212, id179 : id285 ) -id111( id53 : id212, id199 : id285 ) -id111( id53 : id212, id239 : id285 ) -id111( id53 : id212, id287 : id285 ) - -/* -- AT: id113 */ -id113( id280 : id235, id23 : id4 ) - -/* -- AT: id130 */ -id130( id230 : id237, id277 : id24 ) - -/* -- AT: id133 */ -id133( id10 : id88, id236 : id136 ) -id133( id10 : id88, id9 : id136 ) -id133( id106 : id88, id203 : id136 ) -id133( id106 : id88, id7 : id136 ) -id133( id109 : id88, id39 : id136 ) -id133( id116 : id88, id147 : id136 ) -id133( id116 : id88, id54 : id136 ) -id133( id119 : id88, id250 : id136 ) -id133( id119 : id88, id93 : id136 ) -id133( id129 : id88, id158 : id136 ) -id133( id131 : id88, id104 : id136 ) -id133( id131 : id88, id57 : id136 ) -id133( id140 : id88, id202 : id136 ) -id133( id140 : id88, id245 : id136 ) -id133( id142 : id88, id13 : id136 ) -id133( id142 : id88, id67 : id136 ) -id133( id152 : id88, id47 : id136 ) -id133( id152 : id88, id98 : id136 ) -id133( id153 : id88, id186 : id136 ) -id133( id153 : id88, id279 : id136 ) -id133( id153 : id88, id86 : id136 ) -id133( id16 : id88, id89 : id136 ) -id133( id170 : id88, id194 : id136 ) -id133( id2 : id88, id110 : id136 ) -id133( id2 : id88, id141 : id136 ) -id133( id205 : id88, id102 : id136 ) -id133( id206 : id88, id120 : id136 ) -id133( id214 : id88, id60 : id136 ) -id133( id214 : id88, id66 : id136 ) -id133( id232 : id88, id238 : id136 ) -id133( id232 : id88, id6 : id136 ) -id133( id234 : id88, id149 : id136 ) -id133( id234 : id88, id151 : id136 ) -id133( id242 : id88, id83 : id136 ) -id133( id242 : id88, id96 : id136 ) -id133( id244 : id88, id132 : id136 ) -id133( id244 : id88, id46 : id136 ) -id133( id253 : id88, id62 : id136 ) -id133( id253 : id88, id97 : id136 ) -id133( id259 : id88, id61 : id136 ) -id133( id259 : id88, id72 : id136 ) -id133( id27 : id88, id173 : id136 ) -id133( id27 : id88, id187 : id136 ) -id133( id273 : id88, id59 : id136 ) -id133( id275 : id88, id163 : id136 ) -id133( id275 : id88, id195 : id136 ) -id133( id283 : id88, id108 : id136 ) -id133( id289 : id88, id211 : id136 ) -id133( id289 : id88, id263 : id136 ) -id133( id289 : id88, id92 : id136 ) -id133( id29 : id88, id184 : id136 ) -id133( id29 : id88, id215 : id136 ) -id133( id291 : id88, id210 : id136 ) -id133( id291 : id88, id233 : id136 ) -id133( id34 : id88, id183 : id136 ) -id133( id34 : id88, id260 : id136 ) -id133( id37 : id88, id150 : id136 ) -id133( id37 : id88, id168 : id136 ) -id133( id55 : id88, id189 : id136 ) -id133( id55 : id88, id90 : id136 ) -id133( id68 : id88, id255 : id136 ) -id133( id68 : id88, id265 : id136 ) - -/* -- AT: id145 */ -id145( id103 : id101, id69 : id276 ) -id145( id117 : id101, id19 : id276 ) -id145( id12 : id101, id178 : id276 ) -id145( id121 : id101, id114 : id276 ) -id145( id138 : id101, id91 : id276 ) -id145( id139 : id101, id216 : id276 ) -id145( id14 : id101, id221 : id276 ) -id145( id143 : id101, id171 : id276 ) -id145( id159 : id101, id287 : id276 ) -id145( id160 : id101, id243 : id276 ) -id145( id165 : id101, id65 : id276 ) -id145( id17 : id101, id166 : id276 ) -id145( id198 : id101, id1 : id276 ) -id145( id200 : id101, id43 : id276 ) -id145( id22 : id101, id197 : id276 ) -id145( id220 : id101, id25 : id276 ) -id145( id226 : id101, id128 : id276 ) -id145( id251 : id101, id191 : id276 ) -id145( id254 : id101, id135 : id276 ) -id145( id258 : id101, id95 : id276 ) -id145( id264 : id101, id196 : id276 ) -id145( id271 : id101, id199 : id276 ) -id145( id274 : id101, id154 : id276 ) -id145( id288 : id101, id179 : id276 ) -id145( id31 : id101, id239 : id276 ) -id145( id41 : id101, id164 : id276 ) - -/* -- AT: id146 */ -id146( id182 : id63 ) -id146( id285 : id63 ) - -/* -- AT: id148 */ -id148( id101 : id73, id188 : id285 ) -id148( id101 : id73, id236 : id285 ) -id148( id101 : id73, id277 : id285 ) -id148( id101 : id73, id59 : id285 ) -id148( id101 : id73, id89 : id285 ) -id148( id101 : id73, id91 : id285 ) -id148( id112 : id73, id104 : id285 ) -id148( id118 : id73, id114 : id285 ) -id148( id118 : id73, id168 : id285 ) -id148( id118 : id73, id171 : id285 ) -id148( id118 : id73, id188 : id285 ) -id148( id118 : id73, id199 : id285 ) -id148( id118 : id73, id210 : id285 ) -id148( id118 : id73, id216 : id285 ) -id148( id118 : id73, id233 : id285 ) -id148( id118 : id73, id277 : id285 ) -id148( id134 : id73, id277 : id285 ) -id148( id136 : id73, id164 : id285 ) -id148( id136 : id73, id196 : id285 ) -id148( id136 : id73, id197 : id285 ) -id148( id136 : id73, id203 : id285 ) -id148( id136 : id73, id72 : id285 ) -id148( id136 : id73, id93 : id285 ) -id148( id144 : id73, id188 : id285 ) -id148( id144 : id73, id277 : id285 ) -id148( id144 : id73, id279 : id285 ) -id148( id157 : id73, id132 : id285 ) -id148( id157 : id73, id188 : id285 ) -id148( id157 : id73, id277 : id285 ) -id148( id172 : id73, id150 : id285 ) -id148( id172 : id73, id188 : id285 ) -id148( id172 : id73, id255 : id285 ) -id148( id172 : id73, id277 : id285 ) -id148( id175 : id73, id191 : id285 ) -id148( id176 : id73, id163 : id285 ) -id148( id176 : id73, id188 : id285 ) -id148( id176 : id73, id277 : id285 ) -id148( id182 : id73, id114 : id285 ) -id148( id182 : id73, id13 : id285 ) -id148( id182 : id73, id135 : id285 ) -id148( id182 : id73, id154 : id285 ) -id148( id182 : id73, id168 : id285 ) -id148( id182 : id73, id179 : id285 ) -id148( id182 : id73, id188 : id285 ) -id148( id182 : id73, id199 : id285 ) -id148( id182 : id73, id233 : id285 ) -id148( id182 : id73, id239 : id285 ) -id148( id182 : id73, id265 : id285 ) -id148( id182 : id73, id277 : id285 ) -id148( id182 : id73, id287 : id285 ) -id148( id182 : id73, id46 : id285 ) -id148( id212 : id73, id188 : id285 ) -id148( id212 : id73, id202 : id285 ) -id148( id212 : id73, id25 : id285 ) -id148( id212 : id73, id277 : id285 ) -id148( id213 : id73, id184 : id285 ) -id148( id213 : id73, id188 : id285 ) -id148( id213 : id73, id215 : id285 ) -id148( id213 : id73, id277 : id285 ) -id148( id213 : id73, id67 : id285 ) -id148( id225 : id73, id128 : id285 ) -id148( id225 : id73, id221 : id285 ) -id148( id225 : id73, id277 : id285 ) -id148( id225 : id73, id43 : id285 ) -id148( id225 : id73, id91 : id285 ) -id148( id229 : id73, id277 : id285 ) -id148( id235 : id73, id188 : id285 ) -id148( id235 : id73, id277 : id285 ) -id148( id235 : id73, id47 : id285 ) -id148( id235 : id73, id59 : id285 ) -id148( id235 : id73, id61 : id285 ) -id148( id235 : id73, id62 : id285 ) -id148( id235 : id73, id89 : id285 ) -id148( id235 : id73, id91 : id285 ) -id148( id237 : id73, id188 : id285 ) -id148( id237 : id73, id260 : id285 ) -id148( id237 : id73, id277 : id285 ) -id148( id237 : id73, id59 : id285 ) -id148( id237 : id73, id89 : id285 ) -id148( id237 : id73, id91 : id285 ) -id148( id24 : id73, id183 : id285 ) -id148( id246 : id73, id188 : id285 ) -id148( id246 : id73, id250 : id285 ) -id148( id246 : id73, id277 : id285 ) -id148( id257 : id73, id277 : id285 ) -id148( id268 : id73, id108 : id285 ) -id148( id268 : id73, id158 : id285 ) -id148( id268 : id73, id186 : id285 ) -id148( id268 : id73, id188 : id285 ) -id148( id268 : id73, id211 : id285 ) -id148( id268 : id73, id263 : id285 ) -id148( id268 : id73, id277 : id285 ) -id148( id268 : id73, id96 : id285 ) -id148( id269 : id73, id277 : id285 ) -id148( id276 : id73, id243 : id285 ) -id148( id276 : id73, id245 : id285 ) -id148( id276 : id73, id65 : id285 ) -id148( id276 : id73, id9 : id285 ) -id148( id285 : id73, id141 : id285 ) -id148( id285 : id73, id188 : id285 ) -id148( id285 : id73, id194 : id285 ) -id148( id285 : id73, id195 : id285 ) -id148( id285 : id73, id238 : id285 ) -id148( id285 : id73, id277 : id285 ) -id148( id285 : id73, id54 : id285 ) -id148( id285 : id73, id83 : id285 ) -id148( id285 : id73, id86 : id285 ) -id148( id285 : id73, id92 : id285 ) -id148( id36 : id73, id188 : id285 ) -id148( id36 : id73, id277 : id285 ) -id148( id36 : id73, id57 : id285 ) -id148( id36 : id73, id59 : id285 ) -id148( id36 : id73, id89 : id285 ) -id148( id36 : id73, id91 : id285 ) -id148( id4 : id73, id120 : id285 ) -id148( id4 : id73, id187 : id285 ) -id148( id4 : id73, id188 : id285 ) -id148( id4 : id73, id277 : id285 ) -id148( id4 : id73, id59 : id285 ) -id148( id4 : id73, id89 : id285 ) -id148( id4 : id73, id90 : id285 ) -id148( id4 : id73, id91 : id285 ) -id148( id4 : id73, id97 : id285 ) -id148( id4 : id73, id98 : id285 ) -id148( id40 : id73, id110 : id285 ) -id148( id40 : id73, id166 : id285 ) -id148( id40 : id73, id188 : id285 ) -id148( id40 : id73, id277 : id285 ) -id148( id40 : id73, id69 : id285 ) -id148( id5 : id73, id178 : id285 ) -id148( id5 : id73, id210 : id285 ) -id148( id5 : id73, id26 : id285 ) -id148( id5 : id73, id277 : id285 ) -id148( id58 : id73, id277 : id285 ) -id148( id63 : id73, id102 : id285 ) -id148( id63 : id73, id188 : id285 ) -id148( id63 : id73, id189 : id285 ) -id148( id63 : id73, id19 : id285 ) -id148( id63 : id73, id277 : id285 ) -id148( id63 : id73, id39 : id285 ) -id148( id63 : id73, id59 : id285 ) -id148( id63 : id73, id6 : id285 ) -id148( id63 : id73, id60 : id285 ) -id148( id63 : id73, id66 : id285 ) -id148( id63 : id73, id89 : id285 ) -id148( id63 : id73, id91 : id285 ) -id148( id63 : id73, id95 : id285 ) -id148( id76 : id73, id277 : id285 ) -id148( id8 : id73, id1 : id285 ) -id148( id8 : id73, id114 : id285 ) -id148( id8 : id73, id13 : id285 ) -id148( id8 : id73, id149 : id285 ) -id148( id8 : id73, id151 : id285 ) -id148( id8 : id73, id154 : id285 ) -id148( id8 : id73, id168 : id285 ) -id148( id8 : id73, id188 : id285 ) -id148( id8 : id73, id199 : id285 ) -id148( id8 : id73, id233 : id285 ) -id148( id8 : id73, id277 : id285 ) -id148( id80 : id73, id147 : id285 ) -id148( id80 : id73, id188 : id285 ) -id148( id80 : id73, id277 : id285 ) -id148( id88 : id73, id173 : id285 ) -id148( id88 : id73, id188 : id285 ) -id148( id88 : id73, id277 : id285 ) -id148( id88 : id73, id7 : id285 ) - -/* -- AT: id15 */ -id15( id185 : id112, id42 : id36 ) -id15( id188 : id112, id32 : id36 ) -id15( id26 : id112, id94 : id36 ) - -/* -- AT: id190 */ -id190( id181 : id144, - id127 : id268, - id187 : id285 ) -id190( id181 : id144, - id167 : id268, - id260 : id285 ) -id190( id181 : id144, - id28 : id268, - id57 : id285 ) -id190( id181 : id144, - id49 : id268, - id236 : id285 ) -id190( id181 : id144, - id74 : id268, - id61 : id285 ) -id190( id181 : id144, - id74 : id268, - id7 : id285 ) - -/* -- AT: id217 */ -id217( id127 : id268 ) -id217( id167 : id268 ) -id217( id28 : id268 ) -id217( id49 : id268 ) -id217( id74 : id268 ) - -/* -- AT: id222 */ -id222( id105 : id4, id116 : id88 ) -id222( id11 : id4, id129 : id88 ) -id222( id111 : id4, id140 : id88 ) -id222( id113 : id4, id253 : id88 ) -id222( id123 : id4, id55 : id88 ) -id222( id130 : id4, id34 : id88 ) -id222( id133 : id4, id106 : id88 ) -id222( id145 : id4, id10 : id88 ) -id222( id146 : id4, id205 : id88 ) -id222( id148 : id4, id232 : id88 ) -id222( id15 : id4, id131 : id88 ) -id222( id169 : id4, id244 : id88 ) -id222( id190 : id4, id153 : id88 ) -id222( id192 : id4, id206 : id88 ) -id222( id217 : id4, id283 : id88 ) -id222( id219 : id4, id109 : id88 ) -id222( id222 : id4, id27 : id88 ) -id222( id224 : id4, id273 : id88 ) -id222( id228 : id4, id152 : id88 ) -id222( id23 : id4, id291 : id88 ) -id222( id240 : id4, id259 : id88 ) -id222( id248 : id4, id275 : id88 ) -id222( id261 : id4, id234 : id88 ) -id222( id267 : id4, id142 : id88 ) -id222( id281 : id4, id2 : id88 ) -id222( id286 : id4, id170 : id88 ) -id222( id292 : id4, id214 : id88 ) -id222( id30 : id4, id37 : id88 ) -id222( id38 : id4, id242 : id88 ) -id222( id48 : id4, id29 : id88 ) -id222( id64 : id4, id119 : id88 ) -id222( id70 : id4, id68 : id88 ) -id222( id84 : id4, id16 : id88 ) -id222( id85 : id4, id289 : id88 ) - -/* -- AT: id228 */ -id228( id50 : id235, id23 : id4 ) - -/* -- AT: id240 */ -id240( id101 : id235, id236 : id136 ) -id240( id112 : id235, id104 : id136 ) -id240( id134 : id235, id59 : id136 ) -id240( id134 : id235, id89 : id136 ) -id240( id136 : id235, id203 : id136 ) -id240( id136 : id235, id72 : id136 ) -id240( id144 : id235, id279 : id136 ) -id240( id176 : id235, id163 : id136 ) -id240( id180 : id235, id184 : id136 ) -id240( id209 : id235, id211 : id136 ) -id240( id212 : id235, id202 : id136 ) -id240( id235 : id235, id47 : id136 ) -id240( id235 : id235, id61 : id136 ) -id240( id235 : id235, id62 : id136 ) -id240( id237 : id235, id260 : id136 ) -id240( id24 : id235, id183 : id136 ) -id240( id246 : id235, id250 : id136 ) -id240( id247 : id235, id215 : id136 ) -id240( id256 : id235, id132 : id136 ) -id240( id266 : id235, id60 : id136 ) -id240( id268 : id235, id108 : id136 ) -id240( id268 : id235, id158 : id136 ) -id240( id268 : id235, id186 : id136 ) -id240( id268 : id235, id96 : id136 ) -id240( id270 : id235, id150 : id136 ) -id240( id276 : id235, id9 : id136 ) -id240( id280 : id235, id233 : id136 ) -id240( id285 : id235, id141 : id136 ) -id240( id285 : id235, id194 : id136 ) -id240( id285 : id235, id195 : id136 ) -id240( id285 : id235, id238 : id136 ) -id240( id285 : id235, id245 : id136 ) -id240( id285 : id235, id54 : id136 ) -id240( id285 : id235, id83 : id136 ) -id240( id285 : id235, id86 : id136 ) -id240( id285 : id235, id92 : id136 ) -id240( id285 : id235, id93 : id136 ) -id240( id293 : id235, id66 : id136 ) -id240( id3 : id235, id263 : id136 ) -id240( id33 : id235, id151 : id136 ) -id240( id36 : id235, id57 : id136 ) -id240( id4 : id235, id120 : id136 ) -id240( id4 : id235, id187 : id136 ) -id240( id4 : id235, id90 : id136 ) -id240( id4 : id235, id97 : id136 ) -id240( id4 : id235, id98 : id136 ) -id240( id40 : id235, id110 : id136 ) -id240( id50 : id235, id210 : id136 ) -id240( id51 : id235, id67 : id136 ) -id240( id63 : id235, id102 : id136 ) -id240( id63 : id235, id189 : id136 ) -id240( id63 : id235, id39 : id136 ) -id240( id73 : id235, id6 : id136 ) -id240( id75 : id235, id149 : id136 ) -id240( id80 : id235, id147 : id136 ) -id240( id81 : id235, id255 : id136 ) -id240( id88 : id235, id173 : id136 ) -id240( id88 : id235, id7 : id136 ) -id240( id99 : id235, id13 : id136 ) -id240( id99 : id235, id168 : id136 ) -id240( id99 : id235, id265 : id136 ) -id240( id99 : id235, id46 : id136 ) - -/* -- AT: id281 */ -id281( id115 : id40, - id1 : id285 ) -id281( id115 : id40, - id114 : id285 ) -id281( id115 : id40, - id154 : id285 ) -id281( id115 : id40, - id168 : id285 ) -id281( id115 : id40, - id178 : id285 ) -id281( id115 : id40, - id188 : id285 ) -id281( id115 : id40, - id191 : id285 ) -id281( id115 : id40, - id216 : id285 ) -id281( id115 : id40, - id25 : id285 ) -id281( id115 : id40, - id277 : id285 ) -id281( id115 : id40, - id46 : id285 ) -id281( id115 : id40, - id72 : id285 ) -id281( id156 : id40, - id108 : id285 ) -id281( id156 : id40, - id128 : id285 ) -id281( id156 : id40, - id135 : id285 ) -id281( id156 : id40, - id141 : id285 ) -id281( id156 : id40, - id158 : id285 ) -id281( id156 : id40, - id164 : id285 ) -id281( id156 : id40, - id166 : id285 ) -id281( id156 : id40, - id171 : id285 ) -id281( id156 : id40, - id179 : id285 ) -id281( id156 : id40, - id19 : id285 ) -id281( id156 : id40, - id194 : id285 ) -id281( id156 : id40, - id195 : id285 ) -id281( id156 : id40, - id196 : id285 ) -id281( id156 : id40, - id197 : id285 ) -id281( id156 : id40, - id199 : id285 ) -id281( id156 : id40, - id221 : id285 ) -id281( id156 : id40, - id239 : id285 ) -id281( id156 : id40, - id243 : id285 ) -id281( id156 : id40, - id26 : id285 ) -id281( id156 : id40, - id265 : id285 ) -id281( id156 : id40, - id287 : id285 ) -id281( id156 : id40, - id43 : id285 ) -id281( id156 : id40, - id54 : id285 ) -id281( id156 : id40, - id60 : id285 ) -id281( id156 : id40, - id65 : id285 ) -id281( id156 : id40, - id69 : id285 ) -id281( id156 : id40, - id91 : id285 ) -id281( id156 : id40, - id93 : id285 ) -id281( id156 : id40, - id97 : id285 ) -id281( id156 : id40, - id98 : id285 ) -id281( id162 : id40, - id102 : id285 ) -id281( id162 : id40, - id104 : id285 ) -id281( id162 : id40, - id110 : id285 ) -id281( id162 : id40, - id120 : id285 ) -id281( id162 : id40, - id132 : id285 ) -id281( id162 : id40, - id147 : id285 ) -id281( id162 : id40, - id149 : id285 ) -id281( id162 : id40, - id150 : id285 ) -id281( id162 : id40, - id151 : id285 ) -id281( id162 : id40, - id163 : id285 ) -id281( id162 : id40, - id173 : id285 ) -id281( id162 : id40, - id183 : id285 ) -id281( id162 : id40, - id185 : id285 ) -id281( id162 : id40, - id186 : id285 ) -id281( id162 : id40, - id187 : id285 ) -id281( id162 : id40, - id189 : id285 ) -id281( id162 : id40, - id202 : id285 ) -id281( id162 : id40, - id203 : id285 ) -id281( id162 : id40, - id210 : id285 ) -id281( id162 : id40, - id211 : id285 ) -id281( id162 : id40, - id233 : id285 ) -id281( id162 : id40, - id236 : id285 ) -id281( id162 : id40, - id245 : id285 ) -id281( id162 : id40, - id250 : id285 ) -id281( id162 : id40, - id255 : id285 ) -id281( id162 : id40, - id260 : id285 ) -id281( id162 : id40, - id263 : id285 ) -id281( id162 : id40, - id279 : id285 ) -id281( id162 : id40, - id39 : id285 ) -id281( id162 : id40, - id47 : id285 ) -id281( id162 : id40, - id57 : id285 ) -id281( id162 : id40, - id59 : id285 ) -id281( id162 : id40, - id6 : id285 ) -id281( id162 : id40, - id61 : id285 ) -id281( id162 : id40, - id62 : id285 ) -id281( id162 : id40, - id66 : id285 ) -id281( id162 : id40, - id7 : id285 ) -id281( id162 : id40, - id83 : id285 ) -id281( id162 : id40, - id86 : id285 ) -id281( id162 : id40, - id89 : id285 ) -id281( id162 : id40, - id9 : id285 ) -id281( id162 : id40, - id90 : id285 ) -id281( id162 : id40, - id92 : id285 ) -id281( id162 : id40, - id96 : id285 ) -id281( id218 : id40, - id238 : id285 ) -id281( id115 : id40, - id118 : id73, - id277 : id285 ) -id281( id115 : id40, - id5 : id73, - id277 : id285 ) -id281( id115 : id40, - id8 : id73, - id277 : id285 ) -id281( id156 : id40, - id118 : id73, - id199 : id285 ) -id281( id156 : id40, - id8 : id73, - id199 : id285 ) -id281( id162 : id40, - id118 : id73, - id188 : id285 ) -id281( id162 : id40, - id175 : id73, - id191 : id285 ) -id281( id162 : id40, - id182 : id73, - id233 : id285 ) -id281( id162 : id40, - id8 : id73, - id188 : id285 ) - -/* -- AT: id38 */ -id38( id125 : id268, id13 : id285 ) -id38( id127 : id268, id7 : id285 ) -id38( id167 : id268, id141 : id285 ) -id38( id167 : id268, id238 : id285 ) -id38( id167 : id268, id260 : id285 ) -id38( id167 : id268, id277 : id285 ) -id38( id20 : id268, id110 : id285 ) -id38( id20 : id268, id6 : id285 ) -id38( id252 : id268, id128 : id285 ) -id38( id252 : id268, id164 : id285 ) -id38( id252 : id268, id189 : id285 ) -id38( id252 : id268, id19 : id285 ) -id38( id252 : id268, id194 : id285 ) -id38( id252 : id268, id195 : id285 ) -id38( id252 : id268, id196 : id285 ) -id38( id252 : id268, id197 : id285 ) -id38( id252 : id268, id39 : id285 ) -id38( id252 : id268, id47 : id285 ) -id38( id252 : id268, id54 : id285 ) -id38( id252 : id268, id59 : id285 ) -id38( id252 : id268, id62 : id285 ) -id38( id252 : id268, id83 : id285 ) -id38( id252 : id268, id86 : id285 ) -id38( id252 : id268, id89 : id285 ) -id38( id252 : id268, id90 : id285 ) -id38( id252 : id268, id92 : id285 ) -id38( id252 : id268, id97 : id285 ) -id38( id252 : id268, id98 : id285 ) -id38( id28 : id268, id141 : id285 ) -id38( id28 : id268, id238 : id285 ) -id38( id28 : id268, id277 : id285 ) -id38( id28 : id268, id57 : id285 ) -id38( id49 : id268, id141 : id285 ) -id38( id49 : id268, id236 : id285 ) -id38( id49 : id268, id238 : id285 ) -id38( id49 : id268, id243 : id285 ) -id38( id49 : id268, id245 : id285 ) -id38( id49 : id268, id277 : id285 ) -id38( id49 : id268, id65 : id285 ) -id38( id74 : id268, id141 : id285 ) -id38( id74 : id268, id238 : id285 ) -id38( id74 : id268, id277 : id285 ) -id38( id74 : id268, id72 : id285 ) -id38( id74 : id268, id93 : id285 ) -id38( id87 : id268, id141 : id285 ) -id38( id87 : id268, id236 : id285 ) -id38( id87 : id268, id238 : id285 ) -id38( id87 : id268, id243 : id285 ) -id38( id87 : id268, id245 : id285 ) -id38( id87 : id268, id260 : id285 ) -id38( id87 : id268, id277 : id285 ) -id38( id87 : id268, id57 : id285 ) -id38( id87 : id268, id65 : id285 ) -id38( id87 : id268, id7 : id285 ) -id38( id87 : id268, id72 : id285 ) -id38( id87 : id268, id93 : id285 ) - -/* -- AT: id64 */ -id64( id18 : id246, id102 : id285 ) -id64( id18 : id246, id104 : id285 ) -id64( id18 : id246, id108 : id285 ) -id64( id18 : id246, id110 : id285 ) -id64( id18 : id246, id120 : id285 ) -id64( id18 : id246, id141 : id285 ) -id64( id18 : id246, id147 : id285 ) -id64( id18 : id246, id158 : id285 ) -id64( id18 : id246, id163 : id285 ) -id64( id18 : id246, id173 : id285 ) -id64( id18 : id246, id183 : id285 ) -id64( id18 : id246, id186 : id285 ) -id64( id18 : id246, id187 : id285 ) -id64( id18 : id246, id189 : id285 ) -id64( id18 : id246, id194 : id285 ) -id64( id18 : id246, id195 : id285 ) -id64( id18 : id246, id202 : id285 ) -id64( id18 : id246, id203 : id285 ) -id64( id18 : id246, id211 : id285 ) -id64( id18 : id246, id236 : id285 ) -id64( id18 : id246, id238 : id285 ) -id64( id18 : id246, id245 : id285 ) -id64( id18 : id246, id250 : id285 ) -id64( id18 : id246, id260 : id285 ) -id64( id18 : id246, id263 : id285 ) -id64( id18 : id246, id279 : id285 ) -id64( id18 : id246, id39 : id285 ) -id64( id18 : id246, id47 : id285 ) -id64( id18 : id246, id54 : id285 ) -id64( id18 : id246, id57 : id285 ) -id64( id18 : id246, id59 : id285 ) -id64( id18 : id246, id6 : id285 ) -id64( id18 : id246, id60 : id285 ) -id64( id18 : id246, id61 : id285 ) -id64( id18 : id246, id62 : id285 ) -id64( id18 : id246, id66 : id285 ) -id64( id18 : id246, id7 : id285 ) -id64( id18 : id246, id72 : id285 ) -id64( id18 : id246, id83 : id285 ) -id64( id18 : id246, id86 : id285 ) -id64( id18 : id246, id89 : id285 ) -id64( id18 : id246, id9 : id285 ) -id64( id18 : id246, id90 : id285 ) -id64( id18 : id246, id92 : id285 ) -id64( id18 : id246, id93 : id285 ) -id64( id18 : id246, id96 : id285 ) -id64( id18 : id246, id97 : id285 ) -id64( id18 : id246, id98 : id285 ) - -/* -- AT: id84 */ -id84( id111 : id134 ) -id84( id146 : id134 ) -id84( id148 : id134 ) -id84( id160 : id134 ) -id84( id165 : id134 ) -id84( id192 : id134 ) -id84( id219 : id134 ) -id84( id223 : id134 ) -id84( id281 : id134 ) -id84( id292 : id134 ) - -/* -- AT: id85 */ -id85( id127 : id3, - id74 : id209, - id7 : id285 ) -id85( id87 : id3, - id127 : id209, - id187 : id285 ) -id85( id87 : id3, - id167 : id209, - id260 : id285 ) -id85( id87 : id3, - id28 : id209, - id57 : id285 ) -id85( id87 : id3, - id49 : id209, - id236 : id285 ) -id85( id87 : id3, - id74 : id209, - id61 : id285 ) -id85( id87 : id3, - id74 : id209, - id7 : id285 ) diff --git a/sandbox/liferay-integration/portlets/RelatedTopics/build.xml b/sandbox/liferay-integration/portlets/RelatedTopics/build.xml deleted file mode 100644 index fe7f500af..000000000 --- a/sandbox/liferay-integration/portlets/RelatedTopics/build.xml +++ /dev/null @@ -1,5 +0,0 @@ - - - - - \ No newline at end of file diff --git a/sandbox/liferay-integration/portlets/RelatedTopics/docroot/WEB-INF/liferay-display.xml b/sandbox/liferay-integration/portlets/RelatedTopics/docroot/WEB-INF/liferay-display.xml deleted file mode 100644 index 600bb97b3..000000000 --- a/sandbox/liferay-integration/portlets/RelatedTopics/docroot/WEB-INF/liferay-display.xml +++ /dev/null @@ -1,8 +0,0 @@ - - - - - - - - \ No newline at end of file diff --git a/sandbox/liferay-integration/portlets/RelatedTopics/docroot/WEB-INF/liferay-plugin-package.properties b/sandbox/liferay-integration/portlets/RelatedTopics/docroot/WEB-INF/liferay-plugin-package.properties deleted file mode 100644 index b8f6c28b2..000000000 --- a/sandbox/liferay-integration/portlets/RelatedTopics/docroot/WEB-INF/liferay-plugin-package.properties +++ /dev/null @@ -1,9 +0,0 @@ -name=RelatedTopics -module-group-id=liferay -module-incremental-version=1 -tags= -short-description= -change-log= -page-url=http://www.liferay.com -author=Liferay, Inc. -licenses=MIT \ No newline at end of file diff --git a/sandbox/liferay-integration/portlets/RelatedTopics/docroot/WEB-INF/liferay-portlet.xml b/sandbox/liferay-integration/portlets/RelatedTopics/docroot/WEB-INF/liferay-portlet.xml deleted file mode 100644 index 1567471de..000000000 --- a/sandbox/liferay-integration/portlets/RelatedTopics/docroot/WEB-INF/liferay-portlet.xml +++ /dev/null @@ -1,28 +0,0 @@ - - - - - - relatedTopics - /icon.png - true - /css/test.css - /js/test.js - - - administrator - Administrator - - - guest - Guest - - - power-user - Power User - - - user - User - - \ No newline at end of file diff --git a/sandbox/liferay-integration/portlets/RelatedTopics/docroot/WEB-INF/portlet.xml b/sandbox/liferay-integration/portlets/RelatedTopics/docroot/WEB-INF/portlet.xml deleted file mode 100644 index 1f5656e0f..000000000 --- a/sandbox/liferay-integration/portlets/RelatedTopics/docroot/WEB-INF/portlet.xml +++ /dev/null @@ -1,45 +0,0 @@ - - - - - relatedTopics - RelatedTopics - portlet.RelatedTopicsPortlet - - view-jsp - /view.jsp - - - edit-jsp - /edit.jsp - - - help-jsp - /help.jsp - - 0 - - text/html - view - edit - help - - - RelatedTopics - RelatedTopics - RelatedTopics - - - administrator - - - guest - - - power-user - - - user - - - \ No newline at end of file diff --git a/sandbox/liferay-integration/portlets/RelatedTopics/docroot/WEB-INF/src/portlet/Configurator.java b/sandbox/liferay-integration/portlets/RelatedTopics/docroot/WEB-INF/src/portlet/Configurator.java deleted file mode 100644 index 7094b8af7..000000000 --- a/sandbox/liferay-integration/portlets/RelatedTopics/docroot/WEB-INF/src/portlet/Configurator.java +++ /dev/null @@ -1,136 +0,0 @@ - -package portlet; - -import java.util.Map; -import java.util.List; -import javax.portlet.RenderRequest; - -import com.liferay.portal.kernel.exception.SystemException; -import com.liferay.portal.kernel.util.WebKeys; -import com.liferay.portal.model.Layout; -import com.liferay.portal.model.PortletPreferences; -import com.liferay.portal.service.PortletPreferencesLocalServiceUtil; - -import net.ontopia.topicmaps.core.TopicMapIF; -import net.ontopia.topicmaps.core.TopicMapStoreIF; -import net.ontopia.topicmaps.entry.TopicMaps; -import net.ontopia.utils.OntopiaRuntimeException; - -import tm.OntopiaAdapter; - -/** - * Ths class now provides the methods to get configuration information - * from URLs. It also provides access to some methods of the - * integration. - * - * @author mfi - */ -public class Configurator { - - /** - * Parses the topic id out of the URL - * - * @param renderRequest The request containing information on the - * context of the portlet and the URL - * @return A String representing the topic id as provided in the URL - * or null if none could be found - */ - public String getTopicIdFromUrl(RenderRequest renderRequest) { - String queryString = (String) renderRequest.getAttribute("javax.servlet.forward.query_string"); - Map params = util.PortletUtils.parseQueryString(queryString); - return params.get("topic"); - } - - /** - * Parses the article id out of the URL, retrieves a topic that - * represents this article and returns its object id. - * - * @param renderRequest The request containing information on the - * context of this portlet and the URL - * @return A String representing the topic id for the article id - * from the URL or null if whether article id or the id of the topic - * could not be found. - */ - public String getTopicIdFromUrlByArticleId(RenderRequest renderRequest) { - // FIXME FIXME FIXME - // see above. Not very reusable I reckon. Again using the URL - // "official" URL (see above) and not the renderURL of this portlet. - String queryString = (String)renderRequest.getAttribute("javax.servlet.forward.query_string"); - if(queryString != null && (queryString.lastIndexOf("article=") != -1)) { - String result = queryString.substring(queryString.lastIndexOf("article=")+"article=".length()); // get to the topic id number - if(result.indexOf("&") != -1) { // there are more parameters - result = result.substring(0, result.indexOf("&")); // the next ampersand is the delimiter for the topic id - return OntopiaAdapter.getInstance(true).getCurrentObjectIdForArticleId(result); - } else { // no more parameters, that means we are at the end of the url - return OntopiaAdapter.getInstance(true).getCurrentObjectIdForArticleId(result); - } - } else { - // indexOf() returned -1. No article information in the url available. - return null; - } - } - - - /** - * Returns a topic id. It tries to read an article id out of the - * config of a (presumable existent) WebContentDisplay, it then - * tries to resolve the article id to a topic id. - * - * @param renderRequest The request containing information on the - * context of this portlet (like the layout in which it is viewed) - * @return A String representing the object id of a topic, or null - * if no WebContentDisplay could be found or no object id could be - * resolved - */ - public String findTopicIdFromNextWCD(RenderRequest renderRequest) { - Layout layout = (Layout) renderRequest.getAttribute(WebKeys.LAYOUT); - if(layout == null){ - throw new OntopiaRuntimeException("Configurator: Unable to find layout for this page!"); - } - - String typesettings = layout.getTypeSettings(); // a string containing information about the portlets displayed on the page - String portletId=""; - - try{ - // this brings us the first WebContentDisplay Portlet - // (identified by 56_INSTANCE_") on that page. Returns - // instance-id. - portletId = typesettings.substring(typesettings.indexOf("56_INSTANCE_"), typesettings.indexOf("56_INSTANCE_")+"56_INSTANCE_".length()+4); - - try{ - // These objects contain useful information like the article - // id as a string - List pref = PortletPreferencesLocalServiceUtil.getPortletPreferences(layout.getPlid(), portletId); - // FIXME: hardwire the first hit is maybe not a good idea for - // the future. - PortletPreferences pPrefs = (PortletPreferences) pref.get(0); - // unfortunately there is no getter for the article id - String preferences = pPrefs.getPreferences(); - // that's why I parse it out like this. - String articleId = preferences.substring(preferences.lastIndexOf("article-id")+"article-id".length(), preferences.lastIndexOf("")).trim(); - - return OntopiaAdapter.getInstance(true).getCurrentObjectIdForArticleId(articleId); - - } catch (SystemException se) { - // not sure how to handle this SystemException so throwing - // it at runtime - throw new OntopiaRuntimeException(se); - } - } catch(StringIndexOutOfBoundsException siobe) { - // this is expected and not too unusual really. No - // WebContentDisplay there, to indicate the failure to produce - // useful information we return null. - return null; - } - } - - /** - * Gets a read-only TopicMapIF object from the Ontopia integration. - * - * @return a TopicMapIF object - */ - public TopicMapIF getTopicmap() { - return OntopiaAdapter.getInstance(true).getTopicMap(); - } - -} diff --git a/sandbox/liferay-integration/portlets/RelatedTopics/docroot/WEB-INF/src/portlet/RelatedTopicsPortlet.java b/sandbox/liferay-integration/portlets/RelatedTopics/docroot/WEB-INF/src/portlet/RelatedTopicsPortlet.java deleted file mode 100644 index afaabb8dd..000000000 --- a/sandbox/liferay-integration/portlets/RelatedTopics/docroot/WEB-INF/src/portlet/RelatedTopicsPortlet.java +++ /dev/null @@ -1,231 +0,0 @@ -/** - * Some logic for displaying the appropriate topics on the JSPs - */ - -package portlet; - -import com.liferay.portal.kernel.log.Log; -import com.liferay.portal.kernel.log.LogFactoryUtil; - -import java.io.IOException; -import java.util.HashSet; -import java.util.Set; - -import javax.portlet.ActionRequest; -import javax.portlet.ActionResponse; -import javax.portlet.GenericPortlet; -import javax.portlet.PortletException; -import javax.portlet.PortletPreferences; -import javax.portlet.PortletRequestDispatcher; -import javax.portlet.RenderRequest; -import javax.portlet.RenderResponse; - -import net.ontopia.topicmaps.core.TopicIF; -import net.ontopia.topicmaps.core.TopicMapIF; -import net.ontopia.utils.OntopiaRuntimeException; - -/** - * RelatedTopics will display the tags of an article. It will try to - * look up the topic for that article in the topic map and check what - * concepts are associated with it. This class dispatches the incoming - * requests to the right JSPs and reads and writes some config from - * and to the PortletPreferences. - * - * @author Matthias Fischer - * - */ -public class RelatedTopicsPortlet extends GenericPortlet { - - public void init() throws PortletException { - editJSP = getInitParameter("edit-jsp"); - helpJSP = getInitParameter("help-jsp"); - viewJSP = getInitParameter("view-jsp"); - config = new Configurator(); - } - - public void doDispatch(RenderRequest renderRequest, - RenderResponse renderResponse) - throws IOException, PortletException { - String jspPage = renderRequest.getParameter("jspPage"); - - if (jspPage != null) { - include(jspPage, renderRequest, renderResponse); - } else { - super.doDispatch(renderRequest, renderResponse); - } - } - - public void doEdit(RenderRequest renderRequest, RenderResponse renderResponse) throws IOException, PortletException { - - if (renderRequest.getPreferences() == null) { - super.doEdit(renderRequest, renderResponse); - } - else { - /* - * Nothing to do here, it all went into the jsp ! - */ - - include(editJSP, renderRequest, renderResponse); - } - } - - public void doHelp(RenderRequest renderRequest, RenderResponse renderResponse) throws IOException, PortletException { - - include(helpJSP, renderRequest, renderResponse); - } - - /** - * Prepares values to pass to the view.jsp for displaying. - * Tries to obtain information on the topic (representing an article) it shall display. - * - * @param renderRequest The request to render the view.jsp page - * - * @throws java.io.IOException Thrown by include(viewJSP, renderRequest, renderResponse); - * @throws javax.portlet.PortletException Thrown by include(viewJSP, renderRequest, renderResponse); - */ - public void doView(RenderRequest renderRequest, RenderResponse renderResponse) throws IOException, PortletException { - // trying logger here instead of stdout just to see how it works out - _log.debug("ShowTagsPortlet.doView: Entering method."); - String queryString = (String)renderRequest.getAttribute("javax.servlet.forward.query_string"); - _log.debug("## query_string:" + queryString ); - - // TODO: Maybe the order of these should be rearranged and #1 should come last? - // 1. try to find out what topic to use by checking the PortletPreferences - String topicId = renderRequest.getPreferences().getValue("topicid", null); - if(topicId == null || topicId.equalsIgnoreCase("")){ - _log.debug("1 fail"); - // 2. try tp parse topicId from Url - topicId = config.getTopicIdFromUrl(renderRequest); - if(topicId == null){ - _log.debug("2 fail"); - // 3. try to parse the articleId from the url and resolve it into a topic id - topicId = config.getTopicIdFromUrlByArticleId(renderRequest); - if(topicId == null){ - _log.debug("3 fail"); - // 4. try to find the next WCD on this page and return the topic Id of the article that's being displayed - topicId = config.findTopicIdFromNextWCD(renderRequest); - if(topicId == null){ - _log.debug("4 fail"); - // We didn't find a topic, but we're not going to complain here. - // Instead the portlet can display a warning. - } - } - } - } - - TopicMapIF topicmap = config.getTopicmap(); - TopicIF topic = null; - if (topicId != null) - topic = (TopicIF) topicmap.getObjectById(topicId); - - Set assocs = new HashSet(); - - // Transform oid's into TopicIF Objects - String[] assocOids = renderRequest.getPreferences().getValues("associds", null); - if(assocOids != null){ - for(String s : assocOids) { - TopicIF associationType = (TopicIF) topicmap.getObjectById(s); - assocs.add(associationType); - } - } - - // has a filterquery been provided? - String filterQuery = renderRequest.getPreferences().getValue("filterquery", null); - if(filterQuery != null){ - renderRequest.setAttribute("filterquery", filterQuery); - } - - // has the user made a choice whether she wants the associations - // to be included or excluded? - String assocMode = renderRequest.getPreferences().getValue("assocmode", null); - if(assocMode != null) { - if(assocMode.equalsIgnoreCase("include")) { - renderRequest.setAttribute("mode", "include"); - } else { - renderRequest.setAttribute("mode", "exclude"); - } - } else { - // if no choice has been made presume "exclude" as default - renderRequest.setAttribute("mode", "exclude"); - } - - // these two are needed in any case, although assocs may be an empty set - if (topic != null) - renderRequest.setAttribute("topic", topic); - renderRequest.setAttribute("assocTypes", assocs); - - // forwarding to the jsp - include(viewJSP, renderRequest, renderResponse); - } - - /** - * Handles ActionRequests as produced by calling - * PortletURL actionUrl = - * portletResponse.createActionURL(); in - * edit.jsp. In this portlet this method is only used - * for setting preferences through the portlet's - * edit.jsp. - * - * @see ActionRequest - * @see ActionResponse - * - * @param actionRequest The request from the edit.jsp containing parameters which shall be set - * @param actionResponse Not used but presumably the answer of this portlet - * - * @throws java.io.IOException Might be thrown by actionRequest.getPreferences().store(). - * @throws javax.portlet.PortletException Might be thrown by any of the actionRequest.getPreferences() methods. - */ - public void processAction(ActionRequest actionRequest, - ActionResponse actionResponse) - throws IOException, PortletException { - - // read the users input - String serializedAssocIds = actionRequest.getParameter("associd"); - String topicId = actionRequest.getParameter("topicid"); - String assocMode = actionRequest.getParameter("assocmode"); - String filterQuery = actionRequest.getParameter("filterquery"); - - // and set it to the PortletPreferences for this portlet - PortletPreferences prefs = actionRequest.getPreferences(); - if (serializedAssocIds != null) { - String[] assocIdArray = serializedAssocIds.split(","); - - for (int count = 0; count < assocIdArray.length; count++) - assocIdArray[count] = assocIdArray[count].trim(); - - prefs.setValues("associds", assocIdArray); - } - - if (topicId != null) - prefs.setValue("topicid", topicId); - - if (assocMode != null) - prefs.setValue("assocmode", assocMode); - - if (filterQuery != null) - prefs.setValue("filterquery", filterQuery); - - // persist changes - prefs.store(); - } - - protected void include(String path, RenderRequest renderRequest,RenderResponse renderResponse) throws IOException, PortletException { - - PortletRequestDispatcher portletRequestDispatcher = getPortletContext().getRequestDispatcher(path); - - if (portletRequestDispatcher == null) { - _log.error(path + " is not a valid include"); - } else { - portletRequestDispatcher.include(renderRequest, renderResponse); - } - } - - - protected String editJSP; - protected String helpJSP; - protected String viewJSP; - - private static Log _log = LogFactoryUtil.getLog(RelatedTopicsPortlet.class); - - private Configurator config; -} \ No newline at end of file diff --git a/sandbox/liferay-integration/portlets/RelatedTopics/docroot/WEB-INF/src/portlet/package.html b/sandbox/liferay-integration/portlets/RelatedTopics/docroot/WEB-INF/src/portlet/package.html deleted file mode 100644 index 38100303d..000000000 --- a/sandbox/liferay-integration/portlets/RelatedTopics/docroot/WEB-INF/src/portlet/package.html +++ /dev/null @@ -1,10 +0,0 @@ - - - This package contains all the java code outside the JSPs for the RelatedTopics JSP Portlet. -
      -
    • Configurator.java - offers methods for retrieving information on the configuration
    • -
    • RelatedTopicsPortlet.java - does the control for the portlet, also handles actionRequests for setting configuration into PortletPreferences.
    • -
    - \ No newline at end of file diff --git a/sandbox/liferay-integration/portlets/RelatedTopics/docroot/WEB-INF/sun-web.xml b/sandbox/liferay-integration/portlets/RelatedTopics/docroot/WEB-INF/sun-web.xml deleted file mode 100644 index f6bc977f9..000000000 --- a/sandbox/liferay-integration/portlets/RelatedTopics/docroot/WEB-INF/sun-web.xml +++ /dev/null @@ -1,11 +0,0 @@ - - - - /RelatedTopics - - - - Keep a copy of the generated servlet class' java code. - - - diff --git a/sandbox/liferay-integration/portlets/RelatedTopics/docroot/WEB-INF/web.xml b/sandbox/liferay-integration/portlets/RelatedTopics/docroot/WEB-INF/web.xml deleted file mode 100644 index 2183a40ed..000000000 --- a/sandbox/liferay-integration/portlets/RelatedTopics/docroot/WEB-INF/web.xml +++ /dev/null @@ -1,4 +0,0 @@ - - - - diff --git a/sandbox/liferay-integration/portlets/RelatedTopics/docroot/css/test.css b/sandbox/liferay-integration/portlets/RelatedTopics/docroot/css/test.css deleted file mode 100644 index e69de29bb..000000000 diff --git a/sandbox/liferay-integration/portlets/RelatedTopics/docroot/edit.jsp b/sandbox/liferay-integration/portlets/RelatedTopics/docroot/edit.jsp deleted file mode 100644 index f81a94f0e..000000000 --- a/sandbox/liferay-integration/portlets/RelatedTopics/docroot/edit.jsp +++ /dev/null @@ -1,66 +0,0 @@ -<%-- - Document : edit - Created on : 12.02.2010, 11:08:21 - Author : mfi - - This page will offer a way to customize the behaviour of the portlet. As of now only association type object ids can be provided to tell - the portlet which association NOT to follow. Also a topic if may be hardwired to make the portlet use this in any case. - The rest of the fields are not wired to the view.jsp yet! This will become more flexible in the future. ---%> - -<%@page contentType="text/html" pageEncoding="UTF-8"%> - -<%@ taglib uri="http://java.sun.com/portlet_2_0" prefix="portlet" %> - -<%@page import="portlet.Configurator"%> -<%@page import="java.util.Set"%> -<%@page import="java.util.Iterator"%> - -<%@ page import="javax.portlet.PortletURL" %> -<%@ page import="javax.portlet.RenderResponse" %> -<%@ page import="javax.portlet.RenderRequest" %> - -<% -// need this to provide the actionUrl below. Using tags from the portlet namespace instead did not work out. -RenderResponse portletResponse = (RenderResponse)request.getAttribute("javax.portlet.response"); -PortletURL actionUrl = portletResponse.createActionURL(); - -String assocIdsParameter = ""; // has "" set as to show the user an empty textfield rather than a NPE. -String topicId; -String assocMode; -String filterQuery; - -// Get the Url that has been called by the user. Not the renderUrl of the portlet. -RenderRequest renderRequest = (RenderRequest) request.getAttribute("javax.portlet.request"); - -String[] assocIdArray = renderRequest.getPreferences().getValues("associds", null); - if(assocIdArray != null){ - for(String s : assocIdArray){ - assocIdsParameter += s + ","; - } - - if(assocIdsParameter.endsWith(",")){ // remove trailing comma - assocIdsParameter = assocIdsParameter.substring(0, assocIdsParameter.length()-1); - } - } - - // the last parameter is a default return value, thats being returned if the key could not be found. - topicId = renderRequest.getPreferences().getValue("topicid", ""); - - assocMode = renderRequest.getPreferences().getValue("assocmode", ""); - - filterQuery = renderRequest.getPreferences().getValue("filterquery", ""); - -%> - -
    Preferences:
    -
    - - - - - - -
    Topic Id:
    Association Id:
    Mode:
    Filterquery:
    - -
    diff --git a/sandbox/liferay-integration/portlets/RelatedTopics/docroot/help.jsp b/sandbox/liferay-integration/portlets/RelatedTopics/docroot/help.jsp deleted file mode 100644 index d7f94f844..000000000 --- a/sandbox/liferay-integration/portlets/RelatedTopics/docroot/help.jsp +++ /dev/null @@ -1,13 +0,0 @@ -<%-- - Document : help.jsp - Created on : 12.02.2010, 11:08:04 - Author : mfi ---%> - -<%@page contentType="text/html" pageEncoding="UTF-8"%> - - -

    Help

    - Write some helptext here. - - diff --git a/sandbox/liferay-integration/portlets/RelatedTopics/docroot/icon.png b/sandbox/liferay-integration/portlets/RelatedTopics/docroot/icon.png deleted file mode 100644 index 807b862cf..000000000 Binary files a/sandbox/liferay-integration/portlets/RelatedTopics/docroot/icon.png and /dev/null differ diff --git a/sandbox/liferay-integration/portlets/RelatedTopics/docroot/js/test.js b/sandbox/liferay-integration/portlets/RelatedTopics/docroot/js/test.js deleted file mode 100644 index e69de29bb..000000000 diff --git a/sandbox/liferay-integration/portlets/RelatedTopics/docroot/view.jsp b/sandbox/liferay-integration/portlets/RelatedTopics/docroot/view.jsp deleted file mode 100644 index bf86fa0fa..000000000 --- a/sandbox/liferay-integration/portlets/RelatedTopics/docroot/view.jsp +++ /dev/null @@ -1,56 +0,0 @@ -<%-- - - This Page will display the tags for an article by using the "related - topics" taglibs from ontopia - ---%><% - String tmid = tm.OntopiaAdapter.getInstance(true).getTopicMapId(); -%> - -<%@page contentType="text/html" pageEncoding="UTF-8"%> - -<%@ taglib uri="http://java.sun.com/portlet_2_0" prefix="portlet" %> -<%@ taglib uri="http://psi.ontopia.net/jsp/taglib/portlets" prefix="portal" %> -<%@ taglib uri='http://psi.ontopia.net/jsp/taglib/tolog' prefix='tolog'%> -<%@ taglib uri="http://java.sun.com/jstl/core" prefix="c" %> - -<%@ page import = "net.ontopia.topicmaps.core.TopicIF" %> -<%@ page import = "net.ontopia.topicmaps.nav2.utils.ContextUtils" %> - - - - - - - - - - -
      - - -
    • -
        - - - <% - // get the topic we want to display next as a TopicIF object - TopicIF t =(TopicIF) pageContext.getAttribute("player"); - String url = util.PortletUtils.makeLinkTo(t); - %> - -
      • -
        -
      -
      -
    -
    -
    - -
    - - -

    No topic found!

    - -
    -
    \ No newline at end of file diff --git a/sandbox/liferay-integration/portlets/articleList-portlet/build.xml b/sandbox/liferay-integration/portlets/articleList-portlet/build.xml deleted file mode 100644 index fe7f500af..000000000 --- a/sandbox/liferay-integration/portlets/articleList-portlet/build.xml +++ /dev/null @@ -1,5 +0,0 @@ - - - - - \ No newline at end of file diff --git a/sandbox/liferay-integration/portlets/articleList-portlet/docroot/WEB-INF/liferay-display.xml b/sandbox/liferay-integration/portlets/articleList-portlet/docroot/WEB-INF/liferay-display.xml deleted file mode 100644 index 289860da0..000000000 --- a/sandbox/liferay-integration/portlets/articleList-portlet/docroot/WEB-INF/liferay-display.xml +++ /dev/null @@ -1,8 +0,0 @@ - - - - - - - - \ No newline at end of file diff --git a/sandbox/liferay-integration/portlets/articleList-portlet/docroot/WEB-INF/liferay-plugin-package.properties b/sandbox/liferay-integration/portlets/articleList-portlet/docroot/WEB-INF/liferay-plugin-package.properties deleted file mode 100644 index fcad605e8..000000000 --- a/sandbox/liferay-integration/portlets/articleList-portlet/docroot/WEB-INF/liferay-plugin-package.properties +++ /dev/null @@ -1,9 +0,0 @@ -name=Article list -module-group-id=liferay -module-incremental-version=1 -tags= -short-description= -change-log= -page-url=http://www.liferay.com -author=Liferay, Inc. -licenses=LGPL \ No newline at end of file diff --git a/sandbox/liferay-integration/portlets/articleList-portlet/docroot/WEB-INF/liferay-portlet.xml b/sandbox/liferay-integration/portlets/articleList-portlet/docroot/WEB-INF/liferay-portlet.xml deleted file mode 100644 index 05775847b..000000000 --- a/sandbox/liferay-integration/portlets/articleList-portlet/docroot/WEB-INF/liferay-portlet.xml +++ /dev/null @@ -1,29 +0,0 @@ - - - - - - articleList - /icon.png - true - /css/main.css - /js/main.js - articleList-portlet - - - administrator - Administrator - - - guest - Guest - - - power-user - Power User - - - user - User - - \ No newline at end of file diff --git a/sandbox/liferay-integration/portlets/articleList-portlet/docroot/WEB-INF/portlet.xml b/sandbox/liferay-integration/portlets/articleList-portlet/docroot/WEB-INF/portlet.xml deleted file mode 100644 index 08d2be974..000000000 --- a/sandbox/liferay-integration/portlets/articleList-portlet/docroot/WEB-INF/portlet.xml +++ /dev/null @@ -1,45 +0,0 @@ - - - - - articleList - - portlet.ArticleListPortlet - - view-jsp - /view.jsp - - - edit-jsp - /edit.jsp - - 0 - - text/html - view - edit - - - Article list - - - - - administrator - - - guest - - - power-user - - - user - - - \ No newline at end of file diff --git a/sandbox/liferay-integration/portlets/articleList-portlet/docroot/WEB-INF/src/portlet/ArticleListPortlet.java b/sandbox/liferay-integration/portlets/articleList-portlet/docroot/WEB-INF/src/portlet/ArticleListPortlet.java deleted file mode 100644 index d59434558..000000000 --- a/sandbox/liferay-integration/portlets/articleList-portlet/docroot/WEB-INF/src/portlet/ArticleListPortlet.java +++ /dev/null @@ -1,122 +0,0 @@ -/** - * Some logic for displaying the appropriate topics on the JSPs - */ - -package portlet; - -import com.liferay.portal.kernel.log.Log; -import com.liferay.portal.kernel.log.LogFactoryUtil; - -import java.io.IOException; -import java.util.Map; - -import javax.portlet.ActionRequest; -import javax.portlet.ActionResponse; -import javax.portlet.GenericPortlet; -import javax.portlet.PortletException; -import javax.portlet.PortletRequestDispatcher; -import javax.portlet.RenderRequest; -import javax.portlet.RenderResponse; -import javax.portlet.PortletPreferences; -import javax.portlet.PortletMode; -import javax.portlet.WindowState; - -import net.ontopia.topicmaps.core.TopicIF; -import net.ontopia.topicmaps.core.TopicMapIF; -import net.ontopia.utils.OntopiaRuntimeException; - -/** - * Stuff. - */ -public class ArticleListPortlet extends GenericPortlet { - - public void init() throws PortletException { - editJSP = getInitParameter("edit-jsp"); - helpJSP = getInitParameter("help-jsp"); - viewJSP = getInitParameter("view-jsp"); - //config = new Configurator(); - } - - public void doDispatch(RenderRequest renderRequest, RenderResponse renderResponse) throws IOException, PortletException { - String jspPage = renderRequest.getParameter("jspPage"); - - if (jspPage != null) { - include(jspPage, renderRequest, renderResponse); - } else { - super.doDispatch(renderRequest, renderResponse); - } - } - - public void doEdit(RenderRequest renderRequest, RenderResponse renderResponse) throws IOException, PortletException { - - if (renderRequest.getPreferences() == null) { - super.doEdit(renderRequest, renderResponse); - } else { - include(editJSP, renderRequest, renderResponse); - } - } - - public void doHelp(RenderRequest renderRequest, RenderResponse renderResponse) throws IOException, PortletException { - - include(helpJSP, renderRequest, renderResponse); - } - - public void doView(RenderRequest renderRequest, - RenderResponse renderResponse) - throws IOException, PortletException { - String queryString = (String) renderRequest.getAttribute("javax.servlet.forward.query_string"); - Map params = util.PortletUtils.parseQueryString(queryString); - - TopicMapIF topicmap = tm.OntopiaAdapter.getInstance(true).getTopicMap(); - if (params.containsKey("topic")) { - TopicIF topic = (TopicIF) topicmap.getObjectById(params.get("topic")); - renderRequest.setAttribute("topic", topic); - } - - // transfer preferences into request attributes - PortletPreferences prefs = renderRequest.getPreferences(); - renderRequest.setAttribute("query", prefs.getValue("query", "")); - renderRequest.setAttribute("templateid", prefs.getValue("templateid", "")); - - // forwarding to the jsp - include(viewJSP, renderRequest, renderResponse); - } - - public void processAction(ActionRequest actionRequest, - ActionResponse actionResponse) - throws IOException, PortletException { - - String query = actionRequest.getParameter("query"); - String templateid = actionRequest.getParameter("templateid"); - - PortletPreferences prefs = actionRequest.getPreferences(); - prefs.setValue("query", query); - prefs.setValue("templateid", templateid); - - prefs.store(); - - // apparently we need to set these - actionResponse.setPortletMode(PortletMode.VIEW); - actionResponse.setWindowState(WindowState.NORMAL); - } - - protected void include(String path, RenderRequest renderRequest,RenderResponse renderResponse) throws IOException, PortletException { - - PortletRequestDispatcher portletRequestDispatcher = getPortletContext().getRequestDispatcher(path); - - if (portletRequestDispatcher == null) { - _log.error(path + " is not a valid include"); - } else { - portletRequestDispatcher.include(renderRequest, renderResponse); - } - } - - - protected String editJSP; - protected String helpJSP; - protected String viewJSP; - - private static Log _log = LogFactoryUtil.getLog(ArticleListPortlet.class); - - //private Configurator config; -} \ No newline at end of file diff --git a/sandbox/liferay-integration/portlets/articleList-portlet/docroot/WEB-INF/tld/liferay-portlet-ext.tld b/sandbox/liferay-integration/portlets/articleList-portlet/docroot/WEB-INF/tld/liferay-portlet-ext.tld deleted file mode 100644 index 5e6d86ff8..000000000 --- a/sandbox/liferay-integration/portlets/articleList-portlet/docroot/WEB-INF/tld/liferay-portlet-ext.tld +++ /dev/null @@ -1,453 +0,0 @@ - - - - - 1.0 - 1.1 - liferay-portlet - http://liferay.com/tld/portlet - - - - - actionURL - com.liferay.taglib.portlet.ActionURLTag - com.liferay.taglib.portlet.ActionURLTei - JSP - - anchor - false - true - - - copyCurrentRenderParameters - false - true - - - doAsUserId - false - true - - - encrypt - false - true - - - escapeXml - false - true - - - name - false - true - - - plid - false - true - - - portletConfiguration - false - true - - - portletMode - false - true - - - portletName - false - true - - - secure - false - true - - - var - false - true - - - varImpl - false - true - - - windowState - false - true - - - - icon-back - com.liferay.taglib.portletext.IconBackTag - JSP - - - icon-close - com.liferay.taglib.portletext.IconCloseTag - JSP - - - icon-configuration - com.liferay.taglib.portletext.IconConfigurationTag - JSP - - - icon-edit - com.liferay.taglib.portletext.IconEditTag - JSP - - - icon-edit-defaults - com.liferay.taglib.portletext.IconEditDefaultsTag - JSP - - - icon-edit-guest - com.liferay.taglib.portletext.IconEditGuestTag - JSP - - - icon-export-import - com.liferay.taglib.portletext.IconExportImportTag - JSP - - - icon-help - com.liferay.taglib.portletext.IconHelpTag - JSP - - - icon-maximize - com.liferay.taglib.portletext.IconMaximizeTag - JSP - - - icon-minimize - com.liferay.taglib.portletext.IconMinimizeTag - JSP - - - icon-options - com.liferay.taglib.portletext.IconOptionsTag - JSP - - - icon-portlet - com.liferay.taglib.portletext.IconPortletTag - JSP - - portlet - false - true - - - - icon-portlet-css - com.liferay.taglib.portletext.IconPortletCssTag - JSP - - - icon-print - com.liferay.taglib.portletext.IconPrintTag - JSP - - - icon-refresh - com.liferay.taglib.portletext.IconRefreshTag - JSP - - - param - com.liferay.taglib.util.ParamTag - JSP - - name - true - true - - - value - true - true - - - - preview - com.liferay.taglib.portletext.PreviewTag - JSP - - portletName - true - true - - - queryString - false - true - - - width - false - true - - - - - - - renderURL - com.liferay.taglib.portlet.RenderURLTag - com.liferay.taglib.portlet.RenderURLTei - JSP - - anchor - false - true - - - copyCurrentRenderParameters - false - true - - - doAsUserId - false - true - - - encrypt - false - true - - - escapeXml - false - true - - - plid - false - true - - - portletConfiguration - false - true - - - portletMode - false - true - - - portletName - false - true - - - secure - false - true - - - var - false - true - - - varImpl - false - true - - - windowState - false - true - - - - renderURLParams - com.liferay.taglib.portlet.RenderURLParamsTag - JSP - - varImpl - true - true - - - - - - - resourceURL - com.liferay.taglib.portlet.ResourceURLTag - com.liferay.taglib.portlet.ResourceURLTei - JSP - - anchor - false - true - - - copyCurrentRenderParameters - false - true - - - doAsUserId - false - true - - - encrypt - false - true - - - escapeXml - false - true - - - plid - false - true - - - portletConfiguration - false - true - - - portletMode - false - true - - - portletName - false - true - - - secure - false - true - - - var - false - true - - - varImpl - false - true - - - windowState - false - true - - - - runtime - com.liferay.taglib.portletext.RuntimeTag - JSP - - defaultPreferences - false - true - - - portletName - true - true - - - queryString - false - true - - - \ No newline at end of file diff --git a/sandbox/liferay-integration/portlets/articleList-portlet/docroot/WEB-INF/tld/liferay-portlet.tld b/sandbox/liferay-integration/portlets/articleList-portlet/docroot/WEB-INF/tld/liferay-portlet.tld deleted file mode 100644 index 765554181..000000000 --- a/sandbox/liferay-integration/portlets/articleList-portlet/docroot/WEB-INF/tld/liferay-portlet.tld +++ /dev/null @@ -1,158 +0,0 @@ - - - - - 1.0 - 1.1 - portlet - http://java.sun.com/portlet - - actionURL - com.liferay.taglib.portlet.ActionURLTag - com.liferay.taglib.portlet.ActionURLTei - JSP - - copyCurrentRenderParameters - false - true - - - escapeXml - false - true - - - name - false - true - - - portletMode - false - true - - - secure - false - true - - - var - false - true - - - windowState - false - true - - - - defineObjects - com.liferay.taglib.portlet.DefineObjectsTag - com.liferay.taglib.portlet.DefineObjectsTei - empty - - - namespace - com.liferay.taglib.portlet.NamespaceTag - JSP - - - param - com.liferay.taglib.util.ParamTag - JSP - - name - true - true - - - value - true - true - - - - property - com.liferay.taglib.util.PropertyTag - JSP - - name - true - true - - - value - true - true - - - - renderURL - com.liferay.taglib.portlet.RenderURLTag - com.liferay.taglib.portlet.RenderURLTei - JSP - - copyCurrentRenderParameters - false - true - - - escapeXml - false - true - - - portletMode - false - true - - - secure - false - true - - - var - false - true - - - windowState - false - true - - - - resourceURL - com.liferay.taglib.portlet.ResourceURLTag - com.liferay.taglib.portlet.ResourceURLTei - JSP - - cacheability - false - true - - - escapeXml - false - true - - - id - false - true - - - secure - false - true - - - var - false - true - - - \ No newline at end of file diff --git a/sandbox/liferay-integration/portlets/articleList-portlet/docroot/WEB-INF/tld/liferay-security.tld b/sandbox/liferay-integration/portlets/articleList-portlet/docroot/WEB-INF/tld/liferay-security.tld deleted file mode 100644 index 455c2179a..000000000 --- a/sandbox/liferay-integration/portlets/articleList-portlet/docroot/WEB-INF/tld/liferay-security.tld +++ /dev/null @@ -1,91 +0,0 @@ - - - - - 1.0 - 1.1 - liferay-security - http://liferay.com/tld/security - - doAsURL - com.liferay.taglib.security.DoAsURLTag - com.liferay.taglib.security.DoAsURLTei - JSP - - doAsUserId - false - true - - - var - false - true - - - - encrypt - com.liferay.taglib.security.EncryptTag - JSP - - className - false - true - - - protocol - true - true - - - style - false - true - - - target - false - true - - - unencryptedParams - false - true - - - url - true - true - - - - permissionsURL - com.liferay.taglib.security.PermissionsURLTag - com.liferay.taglib.security.PermissionsURLTei - JSP - - modelResource - true - true - - - modelResourceDescription - true - true - - - redirect - false - true - - - resourcePrimKey - true - true - - - var - false - true - - - \ No newline at end of file diff --git a/sandbox/liferay-integration/portlets/articleList-portlet/docroot/WEB-INF/tld/liferay-theme.tld b/sandbox/liferay-integration/portlets/articleList-portlet/docroot/WEB-INF/tld/liferay-theme.tld deleted file mode 100644 index e99603c88..000000000 --- a/sandbox/liferay-integration/portlets/articleList-portlet/docroot/WEB-INF/tld/liferay-theme.tld +++ /dev/null @@ -1,65 +0,0 @@ - - - - - 1.0 - 1.1 - theme - http://liferay.com/tld/theme - - defineObjects - com.liferay.taglib.theme.DefineObjectsTag - com.liferay.taglib.theme.DefineObjectsTei - empty - - - include - com.liferay.taglib.theme.IncludeTag - JSP - - page - true - true - - - - layout-icon - com.liferay.taglib.theme.LayoutIconTag - JSP - - layout - true - true - - - - meta-tags - com.liferay.taglib.theme.MetaTagsTag - JSP - - - param - com.liferay.taglib.util.ParamTag - JSP - - name - true - true - - - value - true - true - - - - wrap-portlet - com.liferay.taglib.theme.WrapPortletTag - JSP - - page - true - true - - - \ No newline at end of file diff --git a/sandbox/liferay-integration/portlets/articleList-portlet/docroot/WEB-INF/tld/liferay-ui.tld b/sandbox/liferay-integration/portlets/articleList-portlet/docroot/WEB-INF/tld/liferay-ui.tld deleted file mode 100644 index 42c80d03b..000000000 --- a/sandbox/liferay-integration/portlets/articleList-portlet/docroot/WEB-INF/tld/liferay-ui.tld +++ /dev/null @@ -1,2739 +0,0 @@ - - - - 1.0 - liferay-ui - http://liferay.com/tld/ui - - asset-categories-navigation - com.liferay.taglib.ui.AssetCategoriesNavigationTag - JSP - - hidePortletWhenEmpty - false - true - - - vocabularyIds - false - true - - - - asset-categories-selector - com.liferay.taglib.ui.AssetCategoriesSelectorTag - JSP - - className - false - true - - - classPK - false - true - - - contentCallback - false - true - - - curCategoryIds - false - true - - - focus - false - true - - - hiddenInput - false - true - - - - asset-categories-summary - com.liferay.taglib.ui.AssetCategoriesSummaryTag - JSP - - className - true - true - - - classPK - true - true - - - message - false - true - - - portletURL - false - true - - - - asset-tags-error - com.liferay.taglib.ui.AssetTagsErrorTag - JSP - - - asset-tags-navigation - com.liferay.taglib.ui.AssetTagsNavigationTag - JSP - - classNameId - false - true - - - displayStyle - false - true - - - hidePortletWhenEmpty - false - true - - - showAssetCount - false - true - - - showZeroAssetCount - false - true - - - - asset-tags-selector - com.liferay.taglib.ui.AssetTagsSelectorTag - JSP - - className - false - true - - - classPK - false - true - - - contentCallback - false - true - - - curTags - false - true - - - focus - false - true - - - hiddenInput - false - true - - - - asset-tags-summary - com.liferay.taglib.ui.AssetTagsSummaryTag - JSP - - assetTagNames - false - true - - - className - true - true - - - classPK - true - true - - - message - false - true - - - portletURL - false - true - - - - breadcrumb - com.liferay.taglib.ui.BreadcrumbTag - JSP - - displayStyle - false - true - - - portletURL - false - true - - - selLayout - false - true - - - selLayoutParam - false - true - - - showGuestGroup - false - true - - - showLayout - false - true - - - showParentGroups - false - true - - - showPortletBreadcrumb - false - true - - - - calendar - com.liferay.taglib.ui.CalendarTag - JSP - - data - false - true - - - day - true - true - - - headerFormat - false - true - - - headerPattern - false - true - - - month - true - true - - - showAllPotentialWeeks - false - true - - - year - true - true - - - - captcha - com.liferay.taglib.ui.CaptchaTag - JSP - - url - true - true - - - - custom-attribute - com.liferay.taglib.ui.CustomAttributeTag - JSP - - className - true - true - - - classPK - true - true - - - editable - false - true - - - label - false - true - - - name - true - true - - - - custom-attribute-list - com.liferay.taglib.ui.CustomAttributeListTag - JSP - - className - true - true - - - classPK - true - true - - - editable - false - true - - - label - false - true - - - - custom-attributes-available - com.liferay.taglib.ui.CustomAttributesAvailableTag - JSP - - className - true - true - - - companyId - false - true - - - - diff - com.liferay.taglib.ui.DiffTag - JSP - - diffResults - true - true - - - sourceName - true - true - - - targetName - true - true - - - - diff-html - com.liferay.taglib.ui.DiffHtmlTag - JSP - - diffHtmlResults - true - true - - - - discussion - com.liferay.taglib.ui.DiscussionTag - JSP - - className - true - true - - - classPK - true - true - - - formAction - true - true - - - formName - false - true - - - permissionClassName - false - true - - - permissionClassPK - false - true - - - ratingsEnabled - false - true - - - redirect - false - true - - - subject - true - true - - - userId - true - true - - - - error - com.liferay.taglib.ui.ErrorTag - com.liferay.taglib.ui.ErrorTei - JSP - - exception - false - true - - - key - false - true - - - message - false - true - - - rowBreak - false - true - - - translateMessage - false - true - - - - error-marker - com.liferay.taglib.ui.ErrorMarkerTag - JSP - - key - false - true - - - value - false - true - - - - flags - com.liferay.taglib.ui.FlagsTag - JSP - - className - true - true - - - classPK - true - true - - - contentTitle - true - true - - - label - false - true - - - message - false - true - - - reportedUserId - true - true - - - - flash - com.liferay.taglib.ui.FlashTag - JSP - - align - false - true - - - allowFullScreen - false - true - - - allowScriptAccess - false - true - - - base - false - true - - - bgcolor - false - true - - - devicefont - false - true - - - flashvars - false - true - - - height - false - true - - - id - false - true - - - loop - false - true - - - menu - false - true - - - movie - true - true - - - play - false - true - - - quality - false - true - - - salign - false - true - - - scale - false - true - - - swliveconnect - false - true - - - version - false - true - - - width - false - true - - - wmode - false - true - - - - group-search - com.liferay.taglib.ui.GroupSearchTag - JSP - - groupParams - true - true - - - portletURL - true - true - - - rowChecker - false - true - - - - header - com.liferay.taglib.ui.HeaderTag - JSP - - backLabel - false - true - - - backURL - false - true - - - cssClass - false - true - - - title - true - true - - - - icon - com.liferay.taglib.ui.IconTag - JSP - - cssClass - false - true - - - id - false - true - - - image - false - true - - - imageHover - false - true - - - label - false - true - - - lang - false - true - - - message - false - true - - - method - false - true - - - src - false - true - - - srcHover - false - true - - - target - false - true - - - toolTip - false - true - - - url - false - true - - - - icon-deactivate - com.liferay.taglib.ui.IconDeactivateTag - JSP - - label - false - true - - - url - true - true - - - - icon-delete - com.liferay.taglib.ui.IconDeleteTag - JSP - - label - false - true - - - url - true - true - - - - icon-help - com.liferay.taglib.ui.IconHelpTag - JSP - - message - true - true - - - - icon-list - com.liferay.taglib.ui.IconListTag - JSP - - showWhenSingleIcon - false - true - - - - icon-menu - com.liferay.taglib.ui.IconMenuTag - JSP - - align - false - true - - - cssClass - false - true - - - icon - false - true - - - id - false - true - - - message - false - true - - - showExpanded - false - true - - - showArrow - false - true - - - showWhenSingleIcon - false - true - - - - input-checkbox - com.liferay.taglib.ui.InputCheckBoxTag - JSP - - cssClass - false - true - - - defaultValue - false - true - - - disabled - false - true - - - formName - false - true - - - id - false - true - - - onClick - false - true - - - param - true - true - - - - input-date - com.liferay.taglib.ui.InputDateTag - JSP - - cssClass - false - true - - - dayNullable - false - true - - - dayParam - false - true - - - dayValue - false - true - - - disableNamespace - false - true - - - disabled - false - true - - - firstDayOfWeek - false - true - - - formName - false - true - - - imageInputId - false - true - - - monthAndYearNullable - false - true - - - monthAndYearParam - false - true - - - monthNullable - false - true - - - monthParam - false - true - - - monthValue - false - true - - - yearNullable - false - true - - - yearParam - false - true - - - yearRangeEnd - true - true - - - yearRangeStart - true - true - - - yearValue - false - true - - - - input-editor - com.liferay.taglib.ui.InputEditorTag - JSP - - cssClass - false - true - - - editorImpl - false - true - - - height - false - true - - - initMethod - false - true - - - name - false - true - - - onChangeMethod - false - true - - - toolbarSet - false - true - - - width - false - true - - - - input-field - com.liferay.taglib.ui.InputFieldTag - JSP - - bean - false - true - - - cssClass - false - true - - - defaultValue - false - true - - - disabled - false - true - - - field - true - true - - - fieldParam - false - true - - - formName - false - true - - - format - false - true - - - model - true - true - - - - input-localized - com.liferay.taglib.ui.InputLocalizedTag - JSP - - cssClass - false - true - - - disabled - false - true - - - name - true - true - - - type - false - true - - - xml - true - true - - true - - - input-move-boxes - com.liferay.taglib.ui.InputMoveBoxesTag - JSP - - cssClass - false - true - - - leftBoxName - true - true - - - leftList - true - true - - - leftOnChange - false - true - - - leftReorder - false - true - - - leftTitle - true - true - - - rightBoxName - true - true - - - rightList - true - true - - - rightOnChange - false - true - - - rightReorder - false - true - - - rightTitle - true - true - - - - input-permissions - com.liferay.taglib.ui.InputPermissionsTag - JSP - - formName - false - true - - - modelName - false - true - - - - input-permissions-params - com.liferay.taglib.ui.InputPermissionsParamsTag - JSP - - modelName - true - true - - - - input-repeat - com.liferay.taglib.ui.InputRepeatTag - JSP - - cssClass - false - true - - - event - false - true - - - - input-resource - com.liferay.taglib.ui.InputResourceTag - JSP - - cssClass - false - true - - - url - true - true - - - - input-scheduler - com.liferay.taglib.ui.InputSchedulerTag - JSP - - - input-select - com.liferay.taglib.ui.InputSelectTag - JSP - - cssClass - false - true - - - defaultValue - false - true - - - disabled - false - true - - - formName - false - true - - - param - true - true - - - - input-textarea - com.liferay.taglib.ui.InputTextAreaTag - JSP - - cssClass - false - true - - - defaultValue - false - true - - - disabled - false - true - - - param - true - true - - - - input-time - com.liferay.taglib.ui.InputTimeTag - JSP - - amPmNullable - false - true - - - amPmParam - true - true - - - amPmValue - false - true - - - cssClass - false - true - - - disabled - false - true - - - hourNullable - false - true - - - hourParam - true - true - - - hourValue - false - true - - - minuteInterval - false - true - - - minuteNullable - false - true - - - minuteParam - true - true - - - minuteValue - false - true - - - - input-time-zone - com.liferay.taglib.ui.InputTimeZoneTag - JSP - - cssClass - false - true - - - daylight - false - true - - - disabled - false - true - - - displayStyle - false - true - - - name - true - true - - - nullable - false - true - - - value - false - true - - - - journal-article - com.liferay.taglib.ui.JournalArticleTag - JSP - - articleId - false - true - - - articlePage - false - true - - - articleResourcePrimKey - false - true - - - groupId - false - true - - - languageId - false - true - - - showAvailableLocales - false - true - - - showTitle - false - true - - - templateId - false - true - - - xmlRequest - false - true - - - - journal-content-search - com.liferay.taglib.ui.JournalContentSearchTag - JSP - - - language - com.liferay.taglib.ui.LanguageTag - JSP - - displayStyle - false - true - - - formAction - false - true - - - formName - false - true - - - languageIds - false - true - - - name - false - true - - - - message - com.liferay.taglib.ui.MessageTag - JSP - - arguments - false - true - - - key - true - true - - - translateArguments - false - true - - - - my-places - com.liferay.taglib.ui.MyPlacesTag - JSP - - max - false - true - - - - navigation - com.liferay.taglib.ui.NavigationTag - JSP - - bulletStyle - false - true - - - displayStyle - false - true - - - headerType - false - true - - - includedLayouts - false - true - - - nestedChildren - false - true - - - rootLayoutLevel - false - true - - - rootLayoutType - false - true - - - - page-iterator - com.liferay.taglib.ui.PageIteratorTag - JSP - - cur - true - true - - - curParam - true - true - - - delta - false - true - - - deltaConfigurable - false - true - - - deltaParam - false - true - - - formName - false - true - - - jsCall - false - true - - - maxPages - false - true - - - target - false - true - - - total - true - true - - - type - false - true - - - url - false - true - - - - panel - com.liferay.taglib.ui.PanelTag - JSP - - collapsible - false - true - - - cssClass - false - true - - - defaultState - false - true - - - extended - false - true - - - id - false - true - - - persistState - false - true - - - title - true - true - - - - panel-container - com.liferay.taglib.ui.PanelContainerTag - JSP - - accordion - false - true - - - cssClass - false - true - - - extended - false - true - - - id - false - true - - - persistState - false - true - - - - panel-floating-container - com.liferay.taglib.ui.PanelFloatingContainerTag - JSP - - accordion - false - true - - - cssClass - false - true - - - extended - false - true - - - id - false - true - - - paging - false - true - - - pagingElements - false - true - - - persistState - false - true - - - resultsPerPage - false - true - - - trigger - true - true - - - width - false - true - - - - param - com.liferay.taglib.util.ParamTag - JSP - - name - true - true - - - value - true - true - - - - png-image - com.liferay.taglib.ui.PngImageTag - JSP - - height - true - true - - - image - true - true - - - width - true - true - - - - ratings - com.liferay.taglib.ui.RatingsTag - JSP - - className - true - true - - - classPK - true - true - - - numberOfStars - false - true - - - ratingsEntry - false - true - - - ratingsStats - false - true - - - type - false - true - - - url - false - true - - - - ratings-score - com.liferay.taglib.ui.RatingsScoreTag - JSP - - score - true - true - - - - search - com.liferay.taglib.ui.SearchTag - JSP - - - search-container - com.liferay.taglib.ui.SearchContainerTag - com.liferay.taglib.ui.SearchContainerTei - JSP - - curParam - false - true - - - delta - false - true - - - deltaConfigurable - false - true - - - deltaParam - false - true - - - displayTerms - false - true - - - emptyResultsMessage - false - true - - - headerNames - false - true - - - hover - false - true - - - id - false - true - - - iteratorURL - false - true - - - orderByCol - false - true - - - orderByColParam - false - true - - - orderByComparator - false - true - - - orderByType - false - true - - - orderByTypeParam - false - true - - - rowChecker - false - true - - - searchContainer - false - true - - - searchTerms - false - true - - - var - false - true - - - - search-container-column-button - com.liferay.taglib.ui.SearchContainerColumnButtonTag - JSP - - align - false - true - - - colspan - false - true - - - href - true - true - - - index - false - true - - - name - false - true - - - valign - false - true - - - - search-container-column-jsp - com.liferay.taglib.ui.SearchContainerColumnJSPTag - JSP - - align - false - true - - - colspan - false - true - - - index - false - true - - - name - false - true - - - path - true - true - - - valign - false - true - - - - search-container-column-score - com.liferay.taglib.ui.SearchContainerColumnScoreTag - JSP - - index - false - true - - - name - false - true - - - score - true - true - - - - search-container-column-text - com.liferay.taglib.ui.SearchContainerColumnTextTag - com.liferay.taglib.ui.SearchContainerColumnTextTei - JSP - - align - false - true - - - buffer - false - true - - - colspan - false - true - - - href - false - true - - - index - false - true - - - name - false - true - - - orderable - false - true - - - orderableProperty - false - true - - - property - false - true - - - target - false - true - - - title - false - true - - - translate - false - true - - - valign - false - true - - - value - false - true - - - - search-container-results - com.liferay.taglib.ui.SearchContainerResultsTag - com.liferay.taglib.ui.SearchContainerResultsTei - JSP - - results - false - true - - - resultsVar - false - true - - - total - false - true - - - totalVar - false - true - - - - search-container-row - com.liferay.taglib.ui.SearchContainerRowTag - com.liferay.taglib.ui.SearchContainerRowTei - JSP - - bold - false - true - - - className - true - true - - - escapedModel - false - true - - - indexVar - false - true - - - keyProperty - false - true - - - modelVar - false - true - - - rowVar - false - true - - - servletContext - false - true - - - stringKey - false - true - - - - search-container-row-parameter - com.liferay.taglib.ui.SearchContainerRowParameterTag - JSP - - name - true - true - - - value - true - true - - - - search-form - com.liferay.taglib.ui.SearchFormTag - JSP - - page - true - true - - - searchContainer - false - true - - - servletContext - false - true - - - showAddButton - false - true - - - - search-iterator - com.liferay.taglib.ui.SearchIteratorTag - JSP - - paginate - false - true - - - searchContainer - false - true - - - type - false - true - - - - search-paginator - com.liferay.taglib.ui.SearchPaginatorTag - JSP - - searchContainer - true - true - - - type - false - true - - - - search-speed - com.liferay.taglib.ui.SearchSpeedTag - JSP - - hits - true - true - - - searchContainer - true - true - - - - search-toggle - com.liferay.taglib.ui.SearchToggleTag - JSP - - buttonLabel - false - true - - - displayTerms - true - true - - - id - true - true - - - - section - com.liferay.taglib.ui.SectionTag - com.liferay.taglib.ui.SectionTei - JSP - - - social-activities - com.liferay.taglib.ui.SocialActivitiesTag - JSP - - activities - false - true - - - className - false - true - - - classPK - false - true - - - feedEnabled - false - true - - - feedLink - false - true - - - feedLinkMessage - false - true - - - feedTitle - false - true - - - - social-bookmark - com.liferay.taglib.ui.SocialBookmarkTag - JSP - - target - false - true - - - title - true - true - - - type - true - true - - - url - true - true - - - - social-bookmarks - com.liferay.taglib.ui.SocialBookmarksTag - JSP - - target - false - true - - - title - true - true - - - types - false - true - - - url - true - true - - - - staging - com.liferay.taglib.ui.StagingTag - JSP - - - success - com.liferay.taglib.ui.SuccessTag - JSP - - key - true - true - - - message - true - true - - - translateMessage - false - true - - - - table-iterator - com.liferay.taglib.ui.TableIteratorTag - com.liferay.taglib.ui.TableIteratorTei - JSP - - bodyPage - false - true - - - list - true - true - - - listType - true - true - - - rowBreak - false - true - - - rowLength - true - true - - - rowPadding - false - true - - - rowValign - false - true - - - width - false - true - - - - tabs - com.liferay.taglib.ui.TabsTag - JSP - - - backLabel - false - true - - - backURL - false - true - - - formName - false - true - - - names - true - true - - - onClick - false - true - - - param - false - true - - - portletURL - false - true - - - refresh - false - true - - - tabsValues - false - true - - - url - false - true - - - url0 - false - true - - - url1 - false - true - - - url2 - false - true - - - url3 - false - true - - - url4 - false - true - - - url5 - false - true - - - url6 - false - true - - - url7 - false - true - - - url8 - false - true - - - url9 - false - true - - - value - false - true - - - - toggle - com.liferay.taglib.ui.ToggleTag - JSP - - defaultShowContent - false - true - - - hideImage - false - true - - - hideMessage - false - true - - - id - true - true - - - showImage - false - true - - - showMessage - false - true - - - stateVar - false - true - - - - toggle-area - com.liferay.taglib.ui.ToggleAreaTag - JSP - - align - false - true - - - defaultShowContent - false - true - - - hideImage - false - true - - - hideMessage - false - true - - - id - false - true - - - showImage - false - true - - - showMessage - false - true - - - stateVar - false - true - - - - toggle-value - com.liferay.taglib.ui.ToggleValueTag - JSP - - id - true - true - - - - upload-progress - com.liferay.taglib.ui.UploadProgressTag - JSP - - id - true - true - - - iframeSrc - false - true - - - message - false - true - - - redirect - true - true - - - - user-display - com.liferay.taglib.ui.UserDisplayTag - com.liferay.taglib.ui.UserDisplayTei - JSP - - displayStyle - false - true - - - url - false - true - - - userId - true - true - - - userName - false - true - - - - user-search - com.liferay.taglib.ui.UserSearchTag - JSP - - portletURL - true - true - - - rowChecker - false - true - - - userParams - true - true - - - - webdav - com.liferay.taglib.ui.WebDAVTag - JSP - - path - true - true - - - - write - com.liferay.taglib.ui.WriteTag - JSP - - bean - true - true - - - property - true - true - - - \ No newline at end of file diff --git a/sandbox/liferay-integration/portlets/articleList-portlet/docroot/WEB-INF/tld/liferay-util.tld b/sandbox/liferay-integration/portlets/articleList-portlet/docroot/WEB-INF/tld/liferay-util.tld deleted file mode 100644 index cb07f3319..000000000 --- a/sandbox/liferay-integration/portlets/articleList-portlet/docroot/WEB-INF/tld/liferay-util.tld +++ /dev/null @@ -1,86 +0,0 @@ - - - - - 1.2 - 1.1 - liferay-util - http://liferay.com/tld/util - - buffer - com.liferay.taglib.util.BufferTag - com.liferay.taglib.util.BufferTei - JSP - - var - true - true - - - - get-url - com.liferay.taglib.util.GetUrlTag - com.liferay.taglib.util.GetUrlTei - JSP - - expires - false - true - - - url - true - true - - - var - false - true - - - - html-bottom - com.liferay.taglib.util.HtmlBottomTag - JSP - - - html-top - com.liferay.taglib.util.HtmlTopTag - JSP - - - include - com.liferay.taglib.util.IncludeTag - JSP - - page - true - true - - - portletId - false - true - - - servletContext - false - true - - - - param - com.liferay.taglib.util.ParamTag - JSP - - name - true - true - - - value - true - true - - - \ No newline at end of file diff --git a/sandbox/liferay-integration/portlets/articleList-portlet/docroot/css/main.css b/sandbox/liferay-integration/portlets/articleList-portlet/docroot/css/main.css deleted file mode 100644 index e69de29bb..000000000 diff --git a/sandbox/liferay-integration/portlets/articleList-portlet/docroot/edit.jsp b/sandbox/liferay-integration/portlets/articleList-portlet/docroot/edit.jsp deleted file mode 100644 index d8f4a2a8a..000000000 --- a/sandbox/liferay-integration/portlets/articleList-portlet/docroot/edit.jsp +++ /dev/null @@ -1,39 +0,0 @@ -<%-- - - Configuration page for the portlet. Parameters are: query, templateid. - ---%> -<%@page contentType="text/html" pageEncoding="UTF-8"%> -<%@ taglib uri="http://java.sun.com/portlet_2_0" prefix="portlet" %> -<%@page import="java.util.Set"%> -<%@page import="java.util.Iterator"%> -<%@ page import="javax.portlet.PortletURL" %> -<%@ page import="javax.portlet.RenderResponse" %> -<%@ page import="javax.portlet.RenderRequest" %> -<%@ page import="javax.portlet.PortletPreferences" %> - -<% -RenderResponse portletResponse = (RenderResponse)request.getAttribute("javax.portlet.response"); -PortletURL actionUrl = portletResponse.createActionURL(); - -RenderRequest renderRequest = (RenderRequest) request.getAttribute("javax.portlet.request"); -PortletPreferences prefs = renderRequest.getPreferences(); - -String query = prefs.getValue("query", ""); -String templateid = prefs.getValue("templateid", ""); - -%> - -
    Preferences:
    - -
    - -
    Query: - - -
    Template ID: - - -
    - - diff --git a/sandbox/liferay-integration/portlets/articleList-portlet/docroot/icon.png b/sandbox/liferay-integration/portlets/articleList-portlet/docroot/icon.png deleted file mode 100644 index 807b862cf..000000000 Binary files a/sandbox/liferay-integration/portlets/articleList-portlet/docroot/icon.png and /dev/null differ diff --git a/sandbox/liferay-integration/portlets/articleList-portlet/docroot/js/main.js b/sandbox/liferay-integration/portlets/articleList-portlet/docroot/js/main.js deleted file mode 100644 index e69de29bb..000000000 diff --git a/sandbox/liferay-integration/portlets/articleList-portlet/docroot/view.jsp b/sandbox/liferay-integration/portlets/articleList-portlet/docroot/view.jsp deleted file mode 100644 index 7c9813d76..000000000 --- a/sandbox/liferay-integration/portlets/articleList-portlet/docroot/view.jsp +++ /dev/null @@ -1,62 +0,0 @@ -<% -/** - * A portlet which given - * - * a tolog query, - * a template - * - * displays a list of articles produced by the query using the given - * template. The template is optional. - */ -%> -<%@ taglib uri="http://java.sun.com/portlet_2_0" prefix="portlet" %> -<%@ taglib uri="http://liferay.com/tld/ui" prefix="liferay-ui" %> -<%@ taglib uri="http://java.sun.com/jstl/core" prefix="c"%> -<%@ taglib uri='http://psi.ontopia.net/jsp/taglib/tolog' prefix='tolog'%> - -<%@ page import="com.liferay.portlet.journal.model.JournalArticle" %> -<%@ page import="com.liferay.portlet.journal.service.JournalArticleLocalServiceUtil"%> -<%@ page import="com.liferay.portlet.journal.model.JournalArticleDisplay" %> -<%@ page import="com.liferay.portlet.journal.model.JournalArticleResource" %> -<%@ page import="com.liferay.portlet.journal.service.JournalArticleResourceLocalServiceUtil" %> -<%@ page import="com.liferay.portlet.journalcontent.util.JournalContentUtil" %> -<%@ page import="net.ontopia.topicmaps.nav2.utils.ContextUtils" %> - -<% - String tmid = tm.OntopiaAdapter.getInstance(true).getTopicMapId(); -%> - - - - - - - - -<% - String query = (String) request.getAttribute("query"); - String templateid = (String) request.getAttribute("templateid"); -%> - - - <% - String artid = (String) ContextUtils.getSingleValue("ARTID", pageContext); - long grpid = Long.parseLong((String) ContextUtils.getSingleValue("GRPID", pageContext)); - %> - - - - - - - - - - -

    No topic found!

    - -
    -
    \ No newline at end of file diff --git a/sandbox/liferay-integration/portlets/dynamicWcd/build.xml b/sandbox/liferay-integration/portlets/dynamicWcd/build.xml deleted file mode 100644 index fe7f500af..000000000 --- a/sandbox/liferay-integration/portlets/dynamicWcd/build.xml +++ /dev/null @@ -1,5 +0,0 @@ - - - - - \ No newline at end of file diff --git a/sandbox/liferay-integration/portlets/dynamicWcd/docroot/WEB-INF/liferay-display.xml b/sandbox/liferay-integration/portlets/dynamicWcd/docroot/WEB-INF/liferay-display.xml deleted file mode 100644 index 8f2e80965..000000000 --- a/sandbox/liferay-integration/portlets/dynamicWcd/docroot/WEB-INF/liferay-display.xml +++ /dev/null @@ -1,8 +0,0 @@ - - - - - - - - \ No newline at end of file diff --git a/sandbox/liferay-integration/portlets/dynamicWcd/docroot/WEB-INF/liferay-plugin-package.properties b/sandbox/liferay-integration/portlets/dynamicWcd/docroot/WEB-INF/liferay-plugin-package.properties deleted file mode 100644 index b346b61cc..000000000 --- a/sandbox/liferay-integration/portlets/dynamicWcd/docroot/WEB-INF/liferay-plugin-package.properties +++ /dev/null @@ -1,9 +0,0 @@ -name=Dynamic Content -module-group-id=liferay -module-incremental-version=1 -tags= -short-description= -change-log= -page-url=http://www.liferay.com -author=Liferay, Inc. -licenses=MIT \ No newline at end of file diff --git a/sandbox/liferay-integration/portlets/dynamicWcd/docroot/WEB-INF/liferay-portlet.xml b/sandbox/liferay-integration/portlets/dynamicWcd/docroot/WEB-INF/liferay-portlet.xml deleted file mode 100644 index a49a2ca01..000000000 --- a/sandbox/liferay-integration/portlets/dynamicWcd/docroot/WEB-INF/liferay-portlet.xml +++ /dev/null @@ -1,28 +0,0 @@ - - - - - - dynamicWcd - /icon.png - true - /css/test.css - /js/test.js - - - administrator - Administrator - - - guest - Guest - - - power-user - Power User - - - user - User - - \ No newline at end of file diff --git a/sandbox/liferay-integration/portlets/dynamicWcd/docroot/WEB-INF/portlet.xml b/sandbox/liferay-integration/portlets/dynamicWcd/docroot/WEB-INF/portlet.xml deleted file mode 100644 index 11830b7c7..000000000 --- a/sandbox/liferay-integration/portlets/dynamicWcd/docroot/WEB-INF/portlet.xml +++ /dev/null @@ -1,34 +0,0 @@ - - - - - dynamicWcd - Dynamic Content - portlet.DynamicWcdPortlet - - view-jsp - /view.jsp - - 0 - - text/html - - - Dynamic Content - Dynamic Content - Dynamic Content - - - administrator - - - guest - - - power-user - - - user - - - \ No newline at end of file diff --git a/sandbox/liferay-integration/portlets/dynamicWcd/docroot/WEB-INF/src/portlet/DynamicWcdPortlet.java b/sandbox/liferay-integration/portlets/dynamicWcd/docroot/WEB-INF/src/portlet/DynamicWcdPortlet.java deleted file mode 100644 index 266440d2d..000000000 --- a/sandbox/liferay-integration/portlets/dynamicWcd/docroot/WEB-INF/src/portlet/DynamicWcdPortlet.java +++ /dev/null @@ -1,78 +0,0 @@ - -package portlet; - -import com.liferay.portal.kernel.log.Log; -import com.liferay.portal.kernel.log.LogFactoryUtil; - -import java.io.IOException; - -import javax.portlet.GenericPortlet; -import javax.portlet.PortletException; -import javax.portlet.PortletRequestDispatcher; -import javax.portlet.RenderRequest; -import javax.portlet.RenderResponse; - -/** - * show content as provided by identifiers in the url - * Nothing happens here. It's all in the view.jsp - * - * @author mfi - * - */ -public class DynamicWcdPortlet extends GenericPortlet { - - public void init() throws PortletException { - editJSP = getInitParameter("edit-jsp"); - helpJSP = getInitParameter("help-jsp"); - viewJSP = getInitParameter("view-jsp"); - } - - public void doDispatch(RenderRequest renderRequest, RenderResponse renderResponse) throws IOException, PortletException { - - String jspPage = renderRequest.getParameter("jspPage"); - - if (jspPage != null) { - include(jspPage, renderRequest, renderResponse); - } - else { - super.doDispatch(renderRequest, renderResponse); - } - } - - public void doEdit(RenderRequest renderRequest, RenderResponse renderResponse) throws IOException, PortletException { - - if (renderRequest.getPreferences() == null) { - super.doEdit(renderRequest, renderResponse); - } - else { - include(editJSP, renderRequest, renderResponse); - } - } - - public void doHelp(RenderRequest renderRequest, RenderResponse renderResponse) throws IOException, PortletException { - include(helpJSP, renderRequest, renderResponse); - } - - public void doView(RenderRequest renderRequest, RenderResponse renderResponse) throws IOException, PortletException { - include(viewJSP, renderRequest, renderResponse); - } - - protected void include(String path, RenderRequest renderRequest, RenderResponse renderResponse) throws IOException, PortletException { - - PortletRequestDispatcher portletRequestDispatcher = getPortletContext().getRequestDispatcher(path); - - if (portletRequestDispatcher == null) { - _log.error(path + " is not a valid include"); - } - else { - portletRequestDispatcher.include(renderRequest, renderResponse); - } - } - - protected String editJSP; - protected String helpJSP; - protected String viewJSP; - - private static Log _log = LogFactoryUtil.getLog(DynamicWcdPortlet.class); - -} \ No newline at end of file diff --git a/sandbox/liferay-integration/portlets/dynamicWcd/docroot/WEB-INF/sun-web.xml b/sandbox/liferay-integration/portlets/dynamicWcd/docroot/WEB-INF/sun-web.xml deleted file mode 100644 index b77dce34a..000000000 --- a/sandbox/liferay-integration/portlets/dynamicWcd/docroot/WEB-INF/sun-web.xml +++ /dev/null @@ -1,11 +0,0 @@ - - - - /dynamicWcd - - - - Keep a copy of the generated servlet class' java code. - - - diff --git a/sandbox/liferay-integration/portlets/dynamicWcd/docroot/WEB-INF/tld/liferay-portlet-ext.tld b/sandbox/liferay-integration/portlets/dynamicWcd/docroot/WEB-INF/tld/liferay-portlet-ext.tld deleted file mode 100644 index eb6591dc3..000000000 --- a/sandbox/liferay-integration/portlets/dynamicWcd/docroot/WEB-INF/tld/liferay-portlet-ext.tld +++ /dev/null @@ -1,528 +0,0 @@ - - - - - 1.0 - 1.1 - liferay-portlet - http://liferay.com/tld/portlet - - - - - actionURL - com.liferay.taglib.portlet.ActionURLTag - com.liferay.taglib.portlet.ActionURLTei - JSP - - windowState - false - true - - - portletMode - false - true - - - var - false - true - - - varImpl - false - true - - - secure - false - true - - - copyCurrentRenderParameters - false - true - - - escapeXml - false - true - - - name - false - true - - - plid - false - true - - - portletName - false - true - - - anchor - false - true - - - encrypt - false - true - - - doAsUserId - false - true - - - portletConfiguration - false - true - - - - icon-back - com.liferay.taglib.portletext.IconBackTag - JSP - - page - false - true - - - - icon-close - com.liferay.taglib.portletext.IconCloseTag - JSP - - page - false - true - - - - icon-configuration - com.liferay.taglib.portletext.IconConfigurationTag - JSP - - page - false - true - - - - icon-edit - com.liferay.taglib.portletext.IconEditTag - JSP - - page - false - true - - - - icon-edit-defaults - com.liferay.taglib.portletext.IconEditDefaultsTag - JSP - - page - false - true - - - - icon-edit-guest - com.liferay.taglib.portletext.IconEditGuestTag - JSP - - page - false - true - - - - icon-export-import - com.liferay.taglib.portletext.IconExportImportTag - JSP - - page - false - true - - - - icon-help - com.liferay.taglib.portletext.IconHelpTag - JSP - - page - false - true - - - - icon-maximize - com.liferay.taglib.portletext.IconMaximizeTag - JSP - - page - false - true - - - - icon-minimize - com.liferay.taglib.portletext.IconMinimizeTag - JSP - - page - false - true - - - - icon-options - com.liferay.taglib.portletext.IconOptionsTag - JSP - - page - false - true - - - - icon-portlet - com.liferay.taglib.portletext.IconPortletTag - JSP - - page - false - true - - - portlet - false - true - - - - icon-portlet-css - com.liferay.taglib.portletext.IconPortletCssTag - JSP - - page - false - true - - - - icon-print - com.liferay.taglib.portletext.IconPrintTag - JSP - - page - false - true - - - - icon-refresh - com.liferay.taglib.portletext.IconRefreshTag - JSP - - page - false - true - - - - - - - renderURL - com.liferay.taglib.portlet.RenderURLTag - com.liferay.taglib.portlet.RenderURLTei - JSP - - windowState - false - true - - - portletMode - false - true - - - var - false - true - - - varImpl - false - true - - - secure - false - true - - - copyCurrentRenderParameters - false - true - - - escapeXml - false - true - - - plid - false - true - - - portletName - false - true - - - anchor - false - true - - - encrypt - false - true - - - doAsUserId - false - true - - - portletConfiguration - false - true - - - - renderURLParams - com.liferay.taglib.portlet.RenderURLParamsTag - JSP - - varImpl - true - true - - - - - - - resourceURL - com.liferay.taglib.portlet.ResourceURLTag - com.liferay.taglib.portlet.ResourceURLTei - JSP - - windowState - false - true - - - portletMode - false - true - - - var - false - true - - - varImpl - false - true - - - secure - false - true - - - copyCurrentRenderParameters - false - true - - - escapeXml - false - true - - - plid - false - true - - - portletName - false - true - - - anchor - false - true - - - encrypt - false - true - - - doAsUserId - false - true - - - portletConfiguration - false - true - - - - param - com.liferay.taglib.util.ParamTag - JSP - - name - true - true - - - value - true - true - - - - preview - com.liferay.taglib.portletext.PreviewTag - JSP - - portletName - true - true - - - queryString - false - true - - - width - false - true - - - - runtime - com.liferay.taglib.portletext.RuntimeTag - JSP - - portletName - true - true - - - queryString - false - true - - - defaultPreferences - false - true - - - \ No newline at end of file diff --git a/sandbox/liferay-integration/portlets/dynamicWcd/docroot/WEB-INF/tld/liferay-portlet.tld b/sandbox/liferay-integration/portlets/dynamicWcd/docroot/WEB-INF/tld/liferay-portlet.tld deleted file mode 100644 index 2299c0a53..000000000 --- a/sandbox/liferay-integration/portlets/dynamicWcd/docroot/WEB-INF/tld/liferay-portlet.tld +++ /dev/null @@ -1,158 +0,0 @@ - - - - - 1.0 - 1.1 - portlet - http://java.sun.com/portlet - - actionURL - com.liferay.taglib.portlet.ActionURLTag - com.liferay.taglib.portlet.ActionURLTei - JSP - - windowState - false - true - - - portletMode - false - true - - - var - false - true - - - secure - false - true - - - copyCurrentRenderParameters - false - true - - - escapeXml - false - true - - - name - false - true - - - - defineObjects - com.liferay.taglib.portlet.DefineObjectsTag - com.liferay.taglib.portlet.DefineObjectsTei - empty - - - namespace - com.liferay.taglib.portlet.NamespaceTag - JSP - - - param - com.liferay.taglib.util.ParamTag - JSP - - name - true - true - - - value - true - true - - - - property - com.liferay.taglib.util.PropertyTag - JSP - - name - true - true - - - value - true - true - - - - renderURL - com.liferay.taglib.portlet.RenderURLTag - com.liferay.taglib.portlet.RenderURLTei - JSP - - windowState - false - true - - - portletMode - false - true - - - var - false - true - - - secure - false - true - - - copyCurrentRenderParameters - false - true - - - escapeXml - false - true - - - - resourceURL - com.liferay.taglib.portlet.ResourceURLTag - com.liferay.taglib.portlet.ResourceURLTei - JSP - - var - false - true - - - secure - false - true - - - escapeXml - false - true - - - id - false - true - - - cacheability - false - true - - - \ No newline at end of file diff --git a/sandbox/liferay-integration/portlets/dynamicWcd/docroot/WEB-INF/tld/liferay-security.tld b/sandbox/liferay-integration/portlets/dynamicWcd/docroot/WEB-INF/tld/liferay-security.tld deleted file mode 100644 index 90886bd27..000000000 --- a/sandbox/liferay-integration/portlets/dynamicWcd/docroot/WEB-INF/tld/liferay-security.tld +++ /dev/null @@ -1,91 +0,0 @@ - - - - - 1.0 - 1.1 - liferay-security - http://liferay.com/tld/security - - doAsURL - com.liferay.taglib.security.DoAsURLTag - com.liferay.taglib.security.DoAsURLTei - JSP - - doAsUserId - false - true - - - var - false - true - - - - encrypt - com.liferay.taglib.security.EncryptTag - JSP - - className - false - true - - - style - false - true - - - protocol - true - true - - - unencryptedParams - false - true - - - url - true - true - - - target - false - true - - - - permissionsURL - com.liferay.taglib.security.PermissionsURLTag - com.liferay.taglib.security.PermissionsURLTei - JSP - - redirect - false - true - - - modelResource - true - true - - - modelResourceDescription - true - true - - - resourcePrimKey - true - true - - - var - false - true - - - \ No newline at end of file diff --git a/sandbox/liferay-integration/portlets/dynamicWcd/docroot/WEB-INF/tld/liferay-theme.tld b/sandbox/liferay-integration/portlets/dynamicWcd/docroot/WEB-INF/tld/liferay-theme.tld deleted file mode 100644 index d39447b0f..000000000 --- a/sandbox/liferay-integration/portlets/dynamicWcd/docroot/WEB-INF/tld/liferay-theme.tld +++ /dev/null @@ -1,90 +0,0 @@ - - - - - 1.0 - 1.1 - theme - http://liferay.com/tld/theme - - box - com.liferay.taglib.theme.BoxTag - JSP - - top - true - true - - - bottom - true - true - - - - defineObjects - com.liferay.taglib.theme.DefineObjectsTag - com.liferay.taglib.theme.DefineObjectsTei - empty - - - include - com.liferay.taglib.theme.IncludeTag - JSP - - page - true - true - - - - layout-icon - com.liferay.taglib.theme.LayoutIconTag - JSP - - page - false - true - - - layout - true - true - - - - meta-tags - com.liferay.taglib.theme.MetaTagsTag - JSP - - page - false - true - - - - param - com.liferay.taglib.util.ParamTag - JSP - - name - true - true - - - value - true - true - - - - wrap-portlet - com.liferay.taglib.theme.WrapPortletTag - JSP - - page - true - true - - - \ No newline at end of file diff --git a/sandbox/liferay-integration/portlets/dynamicWcd/docroot/WEB-INF/tld/liferay-ui.tld b/sandbox/liferay-integration/portlets/dynamicWcd/docroot/WEB-INF/tld/liferay-ui.tld deleted file mode 100644 index f3338a9b7..000000000 --- a/sandbox/liferay-integration/portlets/dynamicWcd/docroot/WEB-INF/tld/liferay-ui.tld +++ /dev/null @@ -1,2800 +0,0 @@ - - - - - 1.0 - 1.1 - liferay-ui - http://liferay.com/tld/ui - - box - com.liferay.taglib.ui.BoxTag - JSP - - top - true - true - - - bottom - true - true - - - - breadcrumb - com.liferay.taglib.ui.BreadcrumbTag - JSP - - page - false - true - - - selLayout - false - true - - - selLayoutParam - false - true - - - portletURL - false - true - - - displayStyle - false - true - - - - calendar - com.liferay.taglib.ui.CalendarTag - JSP - - page - false - true - - - month - true - true - - - day - true - true - - - year - true - true - - - headerPattern - false - true - - - headerFormat - false - true - - - data - false - true - - - showAllPotentialWeeks - false - true - - - - captcha - com.liferay.taglib.ui.CaptchaTag - JSP - - page - false - true - - - url - true - true - - - - diff - com.liferay.taglib.ui.DiffTag - JSP - - page - false - true - - - sourceName - true - true - - - targetName - true - true - - - diffResults - true - true - - - - discussion - com.liferay.taglib.ui.DiscussionTag - JSP - - page - false - true - - - formName - false - true - - - formAction - true - true - - - className - true - true - - - classPK - true - true - - - userId - true - true - - - subject - true - true - - - redirect - false - true - - - ratingsEnabled - false - true - - - - custom-attribute - com.liferay.taglib.ui.CustomAttributeTag - JSP - - className - true - true - - - classPK - true - true - - - editable - false - true - - - label - false - true - - - name - true - true - - - page - false - true - - - - custom-attribute-list - com.liferay.taglib.ui.CustomAttributeListTag - JSP - - className - true - true - - - classPK - true - true - - - editable - false - true - - - label - false - true - - - page - false - true - - - - error - com.liferay.taglib.ui.ErrorTag - com.liferay.taglib.ui.ErrorTei - JSP - - startPage - false - true - - - endPage - false - true - - - exception - false - true - - - key - false - true - - - message - false - true - - - translateMessage - false - true - - - rowBreak - false - true - - - - error-marker - com.liferay.taglib.ui.ErrorMarkerTag - JSP - - key - false - true - - - value - false - true - - - - flags - com.liferay.taglib.ui.FlagsTag - JSP - - page - false - true - - - className - true - true - - - classPK - true - true - - - contentTitle - true - true - - - label - false - true - - - message - false - true - - - reportedUserId - true - true - - - - flash - com.liferay.taglib.ui.FlashTag - JSP - - page - false - true - - - align - false - true - - - allowScriptAccess - false - true - - - base - false - true - - - bgcolor - false - true - - - devicefont - false - true - - - flashvars - false - true - - - height - false - true - - - id - false - true - - - loop - false - true - - - menu - false - true - - - movie - true - true - - - play - false - true - - - quality - false - true - - - salign - false - true - - - scale - false - true - - - swliveconnect - false - true - - - version - false - true - - - width - false - true - - - wmode - false - true - - - - group-search - com.liferay.taglib.ui.GroupSearchTag - JSP - - startPage - false - true - - - endPage - false - true - - - portletURL - true - true - - - rowChecker - false - true - - - groupParams - true - true - - - - icon - com.liferay.taglib.ui.IconTag - JSP - - page - false - true - - - image - false - true - - - imageHover - false - true - - - imageHover - false - true - - - message - false - true - - - src - false - true - - - srcHover - false - true - - - url - false - true - - - method - false - true - - - target - false - true - - - label - false - true - - - toolTip - false - true - - - cssClass - false - true - - - - icon-deactivate - com.liferay.taglib.ui.IconDeactivateTag - JSP - - page - false - true - - - url - true - true - - - label - false - true - - - - icon-delete - com.liferay.taglib.ui.IconDeleteTag - JSP - - page - false - true - - - url - true - true - - - label - false - true - - - - icon-help - com.liferay.taglib.ui.IconHelpTag - JSP - - page - false - true - - - message - true - true - - - - icon-list - com.liferay.taglib.ui.IconListTag - JSP - - startPage - false - true - - - endPage - false - true - - - showWhenSingleIcon - false - true - - - - icon-menu - com.liferay.taglib.ui.IconMenuTag - JSP - - startPage - false - true - - - endPage - false - true - - - message - false - true - - - showWhenSingleIcon - false - true - - - align - false - true - - - cssClass - false - true - - - - png-image - com.liferay.taglib.ui.PngImageTag - JSP - - page - false - true - - - image - true - true - - - height - true - true - - - width - true - true - - - - input-checkbox - com.liferay.taglib.ui.InputCheckBoxTag - JSP - - page - false - true - - - formName - false - true - - - param - true - true - - - id - false - true - - - defaultValue - false - true - - - onClick - false - true - - - disabled - false - true - - - - input-date - com.liferay.taglib.ui.InputDateTag - JSP - - page - false - true - - - disableNamespace - false - true - - - formName - false - true - - - monthParam - false - true - - - monthValue - false - true - - - monthNullable - false - true - - - dayParam - false - true - - - dayValue - false - true - - - dayNullable - false - true - - - yearParam - false - true - - - yearValue - false - true - - - yearNullable - false - true - - - yearRangeStart - true - true - - - yearRangeEnd - true - true - - - monthAndYearParam - false - true - - - monthAndYearNullable - false - true - - - firstDayOfWeek - false - true - - - imageInputId - false - true - - - disabled - false - true - - - - input-editor - com.liferay.taglib.ui.InputEditorTag - JSP - - page - false - true - - - name - false - true - - - editorImpl - false - true - - - toolbarSet - false - true - - - initMethod - false - true - - - onChangeMethod - false - true - - - height - false - true - - - width - false - true - - - - input-field - com.liferay.taglib.ui.InputFieldTag - JSP - - page - false - true - - - formName - false - true - - - model - true - true - - - bean - false - true - - - field - true - true - - - fieldParam - false - true - - - defaultValue - false - true - - - disabled - false - true - - - format - false - true - - - - input-move-boxes - com.liferay.taglib.ui.InputMoveBoxesTag - JSP - - formName - false - true - - - leftTitle - true - true - - - rightTitle - true - true - - - leftBoxName - true - true - - - rightBoxName - true - true - - - leftOnChange - false - true - - - rightOnChange - false - true - - - leftReorder - false - true - - - rightReorder - false - true - - - leftList - true - true - - - rightList - true - true - - - - input-permissions - com.liferay.taglib.ui.InputPermissionsTag - JSP - - page - false - true - - - formName - false - true - - - modelName - false - true - - - - input-permissions-params - com.liferay.taglib.ui.InputPermissionsParamsTag - JSP - - modelName - true - true - - - - input-resource - com.liferay.taglib.ui.InputResourceTag - JSP - - page - false - true - - - url - true - true - - - - input-scheduler - com.liferay.taglib.ui.InputSchedulerTag - JSP - - page - false - true - - - - input-select - com.liferay.taglib.ui.InputSelectTag - JSP - - page - false - true - - - formName - false - true - - - param - true - true - - - defaultValue - false - true - - - disabled - false - true - - - - input-textarea - com.liferay.taglib.ui.InputTextAreaTag - JSP - - page - false - true - - - param - true - true - - - defaultValue - false - true - - - disabled - false - true - - - - input-time - com.liferay.taglib.ui.InputTimeTag - JSP - - page - false - true - - - hourParam - true - true - - - hourValue - false - true - - - hourNullable - false - true - - - minuteParam - true - true - - - minuteValue - false - true - - - minuteNullable - false - true - - - minuteInterval - false - true - - - amPmParam - true - true - - - amPmValue - false - true - - - amPmNullable - false - true - - - disabled - false - true - - - - input-time-zone - com.liferay.taglib.ui.InputTimeZoneTag - JSP - - page - false - true - - - name - true - true - - - value - false - true - - - nullable - false - true - - - daylight - false - true - - - displayStyle - false - true - - - disabled - false - true - - - - journal-article - com.liferay.taglib.ui.JournalArticleTag - JSP - - page - false - true - - - articleResourcePrimKey - false - true - - - groupId - false - true - - - articleId - false - true - - - templateId - false - true - - - languageId - false - true - - - articlePage - false - true - - - xmlRequest - false - true - - - showTitle - false - true - - - showAvailableLocales - false - true - - - - journal-content-search - com.liferay.taglib.ui.JournalContentSearchTag - JSP - - - language - com.liferay.taglib.ui.LanguageTag - JSP - - page - false - true - - - formName - false - true - - - formAction - false - true - - - name - false - true - - - languageIds - false - true - - - displayStyle - false - true - - - - message - com.liferay.taglib.ui.MessageTag - JSP - - key - true - true - - - - my-places - com.liferay.taglib.ui.MyPlacesTag - JSP - - page - false - true - - - max - false - true - - - - navigation - com.liferay.taglib.ui.NavigationTag - JSP - - page - false - true - - - bulletStyle - false - true - - - displayStyle - false - true - - - headerType - false - true - - - rootLayoutType - false - true - - - rootLayoutLevel - false - true - - - includedLayouts - false - true - - - nestedChildren - false - true - - - - page-iterator - com.liferay.taglib.ui.PageIteratorTag - JSP - - startPage - false - true - - - endPage - false - true - - - formName - false - true - - - cur - true - true - - - curParam - true - true - - - delta - false - true - - - deltaParam - false - true - - - jsCall - false - true - - - maxPages - false - true - - - target - false - true - - - total - true - true - - - type - false - true - - - url - false - true - - - - panel - com.liferay.taglib.ui.PanelTag - JSP - - startPage - false - true - - - endPage - false - true - - - id - true - true - - - title - true - true - - - collapsible - false - true - - - defaultState - false - true - - - persistState - false - true - - - extended - false - true - - - cssClass - false - true - - - - panel-container - com.liferay.taglib.ui.PanelContainerTag - JSP - - startPage - false - true - - - endPage - false - true - - - id - true - true - - - accordion - false - true - - - persistState - false - true - - - extended - false - true - - - cssClass - false - true - - - - panel-floating-container - com.liferay.taglib.ui.PanelFloatingContainerTag - JSP - - startPage - false - true - - - endPage - false - true - - - id - true - true - - - trigger - true - true - - - accordion - false - true - - - persistState - false - true - - - paging - false - true - - - pagingElements - false - true - - - resultsPerPage - false - true - - - width - false - true - - - extended - false - true - - - cssClass - false - true - - - - param - com.liferay.taglib.util.ParamTag - JSP - - name - true - true - - - value - true - true - - - - ratings - com.liferay.taglib.ui.RatingsTag - JSP - - page - false - true - - - className - true - true - - - classPK - true - true - - - type - false - true - - - url - false - true - - - - ratings-score - com.liferay.taglib.ui.RatingsScoreTag - JSP - - page - false - true - - - score - true - true - - - - search - com.liferay.taglib.ui.SearchTag - JSP - - - search-container - com.liferay.taglib.ui.SearchContainerTag - com.liferay.taglib.ui.SearchContainerTei - JSP - - curParam - false - true - - - delta - false - true - - - deltaParam - false - true - - - displayTerms - false - true - - - emptyResultsMessage - false - true - - - headerNames - false - true - - - hover - false - true - - - id - false - true - - - iteratorURL - false - true - - - orderByCol - false - true - - - orderByColParam - false - true - - - orderByComparator - false - true - - - orderByType - false - true - - - orderByTypeParam - false - true - - - rowChecker - false - true - - - searchContainer - false - true - - - searchTerms - false - true - - - var - false - true - - - - search-container-column-button - com.liferay.taglib.ui.SearchContainerColumnButtonTag - JSP - - align - false - true - - - colspan - false - true - - - href - true - true - - - index - false - true - - - name - false - true - - - valign - false - true - - - - search-container-column-jsp - com.liferay.taglib.ui.SearchContainerColumnJSPTag - JSP - - align - false - true - - - colspan - false - true - - - index - false - true - - - name - false - true - - - path - true - true - - - valign - false - true - - - - search-container-column-score - com.liferay.taglib.ui.SearchContainerColumnScoreTag - JSP - - index - false - true - - - name - false - true - - - score - true - true - - - - search-container-column-text - com.liferay.taglib.ui.SearchContainerColumnTextTag - com.liferay.taglib.ui.SearchContainerColumnTextTei - JSP - - align - false - true - - - buffer - false - true - - - colspan - false - true - - - href - false - true - - - index - false - true - - - name - false - true - - - orderable - false - true - - - orderableProperty - false - true - - - property - false - true - - - target - false - true - - - title - false - true - - - translate - false - true - - - valign - false - true - - - value - false - true - - - - search-container-results - com.liferay.taglib.ui.SearchContainerResultsTag - com.liferay.taglib.ui.SearchContainerResultsTei - - results - false - true - - - resultsVar - false - true - - - total - false - true - - - totalVar - false - true - - - - search-container-row - com.liferay.taglib.ui.SearchContainerRowTag - com.liferay.taglib.ui.SearchContainerRowTei - JSP - - bold - false - true - - - className - true - true - - - escapedModel - false - true - - - indexVar - false - true - - - keyProperty - false - true - - - modelVar - false - true - - - rowVar - false - true - - - stringKey - false - true - - - - search-container-row-parameter - com.liferay.taglib.ui.SearchContainerRowParameterTag - - name - true - true - - - value - true - true - - - - search-form - com.liferay.taglib.ui.SearchFormTag - JSP - - page - true - true - - - searchContainer - false - true - - - showAddButton - false - true - - - servletContext - false - true - - - - search-iterator - com.liferay.taglib.ui.SearchIteratorTag - JSP - - page - false - true - - - searchContainer - false - true - - - paginate - false - true - - - - search-paginator - com.liferay.taglib.ui.SearchPaginatorTag - JSP - - page - false - true - - - searchContainer - true - true - - - type - false - true - - - - search-speed - com.liferay.taglib.ui.SearchSpeedTag - JSP - - page - false - true - - - searchContainer - true - true - - - hits - true - true - - - - search-toggle - com.liferay.taglib.ui.SearchToggleTag - JSP - - startPage - false - true - - - endPage - false - true - - - id - true - true - - - displayTerms - true - true - - - buttonLabel - false - true - - - - section - com.liferay.taglib.ui.SectionTag - com.liferay.taglib.ui.SectionTei - JSP - - startPage - false - true - - - endPage - false - true - - - - social-activities - com.liferay.taglib.ui.SocialActivitiesTag - JSP - - page - false - true - - - className - false - true - - - classPK - false - true - - - activities - false - true - - - feedEnabled - false - true - - - feedTitle - false - true - - - feedLink - false - true - - - feedLinkMessage - false - true - - - - social-bookmark - com.liferay.taglib.ui.SocialBookmarkTag - JSP - - page - false - true - - - type - true - true - - - url - true - true - - - title - true - true - - - target - false - true - - - - social-bookmarks - com.liferay.taglib.ui.SocialBookmarksTag - JSP - - page - false - true - - - types - false - true - - - url - true - true - - - title - true - true - - - target - false - true - - - - staging - com.liferay.taglib.ui.StagingTag - JSP - - page - false - true - - - - success - com.liferay.taglib.ui.SuccessTag - JSP - - page - false - true - - - key - true - true - - - message - true - true - - - translateMessage - false - true - - - - table-iterator - com.liferay.taglib.ui.TableIteratorTag - com.liferay.taglib.ui.TableIteratorTei - JSP - - startPage - false - true - - - bodyPage - false - true - - - endPage - false - true - - - list - true - true - - - listType - true - true - - - rowLength - true - true - - - rowPadding - false - true - - - rowValign - false - true - - - rowBreak - false - true - - - width - false - true - - - - tabs - com.liferay.taglib.ui.TabsTag - JSP - - startPage - false - true - - - endPage - false - true - - - names - true - true - - - - - - tabsValues - false - true - - - formName - false - true - - - param - false - true - - - value - false - true - - - portletURL - false - true - - - url - false - true - - - url0 - false - true - - - url1 - false - true - - - url2 - false - true - - - url3 - false - true - - - url4 - false - true - - - url5 - false - true - - - url6 - false - true - - - url7 - false - true - - - url8 - false - true - - - url9 - false - true - - - backURL - false - true - - - refresh - false - true - - - onClick - false - true - - - - tags-error - com.liferay.taglib.ui.TagsErrorTag - JSP - - page - false - true - - - - tags-navigation - com.liferay.taglib.ui.TagsNavigationTag - JSP - - page - false - true - - - folksonomy - false - true - - - showCompanyCategories - false - true - - - - tags-selector - com.liferay.taglib.ui.TagsSelectorTag - JSP - - page - false - true - - - className - false - true - - - classPK - false - true - - - folksonomy - false - true - - - hiddenInput - true - true - - - curTags - false - true - - - focus - false - true - - - contentCallback - false - true - - - - tags-summary - com.liferay.taglib.ui.TagsSummaryTag - JSP - - page - false - true - - - className - true - true - - - classPK - true - true - - - folksonomy - false - true - - - message - false - true - - - portletURL - false - true - - - - toggle - com.liferay.taglib.ui.ToggleTag - JSP - - page - false - true - - - id - true - true - - - showImage - false - true - - - hideImage - false - true - - - showMessage - false - true - - - hideMessage - false - true - - - defaultShowContent - false - true - - - stateVar - false - true - - - - toggle-area - com.liferay.taglib.ui.ToggleAreaTag - JSP - - startPage - false - true - - - endPage - false - true - - - id - false - true - - - showImage - false - true - - - hideImage - false - true - - - showMessage - false - true - - - hideMessage - false - true - - - defaultShowContent - false - true - - - stateVar - false - true - - - align - false - true - - - - toggle-value - com.liferay.taglib.ui.ToggleValueTag - JSP - - id - true - true - - - - upload-progress - com.liferay.taglib.ui.UploadProgressTag - JSP - - page - false - true - - - id - true - true - - - iframeSrc - false - true - - - redirect - true - true - - - message - false - true - - - - user-display - com.liferay.taglib.ui.UserDisplayTag - com.liferay.taglib.ui.UserDisplayTei - JSP - - startPage - false - true - - - endPage - false - true - - - userId - true - true - - - userName - false - true - - - url - false - true - - - displayStyle - false - true - - - - user-search - com.liferay.taglib.ui.UserSearchTag - JSP - - startPage - false - true - - - endPage - false - true - - - portletURL - true - true - - - rowChecker - false - true - - - userParams - true - true - - - - webdav - com.liferay.taglib.ui.WebDAVTag - JSP - - page - false - true - - - path - true - true - - - - write - com.liferay.taglib.ui.WriteTag - JSP - - page - false - true - - - bean - true - true - - - property - true - true - - - \ No newline at end of file diff --git a/sandbox/liferay-integration/portlets/dynamicWcd/docroot/WEB-INF/tld/liferay-util.tld b/sandbox/liferay-integration/portlets/dynamicWcd/docroot/WEB-INF/tld/liferay-util.tld deleted file mode 100644 index d14797161..000000000 --- a/sandbox/liferay-integration/portlets/dynamicWcd/docroot/WEB-INF/tld/liferay-util.tld +++ /dev/null @@ -1,81 +0,0 @@ - - - - - 1.2 - 1.1 - liferay-util - http://liferay.com/tld/util - - buffer - com.liferay.taglib.util.BufferTag - com.liferay.taglib.util.BufferTei - JSP - - var - true - true - - - - get-url - com.liferay.taglib.util.GetUrlTag - com.liferay.taglib.util.GetUrlTei - JSP - - url - true - true - - - expires - false - true - - - var - false - true - - - - html-bottom - com.liferay.taglib.util.HtmlBottomTag - JSP - - - html-top - com.liferay.taglib.util.HtmlTopTag - JSP - - - include - com.liferay.taglib.util.IncludeTag - JSP - - page - true - true - - - servletContext - false - true - - - - param - com.liferay.taglib.util.ParamTag - JSP - - name - true - true - - - value - true - true - - - \ No newline at end of file diff --git a/sandbox/liferay-integration/portlets/dynamicWcd/docroot/WEB-INF/web.xml b/sandbox/liferay-integration/portlets/dynamicWcd/docroot/WEB-INF/web.xml deleted file mode 100644 index 4e029134b..000000000 --- a/sandbox/liferay-integration/portlets/dynamicWcd/docroot/WEB-INF/web.xml +++ /dev/null @@ -1,5 +0,0 @@ - - - - - \ No newline at end of file diff --git a/sandbox/liferay-integration/portlets/dynamicWcd/docroot/css/test.css b/sandbox/liferay-integration/portlets/dynamicWcd/docroot/css/test.css deleted file mode 100644 index e69de29bb..000000000 diff --git a/sandbox/liferay-integration/portlets/dynamicWcd/docroot/icon.png b/sandbox/liferay-integration/portlets/dynamicWcd/docroot/icon.png deleted file mode 100644 index 807b862cf..000000000 Binary files a/sandbox/liferay-integration/portlets/dynamicWcd/docroot/icon.png and /dev/null differ diff --git a/sandbox/liferay-integration/portlets/dynamicWcd/docroot/js/test.js b/sandbox/liferay-integration/portlets/dynamicWcd/docroot/js/test.js deleted file mode 100644 index e69de29bb..000000000 diff --git a/sandbox/liferay-integration/portlets/dynamicWcd/docroot/view.jsp b/sandbox/liferay-integration/portlets/dynamicWcd/docroot/view.jsp deleted file mode 100644 index f59241797..000000000 --- a/sandbox/liferay-integration/portlets/dynamicWcd/docroot/view.jsp +++ /dev/null @@ -1,63 +0,0 @@ -<% -/** - * A portlet for rendering web content as identified by page parameters. - * Either "topic" for the ID of the article topic, or "article" and - * "group" for direct access. - */ -%> - -<%@ taglib uri="http://java.sun.com/portlet_2_0" prefix="portlet" %> -<%@ taglib uri="http://liferay.com/tld/ui" prefix="liferay-ui" %> - -<%@ page import="java.util.Map" %> -<%@ page import="net.ontopia.topicmaps.core.TopicMapIF" %> -<%@ page import="net.ontopia.topicmaps.query.utils.QueryWrapper" %> -<%@ page import="com.liferay.portlet.journal.model.JournalArticle" %> -<%@ page import="com.liferay.portlet.journal.service.JournalArticleLocalServiceUtil"%> -<%@ page import="tm.OntopiaAdapter"%> - - - -<% - // get the url as typed in by the user - String queryString = (String)renderRequest.getAttribute("javax.servlet.forward.query_string"); - - Map params = util.PortletUtils.parseQueryString(queryString); - String articleid = params.get("article"); - String groupid = params.get("group"); - String topicid = params.get("topic"); - - if (articleid == null && groupid == null && topicid == null) { -%> -

    No parameters provided. Need either article and group, or topic. -<% - return; - } - - // if a topic id is provided we use that to look up the article and group - // IDs - if (topicid != null) { - TopicMapIF tm = OntopiaAdapter.getInstance(true).getTopicMap(); - QueryWrapper w = new QueryWrapper(tm); - w.setDeclarations("using lr for i\"http://psi.ontopia.net/liferay/\" "); - - Map p = w.makeParams("id", topicid); - - articleid = w.queryForString("select $AID from " + - "object-id($topic, %id%), " + - "lr:article_id($topic, $AID)?", p); - - groupid = w.queryForString( - "select $GID from " + - "object-id($TOPIC, %id%), " + - "lr:contains($TOPIC : lr:containee, $GROUP : lr:container), " + - "lr:groupid($GROUP, $GID)?", p); - } - - long groupidNumber = Long.parseLong(groupid); - - JournalArticle article = JournalArticleLocalServiceUtil.getArticle(groupidNumber, articleid); - long articleResourcePrimKey = article.getResourcePrimKey(); - -%> - diff --git a/sandbox/liferay-integration/portlets/topicName/build.xml b/sandbox/liferay-integration/portlets/topicName/build.xml deleted file mode 100644 index fe7f500af..000000000 --- a/sandbox/liferay-integration/portlets/topicName/build.xml +++ /dev/null @@ -1,5 +0,0 @@ - - - - - \ No newline at end of file diff --git a/sandbox/liferay-integration/portlets/topicName/docroot/WEB-INF/liferay-display.xml b/sandbox/liferay-integration/portlets/topicName/docroot/WEB-INF/liferay-display.xml deleted file mode 100644 index c268b172a..000000000 --- a/sandbox/liferay-integration/portlets/topicName/docroot/WEB-INF/liferay-display.xml +++ /dev/null @@ -1,8 +0,0 @@ - - - - - - - - \ No newline at end of file diff --git a/sandbox/liferay-integration/portlets/topicName/docroot/WEB-INF/liferay-plugin-package.properties b/sandbox/liferay-integration/portlets/topicName/docroot/WEB-INF/liferay-plugin-package.properties deleted file mode 100644 index 4fcd6c203..000000000 --- a/sandbox/liferay-integration/portlets/topicName/docroot/WEB-INF/liferay-plugin-package.properties +++ /dev/null @@ -1,9 +0,0 @@ -name=Topic-Name -module-group-id=liferay -module-incremental-version=1 -tags= -short-description= -change-log= -page-url=http://www.liferay.com -author=Liferay, Inc. -licenses=MIT \ No newline at end of file diff --git a/sandbox/liferay-integration/portlets/topicName/docroot/WEB-INF/liferay-portlet.xml b/sandbox/liferay-integration/portlets/topicName/docroot/WEB-INF/liferay-portlet.xml deleted file mode 100644 index 3d67af9f6..000000000 --- a/sandbox/liferay-integration/portlets/topicName/docroot/WEB-INF/liferay-portlet.xml +++ /dev/null @@ -1,28 +0,0 @@ - - - - - - topicName - /icon.png - true - /css/test.css - /js/test.js - - - administrator - Administrator - - - guest - Guest - - - power-user - Power User - - - user - User - - \ No newline at end of file diff --git a/sandbox/liferay-integration/portlets/topicName/docroot/WEB-INF/portlet.xml b/sandbox/liferay-integration/portlets/topicName/docroot/WEB-INF/portlet.xml deleted file mode 100644 index 15e42c28c..000000000 --- a/sandbox/liferay-integration/portlets/topicName/docroot/WEB-INF/portlet.xml +++ /dev/null @@ -1,34 +0,0 @@ - - - - - topicName - Topic-Name - portlet.TopicNamePortlet - - view-jsp - /view.jsp - - 0 - - text/html - - - Topic-Name - Topic-Name - Topic-Name - - - administrator - - - guest - - - power-user - - - user - - - \ No newline at end of file diff --git a/sandbox/liferay-integration/portlets/topicName/docroot/WEB-INF/src/portlet/Configurator.java b/sandbox/liferay-integration/portlets/topicName/docroot/WEB-INF/src/portlet/Configurator.java deleted file mode 100644 index ff9792fe4..000000000 --- a/sandbox/liferay-integration/portlets/topicName/docroot/WEB-INF/src/portlet/Configurator.java +++ /dev/null @@ -1,138 +0,0 @@ - -package portlet; - -import java.util.Map; -import java.util.List; -import javax.portlet.RenderRequest; - -import com.liferay.portal.kernel.exception.SystemException; -import com.liferay.portal.kernel.util.WebKeys; -import com.liferay.portal.model.Layout; -import com.liferay.portal.model.PortletPreferences; -import com.liferay.portal.service.PortletPreferencesLocalServiceUtil; - -import net.ontopia.topicmaps.core.TopicMapIF; -import net.ontopia.topicmaps.core.TopicMapStoreIF; -import net.ontopia.topicmaps.entry.TopicMaps; -import net.ontopia.utils.OntopiaRuntimeException; - -import tm.OntopiaAdapter; - -/** - * Storage of configuration for the TopicName portlet and logic for - * looking up information in the topic map. - * - * @author mfi - */ -public class Configurator { - private String topicId; - - /** - * Stores a topic id String in Memory. - * Obsolete once PortletPreferences are used. - * - * @param tid The topic id to set - */ - public void setTopicId(String tid){ - topicId = tid; - } - - /** - * Returns a (previously set) topic id. - * Obsolete once PortletPreferences are used. - * - * @return The topic id which has been set, or null if none has been set. - */ - public String getTopicId(){ - return topicId; - } - - /** - * Parses the topic id out of the URL if it has been provided like - * ...?topicid=1234 for example - * - * @param renderRequest The request containing information about the - * context of the portlet and the URL - * @return A string containing the parsed topic id, or null if non - * could be found - */ - public String getTopicIdFromUrl(RenderRequest renderRequest){ - String queryString = (String) renderRequest.getAttribute("javax.servlet.forward.query_string"); - Map params = util.PortletUtils.parseQueryString(queryString); - return params.get("topic"); - } - - public String getTopicIdFromUrlByArticleId() { - // Not yet implemented but should be quite similar to the one in - // RelatedTopics. The only pain is if an article has more than - // one "tag" attached to it. Which one should be displayed? Or - // should this show information about the topic representing the - // article? - return null; - } - - /** - * Returns the topic id of the topic representing the - * article that's shown in the first available - * WebContentDisplay on the same page. Again, an article might have - * associations to more than one "concept" topic (tag). Which one - * should be displayed? Method needs be changed to handle this. - * - * If the topic representing the article itself should be displayed - * no further changes to this method are required. - * - * @param renderRequest The request containing information about the - * context of the portlet and the URL - * @return A String value containing the topic id of the topic - * representing the article that's being shown in the first - * available WebContentDisplay - */ - public String findTopicIdFromNextWCD(RenderRequest renderRequest){ - Layout layout = (Layout) renderRequest.getAttribute(WebKeys.LAYOUT); - if (layout == null) - throw new OntopiaRuntimeException("Unable to find layout for this page!"); - - String typesettings = layout.getTypeSettings(); // a string containing information about the portlets displayed on the page - String portletId=""; - // this brings us the first WebContentDisplay Portlet (identified - // by 56_INSTANCE_) on that page. Returns instance-id - portletId = typesettings.substring(typesettings.indexOf("56_INSTANCE_"), typesettings.indexOf("56_INSTANCE_")+"56_INSTANCE_".length()+4); - - try{ - // These objects contain useful information like the article id - // as a string - List pref = PortletPreferencesLocalServiceUtil.getPortletPreferences(layout.getPlid(), portletId); - // TODO:there can only be one hit at the moment (on this page - // there only is one wcd) - // FIXME FIXME FIXME: this must be made more robust - PortletPreferences pPrefs = (PortletPreferences) pref.get(0); - // unfortunately there is no getter for the article id - String preferences = pPrefs.getPreferences(); - // that's why I parse it out like this - String articleId = preferences.substring(preferences.lastIndexOf("article-id")+"article-id".length(), preferences.lastIndexOf("")).trim(); - - // Now we need to get the topicId for this article Id! and - // resolve the tags for it - return OntopiaAdapter.getInstance(true).getCurrentObjectIdForArticleId(articleId); - - } catch (SystemException se) { - // this SystemException is a liferay I don't know how to - // handle properly. - throw new OntopiaRuntimeException(se); - } - } - - /** - * Asks the integration for the name of the topicmap which is in use - * and returns a reference to it. - * - * @return A TopicMapIF object representing the topicmap which is - * used by the integration. - */ - public TopicMapIF getTopicmap(){ - String tmId = OntopiaAdapter.getInstance(true).getTopicMapId(); - TopicMapStoreIF store = TopicMaps.createStore(tmId, true); - return store.getTopicMap(); - } - -} diff --git a/sandbox/liferay-integration/portlets/topicName/docroot/WEB-INF/src/portlet/TopicNamePortlet.java b/sandbox/liferay-integration/portlets/topicName/docroot/WEB-INF/src/portlet/TopicNamePortlet.java deleted file mode 100644 index 41ccd7023..000000000 --- a/sandbox/liferay-integration/portlets/topicName/docroot/WEB-INF/src/portlet/TopicNamePortlet.java +++ /dev/null @@ -1,114 +0,0 @@ -/** - * This is controller for the view/edit/help jsps. - * It provides access to the portals api and provides the jsps with parameters - */ - -package portlet; - -import com.liferay.portal.kernel.log.Log; -import com.liferay.portal.kernel.log.LogFactoryUtil; - -import java.io.IOException; - -import javax.portlet.ActionRequest; -import javax.portlet.ActionResponse; -import javax.portlet.GenericPortlet; -import javax.portlet.PortletException; -import javax.portlet.PortletRequestDispatcher; -import javax.portlet.RenderRequest; -import javax.portlet.RenderResponse; - -import net.ontopia.topicmaps.core.TopicIF; -import net.ontopia.utils.OntopiaRuntimeException; - - -/** - * The logic for displaying information on a concept to the user. - * view.jsp is the place where most of the magic happens. - * - * @author mfi - */ -public class TopicNamePortlet extends GenericPortlet { - - public void init() throws PortletException { - editJSP = getInitParameter("edit-jsp"); - helpJSP = getInitParameter("help-jsp"); - viewJSP = getInitParameter("view-jsp"); - config = new Configurator(); - } - - public void doDispatch(RenderRequest renderRequest, RenderResponse renderResponse) throws IOException, PortletException { - - String jspPage = renderRequest.getParameter("jspPage"); - - if (jspPage != null) { - include(jspPage, renderRequest, renderResponse); - } else { - super.doDispatch(renderRequest, renderResponse); - } - } - - public void doEdit(RenderRequest renderRequest, RenderResponse renderResponse) throws IOException, PortletException { - - if (renderRequest.getPreferences() == null) { - super.doEdit(renderRequest, renderResponse); - } else { - include(editJSP, renderRequest, renderResponse); - } - } - - public void doHelp(RenderRequest renderRequest, RenderResponse renderResponse) throws IOException, PortletException { - - include(helpJSP, renderRequest, renderResponse); -} - - public void doView(RenderRequest renderRequest, RenderResponse renderResponse) throws IOException, PortletException { - - // 1. ask the configurator for the topic id - String topicId = config.getTopicId(); - if(topicId == null){ - // 2. try to parse topicId from Url - topicId = config.getTopicIdFromUrl(renderRequest); - if(topicId == null){ - // 3. Not sure if this makes any sense in this portlet, therefore commented out. - //topicId = config.getTopicIdFromUrlByArticleId(renderRequest); - if(topicId == null){ - // 4. Also not useful I think? Is there a use case where this would be of use? - //topicId = config.findTopicIdFromNextWCD(renderRequest); - } - } - } - - if (topicId != null) - renderRequest.setAttribute("topic", topicId); - - include(viewJSP, renderRequest, renderResponse); - } - - public void processAction(ActionRequest actionRequest, ActionResponse actionResponse) throws IOException, PortletException { - /* Here goes code for the handling of requests that are being made - * by using an actionURL. */ - } - - protected void include(String path, - RenderRequest renderRequest, - RenderResponse renderResponse) - throws IOException, PortletException { - - PortletRequestDispatcher portletRequestDispatcher = getPortletContext().getRequestDispatcher(path); - - if (portletRequestDispatcher == null) { - _log.error(path + " is not a valid include"); - } else { - portletRequestDispatcher.include(renderRequest, renderResponse); - } - } - - protected String editJSP; - protected String helpJSP; - protected String viewJSP; - private Configurator config; - - private static Log _log = LogFactoryUtil.getLog(TopicNamePortlet.class); - -} \ No newline at end of file diff --git a/sandbox/liferay-integration/portlets/topicName/docroot/WEB-INF/src/portlet/package.html b/sandbox/liferay-integration/portlets/topicName/docroot/WEB-INF/src/portlet/package.html deleted file mode 100644 index ca40cb534..000000000 --- a/sandbox/liferay-integration/portlets/topicName/docroot/WEB-INF/src/portlet/package.html +++ /dev/null @@ -1,10 +0,0 @@ - - - This package contains all the java code outside the JSPs for the TopicName JSP Portlet. -

      -
    • Configurator.java - offers methods for retrieving information on the configuration.
    • -
    • TopicNamePortlet.java - provides the control for the portlet.
    • -
    - \ No newline at end of file diff --git a/sandbox/liferay-integration/portlets/topicName/docroot/WEB-INF/sun-web.xml b/sandbox/liferay-integration/portlets/topicName/docroot/WEB-INF/sun-web.xml deleted file mode 100644 index d7e6d8556..000000000 --- a/sandbox/liferay-integration/portlets/topicName/docroot/WEB-INF/sun-web.xml +++ /dev/null @@ -1,11 +0,0 @@ - - - - /topicName - - - - Keep a copy of the generated servlet class' java code. - - - diff --git a/sandbox/liferay-integration/portlets/topicName/docroot/WEB-INF/web.xml b/sandbox/liferay-integration/portlets/topicName/docroot/WEB-INF/web.xml deleted file mode 100644 index 4e029134b..000000000 --- a/sandbox/liferay-integration/portlets/topicName/docroot/WEB-INF/web.xml +++ /dev/null @@ -1,5 +0,0 @@ - - - - - \ No newline at end of file diff --git a/sandbox/liferay-integration/portlets/topicName/docroot/css/test.css b/sandbox/liferay-integration/portlets/topicName/docroot/css/test.css deleted file mode 100644 index e69de29bb..000000000 diff --git a/sandbox/liferay-integration/portlets/topicName/docroot/icon.png b/sandbox/liferay-integration/portlets/topicName/docroot/icon.png deleted file mode 100644 index 807b862cf..000000000 Binary files a/sandbox/liferay-integration/portlets/topicName/docroot/icon.png and /dev/null differ diff --git a/sandbox/liferay-integration/portlets/topicName/docroot/js/test.js b/sandbox/liferay-integration/portlets/topicName/docroot/js/test.js deleted file mode 100644 index e69de29bb..000000000 diff --git a/sandbox/liferay-integration/portlets/topicName/docroot/view.jsp b/sandbox/liferay-integration/portlets/topicName/docroot/view.jsp deleted file mode 100644 index e04887815..000000000 --- a/sandbox/liferay-integration/portlets/topicName/docroot/view.jsp +++ /dev/null @@ -1,38 +0,0 @@ -<% -// View Jsp for TopicName Portlet. This page shows information on a given topic. -String tmid = tm.OntopiaAdapter.getInstance(false).getTopicMapId(); -%> - -<%@ taglib uri="http://java.sun.com/portlet_2_0" prefix="portlet" %> -<%@ taglib uri='http://psi.ontopia.net/jsp/taglib/tolog' prefix='tolog'%> -<%@ taglib uri="http://java.sun.com/jstl/core" prefix="c" %> - - - -<% - String topicid = (String) request.getAttribute("topic"); - String query = "object-id($topic, \"" + topicid + "\")?"; - - if (topicid != null) { -%> - - - - - - -

    -
    - - - TopicName: topic parameter as not been passed! - Please provide a topic id to this url! - -
    -
    - -<% - } else { -%>

    No topic ID found.

    - -<% } %> \ No newline at end of file diff --git a/sandbox/liferay-integration/portlets/yahooTree/build.xml b/sandbox/liferay-integration/portlets/yahooTree/build.xml deleted file mode 100644 index fe7f500af..000000000 --- a/sandbox/liferay-integration/portlets/yahooTree/build.xml +++ /dev/null @@ -1,5 +0,0 @@ - - - - - \ No newline at end of file diff --git a/sandbox/liferay-integration/portlets/yahooTree/docroot/WEB-INF/liferay-display.xml b/sandbox/liferay-integration/portlets/yahooTree/docroot/WEB-INF/liferay-display.xml deleted file mode 100644 index 8da0dd3e4..000000000 --- a/sandbox/liferay-integration/portlets/yahooTree/docroot/WEB-INF/liferay-display.xml +++ /dev/null @@ -1,8 +0,0 @@ - - - - - - - - \ No newline at end of file diff --git a/sandbox/liferay-integration/portlets/yahooTree/docroot/WEB-INF/liferay-plugin-package.properties b/sandbox/liferay-integration/portlets/yahooTree/docroot/WEB-INF/liferay-plugin-package.properties deleted file mode 100644 index 72596ba24..000000000 --- a/sandbox/liferay-integration/portlets/yahooTree/docroot/WEB-INF/liferay-plugin-package.properties +++ /dev/null @@ -1,9 +0,0 @@ -name=YahooTree -module-group-id=liferay -module-incremental-version=1 -tags= -short-description= -change-log= -page-url=http://www.liferay.com -author=Liferay, Inc. -licenses=MIT \ No newline at end of file diff --git a/sandbox/liferay-integration/portlets/yahooTree/docroot/WEB-INF/liferay-portlet.xml b/sandbox/liferay-integration/portlets/yahooTree/docroot/WEB-INF/liferay-portlet.xml deleted file mode 100644 index b2ef6d15d..000000000 --- a/sandbox/liferay-integration/portlets/yahooTree/docroot/WEB-INF/liferay-portlet.xml +++ /dev/null @@ -1,28 +0,0 @@ - - - - - - yahooTree - /icon.png - true - /css/test.css - /js/test.js - - - administrator - Administrator - - - guest - Guest - - - power-user - Power User - - - user - User - - \ No newline at end of file diff --git a/sandbox/liferay-integration/portlets/yahooTree/docroot/WEB-INF/portlet.xml b/sandbox/liferay-integration/portlets/yahooTree/docroot/WEB-INF/portlet.xml deleted file mode 100644 index 42599747b..000000000 --- a/sandbox/liferay-integration/portlets/yahooTree/docroot/WEB-INF/portlet.xml +++ /dev/null @@ -1,40 +0,0 @@ - - - - - yahooTree - YahooTree - portlet.YahooTreePortlet - - view-jsp - /view.jsp - - - edit-jsp - /edit.jsp - - 0 - - text/html - view - edit - - - YahooTree - YahooTree - ontopia - - - administrator - - - guest - - - power-user - - - user - - - \ No newline at end of file diff --git a/sandbox/liferay-integration/portlets/yahooTree/docroot/WEB-INF/src/portlet/Configurator.java b/sandbox/liferay-integration/portlets/yahooTree/docroot/WEB-INF/src/portlet/Configurator.java deleted file mode 100644 index 40a7792ff..000000000 --- a/sandbox/liferay-integration/portlets/yahooTree/docroot/WEB-INF/src/portlet/Configurator.java +++ /dev/null @@ -1,148 +0,0 @@ - -package portlet; - -import com.liferay.portal.kernel.exception.SystemException; -import com.liferay.portal.kernel.util.WebKeys; -import com.liferay.portal.model.Layout; -import com.liferay.portal.model.PortletPreferences; -import com.liferay.portal.service.PortletPreferencesLocalServiceUtil; - -import java.util.List; -import javax.portlet.RenderRequest; - -import net.ontopia.topicmaps.core.TopicMapIF; -import net.ontopia.topicmaps.core.TopicMapStoreIF; -import net.ontopia.topicmaps.entry.TopicMaps; -import net.ontopia.utils.OntopiaRuntimeException; - -import tm.OntopiaAdapter; - -/** - * Storage of configuration for the TopicName portlet and logic for - * looking up information in the topic map. - * - * @author mfi - */ -public class Configurator { - private String topicId; - - /** - * Stores a topic id String in Memory. - * Obsolete once PortletPreferences are used. - * - * @param tid The topic id to set - */ - public void setTopicId(String tid){ - topicId = tid; - } - - /** - * Returns a (previously set) topic id. - * Obsolete once PortletPreferences are used. - * - * @return The topic id which has been set, or null if none has been set. - */ - public String getTopicId(){ - return topicId; - } - - /** - * Parses the topic id out of the URL if it has been provided like - * ...?topicid=1234 for example - * - * @param renderRequest The request containing information about the - * context of the portlet and the URL - * @return A string containing the parsed topic id, or null if non - * could be found - */ - public String getTopicIdFromUrl(RenderRequest renderRequest){ - // FIXME: should make a utility method for this! - // manually parsing the topic id from the url - String queryString = (String) renderRequest.getAttribute("javax.servlet.forward.query_string"); - if(queryString != null){ - String result = queryString.substring(queryString.lastIndexOf("topic=")+"topic=".length()); // get to the topic id number - if(result.indexOf("&") != -1){ // there are more parameters - result = result.substring(0, result.indexOf("&")); // the next ampersand is the delimiter for the topic id - return result; - } else { // no more parameters, that means we are at the end of the url - return result; - } - } else { - return null; - } - } - - public String getTopicIdFromUrlByArticleId() { - // Not yet implemented but should be quite similar to the one in - // RelatedTopics. The only pain is if an article has more than - // one "tag" attached to it. Which one should be displayed? Or - // should this show information about the topic representing the - // article? - return null; - } - - /** - * Returns the topic id of the topic representing the - * article that's shown in the first available - * WebContentDisplay on the same page. Again, an article might have - * associations to more than one "concept" topic (tag). Which one - * should be displayed? Method needs be changed to handle this. - * - * If the topic representing the article itself should be displayed - * no further changes to this method are required. - * - * @param renderRequest The request containing information about the - * context of the portlet and the URL - * @return A String value containing the topic id of the topic - * representing the article that's being shown in the first - * available WebContentDisplay - */ - public String findTopicIdFromNextWCD(RenderRequest renderRequest){ - Layout layout = (Layout) renderRequest.getAttribute(WebKeys.LAYOUT); - if (layout == null) - throw new OntopiaRuntimeException("Unable to find layout for this page!"); - - String typesettings = layout.getTypeSettings(); // a string containing information about the portlets displayed on the page - String portletId=""; - // this brings us the first WebContentDisplay Portlet (identified - // by 56_INSTANCE_) on that page. Returns instance-id - portletId = typesettings.substring(typesettings.indexOf("56_INSTANCE_"), typesettings.indexOf("56_INSTANCE_")+"56_INSTANCE_".length()+4); - - try{ - // These objects contain useful information like the article id - // as a string - List pref = PortletPreferencesLocalServiceUtil.getPortletPreferences(layout.getPlid(), portletId); - // TODO:there can only be one hit at the moment (on this page - // there only is one wcd) - // FIXME FIXME FIXME: this must be made more robust - PortletPreferences pPrefs = (PortletPreferences) pref.get(0); - // unfortunately there is no getter for the article id - String preferences = pPrefs.getPreferences(); - // that's why I parse it out like this - String articleId = preferences.substring(preferences.lastIndexOf("article-id")+"article-id".length(), preferences.lastIndexOf("")).trim(); - - // Now we need to get the topicId for this article Id! and - // resolve the tags for it - return OntopiaAdapter.getInstance(true).getCurrentObjectIdForArticleId(articleId); - - } catch (SystemException se) { - // this SystemException is a liferay I don't know how to - // handle properly. - throw new OntopiaRuntimeException(se); - } - } - - /** - * Asks the integration for the name of the topicmap which is in use - * and returns a reference to it. - * - * @return A TopicMapIF object representing the topicmap which is - * used by the integration. - */ - public TopicMapIF getTopicmap(){ - String tmId = OntopiaAdapter.getInstance(true).getTopicMapId(); - TopicMapStoreIF store = TopicMaps.createStore(tmId, true); - return store.getTopicMap(); - } - -} diff --git a/sandbox/liferay-integration/portlets/yahooTree/docroot/WEB-INF/src/portlet/YahooTreePortlet.java b/sandbox/liferay-integration/portlets/yahooTree/docroot/WEB-INF/src/portlet/YahooTreePortlet.java deleted file mode 100644 index 6febf5950..000000000 --- a/sandbox/liferay-integration/portlets/yahooTree/docroot/WEB-INF/src/portlet/YahooTreePortlet.java +++ /dev/null @@ -1,115 +0,0 @@ -/** - * This is controller for the view/edit/help jsps. - * It provides access to the portals api and provides the jsps with parameters - */ - -package portlet; - -import com.liferay.portal.kernel.log.Log; -import com.liferay.portal.kernel.log.LogFactoryUtil; - -import java.io.IOException; - -import javax.portlet.ActionRequest; -import javax.portlet.ActionResponse; -import javax.portlet.GenericPortlet; -import javax.portlet.PortletException; -import javax.portlet.PortletRequestDispatcher; -import javax.portlet.RenderRequest; -import javax.portlet.RenderResponse; -import javax.portlet.PortletPreferences; - -import net.ontopia.topicmaps.core.TopicIF; -import net.ontopia.utils.OntopiaRuntimeException; - -/** - * The logic for displaying information on a concept to the user. - * view.jsp is the place where most of the magic happens. - * - * @author mfi - */ -public class YahooTreePortlet extends GenericPortlet { - protected String editJSP; - protected String helpJSP; - protected String viewJSP; - private Configurator config; - - private static Log _log = LogFactoryUtil.getLog(YahooTreePortlet.class); - - public void init() throws PortletException { - editJSP = getInitParameter("edit-jsp"); - helpJSP = getInitParameter("help-jsp"); - viewJSP = getInitParameter("view-jsp"); - config = new Configurator(); - } - - public void doDispatch(RenderRequest renderRequest, - RenderResponse renderResponse) - throws IOException, PortletException { - - String jspPage = renderRequest.getParameter("jspPage"); - - if (jspPage != null) - include(jspPage, renderRequest, renderResponse); - else - super.doDispatch(renderRequest, renderResponse); - } - - public void doEdit(RenderRequest renderRequest, - RenderResponse renderResponse) - throws IOException, PortletException { - - if (renderRequest.getPreferences() == null) - super.doEdit(renderRequest, renderResponse); - else - include(editJSP, renderRequest, renderResponse); - } - - public void doHelp(RenderRequest renderRequest, - RenderResponse renderResponse) - throws IOException, PortletException { - - include(helpJSP, renderRequest, renderResponse); - } - - public void doView(RenderRequest request, - RenderResponse renderResponse) - throws IOException, PortletException { - - // transfer preferences into request attributes - PortletPreferences prefs = request.getPreferences(); - request.setAttribute("topquery", prefs.getValue("topquery", "")); - request.setAttribute("childquery", prefs.getValue("childquery", "")); - request.setAttribute("columns", prefs.getValue("columns", "")); - - include(viewJSP, request, renderResponse); - } - - public void processAction(ActionRequest actionRequest, - ActionResponse actionResponse) - throws IOException, PortletException { - - String topquery = actionRequest.getParameter("topquery"); - String childquery = actionRequest.getParameter("childquery"); - String columns = actionRequest.getParameter("columns"); - - PortletPreferences prefs = actionRequest.getPreferences(); - prefs.setValue("topquery", topquery); - prefs.setValue("childquery", childquery); - prefs.setValue("columns", columns); - - prefs.store(); - } - - protected void include(String path, RenderRequest renderRequest, - RenderResponse renderResponse) - throws IOException, PortletException { - - PortletRequestDispatcher portletRequestDispatcher = getPortletContext().getRequestDispatcher(path); - - if (portletRequestDispatcher == null) - _log.error(path + " is not a valid include"); - else - portletRequestDispatcher.include(renderRequest, renderResponse); - } -} \ No newline at end of file diff --git a/sandbox/liferay-integration/portlets/yahooTree/docroot/WEB-INF/src/portlet/package.html b/sandbox/liferay-integration/portlets/yahooTree/docroot/WEB-INF/src/portlet/package.html deleted file mode 100644 index ca40cb534..000000000 --- a/sandbox/liferay-integration/portlets/yahooTree/docroot/WEB-INF/src/portlet/package.html +++ /dev/null @@ -1,10 +0,0 @@ - - - This package contains all the java code outside the JSPs for the TopicName JSP Portlet. -
      -
    • Configurator.java - offers methods for retrieving information on the configuration.
    • -
    • TopicNamePortlet.java - provides the control for the portlet.
    • -
    - \ No newline at end of file diff --git a/sandbox/liferay-integration/portlets/yahooTree/docroot/WEB-INF/sun-web.xml b/sandbox/liferay-integration/portlets/yahooTree/docroot/WEB-INF/sun-web.xml deleted file mode 100644 index 8a039aefc..000000000 --- a/sandbox/liferay-integration/portlets/yahooTree/docroot/WEB-INF/sun-web.xml +++ /dev/null @@ -1,11 +0,0 @@ - - - - /yahooTree - - - - Keep a copy of the generated servlet class' java code. - - - diff --git a/sandbox/liferay-integration/portlets/yahooTree/docroot/WEB-INF/web.xml b/sandbox/liferay-integration/portlets/yahooTree/docroot/WEB-INF/web.xml deleted file mode 100644 index 4e029134b..000000000 --- a/sandbox/liferay-integration/portlets/yahooTree/docroot/WEB-INF/web.xml +++ /dev/null @@ -1,5 +0,0 @@ - - - - - \ No newline at end of file diff --git a/sandbox/liferay-integration/portlets/yahooTree/docroot/css/test.css b/sandbox/liferay-integration/portlets/yahooTree/docroot/css/test.css deleted file mode 100644 index 0bbac51c2..000000000 --- a/sandbox/liferay-integration/portlets/yahooTree/docroot/css/test.css +++ /dev/null @@ -1,13 +0,0 @@ - -/* not sure if this has any effect, but it's worth a try */ -table.yahoo-tree td { - vertical-align: top; - padding-right: 2em; - padding-bottom: 2em; - align: left; -} - -div.toplevel { - font-weight: bold; - font-size: 140%; -} \ No newline at end of file diff --git a/sandbox/liferay-integration/portlets/yahooTree/docroot/edit.jsp b/sandbox/liferay-integration/portlets/yahooTree/docroot/edit.jsp deleted file mode 100644 index 4a7ea1f49..000000000 --- a/sandbox/liferay-integration/portlets/yahooTree/docroot/edit.jsp +++ /dev/null @@ -1,49 +0,0 @@ -<%-- - - Provides a simple interface for configuring the portlet. - ---%> - -<%@page contentType="text/html" pageEncoding="UTF-8"%> -<%@ taglib uri="http://java.sun.com/portlet_2_0" prefix="portlet" %> -<%@page import="portlet.Configurator"%> -<%@page import="java.util.Set"%> -<%@page import="java.util.Iterator"%> -<%@ page import="javax.portlet.PortletURL" %> -<%@ page import="javax.portlet.RenderResponse" %> -<%@ page import="javax.portlet.RenderRequest" %> -<%@ page import="javax.portlet.PortletPreferences" %> - -<% -RenderResponse portletResponse = (RenderResponse)request.getAttribute("javax.portlet.response"); -PortletURL actionUrl = portletResponse.createActionURL(); - -RenderRequest renderRequest = (RenderRequest) request.getAttribute("javax.portlet.request"); -PortletPreferences prefs = renderRequest.getPreferences(); - -String topquery = prefs.getValue("topquery", ""); -String childquery = prefs.getValue("childquery", ""); -String columns = prefs.getValue("columns", ""); - -%> - -
    Preferences:
    - -
    - - -<% - int colno; - for (colno = 0; colno < row.size(); colno++) { - YahooTree.TreeNode node = row.get(colno); - String url = util.PortletUtils.makeLinkTo(node.getTopic()); -%> -
    Top query: - - -
    Child query: - - -
    Columns: - - -
    - - diff --git a/sandbox/liferay-integration/portlets/yahooTree/docroot/icon.png b/sandbox/liferay-integration/portlets/yahooTree/docroot/icon.png deleted file mode 100644 index 807b862cf..000000000 Binary files a/sandbox/liferay-integration/portlets/yahooTree/docroot/icon.png and /dev/null differ diff --git a/sandbox/liferay-integration/portlets/yahooTree/docroot/js/test.js b/sandbox/liferay-integration/portlets/yahooTree/docroot/js/test.js deleted file mode 100644 index e69de29bb..000000000 diff --git a/sandbox/liferay-integration/portlets/yahooTree/docroot/view.jsp b/sandbox/liferay-integration/portlets/yahooTree/docroot/view.jsp deleted file mode 100644 index ca94ff035..000000000 --- a/sandbox/liferay-integration/portlets/yahooTree/docroot/view.jsp +++ /dev/null @@ -1,66 +0,0 @@ -<%@page import="java.util.*, - net.ontopia.utils.StringifierIF, - net.ontopia.topicmaps.utils.*, - net.ontopia.topicmaps.nav2.portlets.pojos.YahooTree, - net.ontopia.topicmaps.core.*, - javax.portlet.PortletPreferences"%> -<% -// View Jsp for YahooTreePortlet. Shows the top two levels of a hierarchy, -%> - -<%@ taglib uri="http://java.sun.com/portlet_2_0" prefix="portlet" %> - - - - -<% - PortletPreferences prefs = renderRequest.getPreferences(); - TopicMapIF topicmap = tm.OntopiaAdapter.getInstance(true).getTopicMap(); - StringifierIF strify = TopicStringifiers.getDefaultStringifier(); - - YahooTree yt = new YahooTree(); - if (prefs.getValue("topquery", "").equals("") || - prefs.getValue("childquery", "").equals("")) { -%> -

    Portlet not configured. -

    -<% - return; - } - yt.setTopQuery(prefs.getValue("topquery", "")); - yt.setChildQuery(prefs.getValue("childquery", "")); - yt.setColumns(Integer.parseInt(prefs.getValue("columns", "5"))); - - List> rows = yt.makeModel(topicmap); - for (int rowno = 0; rowno < rows.size(); rowno++) { - List row = rows.get(rowno); -%> -
    - -<% - for (TopicIF child : node.getChildren()) { - url = util.PortletUtils.makeLinkTo(child); -%> - <%= strify.toString(child) %> -<% - } - } - - // producing empty columns to fill out last row, if necessary - for (; colno < yt.getColumns(); colno++) { -%> -   -<% - } - } -%> -
    - diff --git a/sandbox/maven/ontopia-classify/pom.xml b/sandbox/maven/ontopia-classify/pom.xml deleted file mode 100644 index ecb8f4054..000000000 --- a/sandbox/maven/ontopia-classify/pom.xml +++ /dev/null @@ -1,258 +0,0 @@ - - - 4.0.0 - - net.ontopia - ontopia-classify - jar - 5.1.0-b1 - Ontopia Classify - Ontopia Classify. - http://todo - - - - net.ontopia - ontopia-core - 5.1.0-b1 - - - net.ontopia - ontopia-test-bootstrap - 5.1.0-b1 - test - - - net.ontopia - ontopia-navigator - 5.1.0-b1 - - - - - - - - - - commons-fileupload - commons-fileupload - 1.1 - - - - - - - - - - - - - - - - - - - - - - net.sf.opencsv - opencsv - 1.8 - - - - javax.servlet - jsp-api - 2.0 - provided - - - - - - - org.apache.lucene - lucene-snowball - 2.0.0 - - - org.apache.poi - poi - 3.2-FINAL - - - org.apache.poi - poi-scratchpad - 3.2-FINAL - - - pdfbox - pdfbox - 0.7.3 - - - org.ccil.cowan.tagsoup - tagsoup - 1.2 - - - - - ../../../ontopia/src/ - ../../../ontopia/src/ - - - - org.apache.maven.plugins - maven-compiler-plugin - 2.0.2 - - 1.5 - 1.5 - - - - **/net/ontopia/topicmaps/classify/*.java - - - - - - **/net/ontopia/topicmaps/classify/test/**/*.java - - - - - - - - - diff --git a/sandbox/maven/ontopia-core/pom.xml b/sandbox/maven/ontopia-core/pom.xml deleted file mode 100644 index ed3e25b94..000000000 --- a/sandbox/maven/ontopia-core/pom.xml +++ /dev/null @@ -1,507 +0,0 @@ - - - 4.0.0 - - - ontopia-parent - net.ontopia - 5.1.0-b1 - - - ontopia-core - jar - Ontopia Core - Ontopia Core. - - - - - - org.tmapi - tmapi - 2.0 - - - gnu.trove - trove4j - 2.0.4 - - - com.thaiopensource - jing - 20030619 - - - commons-dbcp - commons-dbcp - 1.2.2 - - - commons-collections - commons-collections - 3.2.1 - - - - - urbanophile - java-getopt - 1.0.9 - - - - - - - org.slf4j - slf4j-log4j12 - 1.5.11 - test - - - - - org.slf4j - jcl-over-slf4j - 1.5.11 - - - antlr - antlr - 2.7.7 - - - concurrent - concurrent - 1.3.4 - - - junit - junit - 3.8.2 - test - - - - net.sourceforge.jena - jena - 2.3 - - - xmlbeans - xmlbeans-jsr173-api - - - - - backport-util-concurrent - backport-util-concurrent - 3.1 - - - jgroups - jgroups - 2.6.10.GA - - - org.hibernate - jtidy - r8-20060801 - - - de.jflex - jflex - 1.4.3 - provided - - - - javax.servlet - servlet-api - 2.4 - provided - - - - - - - lucene - lucene - 1.4.3 - - - - - - - - - - ../../../ontopia/src/ - ../../../ontopia/src/ - - - - org.apache.maven.plugins - maven-compiler-plugin - 2.0.2 - - 1.5 - 1.5 - - - - **/net/ontopia/Ontopia.java - **/net/ontopia/product/*.java - **/net/ontopia/net/*.java - **/net/ontopia/net/data/*.java - **/net/ontopia/utils/*.java - **/net/ontopia/xml/*.java - **/net/ontopia/infoset/core/*.java - **/net/ontopia/infoset/utils/*.java - **/net/ontopia/infoset/impl/basic/*.java - **/net/ontopia/topicmaps/core/*.java - **/net/ontopia/topicmaps/core/index/*.java - **/net/ontopia/topicmaps/core/events/*.java - **/net/ontopia/topicmaps/entry/*.java - **/net/ontopia/topicmaps/helpers/*.java - **/net/ontopia/topicmaps/utils/*.java - **/net/ontopia/topicmaps/utils/ltm/*.java - **/net/ontopia/topicmaps/utils/ctm/*.java - **/net/ontopia/topicmaps/utils/rdf/*.java - **/net/ontopia/topicmaps/utils/xfml/*.java - **/net/ontopia/topicmaps/utils/tmrap/*.java - **/net/ontopia/topicmaps/impl/utils/*.java - **/net/ontopia/topicmaps/impl/basic/*.java - **/net/ontopia/topicmaps/impl/remote/*.java - **/net/ontopia/topicmaps/impl/basic/index/*.java - - **/net/ontopia/topicmaps/xml/*.java - **/net/ontopia/topicmaps/cmdlineutils/**/*.java - - - - **/net/ontopia/topicmaps/impl/tmapi2/**/*.java - - - **/net/ontopia/topicmaps/query/core/*.java - **/net/ontopia/topicmaps/query/parser/*.java - **/net/ontopia/topicmaps/query/utils/*.java - **/net/ontopia/topicmaps/query/impl/utils/*.java - - **/net/ontopia/topicmaps/query/impl/basic/*.java - - **/net/ontopia/topicmaps/query/impl/rdbms/*.java - - **/net/ontopia/topicmaps/query/spi/*.java - - - **/net/ontopia/topicmaps/schema/**/*.java - - - **/net/ontopia/infoset/fulltext/core/*.java - **/net/ontopia/infoset/fulltext/impl/lucene/*.java - - **/net/ontopia/infoset/fulltext/impl/rdbms/*.java - - **/net/ontopia/infoset/fulltext/topicmaps/*.java - - **/net/ontopia/infoset/fulltext/topicmaps/nav/plugins/*.java - - **/net/ontopia/infoset/fulltext/utils/*.java - - - **/net/ontopia/persistence/proxy/*.java - **/net/ontopia/persistence/query/sql/*.java - **/net/ontopia/persistence/query/jdo/*.java - **/net/ontopia/persistence/rdbms/*.java - **/net/ontopia/persistence/jdbcspy/*.java - **/net/ontopia/topicmaps/impl/rdbms/*.java - **/net/ontopia/topicmaps/impl/rdbms/index/*.java - - **/net/ontopia/topicmaps/cmdlineutils/rdbms/*.java - - - - **/net/ontopia/infoset/content/*.java - - - **/net/ontopia/topicmaps/nav/utils/deciders/TMExporterDecider.java - - - **/net/ontopia/topicmaps/webed/impl/basic/ActionValidationException.java - - - - - **/net/ontopia/topicmaps/webed/core/ActionRuntimeException.java - - - - - - **/net/ontopia/topicmaps/cmdlineutils/test/*.java - - **/net/ontopia/topicmaps/impl/tmapi2/test/**/*.java - - **/net/ontopia/topicmaps/schema/**/test/*.java - - **/net/ontopia/infoset/fulltext/topicmaps/nav/plugins/FulltextPlugin.java - - - - **/net/ontopia/topicmaps/utils/tmrap/RAPServlet.java - - - - **/net/ontopia/topicmaps/utils/tmrap/TMRAPImplementation.java - - - - - **/net/ontopia/topicmaps/schema/impl/osl/nav/plugins/ValidationPlugin.java - - - - - **/net/ontopia/infoset/content/ContentStoreServlet.java - - - - - **/net/ontopia/test/*.java - **/net/ontopia/net/data/test/*.java - **/net/ontopia/test/threads/*.java - **/net/ontopia/test/threads/action/*.java - **/net/ontopia/test/threads/target/*.java - **/net/ontopia/utils/test/*.java - **/net/ontopia/xml/test/*.java - **/net/ontopia/infoset/impl/basic/test/*.java - **/net/ontopia/topicmaps/test/AbstractTopicMapTestCase.java - - **/net/ontopia/topicmaps/core/test/*.java - **/net/ontopia/topicmaps/core/index/test/*.java - - **/net/ontopia/topicmaps/core/events/test/*.java - - **/net/ontopia/topicmaps/entry/test/*.java - **/net/ontopia/topicmaps/xml/test/*.java - **/net/ontopia/topicmaps/impl/basic/test/*.java - - **/net/ontopia/topicmaps/impl/basic/index/test/*.java - - **/net/ontopia/topicmaps/impl/utils/test/*.java - - **/net/ontopia/topicmaps/utils/test/*.java - **/net/ontopia/topicmaps/utils/rdf/test/*.java - **/net/ontopia/topicmaps/utils/ltm/test/*.java - **/net/ontopia/topicmaps/utils/ctm/test/*.java - **/net/ontopia/topicmaps/utils/tmrap/test/**/*.java - - **/net/ontopia/topicmaps/cmdlineutils/test/*.java - - **/net/ontopia/test/perf/*.java - **/net/ontopia/net/data/test/*.java - - - **/net/ontopia/infoset/content/test/*.java - - - **/net/ontopia/topicmaps/nav/utils/deciders/TMDecider.java - - - - - **/net/ontopia/topicmaps/utils/tmrap/test/TestRemoteTopicIndex.java - - **/net/ontopia/topicmaps/utils/tmrap/test/TMRAPTestGenerator.java - - **/net/ontopia/topicmaps/utils/tmrap/test/TestTMRAPOperation.java - - **/net/ontopia/topicmaps/utils/tmrap/test/TestDeleteTopic.java - - **/net/ontopia/topicmaps/utils/tmrap/test/TestGetTopic.java - - **/net/ontopia/topicmaps/utils/tmrap/test/TestAddFragment.java - - - - - - - - org.apache.maven.plugins - maven-surefire-plugin - - -Dnet.ontopia.test.root=../test-data - - - - - - - - org.apache.maven.plugins - maven-antrun-plugin - - - generate-sources - - - - - - - - - Compiling LTM grammar... - - - - - Compiling CTM grammar... - - - - - - Compiling tolog grammar... - - - - - - Compiling TMAPI code... - - - - - - run - - - - - - - - - Ontopia - http://ontopia.googlecode.com/svn/maven-repository - - - org.tmapi - TMAPI.org repository - http://www.tmapi.org/maven-repository - - - - diff --git a/sandbox/maven/ontopia-db2tm/pom.xml b/sandbox/maven/ontopia-db2tm/pom.xml deleted file mode 100644 index a736d5403..000000000 --- a/sandbox/maven/ontopia-db2tm/pom.xml +++ /dev/null @@ -1,268 +0,0 @@ - - - 4.0.0 - - - ontopia-parent - net.ontopia - 5.1.0-b1 - - - ontopia-db2tm - jar - Ontopia DB2TM - Ontopia DB2TM. - - - - net.ontopia - ontopia-core - ${project.version} - - - net.ontopia - ontopia-test-bootstrap - ${project.version} - test - - - net.ontopia - ontopia-navigator - ${project.version} - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - net.sf.opencsv - opencsv - 1.8 - - - - javax.servlet - jsp-api - 2.0 - provided - - - - - - - - - - - - - - ../../../ontopia/src/ - ../../../ontopia/src/ - - - - org.apache.maven.plugins - maven-compiler-plugin - 2.0.2 - - 1.5 - 1.5 - - - - **/net/ontopia/topicmaps/db2tm/*.java - - - - - - **/net/ontopia/topicmaps/db2tm/test/**/*.java - - - - - - org.apache.maven.plugins - maven-surefire-plugin - - -Dnet.ontopia.test.root=../test-data - - - - - - - diff --git a/sandbox/maven/ontopia-navigator/pom.xml b/sandbox/maven/ontopia-navigator/pom.xml deleted file mode 100644 index 8315df2d3..000000000 --- a/sandbox/maven/ontopia-navigator/pom.xml +++ /dev/null @@ -1,304 +0,0 @@ - - - 4.0.0 - - - ontopia-parent - net.ontopia - 5.1.0-b1 - - - ontopia-navigator - jar - Ontopia Navigator - Ontopia Navigator. - - - - net.ontopia - ontopia-core - ${project.version} - - - net.ontopia - ontopia-test-bootstrap - ${project.version} - test - - - - - - - - - - - - - - - - - org.slf4j - slf4j-log4j12 - 1.5.8 - - - - - - - - - - - - - - - - - javax.servlet - jsp-api - 2.0 - provided - - - - - - - - - - - - - - ../../../ontopia/src/ - ../../../ontopia/src/ - - - - org.apache.maven.plugins - maven-compiler-plugin - 2.0.2 - - 1.5 - 1.5 - - - - **/net/ontopia/utils/ontojsp/*.java - **/net/ontopia/topicmaps/nav2/core/*.java - **/net/ontopia/topicmaps/nav2/utils/*.java - **/net/ontopia/topicmaps/nav2/impl/basic/*.java - **/net/ontopia/topicmaps/nav2/impl/framework/*.java - **/net/ontopia/topicmaps/nav2/taglibs/logic/*.java - **/net/ontopia/topicmaps/nav2/taglibs/output/*.java - **/net/ontopia/topicmaps/nav2/taglibs/value/*.java - **/net/ontopia/topicmaps/nav2/taglibs/TMvalue/*.java - **/net/ontopia/topicmaps/nav2/taglibs/framework/*.java - **/net/ontopia/topicmaps/nav2/taglibs/tolog/*.java - **/net/ontopia/topicmaps/nav2/plugins/*.java - **/net/ontopia/topicmaps/nav2/servlets/*.java - **/net/ontopia/topicmaps/nav2/appservers/**/*.java - **/net/ontopia/topicmaps/nav2/webapps/**/*.java - - - **/net/ontopia/topicmaps/nav/context/*.java - **/net/ontopia/topicmaps/nav/taglibs/template/*.java - **/net/ontopia/topicmaps/nav/utils/comparators/*.java - **/net/ontopia/topicmaps/nav/utils/deciders/*.java - **/net/ontopia/topicmaps/nav/utils/stringifiers/ComparatorNameStringifier.java - - - **/net/ontopia/topicmaps/nav2/portlets/taglib/*.java - **/net/ontopia/topicmaps/nav2/portlets/pojos/*.java - - - **/net/ontopia/topicmaps/webed/impl/basic/Constants.java - - - - **/net/ontopia/topicmaps/nav2/webapps/ontopoly/**/*.java - **/net/ontopia/topicmaps/nav2/**/test/*.java - - **/net/ontopia/topicmaps/nav2/portlets/taglib/RelatedTag.java - - - - - - - **/net/ontopia/utils/fakeJSP/*.java - **/net/ontopia/topicmaps/nav2/impl/basic/test/*.java - **/net/ontopia/topicmaps/nav2/impl/framework/test/*.java - **/net/ontopia/topicmaps/nav2/plugins/test/*.java - **/net/ontopia/topicmaps/nav2/utils/test/*.java - **/net/ontopia/topicmaps/nav2/portlets/pojos/test/*.java - - - - - - org.apache.maven.plugins - maven-surefire-plugin - - -Dnet.ontopia.test.root=../test-data - - - - - - - diff --git a/sandbox/maven/ontopia-realm/pom.xml b/sandbox/maven/ontopia-realm/pom.xml deleted file mode 100644 index 092703cd5..000000000 --- a/sandbox/maven/ontopia-realm/pom.xml +++ /dev/null @@ -1,42 +0,0 @@ - - 4.0.0 - net.ontopia - ontopia-realm - jar - 1.0-SNAPSHOT - Ontopia Realm - http://maven.apache.org - - - junit - junit - 4.7 - test - - - org.slf4j - slf4j-api - 1.5.8 - - - net.ontopia - ontopia-engine - 5.0.2 - - - - - - org.apache.maven.plugins - maven-compiler-plugin - - 1.5 - 1.5 - - - - - - - diff --git a/sandbox/maven/ontopia-realm/src/main/java/net/ontopia/topicmaps/nav2/realm/RolePrincipal.java b/sandbox/maven/ontopia-realm/src/main/java/net/ontopia/topicmaps/nav2/realm/RolePrincipal.java deleted file mode 100644 index 01827a3c8..000000000 --- a/sandbox/maven/ontopia-realm/src/main/java/net/ontopia/topicmaps/nav2/realm/RolePrincipal.java +++ /dev/null @@ -1,55 +0,0 @@ - -// $Id: RolePrincipal.java,v 1.2 2006/01/12 11:10:48 larsga Exp $ - -package net.ontopia.topicmaps.nav2.realm; - -import java.io.Serializable; -import java.security.Principal; - -import org.slf4j.Logger; -import org.slf4j.LoggerFactory; - -public class RolePrincipal implements Principal, Serializable { - - public static final long serialVersionUID = 502L; - - // initialization of logging facility - private static Logger log = LoggerFactory.getLogger(RolePrincipal.class.getName()); - - private String name; - - public RolePrincipal(String name) { - if (name == null) - throw new NullPointerException("illegal null input"); - this.name = name; - } - - public String getName() { - return name; - } - - @Override - public String toString() { - return("RolePrincipal: " + name); - } - - @Override - public boolean equals(Object o) { - if (o == null) - return false; - - if (this == o) - return true; - - if (!(o instanceof RolePrincipal)) - return false; - - RolePrincipal that = (RolePrincipal) o; - return getName().equals(that.getName()); - } - - @Override - public int hashCode() { - return name.hashCode(); - } -} diff --git a/sandbox/maven/ontopia-realm/src/main/java/net/ontopia/topicmaps/nav2/realm/TMLoginModule.java b/sandbox/maven/ontopia-realm/src/main/java/net/ontopia/topicmaps/nav2/realm/TMLoginModule.java deleted file mode 100644 index c13d6b1f9..000000000 --- a/sandbox/maven/ontopia-realm/src/main/java/net/ontopia/topicmaps/nav2/realm/TMLoginModule.java +++ /dev/null @@ -1,374 +0,0 @@ - -// $Id: TMLoginModule.java,v 1.32 2007/08/27 15:36:00 geir.gronmo Exp $ - -package net.ontopia.topicmaps.nav2.realm; - -import java.util.ArrayList; -import java.util.Collection; -import java.util.Collections; -import java.util.Iterator; -import java.util.List; -import java.util.Map; -import java.util.HashMap; -import java.util.HashSet; -import java.security.Principal; -import java.security.MessageDigest; -import javax.security.auth.Subject; -import javax.security.auth.callback.Callback; -import javax.security.auth.callback.CallbackHandler; -import javax.security.auth.callback.NameCallback; -import javax.security.auth.callback.PasswordCallback; -import javax.security.auth.callback.UnsupportedCallbackException; -import javax.security.auth.login.LoginException; -import javax.security.auth.spi.LoginModule; - -import net.ontopia.net.Base64Encoder; -import net.ontopia.topicmaps.entry.SharedStoreRegistry; -import net.ontopia.topicmaps.entry.TopicMapReferenceIF; -import net.ontopia.topicmaps.entry.TopicMapRepositoryIF; -import net.ontopia.topicmaps.entry.TopicMaps; -import net.ontopia.topicmaps.core.TopicIF; -import net.ontopia.topicmaps.core.TopicMapIF; -import net.ontopia.topicmaps.core.TopicMapStoreIF; -import net.ontopia.topicmaps.core.TMObjectIF; -import net.ontopia.topicmaps.nav2.utils.NavigatorUtils; -import net.ontopia.topicmaps.nav2.impl.basic.NavigatorApplication; -import net.ontopia.topicmaps.query.core.QueryProcessorIF; -import net.ontopia.topicmaps.query.core.QueryResultIF; -import net.ontopia.topicmaps.query.core.InvalidQueryException; -import net.ontopia.topicmaps.query.utils.QueryUtils; -import net.ontopia.utils.OntopiaRuntimeException; - -import org.slf4j.Logger; -import org.slf4j.LoggerFactory; - -/** - * INTERNAL: TMLoginModule provides authentication to web applications by - * checking user credentials against information stored in a topicmap. - */ -public class TMLoginModule implements LoginModule { - - // initialization of logging facility - private static Logger log = LoggerFactory.getLogger(TMLoginModule.class.getName()); - - // state obtained in the initialize() method - private Subject subject; - private CallbackHandler callbackHandler; - private Map sharedState; - private Map options; - - // the authentication status - private boolean loginSucceeded; - private boolean commitSucceeded; - - // username, password and hash method - private String username; - private String password; - private String hashMethod; - - // principals - private Principal userPrincipal; - private List rolePrincipals; - - private String jndiname; - protected String topicmapId; - private String repositoryId; - - public TMLoginModule() { - log.debug("TMLoginModule: constructor"); - rolePrincipals = new ArrayList(); - } - - // LoginModule interface methods ... - - public boolean abort() throws LoginException { - if (!loginSucceeded) { - return false; - } else if (commitSucceeded == false) { - // login succeeded but overall authentication failed - loginSucceeded = false; - username = null; - password = null; - userPrincipal = null; - rolePrincipals.clear(); - } else { - // overall authentication succeeded and commit succeeded, - // but someone else's commit failed - logout(); - } - return true; - } - - /** - * Add relevant Principals to the subject. - */ - public boolean commit() throws LoginException { - if (!loginSucceeded) - return false; - - // add user principal if not already exists - userPrincipal = new UserPrincipal(username); - if (!subject.getPrincipals().contains(userPrincipal)) - subject.getPrincipals().add(userPrincipal); - - // Use a query to find all the RolePrincipals of the user. - processRoles(); - - // Add all the roleprincipals (whenever necessary) to subject. - Iterator iter = rolePrincipals.iterator(); - while (iter.hasNext()) { - Principal rolePrincipal = iter.next(); - if (!subject.getPrincipals().contains(rolePrincipal)) - subject.getPrincipals().add(rolePrincipal); - } - - log.debug("TMLoginModule: committed"); - commitSucceeded = true; - - // clean out state - username = null; - password = null; - - return true; - } - - public void initialize(Subject subject, CallbackHandler callbackHandler, - Map sharedState, Map options) { - log.debug("TMLoginModule: initialize"); - - this.subject = subject; - this.callbackHandler = callbackHandler; - this.sharedState = sharedState; - this.options = options; - - // get options - jndiname = (String)options.get("jndi_repository"); - if (jndiname == null) jndiname = (String)options.get("jndiname"); - topicmapId = (String)options.get("topicmap"); - repositoryId = (String)options.get("repository"); - if (topicmapId == null) - throw new OntopiaRuntimeException("'topicmap' option is not provided to the JAAS module. Check jaas.config file."); - - hashMethod = (String)options.get("hashmethod"); - if (hashMethod == null) - hashMethod = "plaintext"; - } - - /** - * Prompt the user for username and password, and verify those. - */ - public boolean login() throws LoginException { - log.debug("TMLoginModule: login"); - - if (callbackHandler == null) - throw new LoginException("Error: no CallbackHandler available " + - "to garner authentication information from the user"); - - // prompt for a user name and password - NameCallback nameCallback = new NameCallback("user name: "); - PasswordCallback passwordCallback = new PasswordCallback("password: ", - false); - - try { - callbackHandler.handle(new Callback[] {nameCallback, passwordCallback}); - - this.username = nameCallback.getName(); - char[] charpassword = passwordCallback.getPassword(); - password = (charpassword == null ? "" : new String(charpassword)); - passwordCallback.clearPassword(); - - } catch (java.io.IOException ioe) { - throw new LoginException(ioe.toString()); - } catch (UnsupportedCallbackException uce) { - throw new LoginException("Error: " + uce.getCallback() + - " not available to garner authentication information " + - "from the user"); - } - // verify the username/password - loginSucceeded = verifyUsernamePassword(username, password); - return loginSucceeded; - } - - public boolean logout() throws LoginException { - // clear out principals - subject.getPrincipals().remove(userPrincipal); - - Iterator iter = rolePrincipals.iterator(); - while (iter.hasNext()) { - Principal rolePrincipal = iter.next(); - if (!subject.getPrincipals().contains(rolePrincipal)) - subject.getPrincipals().remove(rolePrincipal); - } - log.debug("TMLoginModule: logout"); - - // clean out state - loginSucceeded = false; - commitSucceeded = false; - username = null; - password = null; - userPrincipal = null; - rolePrincipals.clear(); - return true; - } - - // ... LoginModule interface methods. - - private static String getName(TopicIF topic) { - return net.ontopia.topicmaps.utils.TopicStringifiers.getDefaultStringifier().toString(topic); - } - - private static String getId(Object that) { - if (that instanceof TMObjectIF) - return NavigatorUtils.getStableId((TMObjectIF) that); - else if (that instanceof TopicMapReferenceIF) - return ((TopicMapReferenceIF)that).getId(); - else - return null; - } - - protected TopicMapIF getTopicMap() { - - TopicMapStoreIF store; - boolean readonly = true; - if (jndiname != null) { - SharedStoreRegistry ssr = NavigatorApplication.lookupSharedStoreRegistry(jndiname); - TopicMapRepositoryIF repository = ssr.getTopicMapRepository(); - TopicMapReferenceIF ref = repository.getReferenceByKey(topicmapId); - - try { - store = ref.createStore(readonly); - } catch (java.io.IOException e) { - throw new OntopiaRuntimeException("Unable to create store for '" + topicmapId + "'", e); - } - } else { - if (repositoryId == null) - store = TopicMaps.createStore(topicmapId, readonly); - else - store = TopicMaps.createStore(topicmapId, readonly, repositoryId); - - } - log.debug("TMLoginModule Initialised Correctly"); - return store.getTopicMap(); - } - - public static String hashPassword(String username, String password, - String hashMethod) { - String encodedPassword; - if (hashMethod.equals("base64")) { - try { - encodedPassword = Base64Encoder.encode(username+password); - } catch (Exception e) { - throw new OntopiaRuntimeException( - "Problem occurred when attempting to hash password", e); - } - } else if (hashMethod.equals("md5")) { - try { - MessageDigest messageDigest = MessageDigest.getInstance("MD5"); - byte[] digest = messageDigest.digest((username+password).getBytes("ISO-8859-1")); - encodedPassword = Base64Encoder.encode(new String(digest, "ISO-8859-1")); - } catch (Exception e) { - throw new OntopiaRuntimeException( - "Problems occurrend when attempting to hash password", e); - } - } else if (hashMethod.equals("plaintext")) { - encodedPassword = password; - } else { - throw new OntopiaRuntimeException("Invalid password encoding: " - + hashMethod); - } - return encodedPassword; - } - - /** - * Query the topicmap for any roles played by the USER. - * Create RolePrincipals for each of those roles. - */ - private void processRoles() { // NOTE: ignoring roles for now - - TopicMapIF topicMap = getTopicMap(); - QueryResultIF queryResult = null; - try { - QueryProcessorIF queryProcessor = QueryUtils.getQueryProcessor(topicMap); - log.info("Processing roles for user '" + username + "'"); - String query = - "using um for i\"http://psi.ontopia.net/userman/\"" - + "select $ROLE, $PRIVILEGE from " - + "instance-of($USER, um:user), " - + "occurrence($USER, $O1), type($O1, um:username), value($O1, %USERNAME%), " - + "um:plays-role($USER : um:user, $ROLE : um:role), " - + "{ um:has-privilege($ROLE : um:receiver, $PRIVILEGE : um:privilege) }?"; - - Map params = Collections.singletonMap("USERNAME", username); - queryResult = queryProcessor.execute(query, params); - - Collection visited = new HashSet(); - while (queryResult.next()) { - // register role (aka user-group) - TopicIF r = (TopicIF) queryResult.getValue(0); - if (!visited.contains(r)) { - String rolename = getName(r); - if (rolename != null) - rolePrincipals.add(new RolePrincipal(rolename)); - visited.add(r); - log.info("Added role-principal from user-group '" + rolename + "' for user '" + username + "'"); - } - // register privilege - TopicIF p = (TopicIF) queryResult.getValue(1); - if (p != null) { - if (!visited.contains(p)) { - String rolename = getName(p); - if (rolename != null) - rolePrincipals.add(new RolePrincipal(rolename)); - visited.add(p); - log.info("Added role-principal from privilege '" + rolename + "' for user '" + username + "'"); - } - } - } - // all users have implicit role 'user' - log.info("Added implicit role-principal 'user' for user '" + username + "'"); - rolePrincipals.add(new RolePrincipal("user")); - - } catch (InvalidQueryException e) { - throw new OntopiaRuntimeException(e); - } finally { - if (queryResult != null) queryResult.close(); - if (topicMap != null) topicMap.getStore().close(); - } - } - - private boolean verifyUsernamePassword(String username, String password) { - if (username == null || password == null) return false; - - TopicMapIF topicMap = getTopicMap(); - QueryResultIF queryResult = null; - try { - log.debug("Topic map: " + topicMap); - QueryProcessorIF queryProcessor = QueryUtils.getQueryProcessor(topicMap); - String query = - "using um for i\"http://psi.ontopia.net/userman/\" " - + "select $USER from " - + "instance-of($USER, um:user), " - + "occurrence($USER, $O1), type($O1, um:username), value($O1, %USERNAME%), " - + "occurrence($USER, $O2), type($O2, um:password), value($O2, %PASSWORD%)?"; - - Map params = new HashMap(2); - params.put("USERNAME", username); - params.put("PASSWORD", hashPassword(username, password, hashMethod)); - queryResult = queryProcessor.execute(query, params); - - if (queryResult.next()) { - TopicIF user = (TopicIF) queryResult.getValue(0); - log.info("Authenticated user: " + user); - return true; - } else { - log.info("User '" + username + "' not authenticated"); - return false; - } - } catch (InvalidQueryException e) { - throw new OntopiaRuntimeException(e); - } finally { - if (queryResult != null) queryResult.close(); - if (topicMap != null) topicMap.getStore().close(); - } - } -} diff --git a/sandbox/maven/ontopia-realm/src/main/java/net/ontopia/topicmaps/nav2/realm/UserPrincipal.java b/sandbox/maven/ontopia-realm/src/main/java/net/ontopia/topicmaps/nav2/realm/UserPrincipal.java deleted file mode 100644 index 383a65547..000000000 --- a/sandbox/maven/ontopia-realm/src/main/java/net/ontopia/topicmaps/nav2/realm/UserPrincipal.java +++ /dev/null @@ -1,55 +0,0 @@ - -// $Id: UserPrincipal.java,v 1.2 2006/01/12 11:11:58 larsga Exp $ - -package net.ontopia.topicmaps.nav2.realm; - -import java.io.Serializable; -import java.security.Principal; - -import org.slf4j.Logger; -import org.slf4j.LoggerFactory; - -public class UserPrincipal implements Principal, Serializable { - - public static final long serialVersionUID = 502L; - - // initialization of logging facility - private static Logger log = LoggerFactory.getLogger(UserPrincipal.class.getName()); - - private String name; - - public UserPrincipal(String name) { - if (name == null) - throw new NullPointerException("illegal null input"); - this.name = name; - } - - public String getName() { - return name; - } - - @Override - public String toString() { - return("UserPrincipal: " + name); - } - - @Override - public boolean equals(Object o) { - if (o == null) - return false; - - if (this == o) - return true; - - if (!(o instanceof UserPrincipal)) - return false; - - UserPrincipal that = (UserPrincipal) o; - return getName().equals(that.getName()); - } - - @Override - public int hashCode() { - return name.hashCode(); - } -} diff --git a/sandbox/maven/ontopia-realm/src/test/java/net/ontopia/topicmaps/nav2/realm/TMLoginModuleTest.java b/sandbox/maven/ontopia-realm/src/test/java/net/ontopia/topicmaps/nav2/realm/TMLoginModuleTest.java deleted file mode 100644 index 57c762c7f..000000000 --- a/sandbox/maven/ontopia-realm/src/test/java/net/ontopia/topicmaps/nav2/realm/TMLoginModuleTest.java +++ /dev/null @@ -1,182 +0,0 @@ - -// $Id: TMLoginModuleTest.java,v 1.3 2005/03/20 13:41:11 grove Exp $ - -package net.ontopia.topicmaps.nav2.realm; - - -import java.io.IOException; -import java.util.Collection; -import java.util.Iterator; -import java.util.Map; - -import java.security.Principal; -import javax.security.auth.Subject; -import javax.security.auth.callback.Callback; -import javax.security.auth.callback.CallbackHandler; -import javax.security.auth.callback.NameCallback; -import javax.security.auth.callback.PasswordCallback; -import javax.security.auth.callback.TextOutputCallback; -import javax.security.auth.callback.UnsupportedCallbackException; - -import org.junit.Test; -import junit.framework.TestCase; - -/** - * INTERNAL: Tests the TMLoginModule class. - */ -public class TMLoginModuleTest extends TestCase { - - public TMLoginModuleTest(String name) { - super(name); - } - -@Test -public void testLoginModulePlaintextSucce() throws Exception{ - String[] tokens = new String[] { - "plaintext", "feil", - "plaintext", "hemmelig1", - "plaintext", "hemmelig3", - "plaintext", "hemmelig1" - }; - String[] pnames = new String[] { "plaintext", "user", "Administrator" }; - - Map options = new java.util.HashMap(); - options.put("hashmethod", "plaintext"); - options.put("topicmap", "tmloginmodule.ltm"); - - doLoginTests(tokens, pnames, options); - } - - @Test - public void testLoginModuleBase64() throws Exception{ - String[] tokens = new String[] { - "base64", "feil", - "base64", "hemmelig2", - "base64", "hemmelig1", - "base64", "hemmelig2" - }; - - // user (small) = implicit role - // User (capt) = Role topic with "User" as topicname - - String[] pnames = new String[] { "base64", "user", "Administrator", "Janitor", "User" }; - - Map options = new java.util.HashMap(); - options.put("hashmethod", "base64"); - options.put("topicmap", "tmloginmodule.ltm"); - - doLoginTests(tokens, pnames, options); - } - - @Test - public void testLoginModuleMD5() throws Exception{ - String[] tokens = new String[] { - "md5", "feil", - "md5", "hemmelig3", - "md5", "hemmelig2", - "md5", "hemmelig3" - }; - String[] pnames = new String[] { "md5", "user" }; - - Map options = new java.util.HashMap(); - options.put("hashmethod", "md5"); - options.put("topicmap", "tmloginmodule.ltm"); - - doLoginTests(tokens, pnames, options); - } - - protected void doLoginTests(String[] tokens, String[] pnames, Map options) throws Exception { - TestableTMLoginModule loginModule = new TestableTMLoginModule(); - Subject subject = new Subject(); - CallbackHandler callbackHandler = new CallbackHandlerImpl(tokens); - - Map _principals = new java.util.HashMap(); - - loginModule.initialize( - subject, - callbackHandler, - _principals, options); - - // should fail with incorrect password - assertFalse("Could log in with wrong password", loginModule.login()); - assertTrue("Could not log out (1)", loginModule.logout()); - - // should succeed - assertTrue("Could not log in with correct tokens (2)", loginModule.login()); - assertTrue("Could not log out (2)", loginModule.logout()); - - // should fail with other user's password - assertFalse("Could log in with other user's password", loginModule.login()); - assertTrue("Could not log out (3)", loginModule.logout()); - - // should succeed - assertTrue("Could not log in with correct tokens", loginModule.login()); - - // accept last token - assertTrue("Could not commit", loginModule.commit()); - - // verify roles - Collection principals = subject.getPrincipals(); - - // ISSUE: all principals have just one role subject, 'user' for - // the time being, totally two principals including the user - // principal. - - //! assertTrue("Subject does not have correct number of principals", - //! principals.size() == pnames.length); - - assertEquals("Subject does not have correct number of principals " + java.util.Arrays.asList(principals), pnames.length, principals.size()); - - Iterator iter = principals.iterator(); - while (iter.hasNext()) { - Principal principal = (Principal)iter.next(); - String pname = principal.getName(); - boolean ok = false; - for (int i=0; i < pnames.length; i++) { - if (pnames[i].equals(pname)) { - ok = true; - break; - } - } - if (!ok) fail("User did not have proper principals: " + java.util.Arrays.asList(pnames)); - } - } - - static class CallbackHandlerImpl implements CallbackHandler { - - protected String[] tokens; - protected int index; - - public CallbackHandlerImpl(String[] tokens) { - this.tokens = tokens; - } - - public void handle(Callback[] callbacks) - throws IOException, UnsupportedCallbackException { - - for (int i = 0; i < callbacks.length; i++) { - if (callbacks[i] instanceof NameCallback) { - // prompt the user for a username - NameCallback nc = (NameCallback)callbacks[i]; - String username = tokens[index++]; - nc.setName(username); - - } else if (callbacks[i] instanceof PasswordCallback) { - // prompt the user for sensitive information - PasswordCallback pc = (PasswordCallback)callbacks[i]; - String password = tokens[index++]; - pc.setPassword(password.toCharArray()); - - } else if (callbacks[i] instanceof TextOutputCallback) { - // ignore - - } else { - throw new UnsupportedCallbackException(callbacks[i], - "Unrecognized Callback"); - } - } - } - - } - -} diff --git a/sandbox/maven/ontopia-realm/src/test/java/net/ontopia/topicmaps/nav2/realm/TestableTMLoginModule.java b/sandbox/maven/ontopia-realm/src/test/java/net/ontopia/topicmaps/nav2/realm/TestableTMLoginModule.java deleted file mode 100644 index f9eb53944..000000000 --- a/sandbox/maven/ontopia-realm/src/test/java/net/ontopia/topicmaps/nav2/realm/TestableTMLoginModule.java +++ /dev/null @@ -1,35 +0,0 @@ - -// $Id: TestableTMLoginModule.java,v 1.1 2005/03/04 09:42:27 grove Exp $ - -package net.ontopia.topicmaps.nav2.realm; - -import java.io.InputStream; -import net.ontopia.infoset.impl.basic.URILocator; -import net.ontopia.topicmaps.core.TopicMapIF; -import net.ontopia.topicmaps.utils.ltm.LTMTopicMapReader; -import net.ontopia.utils.OntopiaRuntimeException; -import org.junit.Ignore; - -/** - * INTERNAL: Class extending TMLoginModule so that it can be properly - * tested outside of a J2EE environment. - */ - -@Ignore -public class TestableTMLoginModule extends TMLoginModule { - - /** - * INTERNAL: Return a topicmap via a hard-coded file-path. - */ - @Override - protected TopicMapIF getTopicMap() { - try { - InputStream in = this.getClass().getClassLoader().getResourceAsStream("net/ontopia/topicmaps/nav2/realm/" + topicmapId); - LTMTopicMapReader reader = new LTMTopicMapReader(in, URILocator.create("test:tmloginmodule.ltm")); - return reader.read(); - } catch (java.io.IOException e) { - throw new OntopiaRuntimeException(e); - } - } - -} diff --git a/sandbox/maven/ontopia-realm/src/test/resources/net/ontopia/topicmaps/nav2/realm/tmloginmodule.ltm b/sandbox/maven/ontopia-realm/src/test/resources/net/ontopia/topicmaps/nav2/realm/tmloginmodule.ltm deleted file mode 100644 index 52621de0c..000000000 --- a/sandbox/maven/ontopia-realm/src/test/resources/net/ontopia/topicmaps/nav2/realm/tmloginmodule.ltm +++ /dev/null @@ -1,26 +0,0 @@ -#PREFIX um @"http://psi.ontopia.net/userman/" - -[admin : um:role = "Administrator"] -[user : um:role = "User"] -[janitor : um:role = "Janitor"] - -[plaintext : um:user = "Plaintext user"] -{plaintext, um:username, [[plaintext]]} -{plaintext, um:password, [[hemmelig1]]} -um:plays-role(plaintext : um:user, admin : um:role) - -[base64 : um:user = "Base64 user"] -{base64, um:username, [[base64]]} -{base64, um:password, [[YmFzZTY0aGVtbWVsaWcy]]} /* password=hemmelig2 */ -um:plays-role(base64 : um:user, user : um:role) -um:plays-role(base64 : um:user, admin : um:role) -um:plays-role(base64 : um:user, janitor : um:role) - -[md5 : um:user = "MD5 user"] -{md5, um:username, [[md5]]} -{md5, um:password, [[/Bm+Fsy8PaGW0uwEjxhSCA==]]} /* password=hemmelig3 */ -/* no explicit roles */ - -[um:has-privilege = "Has privilege"] -[um:privilege = "Privilege"] -[um:receiver = "Reciever"] \ No newline at end of file diff --git a/sandbox/maven/ontopia-test-bootstrap/pom.xml b/sandbox/maven/ontopia-test-bootstrap/pom.xml deleted file mode 100644 index 3b69aeea9..000000000 --- a/sandbox/maven/ontopia-test-bootstrap/pom.xml +++ /dev/null @@ -1,53 +0,0 @@ - - - 4.0.0 - - - ontopia-parent - net.ontopia - 5.1.0-b1 - - - ontopia-test-bootstrap - jar - Ontopia test bootstrap - Ontopia test bootstrap classes. - - - - net.ontopia - ontopia-core - ${project.version} - - - junit - junit - 3.8.2 - - - - - ../../../ontopia/src/ - - - - org.apache.maven.plugins - maven-compiler-plugin - 2.0.2 - - 1.5 - 1.5 - - **/net/ontopia/test/AbstractOntopiaTestCase.java - **/net/ontopia/test/TestCaseGeneratorIF.java - **/net/ontopia/topicmaps/test/AbstractTopicMapTestCase.java - **/net/ontopia/topicmaps/xml/test/AbstractCanonicalTestCase.java - - - - - - - - - diff --git a/sandbox/maven/ontopia-viz/pom.xml b/sandbox/maven/ontopia-viz/pom.xml deleted file mode 100644 index 15227c05a..000000000 --- a/sandbox/maven/ontopia-viz/pom.xml +++ /dev/null @@ -1,268 +0,0 @@ - - - 4.0.0 - - - ontopia-parent - net.ontopia - 5.1.0-b1 - - - ontopia-viz - jar - Ontopia Vizigator - Ontopia Vizigator. - - - - net.ontopia - ontopia-core - ${project.version} - - - net.ontopia - ontopia-test-bootstrap - ${project.version} - test - - - net.ontopia - ontopia-navigator - ${project.version} - - - - com.touchgraph - touchgraph - unknown - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - ../../../ontopia/src/ - ../../../ontopia/src/ - - - - org.apache.maven.plugins - maven-compiler-plugin - 2.0.2 - - 1.5 - 1.5 - - - - **/net/ontopia/topicmaps/viz/*.java - - - - - - **/net/ontopia/topicmaps/viz/test/*.java - - - - - - org.apache.maven.plugins - maven-surefire-plugin - - -Dnet.ontopia.test.root=../test-data - - - - - - - diff --git a/sandbox/maven/ontopia-webed/pom.xml b/sandbox/maven/ontopia-webed/pom.xml deleted file mode 100644 index 73d86baf0..000000000 --- a/sandbox/maven/ontopia-webed/pom.xml +++ /dev/null @@ -1,293 +0,0 @@ - - - 4.0.0 - - - ontopia-parent - net.ontopia - 5.1.0-b1 - - - ontopia-webed - jar - Ontopia Webed - Ontopia Webed. - - - - net.ontopia - ontopia-core - ${project.version} - - - net.ontopia - ontopia-test-bootstrap - ${project.version} - test - - - net.ontopia - ontopia-navigator - ${project.version} - - - - - - - - - - - commons-fileupload - commons-fileupload - 1.1 - - - - - velocity - velocity - 1.3 - - - - - - - - - - - - - httpunit - httpunit - 1.6.1 - test - - - - - - - - - javax.servlet - servlet-api - 2.4 - provided - - - javax.servlet - jsp-api - 2.0 - provided - - - javax.servlet - jstl - 1.1.2 - provided - - - - - - - - - - - - - ../../../ontopia/src/ - ../../../ontopia/src/ - - - - org.apache.maven.plugins - maven-compiler-plugin - 2.0.2 - - 1.5 - 1.5 - - - - **/net/ontopia/topicmaps/webed/core/*.java - **/net/ontopia/topicmaps/webed/impl/basic/*.java - **/net/ontopia/topicmaps/webed/impl/utils/*.java - **/net/ontopia/topicmaps/webed/impl/actions/*.java - **/net/ontopia/topicmaps/webed/impl/actions/association/*.java - **/net/ontopia/topicmaps/webed/impl/actions/assocrole/*.java - **/net/ontopia/topicmaps/webed/impl/actions/basename/*.java - **/net/ontopia/topicmaps/webed/impl/actions/occurrence/*.java - **/net/ontopia/topicmaps/webed/impl/actions/tmobject/*.java - **/net/ontopia/topicmaps/webed/impl/actions/topic/*.java - **/net/ontopia/topicmaps/webed/impl/actions/topicmap/*.java - **/net/ontopia/topicmaps/webed/impl/actions/variant/*.java - **/net/ontopia/topicmaps/webed/servlets/*.java - **/net/ontopia/topicmaps/webed/taglibs/*.java - **/net/ontopia/topicmaps/webed/taglibs/form/*.java - **/net/ontopia/topicmaps/webed/utils/*.java - **/net/ontopia/topicmaps/webed/webapps/omnieditor/*.java - - - - - - **/net/ontopia/topicmaps/webed/impl/basic/test/*.java - **/net/ontopia/topicmaps/webed/impl/actions/test/*.java - **/net/ontopia/topicmaps/webed/impl/actions/topic/test/*.java - **/net/ontopia/topicmaps/webed/impl/actions/topicmap/test/*.java - **/net/ontopia/topicmaps/webed/impl/actions/association/test/*.java - **/net/ontopia/topicmaps/webed/impl/utils/test/*.java - **/net/ontopia/topicmaps/webed/utils/test/*.java - **/net/ontopia/topicmaps/webed/test/**/*.java - **/net/ontopia/topicmaps/webed/webapps/omnieditor/test/*.java - - - - - - org.apache.maven.plugins - maven-surefire-plugin - - -Dnet.ontopia.test.root=../test-data - - - - - - - diff --git a/sandbox/maven/pom.xml b/sandbox/maven/pom.xml deleted file mode 100644 index 3eae3b997..000000000 --- a/sandbox/maven/pom.xml +++ /dev/null @@ -1,31 +0,0 @@ - - - 4.0.0 - - net.ontopia - ontopia-parent - pom - 5.1.0-b1 - Ontopia - Ontopia: Complete Topic Maps solution - http://code.google.com/p/ontopia/ - - Google Code - http://code.google.com/p/ontopia/issues/list - - - http://ontopia.googlecode.com/svn/trunk/ - - - - ontopia-core - ontopia-test-bootstrap - ontopia-navigator - ontopia-webed - ontopia-db2tm - ontopia-viz - ontopia-classify - ontopia-realm - - - \ No newline at end of file diff --git a/sandbox/ontopia-mio/README.txt b/sandbox/ontopia-mio/README.txt deleted file mode 100644 index 40540fce5..000000000 --- a/sandbox/ontopia-mio/README.txt +++ /dev/null @@ -1,3 +0,0 @@ -IMapHandler implementation for Ontopia. - -Details will follow. diff --git a/sandbox/ontopia-mio/build.gradle b/sandbox/ontopia-mio/build.gradle deleted file mode 100644 index 875761787..000000000 --- a/sandbox/ontopia-mio/build.gradle +++ /dev/null @@ -1,56 +0,0 @@ -/* - * Gradle build file. - * - * - Download Gradle from - * - Execute gradle - */ -group = 'net.ontopia' -version = '0.1.0' - -targetCompatibility = '1.5' - -defaultTasks 'clean', 'build' - -apply plugin: 'java' -apply plugin: 'osgi' -apply plugin: 'maven' -apply plugin: 'eclipse' - -gradle.taskGraph.whenReady {taskGraph -> - if (!taskGraph.hasTask(':release')) { - version += '-SNAPSHOT' - } -} - -repositories { - mavenCentral() - mavenRepo urls: 'http://ontopia.googlecode.com/svn/maven-repository/' - mavenRepo urls: 'http://ontopia.googlecode.com/svn/maven-snapshot-repository/' - mavenRepo urls: 'http://repository.jboss.org/maven2/' - mavenRepo urls: 'http://repository.semagia.com/snapshots/' -} - -dependencies { - compile 'net.ontopia:ontopia-engine:5.1.0', - 'org.slf4j:slf4j-api:(1.5.8,)', - 'com.semagia.mio:mio-core:0.9.6-SNAPSHOT' - - testCompile 'junit:junit:4.8.1', - 'com.semagia.mio:mio-core-tests:0.9.6-SNAPSHOT' -} - -jar { - manifest { - attributes 'Implementation-Title': 'Ontopia MIO', 'Implementation-Version': version - } -} - -artifacts { - archives jar -} - -uploadArchives { - repositories.mavenDeployer { - repository(url: "file://$buildDir/maven-repo/") - } -} diff --git a/sandbox/ontopia-mio/settings.gradle b/sandbox/ontopia-mio/settings.gradle deleted file mode 100644 index a4a8bea83..000000000 --- a/sandbox/ontopia-mio/settings.gradle +++ /dev/null @@ -1 +0,0 @@ -rootProject.name = 'ontopia-mio' diff --git a/sandbox/ontopia-mio/src/main/java/net/ontopia/topicmaps/io/OntopiaMapHandler.java b/sandbox/ontopia-mio/src/main/java/net/ontopia/topicmaps/io/OntopiaMapHandler.java deleted file mode 100644 index b2300dca3..000000000 --- a/sandbox/ontopia-mio/src/main/java/net/ontopia/topicmaps/io/OntopiaMapHandler.java +++ /dev/null @@ -1,493 +0,0 @@ -/* - * Copyright 2009 Lars Heuer (heuer[at]semagia.com) - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -package net.ontopia.topicmaps.io; - -import java.net.MalformedURLException; -import java.util.ArrayList; -import java.util.Collection; - -import com.semagia.mio.MIOException; -import com.semagia.mio.helpers.AbstractHamsterMapHandler; -import com.semagia.mio.voc.TMDM; -import com.semagia.mio.voc.XSD; - -import net.ontopia.infoset.core.LocatorIF; -import net.ontopia.infoset.impl.basic.URILocator; -import net.ontopia.topicmaps.core.AssociationIF; -import net.ontopia.topicmaps.core.AssociationRoleIF; -import net.ontopia.topicmaps.core.OccurrenceIF; -import net.ontopia.topicmaps.core.ReifiableIF; -import net.ontopia.topicmaps.core.ScopedIF; -import net.ontopia.topicmaps.core.TMObjectIF; -import net.ontopia.topicmaps.core.TopicIF; -import net.ontopia.topicmaps.core.TopicMapBuilderIF; -import net.ontopia.topicmaps.core.TopicMapIF; -import net.ontopia.topicmaps.core.TopicNameIF; -import net.ontopia.topicmaps.core.UniquenessViolationException; -import net.ontopia.topicmaps.core.VariantNameIF; -import net.ontopia.topicmaps.utils.ClassInstanceUtils; -import net.ontopia.topicmaps.utils.KeyGenerator; -import net.ontopia.topicmaps.utils.MergeUtils; - -/** - * PUBLIC: {@link com.semagia.mio.IMapHandler} implementation. - * - */ -public class OntopiaMapHandler extends AbstractHamsterMapHandler { - - private final TopicMapIF _tm; - private final TopicMapBuilderIF _builder; - private final Collection _delayedRoleEvents; - - /** - * Creates a map handler which operates upon the provided topic map. - * - * @param topicMap The topic map. - */ - public OntopiaMapHandler(TopicMapIF topicMap) { - if (topicMap == null) { - throw new IllegalArgumentException("The topic map must not be null"); - } - _tm = topicMap; - _builder = topicMap.getBuilder(); - _delayedRoleEvents = new ArrayList(); - } - - /* (non-Javadoc) - * @see com.semagia.mio.helpers.AbstractHamsterMapHandler#endTopicMap() - */ - @Override - public void endTopicMap() throws MIOException { - super.endTopicMap(); - ClassInstanceUtils.resolveAssociations1(_tm); - ClassInstanceUtils.resolveAssociations2(_tm); - } - - /* (non-Javadoc) - * @see com.semagia.mio.helpers.HamsterHandler#createAssociation(java.lang.Object, java.util.Collection, java.lang.Object, java.util.Collection, java.util.Collection) - */ - @Override - protected void createAssociation(TopicIF type, Collection scope, - TopicIF reifier, Collection iids, - Collection> roles) throws MIOException { - AssociationIF assoc = _builder.makeAssociation(type); - applyScope(assoc, scope); - for (IRole r: roles) { - AssociationRoleIF role = _builder.makeAssociationRole(assoc, r.getType(), r.getPlayer()); - if (r.getReifier() != null || !r.getItemIdentifiers().isEmpty()) { - _delayedRoleEvents.add(new DelayedRoleEvents(role, r.getReifier(), r.getItemIdentifiers())); - } - } - applyReifier(assoc, reifier); - applyItemIdentifiers(assoc, iids); - if (!_delayedRoleEvents.isEmpty()) { - for (DelayedRoleEvents evt: _delayedRoleEvents) { - applyReifier(evt.role, evt.reifier); - applyItemIdentifiers(evt.role, evt.iids); - } - _delayedRoleEvents.clear(); - } - } - - /* (non-Javadoc) - * @see com.semagia.mio.helpers.HamsterHandler#createName(java.lang.Object, java.lang.Object, java.lang.String, java.util.Collection, java.lang.Object, java.util.Collection, java.util.Collection) - */ - @Override - protected void createName(TopicIF parent, TopicIF type, String value, - Collection scope, TopicIF reifier, - Collection iids, Collection> variants) - throws MIOException { - TopicNameIF name = null; - if (type == null) { - type = _defaultNameType(); - } - name = _builder.makeTopicName(parent, type, value); - applyScope(name, scope); - applyItemIdentifiers(name, iids); - applyReifier(name, reifier); - @SuppressWarnings("unchecked") - final Collection nameScope = name.getScope(); - for (IVariant v: variants) { - if (nameScope.containsAll(v.getScope())) { - throw new MIOException("The variant's scope is not a superset of the parent's scope."); - } - VariantNameIF var = null; - final String datatype = v.getDatatype(); - if (XSD.ANY_URI.equals(datatype)) { - var = _builder.makeVariantName(name, createLocator(v.getValue()), v.getScope()); - } - else if (XSD.STRING.equals(datatype)) { - var = _builder.makeVariantName(name, v.getValue(), v.getScope()); - } - else { - var = _builder.makeVariantName(name, v.getValue(), createLocator(datatype), v.getScope()); - } - applyItemIdentifiers(var, v.getItemIdentifiers()); - applyReifier(var, v.getReifier()); - } - } - - private TopicIF _defaultNameType() throws MIOException { - return createTopicBySubjectIdentifier(TMDM.TOPIC_NAME); - } - - /* (non-Javadoc) - * @see com.semagia.mio.helpers.HamsterHandler#createOccurrence(java.lang.Object, java.lang.Object, java.lang.String, java.lang.String, java.util.Collection, java.lang.Object, java.util.Collection) - */ - @Override - protected void createOccurrence(TopicIF parent, TopicIF type, String value, - String datatype, Collection scope, TopicIF reifier, - Collection iids) throws MIOException { - OccurrenceIF occ = null; - if (XSD.ANY_URI.equals(datatype)) { - occ = _builder.makeOccurrence(parent, type, createLocator(value)); - } - else if (XSD.STRING.equals(datatype)) { - occ = _builder.makeOccurrence(parent, type, value); - } - else { - occ = _builder.makeOccurrence(parent, type, value, createLocator(datatype)); - } - applyScope(occ, scope); - applyItemIdentifiers(occ, iids); - applyReifier(occ, reifier); - } - - /* (non-Javadoc) - * @see com.semagia.mio.helpers.HamsterHandler#createTopicByItemIdentifier(java.lang.String) - */ - @Override - protected TopicIF createTopicByItemIdentifier(String iri) - throws MIOException { - final LocatorIF iid = createLocator(iri); - final TMObjectIF existingConstruct = _tm.getObjectByItemIdentifier(iid); - if (existingConstruct != null) { - if (existingConstruct instanceof TopicIF) { - return (TopicIF) existingConstruct; - } - else { - throw new MIOException("The item identifier " + iri + " is already assigned to another construct"); - } - } - TopicIF topic = _tm.getTopicBySubjectIdentifier(iid); - if (topic != null) { - topic.addItemIdentifier(iid); - } - else { - topic = _builder.makeTopic(); - topic.addItemIdentifier(iid); - } - return topic; - } - - /* (non-Javadoc) - * @see com.semagia.mio.helpers.HamsterHandler#createTopicBySubjectIdentifier(java.lang.String) - */ - @Override - protected TopicIF createTopicBySubjectIdentifier(String iri) - throws MIOException { - final LocatorIF sid = createLocator(iri); - TopicIF topic = _tm.getTopicBySubjectIdentifier(sid); - if (topic != null) { - return topic; - } - final TMObjectIF existingConstruct = _tm.getObjectByItemIdentifier(sid); - if (existingConstruct != null && existingConstruct instanceof TopicIF) { - return (TopicIF) existingConstruct; - } - else { - topic = _builder.makeTopic(); - topic.addSubjectIdentifier(sid); - } - return topic; - } - - /* (non-Javadoc) - * @see com.semagia.mio.helpers.HamsterHandler#createTopicBySubjectLocator(java.lang.String) - */ - @Override - protected TopicIF createTopicBySubjectLocator(String iri) - throws MIOException { - final LocatorIF slo = createLocator(iri); - TopicIF topic = _tm.getTopicBySubjectLocator(slo); - if (topic == null) { - topic = _builder.makeTopic(); - topic.addSubjectLocator(slo); - } - return topic; - } - - /* (non-Javadoc) - * @see com.semagia.mio.helpers.HamsterHandler#handleItemIdentifier(java.lang.Object, java.lang.String) - */ - @Override - protected void handleItemIdentifier(TopicIF topic, String iri) - throws MIOException { - final LocatorIF iid = createLocator(iri); - final TMObjectIF existingConstruct = _tm.getObjectByItemIdentifier(iid); - if (existingConstruct != null) { - if (existingConstruct instanceof TopicIF) { - if (!existingConstruct.equals(topic)) { - merge(topic, (TopicIF) existingConstruct); - topic = (TopicIF) existingConstruct; - } - return; - } - else { - throw new MIOException("The item identifier " + iri + " is already assigned to another construct"); - } - } - final TopicIF existingTopic = _tm.getTopicBySubjectIdentifier(iid); - if (existingTopic != null && !existingTopic.equals(topic)) { - merge(topic, existingTopic); - topic = existingTopic; - } - topic.addItemIdentifier(iid); - } - - /* (non-Javadoc) - * @see com.semagia.mio.helpers.HamsterHandler#handleSubjectIdentifier(java.lang.Object, java.lang.String) - */ - @Override - protected void handleSubjectIdentifier(TopicIF topic, String iri) - throws MIOException { - final LocatorIF sid = createLocator(iri); - TopicIF existingTopic = _tm.getTopicBySubjectIdentifier(sid); - if (existingTopic != null) { - if (!existingTopic.equals(topic)) { - merge(topic, existingTopic); - } - return; - } - final TMObjectIF existing = _tm.getObjectByItemIdentifier(sid); - if (existing != null && existing instanceof TopicIF && !existing.equals(topic)) { - existingTopic = (TopicIF) existing; - merge(topic, existingTopic); - topic = existingTopic; - } - topic.addSubjectIdentifier(sid); - } - - /* (non-Javadoc) - * @see com.semagia.mio.helpers.HamsterHandler#handleSubjectLocator(java.lang.Object, java.lang.String) - */ - @Override - protected void handleSubjectLocator(TopicIF topic, String iri) - throws MIOException { - final LocatorIF slo = createLocator(iri); - final TopicIF existing = _tm.getTopicBySubjectLocator(slo); - if (existing != null && !existing.equals(topic)) { - merge(topic, existing); - } - else { - topic.addSubjectLocator(slo); - } - } - - /* (non-Javadoc) - * @see com.semagia.mio.helpers.HamsterHandler#handleTopicMapItemIdentifier(java.lang.String) - */ - @Override - protected void handleTopicMapItemIdentifier(String iri) throws MIOException { - _tm.addItemIdentifier(createLocator(iri)); - } - - /* (non-Javadoc) - * @see com.semagia.mio.helpers.HamsterHandler#handleTopicMapReifier(java.lang.Object) - */ - @Override - protected void handleTopicMapReifier(TopicIF reifier) throws MIOException { - _tm.setReifier(reifier); - } - - /* (non-Javadoc) - * @see com.semagia.mio.helpers.HamsterHandler#handleTypeInstance(java.lang.Object, java.lang.Object) - */ - @Override - protected void handleTypeInstance(TopicIF instance, TopicIF type) - throws MIOException { - instance.addType(type); - } - - /** - * - * - * @param iri - * @return - * @throws MIOException - */ - private static LocatorIF createLocator(String iri) throws MIOException { - try { - return new URILocator(iri); - } - catch (MalformedURLException ex) { - throw new MIOException(ex); - } - } - - /** - * Merges the source into the target. - * - * @param source The source topic (will be removed). - * @param target The target topic. - */ - private void merge(TopicIF source, TopicIF target) { - MergeUtils.mergeInto(target, source); - super.notifyMerge(source, target); - } - - /** - * Sets the scope of the scoped construct. - * - * @param scoped The scoped construct. - * @param scope A collection of topics or null. - */ - private static void applyScope(ScopedIF scoped, Collection scope) { - if (scope != null) { - for (TopicIF theme: scope) { - scoped.addTheme(theme); - } - } - } - - /** - * Sets the item identifiers of the provided reifiable. - * - * @param reifiable The construct. - * @param iids The item identifiers. - * @throws MIOException In case of an identity conflict. - */ - private void applyItemIdentifiers(ReifiableIF reifiable, Iterable iids) throws MIOException { - for (String iid: iids) { - try { - reifiable.addItemIdentifier(createLocator(iid)); - } - catch (UniquenessViolationException ex) { - final TMObjectIF existing = _tm.getObjectByItemIdentifier(createLocator(iid)); - if (areMergable(reifiable, existing)) { - merge((ReifiableIF) existing, reifiable); - } - else { - throw new MIOException(ex); - } - } - } - } - - /** - * Sets the reifier of reifiable if reifier is not null. - * - * @param reifiable The reifiable construct. - * @param reifier The reifier or null. - * @throws MIOException In case of a model constraint violation. - */ - private static void applyReifier(ReifiableIF reifiable, TopicIF reifier) throws MIOException { - if (reifier == null) { - return; - } - if (reifier.getReified() != null) { - final ReifiableIF existing = reifier.getReified(); - if (existing.equals(reifiable)) { - return; - } - if (areMergable(reifiable, existing)) { - merge(existing, reifiable); - } - else { - throw new MIOException("The topic reifies another construct"); - } - } - else { - reifiable.setReifier(reifier); - } - } - - /** - * Returns if the constructs are mergable. - * - * @see #areMergable(ReifiableIF, ReifiableIF) - * - * @param reifiable The first construct. - * @param tmo The second construct. - * @return true if the constructs are mergable, otherwise false. - */ - private static boolean areMergable(ReifiableIF reifiable, TMObjectIF tmo) { - return tmo instanceof ReifiableIF - && areMergable(reifiable, (ReifiableIF) tmo); - } - - /** - * Returns if the constructs are mergable. - *

    - * The constructs are mergable if they are duplicates. - *

    - * - * @param reifiableA The first construct. - * @param reifiableB The second construct. - * @return true if the constructs are mergable, otherwise false. - */ - private static boolean areMergable(ReifiableIF reifiableA, ReifiableIF reifiableB) { - boolean res = reifiableA.getClass().equals(reifiableB.getClass()) - && KeyGenerator.makeKey(reifiableA).equals(KeyGenerator.makeKey(reifiableB)); - if (reifiableA instanceof AssociationRoleIF) { - // Only mergable if the parents are equal (they are duplicates) - res = res && KeyGenerator.makeAssociationKey(((AssociationRoleIF) reifiableA).getAssociation()) - .equals(KeyGenerator.makeAssociationKey(((AssociationRoleIF) reifiableB).getAssociation())); - } - else if (reifiableA instanceof VariantNameIF) { - final TopicNameIF parentA = ((VariantNameIF) reifiableA).getTopicName(); - final TopicNameIF parentB = ((VariantNameIF) reifiableB).getTopicName(); - // Only mergable if the parents belong to the same topic and if the names are equal (they are duplicates) - res = res && parentA.getTopic().equals(parentB.getTopic()) - && KeyGenerator.makeTopicNameKey(parentA).equals(KeyGenerator.makeTopicNameKey(parentB)); - } - return res; - } - - /** - * Merges the source into the target. The source - * will be removed. - * - * @param source The source. - * @param target The target. - */ - private static void merge(ReifiableIF source, ReifiableIF target) { - if (target instanceof AssociationRoleIF && - !((AssociationRoleIF) target).getAssociation().equals(((AssociationRoleIF) source).getAssociation())) { - MergeUtils.mergeInto(((AssociationRoleIF) target).getAssociation(), ((AssociationRoleIF) source).getAssociation()); - } - else { - MergeUtils.mergeInto(target, source); - } - } - - /** - * INTENRAL: Helper class to keep track of the role's reifier and item - * identifiers. - */ - private static final class DelayedRoleEvents { - final AssociationRoleIF role; - final TopicIF reifier; - final Collection iids; - - DelayedRoleEvents(AssociationRoleIF role, TopicIF reifier, Collection iids) { - this.role = role; - this.reifier = reifier; - this.iids = iids; - } - } - -} diff --git a/sandbox/ontopia-mio/src/test/java/net/ontopia/topicmaps/io/TestOntopiaMapHandler.java b/sandbox/ontopia-mio/src/test/java/net/ontopia/topicmaps/io/TestOntopiaMapHandler.java deleted file mode 100644 index 806453abe..000000000 --- a/sandbox/ontopia-mio/src/test/java/net/ontopia/topicmaps/io/TestOntopiaMapHandler.java +++ /dev/null @@ -1,161 +0,0 @@ -/* - * Copyright 2008 Lars Heuer (heuer[at]semagia.com) - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -package net.ontopia.topicmaps.io; - -import java.net.MalformedURLException; - -import net.ontopia.infoset.core.LocatorIF; -import net.ontopia.infoset.impl.basic.URILocator; -import net.ontopia.topicmaps.core.AssociationIF; -import net.ontopia.topicmaps.core.AssociationRoleIF; -import net.ontopia.topicmaps.core.OccurrenceIF; -import net.ontopia.topicmaps.core.ReifiableIF; -import net.ontopia.topicmaps.core.TopicIF; -import net.ontopia.topicmaps.core.TopicMapIF; -import net.ontopia.topicmaps.core.TopicMapStoreFactoryIF; -import net.ontopia.topicmaps.core.TopicMapStoreIF; -import net.ontopia.topicmaps.core.TopicNameIF; -import net.ontopia.topicmaps.core.TypedIF; -import net.ontopia.topicmaps.core.VariantNameIF; -import net.ontopia.topicmaps.impl.basic.InMemoryStoreFactory; - -import com.semagia.mio.AbstractMapHandlerTest; -import com.semagia.mio.IMapHandler; - -/** - * Tests against the {@link OntopiaMapHandler}. - * - * @author Lars Heuer (heuer[at]semagia.com) Semagia - * @version $Rev$ - $Date$ - */ -public class TestOntopiaMapHandler extends AbstractMapHandlerTest { - - private TopicMapStoreFactoryIF _sysFactory; - private TopicMapStoreIF _sys; - private TopicMapIF _tm; - - @Override - protected void setUp() throws Exception { - super.setUp(); - _sysFactory = new InMemoryStoreFactory(); - _sys = _sysFactory.createStore(); - _tm = _sys.getTopicMap(); - } - - @Override - protected IMapHandler makeMapHandler() { - return new OntopiaMapHandler(_tm); - } - - @Override - protected Object getType(Object obj) { - return ((TypedIF) obj).getType(); - } - - @Override - protected int getAssociationSize() { - return _tm.getAssociations().size(); - } - - @Override - protected Object getConstructByItemIdentifier(String iid) { - return _tm.getObjectByItemIdentifier(createLocator(iid)); - } - - @Override - protected Object getParent(Object obj) { - if (obj instanceof TopicIF || obj instanceof AssociationIF) { - return _tm; - } - if (obj instanceof AssociationRoleIF) { - return ((AssociationRoleIF) obj).getAssociation(); - } - if (obj instanceof OccurrenceIF) { - return ((OccurrenceIF) obj).getTopic(); - } - if (obj instanceof TopicNameIF) { - return ((TopicNameIF) obj).getTopic(); - } - if (obj instanceof VariantNameIF) { - return ((VariantNameIF) obj).getTopicName(); - } - throw new RuntimeException("Unknown Topic Maps construct: " + obj); - } - - @Override - protected String getDatatypeAsString(Object obj) { - if (obj instanceof OccurrenceIF) { - return ((OccurrenceIF) obj).getDataType().getAddress(); - } - else { - return ((VariantNameIF) obj).getDataType().getAddress(); - } - } - - @Override - protected Object getTopicBySubjectIdentifier(String sid) { - return _tm.getTopicBySubjectIdentifier(createLocator(sid)); - } - - @Override - protected Object getTopicBySubjectLocator(String slo) { - return _tm.getTopicBySubjectLocator(createLocator(slo)); - } - - @Override - protected Object getTopicMapReifier() { - return _tm.getReifier(); - } - - @Override - protected String getValue(Object obj) { - if (obj instanceof OccurrenceIF) { - return ((OccurrenceIF) obj).getValue(); - } - if (obj instanceof TopicNameIF) { - return ((TopicNameIF) obj).getValue(); - } - if (obj instanceof VariantNameIF) { - return ((VariantNameIF) obj).getValue(); - } - throw new RuntimeException("Unknwon object: " + obj); - } - - @Override - protected Object getReifier(Object obj) { - return ((ReifiableIF) obj).getReifier(); - } - - @Override - protected Object getReified(Object obj) { - return ((TopicIF) obj).getReified(); - } - - @Override - protected int getTopicSize() { - return _tm.getTopics().size(); - } - - protected LocatorIF createLocator(final String reference) { - try { - return new URILocator(reference); - } - catch (MalformedURLException ex) { - ex.printStackTrace(); - throw new RuntimeException(ex); - } - } -} diff --git a/sandbox/ontopia-stormberg-demowebapp/README.txt b/sandbox/ontopia-stormberg-demowebapp/README.txt deleted file mode 100644 index 0f5239766..000000000 --- a/sandbox/ontopia-stormberg-demowebapp/README.txt +++ /dev/null @@ -1,26 +0,0 @@ -This is a simple demo project of creating a web application using a topic map with Ontopia and JSP. -It requires Maven2 http://maven.apache.org/ - -The topic map is based on a screenscraping a simple product catalog of Stormberg, a Norwegian clothing manufacturer. - -Starting the web application: -mvn jetty:run -Go to http://localhost:8080 - -Compiling, testing and creating war file: -mvn clean install - - -Quick pointers for installing on Google App Engine: -1. Grab a Google App Engine account http://appengine.google.com . Create a new application on it. Call it hello-ontopia or something. -2. Download and unzip GAE Java SDK http://code.google.com/appengine/docs/java/gettingstarted/installing.html -3. Add the file ontopia-stormberg-demowebapp/src/main/webapp/WEB-INF/appengine-web.xml - - - hello-ontopia - 1 - true - -4. Run mvn clean install (Requires Maven 2 http://maven.apache.org) -5. Run appcfg.sh update target/ontopia-stormberg-something-something -6. You're laughing! \ No newline at end of file diff --git a/sandbox/ontopia-stormberg-demowebapp/pom.xml b/sandbox/ontopia-stormberg-demowebapp/pom.xml deleted file mode 100644 index d6f91a335..000000000 --- a/sandbox/ontopia-stormberg-demowebapp/pom.xml +++ /dev/null @@ -1,44 +0,0 @@ - - 4.0.0 - net.ontopia - ontopia-stormberg-demowebapp - 1.0-SNAPSHOT - war - Ontopia Stormberg testwebapp - - - - net.ontopia - ontopia-engine - 5.0.0 - - - saxon - saxon - - - - - - opensymphony - sitemesh - 2.4.2 - - - - - - org.mortbay.jetty - maven-jetty-plugin - - - - - - - Ontopia - http://ontopia.googlecode.com/svn/maven-repository - - - diff --git a/sandbox/ontopia-stormberg-demowebapp/src/main/resources/tm-sources.xml b/sandbox/ontopia-stormberg-demowebapp/src/main/resources/tm-sources.xml deleted file mode 100644 index 216c89860..000000000 --- a/sandbox/ontopia-stormberg-demowebapp/src/main/resources/tm-sources.xml +++ /dev/null @@ -1,12 +0,0 @@ - - - - - - - - - - - - diff --git a/sandbox/ontopia-stormberg-demowebapp/src/main/resources/topicmaps/stormberg.xtm b/sandbox/ontopia-stormberg-demowebapp/src/main/resources/topicmaps/stormberg.xtm deleted file mode 100644 index ca293ae70..000000000 --- a/sandbox/ontopia-stormberg-demowebapp/src/main/resources/topicmaps/stormberg.xtm +++ /dev/null @@ -1,16826 +0,0 @@ - - - - - - - - - - - - - - - Number - - - - - - - - - - - - - - - - - - - - Child view - - - - - - - - - - - - - - Is abstract - - - - - - - - - - - - - - Declared fields - - - - - - - - - - - - - - - - - - - - - - - - - Minimum cardinality - - - - - - - - Veiledende pris - - - - - - - - - - - Andre aktuelle produkter - - - - - - - - - - - - - - View mode - - - - - - - - - - - - - - Sortable - - - - - - - - - - - - - - Superclass - - - - - - select $T from direct-instance-of(%topic%, $TT), direct-instance-of($T, $TT), $T /= %topic%? - - - - - - select $TT from direct-instance-of(%topic%, $TT), {$TT = on:topic-type | $TT = on:association-type | $TT = on:occurrence-type | $TT = on:name-type | $TT = on:role-type}? - - - - - - - - - - - URL - - - - - - - - - - - - - - - - - 5 - - - - - - 50 - - - - - - - - Solglimt D T Skjorte - - - - - - 99 - - - - - - 169 - - - - - - Lang t-skjorte i mykt og finkjemmet 180 grams bomullsmateriale. Kvaliteten gjør at t-skjorten er meget myk og behagelig å ha på seg. T-skjorten har korte ermer og en bred kant nederst. Solglimt T-skjorte kan brukes som lang t-skjorte, eller den kan heises litt opp slik at det blir en mer posete stil. - - - - - - - - - - - - - - - - - - - - - - - - - - Has data type - - - - - - - - - - - - - - Fields view - - - - - - - - - 000015000 - - - - - - - - - 000049000 - - - - - - - - - 000052000 - - - - - - - - - 000000000 - - - - - - - - - 000001000 - - - - - - - - - 000016000 - - - - - - - - - 000053000 - - - - - - - - - 000045000 - - - - - - - - - - - - - - Identity field view - - - - - - - - - - - XL - - - - - - Turbukse i GX-Ultra materiale, bestående av 65% polyester og 35% bomull. Yttersiden er børstet og impregnert, noe som gjør materialet vindtett og vannavstøtende, og samtidig ventilerende. Materialet er laget av tynnspunnet tråd, og er dermed lett og behagelig i bruk. Buksen har ventilasjonsåpning på låret, forhøyet rygg, stramming nederst i beinene samt glidelåsåpning langs leggen. Den har strikk i livet og formsydde knær for bedre passform. Buksen har en stikklomme på hver side. - - - - - - M - - - - - - S - - - - - - 399 - - - - - - XS - - - - - - https://www.stormberg.no/no/Produkter/Herre/Herre/Bukser/Jakt--fjell/Stifinner-Turbukse/ - - - - - - L - - - - - - https://www.stormberg.no/img/products/8545P_1_primary.jpg - - - - - - XXL - - - Stifinner Turbukse - - - - - - - - - - - - - - Has occurrence type - - - - - - - - - - - - - - Has field - - - - - - - - - - - - - - Subordinate Role Type - - - - - - - - - 000000000 - - - - - - - - - - - - - - Identity type - - - - - - - - - 000018000 - - - - - - - - - 000017000 - - - - - - - - - 000003000 - - - - - - - - - 000001000 - - - - - - - - - 000000000 - - - - - - - - - 000034000 - - - - - - - - Bles LightShell Genser - - - - - - Genser i et meget lett og behagelig SoftLight materiale. Kombinasjonen av polyester og elastan gjør plaget elastisk og behagelig å ha på, og kan brukes på flere aktivitetsnivåer. På innsiden av kraven har genseren en tynn fleecekant som gjør kanten myk og behagelig. Den har også enhånds stramming nederst, glidelåsåpning i halsen og sømløs brystlomme for bedre komfort. SoftLight stoffet er tynt og lett og plagget kan fint brukes til aktiviteter som gåturer, sykling og jogging. - - - - - - 499 - - - - - - - - - - - - - - - - - - 199 - - - - - - - - Fleece - - - - - - - - - - - - - - Superordinate role type for - - - - - - - - - - - - - - Use value view - - - - - - - - - - - - - Skjorte - - - - - - - - - 000000009 - - - - - - - - - 000000014 - - - - - - - - - 000000011 - - - - - - - - - 000000013 - - - - - - - - - 000000008 - - - - - - - - - 000000012 - - - - - - - - - 000000010 - - - - - - - - - 000000001 - - - - - - - - - - - Laget av - - - - - - - - - - - - - - Maximum cardinality - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - Identity field - - - - - - - - - - - - - - - - - 50 - - - - - - 5 - - - - - - - - - - - - - - Data type - - - - - - - - - - - - - - Is sortable - - - - - - - - - - - - - - Fields - - - - - - - - - - - - - - HTML - - - - - - - - - - - - - - - - - - - - - - - - - Has association field - - - - - - - - Navn på kjønn - - - - - - - - - - - Passer til - - - - - - - - - - - - - - New values only - - - - - - - - - - - - - - Read-only - - - - - - - - - - - - - - Has association field - - - - - - - - - - - - - - Owned values - - - - - - - - - - - - - - Read-only - - - - - - - - - - - - - - Part of views - - - - - - - - - - - - - - Cardinality - - - - - - - - - 000001000 - - - - - - - - - 000031000 - - - - - - - - - 000078000 - - - - - - - - - 000079000 - - - - - - - - - 000000000 - - - - - - - - - - - - - - Is read-only type - - - - - - - - Sti D Turjakke - - - - - - - - - - - - - - - - - - 599 - - - - - - - - - - - - - - - - - - - - Has large instance set - - - - - - - - Lycra - - - - - - - - - - - - - - Has datatype - - - - - - - - - - - - - - - - - - - - - - - Superclass - - - - - - - - - - - - - - Create actions - - - - - - - - - - - - - - Has role type - - - - - - - - - - - - - - Field definition - - - - - - - - - 000019000 - - - - - - - - - 000029000 - - - - - - - - - 000044000 - - - - - - - - - 000000000 - - - - - - - - - 000032000 - - - - - - - - - 000041000 - - - - - - - - - 000043000 - - - - - - - - - 000001000 - - - - - - - - - 000051000 - - - - - - - - - 000048000 - - - - - - - - - - - - - - Datatype locator - - - - - - - - - - - - - - Association field - - - - - - - - - 000021000 - - - - - - - - - 000000000 - - - - - - - - - 000023000 - - - - - - - - - 000001000 - - - - - - - - - - - - - - Association type - - - - - - - - - - - - - - User-interface ontology - - - - - - - - - - - - - - - - - - - Subordinate role type - - - - - - - - - - - - - - Ontology type - - - - - - - - - 000000000 - - - - - - - - - - - - - - Has large instance set - - - - - - - - - - - - - - - - - - - - - - - - Tuv D Turstrømpe - - - - - - 169 - - - - - - - - - - - - - - - - - - - - Has occurrence type - - - - - - - - - - - - - - Roles - - - - - - - - Jente - - - - - - - - - - - - - - Is hidden type - - - - - - - - - - - - - - Hidden - - - - - - - - - - - - - - Used by - - - - - - - - - - - - - - - - - - - Tolog declarations - - - - - - - - - - - - - - - - - Hierarchy - - - - - - Forms hierarchy for - - - Forms hierarchy for - - - - - - - - - - - - - - Create action - - - - - - - - - 000001000 - - - - - - - - - 000042000 - - - - - - - - - 000000000 - - - - - - - - - - - - - - Large instance set - - - - - - - - Sko - - - - - - - - - 000000001 - - - - - - - - - - - - - - Role field - - - - - - select $T from { instance-of($T, on:topic-type) | instance-of($T, on:role-type) }? - - - - - - - - - - - - - - Has cardinality - - - - - - - - - - - - - - Use edit mode - - - - - - - - - - - - - - Browse dialog - - - - - - - - - - - - - - Field value order - - - - - - - - - - - - - - Topic map - - - - - - - - - 000003000 - - - - - - - - - 000013000 - - - - - - - - - 000007000 - - - - - - - - - 000000000 - - - - - - - - - 000012000 - - - - - - - - - - - - - - Subject identifier - - - - - - - - - - - - - - - - - 50 - - - - - - 5 - - - - - - - - Bles D Bukse - - - - - - 299 - - - - - - Lett og luftig bukse i Lightshell materiale, som er en kombinasjon av polyester og elastan. Denne kombinasjonen gjør plagget elastisk og behagelig å ha på, samt at bevegeligheten er meget god. Bles Bukse har stikklommer med glidelås, to lårlommer med glidelås og en baklomme. I tillegg har den strikk i deler av livet og formsydde knær for bedre passform. Nederst i buksen er det glidelåsåpning og strikk. Bles Bukse er en litt smalere modell med god stretch. Lightshell produkter har lav vekt og trekker til seg svært lite fuktighet. - - - - - - - - - - - - - - - - - - 499 - - - - - - - - Jakke - - - - - - - - - 000000012 - - - - - - - - - 000000013 - - - - - - - - - 000000010 - - - - - - - - - 000000001 - - - - - - - - - 000000008 - - - - - - - - - 000000009 - - - - - - - - - 000000011 - - - - - - - - - 000000014 - - - - - - - - - - - - - - Superordinate role - - - - - - - - Bilde URL - - - - - - - - - - - Veiledende pris - - - - - - - - - - - - - - Is embedded view - - - - - - - - - - - - - - Has association type - - - - - - - - - - - - - - - Date - - - - - - - - - - - - - - - - - Kategori - - - - - - - - - 000000001 - - - - - - - - - - - - - - Auto-complete - - - - - - - - - - - - - - Field cardinalities - - - - - - - - - - - 499 - - - - - - 42 41 40 39 38 37 36 - - - Gvarv Fjellsko - - - - - - 999 - - - - - - https://www.stormberg.no/img/products/7466P_1_primary.jpg - - - - - - En høy fjellsko for turer i skog og fjell. Skoen gir god støtte, og egner seg godt i ulendt terreng. Ytterside i numbuck, som er en type mykt skinn som ofte brukes i hikingsko. Skoen har en ProreTex membran, og er vanntett og fukttransporterende. En høy og behagelig sko med god passform og en slitesterk og fleksibel GripeHike såle med antisklifunksjon. Dette gjør skoen godt egnet til turer i våte og tørre terrenger. Tilpasset en kvinnes fot. - - - - - - https://www.stormberg.no/no/Produkter/Sko/Sko-dame/Sko-dame/Gvarv-D-Fjellsko - - - - - - - - - - - - - - - - - - 999 - - - - - - 499 - - - - - - - - - - - - En høy fjellsko for turer i skog og fjell. Skoen gir god støtte, og egner seg godt i ulendt terreng. Ytterside i numbuck, som er en type mykt skinn som ofte brukes i hikingsko. Skoen har en ProreTex membran, og er vanntett og fukttransporterende. En høy og behagelig sko med god passform og en slitesterk og fleksibel GripeHike såle med antisklifunksjon. Dette gjør skoen godt egnet til turer i våte og tørre terrenger. Tilpasset en kvinnes fot. - - - - - - - - - - - - - - Edit mode - - - - - - - - - 000000000 - - - - - - - - - 000040000 - - - - - - - - - 000001000 - - - - - - - - - - - - - - - - - Name type - - - - - - - - - 000003000 - - - - - - - - - 000001000 - - - - - - - - - 000000000 - - - - - - - - - 000036000 - - - - - - - - - 000017000 - - - - - - - - - 000018000 - - - - - - - - - - - - - - - - - - - - - - - - - Association field view - - - - - - - - Gaupe tursko - - - - - - - - - - - - 799 - - - - - - En mellomhøy tursko med god støtte rundt ankelen. Skoen er god til vanlig turgåing, samt til turer i fjellet og i skogen. En allsidig sko som passer til de fleste gåaktiviteter. Yttersiden er i mesh og skinn, og og har en proreTex membran som gjør den vanntett med fukttransporterende egenskaper. En god og behagelig sko med god passform og en slitesterk og fleksibel GripeHike såle med antisklifunksjon, som gjør skoen godt egnet til turer i våte og tørre terrenger. NB: Denne modellen er liten i str. og vi anbefaler deg derfor å gå opp et nummer. - - - - - - 249 - - - - - - - - - - - - - - - - - - - - - - - Topic type - - - - - - - - - 000030000 - - - - - - - - - 000018000 - - - - - - - - - 000080000 - - - - - - - - - 000001000 - - - - - - - - - 000017000 - - - - - - - - - 000039000 - - - - - - - - - 000072000 - - - - - - - - - 000014000 - - - - - - - - - 000000000 - - - - - - - - - 000003000 - - - - - - - - - - - - - - - - - - - - - - - - - Cardinality - - - - - - - - - - - - - - Hierarchical Relation Type - - - - - - - - - 000000000 - - - - - - - - - - - - - - Fields in view - - - - - - - - - - - - - - Advanced - - - - - - - - - - - - - - - - - - - Value view - - - - - - - - - - - - - - Role field - - - - - - - - - 000076000 - - - - - - - - - 000075000 - - - - - - - - - 000041000 - - - - - - - - - 000043000 - - - - - - - - - 000019000 - - - - - - - - - 000024000 - - - - - - - - - 000029000 - - - - - - - - - 000048000 - - - - - - - - - 000032000 - - - - - - - - - 000044000 - - - - - - - - - 000051000 - - - - - - - - - 000077000 - - - - - - - - - 000046000 - - - - - - - - - 000001000 - - - - - - - - - 000000000 - - - - - - - - - 000025000 - - - - - - - - - - - - - - Topic Maps ontology - - - - - - - - - - - - - - Parent view - - - - - - - - - - - - - - Not traversable - - - - - - - - - - - Kjønn - - - - - - - - - 000000001 - - - - - - - - - - - - - - Used by - - - - - - - - - - - - - - Is sortable field - - - - - - - - - - - - - - Is abstract - - - - - - - - Solglimt D Ultrafleece Genser - - - - - - Fleecegenser med print i myk og god 155 grams ultrafleece. Solglimt fleecegenser er antinuppe behandlet og veldig myk å ha på. Enhåndsstramming nederst i genseren. - - - - - - - - - - - - - - - - - - 199 - - - - - - 299 - - - - - - - - - - - - - - Item identifier - - - - - - - - - - - - - - Is embedded view - - - - - - - - - - - - - - Has name type - - - - - - - - - - - - - - Go to new topic - - - - - - - - - - - - - - Occurrence type - - - - - - - - - - - - - - Field in view - - - - - - - - - - - - - - View mode - - - - - - - - - - - - - - Default - - - - - - - - - - - - - - Width - - - - - - - - - - - https://www.stormberg.no/no/Produkter/Dame/Dame/Bukser/Capribukser/Solglimt-D-Knebukse/ - - - - - - XL - - - - - - L - - - - - - M - - - - - - XS - - - - - - https://www.stormberg.no/img/products/8166P_1_full.jpg - - - - - - 399 - - - - - - 199 - - - - - - Knebukse i myk og tynn 155 grams ultrafleece. Solglimt knebukser er antinuppe behandlet og veldig myk å ha på. Den har bred ribbekant i livet og nederst i beinene. En knebukse for kosestunder i den varmere årstiden. - - - Solglimt D Knebukse - - - - - - S - - - - - - 149 - - - - - - Knebukse i myk og tynn 155 grams ultrafleece. Solglimt knebukser er antinuppe behandlet og veldig myk å ha på. Den har bred ribbekant i livet og nederst i beinene. En knebukse for kosestunder i den varmere årstiden. - - - - - - 199 - - - - - - - - - - - - - - - - - - - - Lightshell - - - - - - - - Sti Turbukse - - - - - - - - - - - - - - - - - - 399 - - - - - - - - - - - - Turbukse i GX-Ultra materiale, bestående av 65% polyester og 35% bomull. Yttersiden er børstet og impregnert, som gjør materialet vindtett og vannavstøtende, og er samtidig ventilerende. Materialet er laget av tynnspunnet tråd, og er dermed lett og behagelig i bruk. Buksen har en ventilasjonsåpning på låret, stramming nederst i beinene og forhøyet rygg. Den har strikk i livet formsydde knær for bedre passform. Buksen har en baklomme med glidelås og en stikklomme på hver side. - - - - - - - - - - - - - - - - - 5 - - - - - - 50 - - - - - - - - - - - - - - No edit - - - - - - - - - - - - - - Identity type - - - - - - - - - - - - - - Hierarchical for - - - - - - - - - - - - - - Use value view - - - - - - - - Genser - - - - - - - - - 000000001 - - - - - - - - - - - - - - Superordinate role type - - - - - - - - Herre - - - - - - - - - - - 5 - - - - - - - - - - - - - - Players types query - - - - - - - - - - - - - - Occurrence field - - - - - - - - - 000051000 - - - - - - - - - 000029000 - - - - - - - - - 000032000 - - - - - - - - - 000019000 - - - - - - - - - 000073000 - - - - - - - - - 000028000 - - - - - - - - - 000074000 - - - - - - - - - 000048000 - - - - - - - - - 000044000 - - - - - - - - - 000001000 - - - - - - - - - 000043000 - - - - - - - - - 000037000 - - - - - - - - - 000041000 - - - - - - - - - 000000000 - - - - - - - - Tolga Tursokk - - - - - - 159 - - - - - - 79 - - - - - - Myk og behagelig tursokk som passer for lengre turer i skog og mark, med og uten ski på beina. Sokkene holder føttene varme, samtidig som materialet Coolmax holder føttene tørrere når aktivitetsnivået blir høyt. Elastisk strikk og forsterkninger på utsatte steder gir sokken en meget god passform. - - - - - - - - - - - - - - - - - - - - - - - - - - Name field - - - - - - - - - 000019000 - - - - - - - - - 000041000 - - - - - - - - - 000035000 - - - - - - - - - 000000000 - - - - - - - - - 000001000 - - - - - - - - - 000048000 - - - - - - - - - 000044000 - - - - - - - - - 000032000 - - - - - - - - - 000051000 - - - - - - - - - 000043000 - - - - - - - - - 000029000 - - - - - - - - - - - - - - Abstract - - - - - - - - Coolmax - - - - - - - - - - - - - - Embedded - - - - - - - - - - - - - - Use interface control - - - - - - - - - - - - - - Is hidden type - - - - - - - - - - - - - - Is symmetric - - - - - - - - Polyester - - - - - - - - - - - - - - Child view - - - - - - - - - - - - - - Public system topic - - - - - - - - - 000000000 - - - - - - - - - - - - - - Ontology Version - - - - - - - - - - - - - - Zero or one - - - - - - 1 - - - - - - 0 - - - - - - - - - - - - - - Hidden - - - - - - - - - - - - - - Interface control - - - - - - - - - 000001000 - - - - - - - - - 000000000 - - - - - - - - - 000047000 - - - - - - - - - - - 7 - - - - - - - - - - - - - - Parent view - - - - - - - - - - - - - - - - - Association type - - - - - - - - - 000000000 - - - - - - - - - 000018000 - - - - - - - - - 000067000 - - - - - - - - - 000069000 - - - - - - - - - 000022000 - - - - - - - - - 000017000 - - - - - - - - - 000020000 - - - - - - - - - 000001000 - - - - - - - - - 000003000 - - - - - - - - - 000071000 - - - - - - - - - - - - - - System topic - - - - - - - - - 000000000 - - - - - - - - Tilbudspris - - - - - - - - - - - - - - - - - - - - - - - - - Has field - - - - - - - - Elastan - - - - - - - - Lia Stretch Bukse - - - - - - - - - - - - En lett og bevegelig turbukse i StretchPro 4 ribstop i nylon og lycra. Denne kombinasjonen gir buksen en stretch kvalitet som gir en god bevegelsesfrihet. For bedre komfort har buksen strikk i deler av livet. Ellers har buksen to lårlommer med glidelåslomme over. Buksen tåler godt litt nedbør og er luftig og god. - - - - - - - - - - - - 599 - - - - - - - - - - - - - - Superordinate Role Type - - - - - - - - - 000000000 - - - - - - - - - - - - - - Zero or more - - - - - - 0 - - - - - - - - - - - - - - Is read-only type - - - - - - - - - - - - - - Forms hierarchy for - - - - - - - - - - - - - - Has role type - - - - - - - - - - - - - - Role field view - - - - - - - - - - - - - - Name field - - - - - - - - - - - - Version - - - - - - - - Fryd Softshell Jakke - - - - - - 199 - - - - - - Vannavstøtende softshelljakke med stretch funksjon og lav vekt. Jakken har glidelås lommer, enhåndsstramming nederst og en tynn anti-nuppe behandlet fleece på innsiden. En tynnere og lettere softshelljakke til allsidig bruk. - - - - - - 299 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - Height - - - - - - - - - - - - - - Players search query - - - - - - - - - - - - - - Existing values only - - - - - - - - GoreTex - - - - - - - - - - - - - - Datatype - - - - - - - - - 000027000 - - - - - - - - - 000008000 - - - - - - - - - 000000000 - - - - - - - - - 000001000 - - - - - - - - - - - - - - Field - - - - - - - - - - - - - - Use View mode - - - - - - - - Størrelse - - - - - - - - - - - - - - Uses interface control - - - - - - - - - - - - - - Subordinate role type - - - - - - - - - - - - - - Has cardinality - - - - - - - - - - - - - - - - - - - Field order - - - - - - - - - - - - - - Ontology - - - - - - - - - 000000000 - - - - - - - - - - - - - - - Name - - - - - - - - - - - - - - Association field - - - - - - - - - - - - - - Used by - - - - - - - - - - - - - - - URI - - - - - - - - - - - - - - - - - - - - Exactly one - - - - - - 1 - - - - - - 1 - - - - - - - - - - - - - - Symmetric - - - - - - - - - - - Stofftype - - - - - - - - - 000000001 - - - - - - - - - - - - - - Has name type - - - - - - - - - - - - - - - Description - - - - - - - - Vigør Ultrafleece Genser - - - - - - 199 - - - - - - - - - - - - - - - - - - - - Bomull - - - - - - - - - - - - - - Subject locator - - - - - - - - - - - - - - Players query - - - - - - - - URL - - - - - - Address to relevant web site - - - - - - - - Nylon - - - - - - - - - - - - - - Is hidden view - - - - - - - - - - - - - - - - - Occurrence type - - - - - - - - - 000038000 - - - - - - - - - 000003000 - - - - - - - - - 000017000 - - - - - - - - - 000001000 - - - - - - - - - 000018000 - - - - - - - - - 000000000 - - - - - - - - - - - - - - Image - - - - - - - - - - - - - - - - - - - - - - - - - Bukse - - - - - - - - - 000000014 - - - - - - - - - 000000010 - - - - - - - - - 000000012 - - - - - - - - - 000000013 - - - - - - - - - 000000001 - - - - - - - - - 000000008 - - - - - - - - - 000000009 - - - - - - - - - 000000011 - - - - - - - - - - - - - - Interface control - - - - - - - - - - - - - - Occurrence field - - - - - - - - - - - Bildeadresse - - - - - - - - - - - - - - Use view mode - - - - - - - - - - - - - - - - - - - Hierarchy definition query - - - - - - - - - - - - - - Association field - - - - - - - - - - - - - - Name field view - - - - - - - - - - - - - - Occurrence field - - - - - - - - - - - - - - Has association type - - - - - - - - - - - - - - Edit modes - - - - - - - - - - - - - - - - - - Subclass - - - - - - - - - - - - - - Embedded views - - - - - - - - - - - Tilbudspris - - - - - - - - - - - - - - Subclass - - - - - - select $TT from direct-instance-of(%topic%, $TT), {$TT = on:topic-type | $TT = on:association-type | $TT = on:occurrence-type | $TT = on:name-type | $TT = on:role-type}? - - - - - - select $T from direct-instance-of(%topic%, $TT), direct-instance-of($T, $TT), $T /= %topic%? - - - - - - - - - - - - - - - - - - - Hidden views - - - - - - - - - - - - - - - Datetime - - - - - - - - - - - - - - - - - - - - Fields in view - - - - - - - - - - - - - - Use create action - - - - - - - - Lende Softshell Jakke - - - - - - 799 - - - - - - - - - - - - - - - - - - 399 - - - - - - - - Skinn - - - - - - - - - - - - - - Occurrence field view - - - - - - - - - - - - - - Drop-down list - - - - - - - - - - - - - - Field owner - - - - - - - - used in - - - - - - - - - - - - - - Search dialog - - - - - - - - - - - - - - Subordinate role type for - - - - - - - - - - - - - - Use edit mode - - - - - - - - Beskrivelse - - - - - - - - - - - - - - Subordinate role - - - - - - - - - - - - - - Use create action - - - - - - - - - - - - - - - - - 5 - - - - - - 50 - - - - - - - - - - - - - - Edit new topic in popup window - - - - - - - - - - - - - Solglimt D Fleecejakke - - - - - - XL L M S XS - - - - - - https://www.stormberg.no/no/Produkter/Dame/Dame/Overdeler/Fleece/Solglimt-D-Fleecejakke - - - - - - https://www.stormberg.no/img/products/8157P_1_primary.jpg - - - - - - 199 - - - - - - 399 - - - - - - Fleece hettejakke med print i stoffet, i en myk og god 200 grams microfleecekvalitet. Solglimt D hettejakke har fast hette og to glidelåslommer. Fleecen er antinuppebehandlet og veldig myk å ha på. Noe innsvingt for en mer feminin form. - - - - - - 399 - - - - - - - - - - - - - - - - - - Fleece hettejakke med print i stoffet, i en myk og god 200 grams microfleecekvalitet. Solglimt D hettejakke har fast hette og to glidelåslommer. Fleecen er antinuppebehandlet og veldig myk å ha på. Noe innsvingt for en mer feminin form. - - - - - - 199 - - - - - - - - - - - - - - Hierarchical associations - - - - - - - - - - - - - - None - - - - - - - - - - - - - - Is hidden view - - - - - - - - - - - - - - Is symmetric - - - - - - - - - - - - Creator - - - - - - - - - - - - - - One or more - - - - - - 1 - - - - - - - - - - - - - - - - - - - - - Subclass of - - - - - - Superclass of - - - Superclass/subclass - - - - - - - - - - - 1799 - - - - - - 699 - - - - - - https://www.stormberg.no/img/products/7922P_1_primary.jpg - - - Langvik 3lags D PT Jakke - - - - - - Allsidig skalljakke til bruk i all slags vær og til de fleste aktiviteter. Jakken er i 3-lags PowStretch, og er vind- og vanntett samt har en fuktransporterende evne på 3000. I tillegg har jakken en stretch funksjon som gjør den bevegelig og behagelig i bruk under aktiviteter. Foruten fast hette med strammemuligheter, har jakken ventilasjonsåpninger under armene, tre glidelåslommer og enhåndsstramming nederst. Fleecefòr på innsiden av kragen. Yttersiden består av et mykt og behagelig skallmateriale som er laminert til en ProreTex 8-3 membran. Alle sømmer er tapede. Jakken er innsvingt for en mer feminin passform. - - - - - - https://www.stormberg.no/no/Produkter/Outlet/Outlet-dame/Jakker/Langvik-3lags-D-PT-Jakke/ - - - - - - - - - - - - 1799 - - - - - - - - - - - - Allsidig skalljakke til bruk i all slags vær og til de fleste aktiviteter. Jakken er i 3-lags PowStretch, og er vind- og vanntett samt har en fuktransporterende evne på 3000. I tillegg har jakken en stretch funksjon som gjør den bevegelig og behagelig i bruk under aktiviteter. Foruten fast hette med strammemuligheter, har jakken ventilasjonsåpninger under armene, tre glidelåslommer og enhåndsstramming nederst. Fleecefòr på innsiden av kragen. Yttersiden består av et mykt og behagelig skallmateriale som er laminert til en ProreTex 8-3 membran. Alle sømmer er tapede. Jakken er innsvingt for en mer feminin passform. - - - - - - 699 - - - - - - - - - - - - - - Role type - - - - - - - - - - - - - - Has identity type - - - - - - - - - - - - - - Name type - - - - - - - - - - - - - - Has identity type - - - - - - - - - - - - - Softshell - - - - - - - - - - - - - - - - - Association role type - - - - - - - - - 000017000 - - - - - - - - - 000026000 - - - - - - - - - 000068000 - - - - - - - - - 000070000 - - - - - - - - - 000001000 - - - - - - - - - 000003000 - - - - - - - - - 000018000 - - - - - - - - - 000000000 - - - - - - - - Skogli Fjellstøvel - - - - - - 799 - - - - - - - - - - - - - - - - - - - - - - - - Høy fjellstøvel for lengre jakt-og fjellturer i ulendt terreng. Yttersiden er i numbuck, som er en type mykt skinn som ofte brukes i hikingsko. Dette er en støvel som er vanntett, og som har en slitesterk og stabil GripeHike såle med antiskli funksjon. Fjellstøvelen har god passform og er kraftig og robust. NB: Denne modellen er liten i str. og vi anbefaler deg derfor å gå opp et nummer. - - - - - - 1399 - - - - - - - - - - - - - - Superclass-subclass - - - - - - - - - - - - - - View mode - - - - - - - - - 000001000 - - - - - - - - - 000050000 - - - - - - - - - 000000000 - - - - - - - - - - - - - - Used by - - - - - - - - - - - - - - Normal - - - - - - - - - - - - - - Superordinate role type - - - - - - - - - - - - - - - - - stormberg - - - - - - Stig Lau - - - - - - 1.9 - - - - - - 1.0 - - - - - - - - - - - S - - - - - - L - - - - - - 799 - - - - - - XS - - - Finndalen Turbukse - - - - - - M - - - - - - https://www.stormberg.no/no/Produkter/Dame/Dame/Bukser/Fritidsbukser/Finndalen-D-Turbukse - - - - - - XL - - - - - - - - - - - - - - - - - - Jakt- og turbukse i Stretch Pro 4 stoff. Stoffet består av nylon og spandex, og gir god bevegelighet. På utsatte steder som knær, i baken og på innsiden av leggene har buksen et slitesterkt og vindtett GX-Ultra stoff. Buksen har strikk i livet med beltehemper, formsydde knær, to lårlommer som hver har to glidelåslommer. I tillegg har den to stikklommer, glidelåsåpning i beinene og strammefunksjon med knapper nederst i beinene. Buksene er sydd for passe for kvinnelige former. - - - - - - - - - - - - 799 - - - - - - - - - - - - - - - String - - - - - - - - - - - - - - - - - Klesplagg - - - - - - - - - 000001009 - - - - - - - - - 000001007 - - - - - - - - - 000001014 - - - - - - - - - 000001011 - - - - - - - - - 000001006 - - - - - - - - - 000000001 - - - - - - - - - 000001012 - - - - - - - - - 000001010 - - - - - - - - - 000001008 - - - - - - - - - 000001005 - - - - - - - - - 000001013 - - - - - - - - - - - - - - - - - 5 - - - - - - 50 - - - - - - - - made of - - - - - - - - - - - - - - Identity field - - - - - - - - - 000019000 - - - - - - - - - 000048000 - - - - - - - - - 000001000 - - - - - - - - - 000044000 - - - - - - - - - 000032000 - - - - - - - - - 000000000 - - - - - - - - - 000041000 - - - - - - - - - 000051000 - - - - - - - - - 000033000 - - - - - - - - - 000029000 - - - - - - - - - 000043000 - - - - - - - - Dame - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/sandbox/ontopia-stormberg-demowebapp/src/main/webapp/WEB-INF/decorators.xml b/sandbox/ontopia-stormberg-demowebapp/src/main/webapp/WEB-INF/decorators.xml deleted file mode 100644 index da1660076..000000000 --- a/sandbox/ontopia-stormberg-demowebapp/src/main/webapp/WEB-INF/decorators.xml +++ /dev/null @@ -1,5 +0,0 @@ - - - /product/* - - \ No newline at end of file diff --git a/sandbox/ontopia-stormberg-demowebapp/src/main/webapp/WEB-INF/web.xml b/sandbox/ontopia-stormberg-demowebapp/src/main/webapp/WEB-INF/web.xml deleted file mode 100644 index c4524e8e7..000000000 --- a/sandbox/ontopia-stormberg-demowebapp/src/main/webapp/WEB-INF/web.xml +++ /dev/null @@ -1,15 +0,0 @@ - - - - Ontopia Stormberg Web Application - - sitemesh - com.opensymphony.sitemesh.webapp.SiteMeshFilter - - - - sitemesh - /* - - diff --git a/sandbox/ontopia-stormberg-demowebapp/src/main/webapp/klesplaggListe.jsp b/sandbox/ontopia-stormberg-demowebapp/src/main/webapp/klesplaggListe.jsp deleted file mode 100644 index f1f57b933..000000000 --- a/sandbox/ontopia-stormberg-demowebapp/src/main/webapp/klesplaggListe.jsp +++ /dev/null @@ -1,18 +0,0 @@ -<%@ taglib prefix="tolog" uri="http://psi.ontopia.net/jsp/taglib/tolog" %> -<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %> -<%@ page isELIgnored="false" %> -

    Klesplaggliste

    - - using stormberg for i"http://psi.stormberg.no/" - - instance-of($KLESPLAGG, stormberg:klesplagg)? - - -
    - - - - ${topicName} -
    -
    -
    \ No newline at end of file diff --git a/sandbox/ontopia-stormberg-demowebapp/src/main/webapp/product/andre-produkter.jsp b/sandbox/ontopia-stormberg-demowebapp/src/main/webapp/product/andre-produkter.jsp deleted file mode 100644 index da8dc33e2..000000000 --- a/sandbox/ontopia-stormberg-demowebapp/src/main/webapp/product/andre-produkter.jsp +++ /dev/null @@ -1,22 +0,0 @@ -<%@ taglib prefix="tolog" uri="http://psi.ontopia.net/jsp/taglib/tolog" %> -<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %> -<%@ page isELIgnored="false" %> - - - using stormberg for i"http://psi.stormberg.no/" - - - -

    Andre aktuelle produkter

    - - - - - - - -
    -
    diff --git a/sandbox/ontopia-stormberg-demowebapp/src/main/webapp/product/klesplagg.jsp b/sandbox/ontopia-stormberg-demowebapp/src/main/webapp/product/klesplagg.jsp deleted file mode 100644 index 3280431d8..000000000 --- a/sandbox/ontopia-stormberg-demowebapp/src/main/webapp/product/klesplagg.jsp +++ /dev/null @@ -1,48 +0,0 @@ -<%@ taglib prefix="tolog" uri="http://psi.ontopia.net/jsp/taglib/tolog" %> -<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %> -<%@ page isELIgnored="false" %> - - - - using ontopia for i"http://psi.ontopia.net/ontology/" - using stormberg for i"http://psi.stormberg.no/" - - - - - - - - ${topicName} - Stormberg - -

    ${topicName}

    - - - - Bilde av ${topicName} - - - -

    Beskrivelse

    - -
    - - - -

    Veiledende pris

    - -
    - - -

    Tilbudspris

    - -
    - - -

    stormberg.no webadresse

    - - ${topicName} -
    - -
    -
    diff --git a/sandbox/ontopia-stormberg-demowebapp/src/main/webapp/product/product-decorator.jsp b/sandbox/ontopia-stormberg-demowebapp/src/main/webapp/product/product-decorator.jsp deleted file mode 100644 index 00451a3cd..000000000 --- a/sandbox/ontopia-stormberg-demowebapp/src/main/webapp/product/product-decorator.jsp +++ /dev/null @@ -1,28 +0,0 @@ -<%@ taglib prefix="decorator" uri="http://www.opensymphony.com/sitemesh/decorator" %> -<%@ page isELIgnored="false" %> - - - - - <decorator:title default="Single product"/> - - - -
    - -
    - - - - - diff --git a/sandbox/ontopia.net/WEB-INF/topicmaps/ontopia.xtm b/sandbox/ontopia.net/WEB-INF/topicmaps/ontopia.xtm deleted file mode 100644 index 9e0d95dff..000000000 --- a/sandbox/ontopia.net/WEB-INF/topicmaps/ontopia.xtm +++ /dev/null @@ -1,20707 +0,0 @@ - - - - - - - - - - - - - - Subordinate role type - - - - - - - - - - - - - - - - - - - - - - - - - Identity field - - - - - - - - Ontopia specifications - - - - - - 3 - - - - - - - - Big image - - - - - - - - - - - - - - - - - Occurrence type - - - - - - - - - 000038000 - - - - - - - - - 000000000 - - - - - - - - - 000017000 - - - - - - - - - 000018000 - - - - - - - - - 000001000 - - - - - - - - - 000003000 - - - - - - - - - - - - - - Has role type - - - - - - - - - - - Order - - - - - - - - - - - - - - Has identity type - - - - - - - - - - - - - - Field definition - - - - - - - - - 000032000 - - - - - - - - - 000000000 - - - - - - - - - 000001000 - - - - - - - - - 000019000 - - - - - - - - - 000043000 - - - - - - - - - 000044000 - - - - - - - - - 000029000 - - - - - - - - - 000041000 - - - - - - - - - 000051000 - - - - - - - - - 000048000 - - - - - - - - - - - - - - Embedded - - - - - - - - - - - - - - Players search query - - - - - - - - - - - Q: A unifying model for RDF and Topic Maps - - - - - - 2 - - - - - - This paper defines a formal model, called Q, in which Topic Maps and RDF have the same representation, which means that it's possible to hide most differences between the two by using this model. The paper is very technical, and assumes familiarity with both Topic Maps and RDF, so it may be best to read the "Living..." paper first. The slides from the presentation are also available. - - - - - - - - From blog - - - - - - - - - - - - - - Use edit mode - - - - - - - - - - - - Version - - - - - - - - - - - ISO 13250-3: XTM 2.0 - - - - - - The current standard XML syntax for Topic Maps, defined in terms of the TMDM. This syntax is implemented by Ontopia and many other Topic Maps tools. - - - - - - 2 - - - - - - - - - - - - - - Name field view - - - - - - - - - - - - - - Subordinate role - - - - - - - - - - - Person - - - - - - - - - 000000001 - - - - - - - - - 000001001 - - - - - - - - - 000002001 - - - - - - - - - - - Canonical XTM - - - - - - A proposal for a canonical XML-based format for Topic Maps suitable for use in test suites and so on. Now obsolete and replaced by the ISO standard CXTM. - - - - - - 6 - - - - - - - - - - - Linear Topic Map Notation (LTM) - - - - - - A compact textual syntax for writing Topic Maps, handy when authoring Topic Maps in a text editor. - - - - - - 1 - - - - - - - - - - - - - - - - - 50 - - - - - - 5 - - - - - - - - - - - - - - Owned values - - - - - - - - Knowledge Synergy - - - - - - http://www.knowledge-synergy.com/index-en.html - - - - - - <P>Knowledge Synergy is a Japanese company. It has been devoted to Topic Maps-related activities for many years. With the aid of Bouvet, Knowledge Synergy, a partner of Bouvet, collaborates and offers advisory consulting, support, training and solution development concerning Topic Maps and Ontopia mainly in Asia.</P> - - - - - - knowledge-synergy-logo.png - - - - - - - - - - - Euler, topic maps and revolution - - - - - - 364kb - - - - - - 2 - - - - - - The original paper from XML Europe 1999 containing an introduction (now superceded), an account of the applicability of topic maps to reference works publishing (see rather the Markup Languages article, above), and the Euler Connection. - - - - - - - - - - - - - - Has association type - - - - - - - - - - - - - - Has association type - - - - - - - - - - - - - - - - - Association role type - - - - - - - - - 000000000 - - - - - - - - - 000003000 - - - - - - - - - 000017000 - - - - - - - - - 000070000 - - - - - - - - - 000026000 - - - - - - - - - 000001000 - - - - - - - - - 000018000 - - - - - - - - - 000068000 - - - - - - - - - - - Article - - - - - - - - - 000004001 - - - - - - - - - 000001001 - - - - - - - - - 000003001 - - - - - - - - - 000005001 - - - - - - - - - 000002001 - - - - - - - - - 000000001 - - - - - - - - - - - - - - Forms hierarchy for - - - - - - - - - - - - - - View mode - - - - - - - - - 000000000 - - - - - - - - - 000001000 - - - - - - - - - 000050000 - - - - - - - - - - - - - - Association field view - - - - - - - - - - - - - - Name type - - - - - - - - - - - Living with topic maps and RDF - - - - - - About how to deal with both topic maps and RDF. The paper shows how to do data conversion in both directions, how to convert RDF schemas to topic map schemas, how to use OWL with topic maps, shows how to do queries across both representations, and also shows how it is possible to have vocabularies that can be used with both topic maps and RDF. - - - - - - 1 - - - - - - - - - - - - - - Create actions - - - - - - - - - - - - - - Field value order - - - - - - - - - - - - - - Has large instance set - - - - - - - - - - - - - - - - Ontopia Schema Language (OSL) - - - - - - 5 - - - - - - A tutorial introducing the Ontopia Schema Language developed for Ontopia. It is now mostly of historical interest, and will be replaced by the ISO standard TMCL. - - - - - - - - Advanced - - - - - - advanced - - - - - - 4 - - - - - - Advanced papers on subjects related to Topic Maps, going into more depth. - - - - - - - - - - - - - - Players query - - - - - - - - - - - - - - Existing values only - - - - - - - - - - - - - - Superordinate role type - - - - - - - - - - - Steve Pepper - - - - - - - - The engine - - - - - - engine - - - - - - 01 - - - - - - <P>The Topic Maps engine is the heart of Ontopia, since it takes care of storing and providing access to the topic maps in the system. Essentially, the engine is a set of Java APIs, for</P><UL><LI>Accessing and modifying any part of a topic map</LI><LI>Importing topic maps from file (in XTM 1.0, 2.0, CTM, TM/XML, or LTM format)</LI><LI>Exporting topic maps to file (to XTM 1.0, 2.0, TM/XML, or LTM format)</LI><LI>Converting from RDF to Topic Maps (and vice versa)</LI><LI>Executing queries using the tolog query language</LI><LI>Performing full-text search</LI></UL><P>The engine can keep topic maps in memory or store them in a relational database. The API to the engine is the same in both cases, so that applications can switch backends without changing anything more than the configuration. The following databases are supported:<BR></P><UL><LI>Oracle 8 or newer</LI><LI>Microsoft SQL Server 2005 or newer</LI><LI>PostgreSQL 7.4 or newer</LI><LI>MySQL 5.0 or newer</LI><LI>h2 version 1.1 or newer<BR></LI></UL> - - - - - - - - - - - Section - - - - - - section.jsp?id= - - - - - - - - - 000000002 - - - - - - - - - 000000003 - - - - - - - - - 000001003 - - - - - - - - - 000002003 - - - - - - - - - 000000001 - - - - - - - - - - - - - - One or more - - - - - - 1 - - - - - - - - - - - - - - Has cardinality - - - - - - - - - - - - - - - - - - - - - - - - - Large instance set - - - - - - - - - - - - - - Hierarchy definition query - - - - - - - - Web 2.0 - - - - - - 4 - - - - - - - - - - - - - - Occurrence field - - - - - - - - Date - - - - - - - - - - - - - - Data type - - - - - - - - - - - - - - Has association field - - - - - - - - - - - - - - Presentation about NRK/Skole case - - - - - - 2010-03-03 10:56:18 - - - - - - Lars Marius Garshol of Bouvet and Per Magnus Løvold and Eirik Befring of NRK (Norwegian National Broadcasting) did a presentation of the NRK/Skole project for the Norwegian Topic Maps User&#8217;s Group yesterday. The presentation is about the project itself, the ontology, experiences from the project, and the use of the national curriculum as linked data. [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=ontopia.wordpress.com&blog=7947028&post=218&subd=ontopia&ref=&feed=1" /> - - - - - - - - Web service interface - - - - - - <P>Ontopia has a web service interface which provides a number of generic requests such as get-topic, get-tolog (query results), delete-topic, add-fragment (in some Topic Maps syntax), and so on. This interface is exposed both as a plain HTTP interface and using SOAP, so that requests can be sent using both styles. <BR><BR>The web service interface is used by the graphical visualization applet to lazily download a topic map fragment by fragment as the user browses the topic map in the applet.<BR></P> - - - - - - tmrap - - - - - - 09 - - - - - - - - - - - Contained in - - - - - - - - - - - - - - New values only - - - - - - - - - - - XML Topic Maps (XTM) 1.0 - - - - - - The first XML syntax for Topic Maps, defined by TopicMaps.org in 2001, and later incorporated in the ISO standard. It has now been superseded by XTM 2.0. - - - - - - 2 - - - - - - - - - - - Sylvia Schwab - - - - - - - - - - - Structuring Scope - - - - - - Discusses the interpretation of scope (or the semantics of scope) and the effect of scope on the merging of topic characteristics when two topics are merged. - - - - - - 2 - - - - - - - - - - - The Ontopia MapMaker: Leveraging RDF to autogenerate Topic Maps - - - - - - Slides from a slightly naughty presentation describing a toolkit that uses RDF to generate topic maps from really dirty data. - - - - - - 211kb - - - - - - 3 - - - - - - - - - - - - - - Proposal for new REST API to Ontopia - - - - - - David Damen of SpaceApps has posted a proposal for a new RESTful web service interface to Ontopia. In a posting to the mailing list he says that SpaceApps is looking for community feedback on the API before they start implementing it later this summer. At this point it is not clear whether the new API [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=ontopia.wordpress.com&blog=7947028&post=244&subd=ontopia&ref=&feed=1" /> - - - - - - 2010-06-01 08:46:01 - - - - - - - - - - - - - - Edit modes - - - - - - - - The browser - - - - - - 02 - - - - - - <P>Omnigator is a web-based Topic Maps browser which can display any topic map. It is not intended as an end-user tool (although some have used it as such), but is more of a developer support since it can be used to view any part of any topic map. One user referred to it as a "Topic Maps debugger", which is quite accurate, but it is actually more than that, since it can be used to run tolog queries, validate topic maps, get size statistics, etc.</P> - - - - - - omnigator-screenshot.png - - - - - - omnigator - - - - - - - - Graphical visualization - - - - - - 05 - - - - - - <P>The Vizigator shows graphical visualizations of the structure of a topic map, which can be very useful for seeing larger patterns in complex data, or simply as a visually attractive and user-friendly alternative way of displaying the topic map.<BR><BR>The Vizigator has two parts: <STRONG>VizDesktop</STRONG>, a graphical interface for configuring the visualization, and <STRONG>Vizlet</STRONG>, a Java applet for displaying visualizations on the web. Using VizDesktop it is possible to configure which topic and association types to show, their shapes, sizes, colours, and fonts, attaching icons, and generally tuning the visualization for best results.<BR><BR>Setting up a visualization requires no programming, just creating a configuration in VizDesktop and deploying the applet together with the necessary web service interface on the server side.<BR></P> - - - - - - vizigator - - - - - - vizigator-screenshot-1.png - - - - - - - - - - - - - - Is symmetric - - - - - - - - - - - - - - View mode - - - - - - - - - - - Kal Ahmed - - - - - - - - - - - - - - - - - - - - - - tolog – a tutorial - - - - - - 1 - - - - - - A tutorial introduction to the tolog topic map query language, which is implemented in the Ontopia, and which can also be used in the Omnigator. - - - - - - - - - - - - - - Field order - - - - - - - - - - - Author of - - - - - - - - - - - News item - - - - - - - - - 000000006 - - - - - - - - - 000000003 - - - - - - - - - 000000001 - - - - - - - - - 000000005 - - - - - - - - - 000000004 - - - - - - - - - 000000002 - - - - - - - - - - - - - Conversion - - - - - - 5 - - - - - - - - - - - - - - Ontology type - - - - - - - - - 000000000 - - - - - - - - - - - - - - - Number - - - - - - - - - - - - - - pdf - - - - - - - - Specifications - - - - - - Specifications of technologies used in Ontopia, such as the LTM format, the tolog query language, the OSL schema language, and so on. - - - - - - specifications - - - - - - 3 - - - - - - - - - - - - - - Search dialog - - - - - - - - - - - - - - Superclass-subclass - - - - - - - - - - - - - - Edit mode - - - - - - - - - 000001000 - - - - - - - - - 000000000 - - - - - - - - - 000040000 - - - - - - - - - - - - - - Ontopia's Blog - - - - - - Blog for the Ontopia project - - - - - - - - - - - - - - Advanced - - - - - - - - - - - - - - Parent view - - - - - - - - - - - Internal URL - - - - - - - - - - - - - - Is hidden view - - - - - - - - - - - XTM Fragment Interchange - - - - - - A specification of how to create a valid XTM document that contains all information about a single topic, in such a way that multiple fragments can be retrieved using, say, a web service, and correctly merged together. - - - - - - 4 - - - - - - - - - - - - - - User-interface ontology - - - - - - - - - - - - - - Part of views - - - - - - - - - - - URL pattern - - - - - - - - - - - - - - Identity type - - - - - - - - - 000000000 - - - - - - - - - 000034000 - - - - - - - - - 000001000 - - - - - - - - - 000017000 - - - - - - - - - 000018000 - - - - - - - - - 000003000 - - - - - - - - - - - The Ontopia XTM Comments - - - - - - 7 - - - - - - Ontopia's comments on an early draft of the XTM 1.0 syntax. Made available here since it may be of historical interest. - - - - - - - - - - - - - - - String - - - - - - - - - - - - - - URL pattern - - - - - - - - The product (page for section) - - - - - - <P>Ontopia is a set of tools which contains everything you need to build a full Topic Maps-based application. Using Ontopia you can design your ontology, populate the topic map manually and/or automatically, build the user interface, show graphical visualizations of the topic map, and much more.<BR><BR>The core of Ontopia is the engine, which stores and maintains the topic maps, and has an extensive Java API. On top of it are built a number of additional components, as shown in the diagram below. More information about these components can be found on the right.<BR><BR>Ontopia is 100% Java, and runs on any operating system which has Java 1.5. It is fully open source and can be used without any restrictions beyond those in the Apache 2.0 license.<BR></P> - - - - - - ontopia-overview.png - - - - - - - - - - - - - - Use view mode - - - - - - - - - - - - - - Name field - - - - - - - - - - - - - - No edit - - - - - - - - - - - - Creator - - - - - - - - - - - - - - Subject identifier - - - - - - - - Automatic classification - - - - - - classify - - - - - - <P>The automatic classification module can process textual content in many different formats to extract the keywords which identify what the content is about. This can be used to automatically classify content into a topic map, or to provide suggestions for classification to users so that they can fine-tune the classification.</P><P>The input to the module is a file in some format. The module will extract the textual content from the file and process it to find the appropriate keywords for the content, which can then be used to classify the content. Each extracted keyword has an associated score (a number between 0 and 1), which indicates how relevant the keyword is to the content.</P><P>For example, processing <A href="http://www.ontopia.net/topicmaps/materials/tm-vs-thesauri.html" mce_href="http://www.ontopia.net/topicmaps/materials/tm-vs-thesauri.html">the Metadata? Thesauri? Taxonomies? Topic Maps! paper</A> using the module produces the following output:</P><UL><LI>topic maps, 1.0</LI><LI>Dublin Core metadata, 0.98</LI><LI>subject-based classification, 0.41</LI><LI>faceted classification, 0.34</LI><LI>metadata, 0.25</LI><LI>controlled vocabulary, 0.21</LI></UL><P>This could be used to automatically create topics for each keyword that receives a score higher than, say, 0.15, and automatically associate these topics with the classified content, thus automatically building a topic map.</P><P>The module supports formats like XML, HTML, PDF, Microsoft Word (binary and OOXML), Microsoft Powerpoint (binary and OOXML), and support for more formats can be added easily. It also supports English and Norwegian, but, again, support for more languages can be plugged in easily.</P> - - - - - - 10 - - - - - - - - - - - - - - Has name type - - - - - - - - - - - ISO/IEC 13250:2002 Topic Maps - - - - - - 217kb - - - - - - 1 - - - - - - The original Topic Maps standard was published in 1999. This is the updated edition from 2003, which includes the XTM 1.0 syntax. - - - - - - - - Abstract - - - - - - 60 - - - - - - 4 - - - - - - - - Semantic web - - - - - - 3 - - - - - - - - - - - Container - - - - - - - - - - - A Proposal for Extending Scope in XTM - - - - - - Outlines a proposal for an more prescriptive treatment of the concepts of scope and what it means for a characteristic assignment to be valid. The document goes on to propose the means by which this approach to scope might be encoded in an XML document. - - - - - - 1 - - - - - - - - - - - Abstract - - - - - - - - - - - Blog - - - - - - - - - 000000002 - - - - - - - - - 000000003 - - - - - - - - - 000000001 - - - - - - - - BrainBank Learning - - - - - - brainbank - - - - - - brainbank-screenshot.png - - - - - - An e-learning system where students use Topic Maps to model what they have learned and connect notes from different subjects and classes. - - - - - - <P>BrainBank Learning is a pedagogical tool for pupils and students of all ages, which allows students to build a structured mind map of the concepts they learn as they learn them. The purpose is to help students adopt better learning strategies (looking for key concepts and their relations) and to help them record and structure what they have learned. Teachers have access to the students' brainbanks and can comment on them and discuss them with students.<BR><BR>The system has been very popular with both students and teachers, and has received much praise from independent pedagogical researchers who have evaluated the system.<BR><BR>Links to some more information about the system:<BR></P><UL><LI><A href="http://brainbank.no/" mce_href="http://brainbank.no/">The official site</A></LI><LI><A href="http://cmc.ihmc.us/papers/cmc2004-013.pdf" mce_href="http://cmc.ihmc.us/papers/cmc2004-013.pdf">A paper about the system</A></LI><LI><A href="http://www.youtube.com/watch?v=-GNwM5qL-8I" mce_href="http://www.youtube.com/watch?v=-GNwM5qL-8I">A demo video</A> (in Norwegian)</LI></UL><P>The system runs on Ontopia, the Tomcat web server, and uses the PostgreSQL database for storing the topic map. The system is built almost entirely using Ontopia using the web framework.<BR></P> - - - - - - brainbank-logo.png - - - - - - - - - - - - - - Fields in view - - - - - - - - Meet us at TMRA 2010 - - - - - - 2010-09-29 12:00:00 - - - - - - The Ontopia project will have a presence at the TMRA 2010 conference in Leipzig, Germany. - - - - - - tmra-2010.png - - - - - - tmra-2010 - - - - - - <P>Exactly what we will be doing at <A href="http://tmra.de/2010/" mce_href="http://tmra.de/2010/">this year's TMRA</A> is not yet decided. There will definitely be some presentations, and perhaps a tutorial. A number of the project participants will also be at the conference, and you will have the opportunity to meet them.</P> -<P>We will update this page with more information as soon as we have it. The conference will be held on 29 September - 1 October 2010 in Leipzig, Germany.</P> - - - - - - - - - - - - - - Identity field view - - - - - - - - - - - - - - Use create action - - - - - - - - - - - Work - - - - - - - - - - - - - - Role type - - - - - - - - - - - - - - - - - - - Has datatype - - - - - - - - - - - - - - None - - - - - - - - - - - - - - Name field - - - - - - - - - 000035000 - - - - - - - - - 000032000 - - - - - - - - - 000000000 - - - - - - - - - 000041000 - - - - - - - - - 000001000 - - - - - - - - - 000051000 - - - - - - - - - 000043000 - - - - - - - - - 000048000 - - - - - - - - - 000044000 - - - - - - - - - 000019000 - - - - - - - - - 000029000 - - - - - - - - - - - - - - Sortable - - - - - - - - - - - - - - Public system topic - - - - - - - - - 000000000 - - - - - - - - - - - Company - - - - - - - - - 000000005 - - - - - - - - - 000000003 - - - - - - - - - 000000002 - - - - - - - - - 000000004 - - - - - - - - - 000000001 - - - - - - - - - - - - - - Zero or more - - - - - - 0 - - - - - - - - - - - - - - Image - - - - - - - - - - - - - - - - - - - - - - - 50 - - - - - - 5 - - - - - - - - Rafal Ksiezyk - - - - - - - - - - - - - - - - - - - Hierarchical Relation Type - - - - - - - - - 000000000 - - - - - - - - - - - - - - Cardinality - - - - - - - - - - - ISO 13250-2: Topic Maps Data Model (TMDM) - - - - - - 1 - - - - - - The standard data model for Topic Maps, which defines the basic concepts of Topic Maps and their structure. This is the key Topic Maps standard. - - - - - - - - - - - - - - - - - - - - Ontopia site TM - - - - - - 1.9 - - - - - - Lars Marius Garshol - - - - - - The topic map for the Ontopia.net web site. - - - - - - - - Written by - - - - - - - - - - - Containee - - - - - - - - - - - Curing the Web's Identity Crisis: Subject Indicators for RDF - - - - - - 5 - - - - - - A contribution to the debate on the "Identity Crisis" of the Web, showing how concepts developed as part of XML Topic Maps - in particular, the notion of subject indicators - provide an elegant solution. - - - - - - - - Image - - - - - - - - - - - - - - Occurrence field - - - - - - - - - - - Post - - - - - - - - - 000000002 - - - - - - - - - 000000502 - - - - - - - - - 000002002 - - - - - - - - - 000001002 - - - - - - - - - 000003002 - - - - - - - - - - - - - - Is embedded view - - - - - - - - About Ontopia - - - - - - <P>Ontopia is an open source suite of tools for building applications -based on Topic Maps, providing features like an ontology designer, an -instance data editor, a full-featured query language, web service -access points, database storage, <A href="section.jsp?id=ontopia-the-product" mce_href="section.jsp?id=ontopia-the-product">and so on</A>.</P><P>The product suite is highly mature. Ontopia 1.0 was released in June -2001, and we are now nearing the release of Ontopia 5.1. Ontopia has -been in production use in <A href="success.jsp" mce_href="success.jsp">a number of commercial -projects on three continents</A> for many years now, and the core -engine has been very stable over most of that period.  </P><P>Ontopia is open source and released under <A href="http://www.apache.org/licenses/LICENSE-2.0" mce_href="http://www.apache.org/licenses/LICENSE-2.0">the Apache License -2.0</A>. The entire product is released as open source. There are no -proprietary add-ons which are necessary to run it, or to make it -suitable for an enterprise setting. Commercial support, however, -<A href="services.jsp" mce_href="services.jsp">is available</A>.</P><P>Ontopia is being actively maintained and developed by -<A href="http://code.google.com/p/ontopia/people/list" mce_href="http://code.google.com/p/ontopia/people/list">the committers</A> -which include two people who have worked on the product for more than -a decade, as well as new project participants from Germany, the -Netherlands, Belgium, and Norway. The Google Code site has -<A href="http://code.google.com/p/ontopia/updates/list" mce_href="http://code.google.com/p/ontopia/updates/list">a live feed of -recent activity</A>. </P><H2>Contact </H2><P>To contact the project, please write either to <A href="http://groups.google.com/group/ontopia" mce_href="http://groups.google.com/group/ontopia">the mailing list</A> or to <A href="mailto:support@ontopia.net" mce_href="mailto:support@ontopia.net">Ontopia support</A>.</P> - - - - - - about - - - - - - - - - - - - - - Used by - - - - - - - - - - - - - - Players types query - - - - - - - - - - - - - - Is symmetric - - - - - - - - - - - Ann Wrightson - - - - - - - - - - - - - - Tolog declarations - - - - - - - - - - - - - - Fields view - - - - - - - - - 000049000 - - - - - - - - - 000053000 - - - - - - - - - 000001000 - - - - - - - - - 000045000 - - - - - - - - - 000016000 - - - - - - - - - 000052000 - - - - - - - - - 000000000 - - - - - - - - - 000015000 - - - - - - - - Contains - - - - - - - - - - - - - - Fields in view - - - - - - - - - - - - - - Is hidden view - - - - - - - - - - - Web 2.0 and Topic Maps - - - - - - 1 - - - - - - 1.3mb - - - - - - A presentation on what Web 2.0 is, exactly, and how it compares with Topic Maps. Looks at wikis, tagging, and folksonomies, and gives some examples of Topic Maps-based Web 2.0 applications. - - - - - - - - - - - Id - - - - - - - - - - - - - - Zero or one - - - - - - 1 - - - - - - 0 - - - - - - - - Internal URL - - - - - - - - - - - - - - Minimum cardinality - - - - - - - - - - - Seriously capable Topic Maps - - - - - - 2 - - - - - - This paper outlines what is required of topic maps in order to gain the most benefit from them. A topic map architecture is described which covers a variety of information repositories. - - - - - - - - - - - The XML Papers: Lessons on Applying Topic Maps - - - - - - 4 - - - - - - A follow-on article for those that have already read "The TAO". This paper describes some of the basic steps in applying Topic Maps in a real world application, a Topic Maps-driven web portal of conference papers. - - - - - - - - - - - - - - View mode - - - - - - - - - - - - - - - URI - - - - - - - - - - - - - - Author of - - - - - - - - - - - - - - Has field - - - - - - - - - - - - - - Has field - - - - - - - - - - - The TAO of Topic Maps - - - - - - 1 - - - - - - The classic introduction to Topic Maps, which takes as its starting point the forms of navigation with which we are all familiar from the world of printed information: indexes, glossaries and thesauri. - - - - - - - - - - - - - - - - - - - Hierarchical for - - - - - - - - - - - - - - Superordinate role - - - - - - - - - - - - - - - - - - Superclass - - - - - - - - - - - - - - Has identity type - - - - - - - - - - - - - - Hidden views - - - - - - - - Contained in - - - - - - - - - - - Topic maps and knowledge representation - - - - - - Examination of the intersection of topic maps and knowledge representation. - - - - - - 1 - - - - - - - - - - - - - - Superordinate role type for - - - - - - - - - - - - - - - - - - - The editor - - - - - - 03 - - - - - - ontopoly-screenshot.png - - - - - - ontopoly - - - - - - <P>Ontopoly is a Topic Maps editor that lets you incrementally design your Topic Maps ontology using a user-friendly web interface. The ontology then drives a web-based user interface for populating the topic map with instance data. Thus, it is possible to build an entire topic map stored either in file or a database using Ontopoly.<BR><BR>The instance editing user interface is configurable, and can be set up to present reduced views of the data to users, thus reducing the amount of clutter and confusion for authors.<BR><BR>In addition, Ontopoly is embeddable inside other applications, so that it is possible to add Topic Maps editing capabilities to other applications (such as content management systems).<BR><BR>The screenshot below shows the user interface for editing an instance topic, in this case an instance of the topic type "Album" (as in CD recording):<BR></P> - - - - - - - - - - - - - - Identity type - - - - - - - - - - - - - - Exactly one - - - - - - 1 - - - - - - 1 - - - - - - - - - - - - - - Ontology Version - - - - - - - - - - - - - - Association field - - - - - - - - - - - Towards Seamless Knowledge — Integrating Public Sector Portals in Norway - - - - - - 2.5mb - - - - - - A presentation covering the story of how Topic Maps has "taken off" in Norway — primarily as a vehicle for web portals in the public sector — and how this is paving the way for realizing the vision of "Seamless Knowledge". - - - - - - 5 - - - - - - - - - - - - - - Parent view - - - - - - - - - - - - - - Create action - - - - - - - - - 000042000 - - - - - - - - - 000000000 - - - - - - - - - 000001000 - - - - - - - - - - - Blog has post - - - - - - - - - - - - - - - - - - - - - - - - - Is read-only type - - - - - - - - - - - Page - - - - - - - - - 000000002 - - - - - - - - - 000000001 - - - - - - - - - 000000004 - - - - - - page.jsp?id= - - - - - - - - - 000000003 - - - - - - - - - 000000005 - - - - - - - - - - - - - - Occurrence field - - - - - - - - - 000073000 - - - - - - - - - 000000000 - - - - - - - - - 000001000 - - - - - - - - - 000043000 - - - - - - - - - 000028000 - - - - - - - - - 000037000 - - - - - - - - - 000048000 - - - - - - - - - 000041000 - - - - - - - - - 000051000 - - - - - - - - - 000019000 - - - - - - - - - 000044000 - - - - - - - - - 000032000 - - - - - - - - - 000029000 - - - - - - - - - 000074000 - - - - - - - - - - - - - - Field cardinalities - - - - - - - - Get involved - - - - - - get-involved - - - - - - <P>The Ontopia product is created by the Ontopia community, and so the product is what the community makes it. Anyone can join and contribute to help make the product better.</P><P>If you want to know what is going on, <STRONG>follow <A href="http://twitter.com/ontopia" mce_href="http://twitter.com/ontopia">the project on Twitter</A></STRONG><A href="http://twitter.com/ontopia" mce_href="http://twitter.com/ontopia"></A> or <STRONG>read <A href="http://ontopia.wordpress.com/" mce_href="http://ontopia.wordpress.com/">our blog</A></STRONG>. </P><P>If you want to get more closely involved with the project, the first thing you should do is to <STRONG>join <A href="http://groups.google.com/group/ontopia" mce_href="http://groups.google.com/group/ontopia">the mailing list</A></STRONG>, which is where the community discusses the state and future of the project. This is where you can engage with the community and start to get involved with it.<BR><BR>Second, you should <A href="http://code.google.com/p/ontopia/downloads/list" mce_href="http://code.google.com/p/ontopia/downloads/list"><STRONG>download</STRONG></A> and try out the software.<BR><BR>After this you may want to <A href="http://code.google.com/p/ontopia/source/checkout" mce_href="http://code.google.com/p/ontopia/source/checkout"><STRONG>check out the source code</STRONG></A> and <A href="http://code.google.com/p/ontopia/wiki/HowToBuild" mce_href="http://code.google.com/p/ontopia/wiki/HowToBuild">build it</A>. Once there is something specific you want to contribute, there is a guide to how to do it <A href="http://code.google.com/p/ontopia/wiki/HowToContribute" mce_href="http://code.google.com/p/ontopia/wiki/HowToContribute">here</A>.<BR></P> - - - - - - - - - - - - - - - - - 5 - - - - - - 50 - - - - - - - - - - - - - - Aranuka 1.0 is released - - - - - - Hannes Niederhausen of The TopicMaps Lab in Leipzig has released Aranuka 1.0, a Topic Maps object data binding tool, which supports persisting information stored in Java objects in a topic map. Effectively, it means you can write normal Java objects encapsulating your business logic and have Aranuka take care of storing the data in a [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=ontopia.wordpress.com&blog=7947028&post=227&subd=ontopia&ref=&feed=1" /> - - - - - - 2010-04-11 09:00:20 - - - - - - - - - - - - - - Hidden - - - - - - - - - - - - - - Has role type - - - - - - - - - - - Automagic Topic Maps - - - - - - This paper explains a new approach for creating topic maps from existing data sources. The approach consists of a three-step procedure, and includes going via RDF to produce the final topic map. - - - - - - 1 - - - - - - - - - - - - - - - - - Name type - - - - - - - - - 000003000 - - - - - - - - - 000000000 - - - - - - - - - 000017000 - - - - - - - - - 000001000 - - - - - - - - - 000018000 - - - - - - - - - 000036000 - - - - - - - - - - - - - - Edit new topic in popup window - - - - - - - - - - - - - - Default - - - - - - - - - - - - - - Datatype - - - - - - - - - 000008000 - - - - - - - - - 000000000 - - - - - - - - - 000027000 - - - - - - - - - 000001000 - - - - - - - - - - - - - - Hierarchical associations - - - - - - - - In format - - - - - - - - - - - - - - Uses interface control - - - - - - - - - - - - - - Roles - - - - - - - - - - - - - - Ontology - - - - - - - - - 000000000 - - - - - - - - - - - Author - - - - - - - - - - - - - - Role field - - - - - - select $T from { instance-of($T, on:topic-type) | instance-of($T, on:role-type) }? - - - - - - - - - - - - - - Interface control - - - - - - - - - 000047000 - - - - - - - - - 000001000 - - - - - - - - - 000000000 - - - - - - - - - - - - - - Is embedded view - - - - - - - - - - - - - - Association field - - - - - - - - - 000000000 - - - - - - - - - 000023000 - - - - - - - - - 000021000 - - - - - - - - - 000001000 - - - - - - - - - - - Topic Maps in content management: The rise of the ITMS - - - - - - This paper shows how topic maps can address the limitations of traditional content management systems while building on their strengths. The term ITMS (Integrated Topic Management System) is coined for a content management system based on topic maps, and the paper shows what is necessary to build such systems, as well as what benefits they bring. - - - - - - 1 - - - - - - - - - - - Other ISO standards - - - - - - A site showing the status of the current work on the different ISO standards related to Topic Maps. - - - - - - 3 - - - - - - - - - - - Hans-Holger Rath - - - - - - - - Page text - - - - - - 60 - - - - - - 20 - - - - - - - - - - - - - - Superordinate Role Type - - - - - - - - - 000000000 - - - - - - - - - - - Page text - - - - - - - - - - - - - - - Description - - - - - - - - - - - File format - - - - - - - - - 000000001 - - - - - - - - - - - - - - Maximum cardinality - - - - - - - - - - - - - - Has occurrence type - - - - - - - - - - - Project - - - - - - - - - 000000004 - - - - - - - - - 000000001 - - - - - - - - - 000000002 - - - - - - page.jsp?id= - - - - - - - - - 000000006 - - - - - - - - - 000000003 - - - - - - - - - 000000005 - - - - - - - - - - - - - - Normal - - - - - - - - Content management - - - - - - cms - - - - - - 07 - - - - - - <P>Ontopia is highly integratable, and has been integrated with a number of content management systems in order to provide these with the full power of Topic Maps for organizing and navigating content. The general approach taken is that authors write content in the CMS user interface, then tag it with topics from the topic map while still in the familiar CMS user interface. The interface for tagging content is taken from the Ontopoly editor, and thus automatically reflects the ontology of the topic map.<BR><BR>Once tagged in the topic map content can be navigated, searched, and found using a Topic Maps-based interface in the portal which integrates the content presentation from the CMS.<BR><BR>Some content management systems which have Ontopia integrations today:</P><UL><LI><A href="http://www.escenic.com/" mce_href="http://www.escenic.com/">Escenic</A></LI><LI><A href="http://www.officenet.no/" mce_href="http://www.officenet.no/">OfficeNet Knowledge Portal</A><BR></LI></UL><P>We are working on integrating with more CMSs, and results will be announced here as they appear. It is also possible for third parties to develop their own integrations.<BR></P> - - - - - - - - Schemas - - - - - - 2 - - - - - - - - - - - - - - - - - - - - - Subclass of - - - - - - Superclass of - - - Superclass/subclass - - - - - - - - General - - - - - - 1 - - - - - - - - Homepage - - - - - - - - - - - - - - Is sortable field - - - - - - - - - - - - - - Embedded views - - - - - - - - - - - - - - - - - - Subclass - - - - - - - - - - - - - - Topic Maps ontology - - - - - - - - Has format - - - - - - - - - - - - - - Upcoming Ontopia events - - - - - - The upcoming Topic Maps 2010 conference in Oslo on April 14-15 will feature a number of Ontopia-related presentations. There is a full-day Ontopia tutorial during the tutorial day, and also a half-day tutorial on using Ontopia with Ruby on Rails. There are also a number of Ontopia-related presentations during the conference itself. The week before [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=ontopia.wordpress.com&blog=7947028&post=223&subd=ontopia&ref=&feed=1" /> - - - - - - 2010-03-28 09:13:49 - - - - - - - - - - - - - - Cardinality - - - - - - - - - 000000000 - - - - - - - - - 000031000 - - - - - - - - - 000078000 - - - - - - - - - 000079000 - - - - - - - - - 000001000 - - - - - - - - Id - - - - - - 1 - - - - - - - - - - - - - - Occurrence type - - - - - - - - - - - Topic maps: Introduction and Allegro - - - - - - 184kb - - - - - - A paper from XML 1999 that contains an introduction to topic maps followed by a discussion of extended concepts such as topic map templates, type hierarchies, association types and constraints. - - - - - - 2 - - - - - - - - - - - - - - HTML - - - - - - - - - - - - - - - - - - - - Subordinate role type for - - - - - - - - - - - - - - - - - Association type - - - - - - - - - 000022000 - - - - - - - - - 000067000 - - - - - - - - - 000003000 - - - - - - - - - 000020000 - - - - - - - - - 000071000 - - - - - - - - - 000000000 - - - - - - - - - 000017000 - - - - - - - - - 000018000 - - - - - - - - - 000001000 - - - - - - - - - 000069000 - - - - - - - - - - - - - - - - - - - - - - - - - Subclass - - - - - - select $TT from direct-instance-of(%topic%, $TT), {$TT = on:topic-type | $TT = on:association-type | $TT = on:occurrence-type | $TT = on:name-type | $TT = on:role-type}? - - - - - - select $T from direct-instance-of(%topic%, $TT), direct-instance-of($T, $TT), $T /= %topic%? - - - - - - - - Scope - - - - - - 2 - - - - - - - - Scope - - - - - - 4 - - - - - - - - - - - Towards a General Theory of Scope - - - - - - 1 - - - - - - A paper from Extreme Markup 2001 that provides the first ever in-depth examination of the topic map concept of "scope": What scope is, how to use it, how it relates to "context", and not least how applications might take advantage of it when processing a topic map. - - - - - - - - - - - - - - Field in view - - - - - - - - - - - - - - Not traversable - - - - - - - - - - - tolog predicate reference - - - - - - 2 - - - - - - Reference documentation for all tolog predicates. - - - - - - - - - - - - - - - - - - - Hidden - - - - - - - - - - - - - - Has large instance set - - - - - - - - ppt - - - - - - - - Ontopia Forge - - - - - - <P>The Ontopia product only accepts modules which are developed, tested, and documented to a commercial standard, which makes the bar for new submissions rather high. In order to make it easier for the community to share useful modules we have established the Ontopia Forge, which contains all kinds of modules related to Ontopia contributed by the community. Currently the following modules are available:</P> -<UL> -<LI><A title="An implementation of" href="http://code.google.com/p/ontopia/wiki/TomaImplementation" mce_href="http://code.google.com/p/ontopia/wiki/TomaImplementation">An implementation of</A> the Toma query language</LI> -<LI><A href="http://code.google.com/p/tmphoto/" mce_href="http://code.google.com/p/tmphoto/">tmphoto</A>, a web photo gallery based on Ontopia</LI> -<LI><A href="http://code.google.com/p/ontopia/source/browse/trunk/sandbox/tmcl-owl" mce_href="http://code.google.com/p/ontopia/source/browse/trunk/sandbox/tmcl-owl">tmcl-owl</A>, converters between RDFS/OWL and TMCL</LI> -<LI><A href="http://code.google.com/p/ontopia/source/browse/trunk/sandbox/liferay-integration/" mce_href="http://code.google.com/p/ontopia/source/browse/trunk/sandbox/liferay-integration/">An Ontopia/Liferay integration</A></LI> -<LI><A href="http://code.google.com/p/ontopia/source/browse/trunk/sandbox/solr-utils/" mce_href="http://code.google.com/p/ontopia/source/browse/trunk/sandbox/solr-utils/">A faceted search implementation</A> using Apache Solr</LI> -<LI><A href="http://code.google.com/p/ontopia/source/browse/trunk/sandbox/tmcl-validator/" mce_href="http://code.google.com/p/ontopia/source/browse/trunk/sandbox/tmcl-validator/">A TMCL reference implementation</A></LI> -</UL> -<P>If you want to contribute a module of your own, to be hosted in the Ontopia Subversion repository or externally, please contact us.</P> - - - - - - ontopia-forge - - - - - - - - - - - - - - Superclass - - - - - - select $TT from direct-instance-of(%topic%, $TT), {$TT = on:topic-type | $TT = on:association-type | $TT = on:occurrence-type | $TT = on:name-type | $TT = on:role-type}? - - - - - - select $T from direct-instance-of(%topic%, $TT), direct-instance-of($T, $TT), $T /= %topic%? - - - - - - - - - - - Big image - - - - - - - - - - - - - - - - - - - Used by - - - - - - - - - - - Creating semantically valid topic maps - - - - - - 34kb - - - - - - 1 - - - - - - A paper about schemas for topic maps from XML Europe 2000. It discusses the need for a schema system, gives examples of possible constraints that a schema could describe, and examines existing constraint mechanisms and their applicability to topic maps. The slides from the presentation are also available. - - - - - - - - - - - Homepage - - - - - - - - - - - - - - Interface control - - - - - - - - City of Bergen - - - - - - A citizen's portal for the city of Bergen, the second biggest city in Norway, all based on Ontopia and Topic Maps. - - - - - - bergen - - - - - - bergen-kommune.png - - - - - - bergen-screenshot.png - - - - - - <P>The City of Bergen's citizen portal is the city administration's main point of contact with the population, serving both as an information outlet and as an entry point to the services provided by the city to the population. The entire site is structured using a topic map offering multiple points of entry into the site. One entry point is using Los, a standardized taxonomy for local administrations published by the Norwegian government as a topic map. Another entry is the organizational structure of the city administration. Other entry points are provided by the site editors using the navigational menus and articles.<BR><BR>Links to some more information about the site:</P><UL><LI><BR><A href="http://www.bergen.kommune.no/" mce_href="http://www.bergen.kommune.no/">The site itself</A> (in Norwegian)</LI><LI><A href="http://www.topicmaps.com/tm2007/tveit.pdf" mce_href="http://www.topicmaps.com/tm2007/tveit.pdf">A presentation about the project</A></LI><LI><A href="http://www.springerlink.com/content/98t0413424260003/" mce_href="http://www.springerlink.com/content/98t0413424260003/">Case study about the project</A> (paid content)</LI><LI><A href="http://www.informatik.uni-leipzig.de/~tmra/2007/slides/garshol_TMRA2007_bergen.pdf" mce_href="http://www.informatik.uni-leipzig.de/~tmra/2007/slides/garshol_TMRA2007_bergen.pdf">Slides from case study presentation</A><BR><BR></LI></UL><P>The site is run by Oracle Portal, with most of the structure contributed from Ontopia-based portlets, while the content is managed using the Escenic Content Engine. Much of the topic map structure is converted from an internal data warehouse using DB2TM to do nightly synchronization.<BR></P> - - - - - - - - - - - - - - Use value view - - - - - - - - - - - - - - Declared fields - - - - - - - - Querying - - - - - - 3 - - - - - - - - - - - - - - - - - Topic type - - - - - - - - - 000018000 - - - - - - - - - 000001000 - - - - - - - - - 000080001 - - - - - - - - - 000017000 - - - - - - - - - 000080003 - - - - - - - - - 000039000 - - - - - - - - - 000030000 - - - - - - - - - 000014000 - - - - - - - - - 000080002 - - - - - - - - - 000003000 - - - - - - - - - 000000000 - - - - - - - - - 000080000 - - - - - - - - - 000072000 - - - - - - - - - - - - - - Superordinate role type - - - - - - - - - - - - - - Association field - - - - - - - - - - - - - - Has data type - - - - - - - - - - - - - - - Name - - - - - - - - Querying - - - - - - 1 - - - - - - - - - - - - - - Subordinate Role Type - - - - - - - - - 000000000 - - - - - - - - Introductions to Topic Maps - - - - - - 1 - - - - - - tm-intro - - - - - - Understand this semantic technology, which supports findability, linked data, and much more. - - - - - - - - Knowledge management - - - - - - 7 - - - - - - - - - - - Geir Ove Grønmo - - - - - - - - Historical standards - - - - - - 2 - - - - - - - - - - - - - - Child view - - - - - - - - - - - tolog – a topic map query language - - - - - - A paper from XML Europe 2001 that describes a query language for topic maps called tolog. This query language is inspired by Prolog and fully supports the TMQL requirements. It has a clear and simple syntax, and its basic features are easy to implement. - - - - - - 3 - - - - - - - - - - - Lars Marius Garshol - - - - - - - - - - - - - - Role field view - - - - - - - - - - - - - Content management - - - - - - 6 - - - - - - - - - - - - - - Is sortable - - - - - - - - - - - - - - - Date - - - - - - - - - - - - - - - - - - - - - - - - - Item identifier - - - - - - - - - - - - - - Height - - - - - - - - - - - - - - Has name type - - - - - - - - - - - - - - Topic map - - - - - - - - - 000012000 - - - - - - - - - 000007000 - - - - - - - - - 000003000 - - - - - - - - - 000000000 - - - - - - - - - 000013000 - - - - - - - - - - - - - - Role field - - - - - - - - - 000048000 - - - - - - - - - 000024000 - - - - - - - - - 000032000 - - - - - - - - - 000044000 - - - - - - - - - 000051000 - - - - - - - - - 000076000 - - - - - - - - - 000029000 - - - - - - - - - 000046000 - - - - - - - - - 000075000 - - - - - - - - - 000077000 - - - - - - - - - 000001000 - - - - - - - - - 000041000 - - - - - - - - - 000025000 - - - - - - - - - 000019000 - - - - - - - - - 000000000 - - - - - - - - - 000043000 - - - - - - - - - - - - - - Browse dialog - - - - - - - - - - - - - - Fields - - - - - - - - - - - - - - Ontopia.net is relaunched - - - - - - 2010-05-28 07:00:45 - - - - - - Ever since we went open source our intention was to replace the old ontopia.net site with a new site more suited to an open source project, and easier to maintain than the old site. We tried to have it ready by Topic Maps 2010, but failed to meet that goal. Now, we have finally completed [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=ontopia.wordpress.com&blog=7947028&post=241&subd=ontopia&ref=&feed=1" /> - - - - - - - - - - - Metadata? Thesauri? Taxonomies? Topic Maps! - - - - - - Describes how Topic Maps compare to familiar concepts like metadata, taxonomies, and thesauri, and how they go beyond what these can do, while at the same time allowing these familiar techniques to be used with Topic Maps. - - - - - - 2 - - - - - - - - - - - - - - - - - - - - - - - - - Used by - - - - - - - - Web framework - - - - - - nrk-screenshot.png - - - - - - <P>The Navigator Framework is a JSP tag library and Java API which enables developers to quickly and easily develop web-based interfaces based on Topic Maps using Ontopia. The tag library generates no HTML on its own, giving developers complete freedom to produce exactly the type of output they wish. The tag library is based on the tolog query language, and is quite similar to XSLT and the JSTL core tag library. It is also integrated with the JSTL core tag library, allowing interaction between the two sets of tag libraries and the use of the JSTL expression language.<BR><BR>Below are some screenshots from applications developed with the tag library.<BR></P> - - - - - - 04 - - - - - - web-framework - - - - - - - - - - - - - - Is hidden type - - - - - - - - - - - - - - Use View mode - - - - - - - - Database conversion - - - - - - 08 - - - - - - db2tm.png - - - - - - <P>Using the DB2TM module relational data can be automatically converted into Topic Maps data, either over JDBC or from a CSV file. The conversion uses a simple declarative XML file to describe the mapping from relational data to Topic Maps. It is possible to invoke custom Java code from the XML file in order to perform necessary transformations during the conversion.<BR><BR>In addition to supporting simple conversions the DB2TM module also supports synchronization, which means that it is possible to use the DB2TM module to automatically keep the topic map up to date as changes occur in the database.<BR></P> - - - - - - db2tm - - - - - - - - Ontopia - the product - - - - - - ontopia-the-product - - - - - - Learn about Ontopia, the world's most feature-complete Topic Maps product. - - - - - - 2 - - - - - - - - - - - Format of file - - - - - - - - - - - - - - Is abstract - - - - - - - - - - - - - - - - - 5 - - - - - - 50 - - - - - - - - - - - - - - Identity field - - - - - - - - - 000001000 - - - - - - - - - 000033000 - - - - - - - - - 000051000 - - - - - - - - - 000043000 - - - - - - - - - 000019000 - - - - - - - - - 000048000 - - - - - - - - - 000041000 - - - - - - - - - 000032000 - - - - - - - - - 000000000 - - - - - - - - - 000044000 - - - - - - - - - 000029000 - - - - - - - - - - - - - - Has association field - - - - - - - - - - - - - - - Datetime - - - - - - - - - - - - - - - - - - - - Read-only - - - - - - - - - - - - - - Use value view - - - - - - - - - - - Image - - - - - - - - - - - - - - - - - 5 - - - - - - 50 - - - - - - - - - - - Topic Maps for repositories - - - - - - Kal Ahmed's XML Europe 2000 paper discussing the potential application of topic maps as an interface to a multi-user document repository. - - - - - - 2 - - - - - - - - - - - Date - - - - - - - - - - - - - - Drop-down list - - - - - - - - - - - - - - Subordinate role type - - - - - - - - - - - - - - Topic Maps 2010 presentations - - - - - - At the Topic Maps 2010 conference last week there were several presentations that were directly relevant to Ontopia. Below is a list, with links to the ones for which slides have been published: Experiments in Linked Data Lars Marius Garshol&#8217;s presentation on his experiments with using Ontopia to implement Linked Data across a number of [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=ontopia.wordpress.com&blog=7947028&post=232&subd=ontopia&ref=&feed=1" /> - - - - - - 2010-04-23 07:00:40 - - - - - - - - - - - - - - Used by - - - - - - - - - - - - - - Value view - - - - - - - - File size - - - - - - 10 - - - - - - 1 - - - - - - - - Office of Naval Intelligence - - - - - - The Office of Naval Intelligence uses the Ontopia software to maintain information about foreign fleets and ships. - - - - - - oni - - - - - - oni-logo.png - - - - - - <P>This US organization is the chief provider of maritime intelligence for a large community of government intelligence services and their clients. Like most things military, the information base is vast, not just in sheer size, but in its breadth and historical scope. In the past, skilled analysts combed search results for insights and relationships, which just wound up in more documents. They decided to use Topic Maps and Ontopia to provide timely and precise answers for specific questions.<BR><BR>Read more about this application in the white paper <A href="http://www.innodata-isogen.com/resources/case_studies/oni_cs.pdf" mce_href="http://www.innodata-isogen.com/resources/case_studies/oni_cs.pdf">Organizing Mountains of Information into Actionable Data: ONI relies on Topic Maps to improve search capabilities</A> prepared by our partner, Innodata Isogen.<BR></P> - - - - - - oni-big.png - - - - - - - - Current standards - - - - - - 1 - - - - - - - - - - - A Theory of Scope - - - - - - This paper describes an interpretation of scope based on the past few years of research on the subject. Based on this it defines two mathematical operators for scope filtering which correspond to common use cases for scope. - - - - - - 2 - - - - - - 140kb - - - - - - - - - - - Methods for the Automatic Construction of Topic Maps - - - - - - Slides from a presentation covering the principles of automated topic map generation from structured knowledge, document metadata, information systems, structured document content, and unstructured document content. - - - - - - 237kb - - - - - - 2 - - - - - - - - - - - - - - - - - 5 - - - - - - 50 - - - - - - - - - - - - - - Impedance mismatch 2.0 - - - - - - 2010-01-28 15:30:20 - - - - - - A recurring challenge for Topic Maps-based projects is how to structure applications internally. For traditional projects based on relational storage this problem is known as the impedance mismatch problem. That is, the problem of how to handle the database in the code. Should SQL queries be just littered all over the code? Should there be [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=ontopia.wordpress.com&blog=7947028&post=210&subd=ontopia&ref=&feed=1" /> - - - - - - - - - - - Topic maps, RDF, DAML, OIL: A comparison - - - - - - An in-depth paper about the similarities and differences between these semantic web technologies. It introduces all of the technologies, comparing them to a simple conceptual model that highlights how they compare. A demonstration of how to map data between the technologies is also given. - - - - - - 3 - - - - - - - - - - - RTM: An RDF-to-TM mapping vocabulary - - - - - - 3 - - - - - - An RDF vocabulary for describing RDF ontologies so that they can be converted into Topic Maps producing natural and directly usable results. - - - - - - - - - - - - - - Has cardinality - - - - - - - - - - - - - - Datatype locator - - - - - - - - - - - - - - Field - - - - - - - - - - - - - - Has occurrence type - - - - - - - - - - - - - - Use interface control - - - - - - - - - - - - - - Width - - - - - - - - - - - - - - Symmetric - - - - - - - - - - - - - - Ontopia/Liferay demo - - - - - - 2010-02-18 15:32:11 - - - - - - We have now put together a short and simple demo of the Ontopia/Liferay integration and showed it to a customer. In order to share this with a wider audience we took some screenshots from the demo and dumped them into the PowerPoint presentation. What this presentation shows is roughly: Why we developed the integration, What [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=ontopia.wordpress.com&blog=7947028&post=216&subd=ontopia&ref=&feed=1" /> - - - - - - - - Success stories - - - - - - 6 - - - - - - success-stories - - - - - - success.jsp - - - - - - Around the world many production applications based on Ontopia are running, and this page presents some of them. - - - - - - - - - - - - - - Auto-complete - - - - - - - - - - - - - - System topic - - - - - - - - - 000000000 - - - - - - - - - - - - - - Is hidden type - - - - - - - - - - - - - - Read-only - - - - - - - - - - - - - - Subject locator - - - - - - - - - - - - - - Is abstract - - - - - - - - - - - - - - Use create action - - - - - - - - Has posts - - - - - - - - - - - - - - - - - Hierarchy - - - - - - Forms hierarchy for - - - Forms hierarchy for - - - - - - - - - - - Navigating haystacks and discovering needles - - - - - - An article that appeared in Markup Languages: Theory and Practice, Vol. 1 No. 4 (MIT Press, 1999). Contains additional material under the subject headings "Topic maps and reference works publishing" and "Topic maps and RDF". - - - - - - 633kb - - - - - - 1 - - - - - - - - - - - - - - Association type - - - - - - - - - - - - - - Go to new topic - - - - - - - - - - - What is Topic Maps? - - - - - - 3 - - - - - - This article published on XML.com gives a basic introduction to Topic Maps. - - - - - - - - - - - - - - Field owner - - - - - - - - - - - - - - Abstract - - - - - - - - - - - - - - Ontopia/Liferay presentation - - - - - - Matthias Fischer, who is writing the Ontopia/Liferay integration, did a presentation of his work at the internal BouvetOne conference here at Bouvet. The slides show what he&#8217;s doing in a bit more detail and also show some screenshots, which give a more in-depth impression of what this is going to look like. We will follow [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=ontopia.wordpress.com&blog=7947028&post=213&subd=ontopia&ref=&feed=1" /> - - - - - - 2010-02-01 16:13:15 - - - - - - - - - - - File size - - - - - - - - - - - - - - Occurrence field view - - - - - - - - - - - - - - Child view - - - - - - - - - - - - - - Use edit mode - - - - - - - - - - - The answer is just a question [of topic maps matching] - - - - - - 1 - - - - - - A paper from XML Europe 2000 relating topic maps with semantic networks and conceptual graphs, and proposing a topic map query language (TMQL). - - - - - - - - - - - Marc de Graauw - - - - - - - - - - - - - - Site redesigns - - - - - - 2010-04-07 10:54:27 - - - - - - The NRK/Skole web site, running on Ontopia, was relaunched in a new design over Easter, to coincide with a series of promotional videos shown on national TV during Easter. The site functionality remains the same. Similarly, the service section of the City of Bergen portal was relaunched with a new graphical look and feel today.<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=ontopia.wordpress.com&blog=7947028&post=225&subd=ontopia&ref=&feed=1" /> - - - - - - - - Older articles - - - - - - older-articles - - - - - - Articles preserved mostly for their historical value. - - - - - - 5 - - - - - - - - - - - Bouvet - - - - - - http://www.bouvet.no - - - - - - bouvet-logo.png - - - - - - <P>Bouvet is a Norwegian consulting house with broad experience in the use of Topic Maps in many usage areas and on many platforms. It also employs two of the original Ontopia developers. </P><P>Bouvet offers the following services around Ontopia:<BR></P><UL><LI>Solution development. Bouvet has built a number of Ontopia-based solutions for a wide range of customers.</LI><LI>Advisory consulting. Bouvet is used as advisory consultants on semantic technologies and Topic Maps by a number of customers. </LI><LI>Support. Bouvet offers support on Ontopia-based solutions. </LI><LI>Custom software development. Bouvet can develop new features and modules in the Ontopia software on request.<BR></LI></UL> - - - - - - - - - - - Ten Theses on Topic Maps and RDF - - - - - - Ten theses on the relationship between Topic Maps and RDF. This is a second cut at understanding the similarities and differences between these two approaches to making information findable. - - - - - - 4 - - - - - - - - - - - - - - Is read-only type - - - - - - - - Norwegian National Broadcasting - - - - - - nrk-skole.png - - - - - - nrk-screenshot.png - - - - - - A media archive for the Norwegian National Broadcasting service, featuring thousands of media clips targeted at students. - - - - - - nrk-skole - - - - - - <P>NRK/Skole is an educational site for school children publishing sound and video clips from the archives of the Norwegian National Broadcasting Company, the Norwegian equivalent of the BBC. A team of editors scour the archives to find suitable content, then cut it into clips suitable for use in an educational setting and attach metadata to these clips. The content ranges from interviews with historical figures, clips from the daily news, documentaries, and even comedy gags.<BR><BR>All clips on the site are represented as topics in the topic map, and associated with topics representing people and subjects that the clips are about. In addition, clips are also attached to the programs they were taken from, providing three navigational entry points into the portal: person, subject, or program.<BR><BR>In addition, clips are connected with knowledge goals taken from the national curriculum, which has been published as a topic map by the Ministry of Education. Thus, teachers can navigate the curriciulum for their subject to find clips supporting any particular knowledge goal in the curriculum.<BR><BR>Unfortunately for non-Norwegian readers, the site is all in Norwegian. However, some of the content is in English, such as <A href="http://www.nrk.no/skole/klippdetalj?topic=nrk:klipp/47964" mce_href="http://www.nrk.no/skole/klippdetalj?topic=nrk:klipp/47964">Winston Churchill's famous blood, sweat, and tears speech</A> from World War II.<BR><BR>Some more information about the site:<BR><A href="http://www.nrk.no/skole/" mce_href="http://www.nrk.no/skole/"></A></P><UL><LI><A href="http://www.nrk.no/skole/" mce_href="http://www.nrk.no/skole/">The site itself</A> (in Norwegian)</LI><LI><A href="http://ontopia.files.wordpress.com/2009/08/nrk-skole.pdf" mce_href="http://ontopia.files.wordpress.com/2009/08/nrk-skole.pdf">A presentation about the site</A> (in Norwegian)</LI><LI><A href="http://www.youtube.com/watch?v=bhpH9Fm5H90" mce_href="http://www.youtube.com/watch?v=bhpH9Fm5H90">A YouTube video about the site</A> (in Norwegian)</LI><LI><A href="http://ontopia.wordpress.com/tag/nrk/" mce_href="http://ontopia.wordpress.com/tag/nrk/">Blog postings about the project</A> (from the Ontopia blog)</LI></UL><P>The site runs on Ontopia 5.0.0, the Resin web server, and uses the Polopoly CMS for articles. The Ontopoly editor is used to tag clips against the topic map, while the DB2TM module is used to import metadata from a relational database. The presentation is implemented using the JSP tag libraries.<BR></P> - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/sandbox/ontopia.net/WEB-INF/web.xml b/sandbox/ontopia.net/WEB-INF/web.xml deleted file mode 100644 index 916b921bb..000000000 --- a/sandbox/ontopia.net/WEB-INF/web.xml +++ /dev/null @@ -1,43 +0,0 @@ - - - - - - Ontopia.net - The Ontopia.net home page - - - - - - 30 - - - - index.jsp - index.html - - - - - diff --git a/sandbox/ontopia.net/download.jsp b/sandbox/ontopia.net/download.jsp deleted file mode 100644 index a940c604c..000000000 --- a/sandbox/ontopia.net/download.jsp +++ /dev/null @@ -1,53 +0,0 @@ -<%@ include file="fragments/declarations.jsp"%> - - -<%@ include file="fragments/tolog.jsp"%> - - -Download -DOWNLOAD - - - - - -

     

    - -
    - -
    - -

    - - -
    - -

    Download Ontopia

    - -

    Click the link above to download the entire Ontopia product. This -comes as a zip file containing a Tomcat web server set up with the -Omnigator, Ontopoly, and Vizigator end-user products, and also the -full developer toolkit consisting of the Topic Maps engine, -Navigator Framework, DB2TM, and so on.

    - -

    Once you have downloaded, unpack the zip file, and open the -index.html file inside the ontopia directory. This -has an overview of the product documentation, including a link to the -installation guide.

    - -
    -

    RELATED INFORMATION

    - - - -
    - -
    - -
    -
    \ No newline at end of file diff --git a/sandbox/ontopia.net/fragments/article.jsp b/sandbox/ontopia.net/fragments/article.jsp deleted file mode 100644 index 9af1d2479..000000000 --- a/sandbox/ontopia.net/fragments/article.jsp +++ /dev/null @@ -1,34 +0,0 @@ -<%@ include file="declarations.jsp"%> - -

    - - - " - > - - - - - - - -
    -

    diff --git a/sandbox/ontopia.net/fragments/declarations.jsp b/sandbox/ontopia.net/fragments/declarations.jsp deleted file mode 100644 index 45ed45f78..000000000 --- a/sandbox/ontopia.net/fragments/declarations.jsp +++ /dev/null @@ -1,10 +0,0 @@ -<%@ taglib uri='http://psi.ontopia.net/jsp/taglib/template' prefix='template'%> -<%@ taglib uri='http://psi.ontopia.net/jsp/taglib/tolog' prefix='tolog'%> -<%@ taglib uri='http://psi.ontopia.net/jsp/taglib/portlets' prefix='portlets'%> -<%@ taglib uri="http://java.sun.com/jstl/core" prefix="c"%> -<%@ page language="java" import=" - java.util.*, - net.ontopia.topicmaps.core.*, - net.ontopia.topicmaps.nav2.utils.* -" - contentType="text/html; charset=utf-8"%> diff --git a/sandbox/ontopia.net/fragments/menu.jsp b/sandbox/ontopia.net/fragments/menu.jsp deleted file mode 100644 index 5f4b67bd7..000000000 --- a/sandbox/ontopia.net/fragments/menu.jsp +++ /dev/null @@ -1,72 +0,0 @@ - - - - -

    " - - -

    " - - - - - - class=topselected - - - class=selected - - - > - - - - - - - - - - - - -

    - -
    id=selected - >
    - - -
    - -

    " - class=selected - >

    - -
    id=selected - >
    -
    -
    -
    - -
    diff --git a/sandbox/ontopia.net/fragments/template-2col.jsp b/sandbox/ontopia.net/fragments/template-2col.jsp deleted file mode 100644 index 6766b673c..000000000 --- a/sandbox/ontopia.net/fragments/template-2col.jsp +++ /dev/null @@ -1,36 +0,0 @@ -<%@ include file="declarations.jsp"%> -<% - boolean mainpage = false; -%> - - - Ontopia - <template:get name="title"/> - - - - - - -<%@ include file="topbox.jsp"%> - -
    Home/
    - - - -
    - - - - - - - -
    -
    - - - - diff --git a/sandbox/ontopia.net/fragments/template.jsp b/sandbox/ontopia.net/fragments/template.jsp deleted file mode 100644 index d949fc6ae..000000000 --- a/sandbox/ontopia.net/fragments/template.jsp +++ /dev/null @@ -1,20 +0,0 @@ -<%@ include file="declarations.jsp"%> -<% - boolean mainpage = true; -%> - - - <template:get name="title"/> - - - - - - -<%@ include file="topbox.jsp"%> - - - - - - diff --git a/sandbox/ontopia.net/fragments/tolog.jsp b/sandbox/ontopia.net/fragments/tolog.jsp deleted file mode 100644 index 5a92c3961..000000000 --- a/sandbox/ontopia.net/fragments/tolog.jsp +++ /dev/null @@ -1,8 +0,0 @@ - -using dc for i"http://purl.org/dc/elements/1.1/" -using blog for i"http://psi.ontopedia.net/Blogging/" -using o for i"http://junk.ontopia.net/website/" -using op for i"http://psi.ontopedia.net/" -using onto for i"http://psi.ontopia.net/ontology/" -import "http://psi.ontopia.net/tolog/string/" as str - \ No newline at end of file diff --git a/sandbox/ontopia.net/fragments/topbox.jsp b/sandbox/ontopia.net/fragments/topbox.jsp deleted file mode 100644 index d91b01994..000000000 --- a/sandbox/ontopia.net/fragments/topbox.jsp +++ /dev/null @@ -1,44 +0,0 @@ -
    - <% if (!mainpage) { %> - - <% } %> - - - - <% - String url = request.getServletPath(); - String fullurl = request.getRequestURI() + "?" + request.getQueryString(); - %> - - -
    diff --git a/sandbox/ontopia.net/images/arrows.png b/sandbox/ontopia.net/images/arrows.png deleted file mode 100644 index 8c1fc89c5..000000000 Binary files a/sandbox/ontopia.net/images/arrows.png and /dev/null differ diff --git a/sandbox/ontopia.net/images/bergen-kommune.png b/sandbox/ontopia.net/images/bergen-kommune.png deleted file mode 100644 index 80da0925e..000000000 Binary files a/sandbox/ontopia.net/images/bergen-kommune.png and /dev/null differ diff --git a/sandbox/ontopia.net/images/bergen-screenshot.png b/sandbox/ontopia.net/images/bergen-screenshot.png deleted file mode 100644 index 522007a8d..000000000 Binary files a/sandbox/ontopia.net/images/bergen-screenshot.png and /dev/null differ diff --git a/sandbox/ontopia.net/images/black-logo.png b/sandbox/ontopia.net/images/black-logo.png deleted file mode 100644 index 468800253..000000000 Binary files a/sandbox/ontopia.net/images/black-logo.png and /dev/null differ diff --git a/sandbox/ontopia.net/images/bouvet-logo.png b/sandbox/ontopia.net/images/bouvet-logo.png deleted file mode 100644 index da6d9d149..000000000 Binary files a/sandbox/ontopia.net/images/bouvet-logo.png and /dev/null differ diff --git a/sandbox/ontopia.net/images/brainbank-logo.png b/sandbox/ontopia.net/images/brainbank-logo.png deleted file mode 100644 index aa362140e..000000000 Binary files a/sandbox/ontopia.net/images/brainbank-logo.png and /dev/null differ diff --git a/sandbox/ontopia.net/images/brainbank-screenshot.png b/sandbox/ontopia.net/images/brainbank-screenshot.png deleted file mode 100644 index a95764e8e..000000000 Binary files a/sandbox/ontopia.net/images/brainbank-screenshot.png and /dev/null differ diff --git a/sandbox/ontopia.net/images/circles-large.jpg b/sandbox/ontopia.net/images/circles-large.jpg deleted file mode 100644 index 6548a4224..000000000 Binary files a/sandbox/ontopia.net/images/circles-large.jpg and /dev/null differ diff --git a/sandbox/ontopia.net/images/circles-small.jpg b/sandbox/ontopia.net/images/circles-small.jpg deleted file mode 100644 index 917be650c..000000000 Binary files a/sandbox/ontopia.net/images/circles-small.jpg and /dev/null differ diff --git a/sandbox/ontopia.net/images/db2tm.png b/sandbox/ontopia.net/images/db2tm.png deleted file mode 100644 index 45a116388..000000000 Binary files a/sandbox/ontopia.net/images/db2tm.png and /dev/null differ diff --git a/sandbox/ontopia.net/images/download-big.png b/sandbox/ontopia.net/images/download-big.png deleted file mode 100644 index 5228cda40..000000000 Binary files a/sandbox/ontopia.net/images/download-big.png and /dev/null differ diff --git a/sandbox/ontopia.net/images/download-button.png b/sandbox/ontopia.net/images/download-button.png deleted file mode 100644 index 2f80e5a40..000000000 Binary files a/sandbox/ontopia.net/images/download-button.png and /dev/null differ diff --git a/sandbox/ontopia.net/images/knowledge-synergy-logo.png b/sandbox/ontopia.net/images/knowledge-synergy-logo.png deleted file mode 100644 index c154671a3..000000000 Binary files a/sandbox/ontopia.net/images/knowledge-synergy-logo.png and /dev/null differ diff --git a/sandbox/ontopia.net/images/logoBig.gif b/sandbox/ontopia.net/images/logoBig.gif deleted file mode 100755 index dce12e9e6..000000000 Binary files a/sandbox/ontopia.net/images/logoBig.gif and /dev/null differ diff --git a/sandbox/ontopia.net/images/menu-arrow-down.png b/sandbox/ontopia.net/images/menu-arrow-down.png deleted file mode 100644 index 64da06015..000000000 Binary files a/sandbox/ontopia.net/images/menu-arrow-down.png and /dev/null differ diff --git a/sandbox/ontopia.net/images/menu-arrow-right.png b/sandbox/ontopia.net/images/menu-arrow-right.png deleted file mode 100644 index b3ef494e7..000000000 Binary files a/sandbox/ontopia.net/images/menu-arrow-right.png and /dev/null differ diff --git a/sandbox/ontopia.net/images/nrk-screenshot.png b/sandbox/ontopia.net/images/nrk-screenshot.png deleted file mode 100644 index e0847c9cb..000000000 Binary files a/sandbox/ontopia.net/images/nrk-screenshot.png and /dev/null differ diff --git a/sandbox/ontopia.net/images/nrk-skole.png b/sandbox/ontopia.net/images/nrk-skole.png deleted file mode 100644 index 7c8a44262..000000000 Binary files a/sandbox/ontopia.net/images/nrk-skole.png and /dev/null differ diff --git a/sandbox/ontopia.net/images/omnigator-screenshot.png b/sandbox/ontopia.net/images/omnigator-screenshot.png deleted file mode 100644 index 5998192ca..000000000 Binary files a/sandbox/ontopia.net/images/omnigator-screenshot.png and /dev/null differ diff --git a/sandbox/ontopia.net/images/oni-big.png b/sandbox/ontopia.net/images/oni-big.png deleted file mode 100644 index 5a7e04e33..000000000 Binary files a/sandbox/ontopia.net/images/oni-big.png and /dev/null differ diff --git a/sandbox/ontopia.net/images/oni-logo.png b/sandbox/ontopia.net/images/oni-logo.png deleted file mode 100644 index c9dd7ece2..000000000 Binary files a/sandbox/ontopia.net/images/oni-logo.png and /dev/null differ diff --git a/sandbox/ontopia.net/images/ontopia-overview.png b/sandbox/ontopia.net/images/ontopia-overview.png deleted file mode 100644 index 71065b6df..000000000 Binary files a/sandbox/ontopia.net/images/ontopia-overview.png and /dev/null differ diff --git a/sandbox/ontopia.net/images/ontopoly-screenshot.png b/sandbox/ontopia.net/images/ontopoly-screenshot.png deleted file mode 100644 index 1ff68c580..000000000 Binary files a/sandbox/ontopia.net/images/ontopoly-screenshot.png and /dev/null differ diff --git a/sandbox/ontopia.net/images/themap.jpg b/sandbox/ontopia.net/images/themap.jpg deleted file mode 100755 index 185c3cbe3..000000000 Binary files a/sandbox/ontopia.net/images/themap.jpg and /dev/null differ diff --git a/sandbox/ontopia.net/images/tm2010.png b/sandbox/ontopia.net/images/tm2010.png deleted file mode 100644 index 715e5ecbf..000000000 Binary files a/sandbox/ontopia.net/images/tm2010.png and /dev/null differ diff --git a/sandbox/ontopia.net/images/tmra-2010.png b/sandbox/ontopia.net/images/tmra-2010.png deleted file mode 100644 index 4bf1a0210..000000000 Binary files a/sandbox/ontopia.net/images/tmra-2010.png and /dev/null differ diff --git a/sandbox/ontopia.net/images/vizigator-screenshot-1.png b/sandbox/ontopia.net/images/vizigator-screenshot-1.png deleted file mode 100644 index a59baf827..000000000 Binary files a/sandbox/ontopia.net/images/vizigator-screenshot-1.png and /dev/null differ diff --git a/sandbox/ontopia.net/images/vizigator-screenshot-2.png b/sandbox/ontopia.net/images/vizigator-screenshot-2.png deleted file mode 100644 index 683a4b967..000000000 Binary files a/sandbox/ontopia.net/images/vizigator-screenshot-2.png and /dev/null differ diff --git a/sandbox/ontopia.net/index.jsp b/sandbox/ontopia.net/index.jsp deleted file mode 100644 index eff818fe9..000000000 --- a/sandbox/ontopia.net/index.jsp +++ /dev/null @@ -1,161 +0,0 @@ -<%@ include file="fragments/declarations.jsp"%> - - -<%@ include file="fragments/tolog.jsp"%> - - -Ontopia home page - - - -
    - - -
    -
    -

    WELCOME TO THE LAND OF ONTOPIA

    -
    Open source tools for - building, maintaining and deploying Topic Maps-based - applications
    - -

    Learn more

    - -
    -
    - -
    -
    -
    -
    - -
    - -
    - -
    BLOG
    - - -
    - - -

    " - >
    - ... -

    - - -
    - -
      - -
    • "> - -
    - -
      - - -

    NEWS

    - - -

    " - >
    - ... -

    -
    - -
    - -

    LEARN!

    - - -

    " - >
    -

    -
    - -

    Learn!

    - -
    -

    GET INVOLVED

    - -

    It's up to you
    -The Ontopia product is created by the Ontopia community, and so the -product is what the community makes it. Anyone can join and contribute -to help make the product better. Follow the links below to get involved.

    - - - -

    Get involved

    - -
    - -

    ONTOPIA'S SUCCESS STORIES

    - -<%! - -static class SelectRandomly { - - public static TopicIF selectAtRandom(String variable, - PageContext pageContext) { - List topics = new ArrayList(ContextUtils.getValue(variable, pageContext)); - Random rnd = new Random(); - int ix = rnd.nextInt(topics.size()); - return (TopicIF) topics.get(ix); - } - - public static int count(String variable, PageContext pageContext) { - List topics = new ArrayList(ContextUtils.getValue(variable, pageContext)); - return topics.size(); - } - -} -%> - - -<% - TopicIF photo = SelectRandomly.selectAtRandom("allprojects", pageContext); - ContextUtils.setSingleValue("prosjekt", pageContext, photo); -%> - -
    -

    " - >

    - " - >"> -
    - -

    More success stories

    - -
    - - - - \ No newline at end of file diff --git a/sandbox/ontopia.net/learn.jsp b/sandbox/ontopia.net/learn.jsp deleted file mode 100644 index 091606b20..000000000 --- a/sandbox/ontopia.net/learn.jsp +++ /dev/null @@ -1,57 +0,0 @@ -<%@ include file="fragments/declarations.jsp"%> - - -<%@ include file="fragments/tolog.jsp"%> - - -Learn -LEARN! - - - - - - <%@ include file="fragments/menu.jsp"%> - - - - - -<% - int ix = 0; -%> - - <% - if (ix % 2 == 0) - out.write(""); - ix++; - %> -
    - - -

    " - >
    - - -

    " - >
    - - - -

    - - -
    -
    - -
    -
    \ No newline at end of file diff --git a/sandbox/ontopia.net/page.jsp b/sandbox/ontopia.net/page.jsp deleted file mode 100644 index 60889e035..000000000 --- a/sandbox/ontopia.net/page.jsp +++ /dev/null @@ -1,59 +0,0 @@ -<%@ include file="fragments/declarations.jsp"%> - - -<%@ include file="fragments/tolog.jsp"%> - -<% - // ugly, I know, but time is tight - if (ContextUtils.getValue("topic", pageContext).isEmpty()) { -%> - - o:id($TOPIC, "<%= request.getParameter("id") %>")? - - -<% - } -%> - - - - - - - - LEARN! > - " - > > - - - - SUCCESS STORIES > - - - - - - - - - <%@ include file="fragments/menu.jsp"%> - - - - - - - " - style="float: right; padding: 6pt"> - - - - - - " style="padding: 6pt" width="600"> - - - - - - \ No newline at end of file diff --git a/sandbox/ontopia.net/resources/rss2xtm.xslt b/sandbox/ontopia.net/resources/rss2xtm.xslt deleted file mode 100644 index 83b69dbcd..000000000 --- a/sandbox/ontopia.net/resources/rss2xtm.xslt +++ /dev/null @@ -1,117 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - 01 - 02 - 03 - 04 - 05 - 06 - 07 - 08 - 09 - 10 - 11 - 12 - - Unknown month: - ! - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/sandbox/ontopia.net/resources/stylesheet.css b/sandbox/ontopia.net/resources/stylesheet.css deleted file mode 100644 index cbde00fc3..000000000 --- a/sandbox/ontopia.net/resources/stylesheet.css +++ /dev/null @@ -1,296 +0,0 @@ - -/* GENERAL DECLARATIONS */ - -body { - background-image: url('../images/themap.jpg'); - background-repeat: no-repeat; - background-attachment: fixed; - background-position: 55% 7%; - font-family: Arial, Verdana, sans-serif; - font-size: 10pt; - width: 900px; - margin: 0px auto; - padding-bottom: 40px; -} - -a { - color: 347a12; - text-decoration: none; -} - -img { - border: none; -} - -div.ider { - margin-top: 2pt; - margin-bottom: 2pt; - border-top: white 1.5pt solid; -} - -/* TOP BOX */ - -#topbox { - background-color: 5f5f5f; - color: white; - text-align: right; - font-size: 10pt; - font-weight: bold; - padding: 6pt; - -moz-border-radius: 0 0 10px 10px; - -webkit-border-bottom-left-radius: 10px; - -webkit-border-bottom-right-radius: 10px; - border-radius: 0 0 10px 10px; -} - -#searchbox { - margin-bottom: 6pt; -} - -span.item a { - color: white; -} - -span.item#itemselected a { - color: 7ae633; -} - -span.item a:hover { - color: 7ae633; - text-decoration: underline; -} - -#menu .sep { - margin-left: 6pt; - margin-right: 6pt; - color: 848484; -} - -.children { - margin-left: 6pt; -} - -.children .ider { - border-top: white 1pt solid; -} - -/* BREADCRUMB TRAIL */ - -.home { - font-size: 12pt; - margin-top: 24pt; -} - -.breadcrumbs { - font-size: 18pt; - font-weight: bold; -} - -.breadcrumbs a { - color: 347a12; -} - -/* CONTENT BOX */ - -.contentbox { - width: 100%; - background-color: eaeaea; - padding: 8pt; - margin-top: 12pt; - background-image: url("../images/circles-large.jpg"); - background-repeat: no-repeat; - background-position: bottom; -} - -.menu { - vertical-align: top; - width: 20%; - font-size: 10pt; -} - -.menu a { - color: black; -} - -.menu p a.selected { - color: #347a12; - font-size: 13pt; - font-weight: bold; -} - -.menu p a.topselected { - color: black; - font-size: 13pt; - font-weight: bold; -} - -.menu p { - margin-top: 0pt; - margin-bottom: 0pt; -} - -td.main, .main td { - vertical-align: top; - font-size: 10pt; - padding-bottom: 48pt; -} - -.contentbox td.main { - padding-left: 12pt; -} - -td.column { - width: 50%; -} - -td.column p { - margin-top: 12pt; -} - -#selected { - border-top: 1.5pt #78a262 solid; -} - -.children #selected { - border-top: 1pt #78a262 solid; -} - -#bottom-spacer { - height: 100px; -} - -table.ordinary td { - padding-bottom: 12pt; -} - -/* FRONT PAGE SPECIFIC */ - -#biglogo { - margin: 12pt; -} - -#top_section { - padding-bottom: 8px; -} - -#top_section_left { - float: left; - width: 60%; - padding: 10px; -} - -#frontpage_ingress { - font-size: 16pt; - color: gray; -} - -#top_section_right { - float:left; -} - -#abouttext { - color: 828282; - font-size: 16pt; -} - -#bloghead { - font-size: 10pt; - background-color: e8e8e7; - width: 10%; - margin-bottom: 0pt; - padding: 6pt; - text-align: center; - -moz-border-radius: 10px 10px 0 0; - -webkit-border-top-left-radius: 10px; - -webkit-border-top-right-radius: 10px; - border-radius: 10px 10px 0 0; - - -webkit-box-shadow: 5px 5px 5px #AAA; - -moz-box-shadow: 5px 5px 5px #AAA; - box-shadow: 5px 5px 5px #AAA; -} - -#bottombox td.normal { - vertical-align: top; - background-color: e8e8e7; - width: 31%; -} - -#blog, .normal { - margin-right: 12pt; - padding: 6pt; -} - -#blog { - -moz-border-radius: 0 10px 10px 10px; - -webkit-border-top-right-radius: 10px; - -webkit-border-bottom-left-radius: 10px; - -webkit-border-bottom-right-radius: 10px; - border-radius: 0 10px 10px 10px; - -webkit-box-shadow: 5px 5px 5px #AAA; - -moz-box-shadow: 5px 5px 5px #AAA; - box-shadow: 5px 5px 5px #AAA; - background-image: url("../images/circles-small.jpg"); - background-repeat: no-repeat; - background-position: bottom; -} - -#leftcol { - -moz-border-radius: 10px 0 0 10px; - -webkit-border-top-left-radius: 10px; - -webkit-border-bottom-left-radius: 10px; - border-radius: 10px 0 0 10px; - -webkit-box-shadow: 5px 5px 5px #AAA; - -moz-box-shadow: 5px 5px 5px #AAA; - box-shadow: 5px 5px 5px #AAA; -} - -#rightcol { - -moz-border-radius: 0 10px 10px 0; - -webkit-border-top-right-radius: 10px; - -webkit-border-bottom-right-radius: 10px; - border-radius: 0 10px 10px 0; - -webkit-box-shadow: 5px 5px 5px #AAA; - -moz-box-shadow: 5px 5px 5px #AAA; - box-shadow: 5px 5px 5px #AAA; -} - -#success { - background-color: white; - text-align: center; - padding: 6pt; -} - -#success p { - margin-top: 0pt; - margin-bottom: 0pt; -} - -#bottombox { - font-size: 10pt; - height: 550px; -} - -#spacer { - width: 7%; -} - -/* SEcTION PAGES */ - -#blog p { - margin-bottom: 6pt; -} - -p.byline { - margin-top: 0pt; -} - -.byline { - color: gray; -} - -.logobox { - background-color: white; - padding: 12pt; - text-align: center; -} \ No newline at end of file diff --git a/sandbox/ontopia.net/search.jsp b/sandbox/ontopia.net/search.jsp deleted file mode 100644 index 68acd4a40..000000000 --- a/sandbox/ontopia.net/search.jsp +++ /dev/null @@ -1,66 +0,0 @@ -<%@ include file="fragments/declarations.jsp"%> - - -<%@ include file="fragments/tolog.jsp"%> -<%= request.getParameter("query") %> - - -Search results -SEARCH - - - - - -

    Search results for "":

    - -<% - // yes, I know this is ugly. but it's more important to get this - // site online than it is to write pretty code. - Set seen = new HashSet(); -%> - - - - <% - Object topic = ContextUtils.getSingleValue("TOPIC", pageContext); - if (!seen.contains(topic)) { - %> - - - - <% - seen.add(topic); - } - %> - - - - - - - \ No newline at end of file diff --git a/sandbox/ontopia.net/section.jsp b/sandbox/ontopia.net/section.jsp deleted file mode 100644 index 5978d1fcf..000000000 --- a/sandbox/ontopia.net/section.jsp +++ /dev/null @@ -1,83 +0,0 @@ -<%@ include file="fragments/declarations.jsp"%> - - -<%@ include file="fragments/tolog.jsp"%> - -<% - // ugly, I know, but time is tight - if (ContextUtils.getValue("section", pageContext).isEmpty()) { -%> - - o:id($TOPIC, "<%= request.getParameter("id") %>")? - - -<% - } -%> - -<%@ include file="fragments/tolog.jsp"%> - - - - - LEARN! > - - - - - <%@ include file="fragments/menu.jsp"%> - - - -<%-- articles directly in section --%> - - <%@ include file="fragments/article.jsp"%> - - -<%-- articles divided by section --%> - - -

    - - - <%@ include file="fragments/article.jsp"%> - -
    - -<%-- page that has content for the section --%> - - - - - - " style="padding: 6pt" width="600"> - - -
    - - - - " - > - - - " - > - - - - - - - -
    -
    - -
    -
    \ No newline at end of file diff --git a/sandbox/ontopia.net/services.jsp b/sandbox/ontopia.net/services.jsp deleted file mode 100644 index c51f9759b..000000000 --- a/sandbox/ontopia.net/services.jsp +++ /dev/null @@ -1,38 +0,0 @@ -<%@ include file="fragments/declarations.jsp"%> - - -<%@ include file="fragments/tolog.jsp"%> - - -Services -SERVICES - - - - - -

    This page lists a number of companies which provide services of -different kinds related to the Ontopia software.

    - - - -

    - -
    - " - >"> -
    - - - -
    - -
    - -
    -
    \ No newline at end of file diff --git a/sandbox/ontopia.net/success.jsp b/sandbox/ontopia.net/success.jsp deleted file mode 100644 index 6a8ffdb3e..000000000 --- a/sandbox/ontopia.net/success.jsp +++ /dev/null @@ -1,45 +0,0 @@ -<%@ include file="fragments/declarations.jsp"%> - - -<%@ include file="fragments/tolog.jsp"%> - - -Success stories -SUCCESS STORIES - - - - - - <%@ include file="fragments/menu.jsp"%> - - - - - -

    -
    - - - -

    - -
    - " - >"> -
    - -

    - -
    - -
    - -
    -
    \ No newline at end of file diff --git a/sandbox/ontopia.net/sync.jsp b/sandbox/ontopia.net/sync.jsp deleted file mode 100644 index 9a1cc1ae7..000000000 --- a/sandbox/ontopia.net/sync.jsp +++ /dev/null @@ -1,48 +0,0 @@ -<%@ taglib uri='http://psi.ontopia.net/jsp/taglib/tolog' prefix='tolog'%> -<%@ page language="java" import=" - java.io.FileInputStream, - java.io.FileOutputStream, - javax.xml.transform.TransformerFactory, - javax.xml.transform.Transformer, - javax.xml.transform.stream.StreamSource, - javax.xml.transform.stream.StreamResult, - net.ontopia.utils.DeciderIF, - net.ontopia.utils.DeciderUtils, - net.ontopia.topicmaps.core.TopicMapIF, - net.ontopia.topicmaps.utils.ImportExportUtils, - net.ontopia.topicmaps.utils.TopicMapSynchronizer, - net.ontopia.topicmaps.nav2.utils.ContextUtils -" - contentType="text/html; charset=utf-8"%> - - - -<% - // STEP #1: transform RSS to XTM - String path = pageContext.getServletContext().getRealPath("resources/rss2xtm.xslt"); - FileInputStream is = new FileInputStream(path); - FileOutputStream fos = new FileOutputStream("/tmp/ontopia.xtm"); - StreamSource style = new StreamSource(is); - TransformerFactory factory = TransformerFactory.newInstance(); - StreamSource src = new StreamSource("http://ontopia.wordpress.com/feed/"); - StreamResult result = new StreamResult(fos); - - Transformer trans = factory.newTransformer(style); - trans.transform(src, result); - fos.close(); - - // STEP #2: load XTM - TopicMapIF source = ImportExportUtils.getReader("/tmp/ontopia.xtm").read(); - TopicMapIF target = (TopicMapIF) - ContextUtils.getSingleValue("topicmap", pageContext); - - // STEP #3: synchronize - DeciderIF t = DeciderUtils.getTrueDecider(); - String q = - "{ instance-of($T, i\"http://psi.ontopedia.net/Blogging/Blog\") | " + - " instance-of($T, i\"http://psi.ontopedia.net/Blogging/Post\") }?"; - TopicMapSynchronizer.update(target, q, t, - source, q, t); -%> -OK - \ No newline at end of file diff --git a/sandbox/sdshare/README.txt b/sandbox/sdshare/README.txt deleted file mode 100644 index de030a7ee..000000000 --- a/sandbox/sdshare/README.txt +++ /dev/null @@ -1,48 +0,0 @@ - - EXPERIMENTAL SDSHARE IMPLEMENTATION -======================================= - -This is an experimental implementation of the SDshare protocol, as -defined here: - http://www.egovpt.org/fg/CWA_Part_1b - -It has not been properly tested yet, so please do not rely on this for -anything serious. - - ---- WHAT IT DOES - -Essentially, this is a web application which you drop into an Ontopia -installation. You tell it which topic maps you wish to share, and it -automatically creates snapshot and fragment feeds for those topic maps. - -Note that it does *not* store snapshots or fragments statically, but -instead generates these dynamically as needed. - -It has some limitations at the moment: - - * fragment feeds do not persist when the server is restarted, and - - * some events are not captured by the listener, and thus do not - create fragments. See - http://code.google.com/p/ontopia/issues/detail?id=313 - - ---- INSTALLATION - -Copy src/webapp into your apache-tomcat/webapps directory, probably -under the name "sdshare". - -Run "ant compile jar". Put the sdshare.jar wherever you want. Either -in apache-tomcat/common/lib or sdshare/WEB-INF/lib. - -Copy sdshare.properties where sdshare.jar can see it. That is, into -the /classes directory that corresponds to where you put sdshare.jar. - -Edit sdshare.properties as appropriate. - -Start the server. - -Go to http://localhost:8080/sdshare/topicmaps.jsp - - diff --git a/sandbox/sdshare/build.xml b/sandbox/sdshare/build.xml deleted file mode 100644 index 8c374cbc2..000000000 --- a/sandbox/sdshare/build.xml +++ /dev/null @@ -1,58 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - Creating sdshare jar file... - - - - - - - - - - Creating sdshare webapp .war file... - - - - - - - - - - - - - - - diff --git a/sandbox/sdshare/src/net/ontopia/topicmaps/utils/sdshare/AtomWriter.java b/sandbox/sdshare/src/net/ontopia/topicmaps/utils/sdshare/AtomWriter.java deleted file mode 100644 index d6b7f76ce..000000000 --- a/sandbox/sdshare/src/net/ontopia/topicmaps/utils/sdshare/AtomWriter.java +++ /dev/null @@ -1,118 +0,0 @@ - -package net.ontopia.topicmaps.utils.sdshare; - -import java.io.Writer; -import java.util.TimeZone; -import java.text.SimpleDateFormat; -import org.xml.sax.helpers.AttributeListImpl; -import net.ontopia.xml.PrettyPrinter; -import net.ontopia.infoset.core.LocatorIF; - -/** - * INTERNAL: Utility class using SAX DocumentHandler events to produce - * an Atom output. - */ -public class AtomWriter { - private PrettyPrinter out; - private AttributeListImpl atts; - private SimpleDateFormat format; - - public AtomWriter(Writer out) { - this.out = new PrettyPrinter(out, null); // null = no XML decl - this.atts = new AttributeListImpl(); - this.format = new SimpleDateFormat("yyyy-MM-dd'T'HH:mm:ss'Z'"); - format.setTimeZone(TimeZone.getTimeZone("Z")); - } - - public void startFeed(String title, long updated, String id) { - out.startDocument(); - atts.addAttribute("xmlns", "CDATA", "http://www.w3.org/2005/Atom"); - atts.addAttribute("xmlns:sdshare", "CDATA", - "http://www.egovpt.org/sdshare"); - out.startElement("feed", atts); - - atts.clear(); - out.startElement("title", atts); - out.characters(title.toCharArray(), 0, title.length()); - out.endElement("title"); - - atts.clear(); - out.startElement("updated", atts); - String content = format.format(updated); - out.characters(content.toCharArray(), 0, content.length()); - out.endElement("updated"); - - atts.clear(); - out.startElement("author", atts); - out.startElement("name", atts); - content = "Ontopia SDshare server"; - out.characters(content.toCharArray(), 0, content.length()); - out.endElement("name"); - out.endElement("author"); - - atts.clear(); - out.startElement("id", atts); - out.characters(id.toCharArray(), 0, id.length()); - out.endElement("id"); - } - - public void addServerPrefix(String prefix) { - atts.clear(); - out.startElement("sdshare:ServerSrcLocatorPrefix", atts); - out.characters(prefix.toCharArray(), 0, prefix.length()); - out.endElement("sdshare:ServerSrcLocatorPrefix"); - } - - public void startEntry(String title, String id, long updated) { - atts.clear(); - out.startElement("entry", atts); - - atts.clear(); - out.startElement("title", atts); - out.characters(title.toCharArray(), 0, title.length()); - out.endElement("title"); - - atts.clear(); - out.startElement("updated", atts); - String content = format.format(updated); - out.characters(content.toCharArray(), 0, content.length()); - out.endElement("updated"); - - atts.clear(); - out.startElement("id", atts); - out.characters(id.toCharArray(), 0, id.length()); - out.endElement("id"); - } - - public void addLink(String href) { - addLink(href, null, null); - } - - public void addLink(String href, String type, String rel) { - atts.clear(); - atts.addAttribute("href", "CDATA", href); - if (type != null) - atts.addAttribute("type", "CDATA", type); - if (rel != null) - atts.addAttribute("rel", "CDATA", rel); - out.startElement("link", atts); - out.endElement("link"); - } - - public void addTopicSI(LocatorIF si) { - atts.clear(); - out.startElement("sdshare:TopicSI", atts); - String content = si.getExternalForm(); - out.characters(content.toCharArray(), 0, content.length()); - out.endElement("sdshare:TopicSI"); - } - - public void endEntry() { - out.endElement("entry"); - } - - public void endFeed() { - out.endElement("feed"); - out.endDocument(); - } -} \ No newline at end of file diff --git a/sandbox/sdshare/src/net/ontopia/topicmaps/utils/sdshare/ChangedTopic.java b/sandbox/sdshare/src/net/ontopia/topicmaps/utils/sdshare/ChangedTopic.java deleted file mode 100644 index 0d44865b5..000000000 --- a/sandbox/sdshare/src/net/ontopia/topicmaps/utils/sdshare/ChangedTopic.java +++ /dev/null @@ -1,37 +0,0 @@ - -package net.ontopia.topicmaps.utils.sdshare; - -/** - * INTERNAL: Represents a change to a single topic. - */ -public class ChangedTopic { - private String objid; - private long timestamp; // millisecs since standard Java epoch - - public ChangedTopic(String objid) { - this.objid = objid; - this.timestamp = System.currentTimeMillis(); - } - - public String getObjectId() { - return objid; - } - - public long getTimestamp() { - return timestamp; - } - - public boolean isDeleted() { - return false; - } - - public int hashCode() { - return objid.hashCode(); - } - - public boolean equals(Object o) { - if (o instanceof ChangedTopic) - return ((ChangedTopic) o).getObjectId().equals(objid); - return false; - } -} diff --git a/sandbox/sdshare/src/net/ontopia/topicmaps/utils/sdshare/ConsumerClient.java b/sandbox/sdshare/src/net/ontopia/topicmaps/utils/sdshare/ConsumerClient.java deleted file mode 100644 index 794a6908f..000000000 --- a/sandbox/sdshare/src/net/ontopia/topicmaps/utils/sdshare/ConsumerClient.java +++ /dev/null @@ -1,733 +0,0 @@ - -package net.ontopia.topicmaps.utils.sdshare; - -import java.util.Set; -import java.util.Map; -import java.util.List; -import java.util.HashMap; -import java.util.ArrayList; -import java.util.Collection; -import java.util.TimeZone; -import java.io.IOException; -import java.text.ParseException; -import java.text.SimpleDateFormat; - -import org.xml.sax.XMLReader; -import org.xml.sax.Attributes; -import org.xml.sax.SAXException; -import org.xml.sax.helpers.DefaultHandler; - -import net.ontopia.utils.StringUtils; -import net.ontopia.utils.CompactHashSet; -import net.ontopia.xml.DefaultXMLReaderFactory; -import net.ontopia.infoset.core.LocatorIF; -import net.ontopia.infoset.impl.basic.URILocator; -import net.ontopia.topicmaps.core.*; -import net.ontopia.topicmaps.entry.TopicMapReferenceIF; -import net.ontopia.topicmaps.utils.MergeUtils; -import net.ontopia.topicmaps.utils.KeyGenerator; -import net.ontopia.topicmaps.xml.XTMTopicMapReader; - -/** - * PUBLIC: An SDshare client which can poll an SDshare fragment feed - * to update a local topic map. - */ -public class ConsumerClient { - private long lastChange; - private long lastCheck; - private long checkInterval; - private boolean stopped; - private TopicMapReferenceIF ref; - private String feedurl; - private static SimpleDateFormat format = - new SimpleDateFormat("yyyy-MM-dd'T'HH:mm:ss'Z'"); - - static { - format.setTimeZone(TimeZone.getTimeZone("Z")); - } - - // constants - private static final String NS_ATOM = "http://www.w3.org/2005/Atom"; - private static final String NS_SD = "http://www.egovpt.org/sdshare"; - - /** - * PUBLIC: Creates the client, but does nothing more. - */ - public ConsumerClient(TopicMapReferenceIF ref, String feedurl) { - this.ref = ref; - this.feedurl = feedurl; - } - - /** - * PUBLIC: Starts an infinite loop checking the SDshare feed - * repeatedly with the given time interval between checks. - * Continues until stopSync() is called. Does not start a - * new thread; this is left for the API client to do. - */ - public void startSync() { - stopped = false; - while (!stopped) { - try { - sync(); - } catch (Exception e) { - e.printStackTrace(); // FIXME: log properly! - // wait, then carry on, assuming this was temporary - } - try { - Thread.sleep(checkInterval); - } catch (InterruptedException e) { - // well, whatever - } - } - } - - /** - * PUBLIC: Checks the SDshare feed to see if there are any changes - * since last sync(), then applies any new changes in the feed, - * updating the topic map. Starts a transaction on the topic map - * reference, and commits/rollsback changes afterwards. - */ - public void sync() throws IOException, SAXException { - // (1) check the fragments feed - FragmentFeed feed = getFragmentFeed(); - System.out.println("FOUND " + feed.getFragments().size() + " fragments"); - if (feed.getFragments().isEmpty()) - return; // nothing to do - - boolean committed = false; - TopicMapStoreIF store = null; - try { - // (2) start a transaction - store = ref.createStore(false); - - // (3) loop over fragments, applying each - for (Fragment frag : feed.getFragments()) { - System.out.println("Applying fragment " + frag); - applyFragment(feed.getPrefix(), frag, store.getTopicMap()); - } - - // (4) commit - store.commit(); - store.close(); - } finally { - if (store != null) { - if (!committed) - store.abort(); - store.close(); // recycle the store - } - } - } - - /** - * PUBLIC: If the sync loop is running, calling this method makes it - * stop. If the sync loop is not running, calling this method has no - * effect. - */ - public void stopSync() { - stopped = true; - } - - /** - * PUBLIC: Returns the interval between feed checks in the - * startSync() method, measured in milliseconds. - */ - public long getCheckInterval() { - return checkInterval; - } - - /** - * PUBLIC: Sets the interval between feed checks in the startSync() - * method, measured in milliseconds. - */ - public void setCheckInterval(long interval) { - checkInterval = interval; - } - - public FragmentFeed getFragmentFeed() throws IOException, SAXException { - // TODO: we should support if-modified-since - FragmentFeedReader handler = new FragmentFeedReader(feedurl, lastChange); - XMLReader parser = new DefaultXMLReaderFactory().createXMLReader(); - parser.setContentHandler(handler); - parser.parse(feedurl); - return handler.getFragmentFeed(); - } - - /** - * PUBLIC: Returns the modification time of the last change - * processed by the client. Corresponds with the <updated> - * entries on snapshots and fragments. - */ - public long getLastUpdate() { - return lastChange; - } - - /** - * PUBLIC: Informs the client that the underlying topic map is up to - * date as of the given time. Useful for when modification times - * have been found by other means (for example persisted from - * earlier invocations). - */ - public void setLastUpdate(long timestamp) { - this.lastChange = timestamp; - } - - /** - * PUBLIC: Reads a collection feed and returns an object representing - * (the interesting part of) the contents of the feed. - */ - public static CollectionFeed readCollectionFeed(String uri) - throws IOException, SAXException { - CollectionFeedReader handler = new CollectionFeedReader(uri); - XMLReader parser = new DefaultXMLReaderFactory().createXMLReader(); - parser.setContentHandler(handler); - parser.parse(uri); - return handler.getCollectionFeed(); - } - - /** - * PUBLIC: Reads a snapshot feed and returns a list of the - * snapshots. The order of the list is the same as in the feed. - */ - public static SnapshotFeed readSnapshotFeed(String uri) - throws IOException, SAXException { - SnapshotFeedReader handler = new SnapshotFeedReader(uri); - XMLReader parser = new DefaultXMLReaderFactory().createXMLReader(); - parser.setContentHandler(handler); - parser.parse(uri); - return handler.getFeed(); - } - - // --- Actual implementation - - private void applyFragment(LocatorIF oprefix, Fragment fragment, - TopicMapIF topicmap) throws IOException { - String prefix = oprefix.getAddress(); - - // FIXME: before issue #3680 is cleared up, we don't know how to - // interpret multiple SIs on a single fragment. for now we will - // just assume that all entries have only a single SI. - // http://projects.topicmapslab.de/issues/3680 - if (fragment.getTopicSIs().size() != 1) - throw new RuntimeException("Fragment " + fragment.getFragmentURI() + - " had wrong number of TopicSIs: " + - fragment.getTopicSIs().size()); - - System.out.println("TopicSI: " + fragment.getTopicSIs()); - - // (1) get the fragment - // FIXME: for now we only support XTM - XTMTopicMapReader reader = new XTMTopicMapReader(fragment.getFragmentURI()); - reader.setFollowTopicRefs(false); - TopicMapIF tmfragment = reader.read(); - System.out.println("Fragment size: " + tmfragment.getTopics().size()); - - // (2) apply it - LocatorIF si = fragment.getTopicSIs().iterator().next(); - TopicIF ftopic = tmfragment.getTopicBySubjectIdentifier(si); - TopicIF ltopic = topicmap.getTopicBySubjectIdentifier(si); - - System.out.println("ftopic: " + ftopic); - System.out.println("ltopic: " + ltopic); - - // (a) check if we need to create the topic - if (ltopic == null && ftopic != null) - // the topic exists in the source, but not in the target, therefore - // we create it - ltopic = topicmap.getBuilder().makeTopic(); - - // there might not be a fragment topic, which indicates that it's been - // deleted. in this case we make a blank dummy that will cause everything - // to be deleted, and the local topic to be deleted at the end. - if (ftopic == null) - ftopic = tmfragment.getBuilder().makeTopic(); - - // (b) copy across all identifiers - MergeUtils.copyIdentifiers(ltopic, ftopic); - - // (c) merge all topics in the fragment into the target. this is - // necessary so that all types, scoping topics, and associated - // topics are actually present in the target when we update the - // topic characteristics. (however, we can't merge in the current - // topic, as the procedure for that one is a bit more complex.) - for (TopicIF oftopic : tmfragment.getTopics()) - if (oftopic != ftopic) - MergeUtils.mergeInto(topicmap, oftopic); - - // (d) sync the types - // FIXME: how the hell do we do this? - - // (e) sync the names - Map keymap = makeKeyMap(ftopic.getTopicNames(), topicmap); - syncCollection(ftopic, ltopic, keymap, ltopic.getTopicNames(), prefix); - - // (f) sync the occurrences - keymap = makeKeyMap(ftopic.getOccurrences(), topicmap); - syncCollection(ftopic, ltopic, keymap, ltopic.getOccurrences(), prefix); - - // (g) sync the associations - keymap = makeKeyMap(getAssociations(ftopic), topicmap); - syncCollection(ftopic, ltopic, keymap, getAssociations(ltopic), prefix); - - // (h) is the topic deleted - if (ltopic.getTopicNames().isEmpty() && - ltopic.getOccurrences().isEmpty() && - ltopic.getRoles().isEmpty()) - ltopic.remove(); // empty topic, therefore remove - - // (3) update lastChange - lastChange = fragment.getUpdated(); - } - - private Map - makeKeyMap(Collection objects, TopicMapIF othertm) { - Map keymap = new HashMap(); - for (ReifiableIF object : objects) - keymap.put(KeyGenerator.makeKey(object, othertm), object); - return keymap; - } - - private void syncCollection(TopicIF ftopic, TopicIF ltopic, - Map keymap, - Collection lobjects, - String prefix) { - // check all local objects against the fragment - lobjects = new ArrayList(lobjects); // avoid concmodexc - for (ReifiableIF lobject : lobjects) { - String key = KeyGenerator.makeKey(lobject); - ReifiableIF fobject = keymap.get(key); - - if (fobject == null) { - // the source doesn't have this object. however, if it still has - // item identifiers (other than ours), we can keep it. we do - // need to remove any iids starting with the prefix, though. - pruneItemIdentifiers(lobject, prefix); - if (lobject.getItemIdentifiers().isEmpty()) - lobject.remove(); - } else { - // the source has this object. we need to make sure the local - // copy has the item identifier. - addItemIdentifier(lobject, prefix); - keymap.remove(key); // we've seen this one, so cross it off - } - } - - // copy the objects in the source which are not in the local copy - // across to the local copy, adding item identifiers - for (ReifiableIF fobject : keymap.values()) { - ReifiableIF lobject = MergeUtils.mergeInto(ltopic, fobject); - addItemIdentifier(lobject, prefix); - } - } - - private void pruneItemIdentifiers(TMObjectIF object, String prefix) { - for (LocatorIF iid : object.getItemIdentifiers()) - if (iid.getAddress().startsWith(prefix)) - object.removeItemIdentifier(iid); - } - - // FIXME: this doesn't really add; it just ensures that the object has - // one. ie: method is idempotent. - private void addItemIdentifier(TMObjectIF object, String prefix) { - for (LocatorIF iid : object.getItemIdentifiers()) - if (iid.getAddress().startsWith(prefix)) - return; // it already has one; we're done - - // it doesn't really matter what the iid is, so long as it is - // unique and starts with the right prefix. we therefore take what - // we assume is the shortest path to the goal. - TopicMapIF topicmap = object.getTopicMap(); - LocatorIF base = topicmap.getStore().getBaseAddress(); - String objectid = object.getObjectId(); - LocatorIF iid = base.resolveAbsolute("#sd" + objectid); - while (topicmap.getObjectByItemIdentifier(iid) != null) - iid = base.resolveAbsolute("#sd" + objectid + '-' + - StringUtils.makeRandomId(5)); - - object.addItemIdentifier(iid); - } - - private Collection getAssociations(TopicIF topic) { - Collection assocs = new ArrayList(); - for (AssociationRoleIF role : topic.getRoles()) - assocs.add(role.getAssociation()); - return assocs; - } - - // --- Abstract ContentHandler - // can track element contents, and does track the "updated" element - - private abstract static class AbstractFeedReader extends DefaultHandler { - protected LocatorIF feedurl; - - // tracking - protected boolean keep; // whether to keep text content - protected StringBuilder buf; // accumulating buffer - protected boolean inEntry; - protected long updated; // content of last - - public AbstractFeedReader(String feedurl) { - this.feedurl = URILocator.create(feedurl); - this.buf = new StringBuilder(); - } - - public void startElement(String uri, String name, String qname, - Attributes atts) { - if (uri.equals(NS_ATOM) && name.equals("entry")) - inEntry = true; // other book-keeping done in endElement() - - else if (uri.equals(NS_ATOM) && name.equals("updated")) - keep = true; - } - - public void characters(char[] ch, int start, int length) { - if (keep) - buf.append(ch, start, length); - } - - public void endElement(String uri, String name, String qname) { - if (uri.equals(NS_ATOM) && name.equals("entry")) { - inEntry = false; - updated = -1; - - } else if (uri.equals(NS_ATOM) && name.equals("updated")) { - try { - updated = format.parse(buf.toString()).getTime(); - } catch (ParseException e) { - throw new RuntimeException(e); - } - } - - if (keep) { - buf.setLength(0); // empty, but reuse buffer - keep = false; - } - } - } - - // --- Fragment feed ContentHandler - - /** - * INTERNAL: SAX 2.0 ContentHandler to interpret Atom fragment feeds. - */ - private static class FragmentFeedReader extends AbstractFeedReader { - private FragmentFeed feed; - private long lastChange; - - // tracking - private String mimetype; // mimetype of last fragment link - private String fraglink; // href of last fragment link - private Set sis; // current s - - public FragmentFeedReader(String feedurl, long lastChange) { - super(feedurl); - this.lastChange = lastChange; - this.feed = new FragmentFeed(); - this.sis = new CompactHashSet(); - } - - public FragmentFeed getFragmentFeed() { - return feed; - } - - public void startElement(String uri, String name, String qname, - Attributes atts) { - super.startElement(uri, name, qname, atts); - - if ((uri.equals(NS_SD) && name.equals("ServerSrcLocatorPrefix")) || - (uri.equals(NS_SD) && name.equals("TopicSI"))) - keep = true; - - else if (uri.equals(NS_ATOM) && name.equals("link") && inEntry) { - String rel = atts.getValue("rel"); - if (rel == null || !rel.equals("alternate")) - return; // then we don't know what this is - - String type = atts.getValue("type"); - if (!isOKMimeType(type)) - return; // we can't load this, so we're passing on it - - String href = atts.getValue("href"); - if (href == null) - throw new RuntimeException("No href attribute on "); - - mimetype = type; - fraglink = href; - } - } - - public void endElement(String uri, String name, String qname) { - if (uri.equals(NS_SD) && name.equals("ServerSrcLocatorPrefix")) - feed.setPrefix(URILocator.create(buf.toString())); - - else if (uri.equals(NS_SD) && name.equals("TopicSI")) - sis.add(URILocator.create(buf.toString())); - - else if (uri.equals(NS_ATOM) && name.equals("entry")) { - // verify that we've got everything - if (mimetype == null || fraglink == null) - throw new RuntimeException("Fragment entry had no suitable links"); - if (updated == -1) - throw new RuntimeException("Fragment entry had no updated field"); - if (sis.isEmpty()) - throw new RuntimeException("Fragment entry had no TopicSIs"); - - // check if this is a new fragment, or if we saw it before - if (updated >= lastChange) { - System.out.println("New fragment, updated: " + updated); - - // create new fragment - LocatorIF fraguri = feedurl.resolveAbsolute(fraglink); - feed.addFragment(new Fragment(fraguri, mimetype, sis, updated)); - } else - System.out.println("Found old fragment, updated: " + updated); - - // reset tracking fields - mimetype = null; - fraglink = null; - sis = new CompactHashSet(); - } - - super.endElement(uri, name, qname); - } - - private boolean isOKMimeType(String mimetype) { - // FIXME: implement! - return true; - } - } - - // --- FragmentFeed representation - - /** - * INTERNAL: Represents the pieces of information we collect when - * polling a fragment feed. Just a simple data carrier. - */ - public static class FragmentFeed { - private LocatorIF prefix; - private List fragments; - - public FragmentFeed() { - this.fragments = new ArrayList(); - } - - public void setPrefix(LocatorIF prefix) { - this.prefix = prefix; - } - - public LocatorIF getPrefix() { - return prefix; - } - - public void addFragment(Fragment fragment) { - fragments.add(fragment); - } - - public List getFragments() { - return fragments; - } - } - - /** - * INTERNAL: Represents an individual fragment in a fragment feed. - * Again just a data carrier. - */ - public static class Fragment { - private Set topicSIs; - private LocatorIF fragmenturi; - private String mimetype; - private long updated; - - public Fragment(LocatorIF fragmenturi, String mimetype, - Set topicSIs, long updated) { - this.fragmenturi = fragmenturi; - this.mimetype = mimetype; - this.topicSIs = topicSIs; - this.updated = updated; - } - - public LocatorIF getFragmentURI() { - return fragmenturi; - } - - public String getMIMEType() { - return mimetype; - } - - public Set getTopicSIs() { - return topicSIs; - } - - public long getUpdated() { - return updated; - } - } - - /** - * INTERNAL: SAX 2.0 ContentHandler to interpret Atom collection feeds. - */ - private static class CollectionFeedReader extends DefaultHandler { - private LocatorIF feedurl; - private CollectionFeed feed; - - public CollectionFeedReader(String feedurl) { - this.feedurl = URILocator.create(feedurl); - this.feed = new CollectionFeed(); - } - - public CollectionFeed getCollectionFeed() { - return feed; - } - - public void startElement(String uri, String name, String qname, - Attributes atts) { - if (uri.equals(NS_ATOM) && name.equals("link")) { - String href = atts.getValue("href"); - if (href == null) - throw new RuntimeException("No href attribute on "); - - String rel = atts.getValue("rel"); - if (rel == null) - return; - - LocatorIF theuri = feedurl.resolveAbsolute(href); - if (rel.equals("http://www.egovpt.org/sdshare/fragmentsfeed")) - feed.setFragmentFeed(theuri); - else if (rel.equals("http://www.egovpt.org/sdshare/snapshotsfeed")) - feed.setSnapshotFeed(theuri); - } - } - } - - /** - * PUBLIC: Represents a collection feed. Just a data carrier. - */ - public static class CollectionFeed { - private LocatorIF fragmentfeed; - private LocatorIF snapshotfeed; - - public CollectionFeed() { - } - - public LocatorIF getFragmentFeed() { - return fragmentfeed; - } - - public void setFragmentFeed(LocatorIF uri) { - fragmentfeed = uri; - } - - public LocatorIF getSnapshotFeed() { - return snapshotfeed; - } - - public void setSnapshotFeed(LocatorIF uri) { - snapshotfeed = uri; - } - } - - /** - * INTERNAL: SAX 2.0 ContentHandler to interpret Atom snapshot feeds. - */ - private static class SnapshotFeedReader extends AbstractFeedReader { - private SnapshotFeed feed; - private Snapshot current; // INV: null outside of elements - - public SnapshotFeedReader(String feedurl) { - super(feedurl); - this.feed = new SnapshotFeed(); - } - - public SnapshotFeed getFeed() { - return feed; - } - - public void startElement(String uri, String name, String qname, - Attributes atts) { - super.startElement(uri, name, qname, atts); - - if (uri.equals(NS_SD) && name.equals("ServerSrcLocatorPrefix")) - keep = true; - - else if (uri.equals(NS_ATOM) && name.equals("entry")) - current = new Snapshot(); // other book-keeping done in endElement() - - else if (uri.equals(NS_ATOM) && name.equals("link") && inEntry) { - String rel = atts.getValue("rel"); - if (rel == null || !rel.equals("alternate")) - return; // then we don't know what this is - - String href = atts.getValue("href"); - if (href == null) - throw new RuntimeException("No href attribute on "); - - current.setFeedURI(feedurl.resolveAbsolute(href)); - } - } - - public void endElement(String uri, String name, String qname) { - if (uri.equals(NS_ATOM) && name.equals("entry")) { - feed.addSnapshot(current); - current = null; - } else if (uri.equals(NS_SD) && name.equals("ServerSrcLocatorPrefix")) - feed.setPrefix(URILocator.create(buf.toString())); - - super.endElement(uri, name, qname); - - if (uri.equals(NS_ATOM) && name.equals("updated") && inEntry) - current.setUpdated(updated); - } - } - - /** - * PUBLIC: Simple data-carrier class for snapshot feeds. - */ - public static class SnapshotFeed { - private List snapshots; - private LocatorIF prefix; - - public SnapshotFeed() { - this.snapshots = new ArrayList(); - } - - public List getSnapshots() { - return snapshots; - } - - public void addSnapshot(Snapshot snapshot) { - snapshots.add(snapshot); - } - - public LocatorIF getPrefix() { - return prefix; - } - - public void setPrefix(LocatorIF prefix) { - this.prefix = prefix; - } - } - - /** - * PUBLIC: Simple data-carrier class representing an entry in a - * snapshot feed. - */ - public static class Snapshot { - private LocatorIF uri; - private long timestamp; - - public LocatorIF getFeedURI() { - return uri; - } - - public void setFeedURI(LocatorIF uri) { - this.uri = uri; - } - - public long getUpdated() { - return timestamp; - } - - public void setUpdated(long timestamp) { - this.timestamp = timestamp; - } - } -} \ No newline at end of file diff --git a/sandbox/sdshare/src/net/ontopia/topicmaps/utils/sdshare/DeletedTopic.java b/sandbox/sdshare/src/net/ontopia/topicmaps/utils/sdshare/DeletedTopic.java deleted file mode 100644 index f1e851aaa..000000000 --- a/sandbox/sdshare/src/net/ontopia/topicmaps/utils/sdshare/DeletedTopic.java +++ /dev/null @@ -1,55 +0,0 @@ - -package net.ontopia.topicmaps.utils.sdshare; - -import java.util.ArrayList; -import java.util.Collection; -import java.util.Collections; - -import net.ontopia.infoset.core.LocatorIF; -import net.ontopia.topicmaps.core.TopicIF; -import net.ontopia.topicmaps.core.TMObjectIF; - -/** - * INTERNAL: Represents the deletion of a single topic. We need this - * to preserve the identity of deleted topics, since that will no - * longer exist in the topic map. Making these a separate class in - * order to save memory with long change lists. Could make it even - * more compact, but not bothering right now. - */ -public class DeletedTopic extends ChangedTopic { - private Collection sis; - private Collection sls; - private Collection iis; - - public DeletedTopic(TMObjectIF object) { - super(object.getObjectId()); // sufficient for duplicate removal - TopicIF topic = (TopicIF) object; - this.sis = copyOf(topic.getSubjectIdentifiers()); - this.sls = copyOf(topic.getSubjectLocators()); - this.iis = copyOf(topic.getItemIdentifiers()); - } - - public boolean isDeleted() { - return true; - } - - public Collection getSubjectIdentifiers() { - return sis; - } - - public Collection getSubjectLocators() { - return sls; - } - - public Collection getItemIdentifiers() { - return iis; - } - - private Collection copyOf(Collection ids) { - if (ids.isEmpty()) - return Collections.EMPTY_SET; - - return new ArrayList(ids); - } - -} diff --git a/sandbox/sdshare/src/net/ontopia/topicmaps/utils/sdshare/StartUpServlet.java b/sandbox/sdshare/src/net/ontopia/topicmaps/utils/sdshare/StartUpServlet.java deleted file mode 100644 index 1a8599544..000000000 --- a/sandbox/sdshare/src/net/ontopia/topicmaps/utils/sdshare/StartUpServlet.java +++ /dev/null @@ -1,89 +0,0 @@ - -package net.ontopia.topicmaps.utils.sdshare; - -import java.util.Map; -import java.util.List; -import java.util.Arrays; -import java.util.HashMap; -import java.util.ArrayList; -import java.util.Collection; -import java.util.Properties; -import java.io.IOException; - -import javax.servlet.ServletConfig; -import javax.servlet.ServletException; -import javax.servlet.http.HttpServlet; - -import org.slf4j.Logger; -import org.slf4j.LoggerFactory; - -import net.ontopia.utils.StringUtils; -import net.ontopia.utils.PropertyUtils; -import net.ontopia.topicmaps.core.events.TopicMapEvents; -import net.ontopia.topicmaps.entry.TopicMaps; -import net.ontopia.topicmaps.entry.TopicMapReferenceIF; -import net.ontopia.topicmaps.entry.TopicMapRepositoryIF; - -/** - * PUBLIC: This servlet loads at starts up and reads the - * configuration. It then registers event listeners so that the - * SDshare implementation is notified of any changes. - */ -public class StartUpServlet extends HttpServlet { - public static Map topicmaps; - private static Properties properties; - static Logger log = LoggerFactory.getLogger(StartUpServlet.class.getName()); - - public void init(ServletConfig config) throws ServletException { - super.init(config); - log.info("Starting SDshare setup servlet"); - - // (1) load config - try { - properties = PropertyUtils.loadPropertiesFromClassPath("sdshare.properties"); - if (properties == null) { - log.error("Could not find sdshare.properties!"); - throw new ServletException("Could not find sdshare.properties!"); - } else - log.debug("Loaded " + properties.size() + " SDshare properties"); - } catch (IOException e) { - throw new ServletException(e); - } - List tmids = getTopicMapIds(); - - // (2) register event listeners - topicmaps = new HashMap(); - TopicMapRepositoryIF rep = TopicMaps.getRepository(); - for (String tmid : tmids) { - TopicMapReferenceIF ref = rep.getReferenceByKey(tmid); - if (ref == null) { - log.error("No topic map reference for ID: '" + tmid + "'"); - continue; - } - TopicMapTracker tracker = new TopicMapTracker(ref); - TopicMapEvents.addTopicListener(ref, tracker); - topicmaps.put(tmid, tracker); - } - log.debug("SDshare setup servlet initialized"); - } - - public static List getTopicMapIds() { - String tmids = properties.getProperty("topicmaps"); - if (tmids == null) { - log.error("No topic maps configured for SDshare"); - tmids = ""; - } - String[] ids = StringUtils.split(tmids, ","); - for (int ix = 0; ix < ids.length; ix++) - ids[ix] = ids[ix].trim(); - return Arrays.asList(ids); - } - - public static String getEndpointURL() { - return properties.getProperty("endpoint"); - } - - public static String getTitle() { - return properties.getProperty("title"); - } -} \ No newline at end of file diff --git a/sandbox/sdshare/src/net/ontopia/topicmaps/utils/sdshare/TopicMapTracker.java b/sandbox/sdshare/src/net/ontopia/topicmaps/utils/sdshare/TopicMapTracker.java deleted file mode 100644 index ea57ec093..000000000 --- a/sandbox/sdshare/src/net/ontopia/topicmaps/utils/sdshare/TopicMapTracker.java +++ /dev/null @@ -1,77 +0,0 @@ - -package net.ontopia.topicmaps.utils.sdshare; - -import java.util.List; -import java.util.ArrayList; - -import net.ontopia.topicmaps.core.TMObjectIF; -import net.ontopia.topicmaps.core.events.TopicMapListenerIF; -import net.ontopia.topicmaps.entry.TopicMapReferenceIF; - -// FIXME: list of changes grows without bound -// FIXME: list of changes is not persistent - -/** - * INTERNAL: Event listener class which maintains a list of changed - * topics, ready to be output into the fragment feed. - */ -public class TopicMapTracker implements TopicMapListenerIF { - private TopicMapReferenceIF ref; - private List changes; - - public TopicMapTracker(TopicMapReferenceIF ref) { - this.ref = ref; - this.changes = new ArrayList(); - } - - public String getTopicMapId() { - return ref.getId(); - } - - public TopicMapReferenceIF getReference() { - return ref; - } - - public List getChangeFeed() { - return changes; - } - - public long getLastChanged() { - if (changes.isEmpty()) - return 0; // ie: it hasn't ever changed - else - return changes.get(changes.size() - 1).getTimestamp(); - } - - private synchronized void modified(TMObjectIF snapshot, boolean deleted) { - ChangedTopic o; - if (deleted) - o = new DeletedTopic(snapshot); - else - o = new ChangedTopic(snapshot.getObjectId()); - - int pos = changes.lastIndexOf(o); - if (pos == -1) - changes.add(o); - else if (pos == (changes.size() - 1)) - changes.set(pos, o); - else { - changes.remove(pos); - changes.add(o); - } - } - - // --- TopicMapListenerIF implementation - - public void objectAdded(TMObjectIF snapshot) { - modified(snapshot, false); - } - - public void objectModified(TMObjectIF snapshot) { - modified(snapshot, false); - } - - public void objectRemoved(TMObjectIF snapshot) { - modified(snapshot, true); - } -} \ No newline at end of file diff --git a/sandbox/sdshare/src/sdshare.properties b/sandbox/sdshare/src/sdshare.properties deleted file mode 100644 index c3418d530..000000000 --- a/sandbox/sdshare/src/sdshare.properties +++ /dev/null @@ -1,5 +0,0 @@ -# topicmaps property holds a comma-separated list of the topic maps to -# create sdshare feeds for -topicmaps=beer.xtm -endpoint=http://localhost:8080/sdshare/ -title=SDshare feeds from localhost diff --git a/sandbox/sdshare/src/webapp/WEB-INF/web.xml b/sandbox/sdshare/src/webapp/WEB-INF/web.xml deleted file mode 100644 index f84f776c6..000000000 --- a/sandbox/sdshare/src/webapp/WEB-INF/web.xml +++ /dev/null @@ -1,21 +0,0 @@ - - - - - - SDshare feeds - - Provides SDshare feeds for selected topic maps. - - - - Startup - - net.ontopia.topicmaps.utils.sdshare.StartUpServlet - - 1 - - - diff --git a/sandbox/sdshare/src/webapp/changes.jsp b/sandbox/sdshare/src/webapp/changes.jsp deleted file mode 100644 index c3eb8e522..000000000 --- a/sandbox/sdshare/src/webapp/changes.jsp +++ /dev/null @@ -1,53 +0,0 @@ -<%@ page - language="java" - contentType="application/atom+xml; charset=utf-8" - import="java.util.Collection, - net.ontopia.infoset.core.LocatorIF, - net.ontopia.topicmaps.utils.sdshare.*, - net.ontopia.topicmaps.entry.TopicMapReferenceIF, - net.ontopia.topicmaps.core.*" -%><% - - // TODO: should support if-modified-since - - String tmid = request.getParameter("topicmap"); - //String prefix = StartUpServlet.getEndpointURL() + tmid; - - TopicMapTracker tracker = StartUpServlet.topicmaps.get(tmid); - TopicMapReferenceIF ref = tracker.getReference(); - TopicMapStoreIF store = ref.createStore(true); - TopicMapIF tm = store.getTopicMap(); - String prefix = store.getBaseAddress().getExternalForm(); - - AtomWriter atom = new AtomWriter(out); - atom.startFeed("Fragments feed for " + ref.getTitle(), - System.currentTimeMillis(), - prefix + "/fragments"); - - atom.addServerPrefix(prefix); - - for (ChangedTopic change : tracker.getChangeFeed()) { - atom.startEntry("Topic with object ID " + change.getObjectId(), - prefix + "/" + change.getObjectId() + "/" + change.getTimestamp(), - change.getTimestamp()); - atom.addLink("fragment.jsp?topicmap=" + tmid + "&topic=" + change.getObjectId(), - "application/x-tm+xml; version=1.0", - "alternate"); - - Collection psis; - if (change.isDeleted()) { - DeletedTopic delete = (DeletedTopic) change; - psis = delete.getSubjectIdentifiers(); - } else { - TopicIF topic = (TopicIF) tm.getObjectById(change.getObjectId()); - psis = topic.getSubjectIdentifiers(); - } - - if (!psis.isEmpty()) - atom.addTopicSI(psis.iterator().next()); - - atom.endEntry(); - } - - atom.endFeed(); -%> diff --git a/sandbox/sdshare/src/webapp/collection.jsp b/sandbox/sdshare/src/webapp/collection.jsp deleted file mode 100644 index fbb66cc5e..000000000 --- a/sandbox/sdshare/src/webapp/collection.jsp +++ /dev/null @@ -1,40 +0,0 @@ -<%@ page - language="java" - contentType="application/atom+xml; charset=utf-8" - import="net.ontopia.topicmaps.utils.sdshare.*, - net.ontopia.topicmaps.entry.TopicMapReferenceIF" -%><% - String tmid = request.getParameter("topicmap"); - TopicMapTracker tracker = StartUpServlet.topicmaps.get(tmid); - TopicMapReferenceIF ref = tracker.getReference(); - AtomWriter atom = new AtomWriter(out); - atom.startFeed("Collection feed for " + ref.getTitle(), - System.currentTimeMillis(), - StartUpServlet.getEndpointURL() + tmid); - - // FRAGMENTS - atom.startEntry("Fragments for " + ref.getTitle(), - StartUpServlet.getEndpointURL() + tmid + "/fragments", - System.currentTimeMillis()); - atom.addLink("changes.jsp?topicmap=" + ref.getId(), - "application/atom+xml", - "http://www.egovpt.org/sdshare/fragmentsfeed"); - atom.addLink("changes.jsp?topicmap=" + ref.getId(), - "application/atom+xml", - "alternate"); - atom.endEntry(); - - // SNAPSHOTS - atom.startEntry("Shapshots for " + ref.getTitle(), - StartUpServlet.getEndpointURL() + tmid + "/snapshots", - System.currentTimeMillis()); - atom.addLink("snapshots.jsp?topicmap=" + ref.getId(), - "application/atom+xml", - "http://www.egovpt.org/sdshare/snapshotsfeed"); - atom.addLink("snapshots.jsp?topicmap=" + ref.getId(), - "application/atom+xml", - "alternate"); - atom.endEntry(); - - atom.endFeed(); -%> diff --git a/sandbox/sdshare/src/webapp/fragment.jsp b/sandbox/sdshare/src/webapp/fragment.jsp deleted file mode 100644 index 423dd9e59..000000000 --- a/sandbox/sdshare/src/webapp/fragment.jsp +++ /dev/null @@ -1,30 +0,0 @@ -<%@ page - language="java" - contentType="application/x-tm+xml; charset=utf-8" - import="java.util.Collections, - net.ontopia.infoset.core.LocatorIF, - net.ontopia.topicmaps.utils.sdshare.*, - net.ontopia.topicmaps.entry.TopicMapReferenceIF, - net.ontopia.topicmaps.core.*, - net.ontopia.topicmaps.xml.*, - net.ontopia.xml.PrettyPrinter" -%><% - - String tmid = request.getParameter("topicmap"); - String objid = request.getParameter("topic"); - - TopicMapTracker tracker = StartUpServlet.topicmaps.get(tmid); - TopicMapReferenceIF ref = tracker.getReference(); - TopicMapStoreIF store = ref.createStore(true); - TopicMapIF tm = store.getTopicMap(); - - XTMFragmentExporter writer = new XTMFragmentExporter(); - PrettyPrinter pp = new PrettyPrinter(out, null); - writer.startTopicMap(pp); - - TopicIF topic = (TopicIF) tm.getObjectById(objid); - if (topic != null) - writer.exportTopics(Collections.singleton(topic).iterator(), pp); - - writer.endTopicMap(pp); -%> \ No newline at end of file diff --git a/sandbox/sdshare/src/webapp/snapshot.jsp b/sandbox/sdshare/src/webapp/snapshot.jsp deleted file mode 100644 index 3cdd694c9..000000000 --- a/sandbox/sdshare/src/webapp/snapshot.jsp +++ /dev/null @@ -1,18 +0,0 @@ -<%@ page - language="java" - contentType="application/x-tm+xml; charset=utf-8" - import="net.ontopia.topicmaps.utils.sdshare.*, - net.ontopia.topicmaps.entry.*, - net.ontopia.topicmaps.core.*, - net.ontopia.topicmaps.xml.XTMTopicMapWriter" -%><% - - String tmid = request.getParameter("topicmap"); - TopicMapRepositoryIF rep = TopicMaps.getRepository(); - TopicMapReferenceIF ref = rep.getReferenceByKey(tmid); - TopicMapIF tm = ref.createStore(true).getTopicMap(); - - XTMTopicMapWriter writer = new XTMTopicMapWriter(out, null); - writer.write(tm); - -%> \ No newline at end of file diff --git a/sandbox/sdshare/src/webapp/snapshots.jsp b/sandbox/sdshare/src/webapp/snapshots.jsp deleted file mode 100644 index be9822750..000000000 --- a/sandbox/sdshare/src/webapp/snapshots.jsp +++ /dev/null @@ -1,35 +0,0 @@ -<%@ page - language="java" - contentType="application/atom+xml; charset=utf-8" - import="java.util.Collection, - net.ontopia.infoset.core.LocatorIF, - net.ontopia.topicmaps.utils.sdshare.*, - net.ontopia.topicmaps.entry.TopicMapReferenceIF, - net.ontopia.topicmaps.core.*" -%><% - - String tmid = request.getParameter("topicmap"); - //String prefix = StartUpServlet.getEndpointURL() + tmid; - - TopicMapTracker tracker = StartUpServlet.topicmaps.get(tmid); - TopicMapReferenceIF ref = tracker.getReference(); - TopicMapStoreIF store = ref.createStore(true); - String prefix = store.getBaseAddress().getExternalForm(); - - AtomWriter atom = new AtomWriter(out); - atom.startFeed("Snapshots feed for " + ref.getTitle(), - System.currentTimeMillis(), - prefix + "/snapshots"); - atom.addServerPrefix(prefix); - - atom.startEntry("Snapshot of " + ref.getTitle(), - prefix + "/snapshot/" + tracker.getLastChanged(), - System.currentTimeMillis()); - atom.addLink("snapshot.jsp?topicmap=" + tmid, - "application/x-tm+xml; version=1.0", - "alternate"); - atom.endEntry(); - - atom.endFeed(); - -%> diff --git a/sandbox/sdshare/src/webapp/topicmaps.jsp b/sandbox/sdshare/src/webapp/topicmaps.jsp deleted file mode 100644 index f57e81248..000000000 --- a/sandbox/sdshare/src/webapp/topicmaps.jsp +++ /dev/null @@ -1,28 +0,0 @@ -<%@ page - language="java" - contentType="application/atom+xml; charset=utf-8" - import="net.ontopia.topicmaps.utils.sdshare.*, - net.ontopia.topicmaps.entry.TopicMapReferenceIF" -%><% - AtomWriter atom = new AtomWriter(out); - atom.startFeed(StartUpServlet.getTitle(), - System.currentTimeMillis(), - StartUpServlet.getEndpointURL()); - atom.addLink(StartUpServlet.getEndpointURL()); - - for (TopicMapTracker tracker : StartUpServlet.topicmaps.values()) { - TopicMapReferenceIF ref = tracker.getReference(); - atom.startEntry(ref.getTitle(), - StartUpServlet.getEndpointURL() + ref.getId(), - System.currentTimeMillis()); - atom.addLink("collection.jsp?topicmap=" + ref.getId(), - "application/atom+xml", - "http://www.egovpt.org/sdshare/collectionfeed"); - atom.addLink("collection.jsp?topicmap=" + ref.getId(), - "application/atom+xml", - "alternate"); - atom.endEntry(); - } - - atom.endFeed(); -%> diff --git a/sandbox/solr-utils/README.txt b/sandbox/solr-utils/README.txt deleted file mode 100644 index 6ba34c4d9..000000000 --- a/sandbox/solr-utils/README.txt +++ /dev/null @@ -1,48 +0,0 @@ ---------------------------------------------------------------------------------- - A prototype: how to produce Solr indexes from topic maps in Ontopia ---------------------------------------------------------------------------------- - -This is a simple example of how one can use tolog queries to generate -Apache Solr[1] indexes. - -Have a look at the following presentation for more background -information about this project: - - http://ontopia.wordpress.com/2009/11/26/ontopia-solr-integration/ - -To get started do the following: - - 1. Download Solr 1.4.0 (or later) from http://lucene.apache.org/solr/ - - 2. Install the Solr web application into the Apache Tomcat container - - cp solr.war $ONTOPIA/apache-tomcat/webapps/solr.war - - 3. Start Apache Tomcat with a reference to the solr index location - - export CATALINA_OPTS=-Dsolr.solr.home=$ONTOPIA_SVN/sandbox/solr-utils/solr-indexes - cd $ONTOPIA/apache-tomcat - ./bin/startup - - 4. Build the project: - - mvn clean package - - 5. Run the Solr indexer on your topic map. - - java -Xmx256M -cp $ONTOPIA/lib/ontopia.jar:$ONTOPIA_SVN/target/solr-utils-0.1-SNAPSHOT.jar net.ontopia.sandbox.solrutils.SolrIndexer postgresql-930001 solr-indexer:core0 http://localhost:8080/solr/core0 500 - -Note that the last step requires your topic map to contain the -neccessary topic types and instance of them in your topic map. At the -moment this sandbox project is just meant as an illustration of how to -product Solr indexes from an existing topic map. The way the current -SolrIndexer.java class works is just one of several possible ways of -doing it. Have a look at the presentation and let us know on the -mailing list[2] what you think about this idea. - -Enjoy! - ---- - -[1] http://lucene.apache.org/solr/ -[2] http://groups.google.com/group/ontopia diff --git a/sandbox/solr-utils/pom.xml b/sandbox/solr-utils/pom.xml deleted file mode 100644 index ac41f32e0..000000000 --- a/sandbox/solr-utils/pom.xml +++ /dev/null @@ -1,57 +0,0 @@ - - 4.0.0 - net.ontopia.sandbox - solr-utils - jar - 0.1-SNAPSHOT - solr-utils - http://maven.apache.org - - - - net.ontopia - ontopia-engine - 5.0.2 - - - saxon - saxon - - - - - - org.apache.solr - solr-solrj - 1.4.0 - - - - junit - junit - 3.8.1 - test - - - - - - - org.apache.maven.plugins - maven-compiler-plugin - - 1.5 - 1.5 - - - - - - - - Ontopia - http://ontopia.googlecode.com/svn/maven-repository - - - diff --git a/sandbox/solr-utils/solr-indexes/core0/conf/protwords.txt b/sandbox/solr-utils/solr-indexes/core0/conf/protwords.txt deleted file mode 100644 index 1dfc0abec..000000000 --- a/sandbox/solr-utils/solr-indexes/core0/conf/protwords.txt +++ /dev/null @@ -1,21 +0,0 @@ -# The ASF licenses this file to You under the Apache License, Version 2.0 -# (the "License"); you may not use this file except in compliance with -# the License. You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -#----------------------------------------------------------------------- -# Use a protected word file to protect against the stemmer reducing two -# unrelated words to the same base word. - -# Some non-words that normally won't be encountered, -# just to test that they won't be stemmed. -dontstems -zwhacky - diff --git a/sandbox/solr-utils/solr-indexes/core0/conf/schema.xml b/sandbox/solr-utils/solr-indexes/core0/conf/schema.xml deleted file mode 100644 index 74f24189d..000000000 --- a/sandbox/solr-utils/solr-indexes/core0/conf/schema.xml +++ /dev/null @@ -1,107 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - id - - - text - - - - - - diff --git a/sandbox/solr-utils/solr-indexes/core0/conf/solrconfig.xml b/sandbox/solr-utils/solr-indexes/core0/conf/solrconfig.xml deleted file mode 100644 index 338a37cc9..000000000 --- a/sandbox/solr-utils/solr-indexes/core0/conf/solrconfig.xml +++ /dev/null @@ -1,40 +0,0 @@ - - - - - - - - - - - - - - - - - - solr - - - - diff --git a/sandbox/solr-utils/solr-indexes/core0/conf/stopwords.txt b/sandbox/solr-utils/solr-indexes/core0/conf/stopwords.txt deleted file mode 100644 index b5824da32..000000000 --- a/sandbox/solr-utils/solr-indexes/core0/conf/stopwords.txt +++ /dev/null @@ -1,58 +0,0 @@ -# Licensed to the Apache Software Foundation (ASF) under one or more -# contributor license agreements. See the NOTICE file distributed with -# this work for additional information regarding copyright ownership. -# The ASF licenses this file to You under the Apache License, Version 2.0 -# (the "License"); you may not use this file except in compliance with -# the License. You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -#----------------------------------------------------------------------- -# a couple of test stopwords to test that the words are really being -# configured from this file: -stopworda -stopwordb - -#Standard english stop words taken from Lucene's StopAnalyzer -a -an -and -are -as -at -be -but -by -for -if -in -into -is -it -no -not -of -on -or -s -such -t -that -the -their -then -there -these -they -this -to -was -will -with - diff --git a/sandbox/solr-utils/solr-indexes/core0/conf/stopwords_no.txt b/sandbox/solr-utils/solr-indexes/core0/conf/stopwords_no.txt deleted file mode 100644 index e65ca9fb6..000000000 --- a/sandbox/solr-utils/solr-indexes/core0/conf/stopwords_no.txt +++ /dev/null @@ -1,272 +0,0 @@ -1 -2 -3 -a -alle -andre -annet -antall -arbeid -at -att -auke -av -b -bak -begge -berre -ble -bli -blir -bort -br -bra -bruk -bruke -brukes -brukt -bÃ¥de -bør -c -d -da -dag -de -dei -del -delt -den -denne -der -deres -derfor -desse -det -dette -din -disse -du -e -eg -ei -ein -eit -eller -en -ene -eneste -enhver -enkelte -enn -er -et -etter -f -f.eks -figur -finne -finnes -flere -folk -for -fordi -forsøke -fra -fram -frÃ¥ -fÃ¥ -fÃ¥r -følger -før -først -første -g -generelt -gir -gje -gjennom -gjer -gjere -gjorde -gjøre -god -gode -godt -gÃ¥ -h -ha -hadde -han -hans -har -hatt -hele -hennes -her -ho -hos -hva -hvem -hver -hvert -hvilken -hvis -hvor -hvordan -hvorfor -høve -høy -i -ikke -ikkje -imidlertid -inn -innan -innen -j -jeg -jo -k -kan -kommer -kunne -kva -kvar -l -lage -lagt -lang -lant -lik -like -lir -litt -m -m.a -makt -man -mange -med -meg -meget -meir -mellom -men -mens -mer -mest -min -mindre -minst -mot -mulig -mye -mÃ¥ -mÃ¥te -n -navn -nbsp -nei -noe -noen -noko -ny -nye -nytt -nytta -nÃ¥ -nÃ¥r -o -og -ogsÃ¥ -om -omfatter -opp -oss -over -p -part -per -prosent -punkt -pÃ¥ -q -r -rett -riktig -s -samme -sammen -sant -se -seg -selv -ser -sett -si -siden -sin -sine -sist -siste -sjølv -skal -skulle -slik -slutt -som -start -stille -stor -store -større -størst -syner -sÃ¥ -sÃ¥nn -t -tabell -tid -til -tilbake -tilstand -to -u -ulike -under -ut -uten -v -var -vart -ved -veldig -vera -verdi -vere -vert -vi -vidare -videre -viktig -vil -ville -viser -vist -vite -vore -vÃ¥r -vær -være -vært -w -x -y -z -Ã¥ -Ã¥r -Ã¥rene -æ -ø -økt -ønsker diff --git a/sandbox/solr-utils/solr-indexes/core0/conf/synonyms.txt b/sandbox/solr-utils/solr-indexes/core0/conf/synonyms.txt deleted file mode 100644 index b0e31cb7e..000000000 --- a/sandbox/solr-utils/solr-indexes/core0/conf/synonyms.txt +++ /dev/null @@ -1,31 +0,0 @@ -# The ASF licenses this file to You under the Apache License, Version 2.0 -# (the "License"); you may not use this file except in compliance with -# the License. You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -#----------------------------------------------------------------------- -#some test synonym mappings unlikely to appear in real input text -aaa => aaaa -bbb => bbbb1 bbbb2 -ccc => cccc1,cccc2 -a\=>a => b\=>b -a\,a => b\,b -fooaaa,baraaa,bazaaa - -# Some synonym groups specific to this example -GB,gib,gigabyte,gigabytes -MB,mib,megabyte,megabytes -Television, Televisions, TV, TVs -#notice we use "gib" instead of "GiB" so any WordDelimiterFilter coming -#after us won't split it into two words. - -# Synonym mappings can be used for spelling correction too -pixima => pixma - diff --git a/sandbox/solr-utils/solr-indexes/core1/conf/protwords.txt b/sandbox/solr-utils/solr-indexes/core1/conf/protwords.txt deleted file mode 100644 index 1dfc0abec..000000000 --- a/sandbox/solr-utils/solr-indexes/core1/conf/protwords.txt +++ /dev/null @@ -1,21 +0,0 @@ -# The ASF licenses this file to You under the Apache License, Version 2.0 -# (the "License"); you may not use this file except in compliance with -# the License. You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -#----------------------------------------------------------------------- -# Use a protected word file to protect against the stemmer reducing two -# unrelated words to the same base word. - -# Some non-words that normally won't be encountered, -# just to test that they won't be stemmed. -dontstems -zwhacky - diff --git a/sandbox/solr-utils/solr-indexes/core1/conf/schema.xml b/sandbox/solr-utils/solr-indexes/core1/conf/schema.xml deleted file mode 100644 index 2a74d9896..000000000 --- a/sandbox/solr-utils/solr-indexes/core1/conf/schema.xml +++ /dev/null @@ -1,97 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - id - - - text - - - - - - diff --git a/sandbox/solr-utils/solr-indexes/core1/conf/solrconfig.xml b/sandbox/solr-utils/solr-indexes/core1/conf/solrconfig.xml deleted file mode 100644 index 338a37cc9..000000000 --- a/sandbox/solr-utils/solr-indexes/core1/conf/solrconfig.xml +++ /dev/null @@ -1,40 +0,0 @@ - - - - - - - - - - - - - - - - - - solr - - - - diff --git a/sandbox/solr-utils/solr-indexes/core1/conf/stopwords.txt b/sandbox/solr-utils/solr-indexes/core1/conf/stopwords.txt deleted file mode 100644 index b5824da32..000000000 --- a/sandbox/solr-utils/solr-indexes/core1/conf/stopwords.txt +++ /dev/null @@ -1,58 +0,0 @@ -# Licensed to the Apache Software Foundation (ASF) under one or more -# contributor license agreements. See the NOTICE file distributed with -# this work for additional information regarding copyright ownership. -# The ASF licenses this file to You under the Apache License, Version 2.0 -# (the "License"); you may not use this file except in compliance with -# the License. You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -#----------------------------------------------------------------------- -# a couple of test stopwords to test that the words are really being -# configured from this file: -stopworda -stopwordb - -#Standard english stop words taken from Lucene's StopAnalyzer -a -an -and -are -as -at -be -but -by -for -if -in -into -is -it -no -not -of -on -or -s -such -t -that -the -their -then -there -these -they -this -to -was -will -with - diff --git a/sandbox/solr-utils/solr-indexes/core1/conf/stopwords_no.txt b/sandbox/solr-utils/solr-indexes/core1/conf/stopwords_no.txt deleted file mode 100644 index e65ca9fb6..000000000 --- a/sandbox/solr-utils/solr-indexes/core1/conf/stopwords_no.txt +++ /dev/null @@ -1,272 +0,0 @@ -1 -2 -3 -a -alle -andre -annet -antall -arbeid -at -att -auke -av -b -bak -begge -berre -ble -bli -blir -bort -br -bra -bruk -bruke -brukes -brukt -bÃ¥de -bør -c -d -da -dag -de -dei -del -delt -den -denne -der -deres -derfor -desse -det -dette -din -disse -du -e -eg -ei -ein -eit -eller -en -ene -eneste -enhver -enkelte -enn -er -et -etter -f -f.eks -figur -finne -finnes -flere -folk -for -fordi -forsøke -fra -fram -frÃ¥ -fÃ¥ -fÃ¥r -følger -før -først -første -g -generelt -gir -gje -gjennom -gjer -gjere -gjorde -gjøre -god -gode -godt -gÃ¥ -h -ha -hadde -han -hans -har -hatt -hele -hennes -her -ho -hos -hva -hvem -hver -hvert -hvilken -hvis -hvor -hvordan -hvorfor -høve -høy -i -ikke -ikkje -imidlertid -inn -innan -innen -j -jeg -jo -k -kan -kommer -kunne -kva -kvar -l -lage -lagt -lang -lant -lik -like -lir -litt -m -m.a -makt -man -mange -med -meg -meget -meir -mellom -men -mens -mer -mest -min -mindre -minst -mot -mulig -mye -mÃ¥ -mÃ¥te -n -navn -nbsp -nei -noe -noen -noko -ny -nye -nytt -nytta -nÃ¥ -nÃ¥r -o -og -ogsÃ¥ -om -omfatter -opp -oss -over -p -part -per -prosent -punkt -pÃ¥ -q -r -rett -riktig -s -samme -sammen -sant -se -seg -selv -ser -sett -si -siden -sin -sine -sist -siste -sjølv -skal -skulle -slik -slutt -som -start -stille -stor -store -større -størst -syner -sÃ¥ -sÃ¥nn -t -tabell -tid -til -tilbake -tilstand -to -u -ulike -under -ut -uten -v -var -vart -ved -veldig -vera -verdi -vere -vert -vi -vidare -videre -viktig -vil -ville -viser -vist -vite -vore -vÃ¥r -vær -være -vært -w -x -y -z -Ã¥ -Ã¥r -Ã¥rene -æ -ø -økt -ønsker diff --git a/sandbox/solr-utils/solr-indexes/core1/conf/synonyms.txt b/sandbox/solr-utils/solr-indexes/core1/conf/synonyms.txt deleted file mode 100644 index b0e31cb7e..000000000 --- a/sandbox/solr-utils/solr-indexes/core1/conf/synonyms.txt +++ /dev/null @@ -1,31 +0,0 @@ -# The ASF licenses this file to You under the Apache License, Version 2.0 -# (the "License"); you may not use this file except in compliance with -# the License. You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -#----------------------------------------------------------------------- -#some test synonym mappings unlikely to appear in real input text -aaa => aaaa -bbb => bbbb1 bbbb2 -ccc => cccc1,cccc2 -a\=>a => b\=>b -a\,a => b\,b -fooaaa,baraaa,bazaaa - -# Some synonym groups specific to this example -GB,gib,gigabyte,gigabytes -MB,mib,megabyte,megabytes -Television, Televisions, TV, TVs -#notice we use "gib" instead of "GiB" so any WordDelimiterFilter coming -#after us won't split it into two words. - -# Synonym mappings can be used for spelling correction too -pixima => pixma - diff --git a/sandbox/solr-utils/solr-indexes/solr.xml b/sandbox/solr-utils/solr-indexes/solr.xml deleted file mode 100644 index c6ed7e579..000000000 --- a/sandbox/solr-utils/solr-indexes/solr.xml +++ /dev/null @@ -1,35 +0,0 @@ - - - - - - - - - - - - diff --git a/sandbox/solr-utils/src/main/java/net/ontopia/sandbox/solrutils/SolrIndexer.java b/sandbox/solr-utils/src/main/java/net/ontopia/sandbox/solrutils/SolrIndexer.java deleted file mode 100644 index 08e2fa810..000000000 --- a/sandbox/solr-utils/src/main/java/net/ontopia/sandbox/solrutils/SolrIndexer.java +++ /dev/null @@ -1,166 +0,0 @@ -package net.ontopia.sandbox.solrutils; - -import java.net.MalformedURLException; -import java.util.Collection; -import java.util.Collections; -import java.util.HashMap; -import java.util.HashSet; -import java.util.Map; -import java.util.Set; - -import net.ontopia.topicmaps.core.TopicIF; -import net.ontopia.topicmaps.core.TopicMapIF; -import net.ontopia.topicmaps.entry.TopicMaps; -import net.ontopia.topicmaps.query.core.InvalidQueryException; -import net.ontopia.topicmaps.query.core.QueryProcessorIF; -import net.ontopia.topicmaps.query.core.QueryResultIF; -import net.ontopia.topicmaps.query.utils.QueryUtils; -import net.ontopia.topicmaps.utils.TopicStringifiers; -import net.ontopia.utils.URIUtils; - -import org.apache.solr.client.solrj.impl.CommonsHttpSolrServer; -import org.apache.solr.common.SolrInputDocument; - -/** - * Command line tool for indexing topic maps to a Solr index. - * - * Usage: time java -Xmx256M net.ontopia.sandbox.solrutils.SolrIndexer postgresql-930001 solr-indexer:core0 http://localhost:8080/solr/core0 500 - * - */ -public class SolrIndexer { - - private TopicMapIF tm; - private QueryProcessorIF qp; - private String indexerId; - private String solrUrl; - private int batchSize = 1000; - - public SolrIndexer(String topicmapId, String indexerName, String solrUrl) { - this.tm = TopicMaps.createStore(topicmapId, true).getTopicMap(); - this.qp = QueryUtils.getQueryProcessor(tm); - this.indexerId = indexerName; - this.solrUrl = solrUrl; - } - - public static void main(String[] args){ - String topicMapId = args[0]; - String indexerName = args[1]; - String solrUrl = args[2]; - SolrIndexer app = new SolrIndexer(topicMapId, indexerName, solrUrl); - if (args.length >= 4) - app.batchSize = Integer.parseInt(args[3]); - app.index(); - } - - public void index() { - System.out.println("Using Solr index: " + solrUrl); - - clearIndex(); - - for (IndexerRule ir : getIndexerRules(indexerId)) { - - Map documents = new HashMap(batchSize); - - QueryResultIF qr; - try { - int doccount = 0; - - System.out.println("Executing indexer rule query with parameters: this:" + ir.indexerRule + ",\n" + ir.indexerQuery); - qr = qp.execute(ir.indexerQuery, Collections.singletonMap("this", ir.indexerRule)); - while (qr.next()) { - String id = (String)qr.getValue(0); - String field = (String)qr.getValue(1); - String value = (String)qr.getValue(2); - - if (!documents.containsKey(id)) { - if (documents.size() > 0 && (documents.size() % batchSize == 0)) { - // perform indexing - System.out.println("Indexing " + documents.size() + " documents (count=" + doccount + ")..."); - indexDocuments(documents.values()); - // reset documents map - documents = new HashMap(batchSize); - } - doccount++; - SolrInputDocument newdoc = new SolrInputDocument(); - newdoc.addField("id", id); - documents.put(id, newdoc); - } - SolrInputDocument doc = documents.get(id); - doc.addField(field, value); - } - if (!documents.isEmpty()) { - // index remaining documents - System.out.println("Indexing " + documents.size() + " documents..."); - indexDocuments(documents.values()); - } - System.out.println(TopicStringifiers.toString(ir.indexerRule) + " indexed " + doccount + " documents."); - } catch (InvalidQueryException e) { - throw new RuntimeException(e); - } - } - } - - public Collection getIndexerRules(String indexerId) { - // get indexer rules - TopicIF indexer = tm.getTopicBySubjectIdentifier(URIUtils.getURI(indexerId)); - - Set result = new HashSet(); - QueryResultIF qr; - try { - String query = "using on for i\"http://psi.ontopia.net/ontology/\" " + - "select $IR, $IRQ from " + - "on:indexer-rules(%indexer% : on:indexer, $IR : on:indexer-rule), " + - "on:indexer-query($IR, $IRQ)?"; - System.out.println("Retrieving indexer rules for indexer " + indexerId + ": \n" + query); - qr = qp.execute(query, Collections.singletonMap("indexer", indexer)); - while (qr.next()) { - result.add(new IndexerRule((TopicIF)qr.getValue(0), (String)qr.getValue(1))); - } - return result; - } catch (InvalidQueryException e) { - throw new RuntimeException(e); - } - } - - private CommonsHttpSolrServer getSolrServer() throws MalformedURLException { - CommonsHttpSolrServer server = new CommonsHttpSolrServer(solrUrl); - server.setSoTimeout(10000); // socket read timeout - server.setConnectionTimeout(100); - server.setDefaultMaxConnectionsPerHost(100); - server.setMaxTotalConnections(100); - server.setFollowRedirects(false); // defaults to false - server.setMaxRetries(1); // defaults to 0. > 1 not recommended. - return server; - } - - private void clearIndex() { - System.out.println("Clearing index..."); - try { - CommonsHttpSolrServer server = getSolrServer(); - server.deleteByQuery("*:*"); - server.commit(); - } catch (Exception e) { - throw new RuntimeException(e); - } - } - - private void indexDocuments(Collection documents) { - try { - CommonsHttpSolrServer server = getSolrServer(); - server.add(documents); - server.commit(); - } catch (Exception e) { - throw new RuntimeException(e); - } - } - - private static class IndexerRule { - TopicIF indexerRule; - String indexerQuery; - IndexerRule(TopicIF indexerRule, String indexerQuery) { - this.indexerRule = indexerRule; - this.indexerQuery = indexerQuery; - } - } - -} diff --git a/sandbox/tmcl-owl/README b/sandbox/tmcl-owl/README deleted file mode 100644 index faa22874d..000000000 --- a/sandbox/tmcl-owl/README +++ /dev/null @@ -1,9 +0,0 @@ - -This is the conversion scripts that were written together with Lars -Marius Garshol's "TMCL and OWL" paper from TMRA 2008: - http://tmra.de/2008/talks/tmcl-and-owl.html - -The scripts are written in Jython and can convert both from TMCL to -OWL, and vice versa. However, they are somewhat out of date, as they -rely on an old TMCL draft. They need to be updated to the latest -draft. \ No newline at end of file diff --git a/sandbox/tmcl-owl/rdfs2ontopoly.py b/sandbox/tmcl-owl/rdfs2ontopoly.py deleted file mode 100644 index d75a48b71..000000000 --- a/sandbox/tmcl-owl/rdfs2ontopoly.py +++ /dev/null @@ -1,107 +0,0 @@ - -import sys -from java.io import FileInputStream -from com.hp.hpl.jena.rdf.model import ModelFactory -from net.ontopia.utils import URIUtils -from net.ontopia.infoset.impl.basic import URILocator -from net.ontopia.topicmaps.utils.rdf import RDFIntroSpector -from net.ontopia.topicmaps.entry import XMLConfigSource -from net.ontopia.topicmaps.nav2.webapps.ontopoly.sysmodel import OntopolyRepository -from net.ontopia.topicmaps.nav2.webapps.ontopoly.model import TopicMap, TopicType, NameType, OccurrenceType - -def get_value(subject, property): - it = subject.listProperties(property) - while it.hasNext(): - stmt = it.next() - return stmt.getResource() - -def get_string(subject, property): - it = subject.listProperties(property) - while it.hasNext(): - stmt = it.next() - return stmt.getString() - -file = "/Users/larsga/Desktop/oks-enterprise-4.0.0/apache-tomcat/common/classes/tm-sources.xml" -rep = XMLConfigSource.getRepository(file) -rep = OntopolyRepository(rep) -tm = rep.getReference("test.xtm") -if not tm: - tm = rep.getSources()[0].createTopicMap("test.xtm") -tm = TopicMap(tm) -realtm = tm.getTopicMapIF() - -RDF = "http://www.w3.org/1999/02/22-rdf-syntax-ns#" -RDFS = "http://www.w3.org/2000/01/rdf-schema#" - -model = ModelFactory.createDefaultModel() -model.read(FileInputStream("datasets/foaf.rdf"), "http://bullshit") - -RDFS_CLASS = model.createResource(RDFS + "Class") -RDFS_DOMAIN = model.createProperty(RDFS + "domain") -RDFS_RANGE = model.createProperty(RDFS + "range") -RDFS_LABEL = model.createProperty(RDFS + "label") -RDF_TYPE = model.createProperty(RDF + "type") - -file = "/Users/larsga/Desktop/oks-enterprise-4.0.0/apache-tomcat/webapps/omnigator/WEB-INF/topicmaps/mapping.rdff" -fileuri = URIUtils.getURI(file).getAddress(); -mappings = RDFIntroSpector.getPropertyMappings(fileuri, 0) - -it = model.listSubjectsWithProperty(RDF_TYPE, RDFS_CLASS) -while it.hasNext(): - klass = it.nextResource() - print klass - typepsi = URILocator(klass.toString()) - ktopic = realtm.getTopicBySubjectIdentifier(typepsi) - if not ktopic: - ktopic = tm.createTopicType(get_string(klass, RDFS_LABEL)) - ktopic.addSubjectIdentifier(typepsi) - ktt = TopicType(ktopic, tm) - # FIXME: koble opp supertype - # FIXME: må hoppe over noen klasser - - it2 = model.listSubjectsWithProperty(RDFS_DOMAIN, klass) - while it2.hasNext(): - property = it2.nextResource() - print " ", property - pname = get_string(property, RDFS_LABEL) - mapsto = mappings.get(property.toString()) - if mapsto: - print " XXX: ", mapsto.getMapsTo() - range = get_value(property, RDFS_RANGE) - if range: - print " YYY: ", range - - # basename - if mapsto and mapsto.getMapsTo().endswith("basename"): - type = mapsto.getType() or property.toString() - typepsi = URILocator(type) - ptopic = realtm.getTopicBySubjectIdentifier(typepsi) - if not ptopic: - ptopic = tm.createNameType(pname) - ptopic.addSubjectIdentifier(typepsi) - nametype = NameType(ptopic, tm) - ktt.addFieldAssignment(nametype) - - # occurrence - elif mapsto and mapsto.getMapsTo().endswith("occurrence"): - type = mapsto.getType() or property.toString() - typepsi = URILocator(type) - ptopic = realtm.getTopicBySubjectIdentifier(typepsi) - if not ptopic: - ptopic = tm.createOccurrenceType(pname) - ptopic.addSubjectIdentifier(typepsi) - occtype = OccurrenceType(ptopic, tm) - ktt.addFieldAssignment(occtype) - - if range.toString() != RDFS + "Literal": - psi = "http://www.w3.org/2001/XMLSchema#anyURI" - datatype = DataType(realtm.getTopicBySubjectIdentifier(psi)) - occtype.setDataType(datatype) - - # association - # - make sure role types exist - # - try to make up names - # - set legal types on both sides - # - cardinality defaults to 0-* - -tm.save() diff --git a/sandbox/tmcl-owl/rdfs2tmcl.py b/sandbox/tmcl-owl/rdfs2tmcl.py deleted file mode 100644 index 7a7f7d1b5..000000000 --- a/sandbox/tmcl-owl/rdfs2tmcl.py +++ /dev/null @@ -1,270 +0,0 @@ - -# TODO -# - check for owl:inverseOf -# - how to handle owl:AnnotationProperties -# - owl:disjointWith, owl:complementOf -# - plays-role - -import sys -from java.util import ArrayList -from java.io import FileInputStream -from com.hp.hpl.jena.rdf.model import ModelFactory -from net.ontopia.utils import URIUtils -from net.ontopia.infoset.impl.basic import URILocator -from net.ontopia.topicmaps.utils.rdf import RDFIntroSpector - -def get_value(subject, property): - it = subject.listProperties(property) - while it.hasNext(): - stmt = it.next() - return stmt.getResource() - -def get_string(subject, property): - it = subject.listProperties(property) - while it.hasNext(): - stmt = it.next() - return stmt.getString() - -def qname(uri): - if uri is None: - return None - - if type(uri) != type(""): - uri = uri.toString() - - for (prefix, ns) in prefixes.items(): - if uri.startswith(ns): - return prefix + ":" + uri[len(ns) : ] - - return uri - -def verify(subject, property, object): - it = subject.listProperties(property) - while it.hasNext(): - o = it.next().getResource() - if object == o: - return 1 - return 0 - -def iterator2list(it): - list = [] - while it.hasNext(): - list.append(it.next()) - return list - -def get_all_subprops(prop): - subs = [prop] - it = model.listSubjectsWithProperty(RDFS_SUBPROPERTYOF, prop) - while it.hasNext(): - subs += get_all_subprops(it.next()) - return subs - -def inherit_mappings(mappings): - for prop in ArrayList(mappings.keySet()): - mapsto = mappings.get(prop) - prop = model.createProperty(prop) - for subprop in get_all_subprops(prop): - if not mappings.get(subprop.toString()): - mappings.put(subprop.toString(), mapsto) - -RDF = "http://www.w3.org/1999/02/22-rdf-syntax-ns#" -RDFS = "http://www.w3.org/2000/01/rdf-schema#" -OWL = "http://www.w3.org/2002/07/owl#" - -prefixes = { - "rdf" : RDF, - "rdfs" : RDFS, - "owl" : OWL, - "foaf" : "http://xmlns.com/foaf/0.1/", - "rtm" : "http://psi.ontopia.net/rdf2tm/#", - "tmcl" : "http://psi.topicmaps.org/tmcl/", - "skos" : "http://www.w3.org/2008/05/skos#", - #"http://www.w3.org/2004/02/skos/core#" - "dc" : "http://purl.org/dc/elements/1.1/", - "doap" : "http://usefulinc.com/ns/doap#", - } - -model = ModelFactory.createDefaultModel() -model.read(FileInputStream(sys.argv[1]), "http://bullshit") - -RDFS_CLASS = model.createResource(RDFS + "Class") -RDFS_DOMAIN = model.createProperty(RDFS + "domain") -RDFS_SUBCLASSOF = model.createProperty(RDFS + "subClassOf") -RDFS_SUBPROPERTYOF = model.createProperty(RDFS + "subPropertyOf") -RDFS_RANGE = model.createProperty(RDFS + "range") -RDFS_LABEL = model.createProperty(RDFS + "label") -RDF_TYPE = model.createProperty(RDF + "type") -RDF_PROPERTY = model.createProperty(RDF + "Property") -OWL_FUNCTIONALPROPERTY = model.createProperty(OWL + "FunctionalProperty") -OWL_INVERSEFP = model.createProperty(OWL + "InverseFunctionalProperty") -OWL_CLASS = model.createProperty(OWL + "Class") -OWL_OBJECTPROPERTY = model.createProperty(OWL + "ObjectProperty") -OWL_DATATYPEPROPERTY = model.createProperty(OWL + "DatatypeProperty") -OWL_ANNOTATIONPROPERTY = model.createProperty(OWL + "AnnotationProperty") -OWL_SYMMETRICPROPERTY = model.createProperty(OWL + "SymmetricProperty") - -file = "/Users/larsga/Desktop/oks-enterprise-4.0.0/apache-tomcat/webapps/omnigator/WEB-INF/topicmaps/mapping.rdff" -fileuri = URIUtils.getURI(file).getAddress(); -mappings = RDFIntroSpector.getPropertyMappings(fileuri, 0) -inherit_mappings(mappings) - -outf = open(sys.argv[2], "w") -for (prefix, ns) in prefixes.items(): - outf.write("%%prefix %s %s\n" % (prefix, ns)) -outf.write("\n") - -outf.write("""def unique-occurrence($c, $o) - ?c isa tmcl:uniqueoccurrence-constraint . - tmcl:applies-to(tmcl:constraint-role : ?c, tmcl:topictype-role : $c) - tmcl:applies-to(tmcl:constraint-role : ?c, tmcl:occurrencetype-role : $o) -end - -def binary-association($at, $rt1, $rt2) - $at isa associationtype . - $rt1 isa roletype . - $rt2 isa roletype . - - ?c isa associationrole-constraint - card-min: 1 - card-max: 1 . - applies-to(constraint-role : ?c, associationtype-role : $at) - applies-to(constraint-role : ?c, roletype-role : $rt1) - - ?c2 isa associationrole-constraint - card-min: 1 - card-max: 1 . - applies-to(constraint-role : ?c2, associationtype-role : $at) - applies-to(constraint-role : ?c2, roletype-role : $rt2) -end - -def symmetric-association($at, $rt) - $at isa associationtype . - $rt isa roletype . - - ?c isa associationrole-constraint - card-min: 2 - card-max: 2 . - applies-to(constraint-role : ?c, associationtype-role : $at) - applies-to(constraint-role : ?c, roletype-role : $rt) -end - -""") - -it = model.listSubjectsWithProperty(RDF_TYPE, OWL_SYMMETRICPROPERTY) -while it.hasNext(): - prop = it.next() - mapsto = mappings.get(prop.toString()) - - if not mapsto: - print "NO MAPPING FOR", prop - continue - - if not mapsto.getMapsTo().endswith("association"): - print "SYMMETRIC PROPERTY NOT ASSOCIATION:", prop - - if mapsto.getSubjectRole() != mapsto.getObjectRole(): - print "SYMMETRIC PROPERTY NOT MAPPED SYMMETRICALLY:", prop - -klasses = (iterator2list(model.listSubjectsWithProperty(RDF_TYPE, RDFS_CLASS)) + - iterator2list(model.listSubjectsWithProperty(RDF_TYPE, OWL_CLASS))) -for klass in klasses: - outf.write("%s isa tmcl:topic-type;\n" % qname(klass)) - - it2 = klass.listProperties(RDFS_SUBCLASSOF) - while it2.hasNext(): - stmt = it2.next() - super = stmt.getResource() - outf.write(" ako %s;\n" % qname(super)) - - it2 = model.listSubjectsWithProperty(RDFS_DOMAIN, klass) - while it2.hasNext(): - property = it2.nextResource() - mapsto = mappings.get(property.toString()) - if not mapsto: - print "NO MAPPING FOR", qname(property) - continue - - for property in get_all_subprops(property): - range = get_value(property, RDFS_RANGE) - min_card = "0" - max_card = "MAX_INT" - if verify(property, RDF_TYPE, OWL_FUNCTIONALPROPERTY): - max_card = "1" - - # basename - if mapsto and mapsto.getMapsTo().endswith("basename"): - ptype = mapsto.getType() or property.toString() - outf.write(' has-name(%s, %s, %s, ".*");\n' % - (qname(ptype), min_card, max_card)) - - # occurrence - elif mapsto and mapsto.getMapsTo().endswith("occurrence"): - ptype = mapsto.getType() or property.toString() - outf.write(' has-occurrence(%s, %s, %s, ".*");\n' % - (qname(ptype), min_card, max_card)) - - # association - elif mapsto and mapsto.getMapsTo().endswith("association"): - ptype = mapsto.getType() or property.toString() - outf.write(' plays-role(%s, %s, %s); # %s\n' % - (qname(mapsto.getSubjectRole()), - min_card, max_card, qname(ptype))) - - - it2 = model.listSubjectsWithProperty(RDFS_RANGE, klass) - while it2.hasNext(): - property = it2.nextResource() - mapsto = mappings.get(property.toString()) - if not mapsto or not mapsto.getMapsTo().endswith("association"): - continue - - min_card = "0" - max_card = "MAX_INT" - if verify(property, RDF_TYPE, OWL_FUNCTIONALPROPERTY): - max_card = "1" - - for property in get_all_subprops(property): - ptype = mapsto.getType() or property.toString() - outf.write(' plays-role(%s, %s, %s); # %s\n' % - (qname(mapsto.getObjectRole()), min_card, max_card, - qname(ptype))) - - outf.write(".\n\n") - -it = model.listSubjectsWithProperty(RDF_TYPE, OWL_INVERSEFP) -while it.hasNext(): - property = it.nextResource() - mapsto = mappings.get(property.toString()) - domain = get_value(property, RDFS_DOMAIN) - - if not mapsto or not mapsto.getMapsTo().endswith("occurrence"): - continue - - outf.write("unique-occurrence(%s, %s)\n" % (qname(domain), qname(property))) - -props = (iterator2list(model.listSubjectsWithProperty(RDF_TYPE, RDF_PROPERTY)) + - iterator2list(model.listSubjectsWithProperty(RDF_TYPE, OWL_OBJECTPROPERTY)) + - iterator2list(model.listSubjectsWithProperty(RDF_TYPE, OWL_DATATYPEPROPERTY)) + - iterator2list(model.listSubjectsWithProperty(RDF_TYPE, OWL_ANNOTATIONPROPERTY))) -for property in props: - mapsto = mappings.get(property.toString()) - if not mapsto: - print "NO MAPPING FOR", property - continue - - if mapsto.getMapsTo().endswith("association"): - if mapsto.getSubjectRole() != mapsto.getObjectRole(): - outf.write("binary-association(%s, %s, %s)\n" % - (qname(property), - qname(mapsto.getSubjectRole()), - qname(mapsto.getObjectRole()))) - else: - outf.write("symmetric-association(%s, %s)\n" % - (qname(property), - qname(mapsto.getSubjectRole()))) - elif mapsto.getMapsTo().endswith("occurrence"): - outf.write("%s isa tmcl:occurrencetype .\n" % qname(property)) - elif mapsto.getMapsTo().endswith("basename"): - outf.write("%s isa tmcl:topicnametype .\n" % qname(property)) - -outf.close() diff --git a/sandbox/tmcl-owl/tmcl2rdfs.py b/sandbox/tmcl-owl/tmcl2rdfs.py deleted file mode 100644 index 23bf6b776..000000000 --- a/sandbox/tmcl-owl/tmcl2rdfs.py +++ /dev/null @@ -1,319 +0,0 @@ - -# FIXME: -# - remove fixmes below -# - convert cardinalities! -# - inverse functional property -> hmmmm -# - hva med kollisjoner på rdfs:range & rdfs:domain? -# - other role constraint -> owl:allValuesFrom ? -# - datatype constraint -> ? -# - associations -> must handle symmetrics, n-aries - -import sys, random, string -from java.util import HashMap -from net.ontopia.topicmaps.utils import ImportExportUtils -from net.ontopia.topicmaps.query.utils import QueryUtils - -def getvalue(query, params = {}): - params = map2hash(params) - result = qp.execute(query, params) - while result.next(): - return result.getValue(0) - -def getlist(query, params = {}): - list = [] - params = map2hash(params) - result = qp.execute(query, params) - while result.next(): - list.append(result.getValue(0)) - return list - -def map2hash(map): - hash = HashMap() - for (key, value) in map.items(): - hash.put(key, value) - return hash - -def find_types(at, rt): - params = {"AT" : at, "RT" : rt} - return getlist(PREFIXES + """ - select $TT from - instance-of($RPC, tmcl:roleplayer-constraint), - tmcl:applies-to($RPC : tmcl:constraint-role, %AT% : tmcl:assoctype-role), - tmcl:applies-to($RPC : tmcl:constraint-role, %RT% : tmcl:roletype-role), - tmcl:applies-to($RPC : tmcl:constraint-role, $TT : tmcl:topictype-role)?""", - params) - -def get_min_card(at, rt): - params = {"AT" : at, "RT" : rt} - return int(getvalue(PREFIXES + """ - select $CARD from - instance-of($ARC, tmcl:associationrole-constraint), - tmcl:card-min($ARC, $CARD), - tmcl:applies-to($ARC : tmcl:constraint-role, - %AT% : tmcl:assoctype-role), - tmcl:applies-to($ARC : tmcl:constraint-role, - %RT% : tmcl:roletype-role)?""", params)) - -def get_max_card(at, rt): - params = {"AT" : at, "RT" : rt} - return int(getvalue(PREFIXES + """ - select $CARD from - instance-of($ARC, tmcl:associationrole-constraint), - tmcl:card-max($ARC, $CARD), - tmcl:applies-to($ARC : tmcl:constraint-role, - %AT% : tmcl:assoctype-role) , - tmcl:applies-to($ARC : tmcl:constraint-role, - %RT% : tmcl:roletype-role)?""", params)) - -prefixes = {"ph" : "http://psi.garshol.priv.no/photo/", - "dc" : "http://purl.org/dc/elements/1.1/", - "tm" : "http://psi.topicmaps.org/iso13250/model/", - "foaf" : "http://xmlns.com/foaf/0.1/", - "rdfs" : "http://www.w3.org/2000/01/rdf-schema#", - "thes" : "http://www.techquila.com/psi/thesaurus/#", - "xsd" : "http://www.w3.org/2001/XMLSchema#", - "rdf" : "http://www.w3.org/1999/02/22-rdf-syntax-ns#", - "owl" : "http://www.w3.org/2002/07/owl#"} -def qname(topic): - for psi in topic.getSubjectIdentifiers(): - str = psi.getAddress() - for (prefix, ns) in prefixes.items(): - if str.startswith(ns): - rest = str[len(ns) : ] - return "%s:%s" % (prefix, rest) - -schema = ImportExportUtils.getReader(sys.argv[1]).read() -qp = QueryUtils.getQueryProcessor(schema) - -PREFIXES = """ -using tmcl for i"http://psi.topicmaps.org/tmcl/" -using tm for i"http://psi.topicmaps.org/iso13250/model/" -using tmr for i"http://psi.ontopia.net/tm2rdf/#" -""" - -default_name_type = getvalue(PREFIXES + "$T = tm:topic-name?") - -for (prefix, ns) in prefixes.items(): - print "@prefix %s: <%s> ." % (prefix, ns) - -# ----- CLASSES - -print - -result = qp.execute(PREFIXES + """ -instance-of($TT, tmcl:topictype)?""") -while result.next(): - tt = qname(result.getValue("TT")) - print "%s rdf:type owl:Class ." % tt - -# ----- SUBCLASSING - -print - -result = qp.execute(PREFIXES + - "tm:superclass-subclass($SUP : tm:superclass, $SUB : tm:subclass)?") -while result.next(): - sup = result.getValue("SUP") - sub = result.getValue("SUB") - print "%s rdfs:subClassOf %s ." % (qname(sup), qname(sub)) - -# ----- ABSTRACT CLASSES - -print - -result = qp.execute(PREFIXES + """ -select $CLASS from -instance-of($C, tmcl:abstract-topictype-constraint), -tmcl:applies-to($C : tmcl:constraint-role, $CLASS : tmcl:topictype-role) -?""") -while result.next(): - k = result.getValue("CLASS") - - subs = getlist(PREFIXES + - "tm:superclass-subclass(%SUP% : tm:superclass, $SUB : tm:subclass)?", - {"SUP" : k}) - - print "%s owl:equivalentClass [ rdf:type owl:Class;" % qname(k) - print " owl:unionOf (%s) ]." % string.join(map(qname, subs), ", ") - -# ----- NAME PROPERTIES - -print - -preferred_for = {} -result = qp.execute(PREFIXES + - "tmr:name-property($TT : tmr:type, $NP : tmr:property)?") -while result.next(): - tt = result.getValue("TT") - np = result.getValue("NP") - - list = preferred_for.get(np) - if not list: - list = [] - preferred_for[np] = list - list.append(tt) - -result = qp.execute(PREFIXES + "instance-of($NT, tmcl:nametype)?") -while result.next(): - nt = result.getValue("NT") - - params = {"NT" : nt} - tts = getlist(PREFIXES + """ - select $TT from - instance-of($TNC, tmcl:topicname-constraint), - tmcl:applies-to($TNC : tmcl:constraint-role, $TT : tmcl:topictype-role), - tmcl:applies-to($TNC : tmcl:constraint-role, %NT% : tmcl:nametype-role)?""", - params) - - if nt == default_name_type: - continue # we process these separately - - print "%s rdf:type owl:DatatypeProperty;" % qname(nt) - if len(tts) == 1: - print " rdfs:domain %s;" % qname(tts[0]) - elif len(tts) > 1: - print " # domain conflict, %s different types" % (len(tts)) - else: - print " # domain unknown" - print " rdfs:range rdfs:Literal ." - -for (np, tts) in preferred_for.items(): - if qname(np).startswith("rdfs:"): - continue # we can't redefine RDFS vocabulary - - print "%s rdf:type owl:DatatypeProperty;" % qname(np) - if len(tts) == 1: - print " rdfs:domain %s;" % qname(tts[0]) - elif len(tts) > 1: - print " # domain conflict, %s different types" % (len(tts)) - else: - print " # domain unknown" - print " rdfs:range rdfs:Literal ." - - for tt in tts: - print "%s rdfs:subClassOf [ rdf:type owl:Restriction;" % qname(tt) - print " owl:onProperty %s;" % qname(np) - print " owl:cardinality \"1\";" - print "]." - -# ----- OCCURRENCE PROPERTIES - -print - -result = qp.execute(PREFIXES + "instance-of($OT, tmcl:occurrencetype)?") -while result.next(): - ot = result.getValue("OT") - - params = {"OT" : ot} - tts = getlist(PREFIXES + """ - select $TT from - instance-of($TOC, tmcl:topicoccurrence-constraint), - tmcl:applies-to($TOC : tmcl:constraint-role, $TT : tmcl:topictype-role), - tmcl:applies-to($TOC : tmcl:constraint-role, - %OT% : tmcl:occurrencetype-role)?""", params) - - print "%s rdf:type owl:DatatypeProperty;" % qname(ot) - if len(tts) == 1: - print " rdfs:domain %s;" % qname(tts[0]) - elif len(tts) > 1: - print " # domain conflict, %s different types" % (len(tts)) - else: - print " # domain unknown" - - datatype = getvalue(PREFIXES + """ - select $DT from - instance-of($ODTC, tmcl:occurrencedatatype-constraint), - tmcl:applies-to($ODTC : tmcl:constraint-role, $DT : tmcl:datatype-role), - tmcl:applies-to($ODTC : tmcl:constraint-role, %OT% : tmcl:occurrencetype-role) - ?""", params) - print " rdfs:range %s ." % (qname(datatype) or "rdfs:Literal") - -print - -result = qp.execute(PREFIXES + "instance-of($AT, tmcl:associationtype)?") -while result.next(): - at = result.getValue("AT") - - params = {"AT" : at} - roletypes = getlist(PREFIXES + """ - select $RT from - instance-of($ARC, tmcl:associationrole-constraint), - tmcl:applies-to($ARC : tmcl:constraint-role, - %AT% : tmcl:assoctype-role), - tmcl:applies-to($ARC : tmcl:constraint-role, - $RT : tmcl:roletype-role)?""", - params) - - if len(roletypes) == 0: - print "%s rdf:type owl:ObjectProperty . " % qname(at) - print " # no specified role types" - elif len(roletypes) == 1: - print "%s rdf:type owl:ObjectProperty; " % qname(at) - params["RT"] = roletypes[0] - mincard = get_min_card(at, roletypes[0]) - maxcard = get_max_card(at, roletypes[0]) - - if mincard == 2 and maxcard == 2: - print " rdf:type owl:SymmetricProperty;" - - types = find_types(at, roletypes[0]) - if len(types) == 0: - print " # domain&range unknown" - elif len(types) == 1: - print " rdfs:domain %s;" % qname(types[0]) - print " rdfs:range %s;" % qname(types[0]) - else: - print " # %s types as domain/range" % len(types) - else: - print " # appears to be unary, but not symmetric" - print "." - elif len(roletypes) == 2: - print "%s rdf:type owl:ObjectProperty; " % qname(at) - preferred = getvalue(PREFIXES + - "tmr:preferred-role(%AT% : tmr:association-type, $RT : tmr:role-type)?", - params) - if not preferred: - print " # had to guess preferred role type" - preferred = random.choice(roletypes) - - params["RT"] = preferred - if roletypes[0] == preferred: - other = roletypes[1] - else: - other = roletypes[0] - - types = find_types(at, preferred) - if len(types) == 0: - print " # no domain given" - elif len(types) == 1: - print " rdfs:domain %s;" % qname(types[0]) - else: - print " # domain has %s types" % len(types) - - types = find_types(at, other) - if len(types) == 0: - print " # no range given" - elif len(types) == 1: - print " rdfs:range %s;" % qname(types[0]) - else: - print " # range has %s types" % len(types) - - print "." - else: - print "%s rdf:type rdf:Class . " % qname(at) - print " # n-ary; turn into a resource" - print roletypes - -# ----- DISJOINTNESS - -print - -result = qp.execute(PREFIXES + """ -instance-of($ETC, tmcl:exclusive-instance), -tmcl:applies-to($ETC : tmcl:constraint-role, $TT1 : tmcl:topictype-role), -tmcl:applies-to($ETC : tmcl:constraint-role, $TT2 : tmcl:topictype-role), -$TT1 /= $TT2 ?""") -while result.next(): - tt1 = result.getValue("TT1") - tt2 = result.getValue("TT2") - print "%s owl:disjointWith %s ." % (qname(tt1), qname(tt2)) diff --git a/sandbox/tmcl-validator/README.txt b/sandbox/tmcl-validator/README.txt deleted file mode 100644 index 052d6d4d3..000000000 --- a/sandbox/tmcl-validator/README.txt +++ /dev/null @@ -1,13 +0,0 @@ - - tmcl-validator -================== - -This is meant as a reference implementation of TMCL, exactly mirroring -how TMCL is described in the standard. Thus, it should serve both as a -mechanism for verifying the standard, and as a testbed for the -conformance test suite. - -In addition, it can also be used as a real TMCL validator, but this is -not a design goal, and very likely it will only handle topic maps of -limited size. Further, error messages may leave something to be -desired. diff --git a/sandbox/tmcl-validator/datatypes.ctm b/sandbox/tmcl-validator/datatypes.ctm deleted file mode 100644 index 777a33ea0..000000000 --- a/sandbox/tmcl-validator/datatypes.ctm +++ /dev/null @@ -1,27 +0,0 @@ - -%include -%prefix dt http://psi.garshol.priv.no/datatypes/ -%prefix xsd http://www.w3.org/2001/XMLSchema# -%prefix iso http://psi.topicmaps.org/iso13250/ -%prefix tmcl http://psi.topicmaps.org/tmcl/ -%prefix xtm http://www.topicmaps.org/xtm/1.0/core.xtm# -%prefix tmdm http://psi.topicmaps.org/iso13250/model/ - -xtm:superclass-subclass tmdm:supertype-subtype. -xtm:superclass tmdm:supertype. -xtm:subclass tmdm:subtype. - -dt:datatype isa tmcl:topic-type; - plays-role(dt:subtype, dt:subdatatype-of, 0, *); - plays-role(dt:supertype, dt:subdatatype-of, 0, *). - -dt:subdatatype-of isa tmcl:association-type; - has-role(dt:subtype, 1, 1); - has-role(dt:supertype, 1, 1). - -dt:subtype isa tmcl:role-type. -dt:supertype isa tmcl:role-type. - -xsd:integer isa dt:datatype. -iso:ctm-integer isa dt:datatype. -dt:subdatatype-of(dt:subtype: xsd:integer, dt:supertype: iso:ctm-integer) \ No newline at end of file diff --git a/sandbox/tmcl-validator/runtests.py b/sandbox/tmcl-validator/runtests.py deleted file mode 100644 index abf84365a..000000000 --- a/sandbox/tmcl-validator/runtests.py +++ /dev/null @@ -1,35 +0,0 @@ - -# TODO -# - make sure that when a constraint is being violated, its ID is -# 'violated' - -import sys, validator -from glob import glob - -BASE = "/Users/larsga/cvs-co/cxtm-tests/trunk/tmcl/level-1/" -INVALID = "invalid/" -VALID = "valid/" -PATTERN = "*.ctm" - -total = 0 -fails = 0 -for file in glob(BASE + INVALID + PATTERN): - total += 1 - tm = validator.load_tm([file]) - errors = validator.validate(tm) - - if not errors: - print "No errors in", file - fails += 1 - -for file in glob(BASE + VALID + PATTERN): - total += 1 - tm = validator.load_tm([file]) - errors = validator.validate(tm) - - if errors: - print "Errors in", file - validator.report(errors) - fails += 1 - -print "%s tests, %s failures" % (total, fails) diff --git a/sandbox/tmcl-validator/seed.ctm b/sandbox/tmcl-validator/seed.ctm deleted file mode 100644 index 74c2b09f3..000000000 --- a/sandbox/tmcl-validator/seed.ctm +++ /dev/null @@ -1,6 +0,0 @@ -%prefix xtm http://www.topicmaps.org/xtm/1.0/core.xtm# -%prefix tmdm http://psi.topicmaps.org/iso13250/model/ - -xtm:superclass-subclass tmdm:supertype-subtype. -xtm:superclass tmdm:supertype. -xtm:subclass tmdm:subtype. diff --git a/sandbox/tmcl-validator/validator.py b/sandbox/tmcl-validator/validator.py deleted file mode 100644 index 041f109d8..000000000 --- a/sandbox/tmcl-validator/validator.py +++ /dev/null @@ -1,539 +0,0 @@ - -import sys -from net.ontopia.topicmaps.xml import InvalidTopicMapException -from net.ontopia.topicmaps.utils import ImportExportUtils, DuplicateSuppressionUtils -from net.ontopia.topicmaps.query.utils import QueryUtils, QueryWrapper, RowMapperIF - -prefixes = """ -using tmcl for i"http://psi.topicmaps.org/tmcl/" -using tmdm for i"http://psi.topicmaps.org/iso13250/model/" -using xtm for i"http://www.topicmaps.org/xtm/1.0/core.xtm#" -using dt for i"http://psi.garshol.priv.no/datatypes/" -using xsd for i"http://www.w3.org/2001/XMLSchema#" - -subclass-of($SUB, $SUPER) :- { - xtm:superclass-subclass($SUB : xtm:subclass, $SUPER : xtm:superclass) | - xtm:superclass-subclass($SUB : xtm:subclass, $MID : xtm:superclass), - subclass-of($MID, $SUPER) -}. - -subdatatype-of($SUB, $SUPER) :- { - dt:subdatatype-of($SUB : dt:subtype, $SUPER : dt:supertype) | - dt:subdatatype-of($SUB : dt:subtype, $MID : dt:supertype), - subdatatype-of($MID, $SUPER) -}. - -validly-substitutable-for($SUB, $SUPER) :- { - $SUB = $SUPER | - subdatatype-of($SUB, $SUPER) -}. - -""" - -def noresults(tm, query, msg): - errors = [] - qw = QueryWrapper(tm) - qw.setDeclarations(prefixes) - for map in qw.queryForMaps(query): - errors.append((map["BAD"], msg % map)) - return errors - -def display(tm, query): - qw = QueryWrapper(tm) - qw.setDeclarations(prefixes) - for map in qw.queryForMaps(query): - print map - -def get_list(tm, query, params): - qw = QueryWrapper(tm) - qw.setDeclarations(prefixes) - return qw.queryForMaps(query, params) - -def get_constraints(tm, query): - qw = QueryWrapper(tm) - qw.setDeclarations(prefixes) - return qw.queryForList(query, ConstraintBuilder()) - -def getOptional(result, name): - index = result.getIndex(name) - if index != -1: - return result.getValue(index) - else: - return None - -class ConstraintBuilder(RowMapperIF): - def mapRow(self, result, rowno): - return Constraint(getOptional(result, "TT"), - result.getValue("ST"), - result.getValue("MIN"), - result.getValue("MAX"), - getOptional(result, "S"), - getOptional(result, "RT")) - -class Constraint: - def __init__(self, tt, st, min, max, scope, roletype): - self._tt = tt - self._st = st - self._min = int(min or "0") - if max and not max == "*": - self._max = int(max) - else: - self._max = "*" # numbers are smaller than strings in python - self._scope = scope - self._rt = roletype - -def validate_constraints(topicmap, query1, query2, error): - if type(error) == type(""): - what = error - error = lambda env: "%s of type %s" % (env["what"], env["c"]._st) - - errors = [] - constraints = get_constraints(topicmap, query1) - for c in constraints: - # FIXME: must make it illegal to have max < min - params = {"TT" : c._tt, "ST" : c._st, "S" : c._scope, - "RT" : c._rt} - - for i in get_list(topicmap, query2, params): - count = int(i["OBJ"]) - if count < c._min: - errors.append((i["T"], ("must have at least %s %s" + - ", but had only %s") % - (c._min, error(locals()), count))) - elif count > c._max: - errors.append((i["T"], ("must have at most %s %s" + - ", but had %s") % - (c._max, error(locals()), count))) - return errors - -def validate(topicmap): - # clause 6.2, gvc - errors = noresults(topicmap, """ -select $BAD from - instance-of($T, $BAD), - not(instance-of($BAD, tmcl:topic-type))? -""", "has instances, but is not an instance of tmcl:topic-type") - - # clause 6.3, gvc - errors += noresults(topicmap, """ -select $BAD from - topic-name($T, $TN), type($TN, $BAD), - not(instance-of($BAD, tmcl:name-type))? -""", "is used as a name type, but is not an instance of tmcl:name-type") - - # clause 6.4, gvc - errors += noresults(topicmap, """ -select $BAD from - occurrence($T, $OCC), type($OCC, $BAD), - not(instance-of($BAD, tmcl:occurrence-type))? -""", "is used as an occurrence type, but is not an instance of tmcl:occurrence-type") - - # clause 6.5, gvc - errors += noresults(topicmap, """ -select $BAD from - association($A), type($A, $BAD), - not(instance-of($BAD, tmcl:association-type))? -""", "is used as an association type, but is not an instance of tmcl:association-type") - - # clause 6.6, gvc - errors += noresults(topicmap, """ -select $BAD from - association-role($A, $AR), type($AR, $BAD), - not(instance-of($BAD, tmcl:role-type))? -""", "is used as a role type, but is not an instance of tmcl:role-type") - - # clause 6.7, gvc - errors += noresults(topicmap, """ -select $BAD from - instance-of($BAD, $TT1), - instance-of($BAD, $TT2), - $TT1 /= $TT2, - not(subclass-of($TT1, $TT2)), - not(subclass-of($TT2, $TT1)), - not(instance-of($C, tmcl:overlap-declaration), - tmcl:overlaps($C : tmcl:allows, $TT1 : tmcl:allowed), - tmcl:overlaps($C : tmcl:allows, $TT2 : tmcl:allowed))? -""", "has two topic types, which are not declared as overlapping") - - # clause 7.2, cvr - errors += noresults(topicmap, """ -select $BAD from - instance-of($AC, tmcl:abstract-constraint), - tmcl:constrained-topic-type($AC : tmcl:constraint, $BAD : tmcl:constrained), - direct-instance-of($T, $BAD)? -""", "has direct instances, but is declared as abstract") - - # clause 7.3, cvr - # FIXME: cannot implement; must have regexp library - # clause 7.4, cvr - # FIXME: cannot implement; must have regexp library - # clause 7.5, cvr - # FIXME: cannot implement; must have regexp library - - # clause 7.6, cvr - query1 = """ -select $TT, $ST, $MAX, $MIN from - instance-of($C, tmcl:topic-name-constraint), - tmcl:constrained-topic-type($C : tmcl:constraint, $TT : tmcl:constrained), - tmcl:constrained-statement($C : tmcl:constraint, $ST : tmcl:constrained), - { tmcl:card-max($C, $MAX) }, - { tmcl:card-min($C, $MIN) }? -""" - query2 = """ -select $T, count($OBJ) from - instance-of($T, %TT%), - { topic-name($T, $OBJ), - type($OBJ, %ST%) }? - """ - errors += validate_constraints(topicmap, query1, query2, "names") - - # clause 7.6, gvr - errors += noresults(topicmap, """ -select $BAD from - topic-name($T, $TN), - type($TN, $BAD), - not({ instance-of($T, $TT) | - not(direct-instance-of($T, $TT)), - $TT = tmdm:subject }, - instance-of($C, tmcl:topic-name-constraint), - tmcl:constrained-topic-type($C : tmcl:constraint, $TT : tmcl:constrained), - tmcl:constrained-statement($C : tmcl:constraint, $BAD : tmcl:constrained))? -""", "is used as a name type on topic types where this is not allowed") - - # clause 7.7, cvr - query1 = """ -select $TT, $ST, $S, $MAX, $MIN from - instance-of($C, tmcl:variant-name-constraint), - tmcl:constrained-topic-type($C : tmcl:constraint, $TT : tmcl:constrained), - tmcl:constrained-statement($C : tmcl:constraint, $ST : tmcl:constrained), - tmcl:constrained-scope-topic($C : tmcl:constraint, $S : tmcl:constrained), - { tmcl:card-max($C, $MAX) }, - { tmcl:card-min($C, $MIN) }? -""" - query2 = """ -select $TN, count($OBJ) from - instance-of($T, %TT%), - { topic-name($T, $TN), - type($TN, $ST), - variant($TN, $OBJ), - scope($OBJ, %S%) }? - """ - errors += validate_constraints(topicmap, query1, query2, "variant names") - - # clause 7.7, gvr - errors += noresults(topicmap, """ -select $BAD from - instance-of($BAD, $TT), - topic-name($BAD, $TN), - type($TN, $ST), - variant($TN, $VN), - scope($VN, $S), - not(instance-of($C, tmcl:variant-name-constraint), - tmcl:constrained-topic-type($C : tmcl:constraint, $TT : tmcl:constrained), - tmcl:constrained-statement($C : tmcl:constraint, $ST : tmcl:constrained), - tmcl:constrained-scope-topic($C : tmcl:constraint, $S : tmcl:constrained))? -""", "is used as a variant name on topic names where this is not allowed") - - # clause 7.8, cvr - query1 = """ -select $TT, $ST, $MAX, $MIN from - instance-of($C, tmcl:topic-occurrence-constraint), - tmcl:constrained-topic-type($C : tmcl:constraint, $TT : tmcl:constrained), - tmcl:constrained-statement($C : tmcl:constraint, $ST : tmcl:constrained), - { tmcl:card-max($C, $MAX) }, - { tmcl:card-min($C, $MIN) }? -""" - query2 = """ -select $T, count($OBJ) from - instance-of($T, %TT%), - { occurrence($T, $OBJ), - type($OBJ, %ST%) }? - """ - errors += validate_constraints(topicmap, query1, query2, "occurrences") - - # clause 7.8, gvr - # FIXME: tmdm:subject - # FIXME: must handle subtyping here! - # FIXME: no errors if $T has no type - errors += noresults(topicmap, """ -select $BAD from - direct-instance-of($T, $TT), - occurrence($T, $OCC), - type($OCC, $BAD), - not(instance-of($C, tmcl:topic-occurrence-constraint), - tmcl:constrained-topic-type($C : tmcl:constraint, $TT : tmcl:constrained), - tmcl:constrained-statement($C : tmcl:constraint, $BAD : tmcl:constrained))? -""", "is used as an occurrence type on topic types where this is not allowed") - - # clause 7.9, cvr - query1 = """ -select $TT, $ST, $RT, $MAX, $MIN from - instance-of($C, tmcl:topic-role-constraint), - tmcl:constrained-topic-type($C : tmcl:constraint, $TT : tmcl:constrained), - tmcl:constrained-statement($C : tmcl:constraint, $ST : tmcl:constrained), - tmcl:constrained-role($C : tmcl:constraint, $RT : tmcl:constrained), - { tmcl:card-max($C, $MAX) }, - { tmcl:card-min($C, $MIN) }? -""" - query2 = """ -select $T, count($OBJ) from - instance-of($T, %TT%), - { role-player($OBJ, $T), - type($OBJ, %RT%), - association-role($ASSOC, $OBJ), - type($ASSOC, %ST%) }? - """ - errors += validate_constraints(topicmap, query1, query2, "roles") - - # clause 7.9, gvr - # FIXME: subclassing - errors += noresults(topicmap, """ -select $BAD from - role-player($ROLE, $T), - type($ROLE, $RT), - association-role($ASSOC, $ROLE), - type($ASSOC, $BAD), - not({ instance-of($T, $TT) | - not(instance-of($T, $TT)), - $TT = tmdm:subject }, - instance-of($C, tmcl:topic-role-constraint), - tmcl:constrained-topic-type($C : tmcl:constraint, $TT : tmcl:constrained), - tmcl:constrained-statement($C : tmcl:constraint, $BAD : tmcl:constrained), - tmcl:constrained-role($C : tmcl:constraint, $RT : tmcl:constrained))? -""", "is used as an association type on topic types where this is not allowed") - - # clause 7.10, cvr - query1 = """ -select $ST, $S, $MAX, $MIN from - instance-of($C, tmcl:scope-constraint), - tmcl:constrained-statement($C : tmcl:constraint, $ST : tmcl:constrained), - tmcl:constrained-scope($C : tmcl:constraint, $S : tmcl:constrained), - { tmcl:card-max($C, $MAX) }, - { tmcl:card-min($C, $MIN) }? -""" - query2 = """ -select $T, count($OBJ) from - type($T, %ST%), - { scope($T, $OBJ), - { instance-of($OBJ, %S%) | %S% = tmdm:subject} }? - """ - errors += validate_constraints(topicmap, query1, query2, "scopes") - - # clause 7.10, gvr - # FIXME: subclassing - errors += noresults(topicmap, """ -select $BAD from - type($OBJ, $ST), - scope($OBJ, $BAD), - not({ instance-of($BAD, $TT) | - not(instance-of($BAD, $TT)), - $TT = tmdm:subject }, - instance-of($C, tmcl:scope-constraint), - tmcl:constrained-statement($C : tmcl:constraint, $ST : tmcl:constrained), - tmcl:constrained-scope($C : tmcl:constraint, $TT : tmcl:constrained))? -""", "is used as a scope on statements where this is not allowed") - - # clause 7.11, cvr - query1 = """ -select $TT, $ST, $S, $MAX, $MIN from - instance-of($C, tmcl:scope-required-constraint), - tmcl:constrained-topic-type($C : tmcl:constraint, $TT : tmcl:constrained), - tmcl:constrained-statement($C : tmcl:constraint, $ST : tmcl:constrained), - tmcl:constrained-scope-topic($C : tmcl:constraint, $S : tmcl:constrained), - { tmcl:card-max($C, $MAX) }, - { tmcl:card-min($C, $MIN) }? -""" - query2 = """ -select $T, count($OBJ) from - instance-of($T, %TT%), - { { topic-name($T, $OBJ) | - occurrence($T, $OBJ) | - role-player($ROLE, $T), - association-role($OBJ, $ROLE) }, - type($OBJ, %ST%), - scope($OBJ, %S%) }? - """ - error = (lambda env: "statements of type %s in scope %s" % - (env["c"]._st, env["c"]._scope)) - errors += validate_constraints(topicmap, query1, query2, error) - - # clause 7.12, cvr - # FIXME: tmdm:subject - # FIXME: subtyping - query1 = """ -select $TT, $ST, $MAX, $MIN from - instance-of($C, tmcl:reifier-constraint), - tmcl:constrained-statement($C : tmcl:constraint, $ST : tmcl:constrained), - tmcl:allowed-reifier($C : tmcl:allows, $TT : tmcl:allowed), - { tmcl:card-max($C, $MAX) }, - { tmcl:card-min($C, $MIN) }? -""" - query2 = """ -select $T, count($OBJ) from - type($T, %ST%), - { reifies($OBJ, $T), - instance-of($OBJ, %TT%) }? - """ - error = (lambda env: "reifiers of type %s, since it is of type %s" % - (env["c"]._tt, env["c"]._st)) - errors += validate_constraints(topicmap, query1, query2, error) - - # clause 7.13, cvr - # FIXME: tmdm:subject - # FIXME: subtyping - query1 = """ -select $TT, $ST, $MAX, $MIN from - instance-of($C, tmcl:topic-reifies-constraint), - tmcl:constrained-topic-type($C : tmcl:constraint, $TT : tmcl:constrained), - tmcl:constrained-statement($C : tmcl:constraint, $ST : tmcl:constrained), - { tmcl:card-max($C, $MAX) }, - { tmcl:card-min($C, $MIN) }? -""" - query2 = """ -select $T, count($OBJ) from - instance-of($T, %TT%), - { reifies($T, $OBJ), - type($OBJ, %ST%) }? - """ - error = (lambda env: "statements of type %s that it reifies" % - (env["c"]._st)) - errors += validate_constraints(topicmap, query1, query2, error) - - # clause 7.14, cvr - query1 = """ -select $ST, $RT, $MAX, $MIN from - instance-of($C, tmcl:association-role-constraint), - tmcl:constrained-statement($C : tmcl:constraint, $ST : tmcl:constrained), - tmcl:constrained-role($C : tmcl:constraint, $RT : tmcl:constrained), - { tmcl:card-max($C, $MAX) }, - { tmcl:card-min($C, $MIN) }? -""" - query2 = """ -select $T, count($OBJ) from - type($T, %ST%), - { association-role($T, $OBJ), - type($OBJ, %RT%) }? - """ -# error = (lambda env: "statements of type %s that it reifies" % -# (env["c"]._st)) - errors += validate_constraints(topicmap, query1, query2, "roles") - - # clause 7.14, gvr - errors += noresults(topicmap, """ -select $BAD, $ST from - type($OBJ, $ST), - association-role($OBJ, $ROLE), - type($ROLE, $BAD), - not(instance-of($C, tmcl:association-role-constraint), - tmcl:constrained-statement($C : tmcl:constraint, $ST : tmcl:constrained), - tmcl:constrained-role($C : tmcl:constraint, $BAD : tmcl:constrained))? -""", "is used as a role type in associations of type %(ST)s, where this is not allowed") - - # clause 7.15, gvr - errors += noresults(topicmap, """ -select $BAD, $RT1, $TT1, $RT2, $TT2 from - instance-of($SOMEC, tmcl:role-combination-constraint), - tmcl:constrained-statement($SOMEC : tmcl:constraint, $BAD : tmcl:constrained), - type($ASSOC, $BAD), - association-role($ASSOC, $R1), - association-role($ASSOC, $R2), - $R1 /= $R2, - role-player($R1, $T1), - role-player($R2, $T2), - type($R1, $RT1), - type($R2, $RT2), - direct-instance-of($T1, $TT1), - direct-instance-of($T2, $TT2), - not(instance-of($C, tmcl:role-combination-constraint), - tmcl:constrained-statement($C : tmcl:constraint, $BAD : tmcl:constrained), - { tmcl:constrained-role($C : tmcl:constraint, $RT1 : tmcl:constrained), - tmcl:constrained-topic-type($C : tmcl:constraint, $TT1 : tmcl:constrained), - tmcl:other-constrained-role($C : tmcl:constraint, $RT2 : tmcl:constrained), - tmcl:other-constrained-topic-type($C : tmcl:constraint, $TT2 : tmcl:constrained) - | tmcl:constrained-role($C : tmcl:constraint, $RT2 : tmcl:constrained), - tmcl:constrained-topic-type($C : tmcl:constraint, $TT2 : tmcl:constrained), - tmcl:other-constrained-role($C : tmcl:constraint, $RT1 : tmcl:constrained), - tmcl:other-constrained-topic-type($C : tmcl:constraint, $TT1 : tmcl:constrained) }), - /* trick to remove duplicate error messages */ - object-id($RT1, $ID1), - object-id($RT2, $ID2), - $ID1 < $ID2? -""", "has illegal role player combination (%(RT1)s, %(TT1)s) and (%(RT2)s, %(TT2)s)") - - # clause 7.16, cvr - errors += noresults(topicmap, """ -select $BAD, $RDTPSI, $CDTPSI from - instance-of($C, tmcl:occurrence-datatype-constraint), - tmcl:constrained-statement($C : tmcl:constraint, $ST : tmcl:constrained), - tmcl:datatype($C, $CDTPSI), - type($BAD, $ST), - datatype($BAD, $RDTPSI), - not({ subject-identifier($CDT, $CDTPSI), - subject-identifier($RDT, $RDTPSI), - validly-substitutable-for($RDT, $CDT) | - $CDTPSI = $RDTPSI })? -""", "has illegal datatype %(RDTPSI)s, should be %(CDTPSI)s") - - # clause 7.17, cvr - errors += noresults(topicmap, """ -select $BAD, $OCC2 from - instance-of($C, tmcl:unique-value-constraint), - tmcl:constrained-statement($C : tmcl:constraint, $ST : tmcl:constrained), - occurrence($TOPIC1, $BAD), - type($BAD, $ST), - occurrence($TOPIC2, $OCC2), - type($OCC2, $ST), - $BAD /= $OCC2, - value($BAD, $VALUE), - value($OCC2, $VALUE), - object-id($BAD, $ID1), - object-id($OCC2, $ID2), - $ID1 < $ID2? -""", "has same value as %(OCC2)s, but should be unique") - - # clause 7.18, cvr - # FIXME: cannot implement without regexp - - return errors - -def report(errors): - for (topic, msg) in errors: - print topic - print " ", msg - - print "%s errors" % len(errors) - if not errors: - print "Topic map is valid" - else: - print "Topic map is not valid" - -def load_tm(files): - SEED_TM = "/Users/larsga/cvs-co/iso-13250/tmcl/specification/schema.ctm" - files = files + ["datatypes.ctm"] - try: - topicmap = ImportExportUtils.getReader(SEED_TM).read() - for file in files: - ImportExportUtils.getImporter(file).importInto(topicmap) - except InvalidTopicMapException, e: - print "Invalid topic map", file - print " ", e.getMessage() - sys.exit(1) - DuplicateSuppressionUtils.removeDuplicates(topicmap) - return topicmap - -def run(): - if len(sys.argv) == 1: - print """ -jython validator.py tmfile [tmfile tmfile tmfile ...] - - Loads all the given files, merges them together, and then runs TMCL - validation to ensure that the resulting topic map is valid. -""" - sys.exit(1) - - topicmap = load_tm(sys.argv[1 : ]) - errors = validate(topicmap) - report(errors) - -if __name__ == "__main__": - run() diff --git a/sandbox/tmql4ontopia/LICENSE.txt b/sandbox/tmql4ontopia/LICENSE.txt deleted file mode 100644 index 261eeb9e9..000000000 --- a/sandbox/tmql4ontopia/LICENSE.txt +++ /dev/null @@ -1,201 +0,0 @@ - Apache License - Version 2.0, January 2004 - http://www.apache.org/licenses/ - - TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION - - 1. Definitions. - - "License" shall mean the terms and conditions for use, reproduction, - and distribution as defined by Sections 1 through 9 of this document. - - "Licensor" shall mean the copyright owner or entity authorized by - the copyright owner that is granting the License. - - "Legal Entity" shall mean the union of the acting entity and all - other entities that control, are controlled by, or are under common - control with that entity. For the purposes of this definition, - "control" means (i) the power, direct or indirect, to cause the - direction or management of such entity, whether by contract or - otherwise, or (ii) ownership of fifty percent (50%) or more of the - outstanding shares, or (iii) beneficial ownership of such entity. - - "You" (or "Your") shall mean an individual or Legal Entity - exercising permissions granted by this License. - - "Source" form shall mean the preferred form for making modifications, - including but not limited to software source code, documentation - source, and configuration files. - - "Object" form shall mean any form resulting from mechanical - transformation or translation of a Source form, including but - not limited to compiled object code, generated documentation, - and conversions to other media types. - - "Work" shall mean the work of authorship, whether in Source or - Object form, made available under the License, as indicated by a - copyright notice that is included in or attached to the work - (an example is provided in the Appendix below). - - "Derivative Works" shall mean any work, whether in Source or Object - form, that is based on (or derived from) the Work and for which the - editorial revisions, annotations, elaborations, or other modifications - represent, as a whole, an original work of authorship. For the purposes - of this License, Derivative Works shall not include works that remain - separable from, or merely link (or bind by name) to the interfaces of, - the Work and Derivative Works thereof. - - "Contribution" shall mean any work of authorship, including - the original version of the Work and any modifications or additions - to that Work or Derivative Works thereof, that is intentionally - submitted to Licensor for inclusion in the Work by the copyright owner - or by an individual or Legal Entity authorized to submit on behalf of - the copyright owner. For the purposes of this definition, "submitted" - means any form of electronic, verbal, or written communication sent - to the Licensor or its representatives, including but not limited to - communication on electronic mailing lists, source code control systems, - and issue tracking systems that are managed by, or on behalf of, the - Licensor for the purpose of discussing and improving the Work, but - excluding communication that is conspicuously marked or otherwise - designated in writing by the copyright owner as "Not a Contribution." - - "Contributor" shall mean Licensor and any individual or Legal Entity - on behalf of whom a Contribution has been received by Licensor and - subsequently incorporated within the Work. - - 2. Grant of Copyright License. Subject to the terms and conditions of - this License, each Contributor hereby grants to You a perpetual, - worldwide, non-exclusive, no-charge, royalty-free, irrevocable - copyright license to reproduce, prepare Derivative Works of, - publicly display, publicly perform, sublicense, and distribute the - Work and such Derivative Works in Source or Object form. - - 3. Grant of Patent License. Subject to the terms and conditions of - this License, each Contributor hereby grants to You a perpetual, - worldwide, non-exclusive, no-charge, royalty-free, irrevocable - (except as stated in this section) patent license to make, have made, - use, offer to sell, sell, import, and otherwise transfer the Work, - where such license applies only to those patent claims licensable - by such Contributor that are necessarily infringed by their - Contribution(s) alone or by combination of their Contribution(s) - with the Work to which such Contribution(s) was submitted. If You - institute patent litigation against any entity (including a - cross-claim or counterclaim in a lawsuit) alleging that the Work - or a Contribution incorporated within the Work constitutes direct - or contributory patent infringement, then any patent licenses - granted to You under this License for that Work shall terminate - as of the date such litigation is filed. - - 4. Redistribution. You may reproduce and distribute copies of the - Work or Derivative Works thereof in any medium, with or without - modifications, and in Source or Object form, provided that You - meet the following conditions: - - (a) You must give any other recipients of the Work or - Derivative Works a copy of this License; and - - (b) You must cause any modified files to carry prominent notices - stating that You changed the files; and - - (c) You must retain, in the Source form of any Derivative Works - that You distribute, all copyright, patent, trademark, and - attribution notices from the Source form of the Work, - excluding those notices that do not pertain to any part of - the Derivative Works; and - - (d) If the Work includes a "NOTICE" text file as part of its - distribution, then any Derivative Works that You distribute must - include a readable copy of the attribution notices contained - within such NOTICE file, excluding those notices that do not - pertain to any part of the Derivative Works, in at least one - of the following places: within a NOTICE text file distributed - as part of the Derivative Works; within the Source form or - documentation, if provided along with the Derivative Works; or, - within a display generated by the Derivative Works, if and - wherever such third-party notices normally appear. The contents - of the NOTICE file are for informational purposes only and - do not modify the License. You may add Your own attribution - notices within Derivative Works that You distribute, alongside - or as an addendum to the NOTICE text from the Work, provided - that such additional attribution notices cannot be construed - as modifying the License. - - You may add Your own copyright statement to Your modifications and - may provide additional or different license terms and conditions - for use, reproduction, or distribution of Your modifications, or - for any such Derivative Works as a whole, provided Your use, - reproduction, and distribution of the Work otherwise complies with - the conditions stated in this License. - - 5. Submission of Contributions. Unless You explicitly state otherwise, - any Contribution intentionally submitted for inclusion in the Work - by You to the Licensor shall be under the terms and conditions of - this License, without any additional terms or conditions. - Notwithstanding the above, nothing herein shall supersede or modify - the terms of any separate license agreement you may have executed - with Licensor regarding such Contributions. - - 6. Trademarks. This License does not grant permission to use the trade - names, trademarks, service marks, or product names of the Licensor, - except as required for reasonable and customary use in describing the - origin of the Work and reproducing the content of the NOTICE file. - - 7. Disclaimer of Warranty. Unless required by applicable law or - agreed to in writing, Licensor provides the Work (and each - Contributor provides its Contributions) on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or - implied, including, without limitation, any warranties or conditions - of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A - PARTICULAR PURPOSE. You are solely responsible for determining the - appropriateness of using or redistributing the Work and assume any - risks associated with Your exercise of permissions under this License. - - 8. Limitation of Liability. In no event and under no legal theory, - whether in tort (including negligence), contract, or otherwise, - unless required by applicable law (such as deliberate and grossly - negligent acts) or agreed to in writing, shall any Contributor be - liable to You for damages, including any direct, indirect, special, - incidental, or consequential damages of any character arising as a - result of this License or out of the use or inability to use the - Work (including but not limited to damages for loss of goodwill, - work stoppage, computer failure or malfunction, or any and all - other commercial damages or losses), even if such Contributor - has been advised of the possibility of such damages. - - 9. Accepting Warranty or Additional Liability. While redistributing - the Work or Derivative Works thereof, You may choose to offer, - and charge a fee for, acceptance of support, warranty, indemnity, - or other liability obligations and/or rights consistent with this - License. However, in accepting such obligations, You may act only - on Your own behalf and on Your sole responsibility, not on behalf - of any other Contributor, and only if You agree to indemnify, - defend, and hold each Contributor harmless for any liability - incurred by, or claims asserted against, such Contributor by reason - of your accepting any such warranty or additional liability. - - END OF TERMS AND CONDITIONS - - APPENDIX: How to apply the Apache License to your work. - - To apply the Apache License to your work, attach the following - boilerplate notice, with the fields enclosed by brackets "[]" - replaced with your own identifying information. (Don't include - the brackets!) The text should be enclosed in the appropriate - comment syntax for the file format. We also recommend that a - file or class name and description of purpose be included on the - same "printed page" as the copyright notice for easier - identification within third-party archives. - - Copyright [yyyy] [name of copyright owner] - - Licensed under the Apache License, Version 2.0 (the "License"); - you may not use this file except in compliance with the License. - You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - - Unless required by applicable law or agreed to in writing, software - distributed under the License is distributed on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - See the License for the specific language governing permissions and - limitations under the License. diff --git a/sandbox/tmql4ontopia/pom.xml b/sandbox/tmql4ontopia/pom.xml deleted file mode 100644 index bfb4a975f..000000000 --- a/sandbox/tmql4ontopia/pom.xml +++ /dev/null @@ -1,57 +0,0 @@ - - 4.0.0 - tmql4j - tmql4ontopia - TMQL4Ontopia - 1.0 - TMQL Ontopia for Plugin - - Topic Maps Lab - www.topicmapslab.de - - - - jdk5 - - 1.5 - - - - - - tmlab - http://maven.topicmapslab.de/third_party - - - ontopia - http://ontopia.googlecode.com/svn/maven-repository - - - - - de.topicmapslab - tmql4j - 2.0.0a - - - tinytim - org.tinytim - - - - - net.ontopia - ontopia-engine - 5.1.0 - - - junit - junit - 4.7 - - - - - - - \ No newline at end of file diff --git a/sandbox/tmql4ontopia/src/main/java/net/ontopia/topicmaps/impl/tmapi2/OntopiaToTMAPIWrapper.java b/sandbox/tmql4ontopia/src/main/java/net/ontopia/topicmaps/impl/tmapi2/OntopiaToTMAPIWrapper.java deleted file mode 100644 index b1700340e..000000000 --- a/sandbox/tmql4ontopia/src/main/java/net/ontopia/topicmaps/impl/tmapi2/OntopiaToTMAPIWrapper.java +++ /dev/null @@ -1,132 +0,0 @@ -/** - * TMQL4J - Javabased TMQL Engine - * - * Copyright: Copyright 2009 Topic Maps Lab, University of Leipzig. http://www.topicmapslab.de/ - * License: Apache License, Version 2.0 http://www.apache.org/licenses/LICENSE-2.0.html - * - * Author: Sven Krosse - * - */ -package net.ontopia.topicmaps.impl.tmapi2; - -import net.ontopia.topicmaps.core.AssociationIF; -import net.ontopia.topicmaps.core.OccurrenceIF; -import net.ontopia.topicmaps.core.TMObjectIF; -import net.ontopia.topicmaps.core.TopicIF; -import net.ontopia.topicmaps.core.TopicNameIF; -import net.ontopia.topicmaps.core.VariantNameIF; -import net.ontopia.topicmaps.utils.TopicStringifiers; -import net.ontopia.utils.StringifierIF; - -import org.tmapi.core.Association; -import org.tmapi.core.Name; -import org.tmapi.core.Occurrence; -import org.tmapi.core.Role; -import org.tmapi.core.Topic; -import org.tmapi.core.TopicMap; -import org.tmapi.core.Variant; - -import de.topicmapslab.tmql4j.common.model.tuplesequence.ITupleSequence; -import de.topicmapslab.tmql4j.common.properties.TMQLRuntimeProperties; - -public class OntopiaToTMAPIWrapper { - - public static TMObjectIF toTMObjectIF(Object obj) { - if (obj instanceof Topic) { - return ((TopicImpl) obj).getWrapped(); - } else if (obj instanceof Name) { - return ((NameImpl) obj).getWrapped(); - } else if (obj instanceof Association) { - return ((AssociationImpl) obj).getWrapped(); - } else if (obj instanceof Role) { - return ((RoleImpl) obj).getWrapped(); - } else if (obj instanceof Occurrence) { - return ((OccurrenceImpl) obj).getWrapped(); - } else if (obj instanceof Variant) { - return ((VariantImpl) obj).getWrapped(); - } else if (obj instanceof TopicMap) { - return ((TopicMapImpl) obj).getWrapped(); - } - return null; - } - - public static String toTMObjectIF(ITupleSequence seq) { - - String tmid = ""; - try { - tmid = TMQLRuntimeProperties.instance().get( - TMQLRuntimeProperties.ONTOPIA_TOPICMAPID).toString(); - } catch (Exception ex) { - ex.printStackTrace(); - } - - StringifierIF str = TopicStringifiers.getDefaultStringifier(); - StringBuilder sb = new StringBuilder(); - for (Object object : seq) { - TMObjectIF obj = toTMObjectIF(object); - if (obj == null) { - sb.append((sb.toString().length() != 0 ? "
    " : "") - + object.toString()); - } else if (obj instanceof TopicIF || obj instanceof AssociationIF) { - StringBuilder builder = new StringBuilder(); - builder.append(""); - builder.append(obj instanceof TopicIF ? str - .toString((TopicIF) obj) : "Association " - + obj.getObjectId()); - builder.append(""); - sb.append((sb.toString().length() != 0 ? "
    " : "") - + builder.toString()); - } else if (obj instanceof TopicNameIF) { - sb.append((sb.toString().length() != 0 ? "
    " : "") - + ((TopicNameIF) obj).getValue()); - } else if (obj instanceof VariantNameIF) { - sb.append((sb.toString().length() != 0 ? "
    " : "") - + ((VariantNameIF) obj).getValue()); - } else if (obj instanceof OccurrenceIF) { - sb.append((sb.toString().length() != 0 ? "
    " : "") - + toTMObjectIF((OccurrenceIF) obj)); - } else { - sb.append((sb.toString().length() != 0 ? "
    " : "") - + object.toString()); - } - } - return sb.toString(); - } - - public static String toTMObjectIF(OccurrenceIF occurrenceIF) { - - String tmid = ""; - try { - tmid = TMQLRuntimeProperties.instance().get( - TMQLRuntimeProperties.ONTOPIA_TOPICMAPID).toString(); - } catch (Exception ex) { - ex.printStackTrace(); - } - - StringifierIF str = TopicStringifiers.getDefaultStringifier(); - StringBuilder sb = new StringBuilder(); - - StringBuilder builder = new StringBuilder(); - builder.append(""); - builder.append(str.toString((TopicIF) occurrenceIF.getType())); - builder.append(": "); - builder.append(occurrenceIF.getValue()); - sb.append((sb.toString().length() != 0 ? "
    " : "") - + builder.toString()); - - return sb.toString(); - } -} diff --git a/sandbox/tmql4ontopia/src/main/java/net/ontopia/topicmaps/query/tmql/impl/basic/TMQL4JParsedQuery.java b/sandbox/tmql4ontopia/src/main/java/net/ontopia/topicmaps/query/tmql/impl/basic/TMQL4JParsedQuery.java deleted file mode 100644 index 51f0269e7..000000000 --- a/sandbox/tmql4ontopia/src/main/java/net/ontopia/topicmaps/query/tmql/impl/basic/TMQL4JParsedQuery.java +++ /dev/null @@ -1,150 +0,0 @@ -/** - * TMQL4J Plugin for Ontopia - * - * Copyright: Copyright 2009 Topic Maps Lab, University of Leipzig. http://www.topicmapslab.de/ - * License: Apache License, Version 2.0 http://www.apache.org/licenses/LICENSE-2.0.html - * - * Author: Sven Krosse - * - */ -package net.ontopia.topicmaps.query.tmql.impl.basic; - -import java.util.Collection; -import java.util.LinkedList; -import java.util.List; -import java.util.Map; - -import net.ontopia.topicmaps.query.core.InvalidQueryException; -import net.ontopia.topicmaps.query.core.ParsedQueryIF; -import net.ontopia.topicmaps.query.core.QueryResultIF; -import net.ontopia.topicmaps.query.tmql.impl.tmql4jextension.OntopiaParserProcessingTaskChain; -import net.ontopia.topicmaps.query.tmql.impl.tmql4jextension.WrappedOntopiaResult; -import net.ontopia.topicmaps.query.tmql.impl.tmql4jextension.WrappedOntopiaResultSet; -import net.ontopia.topicmaps.query.tmql.impl.util.ColumnHeaderGenerator; - -import org.tmapi.core.TopicMap; -import org.tmapi.core.TopicMapSystem; - -import de.topicmapslab.tmql4j.common.core.exception.TMQLRuntimeException; -import de.topicmapslab.tmql4j.common.core.process.TMQLRuntime; -import de.topicmapslab.tmql4j.common.core.query.TMQLQuery; -import de.topicmapslab.tmql4j.common.model.query.IQuery; -import de.topicmapslab.tmql4j.common.properties.TMQLRuntimeProperties; -import de.topicmapslab.tmql4j.parser.core.expressions.OrderByClause; -import de.topicmapslab.tmql4j.parser.core.expressions.SelectExpression; -import de.topicmapslab.tmql4j.parser.model.IExpression; -import de.topicmapslab.tmql4j.parser.model.IParserTree; - -public class TMQL4JParsedQuery implements ParsedQueryIF { - - private final IParserTree tree; - private final TMQLRuntime runtime; - private final IQuery query; - - public TMQL4JParsedQuery(final TopicMapSystem topicMapSystem, - Collection topicMaps, final TMQLRuntime runtime, final String query, - final String tmid) { - this(topicMapSystem, topicMaps, runtime, new TMQLQuery(query), tmid); - } - - public TMQL4JParsedQuery(final TopicMapSystem topicMapSystem, - Collection topicMaps, final TMQLRuntime runtime, final IQuery query, - final String tmid) { - this.runtime = runtime; - this.query = query; - OntopiaParserProcessingTaskChain chain = new OntopiaParserProcessingTaskChain( - runtime, query); - try { - TMQLRuntimeProperties properties = TMQLRuntimeProperties.instance(); - properties.setProperty( - TMQLRuntimeProperties.RESULT_SET_IMPLEMENTATION_CLASS, - WrappedOntopiaResultSet.class.getCanonicalName()); - properties.setProperty( - TMQLRuntimeProperties.RESULT_TUPLE_IMPLEMENTATION_CLASS, - WrappedOntopiaResult.class.getCanonicalName()); - properties.setProperty(TMQLRuntimeProperties.ONTOPIA_TOPICMAPID, - tmid); - chain.execute(); - } catch (TMQLRuntimeException e) { - e.printStackTrace(); - } - this.tree = chain.getParserTree(); - } - - public QueryResultIF execute() throws InvalidQueryException { - List headers = new LinkedList(); - try { - runtime.run(query); - headers = ColumnHeaderGenerator.columnHeaders(runtime); - } catch (TMQLRuntimeException e) { - e.printStackTrace(); - } - return new TMQL4JQueryResult( - (WrappedOntopiaResultSet) runtime - .getStoredValue(TMQLRuntime.TMQL_RUNTIME_RESULTPROCESSING_RESULT), - headers); - } - - public QueryResultIF execute(Map arg0) - throws InvalidQueryException { - return execute(); - } - - public Collection getAllVariables() { - return tree.root().variables(); - } - - public Collection getCountedVariables() { - return new LinkedList(); - } - - public List getOrderBy() { - List result = new LinkedList(); - try { - for (IExpression expression : tree.root().subExpressionsByType( - OrderByClause.class)) { - for (String variable : expression.variables()) { - if (!result.contains(variable)) { - result.add(variable); - } - } - } - } catch (TMQLRuntimeException e) { - e.printStackTrace(); - } - return result; - } - - public List getSelectedVariables() { - List result = new LinkedList(); - try { - for (IExpression expression : tree.root().subExpressionsByType( - SelectExpression.class)) { - for (String variable : expression.variables()) { - if (!result.contains(variable)) { - result.add(variable); - } - } - } - } catch (TMQLRuntimeException e) { - e.printStackTrace(); - } - return result; - } - - public boolean isOrderedAscending(String variable) { - return false; - } - - @Override - public String toString() { - StringBuilder builder = new StringBuilder(); - if (tree != null) { - tree.toStringTree(builder); - } else { - builder.append("Parse TMQL-Query failed!"); - } - return builder.toString(); - } - -} diff --git a/sandbox/tmql4ontopia/src/main/java/net/ontopia/topicmaps/query/tmql/impl/basic/TMQL4JQueryProcessor.java b/sandbox/tmql4ontopia/src/main/java/net/ontopia/topicmaps/query/tmql/impl/basic/TMQL4JQueryProcessor.java deleted file mode 100644 index 452855cec..000000000 --- a/sandbox/tmql4ontopia/src/main/java/net/ontopia/topicmaps/query/tmql/impl/basic/TMQL4JQueryProcessor.java +++ /dev/null @@ -1,194 +0,0 @@ -/** - * TMQL4J Plugin for Ontopia - * - * Copyright: Copyright 2009 Topic Maps Lab, University of Leipzig. http://www.topicmapslab.de/ - * License: Apache License, Version 2.0 http://www.apache.org/licenses/LICENSE-2.0.html - * - * Author: Sven Krosse - * - */ -package net.ontopia.topicmaps.query.tmql.impl.basic; - -import java.io.IOException; -import java.io.Reader; -import java.util.Collection; -import java.util.HashSet; -import java.util.LinkedList; -import java.util.List; -import java.util.Map; - -import net.ontopia.topicmaps.core.TopicMapIF; -import net.ontopia.topicmaps.impl.tmapi2.MemoryTopicMapSystemImpl; -import net.ontopia.topicmaps.query.core.DeclarationContextIF; -import net.ontopia.topicmaps.query.core.InvalidQueryException; -import net.ontopia.topicmaps.query.core.ParsedModificationStatementIF; -import net.ontopia.topicmaps.query.core.ParsedQueryIF; -import net.ontopia.topicmaps.query.core.QueryProcessorIF; -import net.ontopia.topicmaps.query.core.QueryResultIF; -import net.ontopia.topicmaps.query.tmql.impl.tmql4jextension.WrappedOntopiaResult; -import net.ontopia.topicmaps.query.tmql.impl.tmql4jextension.WrappedOntopiaResultSet; -import net.ontopia.topicmaps.query.tmql.impl.util.ColumnHeaderGenerator; -import net.ontopia.utils.OntopiaException; - -import org.tmapi.core.FactoryConfigurationException; -import org.tmapi.core.TMAPIException; -import org.tmapi.core.TopicMap; -import org.tmapi.core.TopicMapSystem; -import org.tmapi.core.TopicMapSystemFactory; - -import de.topicmapslab.tmql4j.common.core.exception.TMQLRuntimeException; -import de.topicmapslab.tmql4j.common.core.process.TMQLRuntime; -import de.topicmapslab.tmql4j.common.core.query.TMQLQuery; -import de.topicmapslab.tmql4j.common.properties.TMQLRuntimeProperties; - -public class TMQL4JQueryProcessor implements QueryProcessorIF { - - private final Collection topicMaps; - private TopicMapSystemFactory factory; - private TopicMapSystem topicMapSystem; - private final String tmid; - private final TMQLRuntime runtime; - - public TMQL4JQueryProcessor(TopicMapIF topicMap) throws OntopiaException { - try { - factory = TopicMapSystemFactory.newInstance(); - topicMapSystem = factory.newTopicMapSystem(); - TopicMap topicmap = ((MemoryTopicMapSystemImpl) topicMapSystem) - .createTopicMap(topicMap); - topicMaps = new HashSet(); - topicMaps.add(topicmap); - this.tmid = ""; - this.runtime = new TMQLRuntime(topicMapSystem, topicMaps, true); - } catch (TMAPIException e) { - e.printStackTrace(); - throw new OntopiaException("Error", e); - } - - } - - public TMQL4JQueryProcessor(TopicMapIF topicMap, final String tmid) - throws OntopiaException { - try { - factory = TopicMapSystemFactory.newInstance(); - topicMapSystem = factory.newTopicMapSystem(); - TopicMap topicmap = ((MemoryTopicMapSystemImpl) topicMapSystem) - .createTopicMap(topicMap); - topicMaps = new HashSet(); - topicMaps.add(topicmap); - this.tmid = tmid; - this.runtime = new TMQLRuntime(topicMapSystem, topicMaps, true); - } catch (TMAPIException e) { - e.printStackTrace(); - throw new OntopiaException("Error", e); - } - - } - - public TMQL4JQueryProcessor(TopicMap topicMap) { - this.topicMaps = new HashSet(); - topicMaps.add(topicMap); - this.tmid = ""; - - try { - this.factory = TopicMapSystemFactory.newInstance(); - } catch (FactoryConfigurationException e) { - this.factory = new net.ontopia.topicmaps.impl.tmapi2.TopicMapSystemFactory(); - e.printStackTrace(); - } - try { - this.topicMapSystem = factory.newTopicMapSystem(); - } catch (TMAPIException e) { - e.printStackTrace(); - } - this.runtime = new TMQLRuntime(topicMapSystem, topicMaps, true); - } - - public QueryResultIF execute(String query) throws InvalidQueryException { - List headers = new LinkedList(); - try { - TMQLRuntimeProperties properties = TMQLRuntimeProperties.instance(); - properties.setProperty( - TMQLRuntimeProperties.RESULT_SET_IMPLEMENTATION_CLASS, - WrappedOntopiaResultSet.class.getCanonicalName()); - properties.setProperty( - TMQLRuntimeProperties.RESULT_TUPLE_IMPLEMENTATION_CLASS, - WrappedOntopiaResult.class.getCanonicalName()); - properties.setProperty(TMQLRuntimeProperties.ONTOPIA_TOPICMAPID, - this.tmid); - runtime.run(new TMQLQuery(query)); - - headers = ColumnHeaderGenerator.columnHeaders(runtime); - - } catch (TMQLRuntimeException e) { - e.printStackTrace(); - } - return new TMQL4JQueryResult( - (WrappedOntopiaResultSet) runtime - .getStoredValue(TMQLRuntime.TMQL_RUNTIME_RESULTPROCESSING_RESULT), - headers);// , - // ColumnHeaderGenerator.columnHeaders(runtime)); - - } - - public QueryResultIF execute(String query, DeclarationContextIF context) - throws InvalidQueryException { - return execute(query); - } - - public QueryResultIF execute(String query, Map arg1) - throws InvalidQueryException { - return execute(query); - } - - public QueryResultIF execute(String query, Map arg1, - DeclarationContextIF arg2) throws InvalidQueryException { - return execute(query); - } - - public void load(String arg0) throws InvalidQueryException { - } - - public void load(Reader arg0) throws InvalidQueryException, IOException { - } - - public ParsedQueryIF parse(String query) throws InvalidQueryException { - return new TMQL4JParsedQuery(topicMapSystem, topicMaps, runtime, query, - tmid); - } - - public ParsedQueryIF parse(String query, DeclarationContextIF arg1) - throws InvalidQueryException { - return new TMQL4JParsedQuery(topicMapSystem, topicMaps, runtime, query, - tmid); - } - - public int update(String arg0) throws InvalidQueryException { - throw new UnsupportedOperationException(); - } - - public ParsedModificationStatementIF parseUpdate(String arg0) - throws InvalidQueryException { - throw new UnsupportedOperationException(); - } - - public ParsedModificationStatementIF parseUpdate(String arg0, - DeclarationContextIF arg1) throws InvalidQueryException { - throw new UnsupportedOperationException(); - } - - public int update(String arg0, DeclarationContextIF arg1) - throws InvalidQueryException { - throw new UnsupportedOperationException(); - } - - public int update(String arg0, Map arg1) - throws InvalidQueryException { - throw new UnsupportedOperationException(); - } - - public int update(String arg0, Map arg1, - DeclarationContextIF arg2) throws InvalidQueryException { - throw new UnsupportedOperationException(); - } - -} diff --git a/sandbox/tmql4ontopia/src/main/java/net/ontopia/topicmaps/query/tmql/impl/basic/TMQL4JQueryResult.java b/sandbox/tmql4ontopia/src/main/java/net/ontopia/topicmaps/query/tmql/impl/basic/TMQL4JQueryResult.java deleted file mode 100644 index 6596e0f9e..000000000 --- a/sandbox/tmql4ontopia/src/main/java/net/ontopia/topicmaps/query/tmql/impl/basic/TMQL4JQueryResult.java +++ /dev/null @@ -1,138 +0,0 @@ -/** - * TMQL4J Plugin for Ontopia - * - * Copyright: Copyright 2009 Topic Maps Lab, University of Leipzig. http://www.topicmapslab.de/ - * License: Apache License, Version 2.0 http://www.apache.org/licenses/LICENSE-2.0.html - * - * Author: Sven Krosse - * - */ -package net.ontopia.topicmaps.query.tmql.impl.basic; - -import java.util.LinkedList; -import java.util.List; - -import net.ontopia.topicmaps.query.core.QueryResultIF; -import net.ontopia.topicmaps.query.tmql.impl.tmql4jextension.WrappedOntopiaResult; -import net.ontopia.topicmaps.query.tmql.impl.tmql4jextension.WrappedOntopiaResultSet; - -public class TMQL4JQueryResult implements QueryResultIF { - - private final WrappedOntopiaResultSet resultSet; - private final List columnNames; - private int currentRow; - - public TMQL4JQueryResult(final WrappedOntopiaResultSet resultSet, - final List columnNames) { - if (columnNames != null) { - this.columnNames = columnNames; - } else { - this.columnNames = new LinkedList(); - } - - if (resultSet != null) { - this.resultSet = resultSet; - } else { - this.resultSet = new WrappedOntopiaResultSet(); - } - - long size = 0; - if (this.resultSet.size() > 0) { - size = ((WrappedOntopiaResult) this.resultSet.first()).size(); - } - - for (int index = this.columnNames.size(); index < size; index++) { - this.columnNames.add("Column " + index); - } - - this.currentRow = -1; - - System.out.println(getClass().getSimpleName() + ": headers [" - + columnNames.toString() + " ](" + columnNames.size() - + ") resultSet: " + this.resultSet.size() + " results: " - + this.getWidth()); - } - - public TMQL4JQueryResult(final WrappedOntopiaResultSet resultSet) { - this.columnNames = new LinkedList(); - if (resultSet != null) { - this.resultSet = resultSet; - long size = 0; - if (this.resultSet.size() > 0) { - size = ((WrappedOntopiaResult) this.resultSet.first()).size(); - } - for (int index = 0; index < size; index++) { - this.columnNames.add("Column " + index); - } - } else { - this.resultSet = new WrappedOntopiaResultSet(); - } - - this.currentRow = -1; - } - - public void close() { - - } - - public String getColumnName(int index) { - if (index < columnNames.size()) { - return columnNames.get(index); - } - return null; - } - - public String[] getColumnNames() { - return columnNames.toArray(new String[0]); - } - - public Object getValue(int index) { - WrappedOntopiaResult result = resultSet.getValue(currentRow); - if (result != null) { - return result.getValue(index); - } - return null; - } - - public Object[] getValues() { - WrappedOntopiaResult result = resultSet.getValue(currentRow); - if (result != null) { - return result.getValues(); - } - return new Object[0]; - } - - public Object[] getValues(Object[] values) { - Object[] row = getValues(); - System.arraycopy(row, 0, values, 0, row.length); - return values; - } - - public int getWidth() { - if (resultSet.size() > 0) { - return ((WrappedOntopiaResult) resultSet.iterator().next()).size(); - } - return 0; - } - - public boolean next() { - currentRow++; - return currentRow < resultSet.size(); - } - - public int getIndex(String columnName) { - if (columnNames.contains(columnName)) { - return columnNames.indexOf(columnName); - } - return -1; - } - - public Object getValue(String columnName) { - int index = getIndex(columnName); - if (index != -1) { - return getValue(index); - } - return null; - } - -} diff --git a/sandbox/tmql4ontopia/src/main/java/net/ontopia/topicmaps/query/tmql/impl/basic/TMQLQueryProcessorFactory.java b/sandbox/tmql4ontopia/src/main/java/net/ontopia/topicmaps/query/tmql/impl/basic/TMQLQueryProcessorFactory.java deleted file mode 100644 index 162905176..000000000 --- a/sandbox/tmql4ontopia/src/main/java/net/ontopia/topicmaps/query/tmql/impl/basic/TMQLQueryProcessorFactory.java +++ /dev/null @@ -1,41 +0,0 @@ -/** - * TMQL4J Plugin for Ontopia - * - * Copyright: Copyright 2009 Topic Maps Lab, University of Leipzig. http://www.topicmapslab.de/ - * License: Apache License, Version 2.0 http://www.apache.org/licenses/LICENSE-2.0.html - * - * Author: Sven Krosse - * - */ -package net.ontopia.topicmaps.query.tmql.impl.basic; - -import java.util.Map; - -import net.ontopia.infoset.core.LocatorIF; -import net.ontopia.topicmaps.core.TopicMapIF; -import net.ontopia.topicmaps.query.core.QueryProcessorFactoryIF; -import net.ontopia.topicmaps.query.core.QueryProcessorIF; -import net.ontopia.utils.OntopiaException; - -/** - * PUBLIC: QueryProcessorFactory implementation for the TMQL query language. - */ -public class TMQLQueryProcessorFactory implements QueryProcessorFactoryIF { - - private final static String NAME = "TMQL"; - - public QueryProcessorIF createQueryProcessor(TopicMapIF arg0, - LocatorIF arg1, Map arg2) { - try { - return new TMQL4JQueryProcessor(arg0); - } catch (OntopiaException e) { - e.printStackTrace(); - } - return null; - } - - public String getQueryLanguage() { - return NAME; - } - -} diff --git a/sandbox/tmql4ontopia/src/main/java/net/ontopia/topicmaps/query/tmql/impl/tmql4jextension/OntopiaParserProcessingTaskChain.java b/sandbox/tmql4ontopia/src/main/java/net/ontopia/topicmaps/query/tmql/impl/tmql4jextension/OntopiaParserProcessingTaskChain.java deleted file mode 100644 index 529b03a88..000000000 --- a/sandbox/tmql4ontopia/src/main/java/net/ontopia/topicmaps/query/tmql/impl/tmql4jextension/OntopiaParserProcessingTaskChain.java +++ /dev/null @@ -1,117 +0,0 @@ -/** - * TMQL4J Plugin for Ontopia - * - * Copyright: Copyright 2009 Topic Maps Lab, University of Leipzig. http://www.topicmapslab.de/ - * License: Apache License, Version 2.0 http://www.apache.org/licenses/LICENSE-2.0.html - * - * Author: Sven Krosse - * - */ -package net.ontopia.topicmaps.query.tmql.impl.tmql4jextension; - -import de.topicmapslab.tmql4j.common.core.exception.TMQLRuntimeException; -import de.topicmapslab.tmql4j.common.core.process.TMQLRuntime; -import de.topicmapslab.tmql4j.common.model.process.IInitializationTask; -import de.topicmapslab.tmql4j.common.model.process.IProcessingTask; -import de.topicmapslab.tmql4j.common.model.process.IProcessingTaskChain; -import de.topicmapslab.tmql4j.common.model.query.IQuery; -import de.topicmapslab.tmql4j.lexer.base.LexerTask; -import de.topicmapslab.tmql4j.parser.base.ParsingTask; -import de.topicmapslab.tmql4j.parser.model.IParserTree; -import de.topicmapslab.tmql4j.preprocessing.base.CanonizerTask; -import de.topicmapslab.tmql4j.preprocessing.base.InitialisingTask; -import de.topicmapslab.tmql4j.preprocessing.base.ScreenerTask; -import de.topicmapslab.tmql4j.preprocessing.base.WhiteSpacerTask; - -public class OntopiaParserProcessingTaskChain implements IProcessingTaskChain { - - private final TMQLRuntime runtime; - private final IQuery query; - - public OntopiaParserProcessingTaskChain(final TMQLRuntime runtime, final IQuery query) { - this.runtime = runtime; - this.query = query; - } - - public void execute() throws TMQLRuntimeException { - IProcessingTask task = null; - /* - * Initialization - */ - task = new InitialisingTask(runtime.getTopicMapSystem(), runtime - .getTopicMaps()); - task.init(); - task.run(); - runtime.setInitialContext(((IInitializationTask) task) - .getInitialContext()); - - long t = System.currentTimeMillis(); - - /* - * Screener - */ - task = new ScreenerTask(query); - task.init(); - task.run(); - runtime.store(TMQLRuntime.TMQL_RUNTIME_QUERY_SCREENED, - ((ScreenerTask) task).getResult()); - - System.out.println(System.currentTimeMillis() - t); - t = System.currentTimeMillis(); - /* - * WhiteSpacer - */ - - task = new WhiteSpacerTask(((ScreenerTask) task).getResult()); - task.init(); - task.run(); - runtime.store(TMQLRuntime.TMQL_RUNTIME_QUERY_WHITESPACED, - ((WhiteSpacerTask) task).getResult()); - - /* - * Canonizer - */ - task = new CanonizerTask(((WhiteSpacerTask) task).getResult()); - task.init(); - task.run(); - runtime.store(TMQLRuntime.TMQL_RUNTIME_QUERY_CANONIZED, - ((CanonizerTask) task).getResult()); - - System.out.println(System.currentTimeMillis() - t); - t = System.currentTimeMillis(); - - runtime.getRuntimeContext().pushToStack( - runtime.getInitialContext().getPredefinedVariableSet() - .copyWithValues()); - - /* - * Lexer - */ - task = new LexerTask(((CanonizerTask) task).getResult()); - task.init(); - task.run(); - runtime.store(TMQLRuntime.TMQL_RUNTIME_LEXER_CHAIN, ((LexerTask) task) - .getResult().getChain()); - - System.out.println(System.currentTimeMillis() - t); - t = System.currentTimeMillis(); - - /* - * Parser - */ - task = new ParsingTask(((LexerTask) task).getResult(), runtime); - task.init(); - task.run(); - runtime.store(TMQLRuntime.TMQL_RUNTIME_PARSER_TREE, - ((ParsingTask) task).getResult().getParserTree()); - } - - public TMQLRuntime getTmqlRuntime() { - return runtime; - } - - public IParserTree getParserTree() { - return runtime.getParserTree(); - } - -} diff --git a/sandbox/tmql4ontopia/src/main/java/net/ontopia/topicmaps/query/tmql/impl/tmql4jextension/OntopiaResult.java b/sandbox/tmql4ontopia/src/main/java/net/ontopia/topicmaps/query/tmql/impl/tmql4jextension/OntopiaResult.java deleted file mode 100644 index 310c8e9e9..000000000 --- a/sandbox/tmql4ontopia/src/main/java/net/ontopia/topicmaps/query/tmql/impl/tmql4jextension/OntopiaResult.java +++ /dev/null @@ -1,156 +0,0 @@ -package net.ontopia.topicmaps.query.tmql.impl.tmql4jextension; - -import java.util.Arrays; -import java.util.Collection; -import java.util.Iterator; -import java.util.LinkedList; -import java.util.List; - -import org.tmapi.core.Association; -import org.tmapi.core.Locator; -import org.tmapi.core.Name; -import org.tmapi.core.Occurrence; -import org.tmapi.core.Role; -import org.tmapi.core.Topic; -import org.tmapi.core.Variant; - -import de.topicmapslab.tmql4j.resultprocessing.model.IResult; - -public class OntopiaResult implements IResult { - - private final List results; - private final List ontopiaStringRepresentations; - - public OntopiaResult() { - this.results = new LinkedList(); - this.ontopiaStringRepresentations = new LinkedList(); - } - - public OntopiaResult(Collection results) { - this.results = new LinkedList(); - this.ontopiaStringRepresentations = new LinkedList(); - this.results.addAll(results); - for (Object o : results) { - this.ontopiaStringRepresentations.add(tmapiObjectToString(o)); - } - } - - public OntopiaResult(Object... results) { - this.results = Arrays.asList(results); - this.ontopiaStringRepresentations = new LinkedList(); - for (Object o : results) { - this.ontopiaStringRepresentations.add(tmapiObjectToString(o)); - } - } - - public Object first() { - return ontopiaStringRepresentations.iterator().next(); - // return results.iterator().next(); - } - - public Object last() { - return ontopiaStringRepresentations.get(ontopiaStringRepresentations - .size() - 1); - // return results.get(results.size() - 1); - } - - public Iterator iterator() { - return ontopiaStringRepresentations.iterator(); - // return results.iterator(); - } - - public void add(Object... values) { - results.addAll(Arrays.asList(values)); - for (Object o : values) { - this.ontopiaStringRepresentations.add(tmapiObjectToString(o)); - } - } - - public String toString() { - StringBuilder builder = new StringBuilder(); - builder.append("["); - Iterator iterator = iterator(); - while (iterator.hasNext()) { - builder.append(iterator.next().toString() - + (iterator.hasNext() ? ", " : "")); - } - builder.append("]"); - return builder.toString(); - } - - public int size() { - return this.results.size(); - } - - public Object[] getValues() { - return ontopiaStringRepresentations.toArray(); - // return results.toArray(); - } - - public Object[] getValues(Integer... indizes) { - List values = new LinkedList(); - for (Integer index : indizes) { - if (index < size()) { - // values.add(results.get(index)); - values.add(ontopiaStringRepresentations.get(index)); - } - } - return values.toArray(); - } - - public Object getValue(Integer index) { - if (index < size()) { - return ontopiaStringRepresentations.get(index); - // return results.get(index); - } - return null; - } - - private String tmapiObjectToString(Object object) { - if (object instanceof Topic) { - Topic topic = (Topic) object; - if (!topic.getItemIdentifiers().isEmpty()) { - return topic.getItemIdentifiers().iterator().next() - .getReference(); - } else if (!topic.getSubjectIdentifiers().isEmpty()) { - return topic.getSubjectIdentifiers().iterator().next() - .getReference(); - } else if (!topic.getSubjectLocators().isEmpty()) { - return topic.getSubjectLocators().iterator().next() - .getReference(); - } - } else if (object instanceof Association) { - Association association = (Association) object; - if (!association.getItemIdentifiers().isEmpty()) { - return association.getItemIdentifiers().iterator().next() - .getReference(); - } - } else if (object instanceof Name) { - return ((Name) object).getValue(); - } else if (object instanceof Variant) { - return ((Variant) object).getValue(); - } else if (object instanceof Occurrence) { - return ((Occurrence) object).getValue(); - } else if (object instanceof Role) { - Role role = (Role) object; - return tmapiObjectToString(role.getType()); - } else if (object instanceof Locator) { - return ((Locator) object).getReference(); - } - return "FAILED: " + object.toString(); - } - - public boolean canReduceTo2Dimensions() { - return false; - } - - public List getResults() { - return results; - } - - public Collection> reduceTo2Dimensions() - throws UnsupportedOperationException { - throw new UnsupportedOperationException(); - } - -} diff --git a/sandbox/tmql4ontopia/src/main/java/net/ontopia/topicmaps/query/tmql/impl/tmql4jextension/OntopiaResultSet.java b/sandbox/tmql4ontopia/src/main/java/net/ontopia/topicmaps/query/tmql/impl/tmql4jextension/OntopiaResultSet.java deleted file mode 100644 index 9d4b9a3ca..000000000 --- a/sandbox/tmql4ontopia/src/main/java/net/ontopia/topicmaps/query/tmql/impl/tmql4jextension/OntopiaResultSet.java +++ /dev/null @@ -1,115 +0,0 @@ -/** - * TMQL4J Plugin for Ontopia - * - * Copyright: Copyright 2009 Topic Maps Lab, University of Leipzig. http://www.topicmapslab.de/ - * License: Apache License, Version 2.0 http://www.apache.org/licenses/LICENSE-2.0.html - * - * Author: Sven Krosse - * - */ -package net.ontopia.topicmaps.query.tmql.impl.tmql4jextension; - -import java.util.Arrays; -import java.util.Collection; -import java.util.Iterator; -import java.util.LinkedList; -import java.util.List; - -import de.topicmapslab.tmql4j.resultprocessing.model.IResult; -import de.topicmapslab.tmql4j.resultprocessing.model.IResultSet; - -public class OntopiaResultSet implements IResultSet { - - private final List results; - - public OntopiaResultSet() { - results = new LinkedList(); - } - - public OntopiaResultSet(Collection results) { - this.results = new LinkedList(); - this.results.addAll(results); - } - - public OntopiaResultSet(IResult... results) { - this.results = Arrays.asList(results); - } - - public void addResult(IResult result) { - this.results.add(result); - } - - public IResult first() { - return this.results.iterator().next(); - } - - public IResult last() { - return this.results.get(this.results.size() - 1); - } - - public Iterator iterator() { - return this.results.iterator(); - } - - public int size() { - return this.results.size(); - } - - public Class getResultClass() { - return OntopiaResult.class; - } - - public String toString() { - StringBuilder builder = new StringBuilder(); - builder.append("{\r\n"); - Iterator iterator = iterator(); - while (iterator.hasNext()) { - builder.append(iterator.next().toString() - + (iterator.hasNext() ? "," : "") + "\r\n"); - } - builder.append("}"); - return builder.toString(); - } - - public OntopiaResult[] getValues() { - return results.toArray(new OntopiaResult[0]); - } - - public OntopiaResult[] getValues(Integer... indizes) { - List values = new LinkedList(); - for (Integer index : indizes) { - if (index < size()) { - values.add(results.get(index)); - } - } - return values.toArray(new OntopiaResult[0]); - } - - public OntopiaResult getValue(Integer index) { - if (index < size()) { - return (OntopiaResult) results.get(index); - } - return null; - } - - public void addResults(Collection results) { - for ( IResult result : results){ - addResult(result); - } - } - - public void addResults(IResult... results) { - for ( IResult result : results){ - addResult(result); - } - } - - public boolean canReduceTo2Dimensions() { - return false; - } - - public void reduceTo2Dimensions() throws UnsupportedOperationException { - throw new UnsupportedOperationException(); - } - -} diff --git a/sandbox/tmql4ontopia/src/main/java/net/ontopia/topicmaps/query/tmql/impl/tmql4jextension/WrappedOntopiaResult.java b/sandbox/tmql4ontopia/src/main/java/net/ontopia/topicmaps/query/tmql/impl/tmql4jextension/WrappedOntopiaResult.java deleted file mode 100644 index 6bca9557a..000000000 --- a/sandbox/tmql4ontopia/src/main/java/net/ontopia/topicmaps/query/tmql/impl/tmql4jextension/WrappedOntopiaResult.java +++ /dev/null @@ -1,127 +0,0 @@ -/** - * TMQL4J Plugin for Ontopia - * - * Copyright: Copyright 2009 Topic Maps Lab, University of Leipzig. http://www.topicmapslab.de/ - * License: Apache License, Version 2.0 http://www.apache.org/licenses/LICENSE-2.0.html - * - * Author: Sven Krosse - * - */ -package net.ontopia.topicmaps.query.tmql.impl.tmql4jextension; - -import java.util.Collection; -import java.util.Iterator; -import java.util.LinkedList; -import java.util.List; - -import net.ontopia.topicmaps.core.OccurrenceIF; -import net.ontopia.topicmaps.impl.tmapi2.OntopiaToTMAPIWrapper; - -import org.tmapi.core.Construct; -import org.tmapi.core.Locator; - -import de.topicmapslab.tmql4j.common.model.tuplesequence.ITupleSequence; -import de.topicmapslab.tmql4j.resultprocessing.model.IResult; - -public class WrappedOntopiaResult implements IResult { - - private final List results; - - public WrappedOntopiaResult() { - this.results = new LinkedList(); - } - - public WrappedOntopiaResult(Collection results) { - this.results = new LinkedList(); - add(results); - } - - public WrappedOntopiaResult(Object... results) { - this.results = new LinkedList(); - add(results); - } - - public void add(Object... values) { - for (Object o : values) { - if (o instanceof ITupleSequence) { - this.results.add(OntopiaToTMAPIWrapper - .toTMObjectIF((ITupleSequence) o)); - } else if (o instanceof Construct) { - Object obj = OntopiaToTMAPIWrapper.toTMObjectIF(o); - if (obj instanceof OccurrenceIF) { - this.results.add(OntopiaToTMAPIWrapper - .toTMObjectIF((OccurrenceIF) obj)); - } else { - this.results.add(obj); - } - - } else if (o instanceof Locator) { - this.results.add(((Locator) o).toExternalForm()); - } else { - this.results.add(o); - } - } - } - - public Object first() { - return results.iterator().next(); - } - - public Object last() { - return results.get(results.size() - 1); - } - - public Iterator iterator() { - return results.iterator(); - } - - public String toString() { - StringBuilder builder = new StringBuilder(); - builder.append("["); - Iterator iterator = iterator(); - while (iterator.hasNext()) { - builder.append(iterator.next().toString() - + (iterator.hasNext() ? ", " : "")); - } - builder.append("]"); - return builder.toString(); - } - - public int size() { - return this.results.size(); - } - - public Object[] getValues() { - return results.toArray(); - } - - public Object[] getValues(Integer... indizes) { - List values = new LinkedList(); - for (Integer index : indizes) { - if (index < size()) { - values.add(results.get(index)); - } - } - return values.toArray(); - } - - public Object getValue(Integer index) { - if (index < size()) { - return results.get(index); - } - return null; - } - - public boolean canReduceTo2Dimensions() { - return false; - } - - public List getResults() { - return results; - } - - public Collection> reduceTo2Dimensions() - throws UnsupportedOperationException { - throw new UnsupportedOperationException(); - } -} diff --git a/sandbox/tmql4ontopia/src/main/java/net/ontopia/topicmaps/query/tmql/impl/tmql4jextension/WrappedOntopiaResultSet.java b/sandbox/tmql4ontopia/src/main/java/net/ontopia/topicmaps/query/tmql/impl/tmql4jextension/WrappedOntopiaResultSet.java deleted file mode 100644 index 2f8f081b8..000000000 --- a/sandbox/tmql4ontopia/src/main/java/net/ontopia/topicmaps/query/tmql/impl/tmql4jextension/WrappedOntopiaResultSet.java +++ /dev/null @@ -1,116 +0,0 @@ -/** - * TMQL4J Plugin for Ontopia - * - * Copyright: Copyright 2009 Topic Maps Lab, University of Leipzig. http://www.topicmapslab.de/ - * License: Apache License, Version 2.0 http://www.apache.org/licenses/LICENSE-2.0.html - * - * Author: Sven Krosse - * - */ -package net.ontopia.topicmaps.query.tmql.impl.tmql4jextension; - -import java.util.Arrays; -import java.util.Collection; -import java.util.Iterator; -import java.util.LinkedList; -import java.util.List; - -import de.topicmapslab.tmql4j.resultprocessing.model.IResult; -import de.topicmapslab.tmql4j.resultprocessing.model.IResultSet; - -public class WrappedOntopiaResultSet implements IResultSet { - - private final List results; - - public WrappedOntopiaResultSet() { - results = new LinkedList(); - } - - public WrappedOntopiaResultSet(Collection results) { - this.results = new LinkedList(); - this.results.addAll(results); - } - - public WrappedOntopiaResultSet(IResult... results) { - this.results = new LinkedList(); - this.results.addAll(Arrays.asList(results)); - } - - public void addResult(IResult result) { - this.results.add(result); - } - - public IResult first() { - return this.results.iterator().next(); - } - - public IResult last() { - return this.results.get(this.results.size() - 1); - } - - public Iterator iterator() { - return this.results.iterator(); - } - - public int size() { - return this.results.size(); - } - - public Class getResultClass() { - return WrappedOntopiaResult.class; - } - - public String toString() { - StringBuilder builder = new StringBuilder(); - builder.append("{\r\n"); - Iterator iterator = iterator(); - while (iterator.hasNext()) { - builder.append(iterator.next().toString() - + (iterator.hasNext() ? "," : "") + "\r\n"); - } - builder.append("}"); - return builder.toString(); - } - - public WrappedOntopiaResult[] getValues() { - return results.toArray(new WrappedOntopiaResult[0]); - } - - public WrappedOntopiaResult[] getValues(Integer... indizes) { - List values = new LinkedList(); - for (Integer index : indizes) { - if (index < size()) { - values.add(results.get(index)); - } - } - return values.toArray(new WrappedOntopiaResult[0]); - } - - public WrappedOntopiaResult getValue(Integer index) { - if (index < size() && index != -1 ) { - return (WrappedOntopiaResult) results.get(index); - } - return null; - } - - public void addResults(Collection results) { - for ( IResult result : results){ - addResult(result); - } - } - - public void addResults(IResult... results) { - for ( IResult result : results){ - addResult(result); - } - } - - public boolean canReduceTo2Dimensions() { - return false; - } - - public void reduceTo2Dimensions() throws UnsupportedOperationException { - throw new UnsupportedOperationException(); - } - -} diff --git a/sandbox/tmql4ontopia/src/main/java/net/ontopia/topicmaps/query/tmql/impl/util/ColumnHeaderGenerator.java b/sandbox/tmql4ontopia/src/main/java/net/ontopia/topicmaps/query/tmql/impl/util/ColumnHeaderGenerator.java deleted file mode 100644 index a6896ae8a..000000000 --- a/sandbox/tmql4ontopia/src/main/java/net/ontopia/topicmaps/query/tmql/impl/util/ColumnHeaderGenerator.java +++ /dev/null @@ -1,200 +0,0 @@ -/** - * TMQL4J Plugin for Ontopia - * - * Copyright: Copyright 2009 Topic Maps Lab, University of Leipzig. http://www.topicmapslab.de/ - * License: Apache License, Version 2.0 http://www.apache.org/licenses/LICENSE-2.0.html - * - * Author: Sven Krosse - * - */ -package net.ontopia.topicmaps.query.tmql.impl.util; - -import java.util.LinkedList; -import java.util.List; - -import net.ontopia.topicmaps.query.tmql.impl.tmql4jextension.WrappedOntopiaResult; -import net.ontopia.topicmaps.query.tmql.impl.tmql4jextension.WrappedOntopiaResultSet; -import de.topicmapslab.tmql4j.common.core.exception.TMQLRuntimeException; -import de.topicmapslab.tmql4j.common.core.process.TMQLRuntime; -import de.topicmapslab.tmql4j.parser.core.expressions.Content; -import de.topicmapslab.tmql4j.parser.core.expressions.FlwrExpression; -import de.topicmapslab.tmql4j.parser.core.expressions.PathExpression; -import de.topicmapslab.tmql4j.parser.core.expressions.Postfix; -import de.topicmapslab.tmql4j.parser.core.expressions.PostfixedExpression; -import de.topicmapslab.tmql4j.parser.core.expressions.PredicateInvocation; -import de.topicmapslab.tmql4j.parser.core.expressions.ProjectionPostfix; -import de.topicmapslab.tmql4j.parser.core.expressions.QueryExpression; -import de.topicmapslab.tmql4j.parser.core.expressions.ReturnClause; -import de.topicmapslab.tmql4j.parser.core.expressions.SelectClause; -import de.topicmapslab.tmql4j.parser.core.expressions.SelectExpression; -import de.topicmapslab.tmql4j.parser.core.expressions.SimpleContent; -import de.topicmapslab.tmql4j.parser.core.expressions.TupleExpression; -import de.topicmapslab.tmql4j.parser.model.IExpression; -import de.topicmapslab.tmql4j.parser.model.IParserTree; - -public class ColumnHeaderGenerator { - - private ColumnHeaderGenerator() { - - } - - public static final List columnHeaders(TMQLRuntime runtime) - throws TMQLRuntimeException { - IParserTree tree = (IParserTree) runtime - .getStoredValue(TMQLRuntime.TMQL_RUNTIME_PARSER_TREE); - IExpression query = tree.root(); - return columnHeaders(runtime, query); - } - - private static final List columnHeaders(TMQLRuntime runtime, - IExpression query) throws TMQLRuntimeException { - List selectExpressions = query - .subExpressionsByType(SelectExpression.class); - if (!selectExpressions.isEmpty()) { - return columnHeadersOfSelectExpression(runtime, selectExpressions - .get(0)); - } else { - List flwrExpressions = query - .subExpressionsByType(FlwrExpression.class); - if (!flwrExpressions.isEmpty()) { - return columnHeadersOfFlwrExpression(runtime, flwrExpressions - .get(0)); - } else { - List expressions = query - .subExpressionsByType(PathExpression.class); - if (!expressions.isEmpty()) { - return columnHeadersOfPathExpression(runtime, expressions - .get(0)); - } else { - throw new TMQLRuntimeException( - "Invalid parser-tree structure."); - } - - } - } - } - - private static final List columnHeadersOfSelectExpression( - TMQLRuntime runtime, IExpression expression) - throws TMQLRuntimeException { - List headers = new LinkedList(); - for (IExpression ex : expression.subExpressionsByType( - SelectClause.class).get(0).subExpressions()) { - headers.add(expressionToString(ex)); - } - return headers.isEmpty() ? defaultColumnHeaders(runtime) : headers; - } - - private static final List columnHeadersOfFlwrExpression( - TMQLRuntime runtime, IExpression expression) - throws TMQLRuntimeException { - List headers = new LinkedList(); - IExpression returnClause = expression.subExpressionsByType( - ReturnClause.class).get(0); - IExpression contentClause = returnClause.subExpressionsByType( - Content.class).get(0); - if (contentClause.subExpressionsByType(QueryExpression.class).isEmpty()) { - headers.add(expressionToString(contentClause)); - } else { - headers.addAll(columnHeaders(runtime, contentClause - .subExpressionsByType(QueryExpression.class).get(0))); - } - - return headers.isEmpty() ? defaultColumnHeaders(runtime) : headers; - } - - private static final List columnHeadersOfPathExpression( - TMQLRuntime runtime, IExpression expression) - throws TMQLRuntimeException { - List headers = new LinkedList(); - IExpression path = expression; - - if (!path.subExpressionsByType(PredicateInvocation.class).isEmpty()) { - headers.add(expressionToString(path)); - } else { - IExpression postfixedExpression = path.subExpressionsByType( - PostfixedExpression.class).get(0); - /* - * tuple-expression | simple-content {postfix} - */ - List filters = new LinkedList(); - if (!postfixedExpression.subExpressionsByType(Postfix.class) - .isEmpty()) { - IExpression postfix = postfixedExpression.subExpressionsByType( - Postfix.class).get(0); - if (postfix.getType() == 1) { - IExpression tupleExpression = postfix.subExpressionsByType( - ProjectionPostfix.class).get(0) - .subExpressionsByType(TupleExpression.class).get(0); - for (IExpression valueExpression : tupleExpression - .subExpressions()) { - filters.add("(" + expressionToString(valueExpression) - + ")"); - } - } else { - filters.add(expressionToString(postfix)); - } - } - /* - * tuple-expression - */ - if (postfixedExpression.getType() == 0) { - IExpression tupleExpression = postfixedExpression - .subExpressionsByType(TupleExpression.class).get(0); - for (IExpression valueExpression : tupleExpression - .subExpressions()) { - String prefix = expressionToString(valueExpression); - if (filters.isEmpty()) { - headers.add(prefix); - } else { - for (String filter : filters) { - headers.add(prefix + filter); - } - } - } - } - /* - * simple-content - */ - else { - String prefix = expressionToString(postfixedExpression - .subExpressionsByType(SimpleContent.class).get(0)); - if (filters.isEmpty()) { - headers.add(prefix); - } else { - for (String filter : filters) { - headers.add(prefix + filter); - } - } - - } - } - return headers.isEmpty() ? defaultColumnHeaders(runtime) : headers; - } - - private static final List defaultColumnHeaders(TMQLRuntime runtime) - throws TMQLRuntimeException { - List headers = new LinkedList(); - WrappedOntopiaResultSet resultSet = (WrappedOntopiaResultSet) runtime - .getStoredValue(TMQLRuntime.TMQL_RUNTIME_RESULTPROCESSING_RESULT); - if (resultSet != null) { - long size = 0; - if (resultSet.size() > 0) { - size = ((WrappedOntopiaResult) resultSet.first()).size(); - } - for (int index = 0; index < size; index++) { - headers.add("Column " + index); - } - } - return headers; - } - - private static final String expressionToString(IExpression expression) { - StringBuilder builder = new StringBuilder(); - for (String token : expression.tokens()) { - builder.append(token + " "); - } - return builder.toString().trim(); - } - -} diff --git a/sandbox/tmql4ontopia/src/main/resources/META-INF/services/net.ontopia.topicmaps.query.core.QueryProcessorFactoryIF b/sandbox/tmql4ontopia/src/main/resources/META-INF/services/net.ontopia.topicmaps.query.core.QueryProcessorFactoryIF deleted file mode 100644 index cdfd3936a..000000000 --- a/sandbox/tmql4ontopia/src/main/resources/META-INF/services/net.ontopia.topicmaps.query.core.QueryProcessorFactoryIF +++ /dev/null @@ -1 +0,0 @@ -net.ontopia.topicmaps.query.tmql.impl.basic.TMQLQueryProcessorFactory \ No newline at end of file diff --git a/sandbox/tmql4ontopia/src/test/java/net/ontopia/topicmaps/query/tmql/impl/basic/TMQLQueryPluginTest.java b/sandbox/tmql4ontopia/src/test/java/net/ontopia/topicmaps/query/tmql/impl/basic/TMQLQueryPluginTest.java deleted file mode 100644 index f7f0e3da9..000000000 --- a/sandbox/tmql4ontopia/src/test/java/net/ontopia/topicmaps/query/tmql/impl/basic/TMQLQueryPluginTest.java +++ /dev/null @@ -1,42 +0,0 @@ -/** - * TMQL4J Plugin for Ontopia - * - * Copyright: Copyright 2009 Topic Maps Lab, University of Leipzig. http://www.topicmapslab.de/ - * License: Apache License, Version 2.0 http://www.apache.org/licenses/LICENSE-2.0.html - * - * Author: Sven Krosse - * - */ -package net.ontopia.topicmaps.query.tmql.impl.basic; - -import java.io.File; - -import junit.framework.TestCase; -import net.ontopia.topicmaps.core.TopicMapIF; -import net.ontopia.topicmaps.query.core.QueryResultIF; -import net.ontopia.topicmaps.query.utils.QueryUtils; -import net.ontopia.topicmaps.utils.ltm.LTMTopicMapReader; - -import org.tmapi.core.TopicMapSystem; -import org.tmapi.core.TopicMapSystemFactory; - -public class TMQLQueryPluginTest extends TestCase { - - public void testStringTreeFunction() throws Exception { - - System.out.println(QueryUtils.getAvailableQueryLanguages()); - - LTMTopicMapReader reader = new LTMTopicMapReader(new File( - "src/test/resources/ItalianOpera.ltm")); - TopicMapIF tm = reader.read(); - - TMQL4JQueryProcessor processor = new TMQL4JQueryProcessor(tm); - - QueryResultIF result = processor - .execute("FOR $variable IN // http://psi.ontopedia.net/Composer RETURN $variable ( . / tm:name , . / tm:occurrence )"); - - System.out.println(result.getValues()); - - } - -} diff --git a/sandbox/tmql4ontopia/src/test/resources/ItalianOpera.ltm b/sandbox/tmql4ontopia/src/test/resources/ItalianOpera.ltm deleted file mode 100644 index 4495a137e..000000000 --- a/sandbox/tmql4ontopia/src/test/resources/ItalianOpera.ltm +++ /dev/null @@ -1 +0,0 @@ -@"iso-8859-1" #VERSION "1.3" /* The Italian Opera Topic Map (c) 1999-2009 Steve Pepper, This topic map may be freely distributed and used for any purpose, commercial or non-commercial, provided that it is not modified in any way and that this copyright notice is left intact. $Id: opera.ltm,v 2.1 2009/08/26 12:16:15 pepper Exp $ TODO: - clean up usage of PSIs (and create PSDs) - complete appears-in, killed-by, contains-aria Some 404s http://home.prcn.org/~pauld/opera/ http://php.indiana.edu/~lneff/ http://www.landofpuccini.com http://www.opera.it/Operaweb/en/home.html http://www.r-ds.com/opera/resource.htm http://www.teatroallascala.org http://www.teatroquirino.it http://www.turandot-agentur.de/turandot.htm http://www.turandotonsite.com/ */ /* ----------------- TOPIC MAP ----------------- */ #TOPICMAP ~ operatm [operatm = "Italian Opera Topic Map" = "Opera TM" / short-name] {operatm, date, [[$Date: 2009/08/23 12:16:15 $]]} {operatm, descr, [[This topic map was originally written to help me understand various aspects of the Topic Maps standard, and to be able to experiment with different modeling approaches. Latterly it has served as a test bed for Ontopia's topic map engine and other components of the Ontopia Knowledge Suite, and therefore contains a few unusual constructs. As of July 2006 it is maintained in LTM syntax. An XTM version can be generated using the Export plug-in of the Omnigator. Version 2.0 represents a major overhaul of the ontology and alignment of identifiers with the Norwegian Opera topic map.]]} {operatm, revision, [[$Revision: 2.1a $]]} {operatm, Rights, [[Copyright (c) 1999-2009, Steve Pepper. This topic map may be freely distributed and used for any purpose, commercial or non-commercial, provided that it is not modified in any way and that this copyright notice is left intact.]]} Creator( operatm : resource, pepper : value ) Format( operatm : resource, LTM : value ) Language( operatm : resource, english : value ) Publisher( operatm : resource, ontopia : value ) Subject( operatm : resource, italy : value ) Subject( operatm : resource, opera : value ) Subject( operatm : resource, verismo : value ) Type( operatm : resource, topicmap : value ) [ontopia = "Ontopia" @"http://psi.ontopedia.net/Ontopia"] [pepper = "Steve Pepper" @"http://psi.ontopedia.net/Pepper"] /* ----------------- ONTOLOGY ------------------ */ /* ----------------- Dublin Core --------------- */ /* -- AT: (DC elements) -- */ [Contributor = "Contributor" = "Bidragsyter" / norwegian @"http://purl.org/dc/elements/1.1/contributor"] [Creator = "Creator" = "Skaper" / norwegian @"http://purl.org/dc/elements/1.1/creator"] [Format = "Format" @"http://purl.org/dc/elements/1.1/format"] [Language = "Language" @"http://purl.org/dc/elements/1.1/language"] [Publisher = "Publisher" = "Utgiver" / norwegian @"http://purl.org/dc/elements/1.1/publisher"] [Subject = "Subject(s)" = "Tema(er)" / norwegian = "Tema for" / norwegian value = "Subject of" / value @"http://purl.org/dc/elements/1.1/subject"] [Type = "Type" @"http://purl.org/dc/elements/1.1/type"] /* -- RT: (DC elements) -- */ [resource = "Resource" = "Ressurs" / norwegian @"http://psi.topicmaps.org/iso29111/resource"] [value = "Value" = "Verdi" / norwegian @"http://psi.topicmaps.org/iso29111/value"] /* -- OT: (DC elements) -- */ [Coverage = "Coverage" = "Dekning" / norwegian @"http://purl.org/dc/elements/1.1/coverage"] [date = "Date" = "Dato" / norwegian @"http://purl.org/dc/elements/1.1/date"] [descr = "Description" = "Beskrivelse" / norwegian @"http://purl.org/dc/elements/1.1/description"] [Identifier = "Identifier" = "Identifikator" / norwegian @"http://purl.org/dc/elements/1.1/identifier"] [Relation = "Relation" = "Relasjon" / norwegian @"http://purl.org/dc/elements/1.1/relation"] [Rights = "Rights" = "Rettigheter" / norwegian @"http://purl.org/dc/elements/1.1/rights"] [Source = "Source" = "Kilde" / norwegian @"http://purl.org/dc/elements/1.1/source"] [Title = "Title" = "Tittel" / norwegian @"http://purl.org/dc/elements/1.1/title"] /* -- TT: Format -- */ [HyTM : Format = "HyTM" @"http://psi.ontopedia.net/HyTM"] [LTM : Format = "LTM" @"http://psi.ontopedia.net/LTM"] [XTM : Format = "XTM" @"http://psi.ontopedia.net/XTM"] /* -- TT: Type -- */ [topicmap : Type = "Topic Map" = "Emnekart" / norwegian @"http://psi.ontopedia.net/Topic_map"] /* ----------------- Topic Types --------------- */ /* -- TT: artform -- */ [aria : artform = "Aria" @"http://psi.ontopedia.net/Aria"] [ballet : artform = "Ballet" = "Ballett" / norwegian @"http://psi.ontopedia.net/Ballet"] [chorus : artform = "Chorus" @"http://psi.ontopedia.net/Chorus"] [dictionary : artform = "Dictionary" = "Leksikon" / norwegian @"http://psi.ontopedia.net/Dictionary"] [fairy-tale = "Fairy tale" = "Eventyr" / norwegian @"http://psi.ontopedia.net/Fairy_tale"] [novel : artform = "Novel" = "Roman" / norwegian @"http://psi.ontopedia.net/Novel"] [novella : artform = "Novella" @"http://psi.ontopedia.net/Novella"] [opera : artform = "Opera" = "Ooppera" / finnish @"http://psi.ontopedia.net/Opera"] {opera, bibref, [[Batta, András: "Opera: Composers, Works, Performers", Könemann (Cologne, 1999)]]} {opera, bibref, [[Bourne, Joyce: "Who's Who in Opera: A Guide to Opera Characters", Oxford University Press (Oxford, 1998)]]} {opera, bibref, [[Boyden, Matthew: "Opera: The Rough Guide", Rough Guides (London, 1999)]]} {opera, bibref, [[Freeman, John W.: "Stories of the Great Operas", Norton (New York, 1984)]]} {opera, bibref, [[Holden, Amanda (ed): "The New Penguin Opera Guide", Penguin (London, 2002)]]} {opera, bibref, [[Keolker, James: "Last Acts : The Operas of Puccini and his Italian Contemporaries", Opera Companion Publications (Napa, 2000)]]} {opera, bibref, [[Mallach, Alan: "The Autumn of Italian Opera: From Verismo to Modernism, 1890-1915", Northeastern University Press (Boston, 2007)]]} {opera, bibref, [[Mallach, Alan: "Pietro Mascagni and His Operas", Northeastern University Press (Boston, 2002)]]} {opera, bibref, [[Osborne, Charles: "The Complete Operas of Verdi: A Critical Guide", Gollancz (London, 1969)]]} {opera, bibref, [[Pogue, David and Scott Speck: "Opera for Dummies", IDG Books (Foster City, 1997)]]} {opera, bibref, [[Rosenthal, Harold and John Warrack: "The Concise Oxford Dictionary of Opera", Oxford University Press (Oxford, 1980)]]} {opera, bibref, [[Sadie, Stanley (ed): "The New Grove Book of Operas", Macmillan (London, 1996)]]} {opera, bibref, [[Sadie, Stanley (ed): "The New Grove Dictionary of Operas", OUP (Oxford, 2004)]]} {opera, scope-note, "http://localhost:8080/operamap/occurs/opera.htm"} / local {opera, scope-note, "http://www.ontopia.net/topicmaps/examples/opera/occurs/opera.htm"} / web {opera, webpage, "http://home.prcn.org/~pauld/opera/"} / web ~ pauld-website {opera, website, "http://opera.stanford.edu"} [play : artform = "Play" = "Skuespill" / norwegian @"http://psi.ontopedia.net/Play"] [poem : artform = "Poem" = "Dikt" / norwegian @"http://psi.ontopedia.net/Poem"] [triptych : artform = "Triptych" @"http://psi.ontopedia.net/Triptych"] /* -- TT: (untyped) -- */ [artform = "Art form" = "Kunstart" / norwegian @"http://psi.ontopedia.net/Artform"] [broadcasting-company = "Broadcasting company" = "Kringkastingselskap" / norwegian @"http://psi.ontopedia.net/Broadcasting_company"] [cause-of-death = "Cause of death" = "Dødsarsåk" / norwegian @"http://psi.ontopedia.net/Cause_of_death"] [character = "Character" = "Skikkelse" / norwegian @"http://psi.ontopedia.net/Character"] [city = "City" ("Cities" / plural) = "MÄ›sto"; "Mesto" / czech = "Ville" / french = "Stadt" / german = "Città"; "Citta" / italian = "By" / norwegian @"http://psi.ontopedia.net/City"] [codetype = "Code type" = "Kodetype" / norwegian @"http://psi.ontopedia.net/Code_type"] [composer = "Composer" = "Skladatel" / czech = "Komponist" / dutch = "Kompositör" / swedish = "Komponist" / german = "Komponist" / norwegian = "Säveltäjä" / finnish = "Compositeur" / french = "ZeneszerzÅ‘" / hungarian = "Tónskáld" / icelandic = "Compositore" / italian = "作曲家" / japanese = "작곡가" / korean = "Kompozytor" / polish = "КомпозиÑ‚оÑ€" / russian = "Cyfansoddwr" / welsh = "מחבד" / hebrew @"http://psi.ontopedia.net/Composer"] [conservatory = "Conservatory" = "Konservatorium" / norwegian @"http://psi.ontopedia.net/Conservatory"] [country = "Country" ("Countries" / plural) = "ZemÄ›"; "Zeme" / czech = "Pays" / french = "Land" / german norwegian = "Paese" / italian @"http://psi.ontopedia.net/Country"] [domain = "Subject domain" = "Emneområde" / norwegian @"http://psi.ontopedia.net/Domain"] [event = "Historical event" = "Historisk begivenhet" / norwegian @"http://psi.ontopedia.net/Event"] [hierarchical-relation-type = "Hierarchical relation type" = "Hierarkisk relasjonstype" / norwegian @"http://www.techquila.com/psi/hierarchy/#hierarchical-relation-type"] [language = "Language" = "Jazyk" / czech = "Kieli" / finnish = "Langue" / french = "Sprache" / german = "Lingua" / italian = "Språk" / norwegian @"http://psi.ontopedia.net/Language"] [librettist = "Librettist" @"http://psi.ontopedia.net/Librettist"] {librettist, descr, [[A person who has written one or more libretti for an opera.]]} {librettist, scope-note, [[Composers who have written their own libretti do not qualify unless they have written libretti for other composers (like Boito and Leoncavallo).]]} [metadata = "Metadata" @"http://psi.ontopedia.net/Metadata"] [musician = "Musician" = "Hudebník" / czech = "Musiker" / norwegian @"http://psi.ontopedia.net/Musician"] {musician, scope-note, [[Used in the Italian Opera topic map for people who were teachers of composers but are not themselves classified as composers.]]} [nameform = "Name form" = "Navneform" / norwegian @"http://psi.ontopedia.net/Name_form"] [nametype = "Name type" = "Navnetype" / norwegian @"http://psi.ontopedia.net/Name_type"] {nametype, descr, [[Used to type short-name, real-name, nom-de-plume, nom-de-guerre, former-name, original-name, altname - and thereby define an axis of scope.]]} [network-location = "Network location" @"http://psi.ontopedia.net/Network_location"] [place = "Place" = "Místo" / czech = "Sted" / norwegian @"http://psi.ontopedia.net/Place"] [playwright = "Playwright" = "Dramatik" / czech = "Dramatiker" / norwegian @"http://psi.ontopedia.net/Playwright"] [producer = "Producer" = "Produsent" / norwegian @"http://psi.ontopedia.net/Producer"] [publication = "Publication" = "Publikace" / czech = "Utgivelse" / norwegian @"http://psi.ontopedia.net/Publication"] [publisher = "Publisher" = "Nakladatel" / czech = "Utgiver" / norwegian @"http://psi.ontopedia.net/Publisher"] [region = "Region" @"http://psi.ontopedia.net/Region"] {region, descr, [[A large geographical area that is not a country or continent. It may be a part of a country (e.g. California, Crete), it may straddle more than one country (e.g. the Tyrol), or it may encompass multiple countries (e.g. South America).]]} [status = "Status" @"http://psi.ontopedia.net/Status"] [style = "Style" = "Stil" / norwegian @"http://psi.ontopedia.net/Style"] [subordinate-role-type = "Subordinate role type" @"http://www.techquila.com/psi/hierarchy/#subordinate-role-type"] [superordinate-role-type = "Superordinate role type" @"http://www.techquila.com/psi/hierarchy/#superordinate-role-type"] [theatre = "Theatre" = "Divadlo" / czech = "Teater" / norwegian @"http://psi.ontopedia.net/Theatre"] [voice-type = "Voice type" = "Stemmetype" / norwegian @"http://psi.ontopedia.net/Voice_type"] [work = "Work" = "Dílo" / czech = "Verk" / norwegian @"http://psi.ontopedia.net/Work"] [writer = "Writer" = "Pisatel" / czech = "Skribent" / norwegian @"http://psi.ontopedia.net/Writer"] /* ----------------- Type Hierarchy ------------ */ subtype-of( literary-work : supertype, dictionary : subtype ) subtype-of( literary-work : supertype, fairy-tale : subtype ) subtype-of( literary-work : supertype, novel : subtype ) subtype-of( literary-work : supertype, novella : subtype ) subtype-of( literary-work : supertype, play : subtype ) subtype-of( literary-work : supertype, poem : subtype ) subtype-of( musical-work : supertype, aria : subtype ) subtype-of( musical-work : supertype, ballet : subtype ) subtype-of( musical-work : supertype, opera : subtype ) subtype-of( musician : supertype, composer : subtype ) subtype-of( organization : supertype, publisher : subtype ) subtype-of( organization : supertype, theatre : subtype ) subtype-of( organization : supertype, broadcasting-company : subtype ) subtype-of( person : supertype, character : subtype ) subtype-of( person : supertype, musician : subtype ) subtype-of( person : supertype, producer : subtype ) subtype-of( person : supertype, pupil : subtype ) subtype-of( person : supertype, teacher : subtype ) subtype-of( person : supertype, writer : subtype ) subtype-of( place : supertype, city : subtype ) subtype-of( place : supertype, conservatory : subtype ) subtype-of( place : supertype, country : subtype ) subtype-of( place : supertype, region : subtype ) subtype-of( place : supertype, theatre : subtype ) subtype-of( theatrical-work : supertype, ballet : subtype ) subtype-of( theatrical-work : supertype, opera : subtype ) subtype-of( theatrical-work : supertype, play : subtype ) subtype-of( work : supertype, literary-work : subtype ) subtype-of( work : supertype, musical-work : subtype ) subtype-of( work : supertype, theatrical-work : subtype ) subtype-of( writer : supertype, librettist : subtype ) subtype-of( writer : supertype, playwright : subtype ) /* ----------------- Role Types ---------------- */ /* -- TT: subordinate-role-type -- */ [containee : subordinate-role-type = "Containee" @"http://psi.ontopedia.net/Containee"] [subtype : subordinate-role-type = "Subtype" @"http://www.topicmaps.org/xtm/1.0/core.xtm#subclass"] /* -- TT: superordinate-role-type -- */ [container : superordinate-role-type = "Container" @"http://psi.ontopedia.net/Container"] [supertype : superordinate-role-type = "Supertype" @"http://www.topicmaps.org/xtm/1.0/core.xtm#superclass"] /* -- TT: (untyped) -- */ [part = "Part" @"http://psi.ontopedia.net/Part"] [perpetrator = "Perpetrator" @"http://psi.ontopedia.net/Perpetrator"] [person = "Person" @"http://psi.ontopedia.net/Person"] [pupil = "Pupil" @"http://psi.ontopedia.net/Pupil"] [result = "Result" @"http://psi.ontopedia.net/Result"] [source = "Source" @"http://psi.ontopedia.net/Source"] [teacher = "Teacher" @"http://psi.ontopedia.net/Teacher"] [victim = "Victim" @"http://psi.ontopedia.net/Victim"] [whole = "Whole" @"http://psi.ontopedia.net/Whole"] /* ----------------- Association Types --------- */ /* -- TT: hierarchical-relation-type -- */ [located-in : hierarchical-relation-type = "Located in" = "Contains" / container @"http://psi.ontopedia.net/located_in"] [subtype-of : hierarchical-relation-type = "Subtype of" = "Supertype of" / supertype @"http://www.topicmaps.org/xtm/1.0/core.xtm#superclass-subclass"] /* -- TT: (untyped) -- */ [appears-in = "Appears in" = "Dramatis personae" / work @"http://psi.ontopedia.net/appears_in"] [based-on = "Based on" = "Source of" / source @"http://psi.ontopedia.net/based_on"] [born-in = "Born in" = "Birthplace of" / place @"http://psi.ontopedia.net/born_in"] [completed-by = "Completed by" = "Completed" / composer @"http://psi.ontopedia.net/completed_by"] [composed-by = "Composed by" = "Composed" / composer @"http://psi.ontopedia.net/composed_by"] [died-in = "Died in" = "Died here" / place @"http://psi.ontopedia.net/died_in"] [exponent-of = "Exponent of" = "Represented by" / style @"http://psi.ontopedia.net/exponent_of"] [has-voice = "Has voice type" @"http://psi.ontopedia.net/has_voice"] [killed-by = "Killed by" = "Kills (by)" / cause-of-death perpetrator @"http://psi.ontopedia.net/killed_by"] [part-of = "Contains" = "Part of" / part @"http://psi.ontopedia.net/part_of"] [premiere = "First performed at" = "Hosted première of" / place @"http://psi.ontopedia.net/premiere"] [published-by = "Published by" = "Publisher of" / publisher @"http://psi.ontopedia.net/published_by"] [pupil-of = "Teacher/pupil" = "Pupil of" / pupil = "Teacher of" / teacher @"http://psi.ontopedia.net/pupil_of"] {pupil-of, descr, [[A relationship between a pupil and his teacher. The Italian Opera Topic Map only includes teachers of composition.]]} [revision-of = "Revision of" = "Revised as" / source @"http://psi.ontopedia.net/revision_of"] [sung-by = "Sung by" = "Sings" / person @"http://psi.ontopedia.net/sung_by"] [takes-place-during = "Takes place during" = "Setting for" / event @"http://psi.ontopedia.net/takes_place_during"] [takes-place-in = "Takes place in" = "Setting for" / place @"http://psi.ontopedia.net/takes_place_in"] [unfinished = "Unfinished" @"http://psi.ontopedia.net/unfinished"] [libretto-by = "Libretto by" = "Wrote libretto for" / librettist @"http://psi.ontopedia.net/libretto_by"] [written-by = "Written by" = "Wrote" / writer @"http://psi.ontopedia.net/written_by"] /* ----------------- Occurrence Types ---------- */ /* -- TT: (untyped) -- */ [article = "Article" @"http://psi.ontopedia.net/article"] [audio-recording = "Audio recording"; "Recording (audio)" @"http://psi.ontopedia.net/audio_recording"] {audio-recording, descr, [[An audio recording]]} {audio-recording, scope-note, [[In the Italian Opera topic map this is modelled extremely simply as an occurrence whose value is the catalogue number of some recording in the author's collection.]]} [bibref = "Bibliography" @"http://psi.ontopedia.net/bibref"] [biographical-article = "Biographical article" @"http://psi.ontopedia.net/biographical_article"] [date-of-birth = "Date of birth" @"http://psi.ontopedia.net/date_of_birth"] [date-of-death = "Date of death" @"http://psi.ontopedia.net/date_of_death"] [gallery = "Gallery" ("Galleries" / plural) @"http://psi.ontopedia.net/gallery"] /* fixme: occurrences of type "illustration" should really be posters, portraits, etc. Change when OPERAMAP app is ready */ [illustration = "Illustration" @"http://psi.ontopedia.net/illustration"] [libretto = "Libretto" ("Libretti" / plural) @"http://psi.ontopedia.net/libretto"] [note = "Note" @"http://psi.ontopedia.net/note"] [poster = "Poster" @"http://psi.ontopedia.net/poster"] [premiere-date = "Première date" @"http://psi.ontopedia.net/premiere_date"] {premiere-date, scope-note, [[The date of the first performance of the opera. If the opera was first performed in multiple venues on the same date, use a single occurrence with multiple associations of type "First performed at". If the first performance was not staged (e.g. only broadcast, as in the case of Montemezzi's L'incantesimo), include both dates, but scope the later performance by the place at which the performance took place.]]} [scope-note = "Scope note" @"http://www.techquila.com/psi/thesaurus/#scope-note"] [sound-clip = "Sound clip" @"http://psi.ontopedia.net/sound_clip"] [synopsis = "Synopsis" ("Synopses" / plural) @"http://psi.ontopedia.net/synopsis"] [video-recording = "Video recording"; "Recording (video)" @"http://psi.ontopedia.net/video_recording"] {video-recording, descr, [[A video recording.]]} {video-recording, scope-note, [[In the Italian Opera topic map this is modelled extremely simply as an occurrence whose value is the catalogue number of some recording in the author's collection.]]} [webpage = "Web page" @"http://psi.ontopedia.net/webpage"] [website = "Web site" @"http://psi.ontopedia.net/website"] /* ----------------- INSTANCES ----------------- */ /* ----------------- Topics -------------------- */ /* -- TT: aria -- */ /* Arias on 466 952-2 1. Merc, dilette amiche (I vespri siciliani) 2. Tu che le vanit conoscesti ... Francia, nobile suol (Don Carlo) 3. Gualtier Mald! ... Caro nome (Rigoletto) 4. Qui Radams verr !... O patria mia (Aida) 5. Ch pi t'arresti? ... Tacea la notte placida ... Di tale amor (Il trovatore) 6. Morr, ma prima in grazia (Un ballo in maschera) 7. Come in quest'ora bruna (Simon Boccanegra) 8. Pace, Pace, mio Dio! (La forza del destino) 9. Era pi calmo? ... "Piangea cantando..." ...Ave Maria (Otello) */ [ah-il-suo-nome : aria = "Ah, il suo nome"] {ah-il-suo-nome, audio-recording, [[AT 34111]]} [ah-per-lultima-volta : aria = "Ah! Per l'ultima volta!"] [ahi-vergine-maria : aria = "Ahi, Vergine Maria"] {ahi-vergine-maria, audio-recording, [[AT 34111]]} [amor-ti-vieta : aria = "Amor ti vieta"] [apri-la-tua-finestra : aria = "Apri la tua finestra"] [aria-du-rossignol : aria = "Ascolta l'usignuolo!" = "Aria du rossignol" / french] {aria-du-rossignol, audio-recording, [[AT 34111]]} [bella-figlia-dell-amore : aria = "Bella figlia dell'amore"] [cera-una-volta-un-re : aria = "C'era una volta un re"] {cera-una-volta-un-re, audio-recording, [[AT 34111]]} [che-gelida-manina : aria = "Che gelida manina"] [cherry-duet : aria = "Duetto delle ciliege" = "The Cherry Duet"; "Cherry Duet" / english] [chi-il-bel-sogno : aria = "Chi il bel sogno di Doretta"] [cielo-e-mar : aria = "Cielo e mar!"] [come-due-tizzi-accesi : aria = "Come due tizzi accesi"] [come-un-bel-di-di-maggio : aria = "Come un bel dì di maggio"] [dindole-dolce : aria = "D'indole dolce"] {dindole-dolce, audio-recording, [[AT 34111]]} [dogni-dolor : aria = "D'ogni dolor"] [donna-non-vidi-mai : aria = "Donna non vidi mai"] [e-la-solita-storia-del-pastore : aria = "È la solita storia del pastore"; "E la solita storia del pastore" = "Anch'io vorrei dormir" / altname = "Federico's Lament" / english] [e-lucevan-le-stelle : aria = "E lucevan le stelle" = "O dolci baci, languide carezze" / altname] [ebben-ne-andro-lontana : aria = "Ebben? Ne andrò, lontana"] [esser-madre-e-un-inferno : aria = "Esser madre è un inferno"] [fa-chei-pensier : aria = "Fa chei pensier"] {fa-chei-pensier, audio-recording, [[AT 34111]]} [gli-avrei-detto-tentevele : aria = "Gli avrei detto: tenetevele"] [il-rispetto : aria = "Il rispetto"] {il-rispetto, audio-recording, [[AT 34111]]} [in-quelle-trine-morbide : aria = "In quelle trine morbide"] [in-questa-regia : aria = "In questa regia"] [io-son-lumile-ancella : aria = "Io son l'umile ancella"] [la-dolcissima-effigie : aria = "La dolcissima effigie"] [la-mamma-morta : aria = "La mamma morta"; "Mamma morta"] {la-mamma-morta, sound-clip, "http://localhost:8080/operamap/occurs/la-mamma-morta.wav"} / local {la-mamma-morta, sound-clip, "http://www.ontopia.net/topicmaps/examples/opera/occurs/la-mamma-morta.wav"} / web [la-mamma-ritrovo : aria = "La mamma ritrovo"] {la-mamma-ritrovo, audio-recording, [[AT 34111]]} [laggiu-nel-soledad : aria = "Laggiù nel Soledad"] [laltra-notte : aria = "L'altra notte in fondo al mare"; "Altra notte in fondo al mare"] [lanima-ho-stanca : aria = "L'anima ho stanca"] [ma-piu-spesso : aria = "Ma più spesso"] [mamma-quel-vino-e-generoso : aria = "Mamma, quel vino è generoso"] [mi-chiamono-mimi : aria = "Mi chiamono Mimì"] [nel-verde-maggio : aria = "Nel verde maggio"] [nessun-dorma : aria = "Nessun dorma"] {nessun-dorma, sound-clip, "http://localhost:8080/operamap/occurs/nessun-dorma.mp3"} / local {nessun-dorma, sound-clip, "http://www.ontopia.net/topicmaps/examples/opera/occurs/nessun-dorma.mp3"} / web [non-mi-resta : aria = "Non mi resta"] {non-mi-resta, audio-recording, [[AT 34111]]} [non-piangere-liu : aria = "Non piangere, Liù"] [o-amore-o-bella-luce-del-cuore : aria = "O amore, o bella luce del cuore"] {o-amore-o-bella-luce-del-cuore, audio-recording, [[AT 34111]]} [o-dolci-mani : aria = "O dolci mani"] [o-mio-babbino-caro : aria = "O mio babbino caro"] [o-soave-fanciulla : aria = "O soave fanciulla"] [o-tu-palermo : aria = "O tu Palermo"] [pace-pace-mio-dio : aria = "Pace, pace, mio Dio"] [perche-dovrei-tremare : aria = "Perché dovrei tremare"] {perche-dovrei-tremare, audio-recording, [[AT 34111]]} [perche-non-sono : aria = "Perché non sono"] {perche-non-sono, audio-recording, [[AT 34111]]} [piangea-cantando : aria = "Piangea cantando" = "Willow Song" / english] [qual-fiamma : aria = "Qual fiamma avea nel guardo"] [quando-men-vo-soletta : aria = "Quando m'en vo' soletta"] [recondita-armonia : aria = "Recondita armonia"] [ritorna-vincitor : aria = "Ritorna vincitor"] [se-come-voi : aria = "Se come voi"] [se-franz-dicesse-il-vero : aria = "Se Franz dicesse il vero"] [senti-bambino : aria = "Senti, bambino"] {senti-bambino, audio-recording, [[AT 34111]]} [senza-mamma : aria = "Senza mamma"] [signore-ascolta : aria = "Signore, ascolta!"] [sola-perduta-abbandonata : aria = "Sola, perduta, abbandonata!"] [sole-delle-mie-giornate : aria = "Sole della mie giornate"] {sole-delle-mie-giornate, audio-recording, [[AT 34111]]} [son-pochi-fiori : aria = "Son pochi fiori"] {son-pochi-fiori, audio-recording, [[AT 34111]]} [studenti-udite : aria = "Studenti! Udite"] [suicidio : aria = "Suicidio!"] [tu-che-di-gel-sei-cinta : aria = "Tu, che di gel sei cinta"] [un-bel-di-vedremo : aria = "Un bel' dì vedremo"] [un-di-allazzurro-spazio : aria = "Un dì all'azzurro spazio"] [un-di-ero-piccina : aria = "Un di, ero piccina"] {un-di-ero-piccina, audio-recording, [[AT 34111]]} [va-nella-tua-stanzetta : aria = "Va nella tua stanzetta"] [va-tosca : aria = "Va, Tosca!"] [venne-una-vecchierella : aria = "Venne una vecchierella"] {venne-una-vecchierella, audio-recording, [[AT 34111]]} [vesti-la-giubba : aria = "Vesti la giubba"] [vissi-darte : aria = "Vissi d'arte"] {vissi-darte, sound-clip, "http://localhost:8080/operamap/occurs/vissi-darte.wav"} / local {vissi-darte, sound-clip, "http://www.ontopia.net/topicmaps/examples/opera/occurs/vissi-darte.wav"} / web [voce-di-donna : aria = "Voce di donna"] [voi-siete-il-re : aria = "Voi siete il re"] {voi-siete-il-re, audio-recording, [[AT 34111]]} /* -- TT: ballet -- */ [nabucodonosor : ballet = "Nabucodonosor"] /* -- TT: broadcasting-company -- */ [nbc : broadcasting-company = "NBC"] [rai : broadcasting-company = "RAI"] /* -- TT: cause-of-death -- */ [battering : cause-of-death = "Battering" @"http://psi.ontopedia.net/Battering"] [beheading : cause-of-death = "Beheading" @"http://psi.ontopedia.net/Beheading"] [drowning : cause-of-death = "Drowning" @"http://psi.ontopedia.net/Drowning"] [jumping : cause-of-death = "Jumping" @"http://psi.ontopedia.net/Jumping"] [poisoning : cause-of-death = "Poisoning" @"http://psi.ontopedia.net/Poisoning"] [shooting : cause-of-death = "Shooting" @"http://psi.ontopedia.net/Shooting"] [stabbing : cause-of-death = "Stabbing" @"http://psi.ontopedia.net/Stabbing"] [strangling : cause-of-death = "Strangling" @"http://psi.ontopedia.net/Strangling"] /* -- TT: character -- */ [abbe : character = "Abbé"; "Abbe"] [abbe-of-chazeuil : character = "Abbé de Chazeuil"] [abbess : character = "Abbess"] [abdallo : character = "Abdallo"] {abdallo, descr, [[An elderly officer of the King of Babylon]]} [abigaille : character = "Abigaille"] {abigaille, descr, [[A slave, believed to be the eldest daughter of Nabucco]]} [acciano : character = "Acciano"] {acciano, descr, [[Tyrant of Antioch]]} [adhemar-de-montheil : character = "Adhemar de Montheil"] {adhemar-de-montheil, descr, [[Papal legate]]} [admeto : character = "Admèto"; "Admeto"] {admeto, descr, [[Argelia's lover, a outlawed Tuscan condottiere]]} [adonella : character = "Adonella"] [adriana : character = "Adriana Lecouvreur (character)" = "Adriana Lecouvreur" / character short-name] {adriana, descr, [[Actress of the Comédie Française]]} [afra : character = "Afra"] {afra, descr, [[A tavern owner]]} [agnese : character = "Agnese"] [ah-joe : character = "Ah-Joe"] {ah-joe, descr, [[Niece of Hu-Tsin]]} [aida-c : character = "Aida (character)" = "Aida" / character short-name] {aida-c, descr, [[An Ethiopian slave]]} [alcalde : character = "An Alcalde"] [alcindoro : character = "Alcindoro de Mittoneaux"] {alcindoro, descr, [[State councillor]]} [aldobrandino-dei-rangoni : character = "Aldobrandino dei Rangoni"] [alexis : character = "Alexis"] [alfio : character = "Alfio"] {alfio, descr, [[A coachman]]} [alfredo-germont : character = "Alfredo Germont"] [alice : character = "Alice"] [alice-ford : character = "Alice Ford"] [aligi : character = "Aligi"] [alms-collector : character = "Alms Collector"] [altichiara : character = "Altichiara"] [alvaro : character = "Alvaro"] {alvaro, descr, [[Governor of Peru]]} [alzira-c : character = "Alzira (character)" = "Alzira" / character short-name] {alzira-c, descr, [[Ataliba's daughter]]} [amalia : character = "Amalia"] {amalia, descr, [[An orphan, the Count's niece]]} [amalia2 : character = "Amalia"] [amalia3 : character = "Amalia"] [amantio : character = "Ser Amantio di Nicolao"] {amantio, descr, [[Notary]]} [amelia : character = "Amelia"] {amelia, descr, [[Renato's wife]]} [amelias-servant : character = "Amelias servant"] [amelias-servant2 : character = "Amelia's servant (Un ballo in maschera)" = "Amelia's servant" / short-name un-ballo-in-maschera] [amica-c : character = "Amica (character)" = "Amica" / character short-name] {amica-c, descr, [[Camoine's niece]]} [amneris : character = "Amneris"] {amneris, descr, [[The King of Egypt's daughter]]} [amonasro : character = "Amonasro"] {amonasro, descr, [[King of Ethiopia, Aida's father]]} [anacoana : character = "Anacoana"] [anaide : character = "Anaide"] {anaide, descr, [[Zazà's mother]]} [andras-zilah : character = "Andras Zilah"] [andrea : character = "Andrea"] [anetiello : character = "Anetiello"] [angelica : character = "Suor Angelica"] [angelotti : character = "Cesare Angelotti" = "Angelotti" / short-name] {angelotti, descr, [[Political prisoner]]} [anna : character = "Anna (Le Villi)" = "Anna" / le-villi short-name] [anna2 : character = "Anna von Rehberg"] {anna2, descr, [[The Margrave Rodolfo's niece]]} [anna3 : character = "Anna (Nabucco)" = "Anna" / nabucco short-name] {anna3, descr, [[Zaccaria's sister]]} [anna4 : character = "Anna (Risurrezione)" = "Anna" / risurrezione short-name] {anna4, descr, [[Old peasant woman]]} [annina : character = "Annina"] {annina, descr, [[Violetta's maid]]} [anselmo : character = "Anselmo"] {anselmo, descr, [[A corsair]]} [antigone : character = "Antigone"] [antonio : character = "Antonio"] [anusuya : character = "Anusuya"] {anusuya, descr, [[]]} [aquilante-dei-bardi : character = "Aquilante dei Bardi"] [araldo-maggiore : character = "L'araldo maggiore"; "Araldo maggiore"] [arcivescovo-salviati : character = "Arcivescovo Salviati"] [argelia : character = "Argelia"] {argelia, descr, [[Dardano's daughter]]} [aribobolo : character = "Aribobolo"] {aribobolo, descr, [[Un reduce d'Africa]]} [aricia : character = "Aricia"] {aricia, descr, [[Sommo sacerdote]]} [arlecchino-battocchio : character = "Arlecchino Battocchio"] {arlecchino-battocchio, descr, [[Spavento's man-servant]]} [arminio : character = "Arminio"] {arminio, descr, [[The Count's treasurer]]} [aroldo-c : character = "Aroldo (character)" = "Aroldo" / character short-name] {aroldo-c, descr, [[A Saxon knight]]} [arrigo : character = "Arrigo (I Vespri siciliani)" = "Henri" / french = "Arrigo" / i-vespri-siciliani short-name] {arrigo, descr, [[A young Sicilian]]} [arrigo2 : character = "Arrigo (La battaglia di Legnano)" = "Arrigo" / la-battaglia-di-legnano short-name] {arrigo2, descr, [[A Veronese soldier]]} [arrigos-squire : character = "Arrigos squire"] [arturo : character = "Arturo"] [arvino : character = "Arvino"] {arvino, descr, [[Son of the Governor of Rhodes, Folco, and leader of the Lombard crusaders]]} [ashby : character = "Ashby"] {ashby, descr, [[Agent of the Wells Fargo Company]]} [asrael-c : character = "Asrael (character)" = "Asrael" / character] [asteria : character = "Asteria"] [ataliba : character = "Ataliba"] {ataliba, descr, [[Peruvian tribal chief]]} [atropo : character = "Atropo"] [atte : character = "Atte"] [attila-c : character = "Attila (character)" = "Attila" / character short-name] {attila-c, descr, [[King of the Huns]]} [aubrey-da-venne : character = "Aubrey da Venne"] [augusto : character = "Augusto"] {augusto, descr, [[A waiter]]} [ausrufer-des-rates : character = "Ausrufer des Rates" = "Banditore del consiglio" / italian] [azucena : character = "Azucena"] {azucena, descr, [[A Vizcayan gypsy woman]]} [babilio : character = "Babilio"] [badoero : character = "Alvise Badoero"] {badoero, descr, [[A leader of the Venetian Inquisition, husband of Laura]]} [bajazzo : character = "Bajazzo" = "Pagliaccio" / italian] [balda : character = "Balda"] [baldassare : character = "Baldassare"] [baldo : character = "Baldo"] [banco : character = "Banco"] {banco, descr, [[A General in Duncan's army]]} [barbarigo : character = "Barbarigo"] {barbarigo, descr, [[Senator, member of the Giunta]]} [barbarossa : character = "Barbarossa"] {barbarossa, descr, [[Emperor of Germany]]} [barbemuche : character = "Barbemuche"] [bardo : character = "Bardo"] {bardo, descr, [[Aquilante's son]]} [bardolfo : character = "Bardolfo" = "Bardolph" / english] {bardolfo, descr, [[Follower of Falstaff]]} [barnaba : character = "Barnaba"] {barnaba, descr, [[A street singer]]} [baron-douphol : character = "Baron Douphol"] {baron-douphol, descr, [[Violetta's protector]]} [barone-di-kelbar : character = "Barone di Kelbar"] [baron-hermann : character = "Baron Hermann"] [barthelemy : character = "Barthelemy"] [bartholomaus-schumm : character = "Bartholomäus Schumm" = "Bartolomeo Schum" / italian] [bell : character = "Bell"] [bello : character = "Bello"] {bello, descr, [[Miner]]} [benci : character = "Benci"] [benoit : character = "Benoît"] {benoit, descr, [[Landlord]]} [beppe : character = "Beppe (Pagliacci)" = "Beppe" / pagliacci short-name] {beppe, descr, [[A player (in the play, Arlecchino)]]} [beppe-s : character = "Beppe (L'amico Fritz)" = "Beppe" / lamico-fritz short-name] {beppe-s, descr, [[A gypsy boy]]} [bergholz : character = "Bergholz"] [bernardo-bandini : character = "Bernardo Bandini"] [bersi : character = "Bersi"] {bersi, descr, [[A mulatto woman, Maddalena's companion]]} [bethune : character = "Le Sire de Béthune"] {bethune, descr, [[A French officer]]} [betto : character = "Betto di Signa"] {betto, descr, [[Buoso's brother-in-law]]} [bianca-c : character = "Bianca"] [biancofiore : character = "Biancofiore"] [bista : character = "Bista"] [black-eunuch : character = "Black Eunuch"] [bobadilla : character = "Bobadilla"] [bonze : character = "The Bonze"; "Bonze"] {bonze, descr, [[Cio-Cio-san's uncle]]} [borov : character = "Borov"] {borov, descr, [[A doctor]]} [borsa : character = "Borsa"] {borsa, descr, [[A courtier]]} [briano : character = "Briano"] {briano, descr, [[A holy man]]} [brichanteau : character = "Brichanteau"] [brighella : character = "Brighella"] {brighella, descr, [[A pedlar, confidante of Florindo]]} [bussy : character = "Bussy"] {bussy, descr, [[A journalist]]} [butterfly : character = "Cio-cio-san" = "Madama Butterfly" / altname] {butterfly, descr, [[A geisha, known as Madame Butterfly]]} [calaf : character = "Calaf"] {calaf, descr, [[Timur's son]]} [calatrava : character = "Marchese di Calatrava"] [calpurnia : character = "Calpurnia"] {calpurnia, descr, [[Serva di Aricia]]} [cancelliere-di-ragusa : character = "Cancelliere di Ragusa"] [candia-della-leonessa : character = "Candia della Leonessa"] [canio : character = "Canio"] {canio, descr, [[The principal in a troupe of players (in the play, Pagliaccio)]]} [cantore-interna : character = "Cantore interna"] [captain : character = "Naval captain"] [captain2 : character = "Captain"] [captain3 : character = "Captain (Siberia)" = "Captain" / short-name siberia] [captain-of-the-crossbowmen : character = "Captain of the crossbowmen"] [caraffa-dei-duchi : character = "Caraffa dei Duchi"] [carbon : character = "Carbon"] [carlo : character = "Carlo"] {carlo, descr, [[The Count's son]]} [carlo-teodoro-korner : character = "Carlo Teodoro Körner"] [carlo-vii : character = "Carlo VII"] {carlo-vii, descr, [[King of France]]} [carlo-worms : character = "Carlo Worms"] {carlo-worms, descr, [[student]]} [carmela : character = "Carmela"] [cascart : character = "Cascart"] {cascart, descr, [[A concert singer]]} [cassio : character = "Cassio"] {cassio, descr, [[Otello's lieutenant]]} [castro : character = "José Castro"] {castro, descr, [[Mestizo from Ramerrez' band]]} [catarina : character = "Catarina Hubscher"] {catarina, descr, [[Laundress, then Duchess of Danzig]]} [caterina : character = "Caterina"] {caterina, descr, [[Fritz's housekeeper]]} [cavaliere-di-belfiore : character = "Cavaliere di Belfiore"] {cavaliere-di-belfiore, descr, [[Posing as Stanislao, King of Poland]]} [cavaradossi : character = "Mario Cavaradossi" = "Mario" / short-name] {cavaradossi, descr, [[Painter]]} [cecilia : character = "Cecilia"] [cerinto : character = "Cerinto"] [chenier : character = "Andrea Chénier (character)" = "Chénier" / character short-name] {chenier, descr, [[A poet]]} [christian : character = "Christian"] [cim-fen : character = "Cim-Fen"] {cim-fen, descr, [[Proprietor of an opium den]]} [cintia : character = "Cintia"] [circe : character = "Circe"] [cirillo : character = "Cirillo"] {cirillo, descr, [[A coachman]]} [civile-baruch : character = "Civile Baruch"] [clara : character = "Clara"] [claretta : character = "Claretta"] {claretta, descr, [[A concert singer]]} [claudio-cesare-nerone : character = "Claudio Cesare Nerone" = "Nerone" / character nerone2] [cleo-de-merode : character = "Cleo de Merode"] [clivio-rufo : character = "Clivio Rufo"] [cloto : character = "Cloto"] [coigny : character = "Comtessa di Coigny"] {coigny, descr, [[Maddalena's mother]]} [colline : character = "Colline"] {colline, descr, [[Philosopher]]} [colombano : character = "Colombano"] [colombano2 : character = "Colombano"] [colombello : character = "Colombello"] [colombina : character = "Colombina"] {colombina, descr, [[Graziano's maid-servant, confidante of Rosaura and future bride of Brighella]]} [commissioner : character = "Commissioner"] [conte : character = "Conte"] [conte-aldovrandi : character = "Conte Aldovrandi"] [conte-dellambasceria : character = "Conte dell'Ambasceria"] [conte-douglas : character = "Conte Douglas"] [corintio : character = "Un Corintio"] [corrado : character = "Corrado"] {corrado, descr, [[Captain of the corsairs]]} [cossack : character = "Cossack"] [count-ceprano : character = "Count Ceprano"] [count-di-luna : character = "Count di Luna"] {count-di-luna, descr, [[A young nobleman of Aragon]]} [countess-ceprano : character = "Countess Ceprano"] [countess-of-aremberg : character = "Countess of Aremberg"] [count-monterone : character = "Count Monterone"] [count-of-lerma : character = "Count of Lerma"] [count-paolo : character = "Count Paolo"] [count-walter : character = "Count Walter"] [courtois : character = "Courtois"] [court-usher : character = "Court usher"] [crebillon : character = "Crébillon"] [creonte : character = "Creonte"] [crisogno : character = "Crisogno"] {crisogno, descr, [[student]]} [cristina : character = "Cristina"] [cristina2 : character = "Cristina"] [cristoforo-colombo-c : character = "Cristoforo Colombo (character)" = "Cristoforo Colombo" / character] [crocifero : character = "Crocifero"] [cuniza : character = "Cuniza"] {cuniza, descr, [[Sister of Ezzelino da Romano]]} [curra : character = "Curra"] {curra, descr, [[Leonora's maid]]} [customs-official : character = "Customs official"] [cyrano : character = "Cyrano"] [dancing-master : character = "Dancing master"] [dandria : character = "D'Andria"] [danieli : character = "Daniéli"] {danieli, descr, [[A Sicilian]]} [dardano : character = "Dardano"] {dardano, descr, [[An old triumvir of Syracus]]} [dariola : character = "Dariola"] [dariola2 : character = "Dariola"] [david : character = "David"] {david, descr, [[A rabbi]]} [de-brigole : character = "De Brigole"] {de-brigole, descr, [[Court chamberlain]]} [de-guiche : character = "De Guiche"; "Guiche"] [dejanice-c : character = "Dejanice (character)" = "Dejanice" / character short-name] {dejanice-c, descr, [[A courtesan]]} [delil : character = "Delil"] {delil, descr, [[An officer of the King]]} [delmonte : character = "Delmonte"] {delmonte, descr, [[Belfiore's steward]]} [desdemona : character = "Desdemona"] {desdemona, descr, [[Otello's wife]]} [des-grieux : character = "Chevalier des Grieux" = "des Grieux" / short-name] [desire : character = "Desiré"] {desire, descr, [[A servant]]} [de-siriex : character = "De Siriex"] {de-siriex, descr, [[A French diplomat]]} [despereaux : character = "Despereaux"] {despereaux, descr, [[Dancing master]]} [de-valvert : character = "De Valvert"; "Valvert"] [dhia : character = "Dhia"] [diaz : character = "Diaz"] [dick : character = "Dick"] [didier : character = "Didier"] [dimitri : character = "Dimitri"] {dimitri, descr, [[A groom]]} [dimitri-nekludoff : character = "Dimitri Nekludoff"] [dischia : character = "D'Ischia"] [distant-voices : character = "Two distant voices"] [doctor : character = "Doctor"] [doctor-grenvil : character = "Doctor Grenvil"] [dolcina : character = "Suor Dolcina"] [don-alvaro-c : character = "Don Alvaro"] [don-carlo-c2 : character = "Don Carlo (Ernani)" = "Don Carlo" / ernani short-name] {don-carlo-c2, descr, [[King of Spain]]} [don-carlo-di-vargas : character = "Don Carlo di Vargas"] {don-carlo-di-vargas, descr, [[Calatrava's son]]} [don-carlos-c : character = "Don Carlos (character)" = "Don Carlos" / character short-name] {don-carlos-c, descr, [[Infante of Spain]]} [don-fabiano : character = "Don Fabiano"] [don-fernan-guevara : character = "Don Fernan Guevara"] [don-giovanni-de-manara : character = "Don Giovanni de Manara"] [don-giovanni-manara : character = "Don Giovanni Manara"] [don-riccardo : character = "Don Riccardo"] {don-riccardo, descr, [[The King's steward]]} [don-roldano-ximenes : character = "Don Roldano Ximenes"] [don-ruy-gomez-de-silva : character = "Don Ruy Gomez de Silva"] {don-ruy-gomez-de-silva, descr, [[A Spanish grandee]]} [don-salvatore : character = "Don Salvatore"] [dorotea : character = "Dorotea"] {dorotea, descr, [[Lina's cousin]]} [dositeo : character = "Dositeo"] {dositeo, descr, [[A Roman]]} [dottor-antonio : character = "Dottor Antonio"] [dottor-graziano : character = "Dottor Graziano"] {dottor-graziano, descr, [[A man of law]]} [drasco : character = "Drasco"] [dr-caius : character = "Dr Caius"] [duchess-elena : character = "Duchess Elena" = "Duchess Hélène" / french] {duchess-elena, descr, [[Sister of Friedrich of Austria]]} [duclou : character = "Duclou"] {duclou, descr, [[A director]]} [due-contadini : character = "Due contadini"] [duke-of-mantua : character = "Duke of Mantua"] [dumas : character = "Dumas"] {dumas, descr, [[President of the tribunal]]} [duncan : character = "Duncan"] {duncan, descr, [[King of Scotland]]} [durand : character = "Durand"] [durvasas : character = "Durvasas"] {durvasas, descr, [[]]} [edgar-c : character = "Edgar (character)" = "Edgar" / character short-name] [edipo : character = "Edipo"] [edmea-c : character = "Edmea (character)" = "Edmea" / character short-name] [edmondo : character = "Edmondo"] {edmondo, descr, [[Student]]} [edoardo-di-sanval : character = "Edoardo di Sanval"] {edoardo-di-sanval, descr, [[The Baron's nephew]]} [egberto : character = "Egberto"] {egberto, descr, [[Mina's father]]} [egloge : character = "Egloge"] [elena : character = "Elena (Mefistofele)" = "Elena" / mefistofele short-name] [elena2 : character = "Elena (Aroldo)" = "Elena" / aroldo short-name] {elena2, descr, [[Mina's cousin]]} [eliana : character = "Eliana"] [elisabeth-de-valois : character = "Elisabeth de Valois"] {elisabeth-de-valois, descr, [[Philip's queen]]} [elsbeth-ratenow : character = "Elsbeth Ratenow" = "Alda di Ratenow" / italian] [elvira : character = "Elvira"] {elvira, descr, [[Silva's niece and betrothed]]} [emilia : character = "Emilia"] {emilia, descr, [[Desdemona's attendant, Iago's wife]]} [emir-of-ramla : character = "Emir of Ramla"] [emperor-altoum : character = "Emperor Altoum"] {emperor-altoum, descr, [[Turandot's father]]} [enrico : character = "Enrico"] {enrico, descr, [[Mina's cousin]]} [epafrodito : character = "Epafrodito"] [ermyngarde : character = "Ermyngarde"] [ermyntrude : character = "Ermyntrude"] [ernani-c : character = "Ernani (character)" = "Ernani" / character short-name] {ernani-c, descr, [[A bandit]]} [eufemia : character = "Eufemia"] [eulogio : character = "Eulogio"] [eva-schumm : character = "Eva Schumm" = "Eva Schum" / italian] [executioner : character = "Executioner"] [ezio : character = "Ezio"] {ezio, descr, [[A Roman general]]} [fante : character = "Fante"] [fanuel : character = "Fanuel"] {fanuel, descr, [[A Christian apostle]]} [faonte : character = "Faonte"] [faraone-xiii : character = "Faraone XIII"] {faraone-xiii, descr, [[Imperatore egizio]]} [faust-c : character = "Faust (character)" = "Faust" / character short-name] {faust-c, descr, [[A scholar]]} [favetta : character = "Favetta"] [fazio : character = "Fazio"] [federica : character = "Federica"] {federica, descr, [[Duchess of Ostheim, Walter's niece]]} [federico : character = "Federico (L'amico Fritz)" = "Federico" / lamico-fritz short-name] {federico, descr, [[A friend of Fritz]]} [federico2 : character = "Federico (L'arlesiana)" = "Federico" / larlesiana short-name] [federico-di-frengel : character = "Federico di Frengel"] {federico-di-frengel, descr, [[Lina's cousin]]} [federico-loewe : character = "Federico (Germania)" = "Federico" / germania short-name] {federico-loewe, descr, [[student]]} [fedia : character = "Fedia"] [fedora-c : character = "Fedora Romazov" = "Fedora" / character] {fedora-c, descr, [[The Princess Romazoff]]} [fenena : character = "Fenena"] {fenena, descr, [[Daughter of Nabucco]]} [fenitchka : character = "Fenitchka"] [fenton : character = "Fenton"] [fernandez : character = "Rambaldo Fernandez"] {fernandez, descr, [[Magda's protector]]} [ferrando : character = "Ferrando"] {ferrando, descr, [[A captain in the Count's army]]} [fiammetta : character = "Fiammetta"] [fidelia : character = "Fidelia"] [filippo-mala : character = "Filippo Mala"] [fiorella : character = "Fiorella"] [fiorenzo : character = "Fiorenzo"] [fioretta-di-gori : character = "Fioretta di Gori"] [first-consul : character = "First Consul of Milan"] [flamberge : character = "Flamberge"] {flamberge, descr, [[Sergeant]]} [flament : character = "Flament"] [flammen : character = "Flammen"] [fleana : character = "Fleana"] [fleanzio : character = "Fleanzio"] {fleanzio, descr, [[Banco's son]]} [flemish-deputies : character = "Flemish deputies"] [fleville : character = "Pietro Fléville"] {fleville, descr, [[A writer]]} [flora-bervoix : character = "Flora Bervoix"] {flora-bervoix, descr, [[Violetta's friend]]} [floras-servant : character = "Flora's servant"] [floriana : character = "Floriana"] {floriana, descr, [[A concert singer]]} [florindo : character = "Florindo"] {florindo, descr, [[Young graduate, Rosinda's required lover]]} [folco : character = "Folco"] [forchis : character = "Forchis"] [ford : character = "Ford"] {ford, descr, [[Alice's husband]]} [fords-page : character = "Ford's page"] [foresto : character = "Foresto"] {foresto, descr, [[A knight of Aquileia]]} [fouche : character = "Fouché"] {fouche, descr, [[Minister of police]]} [fouquier-tinville : character = "Fouquier-Tinville"] {fouquier-tinville, descr, [[Attorney general]]} [francesca : character = "Francesca"] [francesco : character = "Francesco"] {francesco, descr, [[Carlo's brother]]} [francesco-foscari : character = "Francesco Foscari"] {francesco-foscari, descr, [[Doge of Venice]]} [francesco-pazzi : character = "Francesco Pazzi"] [frank : character = "Frank"] {frank, descr, [[Fidelia's brother]]} [franz : character = "Franz"] [freddie : character = "Freddie"] [fritz : character = "Fritz Kobus"] [fritz2 : character = "Fritz (Edmea)" = "Fritz" / edmea short-name] {fritz2, descr, [[guillare(?)]]} [frugola : character = "Frugola"] {frugola, descr, [[Talpa's wife (aged 50)]]} [gabriele-adorno : character = "Gabriele Adorno"] {gabriele-adorno, descr, [[A Genoese gentleman]]} [gabriello-chiaramantesi : character = "Gabriello Chiaramantesi"] [gaoler : character = "Gaoler"] [garsenda : character = "Garsenda"] [gasparre : character = "Gasparre"] [gaston : character = "Gaston"] {gaston, descr, [[Viscount of Béarn]]} [gastone : character = "Gastone, Vicomte de Letorières"] {gastone, descr, [[Friend of Alfredo]]} [gastone2 : character = "Gastone"] [gaudenzio : character = "Gaudenzio"] [gellner : character = "Vincenzo Gellner"] {gellner, descr, [[The factor]]} [gelsomino : character = "Gelsomino"] {gelsomino, descr, [[Valet]]} [genovieffa : character = "Suor Genovieffa"] [gerard : character = "Carlo Gérard"] {gerard, descr, [[A servant, later a revolutionary]]} [germanio : character = "Germanio"] [geronte : character = "Géronte di Ravoir"] {geronte, descr, [[Treasurer general]]} [gertrud : character = "Gertrud" = "Gertrude" / italian] [gherardino : character = "Gherardino"] {gherardino, descr, [[Gherardo's son (aged 7)]]} [gherardo : character = "Gherardo"] {gherardo, descr, [[Buoso's nephew (aged 40)]]} [ghita : character = "Ghita"] [ghost-of-banco : character = "Ghost of Banco"] [giacomo : character = "Giacomo"] {giacomo, descr, [[A shepherd in Dom-Rémy]]} [giacomo-rantzau : character = "Giacomo Rantzau"] [giambattista-da-montesecco : character = "Giambattista da Montesecco"] [giannetto-malaspini : character = "Giannetto Malaspini"] [gianni : character = "Gianni Schicchi (character)" = "Gianni Schicchi" / character short-name] {gianni, descr, [[(aged 50)]]} [gianni-rantzau : character = "Gianni Rantzau"] [giannotto : character = "Giannotto"] [giglietta : character = "Giglietta"] [gilda : character = "Gilda"] {gilda, descr, [[Rigoletto's daughter]]} [gilfredo-dei-vaschi : character = "Gilfredo dei Vaschi"] [gina-c : character = "Gina"] {gina-c, descr, [[Uberto's sister]]} [ginevra : character = "Ginevra"] [giocadio : character = "Giocadio"] {giocadio, descr, [[Impresario and choragus]]} [giocasta : character = "Giocasta"] [gioconda : character = "La Gioconda (character)"; "Gioconda" = "La Gioconda"; "Gioconda" / character short-name] {gioconda, descr, [[A singer]]} [giorgetta : character = "Giorgetta"] {giorgetta, descr, [[Michele's wife (aged 25)]]} [giorgio : character = "Giorgio (I Rantzau)" = "Giorgio" / i-rantzau short-name] [giorgio2 : character = "Giorgio (Amica)" = "Giorgio" / amica short-name] {giorgio2, descr, [[Renaldo's brother]]} [giorgio3 : character = "Giorgio (Chatterton)" = "Giorgio" / chatterton short-name] [giorgio4 : character = "Giorgio (Marcella)" = "Giorgio" / marcella short-name] [giorgio-germont : character = "Giorgio Germont"] {giorgio-germont, descr, [[Alfredo's father]]} [giovanna : character = "Giovanna (Giovanna d'Arco)" = "Giovanna" / giovanna-darco short-name] {giovanna, descr, [[Giacomo's daughter]]} [giovanna2 : character = "Giovanna (Ernani)" = "Giovanna" / ernani short-name] {giovanna2, descr, [[Elvira's confidante]]} [giovanna3 : character = "Giovanna (Rigoletto)" = "Giovanna" / rigoletto short-name] {giovanna3, descr, [[Gilda's duenna]]} [giovanni : character = "Giovanni"] {giovanni, descr, [[A corsair]]} [giovanni-da-procida : character = "Giovanni da Procida" = "Jean Procida" / french] {giovanni-da-procida, descr, [[A Sicilian doctor]]} [giovanni-filippo-palm : character = "Giovanni Filippo Palm"] [giovanni-malatesta : character = "Giovanni Malatesta"] [giove : character = "Giove"] [girl : character = "Girl"] [giselda : character = "Giselda"] {giselda, descr, [[Arvino's daughter]]} [giulia : character = "Giulia"] {giulia, descr, [[Laundress]]} [giulia2 : character = "Giulia (I Rantzau)" = "Giulia" / i-rantzau short-name] [giuliano-di-medici : character = "Giuliano di Medici"] [giulietta-di-kelbar : character = "Giulietta di Kelbar"] {giulietta-di-kelbar, descr, [[The Baron's daughter]]} [giulio : character = "Giulio"] [giuseppe : character = "Giuseppe"] {giuseppe, descr, [[Violetta's servant]]} [glauco-c : character = "Glauco (character)" = "Glauco" / character] [gleby : character = "Glèby"; "Gleby"] [gloria-c : character = "Gloria (character)" = "Gloria" / character short-name] {gloria-c, descr, [[Aquilante's daughter]]} [goaler : character = "Goaler"] [gobin : character = "Gobin"] [gobrias : character = "Gobrias"] {gobrias, descr, [[A follower of Simon]]} [godvino : character = "Godvino"] {godvino, descr, [[A knight]]} [goro : character = "Goro"] {goro, descr, [[Marriage broker]]} [governor : character = "Governor"] [grand-inquisitor : character = "Grand Inquisitor"] [gray : character = "Gray"] [grech : character = "Grech"] {grech, descr, [[A police official]]} [grimaldo : character = "Enzo Grimaldo"] {grimaldo, descr, [[A Genoese prince]]} [gualterio : character = "Gualterio"] {gualterio, descr, [[Father Fidelia and Frank]]} [guardiano : character = "Padre Guardiano"] {guardiano, descr, [[A Franciscan monk]]} [guccio : character = "Guccio"] {guccio, descr, [[Dyer]]} [guglielmo : character = "Guglielmo Wulf"] {guglielmo, descr, [[A forester]]} [guglielmo-ratcliff-c : character = "Guglielmo Ratcliff (character)" = "Guglielmo Ratcliff" / character short-name] [guido-di-monforte : character = "Guido di Monforte" = "Guy de Montfort" / french] {guido-di-monforte, descr, [[Governor of Sicily under under Charles d'Anjou, King of Naples]]} [gulnara : character = "Gulnara"] {gulnara, descr, [[Seid's favourite slave]]} [gusmano : character = "Gusmano"] {gusmano, descr, [[Alvaro's son and successor]]} [hagenbach : character = "Giuseppe Hagenbach"] {hagenbach, descr, [[A huntsman from Sölden]]} [hanezo : character = "Hanezò"; "Hanezo"] {hanezo, descr, [[A friend of Fritz]]} [hans-ferbit : character = "Hans Ferbit"] [happy : character = "Happy"] {happy, descr, [[Miner]]} [harry : character = "Harry"] {harry, descr, [[Miner]]} [hecate : character = "Hecate"] [hedvige : character = "La signora Hedvige"] [helene : character = "Helene"] {helene, descr, [[The Count's daughter]]} [henning-mollner : character = "Henning Mollner"] [herald : character = "Herald (Macbeth)" = "Herald" / macbeth short-name] [herald2 : character = "Herald (La battaglia di Legnano)" = "Herald" / la-battaglia-di-legnano short-name] [herald3 : character = "Herald (Otello)" = "Herald" / otello short-name] [herald4 : character = "Herald (Jérusalem)" = "Herald" / jerusalem-o short-name] [high-priestess : character = "High Priestess"] [high-priest-of-baal : character = "High priest of Baal"] [hua-qui : character = "Hua-Quî"] {hua-qui, descr, [[Nurse of Hu-Cî]]} [hu-ci : character = "Hu-Cî"] {hu-ci, descr, [[Son of Hu-Tsin]]} [hu-tsin : character = "Hu-Tsin"] {hu-tsin, descr, [[A rich merchant]]} [iago : character = "Iago"] {iago, descr, [[Otello's ensign]]} [icelo : character = "Icelo"] [ienne-delleta : character = "Ienne dell'Eta"] [iguamota : character = "Iguamota"] [il-balestiere : character = "Il Balestiere"; "Balestiere"] [il-barone-di-waldek : character = "Il barone di Waldek"] [il-barone-midraglia : character = "Il Barone Midraglia"] [il-calandra : character = "Il Calandra"] [il-capitano : character = "Il Capitano"] [il-capitano-dei-marats : character = "Il capitano dei Marats"] [il-capitan-spaventa : character = "Il capitan Spaventa"] {il-capitan-spaventa, descr, [[Balandrano of the House of Balandrana]]} [il-capo-della-guarmigione : character = "Il Capo della guarmigione"] [il-capo-della-polizia : character = "Il capo della polizia"] [il-capo-della-polizia2 : character = "Il capo della polizia"] [il-capo-guardiano : character = "Il capo guardiano"] [il-carpentiere : character = "Il carpentiere"] [il-cavalier-faidit : character = "Il Cavalier Faïdit"] [il-cieco : character = "Il Cieco"] {il-cieco, descr, [[A blind man]]} [il-commissario : character = "Il commissario"] [il-conte-di-leitmeritz : character = "Il conte di Leitmeritz"] [il-custode : character = "Il Custode"] [il-direttore-del-carcere : character = "Il direttore del carcere"] [il-dottore : character = "Il dottore"] [il-duca-di-kilmarnok : character = "Il Duca di Kilmarnok"] [il-giullare : character = "Il Giullare"; "Giullare"] [il-ladro : character = "Il ladro"] [il-marchese-di-ssverny : character = "Il Marchese di Ssverny"] [il-mugnaio : character = "Il mugnaio" = "The miller" / english] [il-piccolo-marat-c : character = "Il piccolo Marat (character)" = "Il piccolo Marat" / character short-name] [il-poliziano : character = "Il Poliziano"] [il-portalettere : character = "Il portalettere"] [il-portatore-di-ordini : character = "Il portatore di ordini"] [il-prete : character = "Il prete" = "The priest" / english] [il-principe-cristiano : character = "Il Principe Cristiano"] [il-re-c : character = "Il re (character)" = "Il re" / character short-name] [il-re-di-napoli : character = "Il Re di Napoli"] [il-signor-di-laffemas : character = "Il Signor di Laffemas"] [il-soldato : character = "Il soldato"] [il-tornaquinci : character = "Il Tornaquinci"] [il-torregiano : character = "Il Torregiano"; "Torregiano"] [il-trinca : character = "Il Trinca"] [il-vecchio : character = "Il Vecchio"] [il-vescovo : character = "Il vescovo"] [imelda : character = "Imelda (Oberto)" = "Imelda" / oberto short-name] {imelda, descr, [[Cuniza's confidante]]} [imelda2 : character = "Imelda (La battaglia di Legnano)" = "Imelda" / la-battaglia-di-legnano short-name] {imelda2, descr, [[Lida's maid]]} [incredible : character = "L'Incredible"; "Incredible"] {incredible, descr, [[A spy]]} [ines : character = "Ines"] {ines, descr, [[Leonora's confidante]]} [innamorata : character = "L'Innamorata"; "Innamorata"] [innamorato : character = "L'Innamorato"; "Innamorato"] [innkeeper : character = "Innkeeper"] [inquisitors : character = "Inquisitors"] [inspector : character = "Inspector"] [iris-c : character = "Iris (character)" = "Iris" / character short-name] {iris-c, descr, [[Il Cieco's daughter]]} [isabeau-c : character = "Isabeau (character)" = "Isabeau" / character short-name] [isabella-daragona : character = "Isabella d'Aragona"] [isaure : character = "Isaure"] {isaure, descr, [[Hélène's companion]]} [isepo : character = "Isèpo"] {isepo, descr, [[A public scrivener]]} [ismaele : character = "Ismaele"] {ismaele, descr, [[Nephew of King Sedecia of Jerusalem]]} [ismene : character = "Ismene"] [ivan : character = "Ivan"] [ivrea : character = "Count Ivrea"] {ivrea, descr, [[Commandant of Brest]]} [jackrabbit : character = "Billy Jackrabbit" = "Billy" / short-name] {jackrabbit, descr, [[An indian]]} [jacopo-fiesco : character = "Jacopo Fiesco"] {jacopo-fiesco, descr, [[A Genoese nobleman (also known as Andrea)]]} [jacopo-foscari : character = "Jacopo Foscari"] {jacopo-foscari, descr, [[The doge's son]]} [jacopo-loredano : character = "Jacopo Loredano"] {jacopo-loredano, descr, [[Member of the Council of Ten]]} [jago : character = "Jago"] {jago, descr, [[Silva's steward]]} [jake-wallace : character = "Jake Wallace"] [james : character = "James"] [jane : character = "Jane"] {jane, descr, [[Ricke's sister]]} [jebbel : character = "Jebbel"] {jebbel, descr, [[Lene Armuth's niece]]} [jenny-clark : character = "Jenny Clark"] [jervolino : character = "Jervolino"] [joe : character = "Joe"] {joe, descr, [[Miner]]} [johannes-ratenow : character = "Johannes Ratenow" = "Giovanni di Ratenow" / italian] [john : character = "John"] [john-clark : character = "John Clark"] [johnsen : character = "Dick Johnsen" = "Ramerrez" / nom-de-guerre = "Dick" / short-name] {johnsen, descr, [[Bandit]]} [jorg : character = "Jorg"] {jorg, descr, [[An old preacher]]} [judge : character = "Judge"] [kanva : character = "Kanva"] {kanva, descr, [[]]} [kate-pinkerton : character = "Kate Pinkerton" = "Kate" / short-name] {kate-pinkerton, descr, [[Pinkerton's American wife]]} [katiusha : character = "Katiusha" = "Caterina Lubova" / real-name] [king : character = "The King"] {king, descr, [[]]} [king-of-egypt : character = "King of Egypt"] [konrad-von-knipprode : character = "Konrad von Knipprode" = "Corrado di Knipprodo" / italian] [kritzloff : character = "Kritzloff"] [kurfurst-friedrich : character = "Kurfürst Friedrich" = "Elettore Federico" / italian] [kyoto : character = "Kyoto"] {kyoto, descr, [[Keeper of a house of ill repute]]} [labdaco : character = "Làbdaco"; "Labdaco"] {labdaco, descr, [[A Carthiginian corsair, prisoner of the Greeks in Syracuse]]} [lachesi : character = "Lachesi"] [la-cieca : character = "La Cieca"; "Cieca"] {la-cieca, descr, [[Gioconda's mother]]} [la-ciesca : character = "La Ciesca"] {la-ciesca, descr, [[Marco's wife (aged 38)]]} [la-contessa : character = "La Contessa"] [la-cugina : character = "La cugina"] [ladislav-zehary-menko : character = "Ladislav Zehary Menko"] [la-duegne : character = "La Duègne"; "Duegne"] [lady-in-waiting-to-lady-macbeth : character = "Lady-in-waiting to Lady Macbeth"] [lady-macbeth : character = "Lady Macbeth"] {lady-macbeth, descr, [[Macbeth's wife]]} [la-gobba : character = "La Gobba"] [la-korableva : character = "La Korableva"] [lalage : character = "Lalage"] [laldomine : character = "Laldomine"] [la-madre : character = "La madre"] [la-madre-di-sperenza : character = "La madre di Sperenza"] [la-mamma : character = "La mamma"] [lame-man : character = "Lame man"] [la-moglie-del-faraone : character = "la moglie del Faraone"] [la-moglie-del-mugnaio : character = "La moglie del mugnaio" = "The miller's wife" / english] [lamplighter : character = "Lamplighter"] [la-pazzo : character = "La Pazzo"] [lapo : character = "Lapo"] [la-principessa : character = "La Principessa"] [laquila2 : character = "l'Aquila"] [larkens : character = "Larkens"] {larkens, descr, [[Miner]]} [la-rocca : character = "La Rocca"] {la-rocca, descr, [[Treasurer of the States of Brittany]]} [la-rossa : character = "La Rossa (Madame Sans-Gêne)" = "La Rossa" / madame-sans-gene short-name] {la-rossa, descr, [[Laundress]]} [la-rossa2 : character = "La Rossa (Risurrezione)" = "La Rossa" / risurrezione short-name] [lartigon : character = "Lartigon"] {lartigon, descr, [[A monologue writer]]} [la-senese : character = "La senese"] [la-signora-dufresne : character = "La Signora Dufresne"; "Signora Dufresne"] {la-signora-dufresne, descr, [[Dufresne's wife]]} [la-spia : character = "La spia"] [lastrologa : character = "L'astrologa" = "The astrologer" / english] [la-superiora : character = "La Superiora"] [laszlo : character = "Laszlo"] [la-tigre : character = "La tigre"] [laura : character = "Laura Adorno"] {laura, descr, [[A Genoese lady]]} [laura2 : character = "Laura"] {laura2, descr, [[A peasant girl]]} [lauretta : character = "Lauretta Schicchi"] {lauretta, descr, [[Gianni's daughter (aged 21)]]} [la-vanard : character = "La vanard"] [la-verde : character = "La Verde"] [la-voce-di-un-banditore : character = "La voce di un banditore" = "The voice of a town crier" / english] [lazaro-di-roio : character = "Lazaro di Roio"] [la-zia : character = "La zia"] [lazinski : character = "Lazinski"] [lea : character = "Lea"] [lebel : character = "Lebel"] [le-bret : character = "Le Bret"; "Bret"] [le-comte-de-toulouse : character = "Le Comte de Toulouse"; "Comte de Toulouse" = "The Count of Toulouse"; "Count of Toulouse" / english] [le-cuisinier : character = "Le Cuisinier"; "Cuisinier"] [lefebvre : character = "Lefebvre"] {lefebvre, descr, [[Sergeant, then duke of Danzig]]} [lelio : character = "Lelio"] [le-mousquetaire : character = "Le mousquetaire"; "Mousquetaire"] [lene-armuth : character = "Lene Armuth"] {lene-armuth, descr, [[old beggarwoman]]} [leone : character = "Leone"] {leone, descr, [[An old Roman]]} [leonello : character = "Leonello"] [leonello2 : character = "Leonello"] [leonora : character = "Donna Leonora di Vargas"] {leonora, descr, [[Calatrava's daughter]]} [leonora2 : character = "Leonora"] {leonora2, descr, [[Oberto's daughter]]} [leonora3 : character = "Leonora (Il trovatore)" = "Leonora" / il-trovatore short-name] {leonora3, descr, [[A lady-in-waiting to the Princess of Aragon]]} [leroy : character = "Leroy"] {leroy, descr, [[Tailor]]} [lescaut : character = "Lescaut"] {lescaut, descr, [[Manon's brother, sergeant of the King's Guard]]} [lesley : character = "Lesley"] [lida : character = "Lida"] {lida, descr, [[Rolando's wife]]} [lidia : character = "Lidia"] {lidia, descr, [[Serva di Patacca]]} [lidoria : character = "Lidoria"] [ligniere : character = "Lignière"; "Ligniere"] [lilla : character = "Lilla"] {lilla, descr, [[Uberto's fiancée]]} [lina : character = "Lina"] {lina, descr, [[Stiffelio's wife]]} [lindovino : character = "L'Indovino"] {lindovino, descr, [[A fortune-teller]]} [lionetto-de-ricci : character = "Lionetto de' Ricci"] {lionetto-de-ricci, descr, [[detto il Fortebrando]]} [lisabetta : character = "Lisabetta"] [lise : character = "Lise"] [lisette : character = "Lisette"] {lisette, descr, [[Magda's maid]]} [liu : character = "Liù"] {liu, descr, [[Slave girl]]} [locusta : character = "Locusta"] [lodoletta-c : character = "Lodoletta (character)" = "Lodoletta" / character short-name] [lodovico : character = "Lodovico"] {lodovico, descr, [[Ambassador of the Venetian Republic]]} [lofficier-espagnol : character = "L'officier Espagnol"; "Officier Espagnol"] [lola : character = "Lola"] {lola, descr, [[Alfio's wife]]} [lorco : character = "L'Orco"] [lord-klifford : character = "Lord Klifford"] [lord-lingstone : character = "Lord Lingstone"] [lord-stafford : character = "Lord Stafford"] [lorek : character = "Lorek"] {lorek, descr, [[A surgeon]]} [loreley-c : character = "Loreley (character)" = "Loreley" / character short-name] [lorenzo-di-medici : character = "Lorenzo di Medici"] [loretta : character = "Loretta"] [loris : character = "Loris Ipanov"] {loris, descr, [[A Russian Count]]} [loste : character = "L'Oste"] [louisson : character = "Louisson"] [lout : character = "Lout"] [lucia : character = "Mamma Lucia"] {lucia, descr, [[Turiddu's mother]]} [luciano : character = "Luciano"] [lucifero : character = "Lucifero"] [lucrezia-contarini : character = "Lucrezia Contarini"] {lucrezia-contarini, descr, [[Jacopo's wife]]} [luigi : character = "Luigi"] {luigi, descr, [[Stevedore (aged 20)]]} [luigi-adolfo-guglielmo-lutzow : character = "Luigi Adolfo Guglielmo Lützow"] [luisa : character = "Luisa (Luisa Miller)" = "Luisa" / luisa-miller short-name] {luisa, descr, [[Miller's daughter]]} [luisa2 : character = "Luisa (I Rantzau)" = "Luisa" / i-rantzau short-name] [luomo-di-legge : character = "L'uomo di legge" = "The advocate" / english] [macbeth-c : character = "Macbeth (character)" = "Macbeth" / character short-name] {macbeth-c, descr, [[A General in Duncan's army]]} [macduff : character = "Macduff"] {macduff, descr, [[A Scottish nobleman, Lord of Fife]]} [macgregor : character = "Macgregor"] [macrone-massimo : character = "Macrone Massimo"] {macrone-massimo, descr, [[Barbiere e direttore delle terme]]} [madame-de-bulow : character = "Madame de Bülow"] {madame-de-bulow, descr, [[Lady at court]]} [maddalena : character = "Maddalena"] {maddalena, descr, [[Sparafucile's sister]]} [maddalena-di-coigny : character = "Maddalena di Coigny"] [madelon : character = "Madelon"] {madelon, descr, [[An old woman]]} [madonna-imperia-c : character = "Madonna Imperia (character)" = "Madonna Imperia" / character] [madre-di-simonetta : character = "Madre di Simonetta"] [magda : character = "Magda de Civry"] {magda, descr, [[Rambaldo's mistress]]} [magdelone : character = "Magdelone"] {magdelone, descr, [[A farmgirl]]} {magdelone, note, [[Called "Maddalena" at mascagni.org]]} [majordome : character = "Majordome"] [makensprung : character = "Makensprung"] [malardot : character = "Malardot"] {malardot, descr, [[Owner of the Café Chantant]]} [malatestino : character = "Malatestino Malatesta"] [malcolm : character = "Malcolm"] {malcolm, descr, [[Duncan's son]]} [mandarin : character = "Mandarin"] [manfredo : character = "Manfredo" = "Mainfroid" / french] {manfredo, descr, [[A Sicilian]]} [manon : character = "Manon"] [man-on-first-floor : character = "Man on First Floor"] [manrico : character = "Manrico"] {manrico, descr, [[An officer in the army of Prince Urgel, and the supposed son of Azucena]]} [marcella-c : character = "Marcella (character)" = "Marcella" / character] [marcello : character = "Marcello"] {marcello, descr, [[Painter]]} [marchesa-del-poggio : character = "Marchesa del Poggio"] {marchesa-del-poggio, descr, [[Young widow, niece of the Baron]]} [marchese-alfredo : character = "Marchese Alfredo"] [marchese-dobigny : character = "Marchese d'Obigny"] {marchese-dobigny, descr, [[Flora's protector]]} [marco : character = "Marco (Gianni Schicchi)" = "Marco" / gianni-schicchi short-name] {marco, descr, [[Simone's son]]} [marco2 : character = "Marco (Zazà)" = "Marco" / short-name zaza] {marco2, descr, [[Mr. Dufreyne's attendant]]} [marco3 : character = "Marco"] [marco4 : character = "Marco"] [marcovaldo : character = "Marcovaldo"] {marcovaldo, descr, [[A German prisoner]]} [marcus-pipa : character = "Marcus Pipa"] {marcus-pipa, descr, [[Capo dei pompieri]]} [margherita : character = "Margherita (Mefistofele)" = "Margherita" / mefistofele short-name] {margherita, descr, [[A simple girl]]} [margherita2 : character = "Margherita (Guglielmo Ratcliff)" = "Margherita" / guglielmo-ratcliff short-name] [margrave-of-biberich : character = "Rudolfo, Margrave of Biberich"] [marguerite : character = "Marguerite"] [maria : character = "Maria"] [maria2 : character = "Marià"] [maria-boccanegra : character = "Maria Boccanegra"] {maria-boccanegra, descr, [[Simon's daughter, under the name Amelia Grimaldi]]} [maria-macgregor : character = "Maria Macgregor"] [mariella : character = "Mariella"] [mario : character = "Mario"] [marion-delorme-c : character = "Marion Delorme (character)" = "Marion Delorme" / character] [marsa-laszlo : character = "Marsa Laszlo"] [marta : character = "Marta"] {marta, descr, [[Margherita's neighbour]]} [marullo : character = "Marullo"] {marullo, descr, [[A nobleman]]} [maso : character = "Maso"] [massimiliano : character = "Massimiliano, Count Moor"] [mastro-trabuco : character = "Mastro Trabuco"] {mastro-trabuco, descr, [[A muleteer, then pedlar]]} [matheos : character = "Matheos"] [mathieu : character = "Mathieu"] {mathieu, descr, [[A sans-culotte]]} [matilde : character = "Matilde"] [matrena : character = "Matrena Pavlovna"] {matrena, descr, [[Governess]]} [matthaus : character = "Matthäus" = "Matteo" / italian] [matthias-blankenfelde : character = "Matthias Blankenfelde" = "Mattia Blanchenfeld" / italian] [maud : character = "Maud"] [maurizio : character = "Maurizio"] {maurizio, descr, [[Count of Saxony]]} [mayor-of-como : character = "Mayor of Como"] [medora : character = "Medora"] {medora, descr, [[Corrado's mistress]]} [mefistofele-c : character = "Mefistofele (character)" = "Mefistofele" / character short-name] [meg-page : character = "Meg Page"] [melchior-schumm : character = "Melchior Schumm" = "Melchiorre Schum" / italian] [melitone : character = "Fra Melitone"] {melitone, descr, [[A Franciscan monk]]} [menecrate : character = "Menecrate"] [messenger : character = "Messenger (Il trovatore)" = "Messenger" / il-trovatore short-name] [messenger2 : character = "Messenger (Aida)" = "Messenger" / aida short-name] [messer-cornelius : character = "Messer Cornelius"] [messere-di-bordo : character = "Messere di Bordò"] [metifio : character = "Metifio"] [michele : character = "Michele"] {michele, descr, [[Barge-owner (aged 50)]]} [michelin : character = "Michelin"] {michelin, descr, [[A journalist]]} [michonnet : character = "Michonnet"] {michonnet, descr, [[Stage director of the Comédie Française]]} [mielitore : character = "Mielitore"] [mikali-menko : character = "Mikali Menko"] [mila-di-corda : character = "Mila di Corda"] [milanese-prior : character = "The Prior of Milan"; "Prior of Milan"] [milio-dufresne : character = "Milio Dufresne"] [miller : character = "Miller"] {miller, descr, [[A retired old soldier]]} [mimi : character = "Mimì"; "Mimi"] {mimi, descr, [[Seamstress]]} [mina : character = "Mina"] {mina, descr, [[Aroldo's wife]]} [mine-host-at-the-garter : character = "Mine Host at the Garter"] [minnie : character = "Minnie"] [miskinsky : character = "Miskinsky"] [miss-lucy-da-venne : character = "Miss Lucy da Venne"] [mistress-of-novices : character = "Mistress of Novices"] [mistress-quickly : character = "Mistress Quickly"] [mlle-dangeville : character = "Mlle Dangeville"] {mlle-dangeville, descr, [[Member of the Comédie]]} [mlle-jouvenot : character = "Mlle Jouvenot"] {mlle-jouvenot, descr, [[Member of the Comédie]]} [monitor : character = "Monitor"] [montano : character = "Montano"] {montano, descr, [[Otello's predecessor as Governor of Cyprus]]} [moser : character = "Moser"] {moser, descr, [[A pastor]]} [mucrone : character = "Mucrone"] [murderer : character = "Murderer"] [musetta : character = "Musetta"] {musetta, descr, [[Singer]]} [nabucco-c : character = "Nabucco (character)" = "Nabucodonosor" / altname = "Nabucco" / character short-name] {nabucco-c, descr, [[King of Babylon]]} [nannetta : character = "Nannetta"] {nannetta, descr, [[Daughter of the Fords]]} [napoleon : character = "Napoleon"] [natalia : character = "Natalia"] {natalia, descr, [[Zazà's maid]]} [nedda : character = "Nedda"] {nedda, descr, [[Canio's wife (in the play, Colombina)]]} [nefta : character = "Nefta"] {nefta, note, [[Is Nefta also known as Suor Clotilde?]]} [neipperg : character = "Count Neipperg"] [nella : character = "Nella"] {nella, descr, [[Gherardo's wife (aged 34)]]} [nereo : character = "Nereo"] {nereo, descr, [[A Greek elder]]} [neri : character = "Neri"] [neri-chiaramantesi : character = "Neri Chiaramantesi"] [nerone-c : character = "Nerone (character)" = "Nerone" / character short-name] {nerone-c, descr, [[Roman emperor]]} [nevio : character = "Nevio"] [nick : character = "Nick"] {nick, descr, [[Bartender at the Polka saloon]]} [nicolo-deste : character = "Niccolò D'Este"] [nikona : character = "Nikona"] [ninetta : character = "Ninetta"] {ninetta, descr, [[Elena's maid]]} [nora : character = "Nora"] [nunzia : character = "Nunzia"] [nunzia2 : character = "Nunzia"] [oberto2 : character = "Oberto (Edmea)" = "Oberto" / edmea short-name] {oberto2, descr, [[The count's son]]} [oberto-c : character = "Oberto (character)" = "Oberto" / character short-name] {oberto-c, descr, [[Count of San Bonifacio]]} [odabella : character = "Odabella"] {odabella, descr, [[The Lord of Aquileia's daughter]]} [officer-of-the-council-of-ten : character = "Officer of the Council of Ten"] [officer-of-the-emir : character = "Officer of the Emir"] [olaf : character = "Olaf"] [old-gypsy : character = "Old gypsy"] [old-monk : character = "Old monk"] [olga : character = "Olga"] {olga, descr, [[La Contessa Sukarev, Fedora's friend]]} [orlando-pistacchini : character = "Orlando Pistacchini"] [ornella : character = "Ornella"] [oronte : character = "Oronte"] {oronte, descr, [[Acciano's son]]} [orsetta : character = "Orsetta"] [osaka : character = "Osaka"] {osaka, descr, [[A rich young man]]} [oscar : character = "Oscar"] {oscar, descr, [[A page]]} [osmina : character = "Suor Osmina"] [ostasio : character = "Ostasio"] [otello-c : character = "Otello (character)" = "Otello" / otello short-name] {otello-c, descr, [[Moorish general in the Venetian army]]} [otumbo : character = "Otumbo"] {otumbo, descr, [[An Inca warrior]]} [ovando : character = "Ovando"] {ovando, descr, [[A Spanish Duke]]} [pagano : character = "Pagano"] {pagano, descr, [[Arvino's brother, later a hermit]]} [page : character = "Page"] [palmira : character = "Palmira"] [pang : character = "Pang"] {pang, descr, [[General Purveyor]]} [pantalis : character = "Pantalis"] {pantalis, descr, [[Elena's companion]]} [pantalone-de-bisognosi : character = "Pantalone de' Bisognosi"] {pantalone-de-bisognosi, descr, [[A man of property]]} [paolo : character = "Paolo Malatesta"] [paolo2 : character = "Paolo"] [paolo-albiani : character = "Paolo Albiani"] {paolo-albiani, descr, [[A Genoese goldsmith, later favourite courtier of the Doge]]} [parisina-malatesta : character = "Parisina Malatesta"] [parpignol : character = "Parpignol"] {parpignol, descr, [[Toy vendor]]} [parvolo-patacca : character = "Parvolo Patacca"] {parvolo-patacca, descr, [[Direttore degli scavi]]} [pastore : character = "Un Pastore"] [peasant : character = "A peasant"] [peddler : character = "Peddler"] [pere-camoine : character = "Pere Camoine"] [perichaud : character = "Perichaud, Gobin, Crébillon"] {perichaud, descr, [[Rambaldo's friends]]} [perside : character = "Perside"] {perside, descr, [[A Christian]]} [peters : character = "Peters"] {peters, descr, [[shepherd]]} [petronio : character = "Petronio"] [philip-ii : character = "Philip II"] {philip-ii, descr, [[King of Spain]]} [piccolo-henry : character = "Piccolo Henry"] [pietro : character = "Pietro (Prologue)"] {pietro, descr, [[A Genoese popular leader, later courtier]]} [pietro2 : character = "Pietro (Dramma)"] {pietro2, descr, [[A courtier]]} [pietro3 : character = "Pietro"] [pilot : character = "Pilot"] [pinelli : character = "Pinelli"] {pinelli, descr, [[Cobbler]]} [ping : character = "Ping"] {ping, descr, [[Grand Chancellor]]} [pinkerton : character = "B. F. Pinkerton"; "Pinkerton" = "Pinkerton" / short-name] {pinkerton, descr, [[Lieutenant in the United States Army]]} [pinotta-c : character = "Pinotta"] [pirro : character = "Pirro"] {pirro, descr, [[Pagano's steward]]} [pisana : character = "Pisana"] {pisana, descr, [[Lucrezia's friend and confidante]]} [pistola : character = "Pistola" = "Pistol" / english] {pistola, descr, [[Follower of Falstaff]]} [poisson : character = "Poisson"] {poisson, descr, [[Member of the Comédie]]} [pong : character = "Pong"] {pong, descr, [[Chief Cook]]} [pony-express-rider : character = "Pony Express Rider"] [preziosilla : character = "Preziosilla"] {preziosilla, descr, [[A gypsy girl]]} [prigioniero : character = "Voce del Prigioniero"] [prince-de-bouillon : character = "Prince de Bouillon"] [prince-of-persia : character = "Prince of Persia"] [princess-de-bouillon : character = "Princess de Bouillon"] [princess-eboli : character = "Princess Eboli"] {princess-eboli, descr, [[Elisabeth's lady-in-waiting]]} [princess-elisa : character = "Princess Elisa"] [principe-coira : character = "Principe Còira"] [principe-gualberto-vismundi : character = "Principe Gualberto Vismundi"] [priyamvada : character = "Priyamvada"] {priyamvada, descr, [[]]} [prunier : character = "Prunier"] {prunier, descr, [[Poet]]} [queen-carolina : character = "Queen Carolina"] [quinault : character = "Quinault"] {quinault, descr, [[Member of the Comédie]]} [radames : character = "Radamès"; "Radames"] {radames, descr, [[Captain of the Guards]]} [radu : character = "Radu"] [raffaele-von-leuthold : character = "Raffaele von Leuthold"] {raffaele-von-leuthold, descr, [[A nobleman]]} [ragpicker : character = "Ragpicker"] [raimonda : character = "Raimonda"] [ramfis : character = "Ramfis"] {ramfis, descr, [[High Priest]]} [rance : character = "Jack Rance" = "Rance" / short-name] {rance, descr, [[Sheriff]]} [raymond : character = "Raymond"] {raymond, descr, [[Gaston's steward]]} [re-di-bramante : character = "Re di Bramante"] [renaldo : character = "Renaldo"] {renaldo, descr, [[A shepherd]]} [renato : character = "Renato"] {renato, descr, [[A Creole, Riccardo's secretary]]} [renzo : character = "Renzo"] [re-raimondo : character = "Re Raimondo"] [riccardo : character = "Riccardo"] {riccardo, descr, [[Count of Salinguerra]]} [riccardo2 : character = "Riccardo (Un ballo in maschera)" = "Riccardo" / short-name un-ballo-in-maschera] {riccardo2, descr, [[Count of Warwick, Governor of Boston]]} [ricke : character = "Ricke"] [rigoletto-c : character = "Rigoletto (character)" = "Rigoletto" / character short-name] {rigoletto-c, descr, [[Court jester to the Duke of Mantua]]} [rike : character = "Rike" = "Ryke" / italian] [rinuccio : character = "Rinuccio"] {rinuccio, descr, [[Zita's nephew (aged 40)]]} [rinuccio-da-corbara : character = "Rinuccio da Corbara"] [rinuccio-da-corbara2 : character = "Rinuccio da Corbara"] [roberto : character = "Roberto (I Vespri siciliani)" = "Robert" / french i-vespri-siciliani = "Roberto" / i-vespri-siciliani short-name] {roberto, descr, [[A French soldier]]} [roberto-le-villi : character = "Roberto (Le Villi)" = "Roberto" / le-villi short-name] [robin : character = "Robin (Falstaff)" = "Robin" / falstaff short-name] {robin, descr, [[Falstaff's page]]} [robin2 : character = "Robin (Guglielmo Ratcliff)" = "Robin" / guglielmo-ratcliff short-name] [roderigo : character = "Roderigo"] {roderigo, descr, [[A Venetian gentleman]]} [rodolfo : character = "Rodolfo (Puccini's La Bohème)" = "Rodolfo" / la-boheme short-name] {rodolfo, descr, [[Poet]]} [rodolfo2 : character = "Rodolfo (Luisa Miller)" = "Rodolfo" / luisa-miller short-name] {rodolfo2, descr, [[Walter's son]]} [rodolfo3 : character = "Rodolfo (Leoncavallo's La Bohème)" = "Rodolfo" / la-boheme2 short-name] {rodolfo3, descr, [[Poet]]} [rodrigue : character = "Rodrigue"] {rodrigue, descr, [[Marquis of Posa]]} [roger : character = "Roger"] {roger, descr, [[The Count's brother]]} [rogueneau : character = "Rogueneau"] [rolando : character = "Rolando"] {rolando, descr, [[A Milanese leader]]} [rolla : character = "Rolla"] {rolla, descr, [[Carlo's companion]]} [romal : character = "Romal"] [rosa : character = "Rosa"] [rosalina : character = "Rosalina"] [rosalinda-pistacchini : character = "Rosalinda Pistacchini"] [rosa-mammai : character = "Rosa Mammai"] [rosaura : character = "Rosaura"] {rosaura, descr, [[Pantalone's daughter]]} [roucher : character = "Roucher"] {roucher, descr, [[A friend of Chénier]]} [roustan : character = "Roustan"] {roustan, descr, [[Head of the Marmelukes]]} [rouvel : character = "Il Barone Rouvel"] [roxane : character = "Roxane"] [royal-herald : character = "Royal herald"] [rubria : character = "Rubria"] {rubria, descr, [[A Vestal virgin]]} [ruggero : character = "Ruggero Lastouc"] {ruggero, descr, [[Young man]]} [ruiz : character = "Ruiz"] {ruiz, descr, [[A soldier in Manrico's service]]} [sacristan : character = "Sacristan"] [sakuntala : character = "Sakùntala"; "Sakuntala"] {sakuntala, descr, [[]]} [samaritana : character = "Samaritana"] [samuel : character = "Samuel"] {samuel, descr, [[Enemy of the Count]]} [sandor-zilah : character = "Sandor Zilah"] [santuzza : character = "Santuzza"] {santuzza, descr, [[A young peasant woman]]} [savoyard : character = "Savoyard"] [scarpia : character = "Baron Scarpia" = "Scarpia" / short-name] {scarpia, descr, [[Chief of police]]} [schaunard : character = "Schaunard"] {schaunard, descr, [[Musician]]} [sciarrone : character = "Sciarrone"] {sciarrone, descr, [[Gendarme]]} [scilla : character = "Scilla"] [second-consul : character = "Second Consul of Milan"] [seid : character = "Seid"] {seid, descr, [[Pasha of Corone]]} [seid2 : character = "Seid (La Falce)" = "Seid" / la-falce short-name] {seid2, descr, [[The reaper]]} [selimo : character = "Selimo"] {selimo, descr, [[One of Seid's warriors]]} [sergeant : character = "Sergeant of the Royal Archers" = "Sergeant" / short-name] [sergeant2 : character = "Sergeant (Siberia)" = "Sergeant" / short-name siberia] [sergio : character = "Sergio"] [ser-toldo : character = "Ser Toldo Berardengo"] [servant : character = "Servant"] [servant-of-macbeth : character = "Servant of Macbeth"] [servant-of-the-doge : character = "Servant of the Doge"] [sharpless : character = "Sharpless"] {sharpless, descr, [[U.S. consul at Nagasaki]]} [shepherd : character = "Shepherd"] [shepherd-boy : character = "Shepherd-boy"] [si-c : character = "Sì (character)"; "Si (character)" = "Sì"; "Si" / character short-name] [sid : character = "Sid"] {sid, descr, [[Miner]]} [silvano2 : character = "Silvano (character, Un ballo in maschera)" = "Silvano" / character short-name un-ballo-in-maschera] {silvano2, descr, [[A sailor]]} [silvano-c : character = "Silvano (character, Silvano)" = "Silvano" / character short-name silvano] [silvia : character = "Silvia"] [silvio : character = "Silvio"] {silvio, descr, [[A villager]]} [simon-boccanegra-c : character = "Simon Boccanegra (character)" = "Simon Boccanegra" / character short-name] {simon-boccanegra-c, descr, [[A corsair in the service of the Genoese Republic, later Doge of Genoa]]} [simone : character = "Simone"] {simone, descr, [[Buoso's cousin (aged 70)]]} [simonetta-cattanei : character = "Simonetta Cattanei"] [simon-mago : character = "Simon Mago"] {simon-mago, descr, [[A magician]]} [simonson : character = "Simonson"] [singer-c : character = "Singer (La Gioconda)" = "Singer" / la-gioconda short-name] [singer-c2 : character = "Singer (Manon Lescaut)" = "Singer" / manon-lescaut short-name] [sir-john-da-venne : character = "Sir John da Venne"] [sir-john-falstaff : character = "Sir John Falstaff"] [skirner : character = "Skirner"] [slave : character = "Slave"] [smaragdi : character = "Smaragdi"] {smaragdi, descr, [[La schiava]]} [soeur-marthe : character = "Soeur Marthe"] [sofia : character = "Sofia"] {sofia, descr, [[Acciano's wife, secretly a Christian]]} [sofia-ivanovna : character = "Sofia Ivanovna" = "Sofia" / short-name] {sofia-ivanovna, descr, [[Dmitri's aunt]]} [soldier : character = "Soldier"] [song-pedlar : character = "Song-pedlar"] [sonora : character = "Sonora"] {sonora, descr, [[Miner]]} [sorella-cercatrice-1 : character = "Sorella cercatrice 1"] [sorella-cercatrice-2 : character = "Sorella cercatrice 2"] [sparafucile : character = "Sparafucile"] {sparafucile, descr, [[A hired assassin]]} [sperenza : character = "Sperenza"] [spinelloccio : character = "Maestro Spinelloccio"] {spinelloccio, descr, [[Doctor]]} [splendore : character = "Splendore"] [spoletta : character = "Spoletta"] {spoletta, descr, [[Police agent]]} [stankar : character = "Stankar"] {stankar, descr, [[An old colonel, count of the Empire and Lina's father]]} [stapps : character = "Stapps"] {stapps, descr, [[protestant priest]]} [stella : character = "Stella"] [stephana : character = "Stephana"] [stiffelio-c : character = "Stiffelio (character)" = "Stiffelio" / character short-name] {stiffelio-c, descr, [[An Ahasuerian preacher]]} [stromminger : character = "Stromminger"] {stromminger, descr, [[A landowner]]} [studiant : character = "Studiant"] [suor-agnese : character = "Suor Agnese"] [suor-celeste : character = "Suor Celeste"] [suor-cristina : character = "Suor Cristina"] [suor-maria : character = "Suor Maria"] [suor-pazienza : character = "Suor Pazienza"] [suor-zelatrice : character = "Suor zelatrice"] [surgeon : character = "Surgeon"] {surgeon, descr, [[In the Spanish army]]} [susetta : character = "Susetta"] [suzel : character = "Suzel"] [suzuki : character = "Suzuki"] {suzuki, descr, [[Servant]]} [suzy : character = "Suzy"] [taddie : character = "Taddie"] [talbot : character = "Talbot"] {talbot, descr, [[Supreme commander of the English army]]} [talpa : character = "Talpa"] {talpa, descr, [[Stevedore (aged 55)]]} [tamar : character = "Tamar"] [tartaglia : character = "Tartaglia"] {tartaglia, descr, [[A man-servant in the Bisognosi's house]]} [tebaldo : character = "Tebaldo" = "Thibault" / french] {tebaldo, descr, [[A French soldier]]} [thibault : character = "Thibault" = "Tebaldo" / italian] {thibault, descr, [[Elisabeth's page]]} [thomas-wintz : character = "Thomas Wintz" = "Tommaso Wintz" / italian] [tigellino : character = "Tigellino"] {tigellino, descr, [[Nero's henchman]]} [tigrana : character = "Tigrana"] [tilda : character = "Tilda"] [timur : character = "Timur"] {timur, descr, [[Exiled King of Tartary]]} [tinca : character = "Tinca"] {tinca, descr, [[Stevedore (aged 35)]]} [tiresia : character = "Tiresia"] [tom : character = "Tom (Un ballo in maschera)" = "Tom" / short-name un-ballo-in-maschera] {tom, descr, [[Enemy of the Count]]} [tom2 : character = "Tom (Guglielmo Ratcliff)" = "Tom" / guglielmo-ratcliff short-name] [tommaso-chatterton : character = "Tommaso Chatterton"] [tonio : character = "Tonio"] {tonio, descr, [[A hunchback clown (in the play, Taddeo)]]} [toniotta : character = "Toniotta"] {toniotta, descr, [[Laundress]]} [torias : character = "Torias"] [tosca-c : character = "Floria Tosca"] {tosca-c, descr, [[Celebrated singer]]} {tosca-c, bibref, [[Capriolo, Paola: "Floria Tosca", Serpent's Tail (London, 1997)]]} {tosca-c, bibref, [[Capriolo, Paola: "Vissi d'amore", Bompiani (Milan, 1992)]]} [toto : character = "Totò"; "Toto"] [trin : character = "Trin"] {trin, descr, [[Miner]]} [troilo : character = "Troilo"] [turandot-c : character = "Princess Turandot" = "Turandot" / character short-name] [turiddu : character = "Turiddu"] {turiddu, descr, [[A young peasant]]} [uberto : character = "Uberto"] {uberto, descr, [[Owner of a country lodge]]} [ugo-deste : character = "Ugo D'Este"] [uin-san-lui : character = "Uin-San-Lui"] {uin-san-lui, descr, [[Uni-Scî's son]]} [uin-sci : character = "Uin-Scî"] {uin-sci, descr, [[A learned doctor]]} [uldino : character = "Uldino"] {uldino, descr, [[A young Breton, Attila's slave]]} [ulmo : character = "Ulmo"] {ulmo, descr, [[The count's servant]]} [ulrica : character = "Ulrica"] {ulrica, descr, [[A negro fortune-teller]]} [una-conversa-1 : character = "Una conversa 1"] [una-conversa-2 : character = "Una conversa 2"] [una-donna : character = "Una donna"] [una-fanciulla : character = "Una fanciulla"] [un-altro-cavaliere : character = "Un altro cavaliere"] [un-altro-cerimoniere : character = "Un altro cerimoniere" = "Another master of ceremonies" / english] [un-amica : character = "Un amica"] [una-novizia : character = "Una novizia"] [un-araldo : character = "Un araldo"] [una-tzigana : character = "Una tzigana"] [una-vecchia-serva : character = "Una vecchia serva"] [una-voce : character = "Una voce"] [una-voce2 : character = "Una voce (Il piccolo Marat)" = "Una voce" / il-piccolo-marat short-name] [una-voce3 : character = "Una voce"] [una-voce4 : character = "Una voce"] [una-voce5 : character = "Una voce"] [un-cavaliere : character = "Un cavaliere"] [un-cerimoniere : character = "Un cerimoniere" = "A master of ceremonies" / english] [un-contadino : character = "Un contadino"] [un-cosacco : character = "Un cosacco"] [une-soeur : character = "Une soeur"; "Soeur"] [un-famiglio : character = "Un famiglio"] [un-ferito : character = "Un ferito"] [un-frate : character = "Un frate"] [un-giovanetto : character = "Un giovanetto"] [un-impiegato-della-stazione : character = "Un impiegato della stazione"] [un-pastorello : character = "Un pastorello"] [un-popolano : character = "Un popolano"] [un-prete : character = "Un prete"] [un-servo : character = "Un servo"] [un-servo2 : character = "Un servo"] [un-soldato : character = "Un soldato"] [un-ufficiale : character = "Un ufficiale"] [un-vecchio-pastore : character = "Un vecchio pastore"] [un-vecchio-zingari : character = "Un vecchio zingari"] [un-vegliard : character = "Un vegliard"] [vanna-aldovrandi : character = "Vanna Aldovrandi"] [vannina-dalando : character = "Vannina d'Alando"] [vannina-dalano : character = "Vannina d'Alano"] [vassili : character = "Vassili"] [vaudemont : character = "Count de Vaudemont"] {vaudemont, descr, [[A French officer]]} [vecchia-tzigana : character = "Vecchia tzigana"] [vera : character = "Vera (Sì)" = "Vera" / short-name si] [vera2 : character = "Vera (Risurrezione)" = "Vera" / risurrezione short-name] [vernier : character = "Vernier"] [viclinda : character = "Viclinda"] {viclinda, descr, [[Arvino's wife]]} [villagers : character = "Villagers"] [vinaigre : character = "Vinaigre"] {vinaigre, descr, [[Drummer]]} [vincinio : character = "Vincinio"] [violetta-valery : character = "Violetta Valery"] {violetta-valery, descr, [[A courtesan]]} [vito-amante : character = "Vito Amante"] [vito-amante2 : character = "Vito Amante"] [vivette : character = "Vivette"] [voce-lontana : character = "Voce lontana"] [voice-from-heaven : character = "Voice from heaven"] [vulcano : character = "Vulcano"] [wagner : character = "Wagner"] {wagner, descr, [[Faust's pupil]]} [walinoff : character = "Walinoff"] [wally : character = "Wally"] {wally, descr, [[Stromminger's daughter]]} [walter : character = "Walter"] {walter, descr, [[A zither-player]]} [walter2 : character = "Walter von Oberwesel"] [warrack : character = "Warrack"] [willie : character = "Willie"] [wowkle : character = "Wowkle"] {wowkle, descr, [[Billy Jackrabbit's squaw]]} [wurm : character = "Wurm"] {wurm, descr, [[Walter's steward]]} [yakuside : character = "Yakuside"] [yamadori : character = "Prince Yamadori" = "Yamadori" / short-name] {yamadori, descr, [[Rich Japanese]]} [yanika : character = "Yanika"] [yansky-varhely : character = "Yansky Varhely"] [yvette : character = "Yvette"] {yvette, descr, [[Magda's friend]]} [zaccaria : character = "Zaccaria"] {zaccaria, descr, [[High priest of the Hebrews]]} [zamoro : character = "Zamoro"] {zamoro, descr, [[Peruvian tribal chief]]} [zanetto-c : character = "Zanetto (character)" = "Zanetto" / character short-name] [zaza-c : character = "Zazà (character)"; "Zaza" = "Zazà"; "Zaza" / short-name zaza] [zia : character = "Principessa La Zia"] {zia, descr, [[Suor Angelica's aunt]]} [zita : character = "Zita"] {zita, descr, [[Called La Vecchia, Buoso's cousin (aged 60)]]} [zohra : character = "Zohra"] {zohra, descr, [[An Arabian girl]]} [zuane : character = "Zuàne"] {zuane, descr, [[A sailor in the regatta]]} [zuma : character = "Zuma"] {zuma, descr, [[Alzira's sister]]} /* -- TT: chorus -- */ [va-pensiero : chorus = "Va pensiero" = "Chorus of the Hebrew Slaves" / english] [vedi-le-fosche : chorus = "Vedi! le fosche" = "Anvil chorus" / english] /* -- TT: city -- */ [abreschviller : city = "Abreschviller" @"http://psi.ontopedia.net/Abreschviller"] [aldwort : city = "Aldwort" @"http://psi.ontopedia.net/Aldwort"] [antioch : city = "Antioch" @"http://psi.ontopedia.net/Antioch"] [arles : city = "Arles" @"http://psi.ontopedia.net/Arles"] [astapovo : city = "Astapovo" @"http://psi.ontopedia.net/Astapovo"] [athens : city = "Athens" @"http://psi.ontopedia.net/Athens"] [babylon : city = "Babylon" @"http://psi.ontopedia.net/Babylon"] [bagni-di-lucca : city = "Bagni di Lucca" @"http://psi.ontopedia.net/Bagni_di_Lucca"] [bassano : city = "Bassano" @"http://psi.ontopedia.net/Bassano"] [bazens : city = "Bazens" @"http://psi.ontopedia.net/Bazens"] [beijing : city = "Beijing" = "Peking" / former-name @"http://psi.ontopedia.net/Beijing"] [berlin : city = "Berlin" @"http://psi.ontopedia.net/Berlin"] [besancon : city = "Besançon" @"http://psi.ontopedia.net/Besancon"] [bologna : city = "Bologna" @"http://psi.ontopedia.net/Bologna"] [borgo-san-lorenzo : city = "Borgo S. Lorenzo" @"http://psi.ontopedia.net/Borgo_San_Lorenzo"] [boston : city = "Boston" @"http://psi.ontopedia.net/Boston"] [boulogne-sur-mer : city = "Boulogne-sur-Mer" @"http://psi.ontopedia.net/Boulogne_sur_Mer"] [brescia : city = "Brescia" @"http://psi.ontopedia.net/Brescia"] [bristol : city = "Bristol" @"http://psi.ontopedia.net/Bristol"] [brussels : city = "Brussels" @"http://psi.ontopedia.net/Brussels"] [buenos-aires : city = "Buenos Aires" @"http://psi.ontopedia.net/Buenos_Aires"] [bury-st-edmunds : city = "Bury St. Edmunds" @"http://psi.ontopedia.net/Bury_St_Edmunds"] [cadiz : city = "Cadiz" @"http://psi.ontopedia.net/Cadiz"] [cairo : city = "Cairo" @"http://psi.ontopedia.net/Cairo"] [cakovec : city = "ÄÂŒakovec" = "Csáktornya" / hungarian @"http://psi.ontopedia.net/ÄÂŒakovec"] [cambridge-ma : city = "Cambridge, MA" @"http://psi.ontopedia.net/Cambridge,_Massachusetts"] [capri : city = "Capri" @"http://psi.ontopedia.net/Capri"] [caprino-bergamasco : city = "Caprino Bergamasco" @"http://psi.ontopedia.net/Caprino_Bergamasco"] [castelnuovo-scrivia : city = "Castelnuovo Scrivia" @"http://psi.ontopedia.net/Castelnuovo_Scrivia"] [catania : city = "Catania" @"http://psi.ontopedia.net/Catania"] [ceva : city = "Ceva" @"http://psi.ontopedia.net/Ceva"] [chantilly : city = "Chantilly" @"http://psi.ontopedia.net/Chantilly"] [chicago : city = "Chicago" @"http://psi.ontopedia.net/Chicago"] [colleretto-parella : city = "Colleretto Parella" @"http://psi.ontopedia.net/Colleretto_Parella"] [como : city = "Como" @"http://psi.ontopedia.net/Como"] [cordoba : city = "Cordoba" @"http://psi.ontopedia.net/Cordoba"] [coron : city = "Coron" @"http://psi.ontopedia.net/Coron"] [cremona : city = "Cremona" @"http://psi.ontopedia.net/Cremona"] [dover : city = "Dover" @"http://psi.ontopedia.net/Dover"] [dresden : city = "Dresden" @"http://psi.ontopedia.net/Dresden"] [dusseldorf : city = "Düsseldorf" @"http://psi.ontopedia.net/Dusseldorf"] [ferrara : city = "Ferrara" @"http://psi.ontopedia.net/Ferrara"] [firenze : city = "Florence" = "Firenze" / italian @"http://psi.ontopedia.net/Firenze"] [foggia : city = "Foggia" @"http://psi.ontopedia.net/Foggia"] [frankfurt : city = "Frankfurt" @"http://psi.ontopedia.net/Frankfurt"] [geneva : city = "Geneva" @"http://psi.ontopedia.net/Geneva"] [genova : city = "Genoa" = "Genova" / italian @"http://psi.ontopedia.net/Genova"] [ghent : city = "Ghent" @"http://psi.ontopedia.net/Ghent"] [grado : city = "Grado" @"http://psi.ontopedia.net/Grado"] [hesdin : city = "Hesdin" @"http://psi.ontopedia.net/Hesdin"] [istanbul : city = "Istanbul" @"http://psi.ontopedia.net/Istanbul"] [jerusalem : city = "Jerusalem" @"http://psi.ontopedia.net/Jerusalem"] [konigsberg : city = "Konigsberg" @"http://psi.ontopedia.net/Konigsberg"] [konstanz : city = "Konstanz" @"http://psi.ontopedia.net/Konstanz"] [laquila : city = "Laquila" @"http://psi.ontopedia.net/Laquila"] [la-spezia : city = "La Spezia" @"http://psi.ontopedia.net/La_Spezia"] [lausanne : city = "Lausanne" @"http://psi.ontopedia.net/Lausanne"] [lecce : city = "Lecce" @"http://psi.ontopedia.net/Lecce"] [lecco : city = "Lecco" @"http://psi.ontopedia.net/Lecco"] [le-roncole : city = "Le Roncole" @"http://psi.ontopedia.net/Le_Roncole"] [limoges : city = "Limoges" @"http://psi.ontopedia.net/Limoges"] [livorno : city = "Leghorn" = "Livorno" / italian @"http://psi.ontopedia.net/Livorno"] [locarno : city = "Locarno" @"http://psi.ontopedia.net/Locarno"] [loches : city = "Loches" @"http://psi.ontopedia.net/Loches"] [london : city = "London" @"http://psi.ontopedia.net/London"] [lucca : city = "Lucca" @"http://psi.ontopedia.net/Lucca"] [lugano : city = "Lugano" @"http://psi.ontopedia.net/Lugano"] [luneville : city = "Luneville" @"http://psi.ontopedia.net/Luneville"] [madrid : city = "Madrid" @"http://psi.ontopedia.net/Madrid"] [mantua : city = "Mantua" @"http://psi.ontopedia.net/Mantua"] [marbach : city = "Marbach" @"http://psi.ontopedia.net/Marbach"] [marbacka : city = "Marbäcka" @"http://psi.ontopedia.net/Marbacka"] [marly-le-roy : city = "Marly-Le-Roy" @"http://psi.ontopedia.net/Marly-le-Roy"] [marseille : city = "Marseille" @"http://psi.ontopedia.net/Marseille"] [marseilles : city = "Marseilles" @"http://psi.ontopedia.net/Marseilles"] [mecca : city = "Mecca" @"http://psi.ontopedia.net/Mecca"] [mesolonghi : city = "Mesolonghi" @"http://psi.ontopedia.net/Mesolonghi"] [milano : city = "Milan" = "Milano" / italian @"http://psi.ontopedia.net/Milano"] [monza : city = "Monza" @"http://psi.ontopedia.net/Monza"] [monte-carlo : city = "Monte Carlo" @"http://psi.ontopedia.net/Monte_Carlo"] [montecatini : city = "Montecatini" @"http://psi.ontopedia.net/Montecatini"] [morlaix : city = "Morlaix" @"http://psi.ontopedia.net/Morlaix"] [moscow : city = "Moscow" @"http://psi.ontopedia.net/Moscow"] [munich : city = "Munich" @"http://psi.ontopedia.net/Munich"] [murano : city = "Murano" @"http://psi.ontopedia.net/Murano"] [nagasaki : city = "Nagasaki" @"http://psi.ontopedia.net/Nagasaki"] [napoli : city = "Naples" = "Napoli" / italian @"http://psi.ontopedia.net/Napoli"] [navahradak : city = "Navahradak" @"http://psi.ontopedia.net/Navahradak"] [new-york : city = "New York" @"http://psi.ontopedia.net/New_York"] [nice : city = "Nice" @"http://psi.ontopedia.net/Nice"] [nimes : city = "Nimes" @"http://psi.ontopedia.net/Nimes"] [orange : city = "Orange" @"http://psi.ontopedia.net/Orange"] [paderno-fasolaro : city = "Paderno Fasolaro" @"http://psi.ontopedia.net/Paderno_Fasolaro"] [padua : city = "Padua" @"http://psi.ontopedia.net/Padua"] [palermo : city = "Palermo" @"http://psi.ontopedia.net/Palermo"] [palmi : city = "Palmi" @"http://psi.ontopedia.net/Palmi"] [paris : city = "Paris" @"http://psi.ontopedia.net/Paris"] [parma : city = "Parma" @"http://psi.ontopedia.net/Parma"] [pau : city = "Pau" @"http://psi.ontopedia.net/Pau"] [pesaro : city = "Pesaro" @"http://psi.ontopedia.net/Pesaro"] [pescara : city = "Pescara" @"http://psi.ontopedia.net/Pescara"] [phalsbourg : city = "Phalsbourg" @"http://psi.ontopedia.net/Phalsbourg"] [piacenza : city = "Piacenza" @"http://psi.ontopedia.net/Piacenza"] [portland : city = "Portland" @"http://psi.ontopedia.net/Portland,_Maine"] [posillipo : city = "Posillipo" @"http://psi.ontopedia.net/Posillipo"] [pula : city = "Pula" @"http://psi.ontopedia.net/Pula"] [prato : city = "Prato" @"http://psi.ontopedia.net/Prato"] [prien : city = "Prien" @"http://psi.ontopedia.net/Prien"] [ravenna : city = "Ravenna" @"http://psi.ontopedia.net/Ravenna"] [reggio-emilia : city = "Reggio Emilia" @"http://psi.ontopedia.net/Reggio_Emilia"] [rennes : city = "Rennes" @"http://psi.ontopedia.net/Rennes"] [rimini : city = "Rimini" @"http://psi.ontopedia.net/Rimini"] [roma : city = "Rome" = "Roma" / italian @"http://psi.ontopedia.net/Roma"] [rovereto : city = "Rovereto" @"http://psi.ontopedia.net/Rovereto"] [saint-raphael : city = "Saint Raphael" @"http://psi.ontopedia.net/Saint_Raphael"] [san-francisco : city = "San Francisco" @"http://psi.ontopedia.net/San_Francisco"] [san-remo : city = "San Remo" @"http://psi.ontopedia.net/San_Remo"] [sevilla : city = "Sevilla" = "Seville" / english = "Siviglia" / italian @"http://psi.ontopedia.net/Sevilla"] [siena : city = "Siena" @"http://psi.ontopedia.net/Siena"] [somersby : city = "Somersby" @"http://psi.ontopedia.net/Somersby"] [sorrento : city = "Sorrento" @"http://psi.ontopedia.net/Sorrento"] [st-etienne : city = "St. Etienne" @"http://psi.ontopedia.net/St_Etienne"] [st-petersburg : city = "St. Petersburg" = "Leningrad" / former-name = "Petrograd" / former-name @"http://psi.ontopedia.net/St_Petersburg"] [stratford : city = "Stratford" @"http://psi.ontopedia.net/Stratford"] [syracuse : city = "Syracuse" @"http://psi.ontopedia.net/Syracuse"] [thebes : city = "Thebes" @"http://psi.ontopedia.net/Thebes"] [torino : city = "Turin" = "Torino" / italian @"http://psi.ontopedia.net/Torino"] [torquay : city = "Torquay" @"http://psi.ontopedia.net/Torquay"] [toulouse : city = "Toulouse" @"http://psi.ontopedia.net/Toulouse"] [trento : city = "Trento" @"http://psi.ontopedia.net/Trento"] [trieste : city = "Trieste" @"http://psi.ontopedia.net/Trieste"] [udine : city = "Udine" @"http://psi.ontopedia.net/Udine"] [varazza : city = "Varazza" @"http://psi.ontopedia.net/Varazza"] [varese : city = "Varese" @"http://psi.ontopedia.net/Varese"] [venezia : city = "Venezia" = "Venice" / english @"http://psi.ontopedia.net/Venezia"] [verona : city = "Verona" @"http://psi.ontopedia.net/Verona"] [viareggio : city = "Viareggio" @"http://psi.ontopedia.net/Viareggio"] [vicenza : city = "Vicenza" @"http://psi.ontopedia.net/Vicenza"] [vienna : city = "Vienna" @"http://psi.ontopedia.net/Vienna"] [vigasio : city = "Vigasio" @"http://psi.ontopedia.net/Vigasio"] [villemomble : city = "Villemomble" @"http://psi.ontopedia.net/Villemomble"] [weimar : city = "Weimar" @"http://psi.ontopedia.net/Weimar"] [windsor : city = "Windsor" @"http://psi.ontopedia.net/Windsor"] [wroclaw : city = "Wroclaw" = "Breslau" / german @"http://psi.ontopedia.net/Wroclaw"] [yasnaya-polyana : city = "Yasnaya Polyana" @"http://psi.ontopedia.net/Yasnaya_Polyana"] [zara : city = "Zadar" = "Zara" / former-name @"http://psi.ontopedia.net/Zara"] [zoagli : city = "Zoagli" @"http://psi.ontopedia.net/Zoagli"] /* -- TT: codetype -- */ [iso639-1 : codetype = "ISO 639:1988 language code" = "ISO 639 code" / short-name @"http://psi.ontopedia.net/iso639_1"] [iso639-2b : codetype = "ISO 639-2:1996 Alpha-3 language code (bibliographic)" = "ISO 639-2(B) code" / short-name @"http://psi.ontopedia.net/iso639_2b"] [iso639-2t : codetype = "ISO 639-2:1996 Alpha-3 language code (terminological)" = "ISO 639-2(T) code" / short-name @"http://psi.ontopedia.net/iso639_2t"] /* -- TT: composer -- */ [alfano : composer = "Alfano, Franco" = "Franco Alfano" / normal = "Alfano" / short-name @"http://psi.ontopedia.net/Franco_Alfano"] {alfano, article, "http://en.wikipedia.org/wiki/Franco_Alfano"} {alfano, note, [[According to Konrad Dryden (in the sleeve notes for Cyrano de Bergerac) there is also an opera called Eliane dating from 1943.]]} {alfano, date-of-birth, [[1875-03-08]]} {alfano, date-of-death, [[1954-10-27]]} {alfano, illustration, "http://localhost:8080/operamap/occurs/composer/alfano.jpg"} / local {alfano, webpage, "http://www.esdf-opera.de/komponisten/alfano/alfano-urbesetzungen.htm"} {alfano, webpage, "http://www.operone.de/komponist/alfano.html"} {alfano, webpage, "http://www.rodoni.ch/malipiero/alfanobioingl.html"} {alfano, webpage, "http://www.tryphon.it/sakuntala/freeman.htm"} [boito : composer librettist = "Boïto, Arrigo"; "Boito, Arrigo" = "Gorrio, Tobia" / nom-de-plume = "Tobia Gorrio" / nom-de-plume normal = "Arrigo Boïto"; "Arrigo Boito" / normal = "Boito" / short-name @"http://psi.ontopedia.net/Arrigo_Boito"] {boito, article, "http://en.wikipedia.org/wiki/Arrigo_Boito"} {boito, article, "http://www.ontopia.net/topicmaps/examples/opera/occurs/snl/boito.htm"} / web snl {boito, biographical-article, "http://localhost:8080/operamap/occurs/librettist/boito.html"} / local {boito, date-of-birth, [[1842-02-24]]} {boito, date-of-death, [[1918-06-10]]} {boito, descr, [[Arrigo Boito is probably better known as a librettist than as a composer, especially for his texts for Verdi's Simon Boccanegra, and the Shakespearian Otello and Falstaff, as well as the libretto of Ponchielli's La Gioconda.]]} {boito, illustration, "http://localhost:8080/operamap/occurs/composer/boito.gif"} / local {boito, webpage, "http://www.esdf-opera.de/komponisten/boito/boito-urbesetzungen.htm"} {boito, webpage, "http://www.naxos.com/composer/btm.asp?fullname=Boito,%20Arrigo"} / naxos web {boito, webpage, "http://www.operone.de/komponist/boito.html"} [catalani : composer = "Catalani, Alfredo" = "Alfredo Catalani" / normal = "Catalani" / short-name @"http://psi.ontopedia.net/Alfredo_Catalani"] {catalani, article, "http://en.wikipedia.org/wiki/Alfredo_Catalani"} {catalani, date-of-birth, [[1854-06-19]]} {catalani, date-of-death, [[1893-08-07]]} {catalani, illustration, "http://localhost:8080/operamap/occurs/composer/catalani.gif"} / local {catalani, webpage, "http://www.esdf-opera.de/komponisten/catalani/catalani-urbesetzungen.htm"} {catalani, webpage, "http://www.mynetcologne.de/~nc-ruethjo/Oper/Catalani/catalani.htm"} / web german {catalani, webpage, "http://www.naxos.com/composer/btm.asp?fullname=Catalani,%20Alfredo"} / web naxos {catalani, webpage, "http://www.operone.de/komponist/catalani.html"} [cilea : composer = "Cilèa, Francesco";"Cilea, Francesco" = "Francesco Cilèa";"Francesco Cilea" / normal = "Cilèa";"Cilea" / short-name @"http://psi.ontopedia.net/Francesco_Cilea"] {cilea, article, "http://en.wikipedia.org/wiki/Francesco_Cilea"} {cilea, article, "http://www.ontopia.net/topicmaps/examples/opera/occurs/snl/cilea.htm"} / web snl {cilea, date-of-birth, [[1866-07-23]]} {cilea, date-of-death, [[1950-11-20]]} {cilea, illustration, "http://localhost:8080/operamap/occurs/composer/cilea.gif"} / local {cilea, webpage, "http://www.esdf-opera.de/komponisten/cilea/cilea-urbesetzungen.htm"} {cilea, webpage, "http://www.naxos.com/composer/btm.asp?fullname=Cilea,%20Francesco"} / naxos web {cilea, webpage, "http://www.operone.de/komponist/cilea.html"} [faccio : composer = "Faccio, Franco" = "Franco Faccio" / normal = "Faccio" / short-name @"http://psi.ontopedia.net/Franco_Faccio"] {faccio, article, "http://en.wikipedia.org/wiki/Franco_Faccio"} {faccio, date-of-birth, [[1840-03-08]]} {faccio, date-of-death, [[1891-07-21]]} {faccio, webpage, "http://www.operone.de/komponist/faccio.html"} [franchetti : composer = "Franchetti, Alberto" = "Alberto Franchetti" / normal = "Franchetti" / short-name @"http://psi.ontopedia.net/Alberto_Franchetti"] {franchetti, article, "http://en.wikipedia.org/wiki/Alberto_Franchetti"} {franchetti, date-of-birth, [[1860-09-18]]} {franchetti, date-of-death, [[1942-08-04]]} {franchetti, illustration, "http://localhost:8080/operamap/occurs/composer/franchetti.gif"} / local {franchetti, webpage, "http://www.esdf-opera.de/komponisten/franchetti/franchetti-urbesetzungen.htm"} {franchetti, webpage, "http://www.operone.de/komponist/franchetti.html"} /* fixme: possible additional works by Franchetti -- Other works which might qualify (or are they operettas?): Il finto paggio - commedia musicale (komponiert 1924; nicht aufgefhrt) Fornzan Il Gonfaloniere (komp. 1927, unvollendet) Forzano Kermesse (Beteiligung an einer Gemeinschaftskpmposition (azione coreografica: Festspiel) Fiori del Brabante (Szenarium: Forzano), zu Ehren der Hochzeit von Umberto di Savoia und Maria Jos von Belgien) 1930 Turin Don Napoleone (auch Don Bonaparte) opera comica (1941 vollendet; nicht aufgefhrt) Forzano Maria Egiziaca (unvollendet, vielleicht vernichtet, nicht aufgefhrt) */ [giordano : composer = "Giordano, Umberto" = "Umberto Giordano" / normal = "Giordano" / short-name @"http://psi.ontopedia.net/Umberto_Giordano"] {giordano, article, "http://en.wikipedia.org/wiki/Umberto_Giordano"} {giordano, article, "http://www.ontopia.net/topicmaps/examples/opera/occurs/snl/giordano.htm"} / web snl {giordano, date-of-birth, [[1867-08-28]]} {giordano, date-of-death, [[1948-11-12]]} {giordano, illustration, "http://localhost:8080/operamap/occurs/composer/giordano.gif"} / local {giordano, webpage, "http://www.esdf-opera.de/komponisten/giordano/giordano-urbesetzungen.htm"} {giordano, webpage, "http://www.naxos.com/composer/btm.asp?fullname=Giordano,%20Umberto"} / naxos web {giordano, webpage, "http://www.operone.de/komponist/giordano.html"} [leoncavallo : composer = "Leoncavallo, Ruggero" = "Ruggero Leoncavallo" / normal = "Leoncavallo" / short-name @"http://psi.ontopedia.net/Ruggero_Leoncavallo"] {leoncavallo, article, "http://en.wikipedia.org/wiki/Ruggero_Leoncavallo"} {leoncavallo, article, "http://www.ontopia.net/topicmaps/examples/opera/occurs/snl/leoncavallo.htm"} / web snl {leoncavallo, date-of-birth, [[1858-03-08]]} / incorrect ~ leoncavallo-date-of-birth {leoncavallo, date-of-birth, [[1857-04-25]]} {leoncavallo, date-of-death, [[1919-08-09]]} {leoncavallo, illustration, "http://localhost:8080/operamap/occurs/composer/leoncavallo.gif"} / local {leoncavallo, webpage, "http://www.esdf-opera.de/komponisten/leoncavallo/leoncavallo-urbesetzungen.htm"} {leoncavallo, website, "http://www.leoncavallo.ch"} {leoncavallo, webpage, "http://www.naxos.com/composer/btm.asp?fullname=Leoncavallo,%20Ruggiero"} / naxos web {leoncavallo, webpage, "http://www.operone.de/komponist/leoncavallo.html"} / web [leoncavallo-date-of-birth = "Leoncavallo's date of birth"] {leoncavallo-date-of-birth, note, [["Both in interviews and in 'Appunti', Leoncavallo consistently gave his birthday as March 8, 1858, a date that appears in many reference works, although his actual birth date of April 25, 1857, has been well documented." (Mallach 2007:379)]]} [leoni : composer = "Leoni, Franco" = "P. Gournard" / nom-de-plume = "C. Chewski" / nom-de-plume = "Frances Lewis" / nom-de-plume = "Franco Leoni" / normal = "Leoni" / short-name @"http://psi.ontopedia.net/Franco_Leoni"] {leoni, article, "http://en.wikipedia.org/wiki/Franco_Leoni"} {leoni, date-of-birth, [[1864-10-24]]} {leoni, date-of-death, [[1949-02-08]]} {leoni, illustration, "http://localhost:8080/operamap/occurs/composer/leoni.jpg"} / local {leoni, note, [[There is some uncertainty about Leoni's date of death. Some sources give 1938-11-11. Also a pupil of Dominiceti.]]} {leoni, webpage, "http://opera.stanford.edu/Leoni/main.html"} {leoni, webpage, "http://www.operone.de/komponist/leoni.html"} / web /* fixme: add Gaetano Luporini? {la-collana-di-pasqua, libretto, "http://dante.di.unipi.it/ricerca/libretti/collana.html"} / web {i-dispetti-amorosi, libretto, "http://dante.di.unipi.it/ricerca/libretti/dispetti.html"} / web */ [mascagni : composer = "Mascagni, Pietro" = "Pietro Mascagni" / normal = "Mascagni" / short-name @"http://psi.ontopedia.net/Mascagni"] {mascagni, article, "http://en.wikipedia.org/wiki/Pietro_Mascagni"} {mascagni, article, "http://www.ontopia.net/topicmaps/examples/opera/occurs/snl/mascagni.htm"} / web snl {mascagni, bibref, [[Mallach, Alan: "Pietro Mascagni and His Operas", Northeastern University Press (Boston, 2002)]]} {mascagni, date-of-birth, [[1863-12-07]]} {mascagni, date-of-death, [[1945-08-02]]} {mascagni, note, [[Also a pupil of Michele Saladino.]]} {mascagni, illustration, "http://localhost:8080/operamap/occurs/composer/mascagni.gif"} / local {mascagni, webpage, "http://www.esdf-opera.de/komponisten/mascagni/mascagni-urbesetzungen.htm"} {mascagni, website, "http://www.mascagni.org"} / mascagni.org web {mascagni, webpage, "http://www.naxos.com/composer/btm.asp?fullname=Mascagni,%20Pietro"} / naxos web {mascagni, webpage, "http://www.operone.de/komponist/mascagni.html"} / web [montemezzi : composer = "Montemezzi, Italo" = "Italo Montemezzi" / normal = "Montemezzi" / short-name @"http://psi.ontopedia.net/Italo_Montemezzi"] {montemezzi, article, "http://en.wikipedia.org/wiki/Italo_Montemezzi"} /web wikipedia {montemezzi, date-of-birth, [[1875-05-31]]} {montemezzi, date-of-death, [[1952-05-15]]} {montemezzi, illustration, "http://localhost:8080/operamap/occurs/composer/montemezzi.gif"} / local [ponchielli : composer = "Ponchielli, Amilcare" = "Amilcare Ponchielli" / normal = "Ponchielli" / short-name @"http://psi.ontopedia.net/Amilcare_Ponchielli"] {ponchielli, article, "http://en.wikipedia.org/wiki/Amilcare_Ponchielli"} {ponchielli, article, "http://www.ontopia.net/topicmaps/examples/opera/occurs/snl/ponchielli.htm"} / web snl {ponchielli, date-of-birth, [[1834-08-31]]} {ponchielli, date-of-death, [[1886-01-17]]} {ponchielli, illustration, "http://localhost:8080/operamap/occurs/composer/ponchielli.gif"} / local {ponchielli, webpage, "http://www.naxos.com/composer/btm.asp?fullname=Ponchielli,%20Amilcare"} / naxos web {ponchielli, webpage, "http://www.operone.de/komponist/poncielli.html"} / web [puccini : composer = "Puccini, Giacomo" = "Giacomo Puccini" / normal = "Puccini" / short-name @"http://psi.ontopedia.net/Puccini"] {puccini, article, "http://en.wikipedia.org/wiki/Giacomo_Puccini"} {puccini, article, "http://www.ontopia.net/topicmaps/examples/opera/occurs/snl/puccini.htm"} / web snl {puccini, bibref, [[Budden, Julian: "Puccini: His Life and Works", Oxford University Press (Oxford, 2002)]]} {puccini, bibref, [[Sadie, Stanley (ed): "Puccini and His Operas", Macmillan (London, 2000)]]} {puccini, date-of-birth, [[1858-12-22]]} {puccini, date-of-death, [[1924-11-29]]} {puccini, gallery, "http://localhost:8080/operamap/occurs/puccini-gallery.htm"} / local {puccini, illustration, "http://localhost:8080/operamap/occurs/composer/puccini.gif"} / local {puccini, sound-clip, "http://www.puccini.it/files/vocepucc.wav"} / italian web puccini-study-centre {puccini, webpage, "http://localhost:8080/operamap/occurs/hnh-puccini.htm"} / naxos local {puccini, webpage, "http://www.naxos.com/composer/btm.asp?fullname=Puccini,%20Giacomo"} / naxos web {puccini, webpage, "http://www.operone.de/komponist/puccini.html"} / web {puccini, webpage, "http://www.r-ds.com/opera/pucciniana/gallery.htm"} / web r-ds {puccini, website, "http://www.landofpuccini.com"} {puccini, website, "http://www.puccini.it"} / italian web puccini-study-centre [smareglia : composer = "Smareglia, Antonio" = "Antonio Smareglia" / normal = "Smareglia" / short-name ] {smareglia, article, "http://en.wikipedia.org/wiki/Antonio_Smareglia"} {smareglia, date-of-birth, [[1854-05-05]]} {smareglia, date-of-death, [[1929-04-15]]} [verdi : composer = "Verdi, Giuseppe" = "Giuseppe Verdi" / normal = "Verdi" / short-name @"http://psi.ontopedia.net/Giuseppe_Verdi"] {verdi, article, "http://en.wikipedia.org/wiki/Giuseppe_Verdi"} {verdi, article, "http://www.ontopia.net/topicmaps/examples/opera/occurs/snl/verdi.htm"} / web snl {verdi, date-of-birth, [[1813-10-10]]} {verdi, date-of-death, [[1901-01-27]]} {verdi, illustration, "http://localhost:8080/operamap/occurs/composer/verdi.gif"} / local {verdi, webpage, "http://www.giuseppeverdi.it/verdi/"} / italian land-of-verdi web {verdi, webpage, "http://www.naxos.com/composer/btm.asp?fullname=Verdi,%20Giuseppe"} / naxos web {verdi, webpage, "http://www.operone.de/komponist/verdi.html"} / web /* fixme: add Wolf-Ferrari? [wolf-ferrari : composer = "Wolf-Ferrari, Ermanno" = "Ermanno Wolf-Ferrari" / normal = "Wolf-Ferrari" / short-name ] Sly, ovvero La leggenda del dormiente risvegliato (1927) Forzano I gioielli della Madonna (1911) Zangarini, Golisciani */ [zandonai : composer = "Zandonai, Riccardo" = "Riccardo Zandonai" / normal = "Zandonai" / short-name] {zandonai, date-of-birth, [[1883-05-30]]} {zandonai, date-of-death, [[1944-06-05]]} {zandonai, illustration, "http://localhost:8080/operamap/occurs/composer/zandonai.jpg"} / local {zandonai, webpage, "http://www.operone.de/komponist/zandonai.html"} / web {zandonai, webpage, "http://opera.stanford.edu/opera/Zandonai/main.html"} /* fixme: additional composers -- Pizzetti?, Vittadini? (see also http://www.esdf-opera.de) */ /* -- TT: conservatory -- */ [milan-conservatory : conservatory = "Milan Conservatory"] /* -- TT: country -- */ [argentina : country = "Argentina" @"http://www.topicmaps.org/xtm/1.0/country.xtm#AR"] [austria : country = "Austria" @"http://www.topicmaps.org/xtm/1.0/country.xtm#AT"] [belarus : country = "Belarus" @"http://www.topicmaps.org/xtm/1.0/country.xtm#BY"] [belgium : country = "Belgium" @"http://www.topicmaps.org/xtm/1.0/country.xtm#BE"] [china : country = "China" @"http://www.topicmaps.org/xtm/1.0/country.xtm#CN"] [croatia : country = "Croatia" @"http://www.topicmaps.org/xtm/1.0/country.xtm#HR"] [cyprus : country = "Cyprus" @"http://www.topicmaps.org/xtm/1.0/country.xtm#CY"] [czech-republic : country = "Czech Republic" @"http://www.topicmaps.org/xtm/1.0/country.xtm#CZ"] [egypt : country = "Egypt" @"http://www.topicmaps.org/xtm/1.0/country.xtm#EG"] [england : country region = "England" @"http://psi.ontopedia.net/England"] [france : country = "France" @"http://www.topicmaps.org/xtm/1.0/country.xtm#FR"] [germany : country = "Germany" @"http://www.topicmaps.org/xtm/1.0/country.xtm#DE"] [greece : country = "Greece" @"http://www.topicmaps.org/xtm/1.0/country.xtm#GR"] [hungary : country = "Hungary" @"http://www.topicmaps.org/xtm/1.0/country.xtm#HU"] [india : country = "India" @"http://www.topicmaps.org/xtm/1.0/country.xtm#IN"] [israel : country = "Israel" @"http://www.topicmaps.org/xtm/1.0/country.xtm#IL"] [italy : country = "Italy" @"http://www.topicmaps.org/xtm/1.0/country.xtm#IT"] [japan : country = "Japan" @"http://www.topicmaps.org/xtm/1.0/country.xtm#JP"] [lithuania : country = "Lithuania" @"http://www.topicmaps.org/xtm/1.0/country.xtm#LT"] [monaco : country = "Monaco" @"http://www.topicmaps.org/xtm/1.0/country.xtm#MC"] [netherlands : country = "Netherlands" @"http://www.topicmaps.org/xtm/1.0/country.xtm#NL"] [palestine : country = "Palestine"] [peru : country = "Peru" @"http://www.topicmaps.org/xtm/1.0/country.xtm#PE"] [poland : country = "Poland" @"http://www.topicmaps.org/xtm/1.0/country.xtm#PL"] [russia : country = "Russia" @"http://www.topicmaps.org/xtm/1.0/country.xtm#RU"] [scotland : country region = "Scotland" @"http://psi.ontopedia.net/Scotland"] [spain : country = "Spain" @"http://www.topicmaps.org/xtm/1.0/country.xtm#ES"] [sweden : country = "Sweden" @"http://www.topicmaps.org/xtm/1.0/country.xtm#SE"] [switzerland : country = "Switzerland" @"http://www.topicmaps.org/xtm/1.0/country.xtm#CH"] [syria : country = "Syria" @"http://www.topicmaps.org/xtm/1.0/country.xtm#SY"] [turkey : country = "Turkey" @"http://www.topicmaps.org/xtm/1.0/country.xtm#TU"] [united-kingdom : country = "United Kingdom" @"http://www.topicmaps.org/xtm/1.0/country.xtm#GB"] [usa : country = "USA" @"http://www.topicmaps.org/xtm/1.0/country.xtm#US"] [wales : country region = "Wales" @"http://psi.ontopedia.net/Wales"] /* -- TT: dictionary -- */ [dizionario-dell-opera : dictionary = "Dizionario dell'Opera"] {dizionario-dell-opera, bibref, [[Gelli, Piero: "Dizionario dell'opera", Baldini & Castoldi s.r.l. Editori (Milano, 1996)]]} /* -- TT: domain -- */ [biography : domain = "Biography" = "Biografi" / norwegian @"http://psi.ontopedia.net/Biography"] [geography : domain = "Geography" = "Geografi" / norwegian @"http://psi.ontopedia.net/Geography"] [history : domain = "History" = "Historie" / norwegian @"http://psi.ontopedia.net/History"] [literature : domain = "Literature" = "Litteratur" / norwegian @"http://psi.ontopedia.net/Literature"] [music : domain = "Music" = "Musikk" / norwegian @"http://psi.ontopedia.net/Music"] [ontology : domain = "Ontology" = "Ontologi" / norwegian] /* -- TT: event -- */ [french-revolution : event = "The French Revolution" = "Den franske revolusjonen" / norwegian] [roman-empire : event = "The Roman Empire" = "Det romerske imperiet" / norwegian] /* -- TT: fairy tale -- */ [ib-and-little-christina-src : fairy-tale = "Ib and Little Christina (H.C. Andersen)" = "Ib and Little Christina" / fairy-tale andersen short-name] /* -- TT: language -- */ [croatian : language = "Croatian" = "hr" / iso639-1 = "src" / iso639-2b = "hrv" / iso639-2t = "Kroatisk" / norwegian @"http://www.topicmaps.org/xtm/1.0/language.xtm#hr"] [czech : language = "Czech" = "cs" / iso639-1 = "ces" / iso639-2b iso639-2t = "Tsjekkisk" / norwegian = "ÄÂŒeÅ¡tina" / czech @"http://www.topicmaps.org/xtm/1.0/language.xtm#cs"] [dutch : language = "Dutch" = "nl" / iso639-1 = "dut" / iso639-2b = "nld" / iso639-2t = "Nederlandsk" / norwegian @"http://www.topicmaps.org/xtm/1.0/language.xtm#nl"] [english : language = "English" = "en" / iso639-1 = "eng" / iso639-2b iso639-2t = "Engelsk" / norwegian @"http://www.topicmaps.org/xtm/1.0/language.xtm#en"] [finnish : language = "Finnish" = "fi" / iso639-1 = "fin" / iso639-2b iso639-2t = "Finsk" / norwegian @"http://www.topicmaps.org/xtm/1.0/language.xtm#fi"] [french : language = "French" = "fr" / iso639-1 = "fre" / iso639-2b = "fra" / iso639-2t = "Fransk" / norwegian @"http://www.topicmaps.org/xtm/1.0/language.xtm#fr"] [german : language = "German" = "de" / iso639-1 = "deu" / iso639-2b iso639-2t = "Tysk" / norwegian @"http://www.topicmaps.org/xtm/1.0/language.xtm#de"] [hebrew : language = "Hebrew" = "he" / iso639-1 = "heb" / iso639-2b iso639-2t = "Hebraisk" / norwegian @"http://www.topicmaps.org/xtm/1.0/language.xtm#he"] [hungarian : language = "Hungarian" = "hu" / iso639-1 = "hun" / iso639-2b iso639-2t = "Ungarsk" / norwegian @"http://www.topicmaps.org/xtm/1.0/language.xtm#hu"] [icelandic : language = "Icelandic" = "Islandsk" / icelandic = "is" / iso639-1 = "ice" / iso639-2b = "isl" / iso639-2t @"http://www.topicmaps.org/xtm/1.0/language.xtm#is"] [italian : language = "Italian" = "it" / iso639-1 = "ita" / iso639-2b iso639-2t = "Italiensk" / norwegian @"http://www.topicmaps.org/xtm/1.0/language.xtm#it"] [japanese : language = "Japanese" = "ja" / iso639-1 = "jpn" / iso639-2b iso639-2t = "Japansk" / norwegian @"http://www.topicmaps.org/xtm/1.0/language.xtm#ja"] [korean : language = "Korean" = "ko" / iso639-1 = "kor" / iso639-2b iso639-2t = "Koreansk" / norwegian @"http://www.topicmaps.org/xtm/1.0/language.xtm#ko"] [norwegian : language = "Norwegian" = "no" / iso639-1 = "nor" / iso639-2b iso639-2t = "Norsk" / norwegian @"http://www.topicmaps.org/xtm/1.0/language.xtm#no"] [polish : language = "Polish" = "pl" / iso639-1 = "pol" / iso639-2b iso639-2t = "Polsk" / norwegian @"http://www.topicmaps.org/xtm/1.0/language.xtm#pl"] [russian : language = "Russian" = "ru" / iso639-1 = "rus" / iso639-2b iso639-2t = "Russisk" / norwegian @"http://www.topicmaps.org/xtm/1.0/language.xtm#ru"] [sanskrit : language = "Sanskrit" = "sa" / iso639-1 = "san" / iso639-2b iso639-2t = "Sanskrit" / norwegian @"http://www.topicmaps.org/xtm/1.0/language.xtm#sa"] [spanish : language = "Spanish" = "es" / iso639-1 = "spa" / iso639-2b iso639-2t = "Spansk" / norwegian @"http://www.topicmaps.org/xtm/1.0/language.xtm#es"] [swedish : language = "Swedish" = "se" / iso639-1 = "swe" / iso639-2b iso639-2t = "Svensk" / norwegian @"http://www.topicmaps.org/xtm/1.0/language.xtm#se"] [welsh : language = "Welsh" = "cy" / iso639-1 = "wel" / iso639-2b = "cym" / iso639-2t = "Walisisk" / norwegian @"http://www.topicmaps.org/xtm/1.0/language.xtm#cy"] /* -- TT: librettist -- */ [ackerman : librettist = "Ackerman, William" = "William Ackerman" / normal = "Ackerman" / short-name] {ackerman, date-of-birth, [[(unknown)]]} {ackerman, date-of-death, [[(unknown)]]} [adami : librettist = "Adami, Giuseppe" = "Giuseppe Adami" / normal = "Adami" / short-name] {adami, biographical-article, "http://localhost:8080/operamap/occurs/librettist/adami.html"} / local {adami, date-of-birth, [[1878-11-04]]} {adami, date-of-death, [[1946-10-12]]} [benco : librettist = "Benco, Silvio" = "Silvio Benco" / normal = "Benco" / short-name @"http://psi.ontopedia.net/Silvio_Benco"] {benco, article, "http://it.wikipedia.org/wiki/Silvio_Benco"} / italian {benco, date-of-birth, [[1874-11-22]]} {benco, date-of-death, [[1949-03-09]]} [benelli : librettist = "Benelli, Sem" = "Sem Benelli" / normal = "Benelli" / short-name] {benelli, date-of-birth, [[1877-08-10]]} {benelli, date-of-death, [[1949-12-18]]} [bey : librettist = "Mariette (Bey), August" = "August Mariette (Bey)" / normal = "Mariette (Bey)" / short-name] {bey, date-of-birth, [[1821]]} {bey, date-of-death, [[1881]]} [bognasco : librettist = "Bognasco, G. di" = "G. di Bognasco" / normal = "Bognasco" / short-name] {bognasco, date-of-birth, [[(unknown)]]} {bognasco, date-of-death, [[(unknown)]]} [cain : librettist = "Cain, Henri" = "Henri Cain" / normal = "Cain" / short-name] {cain, date-of-birth, [[1859]]} {cain, date-of-death, [[1937]]} [cammarano : librettist = "Cammarano, Salvatore" = "Salvatore Cammarano" / normal = "Cammarano" / short-name] {cammarano, date-of-birth, [[1801-03-19]]} {cammarano, date-of-death, [[1852-07-17]]} [castelnova : librettist = "Castelnova, Leo di" = "Leo di Castelnova" / normal = "Leopoldo Pullè" / real-name = "Castelnova" / short-name] {castelnova, date-of-birth, [[1835]]} {castelnova, date-of-death, [[1917]]} [choudens : librettist = "Choudens, Paul de" = "Bérel, Paul"; "Berel, Paul" / nom-de-plume = "Paul de Choudens" / normal = "Choudens" / short-name] {choudens, date-of-birth, [[1850]]} {choudens, date-of-death, [[1925]]} [civinini : librettist = "Civinini, Guelfo" = "Guelfo Civinini" / normal = "Civinini" / short-name] {civinini, date-of-birth, [[1873-08-01]]} {civinini, date-of-death, [[1954-04-10]]} [colautti : librettist = "Colautti, Arturo" = "Arturo Colautti" / normal = "Colautti" / short-name] {colautti, date-of-birth, [[1851]]} {colautti, date-of-death, [[1914-11-09]]} [dannunzio : librettist playwright = "d'Annunzio, Gabriele"; "Annunzio, Gabriele" = "Gabriele d'Annunzio" / normal = "d'Annunzio" / short-name = "Gaetano Rapagnetta" / real-name @"http://psi.ontopedia.net/Gabriele_d'Annunzio"] {dannunzio, article, "http://en.wikipedia.org/wiki/Gabriele_d'Annunzio"} {dannunzio, date-of-birth, [[1863-03-12]]} {dannunzio, date-of-death, [[1938-03-01]]} [dangelantonio : librettist = "d'Angelantonio, Francesco";"Angelantonio" = "Francesco d'Angelantonio" / normal = "d'Angelantonio";"Angelantonio" / short-name @"http://psi.ontopedia.net/Francesco_d'Angelantonio"] {dangelantonio, date-of-birth, [[(unknown)]]} {dangelantonio, date-of-death, [[(unknown)]]} [daspuro : librettist = "Daspuro, Nicola" = "Nicola Daspuro" / normal = "Daspuro" / short-name] {daspuro, date-of-birth, [[1853-01-19]]} {daspuro, date-of-death, [[1941-12-13]]} [datri : librettist = "d'Atri, Nicola" = "Nicola d'Atri" / normal = "d'Atri" / short-name] {datri, date-of-birth, [[(unknown)]]} {datri, date-of-death, [[(unknown)]]} [depanis : librettist = "Depanis, Giuseppe" = "Giuseppe Depanis" / normal = "Depanis" / short-name] {depanis, date-of-birth, [[(unknown)]]} {depanis, date-of-death, [[(unknown)]]} [dormeville : librettist = "d'Ormeville, Carlo"; "Ormeville, Carlo" = "Carlo d'Ormeville" / normal = "d'Ormeville" / short-name] {dormeville, date-of-birth, [[1840-04-24]]} {dormeville, date-of-death, [[1924-07-29]]} [duveyrier : librettist = "Duveyrier, Charles" = "Charles Duveyrier" / normal = "Duveyrier" / short-name] {duveyrier, date-of-birth, [[1803]]} {duveyrier, date-of-death, [[1866]]} {duveyrier, note, [[Apparently the son of Honore-Nicolas-Marie Duveyrier (librettist of Cherubini's opera Koukourgi) and brother of Charles Duveyrier (librettist of Les Vêpres siciliennes).]]} /* fr. Forf., ovenn.'s Broder (1803-66). D. studerede Jura, blev Advokat og viste sig tidlig som en ivrig Tilhænger af Saint-Simonisternes Lære, sluttede sig især til Enfantin og blev 1832 idømt et Aars Fængsel for at have krænket den offentlige Sædelighed ved en Artikel i "Globe" om Kvindens Stilling. Indtil 1845 var han Generalfængselsinspektør, startede 1848 et nyt socialistisk Blad "Le crédit" og deltog under Kejserdømmet i den industrielle Bevægelse. Tillige udfoldede han en betydelig dram. Skribentvirksomhed, dels alene, dels med sin Broder og andre Medarbejdere. Hans selvstændige Stykker "Le monomane" og "L'ingénieur" havde intet Held med sig. Af de senere kan nævnes: "Faute de s'entendre" (1838), "Le comité de bienfaisance" (1839, med J. de Wally), "Oscar, ou le mari qui trompe sa femme" (1842, med Scribe), "Le toréador" (1845), "Les vêpres siciliennes" (1855, med Scribe), "Lady Seymour" o.a. Af hans socialpolitiske Skr anføres: "Pourquoi des propriétaires à Paris" (1857), "L'avenir et les Bonapartes" (1864) og "La civilisation et la démocratie française" (1865). Salmonsens konversationsleksikon, Anden Udgave, Bind VI, 1917 */ [falena : librettist = "Falena, Ugo" = "Ugo Falena" / normal = "Falena" / short-name] {falena, date-of-birth, [[1875-04-25]]} {falena, date-of-death, [[1931-09-20]]} [fontana : librettist playwright = "Fontana, Ferdinando" = "Ferdinando Fontana" / normal = "Fontana" / short-name] {fontana, date-of-birth, [[1850-01-30]]} {fontana, date-of-death, [[1919-05-12]]} [forzano : librettist producer = "Forzano, Giovacchino" = "Giovacchino Forzano" / normal = "Forzano" / short-name] {forzano, date-of-birth, [[1884-11-19]]} {forzano, date-of-death, [[1970-10-18]]} [franci : librettist = "Franci, Arturo" = "Arturo Franci" / normal = "Franci" / short-name] {franci, date-of-birth, [[(unknown)]]} {franci, date-of-death, [[(unknown)]]} [ghisalberti : librettist = "Ghisalberti, M." = "M. Ghisalberti" / normal = "Ghisalberti" / short-name] {ghisalberti, date-of-birth, [[(unknown)]]} {ghisalberti, date-of-death, [[(unknown)]]} [ghislanzoni : librettist = "Ghislanzoni, Antonio" = "Antonio Ghislanzoni" / normal = "Ghislanzoni" / short-name] {ghislanzoni, date-of-birth, [[1824-11-25]]} {ghislanzoni, date-of-death, [[1893-07-16]]} [giachetti : librettist = "Giachetti, Giorgio" = "Giorgio Giachetti" / normal = "Giachetti" / short-name] {giachetti, date-of-birth, [[(unknown)]]} {giachetti, date-of-death, [[(unknown)]]} [giacosa : librettist playwright = "Giacosa, Giuseppe" = "Giuseppe Giacosa" / normal = "Giacosa" / short-name] {giacosa, date-of-birth, [[1847-10-21]]} {giacosa, date-of-death, [[1906-09-01]]} [golisciani : librettist = "Golisciani, Enrico" = "Enrico Golisciani" / normal = "Golisciani" / short-name] {golisciani, date-of-birth, [[1848]]} {golisciani, date-of-death, [[1919]]} [guidi : librettist = "Guidi, Francesco" = "Francesco Guidi" / normal = "Guidi" / short-name] {guidi, date-of-birth, [[(unknown)]]} {guidi, date-of-death, [[(unknown)]]} [hanau : librettist = "Hanau, Cesare" = "Cesare Hanau" / normal = "Hanau" / short-name] {hanau, date-of-birth, [[(unknown)]]} {hanau, date-of-death, [[(unknown)]]} [hood : librettist = "Hood, Basil" = "Basil Hood" / normal = "Hood" / short-name @"http://psi.ontopedia.net/Basil_Hood"] {hood, article, "http://en.wikipedia.org/wiki/Basil_Hood"} {hood, date-of-birth, [[1864-04-05]]} {hood, date-of-death, [[1917-08-07]]} [illica : librettist playwright = "Illica, Luigi" = "Luigi Illica" / normal = "Illica" / short-name @"http://psi.ontopedia.net/Luigi_Illica"] {illica, biographical-article, "http://localhost:8080/operamap/occurs/librettist/illica.html"} / local {illica, article, "http://en.wikipedia.org/wiki/Luigi_Illica"} {illica, date-of-birth, [[1857-05-09]]} {illica, date-of-death, [[1919-12-16]]} {illica, note, [[Complete list of libretti available at http://www.puccini.it/scientifica/illicat.htm. See also Catalogo dei libretti di LUIGI ILLICA at http://193.204.255.27/operaliber/index.php?page=/operaLiber/Illica.]]} [linati : librettist = "Linati, Carlo" = "Carlo Linati" / normal = "Linati" / short-name] {linati, article, "http://it.wikipedia.org/wiki/Carlo_Linati"} / italian {linati, date-of-birth, [[1878-04-25]]} {linati, date-of-death, [[1949-12-11]]} [locle : librettist = "Locle, Camille du" = "Camille du Locle" / normal = "Locle" / short-name] {locle, date-of-birth, [[1832-07-16]]} {locle, date-of-death, [[1903-12-09]]} [lombardo : librettist = "Lombardo, Carlo" = "Carlo Lombardo" / normal = "Lombardo" / short-name] {lombardo, date-of-birth, [[1869-11-28]]} {lombardo, date-of-death, [[1959-12-19]]} [maffei : librettist = "Maffei, Andrea" = "Andrea Maffei" / normal = "Maffei" / short-name] {maffei, date-of-birth, [[1798-04-19]]} {maffei, date-of-death, [[1885-11-27]]} [marenco : librettist = "Marenco, Leopoldo" = "Leopoldo Marenco" / normal = "Marenco" / short-name] {marenco, date-of-birth, [[1831-11-08]]} {marenco, date-of-death, [[1899-04-30]]} [menasci : librettist = "Menasci, Guido" = "Guido Menasci" / normal = "Menasci" / short-name] {menasci, date-of-birth, [[1867-03-24]]} {menasci, date-of-death, [[1925-12-27]]} [mery : librettist = "Méry, Joseph" = "Joseph Méry" / normal = "Méry" / short-name] {mery, date-of-birth, [[1797-01-21]]} {mery, date-of-death, [[1865-06-17]]} [moschino : librettist = "Moschino, Ettore" = "Ettore Moschino" / normal = "Moschino" / short-name] {moschino, date-of-birth, [[1887-10-20]]} {moschino, date-of-death, [[1941-04-05]]} {moschino, note, [[Grove gives his name as E. Moschini, but most other sources, have the surname Moschino.]]} [nessi : librettist = "Nessi Angelo" = "Angelo Nessi" / normal = "Nessi" / short-name] {nessi, date-of-birth, [[1873-04-11]]} {nessi, date-of-death, [[1932-12-02]]} {nessi, webpage, "http://www.ricercamusica.ch/dizionario/629.html"} / italian web [oliva : librettist = "Oliva, Domenico" = "Domenico Oliva" / normal = "Oliva" / short-name] {oliva, date-of-birth, [[1860-06-01]]} {oliva, date-of-death, [[1917-04-28]]} [piave : librettist = "Piave, Francesco Maria" = "Francesco Maria Piave" / normal = "Piave" / short-name] {piave, biographical-article, "http://localhost:8080/operamap/occurs/librettist/piave.html"} / local {piave, date-of-birth, [[1810-05-18]]} {piave, date-of-death, [[1876-03-05]]} [piazza : librettist = "Piazza, Antonio" = "Antonio Piazza" / normal = "Piazza" / short-name] {piazza, date-of-birth, [[1742]]} {piazza, date-of-death, [[1825]]} [pozza : librettist = "Pozza, Felice" = "Felice Pozza" / normal = "Pozza" / short-name = "F. Fulgonia" / nom-de-plume] {pozza, date-of-birth, [[(unknown)]]} {pozza, date-of-death, [[(unknown)]]} [praga-marco : librettist = "Praga, Marco" = "Marco Praga" / normal = "Praga" / short-name] {praga-marco, date-of-birth, [[1862-06-20]]} {praga-marco, date-of-death, [[1929-01-31]]} [praga-emilio : writer = "Praga, Emilio" = "Emilio Praga" / normal = "Praga" / short-name @"http://psi.ontopedia.net/Emilio_Praga"] {praga-emilio, article, "http://it.wikipedia.org/wiki/Emilio_Praga"} / italian {praga-emilio, date-of-birth, [[1839-12-18]]} {praga-emilio, date-of-death, [[1875-12-26]]} [ricordi : librettist = "Ricordi, Giulio" = "Giulio Ricordi" / normal = "Ricordi, G." / short-name] {ricordi, date-of-birth, [[1840-12-19]]} {ricordi, date-of-death, [[1912-06-06]]} [ricordi-tito : librettist = "Ricordi, Tito" = "Tito Ricordi" / normal = "Ricordi, T." / short-name] {ricordi-tito, date-of-birth, [[1865-05-17]]} {ricordi-tito, date-of-death, [[1933-03-13]]} [romagnoli : librettist = "Romagnoli, Ettore" = "Ettore Romagnoli" / normal = "Romagnoli" / short-name] {romagnoli, date-of-birth, [[1871]]} {romagnoli, date-of-death, [[1938]]} [romani : librettist = "Romani, Felice" = "Felice Romani" / normal = "Romani" / short-name] {romani, date-of-birth, [[1788-01-31]]} {romani, date-of-death, [[1865-01-28]]} {romani, note, [[Wrote over 100 librettos for Rossini, Donizetti, Bellini a.o.]]} [rossato : librettist = "Rossato, Arturo" = "Arturo Rossato" / normal = "Rossato" / short-name] {rossato, date-of-birth, [[(unknown)]]} {rossato, date-of-death, [[(unknown)]]} [royer : librettist = "Royer, Alphonse" = "Alphonse Royer" / normal = "Royer" / short-name] {royer, date-of-birth, [[1803]]} {royer, date-of-death, [[1875-04-11]]} [schwab : librettist = "Schwab, Marcel" = "Marcel Schwab" / normal = "Schwab" / short-name] {schwab, date-of-birth, [[(unknown)]]} {schwab, date-of-death, [[(unknown)]]} {schwab, note, [[Apparently a friend of Oscar Wilde. He may have revised the original French version of the latter's Salome (Ingleby, Leonard Creswell: Oscar Wilde. Some reminiscences (1912) p.186).]]} [scribe : librettist = "Scribe, Eugène" = "Eugène Scribe" / normal = "Scribe" / short-name] {scribe, date-of-birth, [[1791-12-24]]} {scribe, date-of-death, [[1861-02-20]]} {scribe, note, [[Wrote hundreds of libretti.]]} [simoni : librettist = "Simoni, Renato" = "Renato Simoni" / normal = "Simoni" / short-name] {simoni, date-of-birth, [[1875-09-05]]} {simoni, date-of-death, [[1952-07-05]]} [solera : librettist = "Solera, Temistocle" = "Temistocle Solera" / normal = "Solera" / short-name] {solera, biographical-article, "http://localhost:8080/operamap/occurs/librettist/solera.html"} / local {solera, date-of-birth, [[1815-12-25]]} {solera, date-of-death, [[1878-04-21]]} {solera, note, [[This guy seems to have led an interesting life; also composed operas; see CODO.]]} [somma : librettist = "Somma, Antonio" = "Antonio Somma" / normal = "Somma" / short-name] {somma, date-of-birth, [[1809-08-28]]} {somma, date-of-death, [[1864-08-08]]} [strani : librettist = "Strani, Z." = "Z. Strani" / normal = "Strani" / short-name] {strani, date-of-birth, [[(unknown)]]} {strani, date-of-death, [[(unknown)]]} [targioni-tozzetti : librettist = "Targioni-Tozzetti, Giovanni" = "Giovanni Targioni-Tozzetti" / normal = "Targioni-Tozzetti" / short-name] {targioni-tozzetti, biographical-article, "http://localhost:8080/operamap/occurs/librettist/targioni-tozzetti.html"} / local {targioni-tozzetti, date-of-birth, [[1863-03-17]]} {targioni-tozzetti, date-of-death, [[1934-05-30]]} [vaez : librettist = "Vaëz, Gustave" = "Gustave Vaëz" / normal = "Vaëz" / short-name] {vaez, date-of-birth, [[1812-12-06]]} {vaez, date-of-death, [[1862-03-12]]} [valle : librettist = "Valle, Vincenzo" = "Vincenzo Valle" / normal = "Valle" / short-name] {valle, date-of-birth, [[1857]]} {valle, date-of-death, [[1890]]} [vaucaire : librettist = "Vaucaire, Maurice" = "Maurice Vaucaire" / normal = "Vaucaire" / short-name] {vaucaire, date-of-birth, [[(unknown)]]} {vaucaire, date-of-death, [[(unknown)]]} [zanardini : librettist = "Zanardini, Angelo" = "Graziani, Anneldo" / nom-de-plume = "Anneldo Graziani" / nom-de-plume normal = "Angelo Zanardini" / normal = "Zanardini" / short-name] {zanardini, date-of-birth, [[1812-12-05]]} {zanardini, date-of-death, [[1893-03-07]]} [zangarini : librettist = "Zangarini, Carlo" = "Carlo Zangarini" / normal = "Zangarini" / short-name] {zangarini, date-of-birth, [[1874-12-09]]} {zangarini, date-of-death, [[1943-07-19]]} [zanoni : librettist = "Zanoni, Camillo" = "Camillo Zanoni" / normal = "Zanoni" / short-name] {zanoni, date-of-birth, [[(unknown)]]} {zanoni, date-of-death, [[(unknown)]]} /* -- TT: musician -- */ [angeloni : musician = "Angeloni, Carlo" = "Carlo Angeloni" / normal = "Angeloni" / short-name] {angeloni, date-of-birth, [[1834]]} {angeloni, date-of-death, [[1901]]} [bazzini : musician = "Bazzini, Antonio" = "Antonio Bazzini" / normal = "Bazzini" / short-name @"http://psi.ontopedia.net/Antonio_Bazzini"] {bazzini, date-of-birth, [[1818-03-11]]} {bazzini, date-of-death, [[1897-02-10]]} [tommasini : musician = "Tommasini, Vincenzo" = "Vincenzo Tommasini" / normal = "Tommasini" / short-name] /* NB Composed at least one opera (Uguale fortuna) */ {tommasini, article, "http://en.wikipedia.org/wiki/Vincenzo_Tommasini"} {tommasini, date-of-birth, [[1878-09-17]]} {tommasini, date-of-death, [[1950-12-23]]} [toscanini : musician = "Toscanini, Arturo" = "Arturo Toscanini" / normal = "Toscanini" / short-name] {toscanini, article, "http://en.wikipedia.org/wiki/Arturo_Toscanini"} {toscanini, date-of-birth, [[1867-03-25]]} {toscanini, date-of-death, [[1957-01-16]]} /* -- TT: literary-work -- */ [historia-de-las-indias : literary-work = "Historia de las Indias"] /* -- TT: nameform -- */ [normal : nameform = "Normal form" = "Normalform" / norwegian @"http://psi.ontopedia.net/normal"] [plural : nameform = "Plural name" @"http://psi.ontopedia.net/plural"] /* -- TT: nametype -- */ [altname : nametype = "Alternative name" = "Alternativnavn" / norwegian @"http://psi.ontopedia.net/alternative_name"] [former-name : nametype = "Former name" = "Forhenværende navn" / norwegian @"http://psi.ontopedia.net/former_name"] [full-name : nametype = "Full name" = "Fullt navn" / norwegian @"http://psi.ontopedia.net/full_name"] [nom-de-guerre : nametype = "Nom de guerre" @"http://psi.ontopedia.net/nom_de_guerre"] [nom-de-plume : nametype = "Nom de plume" @"http://psi.ontopedia.net/nom_de_plume"] {nom-de-plume, scope-note, "http://localhost:8080/operamap/occurs/nom-de-plume.htm"} / local {nom-de-plume, scope-note, "http://www.ontopia.net/topicmaps/examples/opera/occurs/nom-de-plume.htm"} / web [original-name : nametype = "Original name" = "Originalnavn" / norwegian @"http://psi.ontopedia.net/original_name"] [present-name : nametype = "Present name" = "Nåværende navn" / norwegian @"http://psi.ontopedia.net/present_name"] [real-name : nametype = "Real name" = "Egentlig navn" / norwegian @"http://psi.ontopedia.net/real_name"] [short-name : nametype = "Short name" = "Kortnavn" / norwegian @"http://psi.ontopedia.net/short_name"] /* -- TT: network-location -- */ [local : network-location = "Local" @"http://psi.ontopedia.net/Local"] [web : network-location = "Web" @"http://psi.ontopedia.net/Web"] /* -- TT: novel -- */ [from-the-house-of-the-dead : novel = "From the House of the Dead"] [geyer-wally : novel = "Die Geyer-Wally"; "Geyer-Wally"] [gosta-berlings-saga : novel = "Gösta Berlings Saga"] [harold : novel = "Harold, the Last of the Saxon Kings"] [i-promessi-sposi-src : novel = "I promessi sposi (novel)" = "I promessi sposi" / novel short-name] [la-dame-aux-camelias : novel = "La Dame aux Camélias"; "Dame aux Camélias"] [la-femme-et-le-pantin : novel = "La femme et le pantin" = "The woman and the puppet" / english] [lami-fritz : novel = "L'Ami Fritz"; "Ami Fritz"] [le-prince-zilah : novel = "Le Prince Zilah"] [les-willis : novel = "Les willis"; "Willis"] [manon-lescaut-src : novel = "L'histoire du chevalier des Grieux et de Manon Lescaut, par Monsieur D." = "L'histoire du chevalier..." / short-name] {manon-lescaut-src, note, [[The subject was also treated by Auber, 1856 (librettist: Scribe) and Massenet, 1884 (librettists: Henri Meilhac and Philippe Gille).]]} [resurrection : novel = "Resurrection"] [scenes-de-la-vie-de-boheme : novel = "Scènes de la vie de Bohème"; "Scenes de la vie de Boheme"] [two-little-wooden-shoes : novel = "Two Little Wooden Shoes"] /* -- TT: novella -- */ [adolphe : novella = "Adolphe" @"http://psi.ontopedia.net/Adolphe"] {adolphe, article, "http://en.wikipedia.org/wiki/Adolphe"} [giulietta-e-romeo-src : novella = "Giulietta e Romeo (da Porto)" = "Giulietta e Romeo" / da-porto short-name] {giulietta-e-romeo-src, note, [[Published 1530]]} [giulietta-e-romeo-src2 : novella = "Giulietta e Romeo (Bandello)" = "Giulietta e Romeo" / bandello short-name] {giulietta-e-romeo-src2, note, [[Published 1554]]} [histoire-de-romain-detretat : novella = "Histoire de Romain d'Etretat"] [o-voto : novella = "'O voto"; "O voto"] [rip-van-winkle-src : novella = "Rip van Winkle (novella)" = "Rip van Winkle" / novella] /* -- TT: opera -- */ [abisso : opera = "Abisso"] {abisso, premiere-date, [[1914-02-10]]} [adriana-lecouvreur : opera = "Adriana Lecouvreur" @"http://psi.ontopedia.net/Adriana_Lecouvreur"] {adriana-lecouvreur, article, "http://en.wikipedia.org/wiki/Adriana_Lecouvreur"} {adriana-lecouvreur, audio-recording, [[M2K 79310]]} {adriana-lecouvreur, illustration, "http://localhost:8080/ItalianOpera/occurs/opera/cilea/adriana-lecouvreur-poster.jpg"} / local {adriana-lecouvreur, libretto, "http://dante.di.unipi.it/ricerca/libretti/adriana.html"} / web {adriana-lecouvreur, premiere-date, [[1902-11-06]]} [aida : opera = "Aida" @"http://psi.ontopedia.net/Aida"] {aida, article, "http://en.wikipedia.org/wiki/Aida"} {aida, audio-recording, [[5 56246 2]]} {aida, illustration, "http://localhost:8080/ItalianOpera/occurs/opera/verdi/aida-poster.jpg"} / local {aida, libretto, "http://php.indiana.edu/~lneff/libretti/aida.html"} / lyle-neff web {aida, libretto, "http://www.giuseppeverdi.it/verdi/libretti/Aida.htm"} / italian land-of-verdi web {aida, note, [[Time period: the time of the pharoahs]]} {aida, premiere-date, [[1871-12-24]]} {aida, synopsis, "http://localhost:8080/operamap/occurs/a_syn.php3.htm"} / az-opera local {aida, synopsis, "http://www.azopera.com/learn/synopsis/aida.shtml"} / az-opera web {aida, synopsis, "http://www.metopera.org/synopses/aida.html"} / web operanews {aida, webpage, "http://opera.stanford.edu/opera/Verdi/Aida/main.html"} / web operaglass [alzira : opera = "Alzira" @"http://psi.ontopedia.net/Alzira"] {alzira, article, "http://en.wikipedia.org/wiki/Alzira"} {alzira, illustration, "http://localhost:8080/ItalianOpera/occurs/opera/verdi/alzira-score.jpg"} / local {alzira, libretto, "http://www.giuseppeverdi.it/verdi/libretti/Alzira.htm"} / italian land-of-verdi web {alzira, note, [[Time period: mid-sixteenth century]]} {alzira, premiere-date, [[1845-08-12]]} {alzira, webpage, "http://opera.stanford.edu/opera/Verdi/Alzira/main.html"} [amica : opera = "Amica"] {amica, illustration, "http://localhost:8080/ItalianOpera/occurs/opera/mascagni/amica-poster.jpg"} / local {amica, libretto, "http://www.mascagni.org/works/amica/libretto.html"} / mascagni.org web {amica, libretto, "http://dante.di.unipi.it/ricerca/libretti/amica.html"} / web {amica, premiere-date, [[1905-03-16]]} [amleto : opera = "Amleto" @"http://psi.ontopedia.net/Amleto"] {amleto, article, "http://en.wikipedia.org/wiki/Amleto"} {amleto, libretto, "http://www.anthonybarrese.com/amletolibretto.htm"} {amleto, premiere-date, [[1865-05-30]]} {amleto, webpage, "http://www.anthonybarrese.com/Amletoproject.htm"} [andrea-chenier : opera = "Andrea Chénier"; "Andrea Chenier" @"http://psi.ontopedia.net/Andrea_Chenier"] {andrea-chenier, article, "http://en.wikipedia.org/wiki/Andrea_Chenier"} {andrea-chenier, audio-recording, [[GD 82046]]} {andrea-chenier, libretto, "http://dante.di.unipi.it/ricerca/libretti/chenier.html"} / web {andrea-chenier, premiere-date, [[1896-03-28]]} {andrea-chenier, synopsis, "http://localhost:8080/operamap/occurs/ac_syn.php3.htm"} / az-opera local {andrea-chenier, synopsis, "http://www.azopera.com/learn/synopsis/chenier.shtml"} / az-opera web {andrea-chenier, synopsis, "http://www.metopera.org/synopses/chenier.html"} / web operanews {andrea-chenier, webpage, "http://opera.stanford.edu/opera/Giordano/AndreaChenier/main.html"} / web operaglass [aroldo : opera = "Aroldo" @"http://psi.ontopedia.net/Aroldo"] {aroldo, article, "http://en.wikipedia.org/wiki/Aroldo"} {aroldo, libretto, "http://www.giuseppeverdi.it/verdi/libretti/Aroldo.htm"} {aroldo, note, [[Time period: 1200 (c.)]]} {aroldo, premiere-date, [[1857-08-16]]} {aroldo, webpage, "http://opera.stanford.edu/opera/Verdi/Aroldo/main.html"} [asrael : opera = "Asrael" @"http://psi.ontopedia.net/Asrael"] {asrael, premiere-date, [[1886-02-11]]} {asrael, article, "http://en.wikipedia.org/wiki/Asrael"} [attila : opera = "Attila" = "Gli unni e i romani" / altname @"http://psi.ontopedia.net/Attila_(opera)"] {attila, article, "http://en.wikipedia.org/wiki/Attila_(opera)"} {attila, illustration, "http://localhost:8080/ItalianOpera/occurs/opera/verdi/attila-score.jpg"} / local {attila, libretto, "http://php.indiana.edu/~lneff/libretti/attila0.htm"} / lyle-neff web {attila, libretto, "http://www.giuseppeverdi.it/verdi/libretti/Attila.htm"} / italian land-of-verdi web {attila, note, [[Time period: 454 A.D.]]} {attila, premiere-date, [[1846-03-17]]} {attila, webpage, "http://opera.stanford.edu/opera/Verdi/Attila/main.html"} [bertrando-dal-bormio : opera = "Bertrando dal Bormio"] {bertrando-dal-bormio, premiere-date, [[1858]]} / not-performed [bianca : opera = "Bianca"] {bianca, premiere-date, [[1901]]} / not-performed [bianca-da-cervia : opera = "Bianca da Cervia"] {bianca-da-cervia, premiere-date, [[1882-02-07]]} [caccia-lontana : opera = "Caccia lontana"] {caccia-lontana, premiere-date, [[1875-08-10]]} [cavalleria-rusticana : opera = "Cavalleria Rusticana" @"http://psi.ontopedia.net/Cavalleria_rusticana"] {cavalleria-rusticana, audio-recording, [[429 568-2]]} {cavalleria-rusticana, libretto, "http://opera.stanford.edu/opera/Mascagni/Cavalleria/libretto.html"} / web operaglass {cavalleria-rusticana, libretto, "http://dante.di.unipi.it/ricerca/libretti/rusticana.html"} / web {cavalleria-rusticana, premiere-date, [[1890-05-17]]} {cavalleria-rusticana, synopsis, "http://www.metopera.org/synopses/cavpag.html"} / web operanews {cavalleria-rusticana, synopsis, "http://www.opera.it/Operaweb/it/cavalleriarusticana/trama.html"} / italian web operaweb {cavalleria-rusticana, webpage, "http://opera.stanford.edu/opera/Mascagni/Cavalleria/main.html"} / web operaglass [chatterton : opera = "Chatterton"] {chatterton, libretto, "http://dante.di.unipi.it/ricerca/libretti/chatterton.html"} / web {chatterton, premiere-date, [[1896-03-10]]} [conchita : opera = "Conchita"] {conchita, illustration, "http://localhost:8080/ItalianOpera/occurs/opera/zandonai/conchita-poster.jpg"} / local {conchita, premiere-date, [[1911-10-14]]} [cornill-schut : opera = "Cornill Schut"] {cornill-schut, note, [[Time period: 17th Century]]} {cornill-schut, note, [[Revised as Pittori Fiamminghi, Teatro Comunale di Trieste, 1928-01-21]]} {cornill-schut, note, [[First performance (according to A. Loewenberg "Annals of Opera" and others) "Teatro Ceco" Prague, 20 May 1893]]} {cornill-schut, premiere-date, [[1893-06-06]]} {cornill-schut, premiere-date, [[1900-02-17]]} / teatro-comunale-di-trieste [cristoforo-colombo : opera = "Cristoforo Colombo" @"http://psi.ontopedia.net/Cristoforo_Colombo"] {cristoforo-colombo, article, "http://en.wikipedia.org/wiki/Cristoforo_Colombo_(opera)"} {cristoforo-colombo, premiere-date, [[1892-10-06]]} {cristoforo-colombo, webpage, "http://www.operone.de/opern/cristoforo.html"} [cyrano-de-bergerac : opera = "Cyrano di Bergerac" @"http://psi.ontopedia.net/Cyrano_di_Bergerac"] {cyrano-de-bergerac, article, "http://en.wikipedia.org/wiki/Cyrano_de_Bergerac_(Alfano)"} {cyrano-de-bergerac, article, "http://en.wikipedia.org/wiki/Cyrano_de_Bergerac"} {cyrano-de-bergerac, audio-recording, [[999 909-2]]} {cyrano-de-bergerac, illustration, "http://localhost:8080/ItalianOpera/occurs/opera/alfano/cyrano-de-bergerac-poster.jpg"} / local {cyrano-de-bergerac, note, [[Some sources give the date of the first performance as 1936-01-26.]]} {cyrano-de-bergerac, premiere-date, [[1936-01-22]]} {cyrano-de-bergerac, webpage, "http://www.delteatro.it/hdoc/result_opera.asp?idopera=2083"} [dejanice : opera = "Dejanice"] {dejanice, premiere-date, [[1883-03-17]]} {dejanice, synopsis, "http://www.mynetcologne.de/~nc-ruethjo/Oper/Catalani/dejanice-inhalt.htm"} [der-roland-von-berlin : opera = "Der Roland von Berlin"; "Roland von Berlin"] {der-roland-von-berlin, note, [[Time period: 1442]]} {der-roland-von-berlin, premiere-date, [[1904-12-13]]} {der-roland-von-berlin, webpage, "http://www.answers.com/topic/der-roland-von-berlin-rolando-di-berlino-opera"} [don-carlos : opera = "Don Carlos" = "Don Carlo" / altname @"http://psi.ontopedia.net/Don_Carlos"] {don-carlos, article, "http://en.wikipedia.org/wiki/Don_Carlos"} {don-carlos, audio-recording, [[7 69304 2]]} {don-carlos, libretto, "http://www.giuseppeverdi.it/verdi/libretti/Don_Carlo.htm"} / italian land-of-verdi web {don-carlos, note, [[Time period: 1568]]} {don-carlos, premiere-date, [[1867-03-11]]} {don-carlos, synopsis, "http://localhost:8080/operamap/occurs/dc_syn.php3.htm"} / az-opera local {don-carlos, synopsis, "http://www.azopera.com/learn/synopsis/carlo.shtml"} / az-opera web {don-carlos, synopsis, "http://www.metopera.org/synopses/carlo.html"} / web operanews {don-carlos, webpage, "http://opera.stanford.edu/opera/Verdi/DonCarlos/main.html"} [don-juan-de-manara : opera = "Don Juan de Manara"] {don-juan-de-manara, premiere-date, [[1941-05-28]]} [edgar : opera = "Edgar" @"http://psi.ontopedia.net/Edgar_(opera)"] {edgar, article, "http://en.wikipedia.org/wiki/Edgar_(opera)"} {edgar, audio-recording, [[V 4957]]} {edgar, illustration, "http://localhost:8080/ItalianOpera/occurs/opera/puccini/edgar-score1.gif"} / local {edgar, libretto, "http://dante.di.unipi.it/ricerca/libretti/edgar1889.html"} / web {edgar, libretto, "http://dante.di.unipi.it/ricerca/libretti/edgar1891lu.html"} / web {edgar, libretto, "http://dante.di.unipi.it/ricerca/libretti/edgar1891to.html"} / web {edgar, libretto, "http://dante.di.unipi.it/ricerca/libretti/edgar1905.html"} / web {edgar, premiere-date, [[1889-04-21]]} [edipo-re : opera = "Edipo Re" = "Oedipus Rex" / altname] {edipo-re, illustration, "http://localhost:8080/ItalianOpera/occurs/opera/leoncavallo/edipo-re-recording.jpg"} / local {edipo-re, note, [[Completed posthumously by G. Pennacchio [NPOG].]]} {edipo-re, premiere-date, [[1920-12-13]]} [edmea : opera = "Edmea"] {edmea, libretto, "http://www.mynetcologne.de/~nc-ruethjo/Oper/Catalani/edmea-libretto.htm"} {edmea, note, [[Time period: 1600]]} {edmea, premiere-date, [[1886-02-27]]} {edmea, synopsis, "http://www.mynetcologne.de/~nc-ruethjo/Oper/Catalani/edmea-inhalt.htm"} [ernani : opera = "Ernani" = "Il corsaro di Venezia" / altname @"http://psi.ontopedia.net/Ernani"] {ernani, article, "http://en.wikipedia.org/wiki/Ernani"} {ernani, illustration, "http://localhost:8080/ItalianOpera/occurs/opera/verdi/ernani-score.jpg"} / local {ernani, libretto, "http://opera.stanford.edu/opera/Verdi/Ernani/libretto.html"} / web operaglass {ernani, libretto, "http://www.giuseppeverdi.it/verdi/libretti/Ernani.htm"} / italian land-of-verdi web {ernani, note, [[Time period: 1519]]} {ernani, premiere-date, [[1844-03-09]]} {ernani, webpage, "http://opera.stanford.edu/opera/Verdi/Ernani/main.html"} / web operaglass [falene : opera = "Falene" = "The Moth Woman" / english] {falene, note, [[One source suggested that Falene was based on a tale by Henri Murger. While it hasn't been possible to confirm this, the following juxtaposition of 'Falene' and 'Henri Murger' may be worth following up: "Salvatore Collari [Falene, 2d ed. Roma, Igea, 1950 (p. 71)] retraces in delicate colors the romantic setting of Villa Margherita in Rome (between Piazza di Spagna and Trinita dei Monti, facing the Pincio), where Pauline de Beaumont (1768-1803) lived her last months, consumee d'une maladie de langueur. The sinning had not been by default. After her death in the arms of Chateaubriand (1768-1848) , the poet erected a bas-relief in her memory; it can be seen in the church San Luigi dei Francesi. Also pathetic was the death (during the Parisian carnival) of Marguerite Gautier, la dame aux camelias of Alexandre Dumas, even if her last aria in Verdi's La Traviata requires more respiratory reserve than expected from a far advanced pulmonary disease. A similar blasphemy could be ventured about Henri Murger's Mimi in Puccini's La Boheme." (E.R.N. Grig "Historical and Bibliographical Review of Tuberculosis in the Mentally Ill" in Journal of the History of Medicine and Allied Sciences, Volume X, Number 1, p.75)]]} {falene, premiere-date, [[1920]]} [falstaff : opera = "Falstaff" @"http://psi.ontopedia.net/Falstaff_(opera)"] {falstaff, article, "http://en.wikipedia.org/wiki/Falstaff_(opera)"} {falstaff, libretto, "http://opera.stanford.edu/opera/Verdi/Falstaff/libretto.html"} / web operaglass {falstaff, libretto, "http://www.giuseppeverdi.it/verdi/libretti/Falstaff.htm"} / italian land-of-verdi web {falstaff, note, [[Time period: reign of Henry IV]]} {falstaff, premiere-date, [[1893-02-09]]} {falstaff, webpage, "http://opera.stanford.edu/opera/Verdi/Falstaff/main.html"} / web operaglass [fedora : opera = "Fedora" @"http://psi.ontopedia.net/Fedora_(Giordano)"] {fedora, article, "http://en.wikipedia.org/wiki/Fedora_(Giordano)"} {fedora, audio-recording, [[OPD-1272]]} {fedora, libretto, "http://dante.di.unipi.it/ricerca/libretti/Fedora.html"} / web {fedora, premiere-date, [[1898-11-17]]} {fedora, synopsis, "http://www.metopera.org/synopses/fedora.html"} / web operanews {fedora, video-recording, [[00440 073 2329]]} [francesca-da-rimini : opera = "Francesca da Rimini (Zandonai)" = "Francesca da Rimini" / zandonai] {francesca-da-rimini, article, "http://en.wikipedia.org/wiki/Francesca_da_Rimini_(Zandonai)"} {francesca-da-rimini, audio-recording, [[3-1368 2]]} {francesca-da-rimini, premiere-date, [[1914-02-19]]} [francesca-da-rimini2 : opera = "Francesca da Rimini (Leoni)" = "Francesca da Rimini" / leoni short-name] {francesca-da-rimini2, premiere-date, [[1914]]} [germania : opera = "Germania"] {germania, illustration, "http://localhost:8080/ItalianOpera/occurs/opera/franchetti/germania-poster.jpg"} / local {germania, libretto, "http://www.delteatro.it/hdoc/result_opera.asp?idopera=1739"} {germania, premiere-date, [[1902-03-11]]} [gianni-schicchi : opera = "Gianni Schicchi" @"http://psi.ontopedia.net/Gianni_Schicchi"] {gianni-schicchi, article, "http://en.wikipedia.org/wiki/Gianni_Schicchi"} {gianni-schicchi, audio-recording, [[5 56587 2]]} {gianni-schicchi, illustration, "http://localhost:8080/ItalianOpera/occurs/opera/puccini/gianni-schicchi-poster1.jpg"} / local {gianni-schicchi, libretto, "http://opera.stanford.edu/opera/Puccini/GianniSchicchi/libretto.html"} / web operaglass {gianni-schicchi, premiere-date, [[1918-12-14]]} {gianni-schicchi, webpage, "http://opera.stanford.edu/opera/Puccini/GianniSchicchi/main.html"} / web operaglass [gina : opera = "Gina"] {gina, audio-recording, [[GB 2302/3-2]]} {gina, premiere-date, [[1889-02-09]]} [giovanna-darco : opera = "Giovanna d'Arco" = "Joan of Arc" / english = "Orietta di Lesbo" / altname @"http://psi.ontopedia.net/Giovanna_d'Arco"] {giovanna-darco, article, "http://en.wikipedia.org/wiki/Giovanna_d'Arco"} {giovanna-darco, illustration, "http://localhost:8080/ItalianOpera/occurs/opera/verdi/giovanna-darco-score.jpg"} / local {giovanna-darco, libretto, "http://www.giuseppeverdi.it/verdi/libretti/Giovanna_Arco.htm"} / italian land-of-verdi web {giovanna-darco, note, [[Time period: 1429 (c.)]]} {giovanna-darco, premiere-date, [[1845-02-15]]} {giovanna-darco, webpage, "http://opera.stanford.edu/opera/Verdi/Giovanna/main.html"} [giovanni-gallurese : opera = "Giovanni Gallurese"] {giovanni-gallurese, libretto, "http://dante.di.unipi.it/ricerca/libretti/gallurese.html"} / web {giovanni-gallurese, webpage, "http://home.earthlink.net/~markdlew/lib/gallurese/"} / web {giovanni-gallurese, premiere-date, [[1905-01-28]]} /* fixme: encode following list of characters for Giovanni Gallurese (taken from http://home.earthlink.net/~markdlew/lib/gallurese/ggpers.htm) Giovanni Gallurese tenore Maria, figlia di... soprano Nuvis, vecchio mugnaio basso Rivegas, catalano baritono Bastiano, compagno di Giovanni tenore Un Ufficiale Spagnuolo baritono Josè, bravaccio di Rivegas baritono Tropéa, bravaccio di Rivegas baritono Don Pasquale, oste basso Un Ragazzo contralto Compagni di Giovanni Soldati Spagnuoli Miliziani e Barracelli Contadini e Contadine Popolo (L'azione si svolge in Sardegna, territorio di Osilo Secolo XVII, durante la tirannide spagnuola.) */ [giove-a-pompei : opera = "Giove a Pompei"] {giove-a-pompei, premiere-date, [[1921-07-06]]} {giove-a-pompei, synopsis, "http://www.delteatro.it/hdoc/result_opera.asp?idopera=1758"} [giuliano : opera = "Giuliano"] {giuliano, premiere-date, [[1928-02-04]]} [giulietta-e-romeo : opera = "Giulietta e Romeo"] {giulietta-e-romeo, premiere-date, [[1922-02-14]]} [glauco : opera = "Glauco"] {glauco, premiere-date, [[1922-04-08]]} [gloria : opera = "Gloria"] {gloria, audio-recording, [[GB 2375/76-2]]} {gloria, libretto, "http://dante.di.unipi.it/ricerca/libretti/gloria.html"} / web {gloria, note, [[Time period: 15th Century]]} {gloria, premiere-date, [[1907-04-15]]} {gloria, synopsis, "http://opera.stanford.edu/Cilea/Gloria/synopsis.html"} {gloria, webpage, "http://opera.stanford.edu/opera/Cilea/Gloria/main.html"} / web operaglass [goffredo-mameli : opera = "Goffredo Mameli"] {goffredo-mameli, note, [[Might be an operetta...]]} {goffredo-mameli, premiere-date, [[1916-04-27]]} [guglielmo-ratcliff : opera = "Guglielmo Ratcliff" @"http://psi.ontopedia.net/Guglielmo_Ratcliff"] {guglielmo-ratcliff, article, "http://en.wikipedia.org/wiki/Guglielmo_Ratcliff"} {guglielmo-ratcliff, audio-recording, [[OPD-1384]]} {guglielmo-ratcliff, libretto, "http://udel.edu/~dovidl/ratcliff.html"} / web {guglielmo-ratcliff, premiere-date, [[1895-02-16]]} [hellera : opera = "Helléra"] {hellera, illustration, "http://localhost:8080/ItalianOpera/occurs/opera/montemezzi/hellera-poster.jpg"} / local {hellera, premiere-date, [[1909-03-17]]} [i-cavalieri-di-ekebu : opera = "I Cavalieri di Ekebù"; "Cavalieri di Ekebu"] {i-cavalieri-di-ekebu, premiere-date, [[1925-03-07]]} [i-cavalieri-e-la-bella : opera = "I cavalieri e la bella"; "Cavalieri e la bella"] {i-cavalieri-e-la-bella, premiere-date, [[1910]]} [i-due-foscari : opera = "I due foscari"; "Due foscari" @"http://psi.ontopedia.net/I_due_Foscari"] {i-due-foscari, article, "http://en.wikipedia.org/wiki/I_due_Foscari"} {i-due-foscari, illustration, "http://localhost:8080/ItalianOpera/occurs/opera/verdi/i-due-foscari-score.jpg"} / local {i-due-foscari, libretto, "http://php.indiana.edu/~lneff/libretti/foscari1.htm"} / lyle-neff web {i-due-foscari, libretto, "http://www.giuseppeverdi.it/verdi/libretti/Due_Foscari.htm"} / italian land-of-verdi web {i-due-foscari, note, [[Time period: 1457]]} {i-due-foscari, premiere-date, [[1844-11-03]]} {i-due-foscari, webpage, "http://opera.stanford.edu/opera/Verdi/DueFoscari/main.html"} [i-lituani : opera = "I Lituani"; "Lituani"] {i-lituani, illustration, "http://localhost:8080/ItalianOpera/occurs/opera/ponchielli/i-lituani-score.jpg"} / local {i-lituani, premiere-date, [[1874-03-07]]} [i-lombardi : opera = "I Lombardi alla prima Crociata"; "Lombardi alla prima Crociata" = "I Lombardi"; "Lombardi" / short-name @"http://psi.ontopedia.net/I_Lombardi"] {i-lombardi, article, "http://en.wikipedia.org/wiki/I_Lombardi"} {i-lombardi, illustration, "http://localhost:8080/ItalianOpera/occurs/opera/verdi/i-lombardi-score.jpg"} / local {i-lombardi, libretto, "http://www.giuseppeverdi.it/verdi/libretti/Lombardi_alla_crociata.htm"} / italian land-of-verdi web {i-lombardi, note, [[Time period: 1099]]} {i-lombardi, premiere-date, [[1843-02-11]]} {i-lombardi, webpage, "http://opera.stanford.edu/opera/Verdi/Lombardi/main.html"} [i-masnadieri : opera = "I masnadieri"; "Masnadieri" = "The Robbers"; "Robbers" / english @"http://psi.ontopedia.net/I_masnadieri"] {i-masnadieri, article, "http://en.wikipedia.org/wiki/I_masnadieri"} {i-masnadieri, illustration, "http://localhost:8080/ItalianOpera/occurs/opera/verdi/i-masnadieri-score.jpg"} / local {i-masnadieri, libretto, "http://opera.stanford.edu/opera/Verdi/Masnadieri/libretto.html"} / web operaglass {i-masnadieri, libretto, "http://www.giuseppeverdi.it/verdi/libretti/Masnadieri.htm"} / italian land-of-verdi web {i-masnadieri, note, [[Time period: beginning of the eighteenth century]]} {i-masnadieri, premiere-date, [[1847-07-22]]} {i-masnadieri, webpage, "http://opera.stanford.edu/opera/Verdi/Masnadieri/main.html"} / web operaglass [i-medici : opera = "I Medici"; "Medici"] {i-medici, premiere-date, [[1893-11-09]]} {i-medici, libretto, "http://dante.di.unipi.it/ricerca/libretti/medici.html"} / web [i-mori-di-valenza : opera = "I mori di Valenza"] {i-mori-di-valenza, illustration, "http://localhost:8080/ItalianOpera/occurs/opera/ponchielli/i-mori-di-valenza-score.jpg"} / local {i-mori-di-valenza, note, [[Unf. (1874), compl. by Annibale Ponchielli and A. Cadore, 1911.]]} {i-mori-di-valenza, premiere-date, [[1914-03-17]]} [i-profughi-fiamminghi : opera = "I profughi fiamminghi";"Profughi fiamminghi"] {i-profughi-fiamminghi, premiere-date, [[1863-11-11]]} [i-promessi-sposi : opera = "I promessi sposi"; "Promessi sposi"] {i-promessi-sposi, illustration, "http://localhost:8080/ItalianOpera/occurs/opera/ponchielli/i-promessi-sposi-score.jpg"} / local {i-promessi-sposi, illustration, "http://localhost:8080/ItalianOpera/occurs/opera/ponchielli/i-promessi-sposi-score2.jpg"} / local {i-promessi-sposi, illustration, "http://localhost:8080/ItalianOpera/occurs/opera/ponchielli/i-promessi-sposi-score3.jpg"} / local {i-promessi-sposi, libretto, "http://dante.di.unipi.it/ricerca/libretti/promessi.html"} / web {i-promessi-sposi, note, [[Revised version first performed at Teatro dal Verme, 1872-12-04.]]} {i-promessi-sposi, premiere-date, [[1856-08-30]]} /* fixme: encode following list of characters for I promessi sposi (taken from http://dante.di.unipi.it/ricerca/libretti/promessi.html) Don Rodrigo (baritono ) L'innominato (basso) Il Cardinal Federico (basso) La signora di Monza (mezzo soprano ) Fra Cristoforo (basso) Agnese (soprano ) Lucia (soprano) Renzo (tenore) Griso (basso) Nibbio Tonio (tenore) */ [i-rantzau : opera = "I Rantzau"; "Rantzau" @"http://psi.ontopedia.net/I_Rantzau"] {i-rantzau, article, "http://en.wikipedia.org/wiki/I_Rantzau"} {i-rantzau, libretto, "http://www.mascagni.org/works/rantzau/excerpts.html"} / mascagni.org web {i-rantzau, premiere-date, [[1892-11-10]]} [i-vespri-siciliani : opera = "Les Vêpres siciliennes"; "Vepres siciliennes" = "The Sicilian Vespers"; "Sicilian Vespers" / english = "I Vespri siciliani"; "Vespri siciliani" / italian @"http://psi.ontopedia.net/Les_vepres_siciliennes"] {i-vespri-siciliani, article, "http://en.wikipedia.org/wiki/Les_vepres_siciliennes"} {i-vespri-siciliani, libretto, "http://www.giuseppeverdi.it/verdi/libretti/Vespri_siciliani.htm"} / italian land-of-verdi web {i-vespri-siciliani, note, [[Time period: 1282]]} {i-vespri-siciliani, premiere-date, [[1855-06-13]]} {i-vespri-siciliani, webpage, "http://opera.stanford.edu/opera/Verdi/Vespri/main.html"} [ib-and-little-christina : opera = "Ib and Little Christina"] {ib-and-little-christina, premiere-date, [[1901-11-14]]} [il-bacio : opera = "Il Bacio"; "Bacio"] {il-bacio, premiere-date, [[1954-03-10]]} [il-corsaro : opera = "Il corsaro"; "Corsaro" = "The Corsair"; "Corsair" / english @"http://psi.ontopedia.net/Il_corsaro"] {il-corsaro, article, "http://en.wikipedia.org/wiki/Il_corsaro"} {il-corsaro, libretto, "http://php.indiana.edu/~lneff/libretti/corsaro1.htm"} / lyle-neff web {il-corsaro, libretto, "http://www.giuseppeverdi.it/verdi/libretti/Corsaro.htm"} / italian land-of-verdi web {il-corsaro, note, [[Time period: beginning of the nineteenth century]]} {il-corsaro, premiere-date, [[1848-10-25]]} {il-corsaro, webpage, "http://opera.stanford.edu/opera/Verdi/Corsaro/main.html"} [il-dottor-antonio : opera = "Il dottor Antonio"; "Dottor Antonio"] {il-dottor-antonio, premiere-date, [[1949-04-30]]} {il-dottor-antonio, note, [[First performance took place at teatro-costanzi according to http://www.euro-opera.de/W_NN_A.html.]]} [il-figliuol-prodigo : opera = "Il figliuol prodigo"] {il-figliuol-prodigo, illustration, "http://localhost:8080/ItalianOpera/occurs/opera/ponchielli/il-figliuol-prodigo-score.jpg"} / local {il-figliuol-prodigo, note, [[The libretto was apparently "by A. Zanardini after E. Scribe" - clarify the relationship.]]} {il-figliuol-prodigo, premiere-date, [[1880-12-26]]} [il-fior-dalpe : opera = "Il fior d'Alpe"; "Fior d'Alpe"] {il-fior-dalpe, premiere-date, [[1894-03-15]]} [il-fornaretto : opera = "Il fornaretto"] {il-fornaretto, premiere-date, [[1857]]} / not-performed [il-grillo-del-focolare : opera = "Il grillo del focolare"; "Grillo del focolare"] {il-grillo-del-focolare, premiere-date, [[1908-11-28]]} [il-matrimonio-selvaggio : opera = "Il matrimonio selvaggio"; "Matrimonio selvaggio" = "The Wild Marriage"; "Wild Marriage" / english] {il-matrimonio-selvaggio, premiere-date, [[1909]]} / not-performed [il-parlatore-eterno : opera = "Il parlatore eterno"] {il-parlatore-eterno, illustration, "http://localhost:8080/ItalianOpera/occurs/opera/ponchielli/il-parlatore-eterno-score.jpg"} / local {il-parlatore-eterno, premiere-date, [[1863-10-18]]} [il-piccolo-marat : opera = "Il piccolo Marat"; "Piccolo Marat"] {il-piccolo-marat, audio-recording, [[5050466-3246-2-7]]} {il-piccolo-marat, note, [[Time period: 1793 (c.)]]} {il-piccolo-marat, premiere-date, [[1921-05-02]]} [il-principe-zilah : opera = "Il principe Zilah"; "Principe Zilah"] {il-principe-zilah, premiere-date, [[1909-02-03]]} [il-re : opera = "Il re"; "Re" = "The King"; "King" / english] {il-re, audio-recording, [[CDS 231/1-2]]} {il-re, libretto, "http://www.karadar.it/Librettos/giordano_re.html"} {il-re, note, [[Time period: settecento]]} {il-re, premiere-date, [[1929-01-12]]} [il-signor-di-pourceaugnac : opera = "Il signor di Pourceaugnac"; "Signor di Pourceaugnac"] {il-signor-di-pourceaugnac, premiere-date, [[1897-04-10]]} [il-sindaco-babbeo : opera = "Il sindaco babbeo"] {il-sindaco-babbeo, descr, [[Group project; Ponchielli wrote the introduction and one aria. Opera Buffa.]]} {il-sindaco-babbeo, premiere-date, [[1851-03-03]]} {il-sindaco-babbeo, note, [[First performed at Teatro San Radegonda in Milan, pace http://www.italianopera.org/compositori/C/c2174802.htm]]} [il-tabarro : opera = "Il Tabarro"; "Tabarro" = "The Cloak"; "Cloak" / english @"http://psi.ontopedia.net/Il_Tabarro"] {il-tabarro, article, "http://en.wikipedia.org/wiki/Il_Tabarro"} {il-tabarro, audio-recording, [[5 56587 2]]} {il-tabarro, illustration, "http://localhost:8080/ItalianOpera/occurs/opera/puccini/il-tabarro-poster1.jpg"} / local {il-tabarro, libretto, "http://home.earthlink.net/~markdlew/lib/tabarro/index2.htm"} {il-tabarro, poster, "http://www.r-ds.com/opera/pucciniana/pictures/tabarro_poster.htm"} / web r-ds {il-tabarro, premiere-date, [[1918-12-14]]} {il-tabarro, webpage, "http://opera.stanford.edu/opera/Puccini/IlTabarro/main.html"} / web operaglass [il-trovatore : opera = "Il trovatore"; "Trovatore" = "The Troubadour"; "Troubadour" / english @"http://psi.ontopedia.net/Il_trovatore"] {il-trovatore, article, "http://en.wikipedia.org/wiki/Il_trovatore"} {il-trovatore, illustration, "http://localhost:8080/ItalianOpera/occurs/opera/verdi/il-trovatore-poster.jpg"} / local {il-trovatore, libretto, "http://opera.stanford.edu/opera/Verdi/Trovatore/libretto.html"} / web operaglass {il-trovatore, libretto, "http://www.giuseppeverdi.it/verdi/libretti/Trovatore.htm"} / italian land-of-verdi web {il-trovatore, note, [[Time period: fifteenth century]]} {il-trovatore, premiere-date, [[1853-01-19]]} {il-trovatore, synopsis, "http://localhost:8080/operamap/occurs/it_syn.php3.htm"} / az-opera local {il-trovatore, synopsis, "http://www.azopera.com/learn/synopsis/trovatore.shtml"} / az-opera web {il-trovatore, synopsis, "http://www.metopera.org/synopses/trovator.html"} / web operanews {il-trovatore, synopsis, "http://www.opera.it/Operaweb/it/trovatore/trama.html"} / italian web operaweb {il-trovatore, webpage, "http://opera.stanford.edu/opera/Verdi/Trovatore/main.html"} / web operaglass [il-vassallo-di-szigeth : opera = "Il vassallo di Szigeth";"Vassallo di Szigeth"] {il-vassallo-di-szigeth, note, [[Time period: 16th Century]]} {il-vassallo-di-szigeth, premiere-date, [[1889-06-18]]} {il-vassallo-di-szigeth, premiere-date, [[1930-10-04]]} / politeama-ciscutti [il-voto : opera = "Il voto"; "Voto" = "Mala vita" / original-name] {il-voto, premiere-date, [[1902-09-06]]} [ines-de-castro : opera = "Ines de Castro"] {ines-de-castro, premiere-date, [[1859]]} / not-performed [iris : opera = "Iris" @"http://psi.ontopedia.net/Iris_(opera)"] {iris, article, "http://en.wikipedia.org/wiki/Iris_(opera)"} {iris, audio-recording, [[M2K 45526]]} {iris, illustration, "http://localhost:8080/ItalianOpera/occurs/opera/mascagni/iris-poster.jpg"} / local {iris, illustration, "http://localhost:8080/ItalianOpera/occurs/opera/mascagni/iris-poster2.jpg"} / local {iris, libretto, "http://www.mascagni.org/works/iris/libretto.html"} / mascagni.org web {iris, libretto, "http://dante.di.unipi.it/ricerca/libretti/iris.html"} / web {iris, premiere-date, [[1898-11-22]]} [isabeau : opera = "Isabeau"] {isabeau, audio-recording, [[5050467-1045-2-5]]} {isabeau, audio-recording, [[GB 2341/42-2]]} {isabeau, illustration, "http://localhost:8080/ItalianOpera/occurs/opera/mascagni/isabeau-poster.jpg"} / local {isabeau, libretto, "http://www.mascagni.org/works/isabeau/excerpts.html"} / mascagni.org web {isabeau, libretto, "http://dante.di.unipi.it/ricerca/libretti/librettoisabeau.html"} / web {isabeau, note, [[Time period: 1200.]]} {isabeau, note, [[Penguin Opera Guide has the first performance at Teatro Colón, whereas Mallach (2002), Sadie (2004) and other sources have Teatro Coliseo. (Both are in Buenos Aires.)]]} {isabeau, premiere-date, [[1911-06-02]]} [jerusalem-o : opera = "Jérusalem"; "Jerusalem"] {jerusalem-o, note, [[Time period: 1095-1099]]} {jerusalem-o, premiere-date, [[1847-11-26]]} [la-battaglia-di-legnano : opera = "La battaglia di Legnano"; "Battaglia di Legnano" = "L'assiedo di Arlem"; "Assiedo di Arlem" / altname = "La sconfitta degli austriachi"; "Sconfitta degli austriachi" / altname @"http://psi.ontopedia.net/La_battaglia_di_Legnano"] {la-battaglia-di-legnano, article, "http://en.wikipedia.org/wiki/La_battaglia_di_Legnano"} {la-battaglia-di-legnano, illustration, "http://localhost:8080/ItalianOpera/occurs/opera/verdi/la-battaglia-di-legnano-poster.jpg"} / local {la-battaglia-di-legnano, libretto, "http://www.giuseppeverdi.it/verdi/libretti/Battaglia_di_Legnano.htm"} / italian land-of-verdi web {la-battaglia-di-legnano, note, [[Time period: 1176]]} {la-battaglia-di-legnano, premiere-date, [[1849-01-27]]} {la-battaglia-di-legnano, webpage, "http://opera.stanford.edu/opera/Verdi/Legnano/main.html"} [la-boheme : opera = "La Bohème (Puccini)"; "Boheme (Puccini)" = "La Bohème"; "Boheme" / puccini short-name @"http://psi.ontopedia.net/La_Boheme"] {la-boheme, article, "http://en.wikipedia.org/wiki/La_Boh%E8me"} {la-boheme, audio-recording, [[5 67750 2]]} {la-boheme, illustration, "http://localhost:8080/ItalianOpera/occurs/opera/puccini/la-boheme-poster1.jpg"} / local {la-boheme, libretto, "http://opera.stanford.edu/opera/Puccini/LaBoheme/libretto.html"} / web operaglass {la-boheme, poster, "http://www.r-ds.com/opera/pucciniana/pictures/boheme-score.htm"} / web r-ds {la-boheme, poster, "http://www.r-ds.com/opera/pucciniana/pictures/boheme_poster.htm"} / web r-ds {la-boheme, premiere-date, [[1896-02-01]]} {la-boheme, sound-clip, "http://localhost:8080/operamap/occurs/la-boheme.wav"} / local {la-boheme, sound-clip, "http://www.ontopia.net/topicmaps/examples/opera/occurs/la-boheme.wav"} / web {la-boheme, synopsis, "http://localhost:8080/operamap/occurs/lb_syn.php3.htm"} / az-opera local {la-boheme, synopsis, "http://www.azopera.com/learn/synopsis/boheme.shtml"} / az-opera web {la-boheme, synopsis, "http://www.metopera.org/synopses/boheme.html"} / web operanews {la-boheme, video-recording, [[100 046]]} {la-boheme, webpage, "http://opera.stanford.edu/opera/Puccini/LaBoheme/main.html"} / web operaglass [la-boheme2 : opera = "La Bohème (Leoncavallo)"; "Boheme (Leoncavallo)" = "La Bohème"; "Boheme" / leoncavallo short-name @"http://psi.ontopedia.net/La_Boheme_(Leoncavallo)"] {la-boheme2, article, "http://en.wikipedia.org/wiki/La_Bohme_(Leoncavallo)"} {la-boheme2, audio-recording, [[NE 7300/01]]} {la-boheme2, premiere-date, [[1897-05-06]]} [la-cena-delle-beffe : opera = "La cena delle beffe"; "Cena delle beffe" = "The Feast of the Jesters"; "Feast of the Jesters" / english = "The Mockery Supper"; "Mockery Supper" / english ] {la-cena-delle-beffe, audio-recording, [[GB 2068/69-2]]} {la-cena-delle-beffe, note, [[Time period: ca. 1485 (the time of Lorenzo il Magnifico, 1469-1492)]]} {la-cena-delle-beffe, note, [[Some sources suggest that Giovacchino Forzano contributed to the libretto, but the sleeve notes of GB 2068/69-2 have him only as producer of the La Scala première.]]} {la-cena-delle-beffe, premiere-date, [[1924-12-20]]} {la-cena-delle-beffe, synopsis, "http://www.operaitaliana.com/opera_italiana/schedaopera.asp-ID=19&IDOp=143&Lingua=0.htm"} [la-coppa-del-re : opera = "La coppa del re"; "Coppa del re"] {la-coppa-del-re, premiere-date, [[1906 (ca.)]]} [la-falce : opera = "La Falce"; "Falce"] {la-falce, premiere-date, [[1875-07-19]]} {la-falce, synopsis, "http://www.mynetcologne.de/~nc-ruethjo/Oper/Catalani/lafalce-inhalt.htm"} {la-falce, note, [[Time period: 624 A.D., two years after the Hijra (the emigration of Muhammad and his followers to the city of Medina).]]} [la-falena : opera = "La falena" = "The Moth Woman" / english @"http://psi.ontopedia.net/La_falena"] {la-falena, article, "http://en.wikipedia.org/wiki/La_falena"} {la-falena, premiere-date, [[1897-09-06]]} [la-fanciulla-del-west : opera = "La fanciulla del West"; "Fanciulla del West" = "The Girl of the Golden West"; "Girl of the Golden West" / english @"http://psi.ontopedia.net/La_fanciulla_del_West"] {la-fanciulla-del-west, article, "http://en.wikipedia.org/wiki/La_fanciulla_del_West"} {la-fanciulla-del-west, audio-recording, [[421 595-2]]} {la-fanciulla-del-west, illustration, "http://localhost:8080/ItalianOpera/occurs/opera/puccini/la-fanciulla-del-west-poster1.jpg"} / local {la-fanciulla-del-west, poster, "http://www.r-ds.com/opera/pucciniana/pictures/fanciulla_poster.htm"} / web r-ds {la-fanciulla-del-west, premiere-date, [[1910-12-10]]} {la-fanciulla-del-west, synopsis, "http://localhost:8080/operamap/occurs/ggw_syn.php3.htm"} / az-opera local {la-fanciulla-del-west, synopsis, "http://www.azopera.com/learn/synopsis/golden_west.shtml"} / az-opera web [la-farsa-amorosa : opera = "La farsa amorosa"; "Farsa amorosa"] {la-farsa-amorosa, premiere-date, [[1933-02-22]]} [la-figlia-di-jorio : opera = "La figlia di Jorio"; "Figlia di Jorio" @"http://psi.ontopedia.net/La_figlia_di_Iorio"] {la-figlia-di-jorio, article, "http://en.wikipedia.org/wiki/La_figlia_di_Iorio"} {la-figlia-di-jorio, illustration, "http://localhost:8080/ItalianOpera/occurs/opera/franchetti/la_figlia_di_iorio-poster1.jpg"} / local {la-figlia-di-jorio, premiere-date, [[1906-03-29]]} [la-fonte-di-enschir : opera = "La Fonte d'Enschir"; "Fonte d'Enschir" = "Die Quelle von Enschir"; "Quelle von Enschir" / german] {la-fonte-di-enschir, premiere-date, [[1898-11-08]]} [la-forza-del-destino : opera = "La forza del destino"; "Forza del destino" = "Don Alvaro" / altname @"http://psi.ontopedia.net/La_forza_del_destino"] {la-forza-del-destino, article, "http://en.wikipedia.org/wiki/La_forza_del_destino"} {la-forza-del-destino, audio-recording, [[VOP 008/2002]]} {la-forza-del-destino, illustration, "http://localhost:8080/ItalianOpera/occurs/opera/verdi/la-forza-del-destino-score.jpg"} / local {la-forza-del-destino, libretto, "http://php.indiana.edu/~lneff/libretti/forz0.html"} / lyle-neff web {la-forza-del-destino, libretto, "http://www.giuseppeverdi.it/verdi/libretti/Forza_destino.htm"} / italian land-of-verdi web {la-forza-del-destino, note, [[Time period: mid-eighteenth century]]} {la-forza-del-destino, premiere-date, [[1862-11-10]]} {la-forza-del-destino, synopsis, "http://www.metopera.org/synopses/forza.html"} / web operanews {la-forza-del-destino, webpage, "http://opera.stanford.edu/opera/Verdi/Forza/main.html"} / web operaglass [la-gioconda : opera = "La Gioconda"; "Gioconda, La" @"http://psi.ontopedia.net/La_Gioconda"] {la-gioconda, article, "http://en.wikipedia.org/wiki/La_Gioconda"} {la-gioconda, audio-recording, [[5 56291 2]]} {la-gioconda, illustration, "http://localhost:8080/ItalianOpera/occurs/opera/ponchielli/la-gioconda-score.jpg"} / local {la-gioconda, illustration, "http://localhost:8080/ItalianOpera/occurs/opera/ponchielli/la-gioconda-score2.jpg"} / local {la-gioconda, libretto, "http://www.karadar.it/Librettos/ponchielli_GIOCONDA.html"} / web {la-gioconda, libretto, "http://dante.di.unipi.it/ricerca/libretti/gioconda.html"} / web {la-gioconda, premiere-date, [[1876-04-08]]} {la-gioconda, sound-clip, "http://localhost:8080/operamap/occurs/la-gioconda.wav"} / local {la-gioconda, sound-clip, "http://www.ontopia.net/topicmaps/examples/opera/occurs/la-gioconda.wav"} / web {la-gioconda, synopsis, "http://localhost:8080/operamap/occurs/lg_syn.php3.htm"} / az-opera local {la-gioconda, synopsis, "http://www.azopera.com/learn/synopsis/gioconda.shtml"} / az-opera web [la-leggenda-di-sakuntala : opera = "La leggenda di Sakùntala"; "Leggenda di Sakuntala" @"http://psi.ontopedia.net/La_leggenda_di_Sakuntala"] {la-leggenda-di-sakuntala, article, "http://en.wikipedia.org/wiki/Sakuntala"} {la-leggenda-di-sakuntala, premiere-date, [[1921-12-10]]} {la-leggenda-di-sakuntala, webpage, "http://www.delteatro.it/hdoc/result_opera.asp?idopera=1614"} [la-nave : opera = "La nave" @"http://psi.ontopedia.net/La_nave"] {la-nave, premiere-date, [[1918-11-03]]} [la-notte-di-zoraima : opera = "La notte di Zoraima"] {la-notte-di-zoraima, premiere-date, [[1931-01-31]]} [la-principessa-lontana : opera = "La Principessa Lontana"] {la-principessa-lontana, premiere-date, [[1952]]} / not-performed [la-rondine : opera = "La rondine"; "Rondine" = "The Swallow"; "Swallow" / english @"http://psi.ontopedia.net/La_rondine"] {la-rondine, article, "http://en.wikipedia.org/wiki/La_rondine"} {la-rondine, audio-recording, [[5 56338 2]]} {la-rondine, illustration, "http://localhost:8080/ItalianOpera/occurs/opera/puccini/la-rondine-poster1.jpg"} / local {la-rondine, premiere-date, [[1917-03-27]]} {la-rondine, webpage, "http://opera.stanford.edu/opera/Puccini/LaRondine/main.html"} / web operaglass [la-savoiarda : opera = "La savoiarda"] {la-savoiarda, illustration, "http://localhost:8080/ItalianOpera/occurs/opera/ponchielli/la-savoiarda-score.jpg"} / local {la-savoiarda, note, [[Revised as "Lina" and first performed at Teatro dal Verme, 1877-11-17.]]} {la-savoiarda, premiere-date, [[1861-01-19]]} [la-terra-del-sogno : opera = "La Terra del Sogno"] {la-terra-del-sogno, premiere-date, [[1920-01-10]]} [la-tilda : opera = "La Tilda"; "Tilda"] {la-tilda, premiere-date, [[1892-04-07]]} [la-traviata : opera = "La traviata"; "Traviata" = "Violetta" / altname @"http://psi.ontopedia.net/La_traviata"] {la-traviata, article, "http://en.wikipedia.org/wiki/La_traviata"} {la-traviata, illustration, "http://localhost:8080/ItalianOpera/occurs/opera/verdi/la-traviata-autograph.jpg"} / local {la-traviata, illustration, "http://localhost:8080/ItalianOpera/occurs/opera/verdi/la-traviata-scene.jpg"} / local {la-traviata, libretto, "http://php.indiana.edu/~lneff/libretti/traviata.html"} / lyle-neff web {la-traviata, libretto, "http://www.giuseppeverdi.it/verdi/libretti/Traviata.htm"} / italian land-of-verdi web {la-traviata, note, [[Time period: 1850 (c.)]]} {la-traviata, premiere-date, [[1853-03-06]]} {la-traviata, sound-clip, "http://localhost:8080/operamap/occurs/la-traviata.wav"} / local {la-traviata, sound-clip, "http://www.ontopia.net/topicmaps/examples/opera/occurs/la-traviata.wav"} / web {la-traviata, synopsis, "http://localhost:8080/operamap/occurs/lt_syn.php3.htm"} / az-opera local {la-traviata, synopsis, "http://www.azopera.com/learn/synopsis/traviata.shtml"} / az-opera web {la-traviata, synopsis, "http://www.metopera.org/synopses/traviata.html"} / web operanews {la-traviata, synopsis, "http://www.opera.it/Operaweb/it/traviata/trama.html"} / italian web operaweb {la-traviata, webpage, "http://opera.stanford.edu/opera/Verdi/Traviata/main.html"} / web operaglass [la-vergine-di-kermo : opera = "La vergine di Kermo"] {la-vergine-di-kermo, illustration, "http://localhost:8080/ItalianOpera/occurs/opera/ponchielli/la-vergine-di-kermo-score.jpg"} / local {la-vergine-di-kermo, premiere-date, [[1870-02-22]]} [la-via-della-finestra : opera = "La via della finestra"; "Via della finestra"] {la-via-della-finestra, premiere-date, [[1919-07-27]]} [la-wally : opera = "La Wally"; "Wally" @"http://psi.ontopedia.net/La_Wally"] {la-wally, audio-recording, [[460 744-2]]} {la-wally, libretto, "http://php.indiana.edu/~lneff/libretti/wally.htm"} / lyle-neff web {la-wally, premiere-date, [[1892-01-20]]} {la-wally, synopsis, "http://www.mynetcologne.de/~nc-ruethjo/Oper/Catalani/lawally%20-%20inhalt.htm"} [lamico-fritz : opera = "L'amico Fritz"; "Amico Fritz" @"http://psi.ontopedia.net/L'amico_Fritz"] {lamico-fritz, article, "http://en.wikipedia.org/wiki/L'amico_Fritz"} {lamico-fritz, audio-recording, [[5 67376 2]]} {lamico-fritz, libretto, "http://www.mascagni.org/works/fritz/excerpts.html"} / mascagni.org web {lamico-fritz, premiere-date, [[1891-11-01]]} [lamore-dei-tre-re : opera = "L'amore dei tre re" @"http://psi.ontopedia.net/L'amore_dei_tre_re"] {lamore-dei-tre-re, audio-recording, [[74321 50166 2]]} {lamore-dei-tre-re, premiere-date, [[1913-04-10]]} /* fixme: encode following list of characters for L'amore dei tre re Archibaldo, King of Altura -- bass Manfredo, Archibaldo's son -- baritone Fiora, Manfredo's wife -- soprano Avito, former Prince of Altura -- tenor Flaminio, a castle guard -- tenor A Handmaiden -- soprano A Young Woman -- soprano A Youth -- tenor An Old Woman -- mezzo-soprano An Offstage Voice -- boy soprano */ [larlesiana : opera = "L'Arlesiana"; "Arlesiana" = "The Girl from Arles"; "Girl from Arles" / english] {larlesiana, audio-recording, [[476 7644]]} {larlesiana, premiere-date, [[1897-11-27]]} {larlesiana, synopsis, "http://opera.stanford.edu/Cilea/LArlesiana/synopsis.html"} {larlesiana, webpage, "http://opera.stanford.edu/opera/Cilea/LArlesiana/main.html"} / web operaglass [le-baruffe-chiozotte : opera = "Le Baruffe Chiozotte"] {le-baruffe-chiozotte, premiere-date, [[1920-01-02]]} [le-maschere : opera = "Le maschere"; "Maschere" = "The Masks"; "Masks" / english] {le-maschere, audio-recording, [[RFCD 2004]]} {le-maschere, libretto, "http://www.mascagni.org/works/maschere/excerpts.html"} / mascagni.org web {le-maschere, note, [[There was actually a seventh premiere venue, but the performance was held one day later due to illness.]]} {le-maschere, premiere-date, [[1901-01-17]]} [le-villi : opera = "Le Villi"; "Villi" @"http://psi.ontopedia.net/Le_Villi"] {le-villi, article, "http://en.wikipedia.org/wiki/Le_Villi"} {le-villi, audio-recording, [[223305-203]]} {le-villi, illustration, "http://localhost:8080/ItalianOpera/occurs/opera/puccini/le-villi-cd1.jpg"} / local {le-villi, libretto, "http://opera.stanford.edu/opera/Puccini/LeVilli/libretto.html"} / web operaglass {le-villi, libretto, "http://dante.di.unipi.it/ricerca/libretti/le_villi.html"} / web {le-villi, libretto, "http://dante.di.unipi.it/ricerca/libretti/le_villi2.html"} / web {le-villi, premiere-date, [[1884-05-31]]} [lincantesimo : opera = "L'incantesimo" @"http://psi.ontopedia.net/L'incantesimo"] {lincantesimo, premiere-date, [[1943-10-09]]} {lincantesimo, premiere-date, [[1952-08-09]]} / arena-di-verona /* fixme: encode following list of characters for L'incantesimo Folco, a nobleman -- baritone Giselda, his wife -- soprano Rinaldo, her former suitor -- tenor Salomone, a necromancer -- bass A servant -- baritone */ [lodoletta : opera = "Lodoletta" @"http://psi.ontopedia.net/Lodoletta"] {lodoletta, article, "http://en.wikipedia.org/wiki/Lodoletta"} {lodoletta, libretto, "http://www.mascagni.org/works/lodoletta/libretto.html"} / mascagni.org web {lodoletta, premiere-date, [[1917-04-30]]} [lombra-di-don-giovanni : opera = "L'ombra di Don Giovanni"; "Ombra di Don Giovanni"] {lombra-di-don-giovanni, premiere-date, [[1914-04-02]]} {lombra-di-don-giovanni, webpage, "http://www.delteatro.it/hdoc/result_opera.asp?idopera=1477"} [loracolo : opera = "L'Oracolo"] {loracolo, audio-recording, [[475 6531]]} {loracolo, libretto, "http://www.jmucci.com/opera/oracolo.htm"} {loracolo, premiere-date, [[1905-06-28]]} [loreley : opera = "Loreley" = "Elda" / original-name] {loreley, audio-recording, [[OPD-1265]]} {loreley, note, [[Time period: 1300]]} {loreley, premiere-date, [[1890-02-16]]} {loreley, synopsis, "http://www.mynetcologne.de/~nc-ruethjo/Oper/Catalani/loreley-inhalt.htm"} {loreley, synopsis, "http://www.operaitaliana.com/opera_italiana/schedaopera.asp-ID=9&IDOp=92&Lingua=1.htm"} [luccellino-doro : opera = "L'uccellino d'oro"; "Uccellino d'oro"] {luccellino-doro, premiere-date, [[1907]]} [luisa-miller : opera = "Luisa Miller" @"http://psi.ontopedia.net/Luisa_Miller"] {luisa-miller, article, "http://en.wikipedia.org/wiki/Luisa_Miller"} {luisa-miller, libretto, "http://php.indiana.edu/~lneff/libretti/Luisa0.html"} / lyle-neff web {luisa-miller, libretto, "http://www.giuseppeverdi.it/verdi/libretti/Luisa_Miller.htm"} / italian land-of-verdi web {luisa-miller, note, [[Time period: early seventeenth century]]} {luisa-miller, premiere-date, [[1849-12-08]]} {luisa-miller, webpage, "http://opera.stanford.edu/opera/Verdi/LuisaMiller/main.html"} / web operaglass [lultimo-lord : opera = "L'ultimo Lord"; "Ultimo Lord"] {lultimo-lord, premiere-date, [[1930-04-19]]} [macbeth : opera = "Macbeth" @"http://psi.ontopedia.net/Macbeth_(opera)"] {macbeth, article, "http://en.wikipedia.org/wiki/Macbeth_(opera)"} {macbeth, libretto, "http://php.indiana.edu/~lneff/libretti/macbeth.html"} / lyle-neff web {macbeth, libretto, "http://www.giuseppeverdi.it/verdi/libretti/Macbeth.htm"} / italian land-of-verdi web {macbeth, note, [[Time period: 1040]]} {macbeth, premiere-date, [[1847-03-14]]} {macbeth, synopsis, "http://www.metopera.org/synopses/macbeth.html"} / web operanews {macbeth, synopsis, "http://www.orc.soton.ac.uk/ngb/macbeth.html"} / web opera-l {macbeth, webpage, "http://opera.stanford.edu/opera/Verdi/Macbeth/main.html"} [madama-butterfly : opera = "Madama Butterfly" @"http://psi.ontopedia.net/Madama_Butterfly"] {madama-butterfly, article, "http://en.wikipedia.org/wiki/Madama_Butterfly"} {madama-butterfly, article, "http://www.ontopia.net/topicmaps/examples/opera/occurs/snl/madama-butterfly.htm"} / web snl {madama-butterfly, audio-recording, [[423 567-2]]} {madama-butterfly, bibref, [[Carner, Mosco: "Madam Butterfly", Hutchinson (London, 1979)]]} {madama-butterfly, illustration, "http://localhost:8080/ItalianOpera/occurs/opera/puccini/madama-butterfly-poster1.jpg"} / local {madama-butterfly, libretto, "http://home.earthlink.net/~markdlew/lib/butterfly/index.htm"} / mark-lew web {madama-butterfly, libretto, "http://dante.di.unipi.it/ricerca/libretti/bbr.html"} / web {madama-butterfly, libretto, "http://dante.di.unipi.it/ricerca/libretti/bs.html"} / web {madama-butterfly, poster, "http://www.r-ds.com/opera/pucciniana/pictures/butterfly-score.htm"} / web r-ds {madama-butterfly, poster, "http://www.r-ds.com/opera/pucciniana/pictures/butterfly_poster.htm"} / web r-ds {madama-butterfly, premiere-date, [[1904-02-17]]} {madama-butterfly, synopsis, "http://localhost:8080/operamap/occurs/mb_syn.php3.htm"} / az-opera local {madama-butterfly, synopsis, "http://www.azopera.com/learn/synopsis/butterfly.shtml"} / az-opera web {madama-butterfly, synopsis, "http://www.metopera.org/synopses/madama.html"} / web operanews {madama-butterfly, webpage, "http://opera.stanford.edu/opera/Puccini/Butterfly/main.html"} / web operaglass [madame-sans-gene : opera = "Madame Sans-Gêne"; "Madame Sans-Gene"] {madame-sans-gene, audio-recording, [[CDS 247/1-2]]} {madame-sans-gene, premiere-date, [[1915-01-25]]} [madonna-imperia : opera = "Madonna Imperia"] {madonna-imperia, note, [[Said to be based on "Tolldreisten Geschichten" by Balzac. Fixme: Original title?]]} {madonna-imperia, premiere-date, [[1927-05-05]]} {madonna-imperia, webpage, "http://www.operone.de/opern/madonnaimperia.html"} [maia : opera = "Maià"; "Maia"] {maia, note, [[Called "Maja" or "Maïa" in some sources.]]} {maia, premiere-date, [[1910-01-15]]} [mala-vita : opera = "Mala vita"] {mala-vita, premiere-date, [[1892-02-21]]} [manon-lescaut : opera = "Manon Lescaut" @"http://psi.ontopedia.net/Manon_Lescaut_(Puccini)"] {manon-lescaut, article, "http://en.wikipedia.org/wiki/Manon_Lescaut_(Puccini)"} {manon-lescaut, audio-recording, [[5 56301 2]]} {manon-lescaut, gallery, "http://localhost:8080/operamap/occurs/background-manon_lescaut.htm"} / local {manon-lescaut, gallery, "http://www.ontopia.net/topicmaps/examples/opera/occurs/background-manon_lescaut.htm"} / web {manon-lescaut, illustration, "http://localhost:8080/ItalianOpera/occurs/opera/puccini/manon-lescaut-score1.jpg"} / local {manon-lescaut, libretto, "http://www.terra.es/personal/ealmagro/lescaut/acto1.htm"} {manon-lescaut, libretto, "http://dante.di.unipi.it/ricerca/libretti/manon_1893.html"} / web {manon-lescaut, libretto, "http://dante.di.unipi.it/ricerca/libretti/manon_1924.html"} / web {manon-lescaut, poster, "http://www.r-ds.com/opera/pucciniana/pictures/manonl_poster.htm"} / web r-ds {manon-lescaut, premiere-date, [[1893-02-01]]} {manon-lescaut, synopsis, "http://www.opera.it/Operaweb/it/manonlescaut/trama.html"} / italian web operaweb {manon-lescaut, webpage, "http://www.r-ds.com/opera/pucciniana/manon_lescaut.htm"} / web r-ds [marcella : opera = "Marcella"] {marcella, audio-recording, [[CDS 573]]} {marcella, premiere-date, [[1907-11-09]]} [marina : opera = "Marina"] {marina, premiere-date, [[1889]]} / not-performed [marion-delorme : opera = "Marion Delorme"] {marion-delorme, audio-recording, [[472 613-2]]} {marion-delorme, illustration, "http://localhost:8080/ItalianOpera/occurs/opera/ponchielli/marion-delorme-score.jpg"} / local {marion-delorme, premiere-date, [[1885-03-17]]} [massemarello : opera = "Massemarello"] {massemarello, premiere-date, [[1945]]} / not-performed [mefistofele : opera = "Mefistofele" @"http://psi.ontopedia.net/Mefistofele"] {mefistofele, article, "http://en.wikipedia.org/wiki/Mefistofele"} {mefistofele, audio-recording, [[410 175-2]]} {mefistofele, descr, [[Based on both parts of Goethe's Faust. In naming his setting of Goethe's poem after the devil rather than after its human protagonist, Boito was signalling that his primary concern was the metaphysics of the "bargain between God and the Devil".]]} {mefistofele, illustration, "http://localhost:8080/ItalianOpera/occurs/opera/boito/mefistofele-poster1.jpg"} / local {mefistofele, libretto, "http://php.indiana.edu/~lneff/libretti/MefPro.html"} / lyle-neff web {mefistofele, premiere-date, [[1868-03-05]]} {mefistofele, synopsis, "http://www.metopera.org/synopses/mefisto.html"} / web operanews {mefistofele, video-recording, [[100 414]]} {mefistofele, webpage, "http://opera.stanford.edu/opera/Boito/Mefistofele/main.html"} / web operaglass [melenis : opera = "Melenis"] {melenis, illustration, "http://localhost:8080/ItalianOpera/occurs/opera/zandonai/melenis-poster.jpg"} / local {melenis, premiere-date, [[1912-11-13]]} [mese-mariano : opera = "Mese Mariano"] {mese-mariano, audio-recording, [[CDS 231/1-2]]} {mese-mariano, premiere-date, [[1910-03-17]]} [miranda : opera = "Miranda"] {miranda, premiere-date, [[1896]]} / not-performed {miranda, note, [[According to http://www.tryphon.it/sakuntala/freeman.htm Miranda was performed in Leipzig in 1896.]]} [nabucco : opera = "Nabucco" = "Nabucodonosor" / altname = "Nebuchadnezzar" / altname @"http://psi.ontopedia.net/Nabucco"] {nabucco, article, "http://en.wikipedia.org/wiki/Nabucco"} {nabucco, illustration, "http://localhost:8080/ItalianOpera/occurs/opera/verdi/nabucco-score.jpg"} / local {nabucco, libretto, "http://opera.stanford.edu/opera/Verdi/Nabucco/libretto.html"} / web operaglass {nabucco, libretto, "http://www.giuseppeverdi.it/verdi/libretti/Nabucco.htm"} / italian land-of-verdi web {nabucco, note, [[Time period: 586 B.C.]]} {nabucco, premiere-date, [[1842-03-09]]} {nabucco, synopsis, "http://www.metopera.org/synopses/nabucco.html"} / web operanews {nabucco, synopsis, "http://www.opera.it/Operaweb/it/nabucco/trama.html"} / italian web operaweb {nabucco, webpage, "http://opera.stanford.edu/opera/Verdi/Nabucco/main.html"} / web operaglass [nerone : opera = "Nerone (Boito)" = "Nerone" / boito short-name] {nerone, audio-recording, [[GOP 66.368]]} {nerone, illustration, "http://localhost:8080/ItalianOpera/occurs/opera/boito/nerone-poster.jpg"} / local {nerone, libretto, "http://dante.di.unipi.it/ricerca/libretti/neroneb.html"} / web {nerone, premiere-date, [[1924-05-01]]} [nerone2 : opera = "Nerone (Mascagni)" = "Nerone" / mascagni short-name] {nerone2, libretto, "http://www.mascagni.org/works/nerone/excerpts.html"} / mascagni.org web {nerone2, libretto, "http://dante.di.unipi.it/ricerca/libretti/neronem.html"} / web {nerone2, premiere-date, [[1935-01-16]]} [notte-di-leggenda : opera = "Notte di leggenda"] {notte-di-leggenda, premiere-date, [[1906-03-29]]} [nozze-istriane : opera = "Nozze istriane" = "Istrian Wedding" / english @"http://psi.ontopedia.net/Nozze_istriane"] {nozze-istriane, article, "http://en.wikipedia.org/wiki/Nozze_istriane"} {nozze-istriane, premiere-date, [[1895-03-28,]]} [oberto : opera = "Oberto, conte di San Bonifacio" @"http://psi.ontopedia.net/Oberto_(opera)"] {oberto, article, "http://en.wikipedia.org/wiki/Oberto_(opera)"} {oberto, libretto, "http://php.indiana.edu/~lneff/libretti/oberto1.htm"} / lyle-neff web {oberto, libretto, "http://www.giuseppeverdi.it/verdi/libretti/Oberto.htm"} / italian land-of-verdi web {oberto, note, [[Time period: 1228]]} {oberto, premiere-date, [[1839-11-17]]} {oberto, webpage, "http://opera.stanford.edu/opera/Verdi/Oberto/main.html"} [oceana : opera = "Oceàna"] {oceana, article, "http://en.wikipedia.org/wiki/Oceàna_(opera)"} {oceana, premiere-date, [[1903-01-22]]} [otello : opera = "Otello" = "Othello" / english @"http://psi.ontopedia.net/Otello"] {otello, article, "http://en.wikipedia.org/wiki/Otello"} {otello, audio-recording, [[439 805-2]]} {otello, illustration, "http://localhost:8080/ItalianOpera/occurs/opera/verdi/otello-poster.jpg"} / local {otello, libretto, "http://php.indiana.edu/~lneff/libretti/verotel0.html"} / lyle-neff web {otello, libretto, "http://www.giuseppeverdi.it/verdi/libretti/Otello.htm"} / italian land-of-verdi web {otello, note, [[Time period: end of fifteenth century]]} {otello, premiere-date, [[1887-02-05]]} {otello, sound-clip, "http://localhost:8080/operamap/occurs/otello.wav"} / local {otello, sound-clip, "http://www.ontopia.net/topicmaps/examples/opera/occurs/otello.wav"} / web {otello, synopsis, "http://localhost:8080/operamap/occurs/o_syn.php3.htm"} / az-opera local {otello, synopsis, "http://www.azopera.com/learn/synopsis/otello.shtml"} / az-opera web {otello, synopsis, "http://www.metopera.org/synopses/otello.html"} / web operanews {otello, synopsis, "http://www.opera.it/Operaweb/it/otello/trama.html"} / italian web operaweb {otello, webpage, "http://opera.stanford.edu/opera/Verdi/Otello/main.html"} / web operaglass [pagliacci : opera = "Pagliacci" @"http://psi.ontopedia.net/Pagliacci"] {pagliacci, article, "http://en.wikipedia.org/wiki/Pagliacci"} {pagliacci, audio-recording, [[74321 50168 2]]} {pagliacci, libretto, "http://home.earthlink.net/~markdlew/lib/pagliacci/index.htm"} / mark-lew web {pagliacci, premiere-date, [[1892-05-21]]} {pagliacci, synopsis, "http://www.metopera.org/synopses/cavpag.html"} / web operanews {pagliacci, webpage, "http://opera.stanford.edu/opera/Leoncavallo/Pagliacci/main.html"} / web operaglass [parisina : opera = "Parisina" @"http://psi.ontopedia.net/Parisina_(Mascagni)"] {parisina, article, "http://en.wikipedia.org/wiki/Parisina_(Mascagni)"} {parisina, libretto, "http://www.mascagni.org/works/parisina/libretto.html"} / mascagni.org web {parisina, premiere-date, [[1913-12-15]]} [pinotta : opera = "Pinotta"] {pinotta, premiere-date, [[1932-03-23]]} [preziosa : opera = "Preziosa"] {preziosa, premiere-date, [[1879-11-20]]} [raggio-di-luna : opera = "Raggio di Luna"] {raggio-di-luna, premiere-date, [[1890-06-05]]} [re-nala : opera = "Re Nala"] {re-nala, note, [[Destroyed by the composer.]]} {re-nala, premiere-date, [[1887-02-09]]} [regina-diaz : opera = "Regina Diaz"] {regina-diaz, premiere-date, [[1894-03-05]]} [rigoletto : opera = "Rigoletto" = "Viscardello" / altname = "Clara di Perth" / altname = "Lionella" / altname @"http://psi.ontopedia.net/Rigoletto"] {rigoletto, article, "http://en.wikipedia.org/wiki/Rigoletto"} {rigoletto, illustration, "http://localhost:8080/ItalianOpera/occurs/opera/verdi/rigoletto-poster.jpg"} / local {rigoletto, libretto, "http://opera.stanford.edu/opera/Verdi/Rigoletto/libretto.html"} / web operaglass {rigoletto, libretto, "http://www.giuseppeverdi.it/verdi/libretti/Rigoletto.htm"} / italian land-of-verdi web {rigoletto, note, [[Time period: sixteenth century]]} {rigoletto, premiere-date, [[1851-03-11]]} {rigoletto, synopsis, "http://www.metopera.org/synopses/rigoletto.html"} / web operanews {rigoletto, webpage, "http://opera.stanford.edu/opera/Verdi/Rigoletto/main.html"} / web operaglass [rip-van-winkle : opera = "Rip van Winkle"] {rip-van-winkle, premiere-date, [[1897-09-04]]} [risurrezione : opera = "Risurrezione" @"http://psi.ontopedia.net/Risurrezione"] {risurrezione, article, "http://en.wikipedia.org/wiki/Risurrezione"} {risurrezione, audio-recording, [[472 818-2]]} {risurrezione, audio-recording, [[OPD-1399]]} {risurrezione, libretto, "http://dante.di.unipi.it/ricerca/libretti/risurrezione.html"} {risurrezione, libretto, "http://dante.di.unipi.it/ricerca/libretti/risurrezione.html"} / web {risurrezione, premiere-date, [[1904-11-30]]} {risurrezione, webpage, "http://www.delteatro.it/hdoc/result_opera.asp?idopera=1353"} [ritorno-ad-amore : opera = "Ritorno ad amore"] {ritorno-ad-amore, premiere-date, [[1908 (ca.)]]} / not-performed [roderigo-re-dei-goti : opera = "Roderigo, Re dei Goti" = "Roderigo" / short-name] {roderigo-re-dei-goti, illustration, "http://localhost:8080/ItalianOpera/occurs/opera/ponchielli/roderigo-score.jpg"} / local {roderigo-re-dei-goti, premiere-date, [[1863-12-26]]} [si : opera = "Sì"; "Si"] {si, note, [[Actually an operetta.]]} {si, premiere-date, [[1919-12-14]]} [siberia : opera = "Siberia"] {siberia, audio-recording, [[CDS 444/1-2]]} {siberia, premiere-date, [[1903-12-19]]} [silvano : opera = "Silvano"] {silvano, audio-recording, [[KC095.1CD]]} {silvano, premiere-date, [[1895-03-25]]} [simon-boccanegra : opera = "Simon Boccanegra" @"http://psi.ontopedia.net/Simon_Boccanegra"] {simon-boccanegra, article, "http://en.wikipedia.org/wiki/Simon_Boccanegra"} {simon-boccanegra, audio-recording, [[449 752-2]]} {simon-boccanegra, libretto, "http://www.giuseppeverdi.it/verdi/libretti/Simon_Boccanegra.htm"} / italian land-of-verdi web {simon-boccanegra, libretto, "http://dante.di.unipi.it/ricerca/libretti/SimonBoccanegra.html"} / web {simon-boccanegra, note, [[Time period: 1339 1363]]} {simon-boccanegra, premiere-date, [[1857-03-12]]} {simon-boccanegra, synopsis, "http://www.metopera.org/synopses/simon.html"} / web operanews {simon-boccanegra, webpage, "http://opera.stanford.edu/opera/Verdi/SimonBoccanegra/main.html"} [stiffelio : opera = "Stiffelio" = "Guglielmo Wellingrode" / altname @"http://psi.ontopedia.net/Stiffelio"] {stiffelio, article, "http://en.wikipedia.org/wiki/Stiffelio"} {stiffelio, illustration, "http://localhost:8080/ItalianOpera/occurs/opera/verdi/stiffelio-score.jpg"} / local {stiffelio, libretto, "http://php.indiana.edu/~lneff/libretti/stiffelio.htm"} / lyle-neff web {stiffelio, libretto, "http://www.giuseppeverdi.it/verdi/libretti/Stiffelio.htm"} / italian land-of-verdi web {stiffelio, note, [[Time period: beginning of the nineteenth century]]} {stiffelio, premiere-date, [[1850-11-16]]} {stiffelio, synopsis, "http://www.metopera.org/synopses/stiffeli.html"} / web operanews {stiffelio, webpage, "http://opera.stanford.edu/opera/Verdi/Stiffelio/main.html"} / web operaglass [suor-angelica : opera = "Suor Angelica" @"http://psi.ontopedia.net/Suor_Angelica"] {suor-angelica, article, "http://en.wikipedia.org/wiki/Suor_Angelica"} {suor-angelica, audio-recording, [[475 6531]]} {suor-angelica, audio-recording, [[5 56587 2]]} {suor-angelica, illustration, "http://localhost:8080/ItalianOpera/occurs/opera/puccini/suor-angelica-score1.gif"} / local {suor-angelica, libretto, "http://opera.stanford.edu/Puccini/SuorAngelica/libretto.html"} {suor-angelica, libretto, "http://www.karadar.com/Librettos/puccini_angelica.html"} {suor-angelica, premiere-date, [[1918-12-14]]} [tosca : opera = "Tosca" @"http://psi.ontopedia.net/Tosca"] {tosca, article, "http://en.wikipedia.org/wiki/Tosca"} {tosca, article, "http://www.ontopia.net/topicmaps/examples/opera/occurs/snl/tosca.htm"} / web snl {tosca, audio-recording, [[7 47175 8]]} {tosca, illustration, "http://localhost:8080/ItalianOpera/occurs/opera/puccini/tosca-poster1.jpg"} / local {tosca, libretto, "http://localhost:8080/operamap/occurs/tosca-libretto.htm"} / local {tosca, libretto, "http://opera.stanford.edu/opera/Puccini/Tosca/libretto.html"} / web operaglass {tosca, libretto, "http://dante.di.unipi.it/ricerca/libretti/Tosca_1899.html"} / web {tosca, libretto, "http://dante.di.unipi.it/ricerca/libretti/Tosca_1900.html"} / web {tosca, poster, "http://localhost:8080/operamap/occurs/tosca_poster.htm"} / local {tosca, poster, "http://www.r-ds.com/opera/pucciniana/pictures/tosca_poster.htm"} / web r-ds {tosca, premiere-date, [[1900-01-14]]} {tosca, sound-clip, "http://localhost:8080/operamap/occurs/vissi-darte.wav"} / local {tosca, sound-clip, "http://www.ontopia.net/topicmaps/examples/opera/occurs/vissi-darte.wav"} / web {tosca, synopsis, "http://localhost:8080/operamap/occurs/tosca-synopsis.htm"} / local operanews {tosca, synopsis, "http://localhost:8080/operamap/occurs/tosca_syn.php3.htm"} / az-opera local {tosca, synopsis, "http://www.azopera.com/learn/synopsis/tosca.shtml"} / az-opera web {tosca, synopsis, "http://www.metopera.org/synopses/tosca.html"} / web operanews {tosca, webpage, "http://opera.stanford.edu/opera/Puccini/Tosca/main.html"} / web operaglass [turandot : opera = "Turandot" @"http://psi.ontopedia.net/Turandot"] {turandot, article, "http://en.wikipedia.org/wiki/Turandot"} {turandot, article, "http://www.ontopia.net/topicmaps/examples/opera/occurs/snl/turandot.htm"} / web snl {turandot, audio-recording, [[423 855-2]]} {turandot, audio-recording, [[452 964-2]]} {turandot, illustration, "http://localhost:8080/ItalianOpera/occurs/opera/puccini/turandot-poster1.jpg"} / local {turandot, poster, "http://www.r-ds.com/opera/pucciniana/pictures/turandot_poster.htm"} / web r-ds {turandot, premiere-date, [[1926-04-25]]} {turandot, sound-clip, "http://localhost:8080/operamap/occurs/nessun-dorma.mp3"} / local {turandot, sound-clip, "http://www.ontopia.net/topicmaps/examples/opera/occurs/nessun-dorma.mp3"} / web {turandot, synopsis, "http://localhost:8080/operamap/occurs/t_syn.php3.htm"} / az-opera local {turandot, synopsis, "http://localhost:8080/operamap/occurs/turandot-synopsis.htm"} / local {turandot, synopsis, "http://www.azopera.com/learn/synopsis/turandot.shtml"} / az-opera web {turandot, synopsis, "http://www.metopera.org/synopses/turandot.html"} / web operanews {turandot, synopsis, "http://www.orc.soton.ac.uk/ngb/turandot.html"} / web opera-l {turandot, webpage, "http://opera.stanford.edu/opera/Puccini/Turandot/main.html"} / web operaglass [tzigana : opera = "Tzigana"] {tzigana, premiere-date, [[1910-02-03]]} [un-ballo-in-maschera : opera = "Un ballo in maschera"; "Ballo in maschera" = "A Masked Ball"; "Masked Ball" / english @"http://psi.ontopedia.net/Un_ballo_in_maschera"] {un-ballo-in-maschera, article, "http://en.wikipedia.org/wiki/Un_ballo_in_maschera"} {un-ballo-in-maschera, libretto, "http://php.indiana.edu/~lneff/libretti/Ball0.html"} / lyle-neff web {un-ballo-in-maschera, libretto, "http://www.giuseppeverdi.it/verdi/libretti/Ballo_in_maschera.htm"} / italian land-of-verdi web {un-ballo-in-maschera, note, [[Time period: end of the seventeenth century.]]} {un-ballo-in-maschera, note, [[Based-on Scribe's text for Auber's "Gustave III ou Le Bal masqu". There is also a Swedish version: add names.]]} {un-ballo-in-maschera, premiere-date, [[1859-02-17]]} {un-ballo-in-maschera, synopsis, "http://localhost:8080/operamap/occurs/ubm_syn.php3.htm"} / az-opera local {un-ballo-in-maschera, synopsis, "http://www.azopera.com/learn/synopsis/maschera.shtml"} / az-opera web {un-ballo-in-maschera, webpage, "http://opera.stanford.edu/opera/Verdi/Ballo/main.html"} / web operaglass [un-giorno-di-regno : opera = "Un giorno de regno"; "Giorno de regno" = "Il finto Stanislao"; "Finto Stanislao" / altname @"http://psi.ontopedia.net/Un_Giorno_di_Regno"] {un-giorno-di-regno, article, "http://en.wikipedia.org/wiki/Un_Giorno_di_Regno"} {un-giorno-di-regno, libretto, "http://php.indiana.edu/~lneff/libretti/giorno1.htm"} / lyle-neff web {un-giorno-di-regno, libretto, "http://www.giuseppeverdi.it/verdi/libretti/Giorno_di_regno.htm"} / italian land-of-verdi web {un-giorno-di-regno, note, [[Time period: 1773]]} {un-giorno-di-regno, premiere-date, [[1840-09-05]]} {un-giorno-di-regno, webpage, "http://opera.stanford.edu/opera/Verdi/Giorno/main.html"} [una-partita : opera = "Una Partita"; "Partita"] {una-partita, premiere-date, [[1933-01-19]]} [zanetto : opera = "Zanetto"] {zanetto, libretto, "http://www.mascagni.org/works/zanetto/libretto.html"} / mascagni.org web {zanetto, premiere-date, [[1896-03-02]]} {zanetto, video-recording, [[KCOU9005]]} [zaza : opera = "Zazà"; "Zaza"] {zaza, audio-recording, [[GB 2289/90-2]]} {zaza, libretto, "http://dante.di.unipi.it/ricerca/libretti/zaza.html"} / web {zaza, premiere-date, [[1900-11-10]]} [zingari : opera = "Zingari"] {zingari, illustration, "http://localhost:8080/ItalianOpera/occurs/opera/leoncavallo/edipo-re-recording.jpg"} / local {zingari, premiere-date, [[1912-09-16]]} [zoroastro : opera = "Zoroastro"] {zoroastro, premiere-date, [[1890]]} / not-performed /* -- TT: place -- */ [aegean-island : place = "Aegean island"] /* -- TT: play -- */ [adrienne-lecouvreur : play = "Adrienne Lecouvreur"] [alzire : play = "Alzire, ou Les Américains"] [angelo : play = "Angelo, Tyran de Padoue"] [attila-src : play = "Attila, König der Hunnen"] [catherine-ou-la-croix-dor : play = "Cathérine ou La croix d'or"] [cavalleria-rusticana-src : play = "Cavalleria Rusticana (play)" = "Cavalleria Rusticana" / play short-name] [chatterton-src : play = "Chatterton (play)" = "Chatterton" /play short-name ] [cyrano-de-bergerac-src : play = "Cyrano de Bergerac (play)" = "Cyrano de Bergerac" / play] [die-jungfrau-von-orleans : play = "Die Jungfrau von Orleans"; "Jungfrau von Orleans"] [die-rauber : play = "Die Räuber"; "Räuber"] [don-alvaro : play = "Don Alvaro, ó La Fuerza del Sino"] [don-carlos-src : play = "Don Carlos, Infant von Spanien"] [el-trovador : play = "El trovador"; "Trovador"] [faust : play = "Faust" @"http://psi.ontopedia.net/Goethe's_Faust"] {faust, article, "http://en.wikipedia.org/wiki/Goethe's_Faust"} [fedora0 : play = "Fédora (play)"; "Fedora" = "Fédora"; "Fedora" / play short-name] [francesca-da-rimini-src : play = "Francesca da Rimini (D'Annunzio)" = "Francesca da Rimini" / play dannunzio short-name] [francesca-da-rimini-src2 : play = "Francesca da Rimini (Crawford)" = "Francesca da Rimini" / play crawford short-name] [glauco-src : play = "Glauco"] [hamlet : play = "Hamlet" @"http://psi.ontopedia.net/Hamlet"] {hamlet, article, "http://en.wikipedia.org/wiki/Hamlet"} [henry-iv : play = "King Henry IV"] [hernani : play = "Hernani"] [il-ritorno : play = "Il ritorno"; "Ritorno"] [kabale-und-liebe : play = "Kabale und Liebe"] [la-battaille-de-toulouse : play = "La battaille de Toulouse"; "Battaille de Toulouse"] [la-cena-delle-beffe-src : play = "La cena delle beffe (play)" = "La cena delle beffe" / play short-name] [le-baruffe-chiozotte-src : play = "Le Baruffe Chiozotte (play)" = "Le Baruffe Chiozotte" / play short-name = "The Chioggian Brawls" / english] [la-coupe-et-les-levres : play = "La Coupe et les lèvres"; "Coupe et les lèvres"] [la-figlia-di-jorio-src : play = "La figlia di Jorio (play)"; "Figlia di Jorio" = "La figlia di Jorio"; "Figlia di Jorio" / play dannunzio short-name] [la-haine : play = "La Haine"; "Haine"] [la-houppelande : play = "La Houppelande"; "Houppelande"] [la-nave-src : play = "La nave (play)" = "La nave" / play short-name] [la-princesse-lointaine : play = "La princesse lointaine"] {la-princesse-lointaine, webpage, "http://www.accademiajr.it/bibvirt/rostand.html"} [la-tosca : play = "La Tosca"; "Tosca, La"] [larlesienne : play = "L'Arlésienne (play)"; "Arlesienne" = "L'Arlésienne"; "Arlesienne" / play short-name] [le-faux-stanislas : play = "Le faux Stanislas"; "Faux Stanislas"] [le-passant : play = "Le Passant"; "Passant"] [le-pasteur : play = "Le Pasteur, ou L'Évangile et le foyer"; "Pasteur, ou L'Évangile et le foyer"] [le-roi-samuse : play = "Le Roi s'amuse"; "Roi s'amuse"] [land-of-hearts-desire : play = "The Land of Heart's Desire";"Land of Heart's Desire"] {land-of-hearts-desire, article, "http://en.wikipedia.org/wiki/The_Land_of_Heart's_Desire"} [macbeth-src : play = "Macbeth (play)" = "Macbeth" / play short-name] [madama-butterfly-src : play = "Madama Butterfly (play)" = "Madama Butterfly" / play short-name] [madame-sans-gene0 : play = "Madame Sans-Gêne (play)" = "Madame Sans-Gêne" / play short-name] [marion-de-lorme : play = "Marion de Lorme"] [merry-wives : play = "The Merry Wives of Windsor"; "Merry Wives of Windsor"] [monsieur-de-pourceaugnac : play = "Monsieur de Pourceaugnac"] [nabuchodonosor : play = "Nabuchodonosor"] [nerone-src : play = "Nerone (play)" = "Nerone" / play short-name] [oedipus-tyrannus : play = "Oedipus Tyrannus"] [othello : play = "Othello"] [piquillo-alliaga : play = "Piquillo Alliaga"] [recognition-of-sakuntala : play = "The Recognition of Sakuntala"; "Recognition of Sakuntala" = "Abhijnanasakuntala" / sanskrit] [simon-boccanegra-src : play = "Simon Boccanegra (play)" = "Simon Boccanegra" / play short-name] [the-cat-and-the-cherub : play = "The Cat and the Cherub"] [the-girl-of-the-golden-west : play = "The Girl of the Golden West (play)"; "Girl of the Golden West" = "The Girl of the Golden West"; "Girl of the Golden West" / play short-name] [the-spanish-student : play = "The Spanish Student";"Spanish Student" / play short-name] [the-two-foscari : play = "The Two Foscari"] [turandot-src : play = "Turandot (play)" = "Turandot" / play short-name] [wallensteins-lager : play = "Wallensteins Lager"] [zaza-src : play = "Zazà (play)" = "Zazà" / play] /* -- TT: poem -- */ [assedio-di-sziget : poem = "Assedio di Sziget" = "Assedio di Sziget" / italian @"http://psi.ontopedia.net/Peril_of_Sziget"] {assedio-di-sziget, article, "http://en.wikipedia.org/wiki/Peril_of_Sziget"} [deutschland : poem = "Deutschland. Ein Wintermärchen" @"http://psi.ontopedia.net/Deutschland._Ein_Wintermärchen"] {deutschland, article, "http://en.wikipedia.org/wiki/Germany._A_Winter's_Tale"} {deutschland, article, "http://de.wikipedia.org/wiki/Deutschland._Ein_Wintermärchen"} / german [godiva : poem = "Godiva" @"http://psi.ontopedia.net/Godiva_(poem)"] {godiva, article, "http://en.wikipedia.org/wiki/Godiva_(poem)"} {godiva, webpage, "http://en.wikipedia.org/wiki/Lady_Godiva"} [inferno : poem = "Inferno"] [konrad-wallenrod : poem = "Konrad Wallenrod"] [parisina-src : poem = "Parisina (poem)" = "Parisina" / poem short-name] [roderick : poem = "Roderick"] [the-corsair : poem = "The Corsair"; "Corsair"] [william-ratcliff : poem = "William Ratcliff"] /* -- TT: publication -- */ [penguin-guide : publication = "New Penguin Opera Guide"] [snl : publication = "Store Norske Leksikon"] {snl, webpage, "http://www.snl.no"} [wikipedia : publication = "Wikipedia"] /* -- TT: publisher -- */ [az-opera : publisher = "Arizona Opera"] {az-opera, webpage, "http://www.azopera.com"} [baltramo : publisher = "Baltramo"] [cia : publisher = "CIA"] {cia, webpage, "http://www.cia.gov/cia/publications/factbook/"} [land-of-verdi : publisher = "Land of Verdi"] {land-of-verdi, webpage, "http://www.giuseppeverdi.net/ing/index-s.htm"} [lucca-p : publisher = "Lucca (publisher)" = "Lucca" / publisher short-name] [lyle-neff : publisher = "Lyle K. Neff"] {lyle-neff, webpage, "http://php.indiana.edu/~lneff/librettim.html"} [mark-lew : publisher = "Mark D. Lew"] {mark-lew, webpage, "http://home.earthlink.net/~markdlew/lib/"} [mascagni.org : publisher = "Mascagni.org"] {mascagni.org, webpage, "http://www.mascagni.org"} [naxos : publisher = "Naxos"] {naxos, webpage, "http://www.naxos.com"} [opera-l : publisher = "Opera-l synopsis project"] {opera-l, webpage, "http://www.orc.soton.ac.uk/ngb/list2.html"} [operabase : publisher = "OperaBase"] {operabase, webpage, "http://www.operabase.com"} [operaglass : publisher = "Opera Glass"] {operaglass, webpage, "http://opera.stanford.edu/opera/"} [operanews : publisher = "Opera News"] {operanews, webpage, "http://www.operanews.com"} [operaweb : publisher = "Opera Web"] {operaweb, webpage, "http://www.opera.it/Operaweb/en/home.html"} [puccini-study-centre : publisher = "Centro studi Giacomo Puccini"] {puccini-study-centre, webpage, "http://www.puccini.it"} / italian web puccini-study-centre [r-ds : publisher = "OperaResource"] {r-ds, webpage, "http://www.r-ds.com/opera/resource.htm"} [ricordi-p : publisher = "Ricordi"] [sonzogno : publisher = "Sonzogno"] /* -- TT: region -- */ [alsace : region = "Alsace"] [aragon : region = "Aragon"] [biscay : region = "Biscay"] [black-forest : region = "Schwarzwald" = "Black Forest" / english] [bohemia : region = "Bohemia"] [bretagne : region = "Brittany" = "Bretagne" / french] [calabria : region = "Calabria"] [corsica : region = "Corsica"] [flanders : region = "Flanders"] [franconia : region = "Franconia"] [kreta : region = "Crete" @"http://psi.ontopedia.net/Kreta"] [middle-east : region = "Middle East"] [rhineland : region = "Rhineland" = "Rheingebiet" / german] [savoia : region = "Savoia" = "Savoy" / english @"http://psi.ontopedia.net/Savoia"] [sicilia : region = "Sicilia" = "Sicily" / english @"http://psi.ontopedia.net/Sicilia"] [south-america : region = "South America"] [tyrol : region = "Tyrol"] [yorkshire : region = "Yorkshire" @"http://psi.ontopedia.net/Yorkshire"] [us-ca : region = "California" @"http://psi.ontopedia.net/California"] /* -- TT: status -- */ [circa : status = "Circa" = "Circa" / norwegian @"http://psi.ontopedia.net/circa"] [incorrect : status = "Incorrect" = "Uriktig" / norwegian @"http://psi.ontopedia.net/incorrect"] [not-performed : status = "Not performed" = "Ikke fremført" / norwegian @"http://psi.ontopedia.net/not_performed"] [uncertain : status = "Uncertain" = "Usikkert" / norwegian @"http://psi.ontopedia.net/uncertain"] /* -- TT: style -- */ [verismo : style = "Verismo"] {verismo, article, "http://www.operaworld.com/special/verismo.shtml"} / web {verismo, descr, "http://localhost:8080/operamap/occurs/verismo.htm"} / local {verismo, descr, "http://www.ontopia.net/topicmaps/examples/opera/occurs/verismo.htm"} / web /* -- TT: theatre -- */ [arena-di-verona : theatre = "Arena di Verona" @"http://psi.ontopedia.net/Arena_di_Verona"] {arena-di-verona, article, "http://en.wikipedia.org/wiki/Arena_di_Verona"} [cairo-opera : theatre = "Cairo Opera House"] [casino-di-san-remo : theatre = "Casinò di San Remo"] [chicago-opera : theatre = "Chicago Opera Theater"] [covent-garden-theatre : theatre = "Covent Garden Theatre"] [deutsche-oper : theatre = "Deutsche Oper"] [h-majestys : theatre = "His/Her Majesty's"] [hippodrome : theatre = "Hippodrome"] [dresdner-hofoper : theatre = "Dresdner Hofoper" = "Semperoper" / present-name @"http://psi.ontopedia.net/Dresdner_Hofoper"] {dresdner-hofoper, article, "http://de.wikipedia.org/wiki/Dresdner_Hofoper"} / german [la-fenice : theatre = "Teatro La Fenice"] {la-fenice, illustration, "http://localhost:8080/operamap/occurs/theatre/la-fenice-650x485.jpg"} / local {la-fenice, webpage, "http://web.tin.it/la_fenice/"} / web [la-scala : theatre = "Teatro alla Scala" = "La Scala" / short-name] {la-scala, illustration, "http://localhost:8080/operamap/occurs/theatre/la-scala-800x468.gif"} / local {la-scala, webpage, "http://www.teatroallascala.org"} / web [liceo-musicale : theatre = "Liceo Musicale"] [metropolitan : theatre = "Metropolitan Opera"] {metropolitan, webpage, "http://www.metopera.org"} / web [opera-comique : theatre = "Opéra Comique"] [paris-opera : theatre = "Paris Opéra"] [politeama-ciscutti : theatre = "Politeama Ciscutti" = "Istrian National Theatre" / present-name] [savoy-theatre : theatre = "Savoy Theatre"] [st-petersburg-imperial-opera : theatre = "Imperial Opera"] [teatro-apollo : theatre = "Teatro Apollo"] [teatro-argentina : theatre = "Teatro Argentina"] {teatro-argentina, webpage, "http://www.teatro.roma.it"} / web [teatro-bellini : theatre = "Teatro Bellini"] [teatro-carlo-felice : theatre = "Teatro Carlo Felice"] [teatro-coliseo : theatre = "Teatro Coliseo"] [teatro-colon : theatre = "Teatro Colón"] [teatro-comunale-di-bologna : theatre = "Teatro Comunale di Bologna"] [teatro-comunale-di-firenze : theatre = "Teatro Comunale di Firenze"] [teatro-comunale-di-trieste : theatre = "Teatro Comunale di Trieste"] [teatro-concordia : theatre = "Teatro Concordia"] [teatro-costanzi : theatre = "Teatro Costanzi"] [teatro-dal-verme : theatre = "Teatro dal Verme"] [teatro-della-pergola : theatre = "Teatro della Pergola"] {teatro-della-pergola, illustration, "http://localhost:8080/operamap/occurs/theatre/teatro-della-pergola-640x480.jpg"} / local {teatro-della-pergola, webpage, "http://www.pergola.firenze.it"} / web [teatro-di-reggio-emilia : theatre = "Teatro di Reggio Emilia"] [teatro-di-torino : theatre = "Teatro di Torino"] [teatro-filarmonico : theatre = "Teatro Filarmonico"] [teatro-filodrammatici : theatre = "Teatro Filodrammatici"] [teatro-grande : theatre = "Teatro Grande"] [teatro-la-pariola : theatre = "Teatro La Pariola"] [teatro-lirico : theatre = "Teatro Lirico" = "Teatro alla Canobbiana" / former-name] [teatro-manzoni : theatre = "Teatro Manzoni"] [teatro-massimo : theatre = "Teatro Massimo"] [teatro-mercadante : theatre = "Teatro Mercadante"] [teatro-municipale : theatre = "Teatro Municipale di Piacenza"] [teatro-nuovo : theatre = "Teatro Nuovo"] [teatro-pagliano : theatre = "Teatro Pagliano"] [teatro-quirino : theatre = "Teatro Quirino"] {teatro-quirino, webpage, "http://www.teatroquirino.it"} [teatro-reale-dell-opera : theatre = "Teatro Reale dell'Opera"] [teatro-regio-di-torino : theatre = "Teatro Regio di Torino" @"http://psi.ontopedia.net/Teatro_Regio_di_Torino"] {teatro-regio-di-torino, article, "http://en.wikipedia.org/wiki/Teatro_Regio_di_Torino"} [teatro-rossini-di-venezia : theatre = "Teatro Rossini di Venezia" @"http://psi.ontopedia.net/Teatro_Rossini_(Venezia)"] {teatro-rossini-di-venezia, article, "http://it.wikipedia.org/wiki/Teatro_Rossini_(Venezia)"} / italian [teatro-san-carlo : theatre = "Teatro San Carlo"] {teatro-san-carlo, webpage, "http://www.intecs.it/voxneapolis/FIRMS/SANCARLO/sancarlo.htm"} / web [teatro-sociale : theatre = "Teatro Sociale di Lecco"] [teatro-vittorio-emanuele : theatre = "Teatro Vittorio Emanuele"] [theatre-du-casino : theatre = "Theatre du Casino"] [wiener-hofoper : theatre = "Wiener Hofoper" = "Wiener Staatsoper" / present-name @"http://psi.ontopedia.net/Wiener_Hofoper"] {wiener-hofoper, article, "http://de.wikipedia.org/wiki/Wiener_Hofoper"} / german /* -- TT: triptych -- */ [il-trittico : triptych = "Il Trittico"; "Trittico" @"http://psi.ontopedia.net/Il_Trittico"] {il-trittico, article, "http://en.wikipedia.org/wiki/Il_Trittico"} {il-trittico, audio-recording, [[5 56587 2]]} {il-trittico, illustration, "http://localhost:8080/ItalianOpera/occurs/opera/puccini/il-trittico-score1.gif"} / local {il-trittico, premiere-date, [[1918-12-14]]} {il-trittico, webpage, "http://opera.stanford.edu/opera/Puccini/Trittico/main.html"} / web operaglass /* -- TT: voice-type -- */ [baritone : voice-type = "Baritone" = "Bariton" / norwegian @"http://psi.ontopedia.net/Baritone"] [bass : voice-type = "Bass" ("Basses" / plural) @"http://psi.ontopedia.net/Bass"] [bass-baritone : voice-type = "Bass-baritone" = "Bass-bariton" / norwegian @"http://psi.ontopedia.net/Bass_baritone"] [contralto : voice-type = "Contralto" = "Alt" / norwegian @"http://psi.ontopedia.net/Contralto"] [mezzo : voice-type = "Mezzosoprano" = "Mezzosopran" / norwegian @"http://psi.ontopedia.net/Mezzo"] [silent-voice : voice-type = "Silent" = "Stumm" / norwegian @"http://psi.ontopedia.net/Silent_voice"] [soprano : voice-type = "Soprano" = "Sopran" / norwegian @"http://psi.ontopedia.net/Soprano"] [spoken-voice : voice-type = "Spoken" = "Tale" / norwegian @"http://psi.ontopedia.net/Spoken_voice"] [tenor : voice-type = "Tenor" @"http://psi.ontopedia.net/Tenor"] /* -- TT: work -- */ [o-mese-mariano : work = "O Mese Mariano"] [work-by-paul-de-choudens : work = "[work by Paul de Choudens]"] [work-by-paul-ferrier : work = "[work by Paul Ferrier]"] /* -- TT: writer -- */ /* fixme: writers with unknown dates of birth and death using o for i"http://psi.ontopedia.net/" instance-of($PERSON, o:Writer), {o:date_of_birth($PERSON, $DOB), o:date_of_death($PERSON, $DOD), $DOB = "(unknown)" | o:date_of_death($PERSON, $DOD), o:date_of_birth($PERSON, $DOB), $DOD = "(unknown)"} order by $PERSON? */ [andersen : writer = "Andersen, Hans Christian" = "Hans Christian Andersen" / normal = "Andersen" / short-name @"http://psi.ontopedia.net/Hans_Christian_Andersen"] {andersen, article, "http://en.wikipedia.org/wiki/Hans_Christian_Andersen"} {andersen, date-of-birth, [[1805-04-02]]} {andersen, date-of-death, [[1875-08-04]]} [anicet-bourgeois : writer = "Anicet-Bourgeois, Auguste" = "Auguste Anicet-Bourgeois" / normal = "Anicet-Bourgeois" / short-name @"http://psi.ontopedia.net/Auguste_Anicet-Bourgeois"] {anicet-bourgeois, date-of-birth, [[1806-01-25]]} {anicet-bourgeois, date-of-death, [[1870-01-12]]} [bandello : writer = "Bandello, Matteo" = "Matteo Bandello" / normal = "Bandello" / short-name] {bandello, date-of-birth, [[1484]]} {bandello, date-of-death, [[1561]]} [belasco : writer = "Belasco, David" = "David Belasco" / normal = "Belasco" / short-name @"http://psi.ontopedia.net/David_Belasco"] {belasco, article, "http://en.wikipedia.org/wiki/David_Belasco"} {belasco, date-of-birth, [[1853-07-25]]} {belasco, date-of-death, [[1931-05-15]]} [berton : writer = "Berton, Pierre-Samuel" = "Pierre-Samuel Berton" / normal = "Berton" / short-name] {berton, date-of-birth, [[(unknown)]]} {berton, date-of-death, [[(unknown)]]} [bourgeois : writer = "Bourgeois, Eugène" = "Eugène Bourgeois" / normal = "Bourgeois" / short-name] {bourgeois, date-of-birth, [[(unknown)]]} {bourgeois, date-of-death, [[(unknown)]]} [brazier : writer = "Brazier, Nicolas" = "Nicolas Brazier" / normal = "Brazier" / short-name @"http://psi.ontopedia.net/Nicolas_Brazier"] {brazier, date-of-birth, [[1783-02-17]]} {brazier, date-of-death, [[1838-02-18]]} [bulwer-lytton : writer = "Bulwer-Lytton, Edward" = "Edward Bulwer-Lytton" / normal = "Bulwer-Lytton" / short-name @"http://psi.ontopedia.net/Edward_Bulwer-Lytton"] {bulwer-lytton, date-of-birth, [[1803-05-25]]} {bulwer-lytton, date-of-death, [[1873-01-18]]} [byron : writer = "Lord Byron" = "Lord Byron" / normal = "Byron" / short-name @"http://psi.ontopedia.net/Lord_Byron"] {byron, date-of-birth, [[1788-01-22]]} {byron, date-of-death, [[1824-04-19]]} [chatrian : writer = "Chatrian, Alexandre" = "Alexandre Chatrian" / normal = "Chatrian" / short-name @"http://psi.ontopedia.net/Alexandre_Chatrian"] {chatrian, date-of-birth, [[1826-12-18]]} {chatrian, date-of-death, [[1890-09-03]]} [clarette : writer = "Clarette, Jules" = "Jules Clarette" / normal = "Clarette" / short-name] {clarette, date-of-birth, [[1840-12-03]]} {clarette, date-of-death, [[1913-12-23]]} [coppee : writer = "Coppée, François" = "François Coppée" / normal = "Coppée" / short-name @"http://psi.ontopedia.net/François_Coppée"] {coppee, date-of-birth, [[1842-01-26]]} {coppee, date-of-death, [[1908-05-23]]} [constant : writer = "Constant, Benjamin" = "Benjamin Constant" / normal = "Constant" / short-name = "Henri-Benjamin Constant de Rebecque" / full-name @"http://psi.ontopedia.net/Benjamin_Constant"] {constant, article, "http://en.wikipedia.org/wiki/Benjamin_Constant"} {constant, date-of-birth, [[1767-10-25]]} {constant, date-of-death, [[1830-12-08]]} [cornu : writer = "Cornu, Francis" = "Francis Cornu" / normal = "Cornu" / short-name] {cornu, date-of-birth, [[1800]]} {cornu, date-of-death, [[1848]]} [cortesi : writer = "Cortesi, Antonio" = "Antonio Cortesi" / normal = "Cortesi" / short-name] {cortesi, date-of-birth, [[(unknown)]]} {cortesi, date-of-death, [[(unknown)]]} [cossa : writer = "Cossa, Pietro" = "Pietro Cossa" / normal = "Cossa" / short-name @"http://psi.ontopedia.net/Pietro_Cossa"] {cossa, date-of-birth, [[1830]]} {cossa, date-of-death, [[1880]]} [crawford : writer = "Crawford, Francis Marion" = "Francis Marion Crawford" / normal = "Crawford" / short-name @"http://psi.ontopedia.net/Francis_Marion_Crawford"] {crawford, date-of-birth, [[1854-08-02]]} {crawford, date-of-death, [[1909-04-09]]} [da-porto : writer = "da Porto, Luigi" = "Luigi da Porto" / normal = "da Porto" / short-name @"http://psi.ontopedia.net/Luigi_da_Porto"] {da-porto, date-of-birth, [[1485]]} {da-porto, date-of-death, [[1529]]} [dante : writer = "Dante Alighieri" = "Dante Alighieri" / normal = "Dante" / short-name @"http://psi.ontopedia.net/Dante_Alighieri"] {dante, date-of-birth, [[1265-05/06]]} {dante, date-of-death, [[1321-09-14]]} [daudet : writer = "Daudet, Alphonse" = "Alphonse Daudet" / normal = "Daudet" / short-name] {daudet, date-of-birth, [[1840-05-13]]} {daudet, date-of-death, [[1897-12-16]]} [dostoyevsky : writer = "Dostoyevsky, Fyodor" = "Fyodor Dostoyevsky" / normal = "Dostoyevsky" / short-name @"http://psi.ontopedia.net/Fyodor_Dostoyevsky"] {dostoyevsky, date-of-birth, [[1821-11-11]]} {dostoyevsky, date-of-death, [[1881-02-09]]} [dumas-fils : writer = "Dumas, Alexandre, fils" = "Alexandre, fils Dumas" / normal = "Dumas" / short-name @"http://psi.ontopedia.net/Alexandre_Dumas,_fils"] {dumas-fils, date-of-birth, [[1824-07-27]]} {dumas-fils, date-of-death, [[1895-11-27]]} [erckmann : writer = "Erckmann, Emile" = "Emile Erckmann" / normal = "Erckmann" / short-name @"http://psi.ontopedia.net/Emile_Erckmann"] {erckmann, date-of-birth, [[1822-05-20]]} {erckmann, date-of-death, [[1899-03-14]]} [fernald : writer = "Fernald, Chester Bailey" = "Chester Bailey Fernald" / normal = "Fernald" / short-name] {fernald, date-of-birth, [[1869-03-18]]} {fernald, date-of-death, [[1938-04-10]]} [goethe : writer = "Goethe, Johann Wolfgang von" = "Johann Wolfgang von Goethe" / normal = "Goethe" / short-name @"http://psi.ontopedia.net/Johann_Wolfgang_Goethe"] {goethe, date-of-birth, [[1749-08-28]]} {goethe, date-of-death, [[1832-03-22]]} [gold : writer = "Gold, Didier" = "Didier Gold" / normal = "Gold" / short-name] {gold, date-of-birth, [[(unknown)]]} {gold, date-of-death, [[(unknown)]]} [goldoni : writer = "Goldoni, Carlo" = "Carlo Goldoni" / normal = "Goldoni" / short-name @"http://psi.ontopedia.net/Carlo_Goldoni"] {goldoni, date-of-birth, [[1707-02-25]]} {goldoni, date-of-death, [[1793-02-06]]} [gozzi : writer = "Gozzi, Carlo" = "Carlo Gozzi" / normal = "Gozzi" / short-name @"http://psi.ontopedia.net/Carlo_Gozzi"] {gozzi, date-of-birth, [[1720-12-13]]} {gozzi, date-of-death, [[1806-04-14]]} {gozzi, note, [[For other libretti, see CODO.]]} [gubernatis : writer = "Gubernatis, Angelo de" = "Angelo de Gubernatis" / normal = "Gubernatis" / short-name @"http://psi.ontopedia.net/Angelo_de_Gubernatis"] {gubernatis, article, "http://en.wikipedia.org/wiki/Angelo_de_Gubernatis"} {gubernatis, date-of-birth, [[1840-04-07]]} {gubernatis, date-of-death, [[1913-02-20]]} [gutierrez : writer = "Gutiérrez, Antonio García" = "Antonio García Gutiérrez" / normal = "Gutiérrez" / short-name @"http://psi.ontopedia.net/Antonio_García_Gutiérrez"] {gutierrez, date-of-birth, [[1812-07-05]]} {gutierrez, date-of-death, [[1884-08-06]]} [heine : writer = "Heine, Heinrich" = "Heinrich Heine" / normal = "Heine" / short-name @"http://psi.ontopedia.net/Heinrich_Heine"] {heine, date-of-birth, [[1797-12-13]]} {heine, date-of-death, [[1856-02-17]]} [hugo : writer = "Hugo, Victor" = "Victor Hugo" / normal = "Hugo" / short-name @"http://psi.ontopedia.net/Victor_Hugo"] {hugo, date-of-birth, [[1802-02-26]]} {hugo, date-of-death, [[1885-05-22]]} [irving : writer = "Irving, Washington" = "Washington Irving" / normal = "Irving" / short-name] {irving, date-of-birth, [[1783-04-03]]} {irving, date-of-death, [[1859-11-28]]} [kalidasa : writer = "Kalidasa" = "Kalidasa" / normal = "Kalidasa" / short-name @"http://psi.ontopedia.net/Kalidasa"] {kalidasa, date-of-birth, [[353(?)]]} {kalidasa, date-of-death, [[420(?)]]} [karr : writer = "Karr, Alphonse" = "Alphonse Karr" / normal = "Karr" / short-name @"http://psi.ontopedia.net/Alphonse_Karr"] {karr, date-of-birth, [[1808-11-24]]} {karr, date-of-death, [[1890-09-29]]} [lagerlof : writer = "Lagerlöf, Selma" = "Selma Lagerlöf" / normal = "Lagerlöf" / short-name @"http://psi.ontopedia.net/Selma_Lagerlöf"] {lagerlof, date-of-birth, [[1858-11-20]]} {lagerlof, date-of-death, [[1940-04-16]]} [las-casas : writer = "Las Casas, Bartolomé de" = "Bartolomé de las Casas" / normal = "Las Casas" / short-name @"http://psi.ontopedia.net/Bartolomé_de_las_Casas"] {las-casas, article, "http://en.wikipedia.org/wiki/Bartolomé_de_las_Casas"} {las-casas, date-of-birth, [[1484-11-24]]} / uncertain {las-casas, date-of-death, [[1566-07-17]]} [legouve : writer = "Legouvé, Ernest" = "Ernest Legouvé" / normal = "Legouvé" / short-name @"http://psi.ontopedia.net/Ernest_Legouvé"] {legouve, date-of-birth, [[1807-02-05]]} {legouve, date-of-death, [[1903-03-14]]} [longfellow : writer = "Longfellow, Henry Wadsworth" = "Henry Wadsworth Longfellow" / normal = "Longfellow" / short-name @"http://psi.ontopedia.net/Henry_Wadsworth_Longfellow"] {longfellow, article, "http://en.wikipedia.org/wiki/Henry_Wadsworth_Longfellow"} {longfellow, date-of-birth, [[1807-02-27]]} {longfellow, date-of-death, [[1882-03-24]]} [louys : writer = "Louÿs, Pierre"; "Louys, Pierre" = "Pierre Louÿs"; "Pierre Louys" / normal = "Louÿs"; "Louys" / short-name @"http://psi.ontopedia.net/Pierre_Louÿs"] {louys, date-of-birth, [[1870-12-10]]} {louys, date-of-death, [[1925-06-06]]} [manzoni : writer = "Manzoni, Alessandro" = "Alessandro Manzoni" / normal = "Manzoni" / short-name @"http://psi.ontopedia.net/Alessandro_Manzoni"] {manzoni, date-of-birth, [[1785-03-07]]} {manzoni, date-of-death, [[1873-05-22]]} [melesville : writer = "Mélesville" = "Mélesville" / normal = "Mélesville" / short-name = "Baron Anne-Honoré-Joseph Duveyrier de Mélesville" / real-name = "Duveyrier" / real-name short-name] {melesville, date-of-birth, [[1787-11-13]]} {melesville, date-of-death, [[1865-11-03]]} {melesville, note, [[Some sources, including Wikipedia, give the name as Mélésville, but most use Mélesville.]]} {melesville, webpage, "http://en.wikipedia.org/wiki/Mélésville"} /* fr. dram. Forf., kendt under Pseudonymet Mélesville (1787-1865), ble 1809 Advokat i Montpellier, senere kejserlig Generalprokurør, tog 1814 ved Restaurationen sin Afsked og gav sig til at skrive Melodramaer. Med Scribe, Brazier, Bayard og sin yngre Broder Charles forfattede D. siden 1815 c. 300 Lystspil og Vaudeviller, der ganske tilhører Scribe's Skole. Brødrenes mest berømte Stykker er: "Michel Perrin, ou i'espion sans le savoir" (1834; i Kbhvn havde Rosenkilde, i Kria Joh. Brun heri en af deres Glansroller, som Titelfiguren) og "La meunière de Marly" (1840). Af de andre kan nævnes: "L'oncle rival" (1811), "L'ermite" (1820), "Valérie" (1823, Mlls. Mars' Glansrolle), "Le bourgmestre de Saardam" (1825), "La chatte mélamorphosée en femme" (1827), "Zoé" (1830), "Les vieux péch´â‚¬s" (1833), "Elle est folle" (1835), "Le lac des fées" (1839), "La fille de Figaro" (1843), "La bataille de la vie" (1853), "Monsieur Beauminet" (1854) etc. Salmonsens konversationsleksikon, Anden Udgave, Bind VI, 1917 */ [mickiewicz : writer = "Mickiewicz, Adam" = "Adam Mickiewicz" / normal = "Mickiewicz" / short-name @"http://psi.ontopedia.net/Adam_Mickiewicz"] {mickiewicz, date-of-birth, [[1798-12-24]]} {mickiewicz, date-of-death, [[1855-11-26]]} [moliere : writer = "Molière, Jean-Baptiste" = "Jean-Baptiste Molière" / normal = "Jean-Baptiste Poquelin" / real-name = "Molière" / short-name] {moliere, date-of-birth, [[1622-01-15]]} {moliere, date-of-death, [[1673-02-17]]} [morselli : writer = "Morselli, Ercole Luigi" = "Ercole Luigi Morselli" / normal = "Morselli" / short-name] {morselli, bibref, [[Meli, Vasili Bertoloni and Lucia Ferrati: "Ercole Luigi Morselli" (La Nuova Italia, 1993)]]} {morselli, note, [[From http://www.recensionidilibri.it/8822112547: "Un'odissea, la vita di Ercole Luigi Morselli (Pesaro 1882 - Roma 1921). Dal cenacolo fiorentino con Alfredo Mori, Giovanni Papini e Giuseppe Prezzolini al viaggio in Africa e in America Latina con Federico Valerio Ratti, dalla fuga d'amore con Bianca Bertucci alla dura e spietata gavetta nell'ambiente giornalistico romano, dal pellegrinaggio per le 'corti' teatrali ed editoriali e poi, malato di tisi, per i sanatori italiani, dai trionfi del dramma teatrale "Glauco" (prima rappresentazione nel 1919) alla prematura morte, l'accidentato e tormentoso percorso biografico e letterario dello scrittore sembra riassumere in sé tutti quei 'luoghi' di una topica esistenziale e ideologica in cui si identificano (da Campana a Gozzano) tanti protagonisti del primo Novecento italiano. Troppo a lungo e ingiustamente dimenticate da pubblico e critica, l'opera e la personalità di Ercole Luigi Morselli meritano oggi, a più di settant'anni dalla morte, di essere riscoperte e rivalutate. Poco conosciuto e studiato come drammaturgo - pur avendo rappresentato all'epoca sua, tramite gli osannati capolavori di "Orione" e "Glauco", l'unica alternativa italiana, in senso antieroico si intende, al mito dannunziano - Morselli lo è ancor meno come autore di prose: prose - di cui pure il teatro si nutre ampiamente sia per lo stile che per le immagini - nelle quali rivela invece una tecnica descrittiva e stilistica sapiente ed originale, graffiante e allo stesso tempo capace di alto lirismo, e un gusto raffinato, quasi trecentista, attento alla forma e all'uso del vocabolo. In questo studio si è cercato di ricostruire la sofferta parabola biografica ed artistica dello scrittore, non trascurando di porre l'accento su quella produzione inedita, riemersa dallo spoglio delle carte autografe, di fondamentale importanza per la piena e profonda comprensione di una delle personalità più suggestive e complesse del nostro Novecento letterario."]]} {morselli, date-of-birth, [[1882]]} {morselli, date-of-death, [[1921]]} [murger : writer = "Murger, Henri" = "Henri Murger" / normal = "Murger" / short-name @"http://psi.ontopedia.net/Henri_Murger"] {murger, article, "http://en.wikipedia.org/wiki/Henri_Murger"} {murger, date-of-birth, [[1822-03-27]]} {murger, date-of-death, [[1861-01-28]]} [musset : writer = "Musset, Alfred de" = "Alfred de Musset" / normal = "Musset" / short-name @"http://psi.ontopedia.net/Alfred_de_Musset"] {musset, date-of-birth, [[1810-12-11]]} {musset, date-of-death, [[1857-05-02]]} [ouida : writer = "Ramée, Marie Louise de la" = "Ouida" / nom-de-plume = "Marie Louise de la Ramée" / normal = "Ramée" / short-name @"http://psi.ontopedia.net/Ouida"] {ouida, date-of-birth, [[1839-01-07]]} {ouida, date-of-death, [[1908-01-25]]} [pineux-duval : writer = "Pineux Duval, Alexandre-Vincent" = "Alexandre-Vincent Pineux Duval" / normal = "Pineux Duval" / short-name @"http://psi.ontopedia.net/Alexandre-Vincent_Pineux_Duval"] {pineux-duval, date-of-birth, [[1767-04-06]]} {pineux-duval, date-of-death, [[1842-09-01]]} [prevost : writer = "Prévost, Antoine François" = "Antoine François Prévost" / normal = "Prévost" / short-name @"http://psi.ontopedia.net/Antoine_François_Prévost"] {prevost, date-of-birth, [[1697-04-01]]} {prevost, date-of-death, [[1763-11-25]]} {prevost, note, [[For other libretti, see CODO.]]} [rostand : writer = "Rostand, Edmond" = "Edmond Rostand" / normal = "Rostand" / short-name @"http://psi.ontopedia.net/Edmond_Rostand"] {rostand, article, "http://en.wikipedia.org/wiki/Edmond_Rostand"} {rostand, date-of-birth, [[1868-04-01]]} {rostand, date-of-death, [[1918-12-02]]} [saavedra : writer = "Saavedra Ramírez de Banquedano, Angel de" = "Angel de Saavedra Ramírez de Banquedano" / normal = "Saavedra Ramírez de Banquedano" / short-name @"http://psi.ontopedia.net/Angel_de_Saavedra"] {saavedra, date-of-birth, [[1791-03-10]]} {saavedra, date-of-death, [[1865-06-22]]} [salvatore-di-giacomo : writer = "Giacomo, Salvatore di" = "Salvatore di Giacomo" / normal = "Giacomo" / short-name @"http://psi.ontopedia.net/Salvatore_Di_Giacomo"] {salvatore-di-giacomo, date-of-birth, [[1860-03-16]]} {salvatore-di-giacomo, date-of-death, [[1934-04-05]]} [sardou : writer = "Sardou, Victorien" = "Victorien Sardou" / normal = "Sardou" / short-name @"http://psi.ontopedia.net/Victorien_Sardou"] {sardou, article, "http://en.wikipedia.org/wiki/Victorien_Sardou"} {sardou, date-of-birth, [[1831-09-05]]} {sardou, date-of-death, [[1908-11-08]]} {sardou, note, [[For other libretti, see CODO.]]} [schiller : writer = "Schiller, Friedrich" = "Friedrich Schiller" / normal = "Schiller" / short-name @"http://psi.ontopedia.net/Friedrich_Schiller"] {schiller, date-of-birth, [[1759-11-10]]} {schiller, date-of-death, [[1805-05-09]]} [shakespeare : writer = "Shakespeare, William" = "William Shakespeare" / normal = "Shakespeare" / short-name @"http://psi.ontopedia.net/Shakespeare"] {shakespeare, date-of-birth, [[1564-04-26 (baptised)]]} {shakespeare, date-of-death, [[1616-04-23]]} [simon : writer = "Simon, Charles" = "Charles Simon" / normal = "Simon" / short-name] {simon, date-of-birth, [[(unknown)]]} {simon, date-of-death, [[(unknown)]]} [sophocles : writer = "Sophocles" = "Sophocles" / normal = "Sophocles" / short-name @"http://psi.ontopedia.net/Sophocles"] {sophocles, article, "http://en.wikipedia.org/wiki/Sophocles"} {sophocles, date-of-birth, [[-496]]} / circa {sophocles, date-of-death, [[-406]]} [southey : writer = "Southey, Robert" = "Robert Southey" / normal = "Southey" / short-name @"http://psi.ontopedia.net/Robert_Southey"] {southey, date-of-birth, [[1774-08-12]]} {southey, date-of-death, [[1843-03-21]]} [souvestre : writer = "Souvestre, Émile" = "Émile Souvestre" / normal = "Souvestre" / short-name @"http://psi.ontopedia.net/Émile_Souvestre"] {souvestre, date-of-birth, [[1806-04-15]]} {souvestre, date-of-death, [[1854-07-05]]} [tennyson : writer = "Tennyson, Alfred Lord" = "Alfred Lord Tennyson" / normal = "Tennyson" / short-name @"http://psi.ontopedia.net/Tennyson"] {tennyson, article, "http://en.wikipedia.org/wiki/Tennyson"} {tennyson, date-of-birth, [[1809-08-06]]} {tennyson, date-of-death, [[1892-10-06]]} [tolstoy : writer = "Tolstoy, Leo" = "Leo Tolstoy" / normal = "Tolstoy" / short-name @"http://psi.ontopedia.net/Leo_Tolstoy"] {tolstoy, date-of-birth, [[1828-09-09]]} {tolstoy, date-of-death, [[1910-11-20]]} [verga : writer = "Verga, Giovanni" = "Giovanni Verga" / normal = "Verga" / short-name @"http://psi.ontopedia.net/Giovanni_Verga"] {verga, date-of-birth, [[1840-09-02]]} {verga, date-of-death, [[1922-01-27]]} [vigny : writer = "Vigny, Alfred de" = "Alfred de Vigny" / normal = "Vigny" / short-name] {vigny, article, "http://en.wikipedia.org/wiki/Alfred_de_Vigny"} {vigny, date-of-birth, [[1797-03-27]]} {vigny, date-of-death, [[1863-09-17]]} [voltaire : writer = "Voltaire, François de" = "François de Voltaire" / normal = "Voltaire" / short-name @"http://psi.ontopedia.net/Voltaire"] {voltaire, date-of-birth, [[1694-11-21]]} {voltaire, date-of-death, [[1778-05-30]]} [von-hillern : writer = "von Hillern, Wilhelmine"; "Hillern, Wilhelmine" = "Wilhelmine von Hillern" / normal = "von Hillern" / short-name @"http://psi.ontopedia.net/Wilhelmine_von_Hillern"] {von-hillern, date-of-birth, [[1836-03-11]]} {von-hillern, date-of-death, [[1916-12-05]]} [werner : writer = "Werner, Zacharias" = "Zacharias Werner" / normal = "Werner" / short-name @"http://psi.ontopedia.net/Friedrich_Ludwig_Zacharias_Werner"] {werner, date-of-birth, [[1768-11-18]]} {werner, date-of-death, [[1823-01-17]]} [yeats : writer = "Yeats, William Butler" = "William Butler Yeats" / normal = "Yeats" / short-name @"http://psi.ontopedia.net/William_Butler_Yeats"] {yeats, article, "http://en.wikipedia.org/wiki/William_Butler_Yeats"} {yeats, date-of-birth, [[1865-06-13]]} {yeats, date-of-death, [[1939-01-28]]} [zrinyi : writer = "Zrínyi, Miklós" = "Miklós Zrínyi" / normal = "Zrínyi" / short-name = "Nikola Zrinski" / croatian @"http://psi.ontopedia.net/Miklós_Zrínyi"] {zrinyi, article, "http://en.wikipedia.org/wiki/Miklós_Zrínyi"} {zrinyi, date-of-birth, [[1620-01-05]]} {zrinyi, date-of-death, [[1662-11-18]]} /* -- TT: (untyped) -- */ [display = "Display" @"http://www.topicmaps.org/xtm/1.0/core.xtm#display"] {display, descr, [[Suitability for display: Suitability of a topic name for display; for use in the parameters of variant names.]]} [la-tilda-libretto-by = "The librettist of La Tilde"] {la-tilda-libretto-by, descr, [[The libretto was written by Zanardini under the pseudonym Anneldo Graziani.]]} [literary-work = "Literary work" = "Litterært verk" / norwegian @"http://psi.ontopedia.net/Literary_work"] [madama-butterfly-based-on = "The genesis of Madame Butterfly"] {madama-butterfly-based-on, bibref, [[van Rij, Jan: "Madame Butterfly: Japonisme, Puccini, and the search for the real Cho-Cho-San", Stone Bridge Press (Berkeley, 2001)]]} [musical-work = "Musical work" = "Musikalsk verk" / norwegian @"http://psi.ontopedia.net/Musical_work"] [organization = "Organization" = "Organisasjon" / norwegian @"http://psi.ontopedia.net/Organization"] [pauld-website = "Opera: A Philatelic History" %"http://home.prcn.org/~pauld/opera/"] [revision = "Revision" @"http://psi.ontopedia.net/revision"] [singer = "Singer" = "Sanger" / norwegian @"http://psi.ontopedia.net/Singer"] [sort = "Sort" @"http://www.topicmaps.org/xtm/1.0/core.xtm#sort"] {sort, descr, [[Suitability for sorting: Suitability of a topic name for use as a sort key; for use in the parameters of variant names.]]} [theatrical-work = "Theatrical work" = "Dramatisk verk" / norwegian @"http://psi.ontopedia.net/Theatrical_work"] [tosca-takes-place-in = "The setting of Tosca in Rome"] {tosca-takes-place-in, bibref, [[Nicassio, Susan Vandiver: "Tosca's Rome: The Play and the Opera in Historical Perspective", University of Chicago Press (Chicago, 2002)]]} [turandot-takes-place-in = "Turandot performed in the Forbidden City"] {turandot-takes-place-in, website, "http://www.turandotonsite.com/"} / web {turandot-takes-place-in, article, "http://www.sallys-place.com/travel/asia/beijing.htm"} / web /* fixme: check out http://www.opera-on-site.com/frame_e.html could add '87 Aida, '88 Jerusalem, '94 Carmen 'xx Tosca */ /* ----------------- Associations -------------- */ /* -- AT: appears-in */ appears-in( adriana-lecouvreur : work, abbe-of-chazeuil : character ) appears-in( adriana-lecouvreur : work, adriana : character ) appears-in( adriana-lecouvreur : work, maurizio : character ) appears-in( adriana-lecouvreur : work, michonnet : character ) appears-in( adriana-lecouvreur : work, mlle-dangeville : character ) appears-in( adriana-lecouvreur : work, mlle-jouvenot : character ) appears-in( adriana-lecouvreur : work, poisson : character ) appears-in( adriana-lecouvreur : work, prince-de-bouillon : character ) appears-in( adriana-lecouvreur : work, princess-de-bouillon : character ) appears-in( adriana-lecouvreur : work, quinault : character ) appears-in( aida : work, aida-c : character ) appears-in( aida : work, amneris : character ) appears-in( aida : work, amonasro : character ) appears-in( aida : work, high-priestess : character ) appears-in( aida : work, king-of-egypt : character ) appears-in( aida : work, messenger2 : character ) appears-in( aida : work, radames : character ) appears-in( aida : work, ramfis : character ) appears-in( alzira : work, alvaro : character ) appears-in( alzira : work, alzira-c : character ) appears-in( alzira : work, ataliba : character ) appears-in( alzira : work, gusmano : character ) appears-in( alzira : work, otumbo : character ) appears-in( alzira : work, ovando : character ) appears-in( alzira : work, zamoro : character ) appears-in( alzira : work, zuma : character ) appears-in( amica : work, amica-c : character ) appears-in( amica : work, giorgio2 : character ) appears-in( amica : work, magdelone : character ) appears-in( amica : work, pere-camoine : character ) appears-in( amica : work, renaldo : character ) appears-in( andrea-chenier : work, abbe : character ) appears-in( andrea-chenier : work, bersi : character ) appears-in( andrea-chenier : work, chenier : character ) appears-in( andrea-chenier : work, coigny : character ) appears-in( andrea-chenier : work, dumas : character ) appears-in( andrea-chenier : work, fleville : character ) appears-in( andrea-chenier : work, fouquier-tinville : character ) appears-in( andrea-chenier : work, gerard : character ) appears-in( andrea-chenier : work, incredible : character ) appears-in( andrea-chenier : work, maddalena-di-coigny : character ) appears-in( andrea-chenier : work, madelon : character ) appears-in( andrea-chenier : work, mathieu : character ) appears-in( andrea-chenier : work, roucher : character ) appears-in( aroldo : work, aroldo-c : character ) appears-in( aroldo : work, briano : character ) appears-in( aroldo : work, egberto : character ) appears-in( aroldo : work, elena2 : character ) appears-in( aroldo : work, enrico : character ) appears-in( aroldo : work, godvino : character ) appears-in( aroldo : work, mina : character ) appears-in( asrael : work, asrael-c : character ) appears-in( asrael : work, lidoria : character ) appears-in( asrael : work, loretta : character ) appears-in( asrael : work, lucifero : character ) appears-in( asrael : work, nefta : character ) appears-in( asrael : work, re-di-bramante : character ) appears-in( asrael : work, un-araldo : character ) appears-in( asrael : work, un-contadino : character ) appears-in( attila : work, attila-c : character ) appears-in( attila : work, ezio : character ) appears-in( attila : work, foresto : character ) appears-in( attila : work, leone : character ) appears-in( attila : work, odabella : character ) appears-in( attila : work, uldino : character ) appears-in( cavalleria-rusticana : work, alfio : character ) appears-in( cavalleria-rusticana : work, lola : character ) appears-in( cavalleria-rusticana : work, lucia : character ) appears-in( cavalleria-rusticana : work, santuzza : character ) appears-in( cavalleria-rusticana : work, turiddu : character ) appears-in( chatterton : work, giorgio3 : character ) appears-in( chatterton : work, jenny-clark : character ) appears-in( chatterton : work, john-clark : character ) appears-in( chatterton : work, lord-klifford : character ) appears-in( chatterton : work, lord-lingstone : character ) appears-in( chatterton : work, lord-stafford : character ) appears-in( chatterton : work, piccolo-henry : character ) appears-in( chatterton : work, skirner : character ) appears-in( chatterton : work, tommaso-chatterton : character ) appears-in( chatterton : work, un-servo : character ) appears-in( cristoforo-colombo : work, anacoana : character ) appears-in( cristoforo-colombo : work, bobadilla : character ) appears-in( cristoforo-colombo : work, cristoforo-colombo-c : character ) appears-in( cristoforo-colombo : work, diaz : character ) appears-in( cristoforo-colombo : work, don-fernan-guevara : character ) appears-in( cristoforo-colombo : work, don-roldano-ximenes : character ) appears-in( cristoforo-colombo : work, iguamota : character ) appears-in( cristoforo-colombo : work, il-vecchio : character ) appears-in( cristoforo-colombo : work, isabella-daragona : character ) appears-in( cristoforo-colombo : work, marguerite : character ) appears-in( cristoforo-colombo : work, matheos : character ) appears-in( cristoforo-colombo : work, una-fanciulla : character ) appears-in( cristoforo-colombo : work, un-altro-cavaliere : character ) appears-in( cristoforo-colombo : work, una-voce3 : character ) appears-in( cristoforo-colombo : work, un-cavaliere : character ) appears-in( cristoforo-colombo : work, un-frate : character ) appears-in( cristoforo-colombo : work, un-popolano : character ) appears-in( cristoforo-colombo : work, un-soldato : character ) appears-in( cristoforo-colombo : work, yanika : character ) appears-in( cyrano-de-bergerac : work, carbon : character ) appears-in( cyrano-de-bergerac : work, christian : character ) appears-in( cyrano-de-bergerac : work, cyrano : character ) appears-in( cyrano-de-bergerac : work, de-guiche : character ) appears-in( cyrano-de-bergerac : work, de-valvert : character ) appears-in( cyrano-de-bergerac : work, la-duegne : character ) appears-in( cyrano-de-bergerac : work, le-bret : character ) appears-in( cyrano-de-bergerac : work, le-cuisinier : character ) appears-in( cyrano-de-bergerac : work, le-mousquetaire : character ) appears-in( cyrano-de-bergerac : work, ligniere : character ) appears-in( cyrano-de-bergerac : work, lise : character ) appears-in( cyrano-de-bergerac : work, lofficier-espagnol : character ) appears-in( cyrano-de-bergerac : work, rogueneau : character ) appears-in( cyrano-de-bergerac : work, roxane : character ) appears-in( cyrano-de-bergerac : work, soeur-marthe : character ) appears-in( cyrano-de-bergerac : work, une-soeur : character ) appears-in( dejanice : work, admeto : character ) appears-in( dejanice : work, argelia : character ) appears-in( dejanice : work, dardano : character ) appears-in( dejanice : work, dejanice-c : character ) appears-in( dejanice : work, labdaco : character ) appears-in( der-roland-von-berlin : work, ausrufer-des-rates : character ) appears-in( der-roland-von-berlin : work, bajazzo : character ) appears-in( der-roland-von-berlin : work, bartholomaus-schumm : character ) appears-in( der-roland-von-berlin : work, bergholz : character ) appears-in( der-roland-von-berlin : work, civile-baruch : character ) appears-in( der-roland-von-berlin : work, elsbeth-ratenow : character ) appears-in( der-roland-von-berlin : work, eva-schumm : character ) appears-in( der-roland-von-berlin : work, gertrud : character ) appears-in( der-roland-von-berlin : work, hans-ferbit : character ) appears-in( der-roland-von-berlin : work, henning-mollner : character ) appears-in( der-roland-von-berlin : work, johannes-ratenow : character ) appears-in( der-roland-von-berlin : work, konrad-von-knipprode : character ) appears-in( der-roland-von-berlin : work, kurfurst-friedrich : character ) appears-in( der-roland-von-berlin : work, makensprung : character ) appears-in( der-roland-von-berlin : work, matthaus : character ) appears-in( der-roland-von-berlin : work, matthias-blankenfelde : character ) appears-in( der-roland-von-berlin : work, melchior-schumm : character ) appears-in( der-roland-von-berlin : work, rike : character ) appears-in( der-roland-von-berlin : work, thomas-wintz : character ) appears-in( don-carlos : work, countess-of-aremberg : character ) appears-in( don-carlos : work, count-of-lerma : character ) appears-in( don-carlos : work, don-carlos-c : character ) appears-in( don-carlos : work, elisabeth-de-valois : character ) appears-in( don-carlos : work, flemish-deputies : character ) appears-in( don-carlos : work, grand-inquisitor : character ) appears-in( don-carlos : work, inquisitors : character ) appears-in( don-carlos : work, old-monk : character ) appears-in( don-carlos : work, philip-ii : character ) appears-in( don-carlos : work, princess-eboli : character ) appears-in( don-carlos : work, rodrigue : character ) appears-in( don-carlos : work, royal-herald : character ) appears-in( don-carlos : work, thibault : character ) appears-in( don-carlos : work, voice-from-heaven : character ) appears-in( don-juan-de-manara : work, colombano : character ) appears-in( don-juan-de-manara : work, dariola : character ) appears-in( don-juan-de-manara : work, don-giovanni-manara : character ) appears-in( don-juan-de-manara : work, leonello : character ) appears-in( don-juan-de-manara : work, rinuccio-da-corbara : character ) appears-in( don-juan-de-manara : work, una-voce4 : character ) appears-in( don-juan-de-manara : work, vannina-dalando : character ) appears-in( edgar : work, edgar-c : character ) appears-in( edgar : work, fidelia : character ) appears-in( edgar : work, frank : character ) appears-in( edgar : work, gualterio : character ) appears-in( edgar : work, tigrana : character ) appears-in( edipo-re : work, antigone : character ) appears-in( edipo-re : work, corintio : character ) appears-in( edipo-re : work, creonte : character ) appears-in( edipo-re : work, edipo : character ) appears-in( edipo-re : work, giocasta : character ) appears-in( edipo-re : work, ismene : character ) appears-in( edipo-re : work, pastore : character ) appears-in( edipo-re : work, tiresia : character ) appears-in( edmea : work, edmea-c : character ) appears-in( edmea : work, fritz2 : character ) appears-in( edmea : work, il-barone-di-waldek : character ) appears-in( edmea : work, il-conte-di-leitmeritz : character ) appears-in( edmea : work, loste : character ) appears-in( edmea : work, oberto2 : character ) appears-in( edmea : work, ulmo : character ) appears-in( ernani : work, don-carlo-c2 : character ) appears-in( ernani : work, don-riccardo : character ) appears-in( ernani : work, don-ruy-gomez-de-silva : character ) appears-in( ernani : work, elvira : character ) appears-in( ernani : work, ernani-c : character ) appears-in( ernani : work, giovanna2 : character ) appears-in( ernani : work, jago : character ) appears-in( falstaff : work, alice-ford : character ) appears-in( falstaff : work, bardolfo : character ) appears-in( falstaff : work, dr-caius : character ) appears-in( falstaff : work, fenton : character ) appears-in( falstaff : work, ford : character ) appears-in( falstaff : work, fords-page : character ) appears-in( falstaff : work, meg-page : character ) appears-in( falstaff : work, mine-host-at-the-garter : character ) appears-in( falstaff : work, mistress-quickly : character ) appears-in( falstaff : work, nannetta : character ) appears-in( falstaff : work, pistola : character ) appears-in( falstaff : work, robin : character ) appears-in( falstaff : work, sir-john-falstaff : character ) appears-in( fedora : work, borov : character ) appears-in( fedora : work, cirillo : character ) appears-in( fedora : work, desire : character ) appears-in( fedora : work, de-siriex : character ) appears-in( fedora : work, dimitri : character ) appears-in( fedora : work, fedora-c : character ) appears-in( fedora : work, grech : character ) appears-in( fedora : work, lazinski : character ) appears-in( fedora : work, lorek : character ) appears-in( fedora : work, loris : character ) appears-in( fedora : work, olga : character ) appears-in( fedora : work, rouvel : character ) appears-in( fedora : work, savoyard : character ) appears-in( francesca-da-rimini : work, adonella : character ) appears-in( francesca-da-rimini : work, altichiara : character ) appears-in( francesca-da-rimini : work, biancofiore : character ) appears-in( francesca-da-rimini : work, francesca : character ) appears-in( francesca-da-rimini : work, garsenda : character ) appears-in( francesca-da-rimini : work, giovanni-malatesta : character ) appears-in( francesca-da-rimini : work, il-balestiere : character ) appears-in( francesca-da-rimini : work, il-giullare : character ) appears-in( francesca-da-rimini : work, il-torregiano : character ) appears-in( francesca-da-rimini : work, malatestino : character ) appears-in( francesca-da-rimini : work, ostasio : character ) appears-in( francesca-da-rimini : work, paolo : character ) appears-in( francesca-da-rimini : work, prigioniero : character ) appears-in( francesca-da-rimini : work, samaritana : character ) appears-in( francesca-da-rimini : work, ser-toldo : character ) appears-in( francesca-da-rimini : work, smaragdi : character ) appears-in( germania : work, carlo-teodoro-korner : character ) appears-in( germania : work, carlo-worms : character ) appears-in( germania : work, crisogno : character ) appears-in( germania : work, federico-loewe : character ) appears-in( germania : work, giovanni-filippo-palm : character ) appears-in( germania : work, hedvige : character ) appears-in( germania : work, il-capo-della-polizia : character ) appears-in( germania : work, jane : character ) appears-in( germania : work, jebbel : character ) appears-in( germania : work, lene-armuth : character ) appears-in( germania : work, luigi-adolfo-guglielmo-lutzow : character ) appears-in( germania : work, peters : character ) appears-in( germania : work, ricke : character ) appears-in( germania : work, stapps : character ) appears-in( germania : work, una-donna : character ) appears-in( germania : work, un-giovanetto : character ) appears-in( gianni-schicchi : work, amantio : character ) appears-in( gianni-schicchi : work, betto : character ) appears-in( gianni-schicchi : work, gherardino : character ) appears-in( gianni-schicchi : work, gherardo : character ) appears-in( gianni-schicchi : work, gianni : character ) appears-in( gianni-schicchi : work, guccio : character ) appears-in( gianni-schicchi : work, la-ciesca : character ) appears-in( gianni-schicchi : work, lauretta : character ) appears-in( gianni-schicchi : work, marco : character ) appears-in( gianni-schicchi : work, nella : character ) appears-in( gianni-schicchi : work, pinelli : character ) appears-in( gianni-schicchi : work, rinuccio : character ) appears-in( gianni-schicchi : work, simone : character ) appears-in( gianni-schicchi : work, spinelloccio : character ) appears-in( gianni-schicchi : work, zita : character ) appears-in( gina : work, flamberge : character ) appears-in( gina : work, gina-c : character ) appears-in( gina : work, giulio : character ) appears-in( gina : work, lilla : character ) appears-in( gina : work, uberto : character ) appears-in( giovanna-darco : work, carlo-vii : character ) appears-in( giovanna-darco : work, delil : character ) appears-in( giovanna-darco : work, giacomo : character ) appears-in( giovanna-darco : work, giovanna : character ) appears-in( giovanna-darco : work, talbot : character ) appears-in( giove-a-pompei : work, aribobolo : character ) appears-in( giove-a-pompei : work, aricia : character ) appears-in( giove-a-pompei : work, calpurnia : character ) appears-in( giove-a-pompei : work, faraone-xiii : character ) appears-in( giove-a-pompei : work, giove : character ) appears-in( giove-a-pompei : work, lalage : character ) appears-in( giove-a-pompei : work, la-moglie-del-faraone : character ) appears-in( giove-a-pompei : work, laquila2 : character ) appears-in( giove-a-pompei : work, lidia : character ) appears-in( giove-a-pompei : work, macrone-massimo : character ) appears-in( giove-a-pompei : work, marcus-pipa : character ) appears-in( giove-a-pompei : work, parvolo-patacca : character ) appears-in( giove-a-pompei : work, vulcano : character ) appears-in( glauco : work, atropo : character ) appears-in( glauco : work, circe : character ) appears-in( glauco : work, cloto : character ) appears-in( glauco : work, forchis : character ) appears-in( glauco : work, glauco-c : character ) appears-in( glauco : work, lachesi : character ) appears-in( glauco : work, scilla : character ) appears-in( glauco : work, troilo : character ) appears-in( glauco : work, un-pastorello : character ) appears-in( gloria : work, aquilante-dei-bardi : character ) appears-in( gloria : work, bardo : character ) appears-in( gloria : work, gloria-c : character ) appears-in( gloria : work, il-vescovo : character ) appears-in( gloria : work, la-senese : character ) appears-in( gloria : work, lionetto-de-ricci : character ) appears-in( guglielmo-ratcliff : work, bell : character ) appears-in( guglielmo-ratcliff : work, conte-douglas : character ) appears-in( guglielmo-ratcliff : work, dick : character ) appears-in( guglielmo-ratcliff : work, guglielmo-ratcliff-c : character ) appears-in( guglielmo-ratcliff : work, john : character ) appears-in( guglielmo-ratcliff : work, lesley : character ) appears-in( guglielmo-ratcliff : work, macgregor : character ) appears-in( guglielmo-ratcliff : work, margherita2 : character ) appears-in( guglielmo-ratcliff : work, maria-macgregor : character ) appears-in( guglielmo-ratcliff : work, robin2 : character ) appears-in( guglielmo-ratcliff : work, servant : character ) appears-in( guglielmo-ratcliff : work, taddie : character ) appears-in( guglielmo-ratcliff : work, tom2 : character ) appears-in( guglielmo-ratcliff : work, willie : character ) appears-in( i-due-foscari : work, barbarigo : character ) appears-in( i-due-foscari : work, francesco-foscari : character ) appears-in( i-due-foscari : work, jacopo-foscari : character ) appears-in( i-due-foscari : work, jacopo-loredano : character ) appears-in( i-due-foscari : work, lucrezia-contarini : character ) appears-in( i-due-foscari : work, officer-of-the-council-of-ten : character ) appears-in( i-due-foscari : work, pisana : character ) appears-in( i-due-foscari : work, servant-of-the-doge : character ) appears-in( il-corsaro : work, anselmo : character ) appears-in( il-corsaro : work, black-eunuch : character ) appears-in( il-corsaro : work, corrado : character ) appears-in( il-corsaro : work, giovanni : character ) appears-in( il-corsaro : work, gulnara : character ) appears-in( il-corsaro : work, medora : character ) appears-in( il-corsaro : work, seid : character ) appears-in( il-corsaro : work, selimo : character ) appears-in( il-corsaro : work, slave : character ) appears-in( il-dottor-antonio : work, aubrey-da-venne : character ) appears-in( il-dottor-antonio : work, caraffa-dei-duchi : character ) appears-in( il-dottor-antonio : work, dandria : character ) appears-in( il-dottor-antonio : work, dischia : character ) appears-in( il-dottor-antonio : work, don-salvatore : character ) appears-in( il-dottor-antonio : work, dottor-antonio : character ) appears-in( il-dottor-antonio : work, il-barone-midraglia : character ) appears-in( il-dottor-antonio : work, il-capitano : character ) appears-in( il-dottor-antonio : work, il-capo-della-guarmigione : character ) appears-in( il-dottor-antonio : work, il-capo-della-polizia2 : character ) appears-in( il-dottor-antonio : work, il-custode : character ) appears-in( il-dottor-antonio : work, il-direttore-del-carcere : character ) appears-in( il-dottor-antonio : work, il-re-di-napoli : character ) appears-in( il-dottor-antonio : work, jervolino : character ) appears-in( il-dottor-antonio : work, la-madre-di-sperenza : character ) appears-in( il-dottor-antonio : work, miss-lucy-da-venne : character ) appears-in( il-dottor-antonio : work, orlando-pistacchini : character ) appears-in( il-dottor-antonio : work, rosalinda-pistacchini : character ) appears-in( il-dottor-antonio : work, sir-john-da-venne : character ) appears-in( il-dottor-antonio : work, sperenza : character ) appears-in( il-dottor-antonio : work, warrack : character ) appears-in( il-fior-dalpe : work, conte : character ) appears-in( il-fior-dalpe : work, ghita : character ) appears-in( il-fior-dalpe : work, marchese-alfredo : character ) appears-in( il-fior-dalpe : work, maria : character ) appears-in( il-fior-dalpe : work, maso : character ) appears-in( il-fior-dalpe : work, paolo2 : character ) appears-in( il-fior-dalpe : work, un-servo2 : character ) appears-in( i-lombardi : work, acciano : character ) appears-in( i-lombardi : work, arvino : character ) appears-in( i-lombardi : work, giselda : character ) appears-in( i-lombardi : work, milanese-prior : character ) appears-in( i-lombardi : work, oronte : character ) appears-in( i-lombardi : work, pagano : character ) appears-in( i-lombardi : work, pirro : character ) appears-in( i-lombardi : work, sofia : character ) appears-in( i-lombardi : work, viclinda : character ) appears-in( il-piccolo-marat : work, il-capitano-dei-marats : character ) appears-in( il-piccolo-marat : work, il-carpentiere : character ) appears-in( il-piccolo-marat : work, il-ladro : character ) appears-in( il-piccolo-marat : work, il-piccolo-marat-c : character ) appears-in( il-piccolo-marat : work, il-portatore-di-ordini : character ) appears-in( il-piccolo-marat : work, il-soldato : character ) appears-in( il-piccolo-marat : work, la-mamma : character ) appears-in( il-piccolo-marat : work, la-spia : character ) appears-in( il-piccolo-marat : work, la-tigre : character ) appears-in( il-piccolo-marat : work, lorco : character ) appears-in( il-piccolo-marat : work, mariella : character ) appears-in( il-piccolo-marat : work, una-voce2 : character ) appears-in( il-principe-zilah : work, andras-zilah : character ) appears-in( il-principe-zilah : work, ladislav-zehary-menko : character ) appears-in( il-principe-zilah : work, laszlo : character ) appears-in( il-principe-zilah : work, marsa-laszlo : character ) appears-in( il-principe-zilah : work, mikali-menko : character ) appears-in( il-principe-zilah : work, olaf : character ) appears-in( il-principe-zilah : work, sandor-zilah : character ) appears-in( il-principe-zilah : work, una-tzigana : character ) appears-in( il-principe-zilah : work, un-ferito : character ) appears-in( il-principe-zilah : work, vecchia-tzigana : character ) appears-in( il-principe-zilah : work, yansky-varhely : character ) appears-in( il-re : work, colombello : character ) appears-in( il-re : work, il-mugnaio : character ) appears-in( il-re : work, il-prete : character ) appears-in( il-re : work, il-re-c : character ) appears-in( il-re : work, la-moglie-del-mugnaio : character ) appears-in( il-re : work, lastrologa : character ) appears-in( il-re : work, la-voce-di-un-banditore : character ) appears-in( il-re : work, luomo-di-legge : character ) appears-in( il-re : work, rosalina : character ) appears-in( il-re : work, un-altro-cerimoniere : character ) appears-in( il-re : work, un-cerimoniere : character ) appears-in( il-tabarro : work, frugola : character ) appears-in( il-tabarro : work, giorgetta : character ) appears-in( il-tabarro : work, innamorata : character ) appears-in( il-tabarro : work, innamorato : character ) appears-in( il-tabarro : work, luigi : character ) appears-in( il-tabarro : work, michele : character ) appears-in( il-tabarro : work, song-pedlar : character ) appears-in( il-tabarro : work, talpa : character ) appears-in( il-tabarro : work, tinca : character ) appears-in( il-trovatore : work, azucena : character ) appears-in( il-trovatore : work, count-di-luna : character ) appears-in( il-trovatore : work, ferrando : character ) appears-in( il-trovatore : work, ines : character ) appears-in( il-trovatore : work, leonora3 : character ) appears-in( il-trovatore : work, manrico : character ) appears-in( il-trovatore : work, messenger : character ) appears-in( il-trovatore : work, old-gypsy : character ) appears-in( il-trovatore : work, ruiz : character ) appears-in( il-voto : work, amalia2 : character ) appears-in( il-voto : work, cristina : character ) appears-in( il-voto : work, marco3 : character ) appears-in( il-voto : work, nunzia : character ) appears-in( il-voto : work, vito-amante : character ) appears-in( i-masnadieri : work, amalia : character ) appears-in( i-masnadieri : work, arminio : character ) appears-in( i-masnadieri : work, carlo : character ) appears-in( i-masnadieri : work, francesco : character ) appears-in( i-masnadieri : work, massimiliano : character ) appears-in( i-masnadieri : work, moser : character ) appears-in( i-masnadieri : work, rolla : character ) appears-in( i-medici : work, arcivescovo-salviati : character ) appears-in( i-medici : work, bernardo-bandini : character ) appears-in( i-medici : work, fioretta-di-gori : character ) appears-in( i-medici : work, francesco-pazzi : character ) appears-in( i-medici : work, giambattista-da-montesecco : character ) appears-in( i-medici : work, giuliano-di-medici : character ) appears-in( i-medici : work, il-poliziano : character ) appears-in( i-medici : work, lorenzo-di-medici : character ) appears-in( i-medici : work, madre-di-simonetta : character ) appears-in( i-medici : work, simonetta-cattanei : character ) appears-in( i-medici : work, un-prete : character ) appears-in( i-rantzau : work, fiorenzo : character ) appears-in( i-rantzau : work, giacomo-rantzau : character ) appears-in( i-rantzau : work, gianni-rantzau : character ) appears-in( i-rantzau : work, giorgio : character ) appears-in( i-rantzau : work, giulia2 : character ) appears-in( i-rantzau : work, lebel : character ) appears-in( i-rantzau : work, luisa2 : character ) appears-in( iris : work, dhia : character ) appears-in( iris : work, il-cieco : character ) appears-in( iris : work, iris-c : character ) appears-in( iris : work, kyoto : character ) appears-in( iris : work, osaka : character ) appears-in( iris : work, peddler : character ) appears-in( iris : work, ragpicker : character ) appears-in( isabeau : work, araldo-maggiore : character ) appears-in( isabeau : work, ermyngarde : character ) appears-in( isabeau : work, ermyntrude : character ) appears-in( isabeau : work, folco : character ) appears-in( isabeau : work, giglietta : character ) appears-in( isabeau : work, il-cavalier-faidit : character ) appears-in( isabeau : work, isabeau-c : character ) appears-in( isabeau : work, messer-cornelius : character ) appears-in( isabeau : work, re-raimondo : character ) appears-in( isabeau : work, un-vegliard : character ) appears-in( i-vespri-siciliani : work, arrigo : character ) appears-in( i-vespri-siciliani : work, bethune : character ) appears-in( i-vespri-siciliani : work, danieli : character ) appears-in( i-vespri-siciliani : work, duchess-elena : character ) appears-in( i-vespri-siciliani : work, giovanni-da-procida : character ) appears-in( i-vespri-siciliani : work, guido-di-monforte : character ) appears-in( i-vespri-siciliani : work, manfredo : character ) appears-in( i-vespri-siciliani : work, ninetta : character ) appears-in( i-vespri-siciliani : work, roberto : character ) appears-in( i-vespri-siciliani : work, tebaldo : character ) appears-in( i-vespri-siciliani : work, vaudemont : character ) appears-in( jerusalem-o : work, adhemar-de-montheil : character ) appears-in( jerusalem-o : work, emir-of-ramla : character ) appears-in( jerusalem-o : work, gaston : character ) appears-in( jerusalem-o : work, helene : character ) appears-in( jerusalem-o : work, herald4 : character ) appears-in( jerusalem-o : work, isaure : character ) appears-in( jerusalem-o : work, le-comte-de-toulouse : character ) appears-in( jerusalem-o : work, officer-of-the-emir : character ) appears-in( jerusalem-o : work, raymond : character ) appears-in( jerusalem-o : work, roger : character ) appears-in( jerusalem-o : work, soldier : character ) appears-in( la-battaglia-di-legnano : work, arrigo2 : character ) appears-in( la-battaglia-di-legnano : work, arrigos-squire : character ) appears-in( la-battaglia-di-legnano : work, barbarossa : character ) appears-in( la-battaglia-di-legnano : work, first-consul : character ) appears-in( la-battaglia-di-legnano : work, herald2 : character ) appears-in( la-battaglia-di-legnano : work, imelda2 : character ) appears-in( la-battaglia-di-legnano : work, lida : character ) appears-in( la-battaglia-di-legnano : work, marcovaldo : character ) appears-in( la-battaglia-di-legnano : work, mayor-of-como : character ) appears-in( la-battaglia-di-legnano : work, rolando : character ) appears-in( la-battaglia-di-legnano : work, second-consul : character ) appears-in( la-boheme : work, alcindoro : character ) appears-in( la-boheme : work, benoit : character ) appears-in( la-boheme : work, colline : character ) appears-in( la-boheme : work, customs-official : character ) appears-in( la-boheme : work, marcello : character ) appears-in( la-boheme : work, mimi : character ) appears-in( la-boheme : work, musetta : character ) appears-in( la-boheme : work, parpignol : character ) appears-in( la-boheme : work, rodolfo : character ) appears-in( la-boheme : work, schaunard : character ) appears-in( la-boheme2 : work, barbemuche : character ) appears-in( la-boheme2 : work, colline : character ) appears-in( la-boheme2 : work, count-paolo : character ) appears-in( la-boheme2 : work, durand : character ) appears-in( la-boheme2 : work, eufemia : character ) appears-in( la-boheme2 : work, gaudenzio : character ) appears-in( la-boheme2 : work, lout : character ) appears-in( la-boheme2 : work, man-on-first-floor : character ) appears-in( la-boheme2 : work, marcello : character ) appears-in( la-boheme2 : work, mimi : character ) appears-in( la-boheme2 : work, musetta : character ) appears-in( la-boheme2 : work, rodolfo3 : character ) appears-in( la-boheme2 : work, schaunard : character ) appears-in( la-cena-delle-beffe : work, cantore-interna : character ) appears-in( la-cena-delle-beffe : work, cintia : character ) appears-in( la-cena-delle-beffe : work, fazio : character ) appears-in( la-cena-delle-beffe : work, fiammetta : character ) appears-in( la-cena-delle-beffe : work, gabriello-chiaramantesi : character ) appears-in( la-cena-delle-beffe : work, giannetto-malaspini : character ) appears-in( la-cena-delle-beffe : work, ginevra : character ) appears-in( la-cena-delle-beffe : work, il-calandra : character ) appears-in( la-cena-delle-beffe : work, il-dottore : character ) appears-in( la-cena-delle-beffe : work, il-tornaquinci : character ) appears-in( la-cena-delle-beffe : work, il-trinca : character ) appears-in( la-cena-delle-beffe : work, laldomine : character ) appears-in( la-cena-delle-beffe : work, lapo : character ) appears-in( la-cena-delle-beffe : work, lisabetta : character ) appears-in( la-cena-delle-beffe : work, neri-chiaramantesi : character ) appears-in( la-falce : work, seid2 : character ) appears-in( la-falce : work, zohra : character ) appears-in( la-fanciulla-del-west : work, ashby : character ) appears-in( la-fanciulla-del-west : work, bello : character ) appears-in( la-fanciulla-del-west : work, castro : character ) appears-in( la-fanciulla-del-west : work, happy : character ) appears-in( la-fanciulla-del-west : work, harry : character ) appears-in( la-fanciulla-del-west : work, jackrabbit : character ) appears-in( la-fanciulla-del-west : work, jake-wallace : character ) appears-in( la-fanciulla-del-west : work, joe : character ) appears-in( la-fanciulla-del-west : work, johnsen : character ) appears-in( la-fanciulla-del-west : work, larkens : character ) appears-in( la-fanciulla-del-west : work, minnie : character ) appears-in( la-fanciulla-del-west : work, nick : character ) appears-in( la-fanciulla-del-west : work, pony-express-rider : character ) appears-in( la-fanciulla-del-west : work, rance : character ) appears-in( la-fanciulla-del-west : work, sid : character ) appears-in( la-fanciulla-del-west : work, sonora : character ) appears-in( la-fanciulla-del-west : work, trin : character ) appears-in( la-fanciulla-del-west : work, wowkle : character ) appears-in( la-figlia-di-jorio : work, aligi : character ) appears-in( la-figlia-di-jorio : work, candia-della-leonessa : character ) appears-in( la-figlia-di-jorio : work, crocifero : character ) appears-in( la-figlia-di-jorio : work, favetta : character ) appears-in( la-figlia-di-jorio : work, ienne-delleta : character ) appears-in( la-figlia-di-jorio : work, lazaro-di-roio : character ) appears-in( la-figlia-di-jorio : work, mielitore : character ) appears-in( la-figlia-di-jorio : work, mila-di-corda : character ) appears-in( la-figlia-di-jorio : work, ornella : character ) appears-in( la-figlia-di-jorio : work, splendore : character ) appears-in( la-figlia-di-jorio : work, voce-lontana : character ) appears-in( la-forza-del-destino : work, alcalde : character ) appears-in( la-forza-del-destino : work, calatrava : character ) appears-in( la-forza-del-destino : work, curra : character ) appears-in( la-forza-del-destino : work, don-alvaro-c : character ) appears-in( la-forza-del-destino : work, don-carlo-di-vargas : character ) appears-in( la-forza-del-destino : work, guardiano : character ) appears-in( la-forza-del-destino : work, leonora : character ) appears-in( la-forza-del-destino : work, mastro-trabuco : character ) appears-in( la-forza-del-destino : work, melitone : character ) appears-in( la-forza-del-destino : work, preziosilla : character ) appears-in( la-forza-del-destino : work, surgeon : character ) appears-in( la-gioconda : work, badoero : character ) appears-in( la-gioconda : work, barnaba : character ) appears-in( la-gioconda : work, distant-voices : character ) appears-in( la-gioconda : work, gioconda : character ) appears-in( la-gioconda : work, grimaldo : character ) appears-in( la-gioconda : work, isepo : character ) appears-in( la-gioconda : work, la-cieca : character ) appears-in( la-gioconda : work, laura : character ) appears-in( la-gioconda : work, pilot : character ) appears-in( la-gioconda : work, singer-c : character ) appears-in( la-gioconda : work, zuane : character ) appears-in( la-leggenda-di-sakuntala : work, anusuya : character ) appears-in( la-leggenda-di-sakuntala : work, durvasas : character ) appears-in( la-leggenda-di-sakuntala : work, kanva : character ) appears-in( la-leggenda-di-sakuntala : work, king : character ) appears-in( la-leggenda-di-sakuntala : work, priyamvada : character ) appears-in( la-leggenda-di-sakuntala : work, sakuntala : character ) appears-in( lamico-fritz : work, beppe-s : character ) appears-in( lamico-fritz : work, caterina : character ) appears-in( lamico-fritz : work, david : character ) appears-in( lamico-fritz : work, federico : character ) appears-in( lamico-fritz : work, fritz : character ) appears-in( lamico-fritz : work, hanezo : character ) appears-in( lamico-fritz : work, suzel : character ) appears-in( larlesiana : work, baldassare : character ) appears-in( larlesiana : work, federico2 : character ) appears-in( larlesiana : work, metifio : character ) appears-in( larlesiana : work, rosa-mammai : character ) appears-in( larlesiana : work, vivette : character ) appears-in( la-rondine : work, bianca-c : character ) appears-in( la-rondine : work, crebillon : character ) appears-in( la-rondine : work, fernandez : character ) appears-in( la-rondine : work, gobin : character ) appears-in( la-rondine : work, lisette : character ) appears-in( la-rondine : work, magda : character ) appears-in( la-rondine : work, majordome : character ) appears-in( la-rondine : work, perichaud : character ) appears-in( la-rondine : work, prunier : character ) appears-in( la-rondine : work, ruggero : character ) appears-in( la-rondine : work, studiant : character ) appears-in( la-rondine : work, suzy : character ) appears-in( la-rondine : work, yvette : character ) appears-in( la-tilda : work, agnese : character ) appears-in( la-tilda : work, bista : character ) appears-in( la-tilda : work, cecilia : character ) appears-in( la-tilda : work, gasparre : character ) appears-in( la-tilda : work, gastone2 : character ) appears-in( la-tilda : work, locusta : character ) appears-in( la-tilda : work, mario : character ) appears-in( la-tilda : work, tilda : character ) appears-in( la-traviata : work, alfredo-germont : character ) appears-in( la-traviata : work, annina : character ) appears-in( la-traviata : work, baron-douphol : character ) appears-in( la-traviata : work, commissioner : character ) appears-in( la-traviata : work, doctor-grenvil : character ) appears-in( la-traviata : work, flora-bervoix : character ) appears-in( la-traviata : work, floras-servant : character ) appears-in( la-traviata : work, gastone : character ) appears-in( la-traviata : work, giorgio-germont : character ) appears-in( la-traviata : work, giuseppe : character ) appears-in( la-traviata : work, marchese-dobigny : character ) appears-in( la-traviata : work, violetta-valery : character ) appears-in( la-wally : work, afra : character ) appears-in( la-wally : work, gellner : character ) appears-in( la-wally : work, hagenbach : character ) appears-in( la-wally : work, stromminger : character ) appears-in( la-wally : work, wally : character ) appears-in( la-wally : work, walter : character ) appears-in( le-maschere : work, arlecchino-battocchio : character ) appears-in( le-maschere : work, brighella : character ) appears-in( le-maschere : work, colombina : character ) appears-in( le-maschere : work, dottor-graziano : character ) appears-in( le-maschere : work, florindo : character ) appears-in( le-maschere : work, giocadio : character ) appears-in( le-maschere : work, il-capitan-spaventa : character ) appears-in( le-maschere : work, pantalone-de-bisognosi : character ) appears-in( le-maschere : work, rosaura : character ) appears-in( le-maschere : work, tartaglia : character ) appears-in( le-villi : work, anna : character ) appears-in( le-villi : work, guglielmo : character ) appears-in( le-villi : work, roberto-le-villi : character ) appears-in( lodoletta : work, antonio : character ) appears-in( lodoletta : work, flammen : character ) appears-in( lodoletta : work, franz : character ) appears-in( lodoletta : work, giannotto : character ) appears-in( lodoletta : work, il-portalettere : character ) appears-in( lodoletta : work, la-pazzo : character ) appears-in( lodoletta : work, la-vanard : character ) appears-in( lodoletta : work, lodoletta-c : character ) appears-in( lodoletta : work, maud : character ) appears-in( lodoletta : work, una-voce : character ) appears-in( lombra-di-don-giovanni : work, colombano2 : character ) appears-in( lombra-di-don-giovanni : work, dariola2 : character ) appears-in( lombra-di-don-giovanni : work, don-giovanni-de-manara : character ) appears-in( lombra-di-don-giovanni : work, leonello2 : character ) appears-in( lombra-di-don-giovanni : work, orsetta : character ) appears-in( lombra-di-don-giovanni : work, rinuccio-da-corbara2 : character ) appears-in( lombra-di-don-giovanni : work, una-voce5 : character ) appears-in( lombra-di-don-giovanni : work, vannina-dalano : character ) appears-in( loracolo : work, ah-joe : character ) appears-in( loracolo : work, cim-fen : character ) appears-in( loracolo : work, hua-qui : character ) appears-in( loracolo : work, hu-ci : character ) appears-in( loracolo : work, hu-tsin : character ) appears-in( loracolo : work, lindovino : character ) appears-in( loracolo : work, uin-san-lui : character ) appears-in( loracolo : work, uin-sci : character ) appears-in( loreley : work, anna2 : character ) appears-in( loreley : work, baron-hermann : character ) appears-in( loreley : work, loreley-c : character ) appears-in( loreley : work, margrave-of-biberich : character ) appears-in( loreley : work, walter2 : character ) appears-in( luisa-miller : work, count-walter : character ) appears-in( luisa-miller : work, federica : character ) appears-in( luisa-miller : work, laura2 : character ) appears-in( luisa-miller : work, luisa : character ) appears-in( luisa-miller : work, miller : character ) appears-in( luisa-miller : work, peasant : character ) appears-in( luisa-miller : work, rodolfo2 : character ) appears-in( luisa-miller : work, wurm : character ) appears-in( lultimo-lord : work, alice : character ) appears-in( lultimo-lord : work, arturo : character ) appears-in( lultimo-lord : work, freddie : character ) appears-in( lultimo-lord : work, gray : character ) appears-in( lultimo-lord : work, il-duca-di-kilmarnok : character ) appears-in( lultimo-lord : work, il-principe-cristiano : character ) appears-in( lultimo-lord : work, james : character ) appears-in( lultimo-lord : work, la-principessa : character ) appears-in( lultimo-lord : work, un-amica : character ) appears-in( macbeth : work, banco : character ) appears-in( macbeth : work, doctor : character ) appears-in( macbeth : work, duncan : character ) appears-in( macbeth : work, fleanzio : character ) appears-in( macbeth : work, ghost-of-banco : character ) appears-in( macbeth : work, hecate : character ) appears-in( macbeth : work, herald : character ) appears-in( macbeth : work, lady-in-waiting-to-lady-macbeth : character ) appears-in( macbeth : work, lady-macbeth : character ) appears-in( macbeth : work, macbeth-c : character ) appears-in( macbeth : work, macduff : character ) appears-in( macbeth : work, malcolm : character ) appears-in( macbeth : work, murderer : character ) appears-in( macbeth : work, servant-of-macbeth : character ) appears-in( madama-butterfly : work, bonze : character ) appears-in( madama-butterfly : work, butterfly : character ) appears-in( madama-butterfly : work, goro : character ) appears-in( madama-butterfly : work, il-commissario : character ) appears-in( madama-butterfly : work, kate-pinkerton : character ) appears-in( madama-butterfly : work, la-cugina : character ) appears-in( madama-butterfly : work, la-madre : character ) appears-in( madama-butterfly : work, la-zia : character ) appears-in( madama-butterfly : work, pinkerton : character ) appears-in( madama-butterfly : work, sharpless : character ) appears-in( madama-butterfly : work, suzuki : character ) appears-in( madama-butterfly : work, yakuside : character ) appears-in( madama-butterfly : work, yamadori : character ) appears-in( madame-sans-gene : work, catarina : character ) appears-in( madame-sans-gene : work, de-brigole : character ) appears-in( madame-sans-gene : work, despereaux : character ) appears-in( madame-sans-gene : work, fouche : character ) appears-in( madame-sans-gene : work, gelsomino : character ) appears-in( madame-sans-gene : work, giulia : character ) appears-in( madame-sans-gene : work, la-rossa : character ) appears-in( madame-sans-gene : work, lefebvre : character ) appears-in( madame-sans-gene : work, leroy : character ) appears-in( madame-sans-gene : work, madame-de-bulow : character ) appears-in( madame-sans-gene : work, napoleon : character ) appears-in( madame-sans-gene : work, neipperg : character ) appears-in( madame-sans-gene : work, princess-elisa : character ) appears-in( madame-sans-gene : work, queen-carolina : character ) appears-in( madame-sans-gene : work, roustan : character ) appears-in( madame-sans-gene : work, toniotta : character ) appears-in( madame-sans-gene : work, vinaigre : character ) appears-in( madonna-imperia : work, balda : character ) appears-in( madonna-imperia : work, cancelliere-di-ragusa : character ) appears-in( madonna-imperia : work, conte-dellambasceria : character ) appears-in( madonna-imperia : work, fante : character ) appears-in( madonna-imperia : work, filippo-mala : character ) appears-in( madonna-imperia : work, fiorella : character ) appears-in( madonna-imperia : work, madonna-imperia-c : character ) appears-in( madonna-imperia : work, messere-di-bordo : character ) appears-in( madonna-imperia : work, principe-coira : character ) appears-in( madonna-imperia : work, un-famiglio : character ) appears-in( maia : work, germanio : character ) appears-in( maia : work, louisson : character ) appears-in( maia : work, maria2 : character ) appears-in( maia : work, sergio : character ) appears-in( maia : work, susetta : character ) appears-in( maia : work, torias : character ) appears-in( maia : work, un-vecchio-pastore : character ) appears-in( mala-vita : work, amalia3 : character ) appears-in( mala-vita : work, anetiello : character ) appears-in( mala-vita : work, cristina2 : character ) appears-in( mala-vita : work, marco4 : character ) appears-in( mala-vita : work, nunzia2 : character ) appears-in( mala-vita : work, pietro3 : character ) appears-in( mala-vita : work, vito-amante2 : character ) appears-in( manon-lescaut : work, captain : character ) appears-in( manon-lescaut : work, dancing-master : character ) appears-in( manon-lescaut : work, des-grieux : character ) appears-in( manon-lescaut : work, edmondo : character ) appears-in( manon-lescaut : work, geronte : character ) appears-in( manon-lescaut : work, innkeeper : character ) appears-in( manon-lescaut : work, lamplighter : character ) appears-in( manon-lescaut : work, lescaut : character ) appears-in( manon-lescaut : work, manon : character ) appears-in( manon-lescaut : work, sergeant : character ) appears-in( manon-lescaut : work, singer-c2 : character ) appears-in( marcella : work, barthelemy : character ) appears-in( marcella : work, clara : character ) appears-in( marcella : work, drasco : character ) appears-in( marcella : work, eliana : character ) appears-in( marcella : work, flament : character ) appears-in( marcella : work, giorgio4 : character ) appears-in( marcella : work, lea : character ) appears-in( marcella : work, marcella-c : character ) appears-in( marcella : work, raimonda : character ) appears-in( marcella : work, vernier : character ) appears-in( marion-delorme : work, brichanteau : character ) appears-in( marion-delorme : work, captain2 : character ) appears-in( marion-delorme : work, didier : character ) appears-in( marion-delorme : work, goaler : character ) appears-in( marion-delorme : work, il-marchese-di-ssverny : character ) appears-in( marion-delorme : work, il-signor-di-laffemas : character ) appears-in( marion-delorme : work, lelio : character ) appears-in( marion-delorme : work, marion-delorme-c : character ) appears-in( mefistofele : work, elena : character ) appears-in( mefistofele : work, faust-c : character ) appears-in( mefistofele : work, margherita : character ) appears-in( mefistofele : work, marta : character ) appears-in( mefistofele : work, mefistofele-c : character ) appears-in( mefistofele : work, nereo : character ) appears-in( mefistofele : work, pantalis : character ) appears-in( mefistofele : work, wagner : character ) appears-in( mese-mariano : work, carmela : character ) appears-in( mese-mariano : work, don-fabiano : character ) appears-in( mese-mariano : work, la-contessa : character ) appears-in( mese-mariano : work, la-superiora : character ) appears-in( mese-mariano : work, suor-agnese : character ) appears-in( mese-mariano : work, suor-celeste : character ) appears-in( mese-mariano : work, suor-cristina : character ) appears-in( mese-mariano : work, suor-maria : character ) appears-in( mese-mariano : work, suor-pazienza : character ) appears-in( nabucco : work, abdallo : character ) appears-in( nabucco : work, abigaille : character ) appears-in( nabucco : work, anna3 : character ) appears-in( nabucco : work, fenena : character ) appears-in( nabucco : work, high-priest-of-baal : character ) appears-in( nabucco : work, ismaele : character ) appears-in( nabucco : work, nabucco-c : character ) appears-in( nabucco : work, zaccaria : character ) appears-in( nerone : work, asteria : character ) appears-in( nerone : work, cerinto : character ) appears-in( nerone : work, dositeo : character ) appears-in( nerone : work, fanuel : character ) appears-in( nerone : work, gobrias : character ) appears-in( nerone : work, nerone-c : character ) appears-in( nerone : work, perside : character ) appears-in( nerone : work, rubria : character ) appears-in( nerone : work, simon-mago : character ) appears-in( nerone : work, tigellino : character ) appears-in( nerone2 : work, atte : character ) appears-in( nerone2 : work, babilio : character ) appears-in( nerone2 : work, claudio-cesare-nerone : character ) appears-in( nerone2 : work, clivio-rufo : character ) appears-in( nerone2 : work, egloge : character ) appears-in( nerone2 : work, epafrodito : character ) appears-in( nerone2 : work, eulogio : character ) appears-in( nerone2 : work, faonte : character ) appears-in( nerone2 : work, icelo : character ) appears-in( nerone2 : work, menecrate : character ) appears-in( nerone2 : work, mucrone : character ) appears-in( nerone2 : work, nevio : character ) appears-in( nerone2 : work, petronio : character ) appears-in( nerone2 : work, shepherd : character ) appears-in( nerone2 : work, vincinio : character ) appears-in( notte-di-leggenda : work, benci : character ) appears-in( notte-di-leggenda : work, conte-aldovrandi : character ) appears-in( notte-di-leggenda : work, gilfredo-dei-vaschi : character ) appears-in( notte-di-leggenda : work, neri : character ) appears-in( notte-di-leggenda : work, principe-gualberto-vismundi : character ) appears-in( notte-di-leggenda : work, vanna-aldovrandi : character ) appears-in( oberto : work, cuniza : character ) appears-in( oberto : work, imelda : character ) appears-in( oberto : work, leonora2 : character ) appears-in( oberto : work, oberto-c : character ) appears-in( oberto : work, riccardo : character ) appears-in( otello : work, cassio : character ) appears-in( otello : work, desdemona : character ) appears-in( otello : work, emilia : character ) appears-in( otello : work, herald3 : character ) appears-in( otello : work, iago : character ) appears-in( otello : work, lodovico : character ) appears-in( otello : work, montano : character ) appears-in( otello : work, otello-c : character ) appears-in( otello : work, roderigo : character ) appears-in( pagliacci : work, beppe : character ) appears-in( pagliacci : work, canio : character ) appears-in( pagliacci : work, nedda : character ) appears-in( pagliacci : work, silvio : character ) appears-in( pagliacci : work, tonio : character ) appears-in( pagliacci : work, villagers : character ) appears-in( parisina : work, aldobrandino-dei-rangoni : character ) appears-in( parisina : work, la-verde : character ) appears-in( parisina : work, nicolo-deste : character ) appears-in( parisina : work, parisina-malatesta : character ) appears-in( parisina : work, stella : character ) appears-in( parisina : work, ugo-deste : character ) appears-in( pinotta : work, andrea : character ) appears-in( pinotta : work, baldo : character ) appears-in( pinotta : work, pinotta-c : character ) appears-in( rigoletto : work, borsa : character ) appears-in( rigoletto : work, count-ceprano : character ) appears-in( rigoletto : work, countess-ceprano : character ) appears-in( rigoletto : work, count-monterone : character ) appears-in( rigoletto : work, court-usher : character ) appears-in( rigoletto : work, duke-of-mantua : character ) appears-in( rigoletto : work, gilda : character ) appears-in( rigoletto : work, giovanna3 : character ) appears-in( rigoletto : work, maddalena : character ) appears-in( rigoletto : work, marullo : character ) appears-in( rigoletto : work, page : character ) appears-in( rigoletto : work, rigoletto-c : character ) appears-in( rigoletto : work, sparafucile : character ) appears-in( risurrezione : work, anna4 : character ) appears-in( risurrezione : work, dimitri-nekludoff : character ) appears-in( risurrezione : work, due-contadini : character ) appears-in( risurrezione : work, fedia : character ) appears-in( risurrezione : work, fenitchka : character ) appears-in( risurrezione : work, il-capo-guardiano : character ) appears-in( risurrezione : work, katiusha : character ) appears-in( risurrezione : work, kritzloff : character ) appears-in( risurrezione : work, la-gobba : character ) appears-in( risurrezione : work, la-korableva : character ) appears-in( risurrezione : work, la-rossa2 : character ) appears-in( risurrezione : work, matrena : character ) appears-in( risurrezione : work, nora : character ) appears-in( risurrezione : work, simonson : character ) appears-in( risurrezione : work, sofia-ivanovna : character ) appears-in( risurrezione : work, una-vecchia-serva : character ) appears-in( risurrezione : work, un-cosacco : character ) appears-in( risurrezione : work, un-impiegato-della-stazione : character ) appears-in( risurrezione : work, un-ufficiale : character ) appears-in( risurrezione : work, vera2 : character ) appears-in( si : work, cleo-de-merode : character ) appears-in( si : work, luciano : character ) appears-in( si : work, palmira : character ) appears-in( si : work, romal : character ) appears-in( si : work, si-c : character ) appears-in( si : work, vera : character ) appears-in( siberia : work, alexis : character ) appears-in( siberia : work, captain3 : character ) appears-in( siberia : work, cossack : character ) appears-in( siberia : work, girl : character ) appears-in( siberia : work, gleby : character ) appears-in( siberia : work, governor : character ) appears-in( siberia : work, inspector : character ) appears-in( siberia : work, ivan : character ) appears-in( siberia : work, lame-man : character ) appears-in( siberia : work, miskinsky : character ) appears-in( siberia : work, nikona : character ) appears-in( siberia : work, sergeant2 : character ) appears-in( siberia : work, stephana : character ) appears-in( siberia : work, vassili : character ) appears-in( siberia : work, walinoff : character ) appears-in( silvano : work, matilde : character ) appears-in( silvano : work, renzo : character ) appears-in( silvano : work, rosa : character ) appears-in( silvano : work, silvano-c : character ) appears-in( simon-boccanegra : work, amelias-servant : character ) appears-in( simon-boccanegra : work, captain-of-the-crossbowmen : character ) appears-in( simon-boccanegra : work, gabriele-adorno : character ) appears-in( simon-boccanegra : work, jacopo-fiesco : character ) appears-in( simon-boccanegra : work, maria-boccanegra : character ) appears-in( simon-boccanegra : work, paolo-albiani : character ) appears-in( simon-boccanegra : work, pietro : character ) appears-in( simon-boccanegra : work, pietro2 : character ) appears-in( simon-boccanegra : work, simon-boccanegra-c : character ) appears-in( stiffelio : work, dorotea : character ) appears-in( stiffelio : work, federico-di-frengel : character ) appears-in( stiffelio : work, jorg : character ) appears-in( stiffelio : work, lina : character ) appears-in( stiffelio : work, raffaele-von-leuthold : character ) appears-in( stiffelio : work, stankar : character ) appears-in( stiffelio : work, stiffelio-c : character ) appears-in( suor-angelica : work, abbess : character ) appears-in( suor-angelica : work, alms-collector : character ) appears-in( suor-angelica : work, angelica : character ) appears-in( suor-angelica : work, dolcina : character ) appears-in( suor-angelica : work, genovieffa : character ) appears-in( suor-angelica : work, mistress-of-novices : character ) appears-in( suor-angelica : work, monitor : character ) appears-in( suor-angelica : work, osmina : character ) appears-in( suor-angelica : work, sorella-cercatrice-1 : character ) appears-in( suor-angelica : work, sorella-cercatrice-2 : character ) appears-in( suor-angelica : work, suor-zelatrice : character ) appears-in( suor-angelica : work, una-conversa-1 : character ) appears-in( suor-angelica : work, una-conversa-2 : character ) appears-in( suor-angelica : work, una-novizia : character ) appears-in( suor-angelica : work, zia : character ) appears-in( tosca : work, angelotti : character ) appears-in( tosca : work, cavaradossi : character ) appears-in( tosca : work, gaoler : character ) appears-in( tosca : work, sacristan : character ) appears-in( tosca : work, scarpia : character ) appears-in( tosca : work, sciarrone : character ) appears-in( tosca : work, shepherd-boy : character ) appears-in( tosca : work, spoletta : character ) appears-in( tosca : work, tosca-c : character ) appears-in( turandot : work, calaf : character ) appears-in( turandot : work, emperor-altoum : character ) appears-in( turandot : work, executioner : character ) appears-in( turandot : work, liu : character ) appears-in( turandot : work, mandarin : character ) appears-in( turandot : work, pang : character ) appears-in( turandot : work, ping : character ) appears-in( turandot : work, pong : character ) appears-in( turandot : work, prince-of-persia : character ) appears-in( turandot : work, timur : character ) appears-in( turandot : work, turandot-c : character ) appears-in( un-ballo-in-maschera : work, amelia : character ) appears-in( un-ballo-in-maschera : work, amelias-servant2 : character ) appears-in( un-ballo-in-maschera : work, judge : character ) appears-in( un-ballo-in-maschera : work, oscar : character ) appears-in( un-ballo-in-maschera : work, renato : character ) appears-in( un-ballo-in-maschera : work, riccardo2 : character ) appears-in( un-ballo-in-maschera : work, samuel : character ) appears-in( un-ballo-in-maschera : work, silvano2 : character ) appears-in( un-ballo-in-maschera : work, tom : character ) appears-in( un-ballo-in-maschera : work, ulrica : character ) appears-in( un-giorno-di-regno : work, barone-di-kelbar : character ) appears-in( un-giorno-di-regno : work, cavaliere-di-belfiore : character ) appears-in( un-giorno-di-regno : work, delmonte : character ) appears-in( un-giorno-di-regno : work, edoardo-di-sanval : character ) appears-in( un-giorno-di-regno : work, giulietta-di-kelbar : character ) appears-in( un-giorno-di-regno : work, ivrea : character ) appears-in( un-giorno-di-regno : work, la-rocca : character ) appears-in( un-giorno-di-regno : work, marchesa-del-poggio : character ) appears-in( zanetto : work, silvia : character ) appears-in( zanetto : work, zanetto-c : character ) appears-in( zaza : work, anaide : character ) appears-in( zaza : work, augusto : character ) appears-in( zaza : work, bussy : character ) appears-in( zaza : work, cascart : character ) appears-in( zaza : work, claretta : character ) appears-in( zaza : work, courtois : character ) appears-in( zaza : work, duclou : character ) appears-in( zaza : work, floriana : character ) appears-in( zaza : work, lartigon : character ) appears-in( zaza : work, la-signora-dufresne : character ) appears-in( zaza : work, malardot : character ) appears-in( zaza : work, marco2 : character ) appears-in( zaza : work, michelin : character ) appears-in( zaza : work, milio-dufresne : character ) appears-in( zaza : work, natalia : character ) appears-in( zaza : work, toto : character ) appears-in( zaza : work, zaza-c : character ) appears-in( zingari : work, fleana : character ) appears-in( zingari : work, radu : character ) appears-in( zingari : work, tamar : character ) appears-in( zingari : work, un-vecchio-zingari : character ) /* -- AT: based-on */ based-on( amleto : result, hamlet : source ) based-on( adriana-lecouvreur : result, adrienne-lecouvreur : source ) based-on( alzira : result, alzire : source ) based-on( aroldo : result, harold : source ) based-on( attila : result, attila-src : source ) based-on( cavalleria-rusticana : result, cavalleria-rusticana-src : source ) based-on( chatterton : result, chatterton-src : source ) based-on( conchita : result, la-femme-et-le-pantin : source ) based-on( cristoforo-colombo : result, historia-de-las-indias : source ) based-on( cyrano-de-bergerac : result, cyrano-de-bergerac-src : source ) based-on( don-carlos : result, don-carlos-src : source ) based-on( edgar : result, la-coupe-et-les-levres : source ) based-on( edipo-re : result, oedipus-tyrannus : source ) based-on( ernani : result, hernani : source ) based-on( falstaff : result, henry-iv : source ) based-on( falstaff : result, merry-wives : source ) based-on( fedora : result, fedora0 : source ) based-on( francesca-da-rimini : result, francesca-da-rimini-src : source ) based-on( francesca-da-rimini2 : result, francesca-da-rimini-src2 : source ) based-on( francesca-da-rimini-src : result, inferno : source ) based-on( germania : result, deutschland : source ) based-on( gianni-schicchi : result, inferno : source ) based-on( gina : result, catherine-ou-la-croix-dor : source ) based-on( giovanna-darco : result, die-jungfrau-von-orleans : source ) based-on( giulietta-e-romeo : result, giulietta-e-romeo-src : source ) based-on( giulietta-e-romeo : result, giulietta-e-romeo-src2 : source ) based-on( giulietta-e-romeo-src2 : result, giulietta-e-romeo-src : source ) based-on( glauco : result, glauco-src : source ) based-on( gloria : result, la-haine : source ) based-on( guglielmo-ratcliff : result, william-ratcliff : source ) based-on( hellera : result, adolphe : source ) based-on( i-cavalieri-di-ekebu : result, gosta-berlings-saga : source ) based-on( i-due-foscari : result, the-two-foscari : source ) based-on( i-lituani : result, konrad-wallenrod : source ) based-on( i-masnadieri : result, die-rauber : source ) based-on( i-mori-di-valenza : result, piquillo-alliaga : source ) based-on( i-promessi-sposi : result, i-promessi-sposi-src : source ) based-on( ib-and-little-christina : result, ib-and-little-christina-src : source ) based-on( il-corsaro : result, the-corsair : source ) based-on( il-principe-zilah : result, le-prince-zilah : source ) based-on( il-signor-di-pourceaugnac : result, monsieur-de-pourceaugnac : source ) based-on( il-tabarro : result, la-houppelande : source ) based-on( il-trovatore : result, el-trovador : source ) based-on( il-vassallo-di-szigeth : result, assedio-di-sziget : source ) based-on( il-voto : result, o-voto : source ) based-on( isabeau : result, godiva : source ) based-on( la-battaglia-di-legnano : result, la-battaille-de-toulouse : source ) based-on( la-boheme : result, scenes-de-la-vie-de-boheme : source ) based-on( la-boheme2 : result, scenes-de-la-vie-de-boheme : source ) based-on( la-cena-delle-beffe : result, la-cena-delle-beffe-src : source ) based-on( la-fanciulla-del-west : result, the-girl-of-the-golden-west : source ) based-on( la-figlia-di-jorio : result, la-figlia-di-jorio-src : source ) based-on( la-forza-del-destino : result, don-alvaro : source ) based-on( la-forza-del-destino : result, wallensteins-lager : source ) based-on( la-gioconda : result, angelo : source ) based-on( la-leggenda-di-sakuntala : result, recognition-of-sakuntala : source ) based-on( la-nave : result, la-nave-src : source ) based-on( la-principessa-lontana : result, la-princesse-lointaine : source ) based-on( la-terra-del-sogno : result, land-of-hearts-desire : source ) based-on( la-traviata : result, la-dame-aux-camelias : source ) based-on( la-wally : result, geyer-wally : source ) based-on( lamico-fritz : result, lami-fritz : source ) based-on( larlesiana : result, larlesienne : source ) based-on( le-baruffe-chiozotte : result, le-baruffe-chiozotte-src : source ) based-on( le-villi : result, les-willis : source ) based-on( lodoletta : result, two-little-wooden-shoes : source ) based-on( loracolo : result, the-cat-and-the-cherub : source ) based-on( luisa-miller : result, kabale-und-liebe : source ) based-on( macbeth : result, macbeth-src : source ) based-on( madama-butterfly : result, madama-butterfly-src : source ) ~ madama-butterfly-based-on based-on( madame-sans-gene : result, madame-sans-gene0 : source ) based-on( maia : result, work-by-paul-de-choudens : source ) based-on( mala-vita : result, o-voto : source ) based-on( manon-lescaut : result, manon-lescaut-src : source ) based-on( marion-delorme : result, marion-de-lorme : source ) based-on( mefistofele : result, faust : source ) based-on( mese-mariano : result, o-mese-mariano : source ) based-on( nabucco : result, nabuchodonosor : source ) based-on( nabucco : result, nabucodonosor : source ) based-on( nerone2 : result, nerone-src : source ) based-on( otello : result, othello : source ) based-on( parisina : result, parisina-src : source ) based-on( preziosa : result, the-spanish-student : source ) based-on( re-nala : result, il-ritorno : source ) based-on( rigoletto : result, le-roi-samuse : source ) based-on( rip-van-winkle : result, rip-van-winkle-src : source ) based-on( risurrezione : result, resurrection : source ) based-on( roderigo-re-dei-goti : result, roderick : source ) based-on( siberia : result, from-the-house-of-the-dead : source ) based-on( silvano : result, histoire-de-romain-detretat : source ) based-on( simon-boccanegra : result, simon-boccanegra-src : source ) based-on( stiffelio : result, le-pasteur : source ) based-on( tzigana : result, work-by-paul-ferrier : source ) based-on( tosca : result, la-tosca : source ) based-on( turandot : result, turandot-src : source ) based-on( un-giorno-di-regno : result, le-faux-stanislas : source ) based-on( zanetto : result, le-passant : source ) based-on( zaza : result, zaza-src : source ) /* -- AT: born-in */ born-in( abreschviller : place, chatrian : person ) born-in( athens : place, sophocles : person ) born-in( bagni-di-lucca : place, crawford : person ) born-in( besancon : place, hugo : person ) born-in( bologna : place, zangarini : person ) born-in( borgo-san-lorenzo : place, forzano : person ) born-in( boston : place, fernald : person ) born-in( boulogne-sur-mer : place, bey : person ) born-in( brescia : place, bazzini : person ) born-in( bristol : place, southey : person ) born-in( brussels : place, vaez : person ) born-in( bury-st-edmunds : place, ouida : person ) born-in( cadiz : place, gutierrez : person ) born-in( cakovec : place, zrinyi : person ) born-in( castelnuovo-scrivia : place, bandello : person ) born-in( catania : place, verga : person ) born-in( ceva : place, marenco : person ) born-in( colleretto-parella : place, giacosa : person ) born-in( como : place, linati : person ) born-in( cordoba : place, saavedra : person ) born-in( dusseldorf : place, heine : person ) born-in( ferrara : place, solera : person ) born-in( firenze : place, dante : person ) born-in( foggia : place, giordano : person ) born-in( frankfurt : place, goethe : person ) born-in( genova : place, romani : person ) born-in( ghent : place, louys : person ) born-in( hesdin : place, prevost : person ) born-in( konigsberg : place, werner : person ) born-in( laquila : place, moschino : person ) born-in( lausanne : place, constant : person ) born-in( lecce : place, daspuro : person ) born-in( lecco : place, ghislanzoni : person ) born-in( le-roncole : place, verdi : person ) born-in( limoges : place, clarette : person ) born-in( livorno : place, civinini : person ) born-in( livorno : place, mascagni : person ) born-in( livorno : place, menasci : person ) born-in( livorno : place, targioni-tozzetti : person ) born-in( locarno : place, nessi : person ) born-in( loches : place, vigny : person ) born-in( london : place, bulwer-lytton : person ) born-in( london : place, byron : person ) born-in( lucca : place, catalani : person ) born-in( lucca : place, puccini : person ) born-in( marbach : place, schiller : person ) born-in( marbacka : place, lagerlof : person ) born-in( marseille : place, rostand : person ) born-in( marseilles : place, mery : person ) born-in( milano : place, fontana : person ) born-in( milano : place, leoni : person ) born-in( milano : place, manzoni : person ) born-in( milano : place, praga-emilio : person ) born-in( milano : place, praga-marco : person ) born-in( milano : place, ricordi : person ) born-in( milano : place, ricordi-tito : person ) born-in( morlaix : place, souvestre : person ) born-in( moscow : place, dostoyevsky : person ) born-in( munich : place, von-hillern : person ) born-in( murano : place, piave : person ) born-in( napoli : place, cammarano : person ) born-in( napoli : place, golisciani : person ) born-in( napoli : place, leoncavallo : person ) born-in( napoli : place, lombardo : person ) born-in( napoli : place, salvatore-di-giacomo : person ) born-in( navahradak : place, mickiewicz : person ) born-in( new-york : place, irving : person ) born-in( nimes : place, daudet : person ) born-in( orange : place, locle : person ) born-in( paderno-fasolaro : place, ponchielli : person ) born-in( padua : place, boito : person ) born-in( palmi : place, cilea : person ) born-in( parma : place, toscanini : person ) born-in( paris : place, anicet-bourgeois : person ) born-in( paris : place, brazier : person ) born-in( paris : place, cain : person ) born-in( paris : place, coppee : person ) born-in( paris : place, dumas-fils : person ) born-in( paris : place, karr : person ) born-in( paris : place, legouve : person ) born-in( paris : place, melesville : person ) born-in( paris : place, moliere : person ) born-in( paris : place, murger : person ) born-in( paris : place, musset : person ) born-in( paris : place, royer : person ) born-in( paris : place, sardou : person ) born-in( paris : place, scribe : person ) born-in( paris : place, voltaire : person ) born-in( pesaro : place, morselli : person ) born-in( pescara : place, dannunzio : person ) born-in( phalsbourg : place, erckmann : person ) born-in( piacenza : place, illica : person ) born-in( posillipo : place, alfano : person ) born-in( portland : place, longfellow : person ) born-in( prato : place, benelli : person ) born-in( pula : place, smareglia : person ) born-in( rennes : place, pineux-duval : person ) born-in( roma : place, cossa : person ) born-in( roma : place, dormeville : person ) born-in( roma : place, falena : person ) born-in( roma : place, romagnoli : person ) born-in( roma : place, tommasini : person ) born-in( rovereto : place, zandonai : person ) born-in( san-francisco : place, belasco : person ) born-in( sevilla : place, las-casas : person ) born-in( somersby : place, tennyson : person ) born-in( stratford : place, shakespeare : person ) born-in( torino : place, franchetti : person ) born-in( torino : place, gubernatis : person ) born-in( torino : place, oliva : person ) born-in( trento : place, maffei : person ) born-in( udine : place, somma : person ) born-in( venezia : place, gozzi : person ) born-in( venezia : place, goldoni : person ) born-in( venezia : place, piazza : person ) born-in( venezia : place, zanardini : person ) born-in( verona : place, adami : person ) born-in( verona : place, castelnova : person ) born-in( verona : place, faccio : person ) born-in( verona : place, simoni : person ) born-in( vicenza : place, da-porto : person ) born-in( vigasio : place, montemezzi : person ) born-in( yasnaya-polyana : place, tolstoy : person ) born-in( yorkshire : place, hood : person ) born-in( zara : place, colautti : person ) /* -- AT: completed-by */ completed-by( alfano : composer, turandot : work ) completed-by( toscanini : composer, nerone : work ) completed-by( tommasini : composer, nerone : work ) completed-by( smareglia : composer, nerone : work ) /* -- AT: composed-by */ composed-by( alfano : composer, cyrano-de-bergerac : work ) composed-by( alfano : composer, don-juan-de-manara : work ) composed-by( alfano : composer, i-cavalieri-e-la-bella : work ) composed-by( alfano : composer, il-dottor-antonio : work ) composed-by( alfano : composer, il-principe-zilah : work ) composed-by( alfano : composer, la-fonte-di-enschir : work ) composed-by( alfano : composer, la-leggenda-di-sakuntala : work ) composed-by( alfano : composer, lombra-di-don-giovanni : work ) composed-by( alfano : composer, lultimo-lord : work ) composed-by( alfano : composer, madonna-imperia : work ) composed-by( alfano : composer, miranda : work ) composed-by( alfano : composer, risurrezione : work ) composed-by( boito : composer, mefistofele : work ) composed-by( boito : composer, nerone : work ) composed-by( catalani : composer, dejanice : work ) composed-by( catalani : composer, edmea : work ) composed-by( catalani : composer, la-falce : work ) composed-by( catalani : composer, la-wally : work ) composed-by( catalani : composer, loreley : work ) composed-by( cilea : composer, adriana-lecouvreur : work ) composed-by( cilea : composer, gina : work ) composed-by( cilea : composer, gloria : work ) composed-by( cilea : composer, il-matrimonio-selvaggio : work ) composed-by( cilea : composer, la-tilda : work ) composed-by( cilea : composer, larlesiana : work ) composed-by( cilea : composer, ritorno-ad-amore : work ) composed-by( faccio : composer, amleto : work ) composed-by( faccio : composer, i-profughi-fiamminghi : work ) composed-by( faccio : composer, il-fornaretto : work ) composed-by( faccio : composer, ines-de-castro : work ) composed-by( franchetti : composer, asrael : work ) composed-by( franchetti : composer, cristoforo-colombo : work ) composed-by( franchetti : composer, germania : work ) composed-by( franchetti : composer, giove-a-pompei : work ) composed-by( franchetti : composer, glauco : work ) composed-by( franchetti : composer, il-fior-dalpe : work ) composed-by( franchetti : composer, il-signor-di-pourceaugnac : work ) composed-by( franchetti : composer, la-figlia-di-jorio : work ) composed-by( franchetti : composer, notte-di-leggenda : work ) composed-by( franchetti : composer, zoroastro : work ) composed-by( giordano : composer, andrea-chenier : work ) composed-by( giordano : composer, fedora : work ) composed-by( giordano : composer, giove-a-pompei : work ) composed-by( giordano : composer, il-re : work ) composed-by( giordano : composer, il-voto : work ) composed-by( giordano : composer, la-cena-delle-beffe : work ) composed-by( giordano : composer, madame-sans-gene : work ) composed-by( giordano : composer, mala-vita : work ) composed-by( giordano : composer, marcella : work ) composed-by( giordano : composer, marina : work ) composed-by( giordano : composer, mese-mariano : work ) composed-by( giordano : composer, regina-diaz : work ) composed-by( giordano : composer, siberia : work ) composed-by( leoncavallo : composer, chatterton : work ) composed-by( leoncavallo : composer, der-roland-von-berlin : work ) composed-by( leoncavallo : composer, edipo-re : work ) composed-by( leoncavallo : composer, goffredo-mameli : work ) composed-by( leoncavallo : composer, i-medici : work ) composed-by( leoncavallo : composer, la-boheme2 : work ) composed-by( leoncavallo : composer, maia : work ) composed-by( leoncavallo : composer, pagliacci : work ) composed-by( leoncavallo : composer, zaza : work ) composed-by( leoncavallo : composer, zingari : work ) composed-by( leoni : composer, falene : work ) composed-by( leoni : composer, francesca-da-rimini2 : work ) composed-by( leoni : composer, ib-and-little-christina : work ) composed-by( leoni : composer, la-terra-del-sogno : work ) composed-by( leoni : composer, le-baruffe-chiozotte : work ) composed-by( leoni : composer, loracolo : work ) composed-by( leoni : composer, massemarello : work ) composed-by( leoni : composer, raggio-di-luna : work ) composed-by( leoni : composer, rip-van-winkle : work ) composed-by( leoni : composer, tzigana : work ) composed-by( mascagni : composer, amica : work ) composed-by( mascagni : composer, cavalleria-rusticana : work ) composed-by( mascagni : composer, guglielmo-ratcliff : work ) composed-by( mascagni : composer, i-rantzau : work ) composed-by( mascagni : composer, il-piccolo-marat : work ) composed-by( mascagni : composer, iris : work ) composed-by( mascagni : composer, isabeau : work ) composed-by( mascagni : composer, lamico-fritz : work ) composed-by( mascagni : composer, le-maschere : work ) composed-by( mascagni : composer, lodoletta : work ) composed-by( mascagni : composer, nerone2 : work ) composed-by( mascagni : composer, parisina : work ) composed-by( mascagni : composer, pinotta : work ) composed-by( mascagni : composer, si : work ) composed-by( mascagni : composer, silvano : work ) composed-by( mascagni : composer, zanetto : work ) composed-by( montemezzi : composer, bianca : work ) composed-by( montemezzi : composer, giovanni-gallurese : work ) composed-by( montemezzi : composer, hellera : work ) composed-by( montemezzi : composer, lamore-dei-tre-re : work ) composed-by( montemezzi : composer, la-nave : work ) composed-by( montemezzi : composer, la-notte-di-zoraima : work ) composed-by( montemezzi : composer, lincantesimo : work ) composed-by( montemezzi : composer, la-principessa-lontana : work ) composed-by( ponchielli : composer, bertrando-dal-bormio : work ) composed-by( ponchielli : composer, i-lituani : work ) composed-by( ponchielli : composer, i-mori-di-valenza : work ) composed-by( ponchielli : composer, i-promessi-sposi : work ) composed-by( ponchielli : composer, il-figliuol-prodigo : work ) composed-by( ponchielli : composer, il-parlatore-eterno : work ) composed-by( ponchielli : composer, il-sindaco-babbeo : work ) composed-by( ponchielli : composer, la-gioconda : work ) composed-by( ponchielli : composer, la-savoiarda : work ) composed-by( ponchielli : composer, la-vergine-di-kermo : work ) composed-by( ponchielli : composer, marion-delorme : work ) composed-by( ponchielli : composer, roderigo-re-dei-goti : work ) composed-by( puccini : composer, edgar : work ) composed-by( puccini : composer, gianni-schicchi : work ) composed-by( puccini : composer, il-tabarro : work ) composed-by( puccini : composer, la-boheme : work ) composed-by( puccini : composer, la-fanciulla-del-west : work ) composed-by( puccini : composer, la-rondine : work ) composed-by( puccini : composer, le-villi : work ) composed-by( puccini : composer, madama-butterfly : work ) composed-by( puccini : composer, manon-lescaut : work ) composed-by( puccini : composer, suor-angelica : work ) composed-by( puccini : composer, tosca : work ) composed-by( puccini : composer, turandot : work ) composed-by( smareglia : composer, abisso : work ) composed-by( smareglia : composer, bianca-da-cervia : work ) composed-by( smareglia : composer, caccia-lontana : work ) composed-by( smareglia : composer, cornill-schut : work ) composed-by( smareglia : composer, il-vassallo-di-szigeth : work ) composed-by( smareglia : composer, la-falena : work ) composed-by( smareglia : composer, nozze-istriane : work ) composed-by( smareglia : composer, oceana : work ) composed-by( smareglia : composer, preziosa : work ) composed-by( smareglia : composer, re-nala : work ) composed-by( verdi : composer, aida : work ) composed-by( verdi : composer, alzira : work ) composed-by( verdi : composer, aroldo : work ) composed-by( verdi : composer, attila : work ) composed-by( verdi : composer, don-carlos : work ) composed-by( verdi : composer, ernani : work ) composed-by( verdi : composer, falstaff : work ) composed-by( verdi : composer, giovanna-darco : work ) composed-by( verdi : composer, i-due-foscari : work ) composed-by( verdi : composer, i-lombardi : work ) composed-by( verdi : composer, i-masnadieri : work ) composed-by( verdi : composer, i-vespri-siciliani : work ) composed-by( verdi : composer, il-corsaro : work ) composed-by( verdi : composer, il-trovatore : work ) composed-by( verdi : composer, jerusalem-o : work ) composed-by( verdi : composer, la-battaglia-di-legnano : work ) composed-by( verdi : composer, la-forza-del-destino : work ) composed-by( verdi : composer, la-traviata : work ) composed-by( verdi : composer, luisa-miller : work ) composed-by( verdi : composer, macbeth : work ) composed-by( verdi : composer, nabucco : work ) composed-by( verdi : composer, oberto : work ) composed-by( verdi : composer, otello : work ) composed-by( verdi : composer, rigoletto : work ) composed-by( verdi : composer, simon-boccanegra : work ) composed-by( verdi : composer, stiffelio : work ) composed-by( verdi : composer, un-ballo-in-maschera : work ) composed-by( verdi : composer, un-giorno-di-regno : work ) composed-by( zandonai : composer, conchita : work ) composed-by( zandonai : composer, francesca-da-rimini : work ) composed-by( zandonai : composer, giuliano : work ) composed-by( zandonai : composer, giulietta-e-romeo : work ) composed-by( zandonai : composer, i-cavalieri-di-ekebu : work ) composed-by( zandonai : composer, il-bacio : work ) composed-by( zandonai : composer, il-grillo-del-focolare : work ) composed-by( zandonai : composer, la-coppa-del-re : work ) composed-by( zandonai : composer, la-farsa-amorosa : work ) composed-by( zandonai : composer, la-via-della-finestra : work ) composed-by( zandonai : composer, luccellino-doro : work ) composed-by( zandonai : composer, melenis : work ) composed-by( zandonai : composer, una-partita : work ) /* -- AT: died-in */ died-in( aldwort : place, tennyson : person ) died-in( astapovo : place, tolstoy : person ) died-in( athens : place, sophocles : person ) died-in( bazens : place, bandello : person ) died-in( bologna : place, zangarini : person ) died-in( brescia : place, dannunzio : person ) died-in( brussels : place, puccini : person ) died-in( cairo : place, bey : person ) died-in( cakovec : place, zrinyi : person ) died-in( cambridge-ma : place, longfellow : person ) died-in( capri : place, locle : person ) died-in( caprino-bergamasco : place, ghislanzoni : person ) died-in( catania : place, verga : person ) died-in( chantilly : place, prevost : person ) died-in( colleretto-parella : place, giacosa : person ) born-in( como : place, linati : person ) died-in( dover : place, fernald : person ) died-in( geneva : place, voltaire : person ) died-in( genova : place, oliva : person ) died-in( grado : place, smareglia : person ) died-in( istanbul : place, mickiewicz : person ) died-in( la-spezia : place, romani : person ) died-in( livorno : place, menasci : person ) died-in( livorno : place, targioni-tozzetti : person ) died-in( locarno : place, nessi : person ) died-in( london : place, hood : person ) died-in( london : place, leoni : person ) died-in( lugano : place, fontana : person ) died-in( luneville : place, erckmann : person ) died-in( madrid : place, gutierrez : person ) died-in( madrid : place, las-casas : person ) died-in( madrid : place, saavedra : person ) died-in( marbacka : place, lagerlof : person ) died-in( marly-le-roy : place, dumas-fils : person ) died-in( marly-le-roy : place, melesville : person ) died-in( marseille : place, rostand : person ) died-in( mesolonghi : place, byron : person ) died-in( milano : place, adami : person ) died-in( milano : place, bazzini : person ) died-in( milano : place, boito : person ) died-in( milano : place, catalani : person ) died-in( milano : place, dormeville : person ) died-in( milano : place, giordano : person ) died-in( milano : place, lombardo : person ) died-in( milano : place, maffei : person ) died-in( milano : place, manzoni : person ) died-in( milano : place, marenco : person ) died-in( milano : place, piave : person ) died-in( milano : place, piazza : person ) died-in( milano : place, ponchielli : person ) died-in( milano : place, praga-emilio : person ) died-in( milano : place, ricordi : person ) died-in( milano : place, simoni : person ) died-in( milano : place, solera : person ) died-in( milano : place, ricordi-tito : person ) died-in( milano : place, verdi : person ) died-in( milano : place, zanardini : person ) died-in( monza : place, faccio : person ) died-in( montecatini : place, leoncavallo : person ) died-in( napoli : place, cammarano : person ) died-in( napoli : place, daspuro : person ) died-in( napoli : place, golisciani : person ) died-in( napoli : place, salvatore-di-giacomo : person ) died-in( new-york : place, belasco : person ) died-in( new-york : place, irving : person ) died-in( new-york : place, toscanini : person ) died-in( paris : place, brazier : person ) died-in( paris : place, cain : person ) died-in( paris : place, constant : person ) died-in( paris : place, clarette : person ) died-in( paris : place, daudet : person ) died-in( paris : place, goldoni : person ) died-in( paris : place, heine : person ) died-in( paris : place, hugo : person ) died-in( paris : place, legouve : person ) died-in( paris : place, louys : person ) died-in( paris : place, mery : person ) died-in( paris : place, moliere : person ) died-in( paris : place, murger : person ) died-in( paris : place, musset : person ) died-in( paris : place, royer : person ) died-in( paris : place, sardou : person ) died-in( paris : place, scribe : person ) died-in( paris : place, souvestre : person ) died-in( paris : place, vaez : person ) died-in( paris : place, vigny : person ) died-in( pau : place, anicet-bourgeois : person ) died-in( pesaro : place, zandonai : person ) died-in( piacenza : place, illica : person ) died-in( prien : place, von-hillern : person ) died-in( ravenna : place, dante : person ) died-in( roma : place, civinini : person ) died-in( roma : place, colautti : person ) died-in( roma : place, falena : person ) died-in( roma : place, forzano : person ) died-in( roma : place, gubernatis : person ) died-in( roma : place, mascagni : person ) died-in( roma : place, morselli : person ) died-in( roma : place, moschino : person ) died-in( roma : place, romagnoli : person ) died-in( saint-raphael : place, karr : person ) died-in( san-remo : place, alfano : person ) died-in( sorrento : place, crawford : person ) died-in( st-petersburg : place, dostoyevsky : person ) died-in( stratford : place, shakespeare : person ) died-in( torquay : place, bulwer-lytton : person ) died-in( varazza : place, cilea : person ) died-in( varese : place, praga-marco : person ) died-in( venezia : place, somma : person ) died-in( verona : place, castelnova : person ) died-in( viareggio : place, franchetti : person ) died-in( viareggio : place, ouida : person ) died-in( vienna : place, werner : person ) died-in( vigasio : place, montemezzi : person ) died-in( villemomble : place, chatrian : person ) died-in( weimar : place, goethe : person ) died-in( weimar : place, schiller : person ) died-in( zoagli : place, benelli : person ) /* -- AT: exponent-of */ exponent-of( verismo : style, giacosa : person ) exponent-of( verismo : style, giordano : person ) exponent-of( verismo : style, leoncavallo : person ) exponent-of( verismo : style, leoni : person ) exponent-of( verismo : style, mascagni : person ) exponent-of( verismo : style, puccini : person ) /* -- AT: has-voice */ has-voice( baritone : voice-type, alfio : character ) has-voice( baritone : voice-type, amantio : character ) has-voice( baritone : voice-type, amonasro : character ) has-voice( baritone : voice-type, andrea : character ) has-voice( baritone : voice-type, araldo-maggiore : character ) has-voice( baritone : voice-type, baldassare : character ) has-voice( baritone : voice-type, bardo : character ) has-voice( baritone : voice-type, barnaba : character ) has-voice( baritone : voice-type, baron-douphol : character ) has-voice( baritone : voice-type, baron-hermann : character ) has-voice( baritone : voice-type, bell : character ) has-voice( baritone : voice-type, bello : character ) has-voice( baritone : voice-type, borov : character ) has-voice( baritone : voice-type, bussy : character ) has-voice( baritone : voice-type, carbon : character ) has-voice( baritone : voice-type, carlo-worms : character ) has-voice( baritone : voice-type, cascart : character ) has-voice( baritone : voice-type, cavaliere-di-belfiore : character ) has-voice( baritone : voice-type, cim-fen : character ) has-voice( baritone : voice-type, cirillo : character ) has-voice( baritone : voice-type, colline : character ) / la-boheme2 has-voice( baritone : voice-type, conte-douglas : character ) has-voice( baritone : voice-type, corintio : character ) has-voice( baritone : voice-type, count-di-luna : character ) has-voice( baritone : voice-type, count-paolo : character ) has-voice( baritone : voice-type, crisogno : character ) has-voice( baritone : voice-type, cristoforo-colombo-c : character ) has-voice( baritone : voice-type, dardano : character ) has-voice( baritone : voice-type, david : character ) has-voice( baritone : voice-type, de-brigole : character ) has-voice( baritone : voice-type, de-guiche : character ) has-voice( baritone : voice-type, de-siriex : character ) has-voice( baritone : voice-type, de-valvert : character ) has-voice( baritone : voice-type, don-carlo-c2 : character ) has-voice( baritone : voice-type, don-carlo-di-vargas : character ) has-voice( baritone : voice-type, dositeo : character ) has-voice( baritone : voice-type, dottor-graziano : character ) has-voice( baritone : voice-type, drasco : character ) has-voice( baritone : voice-type, dumas : character ) has-voice( baritone : voice-type, edipo : character ) has-voice( baritone : voice-type, egberto : character ) has-voice( baritone : voice-type, epafrodito : character ) has-voice( baritone : voice-type, ezio : character ) has-voice( baritone : voice-type, fanuel : character ) has-voice( baritone : voice-type, fazio : character ) has-voice( baritone : voice-type, fernandez : character ) has-voice( baritone : voice-type, flamberge : character ) has-voice( baritone : voice-type, fleville : character ) has-voice( baritone : voice-type, forchis : character ) has-voice( baritone : voice-type, ford : character ) has-voice( baritone : voice-type, fouche : character ) has-voice( baritone : voice-type, fouquier-tinville : character ) has-voice( baritone : voice-type, francesco : character ) has-voice( baritone : voice-type, francesco-foscari : character ) has-voice( baritone : voice-type, franz : character ) has-voice( baritone : voice-type, gellner : character ) has-voice( baritone : voice-type, gelsomino : character ) has-voice( baritone : voice-type, gerard : character ) has-voice( baritone : voice-type, germanio : character ) has-voice( baritone : voice-type, giacomo : character ) has-voice( baritone : voice-type, giambattista-da-montesecco : character ) has-voice( baritone : voice-type, gianni : character ) has-voice( baritone : voice-type, gianni-rantzau : character ) has-voice( baritone : voice-type, giannotto : character ) has-voice( baritone : voice-type, giorgio3 : character ) has-voice( baritone : voice-type, giorgio-germont : character ) has-voice( baritone : voice-type, giovanni-malatesta : character ) has-voice( baritone : voice-type, gleby : character ) has-voice( baritone : voice-type, gray : character ) has-voice( baritone : voice-type, guglielmo : character ) has-voice( baritone : voice-type, guido-di-monforte : character ) has-voice( baritone : voice-type, gusmano : character ) has-voice( baritone : voice-type, happy : character ) has-voice( baritone : voice-type, iago : character ) has-voice( baritone : voice-type, il-capitano-dei-marats : character ) has-voice( baritone : voice-type, il-capitan-spaventa : character ) has-voice( baritone : voice-type, il-carpentiere : character ) has-voice( baritone : voice-type, il-cavalier-faidit : character ) has-voice( baritone : voice-type, il-dottore : character ) has-voice( baritone : voice-type, il-duca-di-kilmarnok : character ) has-voice( baritone : voice-type, il-marchese-di-ssverny : character ) has-voice( baritone : voice-type, il-re-c : character ) has-voice( baritone : voice-type, il-soldato : character ) has-voice( baritone : voice-type, il-torregiano : character ) has-voice( baritone : voice-type, jake-wallace : character ) has-voice( baritone : voice-type, johannes-ratenow : character ) has-voice( baritone : voice-type, kyoto : character ) has-voice( baritone : voice-type, lame-man : character ) has-voice( baritone : voice-type, la-superiora : character ) has-voice( baritone : voice-type, lazaro-di-roio : character ) has-voice( baritone : voice-type, le-comte-de-toulouse : character ) has-voice( baritone : voice-type, le-mousquetaire : character ) has-voice( baritone : voice-type, leroy : character ) has-voice( baritone : voice-type, lescaut : character ) has-voice( baritone : voice-type, ligniere : character ) has-voice( baritone : voice-type, lofficier-espagnol : character ) has-voice( baritone : voice-type, lord-klifford : character ) has-voice( baritone : voice-type, lorek : character ) has-voice( baritone : voice-type, luomo-di-legge : character ) has-voice( baritone : voice-type, macbeth-c : character ) has-voice( baritone : voice-type, makensprung : character ) has-voice( baritone : voice-type, mandarin : character ) has-voice( baritone : voice-type, marcello : character ) / la-boheme has-voice( baritone : voice-type, marchese-alfredo : character ) has-voice( baritone : voice-type, marco : character ) has-voice( baritone : voice-type, marcovaldo : character ) has-voice( baritone : voice-type, marullo : character ) has-voice( baritone : voice-type, mathieu : character ) has-voice( baritone : voice-type, menecrate : character ) has-voice( baritone : voice-type, metifio : character ) has-voice( baritone : voice-type, michele : character ) has-voice( baritone : voice-type, michelin : character ) has-voice( baritone : voice-type, michonnet : character ) has-voice( baritone : voice-type, miller : character ) has-voice( baritone : voice-type, miskinsky : character ) has-voice( baritone : voice-type, nabucco-c : character ) has-voice( baritone : voice-type, napoleon : character ) has-voice( baritone : voice-type, neri-chiaramantesi : character ) has-voice( baritone : voice-type, nicolo-deste : character ) has-voice( baritone : voice-type, ostasio : character ) has-voice( baritone : voice-type, pietro : character ) has-voice( baritone : voice-type, pietro2 : character ) has-voice( baritone : voice-type, ping : character ) has-voice( baritone : voice-type, principe-gualberto-vismundi : character ) has-voice( baritone : voice-type, rance : character ) has-voice( baritone : voice-type, renaldo : character ) has-voice( baritone : voice-type, renato : character ) has-voice( baritone : voice-type, renzo : character ) has-voice( baritone : voice-type, re-raimondo : character ) has-voice( baritone : voice-type, rigoletto-c : character ) has-voice( baritone : voice-type, rinuccio-da-corbara : character ) has-voice( baritone : voice-type, rinuccio-da-corbara2 : character ) has-voice( baritone : voice-type, rodolfo3 : character ) has-voice( baritone : voice-type, rodrigue : character ) has-voice( baritone : voice-type, rolando : character ) has-voice( baritone : voice-type, roustan : character ) has-voice( baritone : voice-type, sacristan : character ) has-voice( baritone : voice-type, scarpia : character ) has-voice( baritone : voice-type, schaunard : character ) has-voice( baritone : voice-type, seid : character ) has-voice( baritone : voice-type, sharpless : character ) has-voice( baritone : voice-type, sid : character ) has-voice( baritone : voice-type, silvio : character ) has-voice( baritone : voice-type, simon-boccanegra-c : character ) has-voice( baritone : voice-type, simon-mago : character ) has-voice( baritone : voice-type, simonson : character ) has-voice( baritone : voice-type, sir-john-da-venne : character ) has-voice( baritone : voice-type, sir-john-falstaff : character ) has-voice( baritone : voice-type, sonora : character ) has-voice( baritone : voice-type, stankar : character ) has-voice( baritone : voice-type, tamar : character ) has-voice( baritone : voice-type, tartaglia : character ) has-voice( baritone : voice-type, thomas-wintz : character ) has-voice( baritone : voice-type, tonio : character ) has-voice( baritone : voice-type, torias : character ) has-voice( baritone : voice-type, uberto : character ) has-voice( baritone : voice-type, uin-sci : character ) has-voice( baritone : voice-type, ulmo : character ) has-voice( baritone : voice-type, un-cerimoniere : character ) has-voice( baritone : voice-type, un-impiegato-della-stazione : character ) has-voice( baritone : voice-type, un-vecchio-pastore : character ) has-voice( baritone : voice-type, vernier : character ) has-voice( baritone : voice-type, vincinio : character ) has-voice( baritone : voice-type, yamadori : character ) has-voice( baritone : voice-type, yansky-varhely : character ) has-voice( bass : voice-type, acciano : character ) has-voice( bass : voice-type, adhemar-de-montheil : character ) has-voice( bass : voice-type, alcalde : character ) has-voice( bass : voice-type, alcindoro : character ) has-voice( bass : voice-type, aldobrandino-dei-rangoni : character ) has-voice( bass : voice-type, alvaro : character ) has-voice( bass : voice-type, angelotti : character ) has-voice( bass : voice-type, antonio : character ) has-voice( bass : voice-type, aquilante-dei-bardi : character ) has-voice( bass : voice-type, aricia : character ) has-voice( bass : voice-type, arturo : character ) has-voice( bass : voice-type, ashby : character ) has-voice( bass : voice-type, ataliba : character ) has-voice( bass : voice-type, attila-c : character ) has-voice( bass : voice-type, aubrey-da-venne : character ) has-voice( bass : voice-type, babilio : character ) has-voice( bass : voice-type, badoero : character ) has-voice( bass : voice-type, banco : character ) has-voice( bass : voice-type, barbarossa : character ) has-voice( bass : voice-type, barbemuche : character ) has-voice( bass : voice-type, barone-di-kelbar : character ) has-voice( bass : voice-type, bartholomaus-schumm : character ) has-voice( bass : voice-type, benoit : character ) has-voice( bass : voice-type, bethune : character ) has-voice( bass : voice-type, betto : character ) has-voice( bass : voice-type, bonze : character ) has-voice( bass : voice-type, briano : character ) has-voice( bass : voice-type, brichanteau : character ) has-voice( bass : voice-type, calatrava : character ) has-voice( bass : voice-type, cancelliere-di-ragusa : character ) has-voice( bass : voice-type, captain : character ) has-voice( bass : voice-type, captain2 : character ) has-voice( bass : voice-type, captain3 : character ) has-voice( bass : voice-type, castro : character ) has-voice( bass : voice-type, clivio-rufo : character ) has-voice( bass : voice-type, colline : character ) / la-boheme has-voice( bass : voice-type, colombano2 : character ) has-voice( bass : voice-type, commissioner : character ) has-voice( bass : voice-type, conte : character ) has-voice( bass : voice-type, conte-aldovrandi : character ) has-voice( bass : voice-type, count-ceprano : character ) has-voice( bass : voice-type, count-monterone : character ) has-voice( bass : voice-type, count-walter : character ) has-voice( bass : voice-type, courtois : character ) has-voice( bass : voice-type, court-usher : character ) has-voice( bass : voice-type, crebillon : character ) has-voice( bass : voice-type, crocifero : character ) has-voice( bass : voice-type, customs-official : character ) has-voice( bass : voice-type, delmonte : character ) has-voice( bass : voice-type, distant-voices : character ) has-voice( bass : voice-type, doctor : character ) has-voice( bass : voice-type, doctor-grenvil : character ) has-voice( bass : voice-type, don-roldano-ximenes : character ) has-voice( bass : voice-type, don-ruy-gomez-de-silva : character ) has-voice( bass : voice-type, don-salvatore : character ) has-voice( bass : voice-type, due-contadini : character ) has-voice( bass : voice-type, durvasas : character ) has-voice( bass : voice-type, emir-of-ramla : character ) has-voice( bass : voice-type, eulogio : character ) has-voice( bass : voice-type, fante : character ) has-voice( bass : voice-type, ferrando : character ) has-voice( bass : voice-type, first-consul : character ) has-voice( bass : voice-type, flemish-deputies : character ) has-voice( bass : voice-type, floras-servant : character ) has-voice( bass : voice-type, francesco-pazzi : character ) has-voice( bass : voice-type, frank : character ) has-voice( bass : voice-type, gaoler : character ) has-voice( bass : voice-type, geronte : character ) has-voice( bass : voice-type, giacomo-rantzau : character ) has-voice( bass : voice-type, giovanni : character ) has-voice( bass : voice-type, giovanni-da-procida : character ) has-voice( bass : voice-type, giovanni-filippo-palm : character ) has-voice( bass : voice-type, giove : character ) has-voice( bass : voice-type, goaler : character ) has-voice( bass : voice-type, governor : character ) has-voice( bass : voice-type, grand-inquisitor : character ) has-voice( bass : voice-type, grech : character ) has-voice( bass : voice-type, gualterio : character ) has-voice( bass : voice-type, guardiano : character ) has-voice( bass : voice-type, guccio : character ) has-voice( bass : voice-type, hanezo : character ) has-voice( bass : voice-type, herald : character ) has-voice( bass : voice-type, herald3 : character ) has-voice( bass : voice-type, herald4 : character ) has-voice( bass : voice-type, high-priest-of-baal : character ) has-voice( bass : voice-type, hu-tsin : character ) has-voice( bass : voice-type, ienne-delleta : character ) has-voice( bass : voice-type, il-barone-di-waldek : character ) has-voice( bass : voice-type, il-calandra : character ) has-voice( bass : voice-type, il-capo-della-polizia : character ) has-voice( bass : voice-type, il-capo-della-polizia2 : character ) has-voice( bass : voice-type, il-capo-guardiano : character ) has-voice( bass : voice-type, il-cieco : character ) has-voice( bass : voice-type, il-commissario : character ) has-voice( bass : voice-type, il-conte-di-leitmeritz : character ) has-voice( bass : voice-type, il-giullare : character ) has-voice( bass : voice-type, il-ladro : character ) has-voice( bass : voice-type, il-mugnaio : character ) has-voice( bass : voice-type, il-portatore-di-ordini : character ) has-voice( bass : voice-type, il-signor-di-laffemas : character ) has-voice( bass : voice-type, il-tornaquinci : character ) has-voice( bass : voice-type, il-vescovo : character ) has-voice( bass : voice-type, innkeeper : character ) has-voice( bass : voice-type, inquisitors : character ) has-voice( bass : voice-type, inspector : character ) has-voice( bass : voice-type, jackrabbit : character ) has-voice( bass : voice-type, jacopo-fiesco : character ) has-voice( bass : voice-type, jacopo-loredano : character ) has-voice( bass : voice-type, jago : character ) has-voice( bass : voice-type, john : character ) has-voice( bass : voice-type, john-clark : character ) has-voice( bass : voice-type, jorg : character ) has-voice( bass : voice-type, kanva : character ) has-voice( bass : voice-type, king-of-egypt : character ) has-voice( bass : voice-type, konrad-von-knipprode : character ) has-voice( bass : voice-type, kritzloff : character ) has-voice( bass : voice-type, kurfurst-friedrich : character ) has-voice( bass : voice-type, labdaco : character ) has-voice( bass : voice-type, larkens : character ) has-voice( bass : voice-type, la-rocca : character ) has-voice( bass : voice-type, lartigon : character ) has-voice( bass : voice-type, la-spia : character ) has-voice( bass : voice-type, la-tigre : character ) has-voice( bass : voice-type, la-voce-di-un-banditore : character ) has-voice( bass : voice-type, le-cuisinier : character ) has-voice( bass : voice-type, leone : character ) has-voice( bass : voice-type, lindovino : character ) has-voice( bass : voice-type, lodovico : character ) has-voice( bass : voice-type, lorco : character ) has-voice( bass : voice-type, loste : character ) has-voice( bass : voice-type, luigi-adolfo-guglielmo-lutzow : character ) has-voice( bass : voice-type, macgregor : character ) has-voice( bass : voice-type, macrone-massimo : character ) has-voice( bass : voice-type, majordome : character ) has-voice( bass : voice-type, marchese-dobigny : character ) has-voice( bass : voice-type, margrave-of-biberich : character ) has-voice( bass : voice-type, marguerite : character ) has-voice( bass : voice-type, maso : character ) has-voice( bass : voice-type, massimiliano : character ) has-voice( bass : voice-type, mayor-of-como : character ) has-voice( bass : voice-type, mefistofele-c : character ) has-voice( bass : voice-type, melitone : character ) has-voice( bass : voice-type, messer-cornelius : character ) has-voice( bass : voice-type, montano : character ) has-voice( bass : voice-type, moser : character ) has-voice( bass : voice-type, mucrone : character ) has-voice( bass : voice-type, murderer : character ) has-voice( bass : voice-type, neri : character ) has-voice( bass : voice-type, oberto-c : character ) has-voice( bass : voice-type, old-gypsy : character ) has-voice( bass : voice-type, old-monk : character ) has-voice( bass : voice-type, pagano : character ) has-voice( bass : voice-type, pantalone-de-bisognosi : character ) has-voice( bass : voice-type, paolo-albiani : character ) has-voice( bass : voice-type, parvolo-patacca : character ) has-voice( bass : voice-type, pere-camoine : character ) has-voice( bass : voice-type, peters : character ) has-voice( bass : voice-type, petronio : character ) has-voice( bass : voice-type, philip-ii : character ) has-voice( bass : voice-type, pilot : character ) has-voice( bass : voice-type, pinelli : character ) has-voice( bass : voice-type, pirro : character ) has-voice( bass : voice-type, pistola : character ) has-voice( bass : voice-type, prince-de-bouillon : character ) has-voice( bass : voice-type, quinault : character ) has-voice( bass : voice-type, ramfis : character ) has-voice( bass : voice-type, re-di-bramante : character ) has-voice( bass : voice-type, roberto : character ) has-voice( bass : voice-type, robin2 : character ) has-voice( bass : voice-type, roger : character ) has-voice( bass : voice-type, romal : character ) has-voice( bass : voice-type, roucher : character ) has-voice( bass : voice-type, samuel : character ) has-voice( bass : voice-type, sciarrone : character ) has-voice( bass : voice-type, second-consul : character ) has-voice( bass : voice-type, sergeant : character ) has-voice( bass : voice-type, servant-of-macbeth : character ) has-voice( bass : voice-type, servant-of-the-doge : character ) has-voice( bass : voice-type, silvano2 : character ) has-voice( bass : voice-type, simone : character ) has-voice( bass : voice-type, singer-c : character ) has-voice( bass : voice-type, skirner : character ) has-voice( bass : voice-type, soldier : character ) has-voice( bass : voice-type, sparafucile : character ) has-voice( bass : voice-type, spinelloccio : character ) has-voice( bass : voice-type, stapps : character ) has-voice( bass : voice-type, stromminger : character ) has-voice( bass : voice-type, surgeon : character ) has-voice( bass : voice-type, talbot : character ) has-voice( bass : voice-type, talpa : character ) has-voice( bass : voice-type, tigellino : character ) has-voice( bass : voice-type, timur : character ) has-voice( bass : voice-type, tiresia : character ) has-voice( bass : voice-type, tom : character ) has-voice( bass : voice-type, tom2 : character ) has-voice( bass : voice-type, un-vegliard : character ) has-voice( bass : voice-type, vaudemont : character ) has-voice( bass : voice-type, villagers : character ) has-voice( bass : voice-type, walinoff : character ) has-voice( bass : voice-type, wurm : character ) has-voice( bass : voice-type, yakuside : character ) has-voice( bass : voice-type, zaccaria : character ) has-voice( bass : voice-type, zuane : character ) has-voice( bass-baritone : voice-type, anetiello : character ) has-voice( bass-baritone : voice-type, duclou : character ) has-voice( bass-baritone : voice-type, hans-ferbit : character ) has-voice( bass-baritone : voice-type, il-re-di-napoli : character ) has-voice( bass-baritone : voice-type, le-bret : character ) has-voice( bass-baritone : voice-type, lorenzo-di-medici : character ) has-voice( bass-baritone : voice-type, marco4 : character ) has-voice( bass-baritone : voice-type, melchior-schumm : character ) has-voice( bass-baritone : voice-type, perichaud : character ) has-voice( bass-baritone : voice-type, rogueneau : character ) has-voice( bass-baritone : voice-type, sandor-zilah : character ) has-voice( contralto : voice-type, altichiara : character ) has-voice( contralto : voice-type, anna4 : character ) has-voice( contralto : voice-type, calpurnia : character ) has-voice( contralto : voice-type, cerinto : character ) has-voice( contralto : voice-type, dimitri : character ) has-voice( contralto : voice-type, federica : character ) has-voice( contralto : voice-type, gherardino : character ) has-voice( contralto : voice-type, hua-qui : character ) has-voice( contralto : voice-type, la-cieca : character ) has-voice( contralto : voice-type, la-gobba : character ) has-voice( contralto : voice-type, la-korableva : character ) has-voice( contralto : voice-type, la-pazzo : character ) has-voice( contralto : voice-type, lilla : character ) has-voice( contralto : voice-type, lucia : character ) has-voice( contralto : voice-type, maddalena : character ) has-voice( contralto : voice-type, ninetta : character ) has-voice( contralto : voice-type, savoyard : character ) has-voice( contralto : voice-type, shepherd-boy : character ) has-voice( contralto : voice-type, smaragdi : character ) has-voice( contralto : voice-type, ulrica : character ) has-voice( contralto : voice-type, una-donna : character ) has-voice( contralto : voice-type, una-vecchia-serva : character ) has-voice( contralto : voice-type, un-giovanetto : character ) has-voice( contralto : voice-type, zia : character ) has-voice( contralto : voice-type, zita : character ) has-voice( mezzo : voice-type, abbess : character ) has-voice( mezzo : voice-type, adonella : character ) has-voice( mezzo : voice-type, afra : character ) has-voice( mezzo : voice-type, amalia2 : character ) has-voice( mezzo : voice-type, amalia3 : character ) has-voice( mezzo : voice-type, amelias-servant : character ) has-voice( mezzo : voice-type, amneris : character ) has-voice( mezzo : voice-type, anacoana : character ) has-voice( mezzo : voice-type, anaide : character ) has-voice( mezzo : voice-type, azucena : character ) has-voice( mezzo : voice-type, balda : character ) has-voice( mezzo : voice-type, beppe-s : character ) has-voice( mezzo : voice-type, bersi : character ) has-voice( mezzo : voice-type, biancofiore : character ) has-voice( mezzo : voice-type, candia-della-leonessa : character ) has-voice( mezzo : voice-type, cintia : character ) has-voice( mezzo : voice-type, circe : character ) has-voice( mezzo : voice-type, coigny : character ) has-voice( mezzo : voice-type, countess-ceprano : character ) has-voice( mezzo : voice-type, cuniza : character ) has-voice( mezzo : voice-type, curra : character ) has-voice( mezzo : voice-type, dariola : character ) has-voice( mezzo : voice-type, dolcina : character ) has-voice( mezzo : voice-type, dorotea : character ) has-voice( mezzo : voice-type, elena2 : character ) has-voice( mezzo : voice-type, emilia : character ) has-voice( mezzo : voice-type, ermyntrude : character ) has-voice( mezzo : voice-type, eufemia : character ) has-voice( mezzo : voice-type, eva-schumm : character ) has-voice( mezzo : voice-type, faraone-xiii : character ) has-voice( mezzo : voice-type, favetta : character ) has-voice( mezzo : voice-type, fenitchka : character ) has-voice( mezzo : voice-type, fiorenzo : character ) has-voice( mezzo : voice-type, flora-bervoix : character ) has-voice( mezzo : voice-type, frugola : character ) has-voice( mezzo : voice-type, gertrud : character ) has-voice( mezzo : voice-type, giglietta : character ) has-voice( mezzo : voice-type, gina-c : character ) has-voice( mezzo : voice-type, hedvige : character ) has-voice( mezzo : voice-type, imelda : character ) has-voice( mezzo : voice-type, imelda2 : character ) has-voice( mezzo : voice-type, jane : character ) has-voice( mezzo : voice-type, kate-pinkerton : character ) has-voice( mezzo : voice-type, la-ciesca : character ) has-voice( mezzo : voice-type, la-duegne : character ) has-voice( mezzo : voice-type, lady-in-waiting-to-lady-macbeth : character ) has-voice( mezzo : voice-type, laldomine : character ) has-voice( mezzo : voice-type, la-madre : character ) has-voice( mezzo : voice-type, la-mamma : character ) has-voice( mezzo : voice-type, la-moglie-del-faraone : character ) has-voice( mezzo : voice-type, la-moglie-del-mugnaio : character ) has-voice( mezzo : voice-type, la-principessa : character ) has-voice( mezzo : voice-type, laquila2 : character ) has-voice( mezzo : voice-type, la-rossa2 : character ) has-voice( mezzo : voice-type, lastrologa : character ) has-voice( mezzo : voice-type, laura : character ) has-voice( mezzo : voice-type, laura2 : character ) has-voice( mezzo : voice-type, la-verde : character ) has-voice( mezzo : voice-type, lelio : character ) has-voice( mezzo : voice-type, lene-armuth : character ) has-voice( mezzo : voice-type, lidoria : character ) has-voice( mezzo : voice-type, lola : character ) has-voice( mezzo : voice-type, loretta : character ) has-voice( mezzo : voice-type, madelon : character ) has-voice( mezzo : voice-type, madre-di-simonetta : character ) has-voice( mezzo : voice-type, margherita2 : character ) has-voice( mezzo : voice-type, marta : character ) has-voice( mezzo : voice-type, meg-page : character ) has-voice( mezzo : voice-type, mistress-of-novices : character ) has-voice( mezzo : voice-type, mistress-quickly : character ) has-voice( mezzo : voice-type, mlle-dangeville : character ) has-voice( mezzo : voice-type, monitor : character ) has-voice( mezzo : voice-type, musetta : character ) / la-boheme2 has-voice( mezzo : voice-type, nikona : character ) has-voice( mezzo : voice-type, page : character ) has-voice( mezzo : voice-type, palmira : character ) has-voice( mezzo : voice-type, pantalis : character ) has-voice( mezzo : voice-type, preziosilla : character ) has-voice( mezzo : voice-type, princess-de-bouillon : character ) has-voice( mezzo : voice-type, princess-eboli : character ) has-voice( mezzo : voice-type, priyamvada : character ) has-voice( mezzo : voice-type, rosa : character ) has-voice( mezzo : voice-type, rubria : character ) has-voice( mezzo : voice-type, singer-c2 : character ) has-voice( mezzo : voice-type, soeur-marthe : character ) has-voice( mezzo : voice-type, sofia-ivanovna : character ) has-voice( mezzo : voice-type, stella : character ) has-voice( mezzo : voice-type, suor-celeste : character ) has-voice( mezzo : voice-type, suor-pazienza : character ) has-voice( mezzo : voice-type, suor-zelatrice : character ) has-voice( mezzo : voice-type, suzuki : character ) has-voice( mezzo : voice-type, suzy : character ) has-voice( mezzo : voice-type, tigrana : character ) has-voice( mezzo : voice-type, una-conversa-2 : character ) has-voice( mezzo : voice-type, una-novizia : character ) has-voice( mezzo : voice-type, vera2 : character ) has-voice( mezzo : voice-type, wowkle : character ) has-voice( mezzo : voice-type, yvette : character ) has-voice( mezzo : voice-type, zanetto-c : character ) has-voice( mezzo : voice-type, zuma : character ) has-voice( silent-voice : voice-type, anselmo : character ) has-voice( silent-voice : voice-type, antigone : character ) has-voice( silent-voice : voice-type, countess-of-aremberg : character ) has-voice( silent-voice : voice-type, duncan : character ) has-voice( silent-voice : voice-type, executioner : character ) has-voice( silent-voice : voice-type, fleanzio : character ) has-voice( silent-voice : voice-type, fords-page : character ) has-voice( silent-voice : voice-type, ghost-of-banco : character ) has-voice( silent-voice : voice-type, hecate : character ) has-voice( silent-voice : voice-type, hu-ci : character ) has-voice( silent-voice : voice-type, ismene : character ) has-voice( silent-voice : voice-type, lazinski : character ) has-voice( silent-voice : voice-type, mine-host-at-the-garter : character ) has-voice( silent-voice : voice-type, robin : character ) has-voice( soprano : voice-type, abigaille : character ) has-voice( soprano : voice-type, adriana : character ) has-voice( soprano : voice-type, ah-joe : character ) has-voice( soprano : voice-type, aida-c : character ) has-voice( soprano : voice-type, alice-ford : character ) has-voice( soprano : voice-type, alms-collector : character ) has-voice( soprano : voice-type, alzira-c : character ) has-voice( soprano : voice-type, amalia : character ) has-voice( soprano : voice-type, amelia : character ) has-voice( soprano : voice-type, amica-c : character ) has-voice( soprano : voice-type, angelica : character ) has-voice( soprano : voice-type, anna : character ) has-voice( soprano : voice-type, anna2 : character ) has-voice( soprano : voice-type, anna3 : character ) has-voice( soprano : voice-type, annina : character ) has-voice( soprano : voice-type, anusuya : character ) has-voice( soprano : voice-type, argelia : character ) has-voice( soprano : voice-type, asteria : character ) has-voice( soprano : voice-type, atte : character ) has-voice( soprano : voice-type, bianca-c : character ) has-voice( soprano : voice-type, butterfly : character ) has-voice( soprano : voice-type, carmela : character ) has-voice( soprano : voice-type, catarina : character ) has-voice( soprano : voice-type, caterina : character ) has-voice( soprano : voice-type, claretta : character ) has-voice( soprano : voice-type, cloto : character ) has-voice( soprano : voice-type, colombina : character ) has-voice( soprano : voice-type, cristina : character ) has-voice( soprano : voice-type, cristina2 : character ) has-voice( soprano : voice-type, dejanice-c : character ) has-voice( soprano : voice-type, desdemona : character ) has-voice( soprano : voice-type, dhia : character ) has-voice( soprano : voice-type, don-fabiano : character ) has-voice( soprano : voice-type, duchess-elena : character ) has-voice( soprano : voice-type, edmea-c : character ) has-voice( soprano : voice-type, egloge : character ) has-voice( soprano : voice-type, elena : character ) has-voice( soprano : voice-type, elisabeth-de-valois : character ) has-voice( soprano : voice-type, elsbeth-ratenow : character ) has-voice( soprano : voice-type, elvira : character ) has-voice( soprano : voice-type, ermyngarde : character ) has-voice( soprano : voice-type, fedia : character ) has-voice( soprano : voice-type, fedora-c : character ) has-voice( soprano : voice-type, fenena : character ) has-voice( soprano : voice-type, fiammetta : character ) has-voice( soprano : voice-type, fidelia : character ) has-voice( soprano : voice-type, fiorella : character ) has-voice( soprano : voice-type, fioretta-di-gori : character ) has-voice( soprano : voice-type, fleana : character ) has-voice( soprano : voice-type, floriana : character ) has-voice( soprano : voice-type, francesca : character ) has-voice( soprano : voice-type, freddie : character ) has-voice( soprano : voice-type, garsenda : character ) has-voice( soprano : voice-type, genovieffa : character ) has-voice( soprano : voice-type, gilda : character ) has-voice( soprano : voice-type, ginevra : character ) has-voice( soprano : voice-type, giocasta : character ) has-voice( soprano : voice-type, gioconda : character ) has-voice( soprano : voice-type, giorgetta : character ) has-voice( soprano : voice-type, giovanna : character ) has-voice( soprano : voice-type, giovanna2 : character ) has-voice( soprano : voice-type, giovanna3 : character ) has-voice( soprano : voice-type, girl : character ) has-voice( soprano : voice-type, giselda : character ) has-voice( soprano : voice-type, giulia : character ) has-voice( soprano : voice-type, giulietta-di-kelbar : character ) has-voice( soprano : voice-type, gloria-c : character ) has-voice( soprano : voice-type, gulnara : character ) has-voice( soprano : voice-type, helene : character ) has-voice( soprano : voice-type, high-priestess : character ) has-voice( soprano : voice-type, ines : character ) has-voice( soprano : voice-type, innamorata : character ) has-voice( soprano : voice-type, iris-c : character ) has-voice( soprano : voice-type, isabeau-c : character ) has-voice( soprano : voice-type, isabella-daragona : character ) has-voice( soprano : voice-type, isaure : character ) has-voice( soprano : voice-type, jebbel : character ) has-voice( soprano : voice-type, jenny-clark : character ) has-voice( soprano : voice-type, katiusha : character ) has-voice( soprano : voice-type, la-contessa : character ) has-voice( soprano : voice-type, la-cugina : character ) has-voice( soprano : voice-type, lady-macbeth : character ) has-voice( soprano : voice-type, lalage : character ) has-voice( soprano : voice-type, la-rossa : character ) has-voice( soprano : voice-type, la-senese : character ) has-voice( soprano : voice-type, la-signora-dufresne : character ) has-voice( soprano : voice-type, lauretta : character ) has-voice( soprano : voice-type, la-vanard : character ) has-voice( soprano : voice-type, la-zia : character ) has-voice( soprano : voice-type, leonora : character ) has-voice( soprano : voice-type, leonora2 : character ) has-voice( soprano : voice-type, leonora3 : character ) has-voice( soprano : voice-type, lida : character ) has-voice( soprano : voice-type, lina : character ) has-voice( soprano : voice-type, lisabetta : character ) has-voice( soprano : voice-type, lise : character ) has-voice( soprano : voice-type, lisette : character ) has-voice( soprano : voice-type, liu : character ) has-voice( soprano : voice-type, lodoletta-c : character ) has-voice( soprano : voice-type, loreley-c : character ) has-voice( soprano : voice-type, louisson : character ) has-voice( soprano : voice-type, lucrezia-contarini : character ) has-voice( soprano : voice-type, luisa : character ) has-voice( soprano : voice-type, luisa2 : character ) has-voice( soprano : voice-type, madame-de-bulow : character ) has-voice( soprano : voice-type, maddalena-di-coigny : character ) has-voice( soprano : voice-type, madonna-imperia-c : character ) has-voice( soprano : voice-type, magda : character ) has-voice( soprano : voice-type, magdelone : character ) has-voice( soprano : voice-type, manon : character ) has-voice( soprano : voice-type, marcella-c : character ) has-voice( soprano : voice-type, marchesa-del-poggio : character ) has-voice( soprano : voice-type, margherita : character ) has-voice( soprano : voice-type, maria : character ) has-voice( soprano : voice-type, maria2 : character ) has-voice( soprano : voice-type, maria-boccanegra : character ) has-voice( soprano : voice-type, maria-macgregor : character ) has-voice( soprano : voice-type, mariella : character ) has-voice( soprano : voice-type, marion-delorme-c : character ) has-voice( soprano : voice-type, marsa-laszlo : character ) has-voice( soprano : voice-type, matilde : character ) has-voice( soprano : voice-type, matrena : character ) has-voice( soprano : voice-type, maud : character ) has-voice( soprano : voice-type, medora : character ) has-voice( soprano : voice-type, mila-di-corda : character ) has-voice( soprano : voice-type, mimi : character ) has-voice( soprano : voice-type, mina : character ) has-voice( soprano : voice-type, minnie : character ) has-voice( soprano : voice-type, miss-lucy-da-venne : character ) has-voice( soprano : voice-type, mlle-jouvenot : character ) has-voice( soprano : voice-type, musetta : character ) / la-boheme has-voice( soprano : voice-type, nannetta : character ) has-voice( soprano : voice-type, natalia : character ) has-voice( soprano : voice-type, nedda : character ) has-voice( soprano : voice-type, nefta : character ) has-voice( soprano : voice-type, nella : character ) has-voice( soprano : voice-type, nora : character ) has-voice( soprano : voice-type, odabella : character ) has-voice( soprano : voice-type, olga : character ) has-voice( soprano : voice-type, ornella : character ) has-voice( soprano : voice-type, orsetta : character ) has-voice( soprano : voice-type, oscar : character ) has-voice( soprano : voice-type, osmina : character ) has-voice( soprano : voice-type, parisina-malatesta : character ) has-voice( soprano : voice-type, perside : character ) has-voice( soprano : voice-type, piccolo-henry : character ) has-voice( soprano : voice-type, pinotta-c : character ) has-voice( soprano : voice-type, pisana : character ) has-voice( soprano : voice-type, princess-elisa : character ) has-voice( soprano : voice-type, queen-carolina : character ) has-voice( soprano : voice-type, ricke : character ) has-voice( soprano : voice-type, rosalina : character ) has-voice( soprano : voice-type, rosa-mammai : character ) has-voice( soprano : voice-type, rosaura : character ) has-voice( soprano : voice-type, roxane : character ) has-voice( soprano : voice-type, sakuntala : character ) has-voice( soprano : voice-type, samaritana : character ) has-voice( soprano : voice-type, santuzza : character ) has-voice( soprano : voice-type, scilla : character ) has-voice( soprano : voice-type, si-c : character ) has-voice( soprano : voice-type, silvia : character ) has-voice( soprano : voice-type, simonetta-cattanei : character ) has-voice( soprano : voice-type, sofia : character ) has-voice( soprano : voice-type, sorella-cercatrice-1 : character ) has-voice( soprano : voice-type, sorella-cercatrice-2 : character ) has-voice( soprano : voice-type, sperenza : character ) has-voice( soprano : voice-type, stephana : character ) has-voice( soprano : voice-type, suor-agnese : character ) has-voice( soprano : voice-type, suor-cristina : character ) has-voice( soprano : voice-type, suor-maria : character ) has-voice( soprano : voice-type, susetta : character ) has-voice( soprano : voice-type, suzel : character ) has-voice( soprano : voice-type, thibault : character ) has-voice( soprano : voice-type, tilda : character ) has-voice( soprano : voice-type, toniotta : character ) has-voice( soprano : voice-type, tosca-c : character ) has-voice( soprano : voice-type, turandot-c : character ) has-voice( soprano : voice-type, una-conversa-1 : character ) has-voice( soprano : voice-type, une-soeur : character ) has-voice( soprano : voice-type, vanna-aldovrandi : character ) has-voice( soprano : voice-type, vannina-dalano : character ) has-voice( soprano : voice-type, vera : character ) has-voice( soprano : voice-type, viclinda : character ) has-voice( soprano : voice-type, violetta-valery : character ) has-voice( soprano : voice-type, vivette : character ) has-voice( soprano : voice-type, voice-from-heaven : character ) has-voice( soprano : voice-type, wally : character ) has-voice( soprano : voice-type, walter : character ) has-voice( soprano : voice-type, willie : character ) has-voice( soprano : voice-type, yvette : character ) has-voice( soprano : voice-type, zaza-c : character ) has-voice( soprano : voice-type, zohra : character ) has-voice( spoken-voice : voice-type, giocadio : character ) has-voice( spoken-voice : voice-type, lidia : character ) has-voice( spoken-voice : voice-type, toto : character ) has-voice( spoken-voice : voice-type, un-cosacco : character ) has-voice( spoken-voice : voice-type, vulcano : character ) has-voice( tenor : voice-type, abbe : character ) has-voice( tenor : voice-type, abbe-of-chazeuil : character ) has-voice( tenor : voice-type, abdallo : character ) has-voice( tenor : voice-type, admeto : character ) has-voice( tenor : voice-type, alexis : character ) has-voice( tenor : voice-type, alfredo-germont : character ) has-voice( tenor : voice-type, aligi : character ) has-voice( tenor : voice-type, amelias-servant2 : character ) has-voice( tenor : voice-type, andras-zilah : character ) has-voice( tenor : voice-type, aribobolo : character ) has-voice( tenor : voice-type, arlecchino-battocchio : character ) has-voice( tenor : voice-type, arminio : character ) has-voice( tenor : voice-type, aroldo-c : character ) has-voice( tenor : voice-type, arrigo : character ) has-voice( tenor : voice-type, arrigo2 : character ) has-voice( tenor : voice-type, arrigos-squire : character ) has-voice( tenor : voice-type, arvino : character ) has-voice( tenor : voice-type, asrael-c : character ) has-voice( tenor : voice-type, augusto : character ) has-voice( tenor : voice-type, ausrufer-des-rates : character ) has-voice( tenor : voice-type, bajazzo : character ) has-voice( tenor : voice-type, baldo : character ) has-voice( tenor : voice-type, barbarigo : character ) has-voice( tenor : voice-type, bardolfo : character ) has-voice( tenor : voice-type, barthelemy : character ) has-voice( tenor : voice-type, beppe : character ) has-voice( tenor : voice-type, black-eunuch : character ) has-voice( tenor : voice-type, borsa : character ) has-voice( tenor : voice-type, brighella : character ) has-voice( tenor : voice-type, calaf : character ) has-voice( tenor : voice-type, canio : character ) has-voice( tenor : voice-type, cantore-interna : character ) has-voice( tenor : voice-type, captain-of-the-crossbowmen : character ) has-voice( tenor : voice-type, carlo : character ) has-voice( tenor : voice-type, carlo-teodoro-korner : character ) has-voice( tenor : voice-type, carlo-vii : character ) has-voice( tenor : voice-type, cassio : character ) has-voice( tenor : voice-type, cavaradossi : character ) has-voice( tenor : voice-type, chenier : character ) has-voice( tenor : voice-type, christian : character ) has-voice( tenor : voice-type, civile-baruch : character ) has-voice( tenor : voice-type, claudio-cesare-nerone : character ) has-voice( tenor : voice-type, cleo-de-merode : character ) has-voice( tenor : voice-type, colombello : character ) has-voice( tenor : voice-type, corrado : character ) has-voice( tenor : voice-type, cossack : character ) has-voice( tenor : voice-type, count-of-lerma : character ) has-voice( tenor : voice-type, creonte : character ) has-voice( tenor : voice-type, cyrano : character ) has-voice( tenor : voice-type, dancing-master : character ) has-voice( tenor : voice-type, dandria : character ) has-voice( tenor : voice-type, danieli : character ) has-voice( tenor : voice-type, delil : character ) has-voice( tenor : voice-type, des-grieux : character ) has-voice( tenor : voice-type, desire : character ) has-voice( tenor : voice-type, despereaux : character ) has-voice( tenor : voice-type, dick : character ) has-voice( tenor : voice-type, didier : character ) has-voice( tenor : voice-type, dimitri-nekludoff : character ) has-voice( tenor : voice-type, distant-voices : character ) has-voice( tenor : voice-type, don-alvaro-c : character ) has-voice( tenor : voice-type, don-carlos-c : character ) has-voice( tenor : voice-type, don-fernan-guevara : character ) has-voice( tenor : voice-type, don-giovanni-de-manara : character ) has-voice( tenor : voice-type, don-riccardo : character ) has-voice( tenor : voice-type, dottor-antonio : character ) has-voice( tenor : voice-type, dr-caius : character ) has-voice( tenor : voice-type, duke-of-mantua : character ) has-voice( tenor : voice-type, durand : character ) has-voice( tenor : voice-type, edgar-c : character ) has-voice( tenor : voice-type, edmondo : character ) has-voice( tenor : voice-type, edoardo-di-sanval : character ) has-voice( tenor : voice-type, emperor-altoum : character ) has-voice( tenor : voice-type, enrico : character ) has-voice( tenor : voice-type, ernani-c : character ) has-voice( tenor : voice-type, faonte : character ) has-voice( tenor : voice-type, faust-c : character ) has-voice( tenor : voice-type, federico : character ) has-voice( tenor : voice-type, federico2 : character ) has-voice( tenor : voice-type, federico-di-frengel : character ) has-voice( tenor : voice-type, federico-loewe : character ) has-voice( tenor : voice-type, fenton : character ) has-voice( tenor : voice-type, filippo-mala : character ) has-voice( tenor : voice-type, flammen : character ) has-voice( tenor : voice-type, florindo : character ) has-voice( tenor : voice-type, folco : character ) has-voice( tenor : voice-type, foresto : character ) has-voice( tenor : voice-type, fritz : character ) has-voice( tenor : voice-type, fritz2 : character ) has-voice( tenor : voice-type, gabriele-adorno : character ) has-voice( tenor : voice-type, gabriello-chiaramantesi : character ) has-voice( tenor : voice-type, gaston : character ) has-voice( tenor : voice-type, gastone : character ) has-voice( tenor : voice-type, gaudenzio : character ) has-voice( tenor : voice-type, gherardo : character ) has-voice( tenor : voice-type, giannetto-malaspini : character ) has-voice( tenor : voice-type, gilfredo-dei-vaschi : character ) has-voice( tenor : voice-type, giorgio : character ) has-voice( tenor : voice-type, giorgio2 : character ) has-voice( tenor : voice-type, giorgio4 : character ) has-voice( tenor : voice-type, giulia2 : character ) has-voice( tenor : voice-type, giuliano-di-medici : character ) has-voice( tenor : voice-type, giulio : character ) has-voice( tenor : voice-type, giuseppe : character ) has-voice( tenor : voice-type, glauco-c : character ) has-voice( tenor : voice-type, gobin : character ) has-voice( tenor : voice-type, gobrias : character ) has-voice( tenor : voice-type, godvino : character ) has-voice( tenor : voice-type, goro : character ) has-voice( tenor : voice-type, grimaldo : character ) has-voice( tenor : voice-type, guglielmo-ratcliff-c : character ) has-voice( tenor : voice-type, hagenbach : character ) has-voice( tenor : voice-type, harry : character ) has-voice( tenor : voice-type, henning-mollner : character ) has-voice( tenor : voice-type, herald2 : character ) has-voice( tenor : voice-type, icelo : character ) has-voice( tenor : voice-type, il-balestiere : character ) has-voice( tenor : voice-type, il-piccolo-marat-c : character ) has-voice( tenor : voice-type, il-portalettere : character ) has-voice( tenor : voice-type, il-prete : character ) has-voice( tenor : voice-type, il-principe-cristiano : character ) has-voice( tenor : voice-type, il-trinca : character ) has-voice( tenor : voice-type, incredible : character ) has-voice( tenor : voice-type, innamorato : character ) has-voice( tenor : voice-type, isepo : character ) has-voice( tenor : voice-type, ismaele : character ) has-voice( tenor : voice-type, ivan : character ) has-voice( tenor : voice-type, ivrea : character ) has-voice( tenor : voice-type, jacopo-foscari : character ) has-voice( tenor : voice-type, joe : character ) has-voice( tenor : voice-type, johnsen : character ) has-voice( tenor : voice-type, judge : character ) has-voice( tenor : voice-type, king : character ) has-voice( tenor : voice-type, lamplighter : character ) has-voice( tenor : voice-type, lapo : character ) has-voice( tenor : voice-type, lebel : character ) has-voice( tenor : voice-type, lefebvre : character ) has-voice( tenor : voice-type, leonello2 : character ) has-voice( tenor : voice-type, lesley : character ) has-voice( tenor : voice-type, lionetto-de-ricci : character ) has-voice( tenor : voice-type, loris : character ) has-voice( tenor : voice-type, lout : character ) has-voice( tenor : voice-type, luciano : character ) has-voice( tenor : voice-type, luigi : character ) has-voice( tenor : voice-type, macduff : character ) has-voice( tenor : voice-type, malardot : character ) has-voice( tenor : voice-type, malatestino : character ) has-voice( tenor : voice-type, malcolm : character ) has-voice( tenor : voice-type, manfredo : character ) has-voice( tenor : voice-type, man-on-first-floor : character ) has-voice( tenor : voice-type, manrico : character ) has-voice( tenor : voice-type, marcello : character ) / la-boheme2 has-voice( tenor : voice-type, marco2 : character ) has-voice( tenor : voice-type, marcus-pipa : character ) has-voice( tenor : voice-type, mastro-trabuco : character ) has-voice( tenor : voice-type, matheos : character ) has-voice( tenor : voice-type, matthias-blankenfelde : character ) has-voice( tenor : voice-type, maurizio : character ) has-voice( tenor : voice-type, messenger : character ) has-voice( tenor : voice-type, messenger2 : character ) has-voice( tenor : voice-type, milanese-prior : character ) has-voice( tenor : voice-type, milio-dufresne : character ) has-voice( tenor : voice-type, neipperg : character ) has-voice( tenor : voice-type, nereo : character ) has-voice( tenor : voice-type, nerone-c : character ) has-voice( tenor : voice-type, nevio : character ) has-voice( tenor : voice-type, nick : character ) has-voice( tenor : voice-type, oberto2 : character ) has-voice( tenor : voice-type, officer-of-the-council-of-ten : character ) has-voice( tenor : voice-type, officer-of-the-emir : character ) has-voice( tenor : voice-type, oronte : character ) has-voice( tenor : voice-type, osaka : character ) has-voice( tenor : voice-type, otello-c : character ) has-voice( tenor : voice-type, otumbo : character ) has-voice( tenor : voice-type, ovando : character ) has-voice( tenor : voice-type, pang : character ) has-voice( tenor : voice-type, paolo : character ) has-voice( tenor : voice-type, paolo2 : character ) has-voice( tenor : voice-type, parpignol : character ) has-voice( tenor : voice-type, pastore : character ) has-voice( tenor : voice-type, peasant : character ) has-voice( tenor : voice-type, peddler : character ) has-voice( tenor : voice-type, perichaud : character ) has-voice( tenor : voice-type, pinkerton : character ) has-voice( tenor : voice-type, poisson : character ) has-voice( tenor : voice-type, pong : character ) has-voice( tenor : voice-type, pony-express-rider : character ) has-voice( tenor : voice-type, prigioniero : character ) has-voice( tenor : voice-type, prince-of-persia : character ) has-voice( tenor : voice-type, prunier : character ) has-voice( tenor : voice-type, radames : character ) has-voice( tenor : voice-type, radu : character ) has-voice( tenor : voice-type, raffaele-von-leuthold : character ) has-voice( tenor : voice-type, ragpicker : character ) has-voice( tenor : voice-type, raymond : character ) has-voice( tenor : voice-type, riccardo : character ) has-voice( tenor : voice-type, riccardo2 : character ) has-voice( tenor : voice-type, rinuccio : character ) has-voice( tenor : voice-type, roberto-le-villi : character ) has-voice( tenor : voice-type, roderigo : character ) has-voice( tenor : voice-type, rodolfo : character ) has-voice( tenor : voice-type, rodolfo2 : character ) has-voice( tenor : voice-type, rolla : character ) has-voice( tenor : voice-type, rouvel : character ) has-voice( tenor : voice-type, royal-herald : character ) has-voice( tenor : voice-type, ruggero : character ) has-voice( tenor : voice-type, ruiz : character ) has-voice( tenor : voice-type, seid2 : character ) has-voice( tenor : voice-type, selimo : character ) has-voice( tenor : voice-type, sergeant2 : character ) has-voice( tenor : voice-type, sergio : character ) has-voice( tenor : voice-type, ser-toldo : character ) has-voice( tenor : voice-type, servant : character ) has-voice( tenor : voice-type, shepherd : character ) has-voice( tenor : voice-type, silvano-c : character ) has-voice( tenor : voice-type, slave : character ) has-voice( tenor : voice-type, song-pedlar : character ) has-voice( tenor : voice-type, sonora : character ) has-voice( tenor : voice-type, spoletta : character ) has-voice( tenor : voice-type, stiffelio-c : character ) has-voice( tenor : voice-type, studiant : character ) has-voice( tenor : voice-type, taddie : character ) has-voice( tenor : voice-type, tebaldo : character ) has-voice( tenor : voice-type, tinca : character ) has-voice( tenor : voice-type, tommaso-chatterton : character ) has-voice( tenor : voice-type, trin : character ) has-voice( tenor : voice-type, turiddu : character ) has-voice( tenor : voice-type, ugo-deste : character ) has-voice( tenor : voice-type, uin-san-lui : character ) has-voice( tenor : voice-type, uldino : character ) has-voice( tenor : voice-type, un-altro-cerimoniere : character ) has-voice( tenor : voice-type, una-voce : character ) has-voice( tenor : voice-type, una-voce2 : character ) has-voice( tenor : voice-type, un-ufficiale : character ) has-voice( tenor : voice-type, vassili : character ) has-voice( tenor : voice-type, villagers : character ) has-voice( tenor : voice-type, vinaigre : character ) has-voice( tenor : voice-type, vito-amante : character ) has-voice( tenor : voice-type, vito-amante2 : character ) has-voice( tenor : voice-type, wagner : character ) has-voice( tenor : voice-type, walter2 : character ) has-voice( tenor : voice-type, zamoro : character ) /* -- AT: killed-by */ /* fixme: killed-by data not complete */ /* fixme: change to death-of and include all (significant) deaths? */ /* - ALFANO */ /* Miranda */ /* La fonte di Enschir */ /* Risurrezione */ /* Il principe Zilah */ /* I cavalieri e la bella */ /* L'ombra di Don Giovanni */ /* La leggenda di Sakntala */ /* Madonna Imperia */ /* L'ultimo Lord */ /* Cyrano de Bergerac */ /* Don Juan de Manara */ /* Il dottor Antonio */ /* - BOITO */ /* Mefistofele */ /* Nerone (simon, rubria) */ /* - CATALANI */ /* La Falce */ /* Dejanice */ killed-by( dardano : victim, dejanice-c : perpetrator, stabbing : cause-of-death ) killed-by( dejanice-c : victim, dejanice-c : perpetrator, stabbing : cause-of-death ) /* Edmea */ /* Loreley */ killed-by( loreley-c : victim, loreley-c : perpetrator, drowning : cause-of-death ) killed-by( walter2 : victim, walter2 : perpetrator, drowning : cause-of-death ) /* La Wally */ /* - CILEA */ /* Gina */ /* La Tilda */ /* L'Arlesiana */ killed-by( federico2 : victim, federico2 : perpetrator ) /* Adriana Lecouvreur */ killed-by( adriana : victim, princess-de-bouillon : perpetrator, poisoning : cause-of-death ) /* Gloria */ killed-by( lionetto-de-ricci : victim, bardo : perpetrator, stabbing : cause-of-death ) killed-by( gloria-c : victim, gloria-c : perpetrator, stabbing : cause-of-death ) /* Ritorno ad amore */ /* Il matrimonio selvaggio */ /* - FRANCHETTI */ /* Asrael */ /* Zoroastro */ /* Cristoforo colombo */ /* Il fior d'Alpe */ /* Il signor di Pourceaugnac */ /* Germania */ /* Notte di leggenda */ /* La figlia di Joro */ /* Giove a Pompei */ /* Glauco */ /* - GIORDANO */ /* Marina */ /* Mala-vita */ /* Regina Diaz */ /* Andrea Chnier */ /* Fedora */ killed-by( fedora-c : victim, fedora-c : perpetrator, poisoning : cause-of-death ) /* Il voto */ /* Siberia */ /* Marcella */ /* Mese Mariano */ /* Madame Sans-Gne */ /* Giove a Pompei */ /* La cena delle beffe */ killed-by( gabriello-chiaramantesi : victim, neri-chiaramantesi : perpetrator, stabbing : cause-of-death ) /* Il re */ /* - LEONCAVALLO */ /* Pagliacci */ killed-by( nedda : victim, canio : perpetrator, stabbing : cause-of-death ) killed-by( silvio : victim, canio : perpetrator, stabbing : cause-of-death ) /* I Medici */ /* Chatterton */ /* La Bohme */ /* Zaz */ /* Der Roland von Berlin */ /* Mai */ /* Zingari */ /* Goffredo Mameli */ /* Edipo Re */ killed-by( giocasta : victim, giocasta : perpetrator ) /* - LEONI */ /* Raggio di Luna */ /* Rip van Winkle */ /* Ib and Little Christina */ /* L'Oracolo */ /* Tzigana */ /* Francesca da Rimini */ /* Falene */ /* Le Baruffe Chiozotte */ /* La Terra del Sogno */ /* Massemarello */ /* - MASCAGNI */ /* Cavalleria Rusticana */ killed-by( turiddu : victim, alfio : perpetrator, stabbing : cause-of-death ) /* L'amico Fritz */ /* I Rantzau */ /* Guglielmo Ratcliff */ killed-by( guglielmo-ratcliff-c : victim, guglielmo-ratcliff-c : perpetrator, stabbing : cause-of-death ) killed-by( macgregor : victim, guglielmo-ratcliff-c : perpetrator, stabbing : cause-of-death ) killed-by( maria-macgregor : victim, guglielmo-ratcliff-c : perpetrator, stabbing : cause-of-death ) /* Silvano */ killed-by( renzo : victim, silvano-c : perpetrator, shooting : cause-of-death ) /* Zanetto */ /* Iris */ killed-by( iris-c : victim, iris-c : perpetrator, jumping : cause-of-death ) /* Le maschere */ /* Amica */ /* Isabeau */ killed-by( isabeau-c : victim, isabeau-c : perpetrator, stabbing : cause-of-death ) /* Parisina */ /* Lodoletta */ /* S */ /* Il piccolo Marat */ killed-by( lorco : victim, il-carpentiere : perpetrator, battering : cause-of-death ) /* Pinotta */ /* Nerone */ /* - PONCHIELLI */ /* Il sindaco babbeo */ /* I promessi sposi */ /* Bertrando dal Bormio */ /* La savoiarda */ /* Il parlatore eterno */ /* Roderigo, Re dei Goti */ /* La vergine di Kermo */ /* I Lituani */ /* La Gioconda */ killed-by( gioconda : victim, gioconda : perpetrator, stabbing : cause-of-death ) /* Il figliuol prodigo */ /* Marion Delorme */ /* I mori di Valenza */ /* - PUCCINI */ /* Le Villi */ /* Edgar */ killed-by( fidelia : victim, tigrana : perpetrator, stabbing : cause-of-death ) /* Manon Lescaut */ /* La Bohme */ /* Tosca */ killed-by( angelotti : victim, angelotti : perpetrator ) killed-by( cavaradossi : victim, shooting : cause-of-death ) killed-by( scarpia : victim, tosca-c : perpetrator, stabbing : cause-of-death ) killed-by( tosca-c : victim, tosca-c : perpetrator, jumping : cause-of-death ) /* Madama Butterfly */ killed-by( butterfly : victim, butterfly : perpetrator, stabbing : cause-of-death ) /* La fanciulla del West */ /* La rondine */ /* Il Tabarro */ killed-by( luigi : victim, michele : perpetrator, strangling : cause-of-death ) /* Suor Angelica */ killed-by( angelica : victim, angelica : perpetrator, poisoning : cause-of-death ) /* Gianni Schicchi */ /* Turandot */ killed-by( liu : victim, liu : perpetrator, stabbing : cause-of-death ) killed-by( prince-of-persia : victim, executioner : perpetrator, beheading : cause-of-death ) /* - VERDI */ /* Oberto, conte di San Bonifacio */ /* Un giorno de regno */ /* Nabucco */ /* I Lombardi alla prima Crociata */ /* Ernani */ /* I due foscari */ /* Giovanna d'Arco */ /* Alzira */ /* Attila */ /* Macbeth */ /* I masnadieri */ /* Jrusalem */ /* Il corsaro */ /* La battaglia di Legnano */ /* Luisa Miller */ /* Stiffelio */ /* Rigoletto */ /* Il trovatore */ /* La traviata */ /* Les Vpres siciliennes */ /* Simon Boccanegra */ /* Aroldo */ /* Un ballo in maschera */ /* La forza del destino */ /* Don Carlos */ /* Aida */ /* Otello */ /* Falstaff */ /* - ZANDONAI */ /* La coppa del re */ /* L'uccellino d'oro */ /* Il grillo del focolare */ /* Conchita */ /* Melenis */ /* Francesca da Rimini */ /* La via della finestra */ /* Giulietta e Romeo */ /* I Cavalieri di Ekeb */ /* Giuliano */ /* Una Partita */ /* La farsa amorosa */ /* Il Bacio */ /* -- AT: located-in */ located-in( argentina : container, buenos-aires : containee ) located-in( austria : container, tyrol : containee ) located-in( austria : container, vienna : containee ) located-in( belarus : container, navahradak : containee ) located-in( belgium : container, brussels : containee ) located-in( belgium : container, ghent : containee ) located-in( berlin : container, deutsche-oper : containee ) located-in( bologna : container, teatro-comunale-di-bologna : containee ) located-in( buenos-aires : container, teatro-coliseo : containee ) located-in( buenos-aires : container, teatro-colon : containee ) located-in( cairo : container, cairo-opera : containee ) located-in( chicago : container, chicago-opera : containee ) located-in( china : container, beijing : containee ) located-in( cremona : container, teatro-concordia : containee ) located-in( croatia : container, cakovec : containee ) located-in( croatia : container, pula : containee ) located-in( croatia : container, zara : containee ) located-in( czech-republic : container, bohemia : containee ) located-in( dresden : container, dresdner-hofoper : containee ) located-in( egypt : container, cairo : containee ) located-in( england : container, aldwort : containee ) located-in( england : container, bristol : containee ) located-in( england : container, bury-st-edmunds : containee ) located-in( england : container, dover : containee ) located-in( england : container, london : containee ) located-in( england : container, somersby : containee ) located-in( england : container, stratford : containee ) located-in( england : container, torquay : containee ) located-in( england : container, windsor : containee ) located-in( firenze : container, teatro-comunale-di-firenze : containee ) located-in( firenze : container, teatro-della-pergola : containee ) located-in( firenze : container, teatro-pagliano : containee ) located-in( france : container, abreschviller : containee ) located-in( france : container, alsace : containee ) located-in( france : container, arles : containee ) located-in( france : container, bazens : containee ) located-in( france : container, besancon : containee ) located-in( france : container, boulogne-sur-mer : containee ) located-in( france : container, bretagne : containee ) located-in( france : container, chantilly : containee ) located-in( france : container, corsica : containee ) located-in( france : container, hesdin : containee ) located-in( france : container, limoges : containee ) located-in( france : container, loches : containee ) located-in( france : container, luneville : containee ) located-in( france : container, marly-le-roy : containee ) located-in( france : container, marseille : containee ) located-in( france : container, marseilles : containee ) located-in( france : container, morlaix : containee ) located-in( france : container, nice : containee ) located-in( france : container, nimes : containee ) located-in( france : container, orange : containee ) located-in( france : container, paris : containee ) located-in( france : container, pau : containee ) located-in( france : container, phalsbourg : containee ) located-in( france : container, rennes : containee ) located-in( france : container, saint-raphael : containee ) located-in( france : container, st-etienne : containee ) located-in( france : container, toulouse : containee ) located-in( france : container, villemomble : containee ) located-in( genova : container, teatro-carlo-felice : containee ) located-in( germany : container, alsace : containee ) located-in( germany : container, berlin : containee ) located-in( germany : container, black-forest : containee ) located-in( germany : container, dresden : containee ) located-in( germany : container, dusseldorf : containee ) located-in( germany : container, franconia : containee ) located-in( germany : container, frankfurt : containee ) located-in( germany : container, konstanz : containee ) located-in( germany : container, marbach : containee ) located-in( germany : container, munich : containee ) located-in( germany : container, prien : containee ) located-in( germany : container, rhineland : containee ) located-in( germany : container, weimar : containee ) located-in( greece : container, athens : containee ) located-in( greece : container, coron : containee ) located-in( greece : container, kreta : containee ) located-in( greece : container, thebes : containee ) located-in( israel : container, jerusalem : containee ) located-in( italy : container, bagni-di-lucca : containee ) located-in( italy : container, bassano : containee ) located-in( italy : container, bologna : containee ) located-in( italy : container, borgo-san-lorenzo : containee ) located-in( italy : container, brescia : containee ) located-in( italy : container, calabria : containee ) located-in( italy : container, capri : containee ) located-in( italy : container, caprino-bergamasco : containee ) located-in( italy : container, castelnuovo-scrivia : containee ) located-in( italy : container, catania : containee ) located-in( italy : container, ceva : containee ) located-in( italy : container, como : containee ) located-in( italy : container, colleretto-parella : containee ) located-in( italy : container, cremona : containee ) located-in( italy : container, ferrara : containee ) located-in( italy : container, firenze : containee ) located-in( italy : container, foggia : containee ) located-in( italy : container, genova : containee ) located-in( italy : container, grado : containee ) located-in( italy : container, laquila : containee ) located-in( italy : container, la-spezia : containee ) located-in( italy : container, lecce : containee ) located-in( italy : container, lecco : containee ) located-in( italy : container, le-roncole : containee ) located-in( italy : container, livorno : containee ) located-in( italy : container, lucca : containee ) located-in( italy : container, mantua : containee ) located-in( italy : container, mesolonghi : containee ) located-in( italy : container, milano : containee ) located-in( italy : container, montecatini : containee ) located-in( italy : container, monza : containee ) located-in( italy : container, murano : containee ) located-in( italy : container, napoli : containee ) located-in( italy : container, paderno-fasolaro : containee ) located-in( italy : container, padua : containee ) located-in( italy : container, palmi : containee ) located-in( italy : container, parma : containee ) located-in( italy : container, pesaro : containee ) located-in( italy : container, pescara : containee ) located-in( italy : container, piacenza : containee ) located-in( italy : container, posillipo : containee ) located-in( italy : container, prato : containee ) located-in( italy : container, ravenna : containee ) located-in( italy : container, reggio-emilia : containee ) located-in( italy : container, rimini : containee ) located-in( italy : container, roma : containee ) located-in( italy : container, rovereto : containee ) located-in( italy : container, san-remo : containee ) located-in( italy : container, savoia : containee ) located-in( italy : container, sicilia : containee ) located-in( italy : container, siena : containee ) located-in( italy : container, sorrento : containee ) located-in( italy : container, torino : containee ) located-in( italy : container, trento : containee ) located-in( italy : container, trieste : containee ) located-in( italy : container, tyrol : containee ) located-in( italy : container, udine : containee ) located-in( italy : container, varazza : containee ) located-in( italy : container, varese : containee ) located-in( italy : container, venezia : containee ) located-in( italy : container, verona : containee ) located-in( italy : container, viareggio : containee ) located-in( italy : container, vicenza : containee ) located-in( italy : container, vigasio : containee ) located-in( italy : container, zoagli : containee ) located-in( japan : container, nagasaki : containee ) located-in( lecco : container, teatro-sociale : containee ) located-in( london : container, covent-garden-theatre : containee ) located-in( london : container, hippodrome : containee ) located-in( london : container, h-majestys : containee ) located-in( london : container, savoy-theatre : containee ) located-in( middle-east : container, babylon : containee ) located-in( middle-east : container, mecca : containee ) located-in( milano : container, la-scala : containee ) located-in( milano : container, milan-conservatory : containee ) located-in( milano : container, teatro-dal-verme : containee ) located-in( milano : container, teatro-filodrammatici : containee ) located-in( milano : container, teatro-lirico : containee ) located-in( milano : container, teatro-manzoni : containee ) located-in( torino : container, teatro-regio-di-torino : containee ) located-in( monaco : container, monte-carlo : containee ) located-in( monte-carlo : container, theatre-du-casino : containee ) located-in( napoli : container, teatro-bellini : containee ) located-in( napoli : container, teatro-mercadante : containee ) located-in( napoli : container, teatro-san-carlo : containee ) located-in( new-york : container, metropolitan : containee ) located-in( palermo : container, teatro-massimo : containee ) located-in( paris : container, opera-comique : containee ) located-in( paris : container, paris-opera : containee ) located-in( pesaro : container, liceo-musicale : containee ) located-in( piacenza : container, teatro-municipale : containee ) located-in( poland : container, wroclaw : containee ) located-in( pula : container, politeama-ciscutti : containee ) located-in( reggio-emilia : container, teatro-di-reggio-emilia : containee ) located-in( rimini : container, teatro-nuovo : containee ) located-in( roma : container, teatro-apollo : containee ) located-in( roma : container, teatro-argentina : containee ) located-in( roma : container, teatro-costanzi : containee ) located-in( roma : container, teatro-la-pariola : containee ) located-in( roma : container, teatro-quirino : containee ) located-in( roma : container, teatro-reale-dell-opera : containee ) located-in( russia : container, astapovo : containee ) located-in( russia : container, konigsberg : containee ) located-in( russia : container, moscow : containee ) located-in( russia : container, st-petersburg : containee ) located-in( russia : container, yasnaya-polyana : containee ) located-in( san-remo : container, casino-di-san-remo : containee ) located-in( sicilia : container, palermo : containee ) located-in( sicilia : container, syracuse : containee ) located-in( spain : container, aragon : containee ) located-in( spain : container, biscay : containee ) located-in( spain : container, cadiz : containee ) located-in( spain : container, cordoba : containee ) located-in( spain : container, madrid : containee ) located-in( spain : container, sevilla : containee ) located-in( st-petersburg : container, st-petersburg-imperial-opera : containee ) located-in( sweden : container, marbacka : containee ) located-in( switzerland : container, geneva : containee ) located-in( switzerland : container, lausanne : containee ) located-in( switzerland : container, locarno : containee ) located-in( switzerland : container, lugano : containee ) located-in( torino : container, teatro-di-torino : containee ) located-in( torino : container, teatro-vittorio-emanuele : containee ) located-in( trieste : container, teatro-comunale-di-trieste : containee ) located-in( trieste : container, teatro-grande : containee ) located-in( turkey : container, antioch : containee ) located-in( turkey : container, istanbul : containee ) located-in( united-kingdom : container, england : containee ) located-in( united-kingdom : container, scotland : containee ) located-in( united-kingdom : container, wales : containee ) located-in( usa : container, boston : containee ) located-in( usa : container, chicago : containee ) located-in( usa : container, new-york : containee ) located-in( usa : container, cambridge-ma : containee ) located-in( usa : container, portland : containee ) located-in( usa : container, san-francisco : containee ) located-in( usa : container, us-ca : containee ) located-in( venezia : container, la-fenice : containee ) located-in( venezia : container, teatro-rossini-di-venezia : containee ) located-in( verona : container, teatro-filarmonico : containee ) located-in( verona : container, arena-di-verona : containee ) located-in( vienna : container, wiener-hofoper : containee ) /* -- AT: part-of */ part-of( adriana-lecouvreur : whole, io-son-lumile-ancella : part ) part-of( adriana-lecouvreur : whole, la-dolcissima-effigie : part ) part-of( adriana-lecouvreur : whole, lanima-ho-stanca : part ) part-of( aida : whole, ritorna-vincitor : part ) part-of( andrea-chenier : whole, come-un-bel-di-di-maggio : part ) part-of( andrea-chenier : whole, la-mamma-morta : part ) part-of( andrea-chenier : whole, un-di-allazzurro-spazio : part ) part-of( cavalleria-rusticana : whole, mamma-quel-vino-e-generoso : part ) part-of( edgar : whole, dogni-dolor : part ) part-of( fedora : whole, amor-ti-vieta : part ) part-of( germania : whole, studenti-udite : part ) part-of( gianni-schicchi : whole, o-mio-babbino-caro : part ) part-of( guglielmo-ratcliff : whole, dindole-dolce : part ) part-of( i-rantzau : whole, cera-una-volta-un-re : part ) part-of( i-rantzau : whole, fa-chei-pensier : part ) part-of( i-vespri-siciliani : whole, o-tu-palermo : part ) part-of( il-piccolo-marat : whole, la-mamma-ritrovo : part ) part-of( il-piccolo-marat : whole, perche-non-sono : part ) part-of( il-piccolo-marat : whole, va-nella-tua-stanzetta : part ) part-of( il-trittico : whole, gianni-schicchi : part ) part-of( il-trittico : whole, il-tabarro : part ) part-of( il-trittico : whole, suor-angelica : part ) part-of( il-trovatore : whole, vedi-le-fosche : part ) part-of( iris : whole, apri-la-tua-finestra : part ) part-of( iris : whole, un-di-ero-piccina : part ) part-of( isabeau : whole, venne-una-vecchierella : part ) part-of( isabeau : whole, voi-siete-il-re : part ) part-of( la-boheme : whole, che-gelida-manina : part ) part-of( la-boheme : whole, mi-chiamono-mimi : part ) part-of( la-boheme : whole, o-soave-fanciulla : part ) part-of( la-boheme : whole, quando-men-vo-soletta : part ) part-of( la-fanciulla-del-west : whole, laggiu-nel-soledad : part ) part-of( la-forza-del-destino : whole, pace-pace-mio-dio : part ) part-of( la-gioconda : whole, cielo-e-mar : part ) part-of( la-gioconda : whole, suicidio : part ) part-of( la-gioconda : whole, voce-di-donna : part ) part-of( la-rondine : whole, chi-il-bel-sogno : part ) part-of( la-wally : whole, ebben-ne-andro-lontana : part ) part-of( lamico-fritz : whole, cherry-duet : part ) part-of( lamico-fritz : whole, non-mi-resta : part ) part-of( lamico-fritz : whole, o-amore-o-bella-luce-del-cuore : part ) part-of( lamico-fritz : whole, son-pochi-fiori : part ) part-of( larlesiana : whole, come-due-tizzi-accesi : part ) part-of( larlesiana : whole, e-la-solita-storia-del-pastore : part ) part-of( larlesiana : whole, esser-madre-e-un-inferno : part ) part-of( le-maschere : whole, sole-delle-mie-giornate : part ) part-of( le-villi : whole, se-come-voi : part ) part-of( lodoletta : whole, ah-il-suo-nome : part ) part-of( lodoletta : whole, se-franz-dicesse-il-vero : part ) part-of( loreley : whole, nel-verde-maggio : part ) part-of( madama-butterfly : whole, un-bel-di-vedremo : part ) part-of( madame-sans-gene : whole, gli-avrei-detto-tentevele : part ) part-of( madame-sans-gene : whole, ma-piu-spesso : part ) part-of( manon-lescaut : whole, donna-non-vidi-mai : part ) part-of( manon-lescaut : whole, in-quelle-trine-morbide : part ) part-of( manon-lescaut : whole, sola-perduta-abbandonata : part ) part-of( mefistofele : whole, laltra-notte : part ) part-of( nabucco : whole, va-pensiero : part ) part-of( nerone2 : whole, perche-dovrei-tremare : part ) part-of( otello : whole, piangea-cantando : part ) part-of( pagliacci : whole, qual-fiamma : part ) part-of( pagliacci : whole, vesti-la-giubba : part ) part-of( parisina : whole, ahi-vergine-maria : part ) part-of( parisina : whole, aria-du-rossignol : part ) part-of( pinotta : whole, il-rispetto : part ) part-of( rigoletto : whole, bella-figlia-dell-amore : part ) part-of( suor-angelica : whole, senza-mamma : part ) part-of( tosca : whole, e-lucevan-le-stelle : part ) part-of( tosca : whole, o-dolci-mani : part ) part-of( tosca : whole, recondita-armonia : part ) part-of( tosca : whole, va-tosca : part ) part-of( tosca : whole, vissi-darte : part ) part-of( turandot : whole, ah-per-lultima-volta : part ) part-of( turandot : whole, in-questa-regia : part ) part-of( turandot : whole, nessun-dorma : part ) part-of( turandot : whole, non-piangere-liu : part ) part-of( turandot : whole, signore-ascolta : part ) part-of( turandot : whole, tu-che-di-gel-sei-cinta : part ) part-of( zanetto : whole, senti-bambino : part ) /* -- AT: premiere */ premiere( arena-di-verona : place, lincantesimo : work ) premiere( cairo-opera : place, aida : work ) premiere( casino-di-san-remo : place, pinotta : work ) premiere( chicago-opera : place, edipo-re : work ) premiere( covent-garden-theatre : place, loracolo : work ) premiere( covent-garden-theatre : place, rip-van-winkle : work ) premiere( deutsche-oper : place, der-roland-von-berlin : work ) premiere( dresdner-hofoper : place, cornill-schut : work ) premiere( h-majestys : place, i-masnadieri : work ) premiere( hippodrome : place, zingari : work ) premiere( la-fenice : place, attila : work ) premiere( la-fenice : place, ernani : work ) premiere( la-fenice : place, la-boheme2 : work ) premiere( la-fenice : place, la-traviata : work ) premiere( la-fenice : place, le-maschere : work ) premiere( la-fenice : place, re-nala : work ) premiere( la-fenice : place, rigoletto : work ) premiere( la-fenice : place, simon-boccanegra : work ) premiere( la-scala : place, abisso : work ) premiere( la-scala : place, andrea-chenier : work ) premiere( la-scala : place, bianca-da-cervia : work ) premiere( la-scala : place, dejanice : work ) premiere( la-scala : place, edgar : work ) premiere( la-scala : place, edmea : work ) premiere( la-scala : place, falstaff : work ) premiere( la-scala : place, germania : work ) premiere( la-scala : place, giovanna-darco : work ) premiere( la-scala : place, gloria : work ) premiere( la-scala : place, guglielmo-ratcliff : work ) premiere( la-scala : place, i-cavalieri-di-ekebu : work ) premiere( la-scala : place, i-lituani : work ) premiere( la-scala : place, i-lombardi : work ) premiere( la-scala : place, il-figliuol-prodigo : work ) premiere( la-scala : place, il-fior-dalpe : work ) premiere( la-scala : place, i-profughi-fiamminghi : work ) premiere( la-scala : place, il-re : work ) premiere( la-scala : place, il-signor-di-pourceaugnac : work ) premiere( la-scala : place, la-cena-delle-beffe : work ) premiere( la-scala : place, la-figlia-di-jorio : work ) premiere( la-scala : place, la-gioconda : work ) premiere( la-scala : place, la-nave : work ) premiere( la-scala : place, la-notte-di-zoraima : work ) premiere( la-scala : place, la-wally : work ) premiere( la-scala : place, lamore-dei-tre-re : work ) premiere( la-scala : place, le-maschere : work ) premiere( la-scala : place, lombra-di-don-giovanni : work ) premiere( la-scala : place, madama-butterfly : work ) premiere( la-scala : place, marion-delorme : work ) premiere( la-scala : place, mefistofele : work ) premiere( la-scala : place, nabucco : work ) premiere( la-scala : place, nerone : work ) premiere( la-scala : place, nerone2 : work ) premiere( la-scala : place, notte-di-leggenda : work ) premiere( la-scala : place, oberto : work ) premiere( la-scala : place, oceana : work ) premiere( la-scala : place, otello : work ) premiere( la-scala : place, parisina : work ) premiere( la-scala : place, siberia : work ) premiere( la-scala : place, silvano : work ) premiere( la-scala : place, turandot : work ) premiere( la-scala : place, un-giorno-di-regno : work ) premiere( la-scala : place, una-partita : work ) premiere( liceo-musicale : place, zanetto : work ) premiere( metropolitan : place, gianni-schicchi : work ) premiere( metropolitan : place, il-tabarro : work ) premiere( metropolitan : place, il-trittico : work ) premiere( metropolitan : place, la-fanciulla-del-west : work ) premiere( metropolitan : place, madame-sans-gene : work ) premiere( metropolitan : place, suor-angelica : work ) premiere( milan-conservatory : place, caccia-lontana : work ) premiere( milan-conservatory : place, la-falce : work ) premiere( milan-conservatory : place, il-sindaco-babbeo : work ) premiere( milano : place, melenis : work ) premiere( napoli : place, gina : work ) premiere( napoli : place, glauco : work ) premiere( nbc : place, lincantesimo : work ) premiere( opera-comique : place, francesca-da-rimini2 : work ) premiere( paris-opera : place, don-carlos : work ) premiere( paris-opera : place, i-vespri-siciliani : work ) premiere( paris-opera : place, jerusalem-o : work ) premiere( pesaro : place, la-via-della-finestra : work ) premiere( politeama-ciscutti : place, il-vassallo-di-szigeth : work ) premiere( rai : place, il-bacio : work ) premiere( roma : place, la-farsa-amorosa : work ) premiere( rovereto : place, luccellino-doro : work ) premiere( savoy-theatre : place, ib-and-little-christina : work ) premiere( st-petersburg-imperial-opera : place, la-forza-del-destino : work ) premiere( teatro-apollo : place, il-trovatore : work ) premiere( teatro-apollo : place, un-ballo-in-maschera : work ) premiere( teatro-argentina : place, chatterton : work ) premiere( teatro-argentina : place, i-due-foscari : work ) premiere( teatro-argentina : place, la-battaglia-di-legnano : work ) premiere( teatro-argentina : place, mala-vita : work ) premiere( teatro-bellini : place, il-voto : work ) premiere( teatro-carlo-felice : place, amleto : work ) premiere( teatro-carlo-felice : place, cristoforo-colombo : work ) premiere( teatro-carlo-felice : place, goffredo-mameli : work ) premiere( teatro-carlo-felice : place, il-principe-zilah : work ) premiere( teatro-carlo-felice : place, le-maschere : work ) premiere( teatro-carlo-felice : place, tzigana : work ) premiere( teatro-coliseo : place, isabeau : work ) premiere( teatro-comunale-di-bologna : place, la-leggenda-di-sakuntala : work ) premiere( teatro-comunale-di-firenze : place, don-juan-de-manara : work ) premiere( teatro-comunale-di-trieste : place, cornill-schut : work ) premiere( teatro-comunale-di-trieste : place, nozze-istriane : work ) premiere( teatro-concordia : place, i-promessi-sposi : work ) premiere( teatro-concordia : place, la-savoiarda : work ) premiere( teatro-concordia : place, la-vergine-di-kermo : work ) premiere( teatro-costanzi : place, cavalleria-rusticana : work ) premiere( teatro-costanzi : place, giulietta-e-romeo : work ) premiere( teatro-costanzi : place, il-dottor-antonio : work ) premiere( teatro-costanzi : place, il-piccolo-marat : work ) premiere( teatro-costanzi : place, iris : work ) premiere( teatro-costanzi : place, lamico-fritz : work ) premiere( teatro-costanzi : place, le-maschere : work ) premiere( teatro-costanzi : place, lodoletta : work ) premiere( teatro-costanzi : place, maia : work ) premiere( teatro-costanzi : place, tosca : work ) premiere( teatro-dal-verme : place, conchita : work ) premiere( teatro-dal-verme : place, i-medici : work ) premiere( teatro-dal-verme : place, la-savoiarda : work ) premiere( teatro-dal-verme : place, le-villi : work ) premiere( teatro-dal-verme : place, pagliacci : work ) premiere( teatro-dal-verme : place, preziosa : work ) premiere( teatro-della-pergola : place, i-rantzau : work ) premiere( teatro-della-pergola : place, macbeth : work ) premiere( teatro-di-reggio-emilia : place, asrael : work ) premiere( teatro-di-torino : place, madonna-imperia : work ) premiere( teatro-filarmonico : place, le-maschere : work ) premiere( teatro-filodrammatici : place, falene : work ) premiere( teatro-filodrammatici : place, la-terra-del-sogno : work ) premiere( teatro-filodrammatici : place, le-baruffe-chiozotte : work ) premiere( teatro-grande : place, il-corsaro : work ) premiere( teatro-grande : place, stiffelio : work ) premiere( teatro-la-pariola : place, giove-a-pompei : work ) premiere( teatro-lirico : place, adriana-lecouvreur : work ) premiere( teatro-lirico : place, fedora : work ) premiere( teatro-lirico : place, larlesiana : work ) premiere( teatro-lirico : place, marcella : work ) premiere( teatro-lirico : place, zaza : work ) premiere( teatro-manzoni : place, raggio-di-luna : work ) premiere( teatro-massimo : place, mese-mariano : work ) premiere( teatro-mercadante : place, regina-diaz : work ) premiere( teatro-municipale : place, roderigo-re-dei-goti : work ) premiere( teatro-nuovo : place, aroldo : work ) premiere( teatro-pagliano : place, la-tilda : work ) premiere( teatro-quirino : place, si : work ) premiere( teatro-reale-dell-opera : place, cyrano-de-bergerac : work ) premiere( teatro-reale-dell-opera : place, il-dottor-antonio : work ) premiere( teatro-regio-di-torino : place, francesca-da-rimini : work ) premiere( teatro-regio-di-torino : place, la-boheme : work ) premiere( teatro-regio-di-torino : place, le-maschere : work ) premiere( teatro-regio-di-torino : place, loreley : work ) premiere( teatro-regio-di-torino : place, manon-lescaut : work ) premiere( teatro-regio-di-torino : place, hellera : work ) premiere( teatro-rossini-di-venezia : place, la-falena : work ) premiere( teatro-san-carlo : place, alzira : work ) premiere( teatro-san-carlo : place, giuliano : work ) premiere( teatro-san-carlo : place, luisa-miller : work ) premiere( teatro-san-carlo : place, lultimo-lord : work ) premiere( teatro-sociale : place, il-parlatore-eterno : work ) premiere( teatro-vittorio-emanuele : place, giovanni-gallurese : work ) premiere( teatro-vittorio-emanuele : place, risurrezione : work ) premiere( theatre-du-casino : place, amica : work ) premiere( theatre-du-casino : place, i-mori-di-valenza : work ) premiere( theatre-du-casino : place, la-rondine : work ) premiere( torino : place, il-grillo-del-focolare : work ) premiere( wiener-hofoper : place, il-vassallo-di-szigeth : work ) premiere( wroclaw : place, la-fonte-di-enschir : work ) /* -- AT: published-by */ published-by( baltramo : publisher, edipo-re : work ) published-by( lucca-p : publisher, attila : work ) published-by( lucca-p : publisher, dejanice : work ) published-by( lucca-p : publisher, edmea : work ) published-by( lucca-p : publisher, i-masnadieri : work ) published-by( lucca-p : publisher, il-corsaro : work ) published-by( lucca-p : publisher, loreley : work ) published-by( ricordi-p : publisher, aida : work ) published-by( ricordi-p : publisher, alzira : work ) published-by( ricordi-p : publisher, aroldo : work ) published-by( ricordi-p : publisher, conchita : work ) published-by( ricordi-p : publisher, don-carlos : work ) published-by( ricordi-p : publisher, edgar : work ) published-by( ricordi-p : publisher, ernani : work ) published-by( ricordi-p : publisher, falstaff : work ) published-by( ricordi-p : publisher, francesca-da-rimini : work ) published-by( ricordi-p : publisher, gianni-schicchi : work ) published-by( ricordi-p : publisher, giovanna-darco : work ) published-by( ricordi-p : publisher, giulietta-e-romeo : work ) published-by( ricordi-p : publisher, i-cavalieri-di-ekebu : work ) published-by( ricordi-p : publisher, i-due-foscari : work ) published-by( ricordi-p : publisher, i-lituani : work ) published-by( ricordi-p : publisher, i-lombardi : work ) published-by( ricordi-p : publisher, i-medici : work ) published-by( ricordi-p : publisher, i-vespri-siciliani : work ) published-by( ricordi-p : publisher, il-figliuol-prodigo : work ) published-by( ricordi-p : publisher, il-principe-zilah : work ) published-by( ricordi-p : publisher, il-tabarro : work ) published-by( ricordi-p : publisher, il-trittico : work ) published-by( ricordi-p : publisher, il-trovatore : work ) published-by( ricordi-p : publisher, iris : work ) published-by( ricordi-p : publisher, jerusalem-o : work ) published-by( ricordi-p : publisher, la-battaglia-di-legnano : work ) published-by( ricordi-p : publisher, la-boheme : work ) published-by( ricordi-p : publisher, la-fanciulla-del-west : work ) published-by( ricordi-p : publisher, la-forza-del-destino : work ) published-by( ricordi-p : publisher, la-traviata : work ) published-by( ricordi-p : publisher, la-wally : work ) published-by( ricordi-p : publisher, le-villi : work ) published-by( ricordi-p : publisher, luisa-miller : work ) published-by( ricordi-p : publisher, macbeth : work ) published-by( ricordi-p : publisher, madama-butterfly : work ) published-by( ricordi-p : publisher, manon-lescaut : work ) published-by( ricordi-p : publisher, mefistofele : work ) published-by( ricordi-p : publisher, nabucco : work ) published-by( ricordi-p : publisher, nerone : work ) published-by( ricordi-p : publisher, oberto : work ) published-by( ricordi-p : publisher, otello : work ) published-by( ricordi-p : publisher, rigoletto : work ) published-by( ricordi-p : publisher, risurrezione : work ) published-by( ricordi-p : publisher, simon-boccanegra : work ) published-by( ricordi-p : publisher, stiffelio : work ) published-by( ricordi-p : publisher, suor-angelica : work ) published-by( ricordi-p : publisher, tosca : work ) published-by( ricordi-p : publisher, turandot : work ) published-by( ricordi-p : publisher, un-ballo-in-maschera : work ) published-by( ricordi-p : publisher, un-giorno-di-regno : work ) published-by( sonzogno : publisher, adriana-lecouvreur : work ) published-by( sonzogno : publisher, andrea-chenier : work ) published-by( sonzogno : publisher, cavalleria-rusticana : work ) published-by( sonzogno : publisher, fedora : work ) published-by( sonzogno : publisher, gina : work ) published-by( sonzogno : publisher, gloria : work ) published-by( sonzogno : publisher, guglielmo-ratcliff : work ) published-by( sonzogno : publisher, il-piccolo-marat : work ) published-by( sonzogno : publisher, il-re : work ) published-by( sonzogno : publisher, il-voto : work ) published-by( sonzogno : publisher, isabeau : work ) published-by( sonzogno : publisher, la-boheme2 : work ) published-by( sonzogno : publisher, la-cena-delle-beffe : work ) published-by( sonzogno : publisher, la-gioconda : work ) published-by( sonzogno : publisher, la-rondine : work ) published-by( sonzogno : publisher, la-tilda : work ) published-by( sonzogno : publisher, lamico-fritz : work ) published-by( sonzogno : publisher, larlesiana : work ) published-by( sonzogno : publisher, le-maschere : work ) published-by( sonzogno : publisher, lodoletta : work ) published-by( sonzogno : publisher, madame-sans-gene : work ) published-by( sonzogno : publisher, mala-vita : work ) published-by( sonzogno : publisher, mese-mariano : work ) published-by( sonzogno : publisher, pagliacci : work ) published-by( sonzogno : publisher, parisina : work ) published-by( sonzogno : publisher, regina-diaz : work ) published-by( sonzogno : publisher, siberia : work ) published-by( sonzogno : publisher, silvano : work ) published-by( sonzogno : publisher, zaza : work ) /* -- AT: pupil-of */ pupil-of( catalani : pupil, bazzini : teacher ) pupil-of( leoni : pupil, ponchielli : teacher ) pupil-of( mascagni : pupil, bazzini : teacher ) pupil-of( mascagni : pupil, ponchielli : teacher ) pupil-of( puccini : pupil, angeloni : teacher ) pupil-of( puccini : pupil, bazzini : teacher ) pupil-of( puccini : pupil, ponchielli : teacher ) pupil-of( smareglia : pupil, faccio : teacher ) pupil-of( zandonai : pupil, mascagni : teacher ) /* -- AT: revision-of */ revision-of( aroldo : result, stiffelio : source ) revision-of( don-juan-de-manara : result, lombra-di-don-giovanni : source ) revision-of( il-voto : result, mala-vita : source ) revision-of( jerusalem-o : result, i-lombardi : source ) /* -- AT: sung-by */ sung-by( adriana : person, io-son-lumile-ancella : aria ) sung-by( aida-c : person, ritorna-vincitor : aria ) sung-by( angelica : person, senza-mamma : aria ) sung-by( anna : person, se-come-voi : aria ) sung-by( atte : person, perche-dovrei-tremare : aria ) sung-by( baldassare : person, come-due-tizzi-accesi : aria ) sung-by( butterfly : person, un-bel-di-vedremo : aria ) sung-by( calaf : person, ah-per-lultima-volta : aria ) sung-by( calaf : person, nessun-dorma : aria ) sung-by( calaf : person, non-piangere-liu : aria ) sung-by( canio : person, vesti-la-giubba : aria ) sung-by( catarina : person, gli-avrei-detto-tentevele : aria ) sung-by( catarina : person, ma-piu-spesso : aria ) sung-by( cavaradossi : person, e-lucevan-le-stelle : aria ) sung-by( cavaradossi : person, o-dolci-mani : aria ) sung-by( cavaradossi : person, recondita-armonia : aria ) sung-by( chenier : person, come-un-bel-di-di-maggio : aria ) sung-by( chenier : person, un-di-allazzurro-spazio : aria ) sung-by( des-grieux : person, donna-non-vidi-mai : aria ) sung-by( desdemona : person, piangea-cantando : aria ) sung-by( duke-of-mantua : person, bella-figlia-dell-amore : aria ) sung-by( federico-loewe : person, studenti-udite : aria ) sung-by( federico2 : person, e-la-solita-storia-del-pastore : aria ) sung-by( fidelia : person, dogni-dolor : aria ) sung-by( flammen : person, se-franz-dicesse-il-vero : aria ) sung-by( fritz : person, cherry-duet : aria ) sung-by( fritz : person, o-amore-o-bella-luce-del-cuore : aria ) sung-by( gilda : person, bella-figlia-dell-amore : aria ) sung-by( gioconda : person, suicidio : aria ) sung-by( giovanni-da-procida : person, o-tu-palermo : aria ) sung-by( grimaldo : person, cielo-e-mar : aria ) sung-by( il-piccolo-marat-c : person, va-nella-tua-stanzetta : aria ) sung-by( iris-c : person, un-di-ero-piccina : aria ) sung-by( isabeau-c : person, venne-una-vecchierella : aria ) sung-by( isabeau-c : person, voi-siete-il-re : aria ) sung-by( la-cieca : person, voce-di-donna : aria ) sung-by( lauretta : person, o-mio-babbino-caro : aria ) sung-by( leonora : person, pace-pace-mio-dio : aria ) sung-by( liu : person, ah-per-lultima-volta : aria ) sung-by( liu : person, signore-ascolta : aria ) sung-by( liu : person, tu-che-di-gel-sei-cinta : aria ) sung-by( loris : person, amor-ti-vieta : aria ) sung-by( luisa2 : person, cera-una-volta-un-re : aria ) sung-by( luisa2 : person, fa-chei-pensier : aria ) sung-by( maddalena : person, bella-figlia-dell-amore : aria ) sung-by( maddalena-di-coigny : person, la-mamma-morta : aria ) sung-by( magda : person, chi-il-bel-sogno : aria ) sung-by( manon : person, in-quelle-trine-morbide : aria ) sung-by( manon : person, sola-perduta-abbandonata : aria ) sung-by( margherita : person, laltra-notte : aria ) sung-by( maria-macgregor : person, dindole-dolce : aria ) sung-by( mariella : person, ah-il-suo-nome : aria ) sung-by( mariella : person, la-mamma-ritrovo : aria ) sung-by( mariella : person, perche-non-sono : aria ) sung-by( mariella : person, va-nella-tua-stanzetta : aria ) sung-by( maurizio : person, la-dolcissima-effigie : aria ) sung-by( maurizio : person, lanima-ho-stanca : aria ) sung-by( mimi : person, mi-chiamono-mimi : aria ) sung-by( minnie : person, laggiu-nel-soledad : aria ) sung-by( musetta : person, quando-men-vo-soletta : aria ) sung-by( nedda : person, qual-fiamma : aria ) sung-by( osaka : person, apri-la-tua-finestra : aria ) sung-by( pang : person, ah-per-lultima-volta : aria ) sung-by( parisina-malatesta : person, ahi-vergine-maria : aria ) sung-by( parisina-malatesta : person, aria-du-rossignol : aria ) sung-by( ping : person, ah-per-lultima-volta : aria ) sung-by( pinotta-c : person, il-rispetto : aria ) sung-by( pong : person, ah-per-lultima-volta : aria ) sung-by( rigoletto-c : person, bella-figlia-dell-amore : aria ) sung-by( rodolfo : person, che-gelida-manina : aria ) sung-by( rodolfo : person, o-soave-fanciulla : aria ) sung-by( rosa-mammai : person, esser-madre-e-un-inferno : aria ) sung-by( rosaura : person, sole-delle-mie-giornate : aria ) sung-by( scarpia : person, va-tosca : aria ) sung-by( silvia : person, senti-bambino : aria ) sung-by( suzel : person, cherry-duet : aria ) sung-by( suzel : person, non-mi-resta : aria ) sung-by( suzel : person, son-pochi-fiori : aria ) sung-by( timur : person, ah-per-lultima-volta : aria ) sung-by( tosca-c : person, vissi-darte : aria ) sung-by( turandot-c : person, in-questa-regia : aria ) sung-by( turiddu : person, mamma-quel-vino-e-generoso : aria ) sung-by( wally : person, ebben-ne-andro-lontana : aria ) sung-by( walter2 : person, nel-verde-maggio : aria ) /* -- AT: takes-place-during */ takes-place-during( french-revolution : event, andrea-chenier : opera ) takes-place-during( french-revolution : event, gina : opera ) takes-place-during( french-revolution : event, il-piccolo-marat : opera ) takes-place-during( french-revolution : event, madame-sans-gene : opera ) takes-place-during( roman-empire : event, oceana : opera ) /* -- AT: takes-place-in */ takes-place-in( aegean-island : place, il-corsaro : opera ) takes-place-in( alsace : place, i-rantzau : opera ) takes-place-in( alsace : place, lamico-fritz : opera ) takes-place-in( antioch : place, i-lombardi : opera ) takes-place-in( aragon : place, il-trovatore : opera ) takes-place-in( arles : place, larlesiana : opera ) takes-place-in( austria : place, stiffelio : opera ) takes-place-in( babylon : place, nabucco : opera ) takes-place-in( bassano : place, oberto : opera ) takes-place-in( beijing : place, turandot : opera ) ~ turandot-takes-place-in takes-place-in( biscay : place, il-trovatore : opera ) takes-place-in( black-forest : place, le-villi : opera ) takes-place-in( bohemia : place, edmea : opera ) takes-place-in( bohemia : place, i-masnadieri : opera ) takes-place-in( boston : place, un-ballo-in-maschera : opera ) takes-place-in( bretagne : place, un-giorno-di-regno : opera ) takes-place-in( calabria : place, pagliacci : opera ) takes-place-in( coron : place, il-corsaro : opera ) takes-place-in( corsica : place, lombra-di-don-giovanni : opera ) takes-place-in( cyprus : place, otello : opera ) takes-place-in( egypt : place, aida : opera ) takes-place-in( england : place, aroldo : opera ) takes-place-in( firenze : place, gianni-schicchi : opera ) takes-place-in( firenze : place, la-cena-delle-beffe : opera ) takes-place-in( firenze : place, suor-angelica : opera ) takes-place-in( firenze : place, zanetto : opera ) takes-place-in( flanders : place, cornill-schut : opera ) takes-place-in( flanders : place, edgar : opera ) takes-place-in( france : place, cyrano-de-bergerac : opera ) takes-place-in( france : place, gina : opera ) takes-place-in( france : place, giovanna-darco : opera ) takes-place-in( france : place, madame-sans-gene : opera ) takes-place-in( france : place, manon-lescaut : opera ) takes-place-in( france : place, marion-delorme : opera ) takes-place-in( franconia : place, i-masnadieri : opera ) takes-place-in( genova : place, simon-boccanegra : opera ) takes-place-in( germany : place, germania : opera ) takes-place-in( germany : place, mefistofele : opera ) takes-place-in( greece : place, mefistofele : opera ) takes-place-in( hungary : place, il-vassallo-di-szigeth : opera ) takes-place-in( india : place, la-leggenda-di-sakuntala : opera ) takes-place-in( italy : place, attila : opera ) takes-place-in( italy : place, la-battaglia-di-legnano : opera ) takes-place-in( italy : place, la-forza-del-destino : opera ) takes-place-in( italy : place, silvano : opera ) takes-place-in( japan : place, iris : opera ) takes-place-in( jerusalem : place, i-lombardi : opera ) takes-place-in( jerusalem : place, nabucco : opera ) takes-place-in( konstanz : place, madonna-imperia : opera ) takes-place-in( lecco : place, i-promessi-sposi : opera ) takes-place-in( lithuania : place, i-lituani : opera ) takes-place-in( madrid : place, don-carlos : opera ) takes-place-in( mantua : place, rigoletto : opera ) takes-place-in( mecca : place, la-falce : opera ) takes-place-in( milano : place, i-lombardi : opera ) takes-place-in( nagasaki : place, madama-butterfly : opera ) takes-place-in( napoli : place, il-voto : opera ) takes-place-in( napoli : place, mala-vita : opera ) takes-place-in( napoli : place, mese-mariano : opera ) takes-place-in( netherlands : place, lodoletta : opera ) takes-place-in( nice : place, la-rondine : opera ) takes-place-in( palermo : place, i-vespri-siciliani : opera ) takes-place-in( palestine : place, jerusalem-o : opera ) takes-place-in( paris : place, adriana-lecouvreur : opera ) takes-place-in( paris : place, andrea-chenier : opera ) takes-place-in( paris : place, don-carlos : opera ) takes-place-in( paris : place, fedora : opera ) takes-place-in( paris : place, il-piccolo-marat : opera ) takes-place-in( paris : place, il-tabarro : opera ) takes-place-in( paris : place, la-boheme : opera ) takes-place-in( paris : place, la-boheme2 : opera ) takes-place-in( paris : place, la-rondine : opera ) takes-place-in( paris : place, la-traviata : opera ) takes-place-in( paris : place, lodoletta : opera ) takes-place-in( paris : place, zaza : opera ) takes-place-in( peru : place, alzira : opera ) takes-place-in( ravenna : place, francesca-da-rimini : opera ) takes-place-in( rhineland : place, loreley : opera ) takes-place-in( rimini : place, francesca-da-rimini : opera ) takes-place-in( roma : place, nerone : opera ) takes-place-in( roma : place, nerone2 : opera ) takes-place-in( roma : place, tosca : opera ) ~ tosca-takes-place-in takes-place-in( russia : place, risurrezione : opera ) takes-place-in( russia : place, siberia : opera ) takes-place-in( san-francisco : place, loracolo : opera ) takes-place-in( savoia : place, amica : opera ) takes-place-in( scotland : place, aroldo : opera ) takes-place-in( scotland : place, guglielmo-ratcliff : opera ) takes-place-in( scotland : place, macbeth : opera ) takes-place-in( sevilla : place, conchita : opera ) takes-place-in( sevilla : place, la-forza-del-destino : opera ) takes-place-in( sicilia : place, cavalleria-rusticana : opera ) takes-place-in( siena : place, gloria : opera ) takes-place-in( spain : place, ernani : opera ) takes-place-in( st-etienne : place, zaza : opera ) takes-place-in( st-petersburg : place, fedora : opera ) takes-place-in( sweden : place, i-cavalieri-di-ekebu : opera ) takes-place-in( switzerland : place, fedora : opera ) takes-place-in( syracuse : place, dejanice : opera ) takes-place-in( syria : place, oceana : opera ) takes-place-in( thebes : place, edipo-re : opera ) takes-place-in( toulouse : place, jerusalem-o : opera ) takes-place-in( tyrol : place, la-wally : opera ) takes-place-in( tyrol : place, luisa-miller : opera ) takes-place-in( us-ca : place, la-fanciulla-del-west : opera ) takes-place-in( usa : place, manon-lescaut : opera ) takes-place-in( venezia : place, i-due-foscari : opera ) takes-place-in( venezia : place, la-gioconda : opera ) takes-place-in( verona : place, giulietta-e-romeo : opera ) takes-place-in( windsor : place, falstaff : opera ) /* -- AT: unfinished */ unfinished( i-cavalieri-e-la-bella : work ) unfinished( la-principessa-lontana : work ) unfinished( nerone : work ) unfinished( turandot : work ) /* -- AT: libretto-by */ /* fixme: operas with unknown librettist: using o for i"http://psi.ontopedia.net/" instance-of($OPERA, o:Opera), not(o:libretto_by( $OPERA : o:Opera, $LIBRETTIST : o:Librettist)) order by $OPERA? */ libretto-by( ackerman : librettist, rip-van-winkle : opera ) libretto-by( adami : librettist, il-tabarro : opera ) libretto-by( adami : librettist, la-rondine : opera ) libretto-by( adami : librettist, turandot : opera ) libretto-by( alfano : librettist, la-leggenda-di-sakuntala : opera ) libretto-by( benco : librettist, abisso : opera ) libretto-by( benco : librettist, oceana : opera ) libretto-by( benco : librettist, la-falena : opera ) libretto-by( benelli : librettist, la-cena-delle-beffe : opera ) libretto-by( benelli : librettist, lamore-dei-tre-re : opera ) libretto-by( benelli : librettist, lincantesimo : opera ) libretto-by( bey : librettist, aida : opera ) libretto-by( bognasco : librettist, il-matrimonio-selvaggio : opera ) libretto-by( boito : librettist, amleto : opera ) libretto-by( boito : librettist, falstaff : opera ) libretto-by( boito : librettist, la-falce : opera ) libretto-by( boito : librettist, la-gioconda : opera ) libretto-by( boito : librettist, mefistofele : opera ) libretto-by( boito : librettist, nerone : opera ) libretto-by( boito : librettist, otello : opera ) libretto-by( boito : librettist, simon-boccanegra : opera ) libretto-by( cain : librettist, cyrano-de-bergerac : opera ) libretto-by( cammarano : librettist, alzira : opera ) libretto-by( cammarano : librettist, il-trovatore : opera ) libretto-by( cammarano : librettist, la-battaglia-di-legnano : opera ) libretto-by( cammarano : librettist, luisa-miller : opera ) libretto-by( castelnova : librettist, il-fior-dalpe : opera ) libretto-by( choudens : librettist, amica : opera ) libretto-by( civinini : librettist, la-fanciulla-del-west : opera ) libretto-by( colautti : librettist, adriana-lecouvreur : opera ) libretto-by( colautti : librettist, fedora : opera ) libretto-by( colautti : librettist, gloria : opera ) libretto-by( dangelantonio : librettist, giovanni-gallurese : opera ) libretto-by( dannunzio : librettist, la-figlia-di-jorio : opera ) libretto-by( dannunzio : librettist, parisina : opera ) libretto-by( daspuro : librettist, il-voto : opera ) libretto-by( daspuro : librettist, lamico-fritz : opera ) libretto-by( daspuro : librettist, mala-vita : opera ) libretto-by( datri : librettist, giulietta-e-romeo : opera ) libretto-by( depanis : librettist, loreley : opera ) libretto-by( dormeville : librettist, la-savoiarda : opera ) libretto-by( dormeville : librettist, loreley : opera ) libretto-by( duveyrier : librettist, i-vespri-siciliani : opera ) libretto-by( falena : librettist, lultimo-lord : opera ) libretto-by( fontana : librettist, asrael : opera ) libretto-by( fontana : librettist, edgar : opera ) libretto-by( fontana : librettist, glauco : opera ) libretto-by( fontana : librettist, il-signor-di-pourceaugnac : opera ) libretto-by( fontana : librettist, le-villi : opera ) libretto-by( fontana : librettist, zoroastro : opera ) libretto-by( forzano : librettist, edipo-re : opera ) libretto-by( forzano : librettist, gianni-schicchi : opera ) libretto-by( forzano : librettist, il-piccolo-marat : opera ) libretto-by( forzano : librettist, il-re : opera ) libretto-by( forzano : librettist, lodoletta : opera ) libretto-by( forzano : librettist, notte-di-leggenda : opera ) libretto-by( forzano : librettist, suor-angelica : opera ) libretto-by( franci : librettist, si : opera ) libretto-by( ghisalberti : librettist, la-notte-di-zoraima : opera ) libretto-by( ghislanzoni : librettist, aida : opera ) libretto-by( ghislanzoni : librettist, edmea : opera ) libretto-by( ghislanzoni : librettist, i-lituani : opera ) libretto-by( ghislanzoni : librettist, i-mori-di-valenza : opera ) libretto-by( ghislanzoni : librettist, il-parlatore-eterno : opera ) libretto-by( ghislanzoni : librettist, la-forza-del-destino : opera ) libretto-by( giachetti : librettist, il-sindaco-babbeo : opera ) libretto-by( giacosa : librettist, la-boheme : opera ) libretto-by( giacosa : librettist, loreley : opera ) libretto-by( giacosa : librettist, madama-butterfly : opera ) libretto-by( giacosa : librettist, manon-lescaut : opera ) libretto-by( giacosa : librettist, tosca : opera ) libretto-by( golisciani : librettist, gina : opera ) libretto-by( golisciani : librettist, marina : opera ) libretto-by( golisciani : librettist, marion-delorme : opera ) libretto-by( guidi : librettist, la-savoiarda : opera ) libretto-by( guidi : librettist, la-vergine-di-kermo : opera ) libretto-by( guidi : librettist, roderigo-re-dei-goti : opera ) libretto-by( hanau : librettist, risurrezione : opera ) libretto-by( hood : librettist, ib-and-little-christina : opera ) libretto-by( illica : librettist, andrea-chenier : opera ) libretto-by( illica : librettist, cornill-schut : opera ) libretto-by( illica : librettist, cristoforo-colombo : opera ) libretto-by( illica : librettist, germania : opera ) libretto-by( illica : librettist, giove-a-pompei : opera ) libretto-by( illica : librettist, hellera : opera ) libretto-by( illica : librettist, il-principe-zilah : opera ) libretto-by( illica : librettist, il-vassallo-di-szigeth : opera ) libretto-by( illica : librettist, iris : opera ) libretto-by( illica : librettist, isabeau : opera ) libretto-by( illica : librettist, la-boheme : opera ) libretto-by( illica : librettist, la-fonte-di-enschir : opera ) libretto-by( illica : librettist, la-wally : opera ) libretto-by( illica : librettist, le-maschere : opera ) libretto-by( illica : librettist, loreley : opera ) libretto-by( illica : librettist, madama-butterfly : opera ) libretto-by( illica : librettist, manon-lescaut : opera ) libretto-by( illica : librettist, nozze-istriane : opera ) libretto-by( illica : librettist, siberia : opera ) libretto-by( illica : librettist, tosca : opera ) libretto-by( leoncavallo : librettist, la-boheme2 : opera ) libretto-by( leoncavallo : librettist, pagliacci : opera ) libretto-by( leoncavallo : librettist, zaza : opera ) libretto-by( linati : librettist, falene : opera ) libretto-by( linati : librettist, la-terra-del-sogno : opera ) libretto-by( locle : librettist, aida : opera ) libretto-by( locle : librettist, don-carlos : opera ) libretto-by( lombardo : librettist, si : opera ) libretto-by( maffei : librettist, guglielmo-ratcliff : opera ) libretto-by( maffei : librettist, i-masnadieri : opera ) libretto-by( marenco : librettist, larlesiana : opera ) libretto-by( menasci : librettist, cavalleria-rusticana : opera ) libretto-by( menasci : librettist, i-rantzau : opera ) libretto-by( menasci : librettist, zanetto : opera ) libretto-by( mery : librettist, don-carlos : opera ) libretto-by( moschino : librettist, lombra-di-don-giovanni : opera ) libretto-by( moschino : librettist, tzigana : opera ) libretto-by( nessi : librettist, maia : opera ) libretto-by( oliva : librettist, manon-lescaut : opera ) libretto-by( piave : librettist, aroldo : opera ) libretto-by( piave : librettist, ernani : opera ) libretto-by( piave : librettist, i-due-foscari : opera ) libretto-by( piave : librettist, il-corsaro : opera ) libretto-by( piave : librettist, la-forza-del-destino : opera ) libretto-by( piave : librettist, la-traviata : opera ) libretto-by( piave : librettist, macbeth : opera ) libretto-by( piave : librettist, rigoletto : opera ) libretto-by( piave : librettist, simon-boccanegra : opera ) libretto-by( piave : librettist, stiffelio : opera ) libretto-by( piazza : librettist, oberto : opera ) libretto-by( pozza : librettist, bianca-da-cervia : opera ) libretto-by( pozza : librettist, il-vassallo-di-szigeth : opera ) libretto-by( praga-emilio : librettist, i-profughi-fiamminghi : opera ) libretto-by( praga-emilio : librettist, i-promessi-sposi : opera ) libretto-by( praga-marco : librettist, manon-lescaut : opera ) libretto-by( ricordi : librettist, la-nave : opera ) libretto-by( ricordi : librettist, manon-lescaut : opera ) libretto-by( romagnoli : librettist, giove-a-pompei : opera ) libretto-by( romani : librettist, un-giorno-di-regno : opera ) libretto-by( rossato : librettist, giulietta-e-romeo : opera ) libretto-by( rossato : librettist, i-cavalieri-di-ekebu : opera ) libretto-by( rossato : librettist, lultimo-lord : opera ) libretto-by( rossato : librettist, madonna-imperia : opera ) libretto-by( royer : librettist, jerusalem-o : opera ) libretto-by( salvatore-di-giacomo : librettist, mese-mariano : opera ) libretto-by( scribe : librettist, i-vespri-siciliani : opera ) libretto-by( scribe : librettist, il-figliuol-prodigo : opera ) libretto-by( scribe : librettist, un-ballo-in-maschera : opera ) libretto-by( simoni : librettist, madame-sans-gene : opera ) libretto-by( simoni : librettist, turandot : opera ) libretto-by( solera : librettist, attila : opera ) libretto-by( solera : librettist, giovanna-darco : opera ) libretto-by( solera : librettist, i-lombardi : opera ) libretto-by( solera : librettist, nabucco : opera ) libretto-by( solera : librettist, oberto : opera ) libretto-by( somma : librettist, un-ballo-in-maschera : opera ) libretto-by( strani : librettist, bianca : opera ) libretto-by( targioni-tozzetti : librettist, amica : opera ) libretto-by( targioni-tozzetti : librettist, cavalleria-rusticana : opera ) libretto-by( targioni-tozzetti : librettist, i-rantzau : opera ) libretto-by( targioni-tozzetti : librettist, il-piccolo-marat : opera ) libretto-by( targioni-tozzetti : librettist, nerone2 : opera ) libretto-by( targioni-tozzetti : librettist, pinotta : opera ) libretto-by( targioni-tozzetti : librettist, silvano : opera ) libretto-by( targioni-tozzetti : librettist, zanetto : opera ) libretto-by( ricordi-tito : librettist, francesca-da-rimini : opera ) libretto-by( schwab : librettist, francesca-da-rimini2 : opera ) libretto-by( vaez : librettist, jerusalem-o : opera ) libretto-by( valle : librettist, re-nala : opera ) libretto-by( vaucaire : librettist, conchita : opera ) libretto-by( zanardini : librettist, dejanice : opera ) libretto-by( zanardini : librettist, il-figliuol-prodigo : opera ) libretto-by( zanardini : librettist, la-tilda : opera ) ~ la-tilda-libretto-by libretto-by( zanardini : librettist, loreley : opera ) libretto-by( zangarini : librettist, conchita : opera ) libretto-by( zangarini : librettist, la-fanciulla-del-west : opera ) libretto-by( zanoni : librettist, loracolo : opera ) libretto-by( zanoni : librettist, raggio-di-luna : opera ) /* -- AT: written-by */ written-by( anicet-bourgeois : writer, nabuchodonosor : work ) written-by( bandello : writer, giulietta-e-romeo-src2 : work ) written-by( belasco : writer, madama-butterfly-src : work ) written-by( belasco : writer, the-girl-of-the-golden-west : work ) written-by( benelli : writer, la-cena-delle-beffe-src : work ) written-by( berton : writer, zaza-src : work ) written-by( bourgeois : writer, le-pasteur : work ) written-by( brazier : writer, catherine-ou-la-croix-dor : work ) written-by( bulwer-lytton : writer, harold : work ) written-by( byron : writer, parisina-src : work ) written-by( byron : writer, the-corsair : work ) written-by( byron : writer, the-two-foscari : work ) written-by( chatrian : writer, lami-fritz : work ) written-by( choudens : writer, work-by-paul-de-choudens : work ) written-by( clarette : writer, le-prince-zilah : work ) written-by( constant : writer, adolphe : work ) written-by( coppee : writer, le-passant : work ) written-by( cornu : writer, nabuchodonosor : work ) written-by( cortesi : writer, nabucodonosor : work ) written-by( crawford : writer, francesca-da-rimini-src2 : work ) written-by( cossa : writer, nerone-src : work ) written-by( da-porto : writer, giulietta-e-romeo-src : work ) written-by( dannunzio : writer, francesca-da-rimini-src : work ) written-by( dannunzio : writer, la-figlia-di-jorio-src : work ) written-by( dannunzio : writer, la-nave-src : work ) written-by( dante : writer, inferno : work ) written-by( daudet : writer, larlesienne : work ) written-by( dostoyevsky : writer, from-the-house-of-the-dead : work ) written-by( dumas-fils : writer, la-dame-aux-camelias : work ) written-by( erckmann : writer, lami-fritz : work ) written-by( fernald : writer, the-cat-and-the-cherub : work ) written-by( goethe : writer, faust : work ) written-by( gold : writer, la-houppelande : work ) written-by( goldoni : writer, le-baruffe-chiozotte-src : work ) written-by( gozzi : writer, turandot-src : work ) written-by( gubernatis : writer, il-ritorno : work ) written-by( gutierrez : writer, el-trovador : work ) written-by( gutierrez : writer, simon-boccanegra-src : work ) written-by( heine : writer, william-ratcliff : work ) written-by( heine : writer, deutschland : work ) written-by( hugo : writer, angelo : work ) written-by( hugo : writer, hernani : work ) written-by( hugo : writer, le-roi-samuse : work ) written-by( hugo : writer, marion-de-lorme : work ) written-by( irving : writer, rip-van-winkle-src : work ) written-by( kalidasa : writer, recognition-of-sakuntala : work ) written-by( karr : writer, histoire-de-romain-detretat : work ) written-by( karr : writer, les-willis : work ) written-by( lagerlof : writer, gosta-berlings-saga : work ) written-by( las-casas : writer, historia-de-las-indias : work ) written-by( legouve : writer, adrienne-lecouvreur : work ) written-by( longfellow : writer, the-spanish-student : work ) written-by( louys : writer, la-femme-et-le-pantin : work ) written-by( manzoni : writer, i-promessi-sposi-src : work ) written-by( melesville : writer, catherine-ou-la-croix-dor : work ) written-by( mery : writer, la-battaille-de-toulouse : work ) written-by( mickiewicz : writer, konrad-wallenrod : work ) written-by( moliere : writer, monsieur-de-pourceaugnac : work ) written-by( morselli : writer, glauco-src : work ) written-by( murger : writer, scenes-de-la-vie-de-boheme : work ) written-by( musset : writer, la-coupe-et-les-levres : work ) written-by( ouida : writer, two-little-wooden-shoes : work ) written-by( pineux-duval : writer, le-faux-stanislas : work ) written-by( prevost : writer, manon-lescaut-src : work ) written-by( rostand : writer, cyrano-de-bergerac-src : work ) written-by( rostand : writer, la-princesse-lointaine : work ) written-by( saavedra : writer, don-alvaro : work ) written-by( salvatore-di-giacomo : writer, o-voto : work ) written-by( salvatore-di-giacomo : writer, o-mese-mariano : work ) written-by( sardou : writer, fedora0 : work ) written-by( sardou : writer, la-haine : work ) written-by( sardou : writer, la-tosca : work ) written-by( schiller : writer, die-jungfrau-von-orleans : work ) written-by( schiller : writer, die-rauber : work ) written-by( schiller : writer, don-carlos-src : work ) written-by( schiller : writer, kabale-und-liebe : work ) written-by( schiller : writer, wallensteins-lager : work ) written-by( scribe : writer, adrienne-lecouvreur : work ) written-by( scribe : writer, piquillo-alliaga : work ) written-by( shakespeare : writer, hamlet : work ) written-by( shakespeare : writer, henry-iv : work ) written-by( shakespeare : writer, macbeth-src : work ) written-by( shakespeare : writer, merry-wives : work ) written-by( shakespeare : writer, othello : work ) written-by( simon : writer, zaza-src : work ) written-by( sophocles : writer, oedipus-tyrannus : work ) written-by( southey : writer, roderick : work ) written-by( souvestre : writer, le-pasteur : work ) written-by( tennyson : writer, godiva : work ) written-by( tolstoy : writer, resurrection : work ) written-by( verga : writer, cavalleria-rusticana-src : work ) written-by( vigny : writer, chatterton-src : work ) written-by( voltaire : writer, alzire : work ) written-by( von-hillern : writer, geyer-wally : work ) written-by( werner : writer, attila-src : work ) written-by( yeats : writer, land-of-hearts-desire : work ) written-by( zrinyi : writer, assedio-di-sziget : work ) /* SOME NOTES ON FEATURES USED IN THIS TOPIC MAP NOTE: References to tolog are to Ontopia's Topic Maps Query Language, tolog. To play with tolog, download the Omnigator and use the 'Query' plug-in. (http://www.ontopia.net/download/freedownload.html) * Published Subject Indicators (PSIs) Examples: - (from TopicMaps.Org) - XTM core ('sort', 'subtype-of', etc.) - country.xtm (soon to be changed to OASIS PSI sets at http://psi.oasis-open.org/) - language.xtm (ditto) - (from Ontopia) - cities, transitivity, metadata occurrence type, plural name - most typing topics - (from Techquila) - hierarchical relation type * Multiple topic types - boito, illica, giacosa, fontana, forzano, england, scotland, wales - This tolog query finds them all: select $T from direct-instance-of($T, $TYPE1), direct-instance-of($T, $TYPE2), $TYPE1 /= $TYPE2? * N-ary associations - killed-by * role types: perpetrator, victim, cause of death - (this tolog query finds n-ary association types in any topic map:) select $TYPE from association-role($A, $R1), association-role($A, $R2), association-role($A, $R3), $R1 /= $R2, $R1 /= $R3, $R2 /= $R3, type($A, $TYPE)? - part-of (opera in triptych, e.g. "Il tabarro" in "Il trittico") * originally modelled as an n-ary association, but now changed to binary associations (this is an example of an n-ary association in which no information is lost by using (n-1) binary associations instead a single n-ary association; the former is to be preferred wherever this is the case since binary associations are generally easier to process: navigate, display, query, etc.) * use Omnigator query plug-in to find arias sung by more than one character * scope - names in different languages (e.g. i-vespri-siciliani) - by association role type for (names of) association types (e.g. written-by) - related to topic naming constraint + opera/character (e.g. tosca, turandot, iris, edgar) + opera/opera (e.g. nerone, la-boheme) [scoped by composer] + opera/play (e.g. macbeth) * self-documentation facility for editorial scope-note, i.e. occurrences on - typing topics (e.g. region) - scoping topics (e.g. nom-de-plume) * single resource an occurrence of multiple topics - http://www.metopera.org/synopses/cavpag.html (synopsis of both cavalleria-rusticana and pagliacci) * resource with multiple facets - http://www.giuseppeverdi.it/verdi/libretti/Aida.htm (aida) + language = italian + network-location = web + source = land-of-verdi * reification of - occurrences (pauld-website -> oc-pauld-website) - associations (turandot-beijing -> a-turandot-beijing) - topic map (operatm -> operatm-tm) * topics that are both instances and classes - aria (and other art forms) * class hierarchies - person, place, work * modularization - XTM version uses mergeMap to include opera-template, geography, history, and ontopsi topic maps * multiple topic maps based on a single ontology - sevilla.xtm uses the same ontology as opera.xtm RECENT CHANGES TO ONTOLOGY (MAJOR): * changed "composed-by" to use role type "work" instead of "opera" - more generic; same association type can be used for any kind of musical work TODO: * rename association type "takes-place-in" to be more consistent with its names * change role type 'opera' in 'takes-place-in' to 'work' - ditto for 'published-by' * revisit all basenames whose scope is comprised of more than one topic: - consider removing those that are only there because of the topic naming constraint (since the TNC will go away in the next version of ISO 13250) - consider duplicating other names that are valid in multiple scopes (e.g. e.g. composer = "komponist" / norwegian german * consider removing usages of scope on associations that relate to assocation type (e.g. born-in => geography) ... this is not an appropriate use of scope (the scope 'geography' is a "property" of the association type 'born-in', not the individual associations) * consider making "first last" the default name for persons with "last, first" as a scoped basename or variant (perhaps in a scope that is recognized by the Omnigator as being the "index form", or some such) * add link to http://www.turandot-agentur.de/turandot.htm (?) * add links to Dizionario dell'Opera pages (http://www.delteatro.it/hdoc/diz2home.asp) * ensure that facets are applied consistently across all occurrences - or perhaps get rid of them altogether? * add validation to ensure that facets for location, source, and language are specified for all resources? * update sources section * add more examples of single resource being an occurrence of multiple topics (e.g. SNL composer articles: mention) * add singers that originally created each role (see role-created-by.dat) (types="singer") with associations to voice type * add more 'scope-note' definitions for typing topics (like 'region') * add more detail to Mascagni from mascagni.org * add english occurrences from giuseppeverdi.it * add more synopses from opera-l @ http://www.orc.soton.ac.uk/ngb/list2.html * complete following information for each composer: pupil-of composition (all mature/completed operas) exponent-of * complete following information for each opera: premiere written-by based-on appears-in part-of takes-place-in OK: puccini (more-or-less, except arias) * complete following information for each character: role-created-by (see role-created-by.dat) OK: puccini (except Le Villi and Edgar) * add metadata for - opera first performance (a few operas don't have it) * document more features * create located-in associations for middle-east and south-america * decide whether the "same" character appearing in two operas should be one subject or two (e.g. Rodolfo in Puccini and Leoncavallo's "La bohème") - currently one, but this screws up "role-created-by" (and probably "has-voice") ... unless those associations are scoped by the opera - are the Rodolfos in the two La Bohèmes "the same" in a different sense than a historical figure who happens to be a character in two operas whose stories are quite different? find an example - changed (2006-07-18) to separate characters; having just one bought us nothing (except more complicated applications) * contact wolfgang250@yahoo.com (http://members.tripod.com/~Wolfgang5/index-2.html) * contact Joyce Bourne NOTES ON N-ARY ASSOCIATIONS: - in a "frames interface", binary associations can be displayed one-per-line in the context of one of the associated topics, with each line showing the name (and role) of the other associated topic - in a "network interface", binary associations can be displayed as arcs between nodes representing the associated topics - these display mechanisms don't work with n-ary associations - some n-ary associations can be factorized into binary associations... [puccini].composer.(composed).work.[tosca];.work.[turandot];.work.[etc.] can equally well be modelled as [puccini].composer.(composed).work.[tosca] [puccini].composer.(composed).work.[turandot] [puccini].composer.(composed).work.[etc.] - but this can't always (if ever?) be done automagically: [tosca].work.(composed).work.[turandot] (generated from n-ary example above) would be meaningless - some just can't be factorized (the association loses all meaning): e.g. ... - also consider situation when same topic plays multiple roles in the same association (e.g. Liú as both victim and perpetrator in 'killed-by'): * should association be shown twice, once for each of the roles played? * if not, how to choose a name for the association type (should one role be regarded as 'primary')? - Tosca in 'killed-by' even more confusing than Liú: partakes in two such associations (death of Scarpia, and own suicide), and plays two roles in one of them (own suicide) - discuss 'appears-in' with especial reference to sort order QUERIES: (1) Find all topics that have two names in the scope short-name: select $T from topic-name($T, $N), scope($N, short-name), topic-name($T, $M), scope($M, short-name), $N /= $M? (2) Find all persons (except characters) that don't have a short name select $T from instance-of($T, person), not(instance-of($T, character)), not( topic-name($T, $N), scope($N, short-name) )? Design issues: (1) Distinguishing topic typing topics and association role typing topics For example is the subject "composer" that describes a class of topics different from the subject "composer" that types the role played by certain topics in certain associations? If so, they should be two different topics, e.g. "composer" and "ar-composer" This topic map originally made that distinction, but it seems now to make no sense. Surely the subject is to all intents and purposes the same, whether or not the topic is typing topics or association roles. Bernard Vatant disagrees vehemently with this: See posting in topicmaps-comment Fri, 11 Jan 2002 22:53:30 +0100 and distinction between "auteur" and "écrivain". Sowa discusses role and type in KR (p.80) as follows: "An entity's appearance independent of context is sufficient to classify it by a phenomenal type, but context is essential for classifying it by role. The type Nail, for example, is a phenomenal type - long and thin with a point at one end. A common use of a nail is to fasten things made of wood; in that context a nail would be a fastener. But fastener is a role type that could be applied to many things of many different phenomenal types: Nail, Tape, Hook, Button String or PaperClip" Perhaps it is also a matter of the degree of precision required for the purposes of a particular application? In this topic map it really doesn't make any sense to distinguish between composer as a type and composer as a role, because here every topic that ever plays the role composer is also of type composer. But in a topic map about music in the Tudor period, Henry VIII would not be a topic of type composer even though he plays that role in the composedBy association with the topic Greensleeves... (2) Topic types or association types The preceding issue is related to this one, typified by the Benny Goodman example: Is BG a topic of type "clarinettist", or a topic of type "musician" (or even "person") who plays a role in an association (of type "player-of") with the topic "clarinet"? A similar question arose in this topic map when expressing the voice types of characters in operas. Originally the character Tosca was an instance of TWO classes (character and soprano). Now she is just a character who plays a role in a "has-voice" association with the topic "soprano". (2) Multiple s vs. multiple s A topic can have multiple topname elements, and a topname can have multiple basename elements. What is the significance of choosing the one or the other? XTM removed this possibility. What is the mapping between the two. (Should be clearly specified in the Standard Application Model.) (3) Distinguishing very similar association types... assoc type 'written-by' has two different pairs of assocrls: opera/librettist and work/writer Consider the consequences of this... Is the type of the 'written-by' association between Tosca ('opera') and Illica ('librettist') the same as the 'written-by' association between La Tosca ('work') and Sardou ('writer')? (4) General rules for scoping due to topic naming constraint: - by type (if different) - by creator (if works of same type) - by country (if places of same type) (5) Geographical ontology: city > region > country > region (6) Ensuring that every topic has a name in the unconstrained scope: - in order to avoid the topic naming constraint, some names must be qualified (usually by their type, in parens after the name), e.g. Simon Boccanegra (play) Tosca (character) La Bohème (Leoncavallo) Beppe (Pagliacci) SCOPE NOTES: - include all characters that have singing roles and are mentioned in "Who's Who in Opera" - for operas not covered in "Who's who" ...??? SOURCES: - bibref($TOPIC, $BIBLIOGRAPHY) order by $TOPIC, $BIBLIOGRAPHY? - select $TOPIC from instance-of($TOPIC, publisher), not(published-by($TOPIC : publisher, $OPERA : work), instance-of($OPERA, opera)) order by $TOPIC? */ diff --git a/sandbox/toma/CHANGES.txt b/sandbox/toma/CHANGES.txt deleted file mode 100644 index 9c48e4abc..000000000 --- a/sandbox/toma/CHANGES.txt +++ /dev/null @@ -1,19 +0,0 @@ -=========== -Changes Log -=========== - -1.0.1 (31.05.2010) ---------------------- - -* Support for parentheses in or/and clauses - - -1.0.0 (21.04.2010) ---------------------- - -* Initial release - -Known Issues: ---------- -* Complex OR expressions with multiple unbound variables do not work. -* NOT EXISTS clause does not work for associations yet. diff --git a/sandbox/toma/LICENSE.txt b/sandbox/toma/LICENSE.txt deleted file mode 100644 index 261eeb9e9..000000000 --- a/sandbox/toma/LICENSE.txt +++ /dev/null @@ -1,201 +0,0 @@ - Apache License - Version 2.0, January 2004 - http://www.apache.org/licenses/ - - TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION - - 1. Definitions. - - "License" shall mean the terms and conditions for use, reproduction, - and distribution as defined by Sections 1 through 9 of this document. - - "Licensor" shall mean the copyright owner or entity authorized by - the copyright owner that is granting the License. - - "Legal Entity" shall mean the union of the acting entity and all - other entities that control, are controlled by, or are under common - control with that entity. For the purposes of this definition, - "control" means (i) the power, direct or indirect, to cause the - direction or management of such entity, whether by contract or - otherwise, or (ii) ownership of fifty percent (50%) or more of the - outstanding shares, or (iii) beneficial ownership of such entity. - - "You" (or "Your") shall mean an individual or Legal Entity - exercising permissions granted by this License. - - "Source" form shall mean the preferred form for making modifications, - including but not limited to software source code, documentation - source, and configuration files. - - "Object" form shall mean any form resulting from mechanical - transformation or translation of a Source form, including but - not limited to compiled object code, generated documentation, - and conversions to other media types. - - "Work" shall mean the work of authorship, whether in Source or - Object form, made available under the License, as indicated by a - copyright notice that is included in or attached to the work - (an example is provided in the Appendix below). - - "Derivative Works" shall mean any work, whether in Source or Object - form, that is based on (or derived from) the Work and for which the - editorial revisions, annotations, elaborations, or other modifications - represent, as a whole, an original work of authorship. For the purposes - of this License, Derivative Works shall not include works that remain - separable from, or merely link (or bind by name) to the interfaces of, - the Work and Derivative Works thereof. - - "Contribution" shall mean any work of authorship, including - the original version of the Work and any modifications or additions - to that Work or Derivative Works thereof, that is intentionally - submitted to Licensor for inclusion in the Work by the copyright owner - or by an individual or Legal Entity authorized to submit on behalf of - the copyright owner. For the purposes of this definition, "submitted" - means any form of electronic, verbal, or written communication sent - to the Licensor or its representatives, including but not limited to - communication on electronic mailing lists, source code control systems, - and issue tracking systems that are managed by, or on behalf of, the - Licensor for the purpose of discussing and improving the Work, but - excluding communication that is conspicuously marked or otherwise - designated in writing by the copyright owner as "Not a Contribution." - - "Contributor" shall mean Licensor and any individual or Legal Entity - on behalf of whom a Contribution has been received by Licensor and - subsequently incorporated within the Work. - - 2. Grant of Copyright License. Subject to the terms and conditions of - this License, each Contributor hereby grants to You a perpetual, - worldwide, non-exclusive, no-charge, royalty-free, irrevocable - copyright license to reproduce, prepare Derivative Works of, - publicly display, publicly perform, sublicense, and distribute the - Work and such Derivative Works in Source or Object form. - - 3. Grant of Patent License. Subject to the terms and conditions of - this License, each Contributor hereby grants to You a perpetual, - worldwide, non-exclusive, no-charge, royalty-free, irrevocable - (except as stated in this section) patent license to make, have made, - use, offer to sell, sell, import, and otherwise transfer the Work, - where such license applies only to those patent claims licensable - by such Contributor that are necessarily infringed by their - Contribution(s) alone or by combination of their Contribution(s) - with the Work to which such Contribution(s) was submitted. If You - institute patent litigation against any entity (including a - cross-claim or counterclaim in a lawsuit) alleging that the Work - or a Contribution incorporated within the Work constitutes direct - or contributory patent infringement, then any patent licenses - granted to You under this License for that Work shall terminate - as of the date such litigation is filed. - - 4. Redistribution. You may reproduce and distribute copies of the - Work or Derivative Works thereof in any medium, with or without - modifications, and in Source or Object form, provided that You - meet the following conditions: - - (a) You must give any other recipients of the Work or - Derivative Works a copy of this License; and - - (b) You must cause any modified files to carry prominent notices - stating that You changed the files; and - - (c) You must retain, in the Source form of any Derivative Works - that You distribute, all copyright, patent, trademark, and - attribution notices from the Source form of the Work, - excluding those notices that do not pertain to any part of - the Derivative Works; and - - (d) If the Work includes a "NOTICE" text file as part of its - distribution, then any Derivative Works that You distribute must - include a readable copy of the attribution notices contained - within such NOTICE file, excluding those notices that do not - pertain to any part of the Derivative Works, in at least one - of the following places: within a NOTICE text file distributed - as part of the Derivative Works; within the Source form or - documentation, if provided along with the Derivative Works; or, - within a display generated by the Derivative Works, if and - wherever such third-party notices normally appear. The contents - of the NOTICE file are for informational purposes only and - do not modify the License. You may add Your own attribution - notices within Derivative Works that You distribute, alongside - or as an addendum to the NOTICE text from the Work, provided - that such additional attribution notices cannot be construed - as modifying the License. - - You may add Your own copyright statement to Your modifications and - may provide additional or different license terms and conditions - for use, reproduction, or distribution of Your modifications, or - for any such Derivative Works as a whole, provided Your use, - reproduction, and distribution of the Work otherwise complies with - the conditions stated in this License. - - 5. Submission of Contributions. Unless You explicitly state otherwise, - any Contribution intentionally submitted for inclusion in the Work - by You to the Licensor shall be under the terms and conditions of - this License, without any additional terms or conditions. - Notwithstanding the above, nothing herein shall supersede or modify - the terms of any separate license agreement you may have executed - with Licensor regarding such Contributions. - - 6. Trademarks. This License does not grant permission to use the trade - names, trademarks, service marks, or product names of the Licensor, - except as required for reasonable and customary use in describing the - origin of the Work and reproducing the content of the NOTICE file. - - 7. Disclaimer of Warranty. Unless required by applicable law or - agreed to in writing, Licensor provides the Work (and each - Contributor provides its Contributions) on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or - implied, including, without limitation, any warranties or conditions - of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A - PARTICULAR PURPOSE. You are solely responsible for determining the - appropriateness of using or redistributing the Work and assume any - risks associated with Your exercise of permissions under this License. - - 8. Limitation of Liability. In no event and under no legal theory, - whether in tort (including negligence), contract, or otherwise, - unless required by applicable law (such as deliberate and grossly - negligent acts) or agreed to in writing, shall any Contributor be - liable to You for damages, including any direct, indirect, special, - incidental, or consequential damages of any character arising as a - result of this License or out of the use or inability to use the - Work (including but not limited to damages for loss of goodwill, - work stoppage, computer failure or malfunction, or any and all - other commercial damages or losses), even if such Contributor - has been advised of the possibility of such damages. - - 9. Accepting Warranty or Additional Liability. While redistributing - the Work or Derivative Works thereof, You may choose to offer, - and charge a fee for, acceptance of support, warranty, indemnity, - or other liability obligations and/or rights consistent with this - License. However, in accepting such obligations, You may act only - on Your own behalf and on Your sole responsibility, not on behalf - of any other Contributor, and only if You agree to indemnify, - defend, and hold each Contributor harmless for any liability - incurred by, or claims asserted against, such Contributor by reason - of your accepting any such warranty or additional liability. - - END OF TERMS AND CONDITIONS - - APPENDIX: How to apply the Apache License to your work. - - To apply the Apache License to your work, attach the following - boilerplate notice, with the fields enclosed by brackets "[]" - replaced with your own identifying information. (Don't include - the brackets!) The text should be enclosed in the appropriate - comment syntax for the file format. We also recommend that a - file or class name and description of purpose be included on the - same "printed page" as the copyright notice for easier - identification within third-party archives. - - Copyright [yyyy] [name of copyright owner] - - Licensed under the Apache License, Version 2.0 (the "License"); - you may not use this file except in compliance with the License. - You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - - Unless required by applicable law or agreed to in writing, software - distributed under the License is distributed on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - See the License for the specific language governing permissions and - limitations under the License. diff --git a/sandbox/toma/README.txt b/sandbox/toma/README.txt deleted file mode 100644 index 8996ea8ea..000000000 --- a/sandbox/toma/README.txt +++ /dev/null @@ -1,26 +0,0 @@ -==================================== -TOMA - A topic map query language -==================================== - -What is TOMA? ----------------- -TOMA is an implementation of a topic map query language for the -open-source topic map engine Ontopia. - - -Installation ------------- -No real installation needed, simply put the ``toma-x.y.z.jar`` into -your classpath. That's all. :) - -Documentation ------------- -An introduction, together with the specification and sample queries can -be found at the respective wiki page of the Ontopia project -. - - -License -------- -TOMA is licensed under the Apache License Version 2.0, see LICENSE.txt -for details. diff --git a/sandbox/toma/doc/TW_UM_TOMA_110.pdf b/sandbox/toma/doc/TW_UM_TOMA_110.pdf deleted file mode 100644 index 9956bd6a6..000000000 Binary files a/sandbox/toma/doc/TW_UM_TOMA_110.pdf and /dev/null differ diff --git a/sandbox/toma/doc/license.txt b/sandbox/toma/doc/license.txt deleted file mode 100644 index faaff61a8..000000000 --- a/sandbox/toma/doc/license.txt +++ /dev/null @@ -1,16 +0,0 @@ -Copyright (C) ${year} ${holder} - <${contact}> - -This file is part of the Ontopia project. - -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. diff --git a/sandbox/toma/pom.xml b/sandbox/toma/pom.xml deleted file mode 100644 index cb0d02299..000000000 --- a/sandbox/toma/pom.xml +++ /dev/null @@ -1,140 +0,0 @@ - - 4.0.0 - net.ontopia - toma - jar - Ontopia TOMA query language - 1.0.1 - http://code.google.com/p/ontopia/wiki/TomaImplementation - 2009 - - - - tn - Thomas Neidhart - thomas.neidhart@spaceapplications.com - Space Applications Services - http://www.spaceapplications.com/ - - - - https://ontopia.googlecode.com/svn/trunk/sandbox/toma - - - - - net.ontopia - ontopia-engine - 5.1.0-SNAPSHOT - - - saxon - saxon - - - - - junit - junit - 3.8.2 - test - - - - - - - maven-compiler-plugin - - 1.5 - 1.5 - - - - org.codehaus.mojo - antlr-maven-plugin - - ${basedir}/src/main/java/net/ontopia/topicmaps/query/toma/parser - ${basedir}/src/main/java/net/ontopia/topicmaps/query/toma/parser - - toma.g - - - - - generate - - - - - - maven-assembly-plugin - - - src/main/assembly/jar-assembly.xml - - - - net.ontopia.topicmaps.query.toma.tools.QueryTool - - - - - - simple-command - package - - attached - - - - - - com.google.code.maven-license-plugin - maven-license-plugin - -
    ${basedir}/doc/license.txt
    - - src/main/java/**/*.java - - - ${project.name} - ${project.inceptionYear} - Space Applications Services - thomas.neidhart@spaceapplications.com - - UTF-8 -
    - - - - check - - - -
    -
    -
    - - - - Ontopia - http://ontopia.googlecode.com/svn/maven-repository - - - Ontopia-Snapshot - http://ontopia.googlecode.com/svn/maven-snapshot-repository - - - - - - mc-release - http://mc-repo.googlecode.com/svn/maven2/releases - - -
    diff --git a/sandbox/toma/src/main/assembly/jar-assembly.xml b/sandbox/toma/src/main/assembly/jar-assembly.xml deleted file mode 100644 index f28216e67..000000000 --- a/sandbox/toma/src/main/assembly/jar-assembly.xml +++ /dev/null @@ -1,19 +0,0 @@ - - full - - jar - - false - - - true - runtime - - - - - ${project.build.outputDirectory} - - - - diff --git a/sandbox/toma/src/main/java/net/ontopia/topicmaps/query/toma/impl/basic/BasicExpressionIF.java b/sandbox/toma/src/main/java/net/ontopia/topicmaps/query/toma/impl/basic/BasicExpressionIF.java deleted file mode 100644 index cc72c6101..000000000 --- a/sandbox/toma/src/main/java/net/ontopia/topicmaps/query/toma/impl/basic/BasicExpressionIF.java +++ /dev/null @@ -1,36 +0,0 @@ -/** - * Copyright (C) 2009 Space Applications Services - * - * - * This file is part of the Ontopia project. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -package net.ontopia.topicmaps.query.toma.impl.basic; - -import net.ontopia.topicmaps.query.core.InvalidQueryException; -import net.ontopia.topicmaps.query.toma.parser.ast.ExpressionIF; - -/** - * INTERNAL: Derived interface for expressions that are being evaluated - * by the {@link BasicQueryProcessor}. - */ -public interface BasicExpressionIF extends ExpressionIF { - /** - * Evaluate the expression based on the local context. - * - * @param context the local context to be used for evaluation. - * @return the result of the evaluation as a {@link ResultSet}. - */ - public ResultSet evaluate(LocalContext context) throws InvalidQueryException; -} diff --git a/sandbox/toma/src/main/java/net/ontopia/topicmaps/query/toma/impl/basic/BasicFunctionIF.java b/sandbox/toma/src/main/java/net/ontopia/topicmaps/query/toma/impl/basic/BasicFunctionIF.java deleted file mode 100644 index 142bd3ed9..000000000 --- a/sandbox/toma/src/main/java/net/ontopia/topicmaps/query/toma/impl/basic/BasicFunctionIF.java +++ /dev/null @@ -1,48 +0,0 @@ -/** - * Copyright (C) 2009 Space Applications Services - * - * - * This file is part of the Ontopia project. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -package net.ontopia.topicmaps.query.toma.impl.basic; - -import java.util.Collection; - -import net.ontopia.topicmaps.query.core.InvalidQueryException; - -/** - * INTERNAL: Derived interface for functions that are being evaluated - * by the {@link BasicQueryProcessor}. - */ -public interface BasicFunctionIF extends BasicExpressionIF { - - /** - * Perform evaluation of the function on a specific input value. - * @param obj the input value. - * @return the result of the execution. - */ - public String evaluate(Object obj) throws InvalidQueryException; - - /** - * Aggregates a collection of values together, based on the definition of the - * actual function. - * - * @param values the values to be aggregated. - * @return the aggregated value. - * @throws InvalidQueryException if the function is not capable to aggregate - * values. - */ - public Object aggregate(Collection values) throws InvalidQueryException; -} diff --git a/sandbox/toma/src/main/java/net/ontopia/topicmaps/query/toma/impl/basic/BasicPathElementIF.java b/sandbox/toma/src/main/java/net/ontopia/topicmaps/query/toma/impl/basic/BasicPathElementIF.java deleted file mode 100644 index 3c6a4465a..000000000 --- a/sandbox/toma/src/main/java/net/ontopia/topicmaps/query/toma/impl/basic/BasicPathElementIF.java +++ /dev/null @@ -1,66 +0,0 @@ -/** - * Copyright (C) 2009 Space Applications Services - * - * - * This file is part of the Ontopia project. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -package net.ontopia.topicmaps.query.toma.impl.basic; - -import java.util.Collection; - -import net.ontopia.topicmaps.query.core.InvalidQueryException; - -/** - * INTERNAL: Specialization of the PathElementIF interface for the - * BasicQueryProcessor implementation. - */ -public interface BasicPathElementIF { - - /** - * Evaluate an path element based on the current context and the input value. - * The result is a collection of values, as one input can generate multiple - * outputs (e.g. names of a topic). - * - * @param context the current processing context. - * @param input the input value to be evaluated. - * @return a Collection of results. - * @throws InvalidQueryException if the path element could not be evaluated - * because of syntactic or semantic error in the query definition. - */ - public Collection evaluate(LocalContext context, Object input) - throws InvalidQueryException; - - /** - * Initialize the resultset layout for the current context. - * - * @param context the current context. - */ - public void initResultSet(LocalContext context); - - /** - * Get the number of columns this path element will generate in the - * evaluation. - * - * @return the number of result columns. - */ - public int getResultSize(); - - /** - * Get the names of the result columns this path element will generate. - * - * @return an array containing the names of the result columns. - */ - public String[] getColumnNames(); -} diff --git a/sandbox/toma/src/main/java/net/ontopia/topicmaps/query/toma/impl/basic/BasicQueryProcessor.java b/sandbox/toma/src/main/java/net/ontopia/topicmaps/query/toma/impl/basic/BasicQueryProcessor.java deleted file mode 100644 index 2975960f6..000000000 --- a/sandbox/toma/src/main/java/net/ontopia/topicmaps/query/toma/impl/basic/BasicQueryProcessor.java +++ /dev/null @@ -1,489 +0,0 @@ -/** - * Copyright (C) 2009 Space Applications Services - * - * - * This file is part of the Ontopia project. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -package net.ontopia.topicmaps.query.toma.impl.basic; - -import java.io.IOException; -import java.io.Reader; -import java.util.ArrayList; -import java.util.Collections; -import java.util.HashMap; -import java.util.List; -import java.util.Map; - -import net.ontopia.topicmaps.core.TopicMapIF; -import net.ontopia.topicmaps.query.core.DeclarationContextIF; -import net.ontopia.topicmaps.query.core.InvalidQueryException; -import net.ontopia.topicmaps.query.core.ParsedModificationStatementIF; -import net.ontopia.topicmaps.query.core.ParsedQueryIF; -import net.ontopia.topicmaps.query.core.QueryProcessorIF; -import net.ontopia.topicmaps.query.core.QueryResultIF; -import net.ontopia.topicmaps.query.toma.impl.basic.function.AbstractAggregateFunction; -import net.ontopia.topicmaps.query.toma.impl.utils.QueryTracer; -import net.ontopia.topicmaps.query.toma.parser.LocalParseContext; -import net.ontopia.topicmaps.query.toma.parser.TomaParser; -import net.ontopia.topicmaps.query.toma.parser.ast.ExpressionIF; -import net.ontopia.topicmaps.query.toma.parser.ast.QueryOrder; -import net.ontopia.topicmaps.query.toma.parser.ast.SelectStatement; -import net.ontopia.topicmaps.query.toma.parser.ast.TomaQuery; - -/** - * PUBLIC: QueryProcessor implementation for the TOMA query language. This is - * the basic implementation, that should be used for topic maps stored in a - * memory backend. For database backends, this QueryProcessor will be quite - * slow. - */ -public class BasicQueryProcessor implements QueryProcessorIF { - private TopicMapIF topicmap; - - /** - * Create a new query processor, that operates on the specified topic map. - * - * @param topicmap the topic map to be used by this query processor. - */ - public BasicQueryProcessor(TopicMapIF topicmap) { - this.topicmap = topicmap; - } - - public int update(String query) throws InvalidQueryException { - throw new InvalidQueryException("Not implemented yet."); - } - - public int update(String query, Map arguments, - DeclarationContextIF context) throws InvalidQueryException { - throw new InvalidQueryException("Not implemented yet."); - } - - public int update(String query, Map arguments) - throws InvalidQueryException { - throw new InvalidQueryException("Not implemented yet."); - } - - public QueryResultIF execute(String query, Map arguments, - DeclarationContextIF context) throws InvalidQueryException { - ParsedQueryIF pq = parse(query, context); - return pq.execute(); - } - - public QueryResultIF execute(String query, DeclarationContextIF context) - throws InvalidQueryException { - return execute(query, null, context); - } - - public QueryResultIF execute(String query, Map arguments) - throws InvalidQueryException { - return execute(query, arguments, null); - } - - /** - * Executes the parsed TOMA query and returns a {@link QueryResultIF} object. - * - * @param query the parsed TOMA query. - * @return the result of the query. - * @throws InvalidQueryException if the query can not be evaluated properly. - */ - public QueryResultIF execute(TomaQuery query) throws InvalidQueryException { - ResultSet rs = evaluate(query); - List rows = rs.getList(); - sort(rows, query.getOrderBy()); - QueryTracer.endQuery(); - return new QueryResult(rs.getColumnDefinitions(), rows, query.getLimit(), - query.getOffset()); - } - - /** - * Evaluates a {@link TomaQuery} and returns a {@link ResultSet}. - * - * @param query the query to be evaluated - * @return the {@link ResultSet}. - * @throws InvalidQueryException if the query can not be evaluated properly. - */ - public ResultSet evaluate(TomaQuery query) throws InvalidQueryException { - ResultSet rs = null; - QueryTracer.startQuery(); - for (int i = 0; i < query.getStatementCount(); i++) { - SelectStatement stmt = query.getStatement(i); - - ResultSet curr = satisfy(stmt); - curr = aggregate(stmt, curr); - - if (rs == null) { - rs = curr; - } else { - switch (stmt.getUnionType()) { - case UNION: - rs.union(curr, true); - break; - case UNIONALL: - rs.union(curr, false); - break; - case INTERSECT: - rs.intersect(curr); - break; - case EXCEPT: - rs.except(curr); - break; - } - } - } - return rs; - } - - /** - * Returns a {@link ResultSet} containing all the matches of a single select - * statement. - * - * @param stmt the select statement to evaluate. - * @return a {@link ResultSet} containing all matches. - * @throws InvalidQueryException if the statement could not be evaluated. - */ - private ResultSet satisfy(SelectStatement stmt) throws InvalidQueryException { - BasicExpressionIF expr = (BasicExpressionIF) stmt.getClause(); - LocalContext context = new LocalContext(topicmap, this); - - // set column names - ResultSet rs = new ResultSet(stmt.getSelectCount(), stmt.isDistinct()); - for (int i = 0; i < stmt.getSelectCount(); i++) { - BasicExpressionIF selectPath = (BasicExpressionIF) stmt.getSelect(i); - rs.setColumnName(i, selectPath.toString()); - } - - // evaluate the WHERE expression tree - expr.evaluate(context); - - QueryTracer.enterSelect(null); - //Row r = rs.createRow(); - //calculateMatches(context, 0, r, rs, stmt); - calculateMatches(context, stmt, rs); - QueryTracer.leaveSelect(null); - - return rs; - } - - private void calculateMatches(LocalContext context, SelectStatement stmt, - ResultSet rs) throws InvalidQueryException { - BasicExpressionIF firstExpr = (BasicExpressionIF) stmt.getSelect(0); - ResultSet firstRS = firstExpr.evaluate(context); - - Map fillMap = new HashMap(); - List evalList = new ArrayList(); - - for (int idx=1; idx mapEntry : fillMap.entrySet()) { - val = row.getValue(mapEntry.getValue()); - newRow.setValue(mapEntry.getKey(), val); - } - - // the rest of the select expressions has to be evaluated - if (!evalList.isEmpty()) { - localResult.removeAllRows(); - localResult.addRow(row); - - calculateMatches(newContext, 0, evalList, newRow, rs, stmt); - } else { - rs.addRow(newRow); - } - } - } - - private void calculateMatches(LocalContext context, int evalIndex, - List evalList, Row row, ResultSet rs, SelectStatement stmt) - throws InvalidQueryException { - int index = evalList.get(evalIndex); - BasicExpressionIF expr = (BasicExpressionIF) stmt.getSelect(index); - ResultSet values = expr.evaluate(context); - - LocalContext newContext = null; - try { - newContext = (LocalContext) context.clone(); - } catch (CloneNotSupportedException e) { - throw new InvalidQueryException("Internal QueryProcessor error:\n", e); - } - - ResultSet localResult = new ResultSet(values); - newContext.addResultSet(localResult); - - int cnt = 0; - for (Row r : values) { - Object val = r.getLastValue(); - - // for each value, a new row in the ResultSet will be created - Row newRow = row; - - // only clone the row if there is more than 1 value in the ResultSet - if (++cnt > 1) { - try { - newRow = (Row) row.clone(); - } catch (CloneNotSupportedException e) { - throw new InvalidQueryException("Internal QueryProcessor error:\n", e); - } - } - - newRow.setValue(index, val); - - // update the context with the current variable binding - localResult.removeAllRows(); - localResult.addRow(r); - - // if we are not at the end -> recursion - if (evalIndex < (evalList.size() - 1)) { - calculateMatches(newContext, evalIndex + 1, evalList, newRow, rs, stmt); - } else { - rs.addRow(newRow); - } - } - } - -// NOTE: old code to create the select matches. This one is considerably -// slower than the new one. -// -// private void calculateMatches(LocalContext context, int index, Row row, -// ResultSet rs, SelectStatement stmt) throws InvalidQueryException { -// BasicExpressionIF expr = (BasicExpressionIF) stmt.getSelect(index); -// ResultSet values = expr.evaluate(context); -// try { -// LocalContext newContext = (LocalContext) context.clone(); -// ResultSet localResult = new ResultSet(values); -// newContext.addResultSet(localResult); -// -// for (Row r : values) { -// Object val = r.getLastValue(); -// // ignore null values in the first select clause -// if (val == null && index == 0) { -// continue; -// } -// -// // for each value, a new row in the ResultSet will be created -// Row newRow = (Row) row.clone(); -// newRow.setValue(index, val); -// -// // update the context with the current variable binding -// localResult.removeAllRows(); -// localResult.addRow(r); -// -// // if we are not at the end -> recursion -// if (index < (stmt.getSelectCount() - 1)) { -// calculateMatches(newContext, index + 1, newRow, rs, stmt); -// } else { -// rs.addRow(newRow); -// } -// } -// } catch (CloneNotSupportedException e) { -// throw new InvalidQueryException("Internal QueryProcessor error:\n", e); -// } -// } - - /** - * Returns a {@link ResultSet} that has been aggregated according to the given - * {@link SelectStatement}. - * - * @param stmt the {@link SelectStatement} containing the aggregation rules. - * @param rs the {@link ResultSet} containing the matches. - * @return an aggregated {@link ResultSet}. - * @throws InvalidQueryException if the {@link ResultSet} could not be aggregated. - */ - private ResultSet aggregate(SelectStatement stmt, ResultSet rs) - throws InvalidQueryException { - // if the select is aggregated (i.e. contains at least one aggregation - // function), evaluate the aggregate functions now; otherwise just return - // the ResultSet. - if (stmt.isAggregated()) { - // in case all select expressions are aggregated we can simply - // evaluate the columns separately - if (stmt.getSelectCount() == stmt.getAggregatedSelectCount()) { - ResultSet result = new ResultSet(rs); - Row aggregatedRow = result.createRow(); - for (int i = 0; i < stmt.getSelectCount(); i++) { - // we know, that it has to be a BasicFunctionIF - BasicFunctionIF expr = (BasicFunctionIF) stmt.getSelect(i); - aggregatedRow.setValue(i, expr.aggregate(rs.getValues(i))); - } - result.addRow(aggregatedRow); - return result; - } else { - int selectCount = stmt.getSelectCount(); - int aggregateCount = stmt.getAggregatedSelectCount(); - - // collect all columns that are used for grouping (i.e. not contain an - // aggregation function) - int groupIdx[] = new int[selectCount - aggregateCount]; - for (int i = 0, j = 0; i < stmt.getSelectCount(); i++) { - if (!(stmt.getSelect(i) instanceof AbstractAggregateFunction)) { - groupIdx[j++] = i; - } - } - - ResultSet groupRS = new ResultSet(selectCount - aggregateCount, false); - HashMap groupingMap = new HashMap(); - - // group together all rows based on non-aggregated columns - for (Row r : rs) { - Row groupRow = groupRS.createRow(); - - int j = 0; - for (int idx : groupIdx) { - groupRow.setValue(j++, r.getValue(idx)); - } - - ResultSet tmpRS = groupingMap.get(groupRow); - if (tmpRS == null) { - tmpRS = new ResultSet(rs); - groupingMap.put(groupRow, tmpRS); - } - - tmpRS.addRow(r); - } - - // finally, collect all the group ResultSet's, evaluate the - // AggregateFunction's on them and store the result in the final ResultSet. - ResultSet result = new ResultSet(rs); - for (ResultSet tmpRS : groupingMap.values()) { - Row tmpRow = tmpRS.iterator().next(); - Row aggregatedRow = result.createRow(); - for (int i = 0; i < stmt.getSelectCount(); i++) { - if (stmt.getSelect(i) instanceof AbstractAggregateFunction) { - BasicFunctionIF expr = (BasicFunctionIF) stmt.getSelect(i); - aggregatedRow.setValue(i, expr.aggregate(tmpRS.getValues(i))); - } else { - aggregatedRow.setValue(i, tmpRow.getValue(i)); - } - } - result.addRow(aggregatedRow); - } - return result; - } - } else { - return rs; - } - } - - /** - * Sort the matches according to the "order-by" definitions. - * - * @param matches the query matches. - * @param orderings the order-by definitions of the query. - */ - private void sort(List matches, List orderings) { - QueryTracer.enterOrderBy(); - if (!orderings.isEmpty()) - Collections.sort(matches, new RowComparator(orderings)); - QueryTracer.leaveOrderBy(); - } - - public QueryResultIF execute(String query) throws InvalidQueryException { - return execute(query, null, null); - } - - /** - * Not supported, throws an {@link InvalidQueryException} if called. - */ - public void load(Reader ruleset) throws InvalidQueryException, IOException { - throw new InvalidQueryException("Not supported by this QueryProcessor"); - } - - /** - * Not supported, throws an {@link InvalidQueryException} if called. - */ - public void load(String ruleset) throws InvalidQueryException { - throw new InvalidQueryException("Not supported by this QueryProcessor"); - } - - public ParsedQueryIF parse(String query, DeclarationContextIF context) - throws InvalidQueryException { - ExpressionFactory ef = new ExpressionFactory(); - PathExpressionFactory pef = new PathExpressionFactory(); - LocalParseContext lc = new LocalParseContext(pef, ef); - - TomaQuery toma = TomaParser.parse(query, lc); - - // optimize query - QueryOptimizer optimizer = new QueryOptimizer(); - for (int i = 0; i < toma.getStatementCount(); i++) { - SelectStatement stmt = toma.getStatement(i); - ExpressionIF whereClause = stmt.getClause(); - stmt.setClause(whereClause.optimize(optimizer)); - } - - return new ParsedQuery(this, toma); - } - - public ParsedQueryIF parse(String query) throws InvalidQueryException { - return parse(query, null); - } - - /** - * Not supported, throws an {@link InvalidQueryException} if called. - */ - public ParsedModificationStatementIF parseUpdate(String statement, - DeclarationContextIF context) throws InvalidQueryException { - throw new InvalidQueryException("Not supported by this QueryProcessor"); - } - - /** - * Not supported, throws an {@link InvalidQueryException} if called. - */ - public ParsedModificationStatementIF parseUpdate(String statement) - throws InvalidQueryException { - throw new InvalidQueryException("Not supported by this QueryProcessor"); - } - - /** - * Not supported, throws an {@link InvalidQueryException} if called. - */ - public int update(String query, DeclarationContextIF context) - throws InvalidQueryException { - throw new InvalidQueryException("Not supported by this QueryProcessor"); - } -} diff --git a/sandbox/toma/src/main/java/net/ontopia/topicmaps/query/toma/impl/basic/ExpressionFactory.java b/sandbox/toma/src/main/java/net/ontopia/topicmaps/query/toma/impl/basic/ExpressionFactory.java deleted file mode 100644 index f02b018c4..000000000 --- a/sandbox/toma/src/main/java/net/ontopia/topicmaps/query/toma/impl/basic/ExpressionFactory.java +++ /dev/null @@ -1,109 +0,0 @@ -/** - * Copyright (C) 2009 Space Applications Services - * - * - * This file is part of the Ontopia project. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -package net.ontopia.topicmaps.query.toma.impl.basic; - -import java.util.HashMap; -import java.util.Map; - -import net.ontopia.topicmaps.query.toma.impl.basic.expression.*; -import net.ontopia.topicmaps.query.toma.impl.basic.function.*; -import net.ontopia.topicmaps.query.toma.parser.ExpressionFactoryIF; -import net.ontopia.topicmaps.query.toma.parser.ast.ExpressionIF; -import net.ontopia.topicmaps.query.toma.parser.ast.FunctionIF; - -/** - * INTERNAL: Implementation of {@link ExpressionFactoryIF} to create appropriate - * AST elements for the {@link BasicQueryProcessor}. - */ -public class ExpressionFactory implements ExpressionFactoryIF { - - private Map> expressions; - private Map> functions; - - public ExpressionFactory() { - expressions = new HashMap>(); - expressions.put("AND", AndExpression.class); - expressions.put("OR", OrExpression.class); - expressions.put("EXISTS", ExistsExpression.class); - expressions.put("NOTEXISTS", NotExistsExpression.class); - expressions.put("=", EqualsExpression.class); - expressions.put("!=", NotEqualsExpression.class); - expressions.put(">", GreaterThanExpression.class); - expressions.put(">=", GreaterThanEqualsExpression.class); - expressions.put("<", LessThanExpression.class); - expressions.put("<=", LessThanEqualsExpression.class); - expressions.put("~", RegExpMatchExpression.class); - expressions.put("~*", RegExpIMatchExpression.class); - expressions.put("!~", NRegExpMatchExpression.class); - expressions.put("!~*", NRegExpIMatchExpression.class); - expressions.put("IN", InExpression.class); - expressions.put("||", ConcatStringExpression.class); - - functions = new HashMap>(); - functions.put("UPPERCASE", UpperCaseFunction.class); - functions.put("LOWERCASE", LowerCaseFunction.class); - functions.put("LENGTH", LengthFunction.class); - functions.put("SUBSTR", SubstrFunction.class); - functions.put("TRIM", TrimFunction.class); - functions.put("TITLECASE", TitleCaseFunction.class); - functions.put("TO_NUM", ToNumFunction.class); - - functions.put("COUNT", CountFunction.class); - functions.put("SUM", SumFunction.class); - functions.put("MIN", MinFunction.class); - functions.put("MAX", MaxFunction.class); - functions.put("AVG", AvgFunction.class); - functions.put("CONCAT", ConcatFunction.class); - } - - public ExpressionIF createExpression(String name, ExpressionIF... childs) { - Class c = expressions.get(name.toUpperCase()); - if (c != null) { - try { - ExpressionIF expr = c.newInstance(); - for (ExpressionIF child : childs) { - expr.addChild(child); - } - return expr; - } catch (Exception e) { - return null; - } - } else { - return null; - } - } - - public ExpressionIF createLiteral(String value) { - return new LiteralExpression(value); - } - - public FunctionIF createFunction(String name) { - Class c = functions.get(name.toUpperCase()); - if (c != null) { - try { - FunctionIF fun = c.newInstance(); - return fun; - } catch (Exception e) { - return null; - } - } else { - return null; - } - } -} diff --git a/sandbox/toma/src/main/java/net/ontopia/topicmaps/query/toma/impl/basic/LocalContext.java b/sandbox/toma/src/main/java/net/ontopia/topicmaps/query/toma/impl/basic/LocalContext.java deleted file mode 100644 index 0b036a5f9..000000000 --- a/sandbox/toma/src/main/java/net/ontopia/topicmaps/query/toma/impl/basic/LocalContext.java +++ /dev/null @@ -1,94 +0,0 @@ -/** - * Copyright (C) 2009 Space Applications Services - * - * - * This file is part of the Ontopia project. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -package net.ontopia.topicmaps.query.toma.impl.basic; - -import java.util.HashMap; -import java.util.List; - -import net.ontopia.topicmaps.core.TopicMapIF; - -/** - * INTERNAL: The current context when evaluating a query. This class contains a - * reference map, which maps variables to {@link ResultSet}'s that bound this - * variable. - */ -public class LocalContext implements Cloneable { - - private TopicMapIF topicmap; - private BasicQueryProcessor processor; - private HashMap resultsets; - - public LocalContext(TopicMapIF topicmap, BasicQueryProcessor processor) { - this.topicmap = topicmap; - this.processor = processor; - this.resultsets = new HashMap(); - } - - /** - * Returns the {@link TopicMapIF} that is used in this query. - * - * @return the topic map of the query. - */ - public TopicMapIF getTopicMap() { - return topicmap; - } - - /** - * Returns the {@link BasicQueryProcessor} that is used in this query. - * - * @return the query processor of the query. - */ - public BasicQueryProcessor getProcessor() { - return processor; - } - - /** - * Adds a new {@link ResultSet} to this {@link LocalContext}. - * All bound variables of the {@link ResultSet} will be extracted, - * and their reference will be updated. - * - * @param resultset the {@link ResultSet} to be added. - */ - public void addResultSet(ResultSet resultset) { - List variables = resultset.getBoundVariables(); - for (String var : variables) { - resultsets.put(var, resultset); - } - } - - /** - * Returns the {@link ResultSet} that contains the specified variable; if - * there is no {@link ResultSet} that is bound by this variable, null will be - * returned. - * - * @param boundVariable the variable to look for. - * @return the {@link ResultSet} containing this variable, or null. - */ - public ResultSet getResultSet(String boundVariable) { - return resultsets.get(boundVariable.toUpperCase()); - } - - @Override - @SuppressWarnings("unchecked") - protected Object clone() throws CloneNotSupportedException { - LocalContext c = new LocalContext(this.topicmap, this.processor); - c.resultsets = (HashMap) this.resultsets.clone(); - return c; - } -} diff --git a/sandbox/toma/src/main/java/net/ontopia/topicmaps/query/toma/impl/basic/ParsedQuery.java b/sandbox/toma/src/main/java/net/ontopia/topicmaps/query/toma/impl/basic/ParsedQuery.java deleted file mode 100644 index 27220c5ec..000000000 --- a/sandbox/toma/src/main/java/net/ontopia/topicmaps/query/toma/impl/basic/ParsedQuery.java +++ /dev/null @@ -1,203 +0,0 @@ -/** - * Copyright (C) 2009 Space Applications Services - * - * - * This file is part of the Ontopia project. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -package net.ontopia.topicmaps.query.toma.impl.basic; - -import java.util.ArrayList; -import java.util.Collection; -import java.util.List; -import java.util.Map; -import java.util.Set; - -import net.ontopia.topicmaps.query.core.InvalidQueryException; -import net.ontopia.topicmaps.query.core.ParsedQueryIF; -import net.ontopia.topicmaps.query.core.QueryResultIF; -import net.ontopia.topicmaps.query.toma.impl.basic.expression.PathExpression; -import net.ontopia.topicmaps.query.toma.impl.basic.path.VariablePath; -import net.ontopia.topicmaps.query.toma.parser.ast.AbstractVariable; -import net.ontopia.topicmaps.query.toma.parser.ast.ExpressionIF; -import net.ontopia.topicmaps.query.toma.parser.ast.FunctionIF; -import net.ontopia.topicmaps.query.toma.parser.ast.PathElementIF; -import net.ontopia.topicmaps.query.toma.parser.ast.QueryOrder; -import net.ontopia.topicmaps.query.toma.parser.ast.TomaQuery; -import net.ontopia.topicmaps.query.toma.parser.ast.QueryOrder.SORT_ORDER; -import net.ontopia.utils.CompactHashSet; - -/** - * PUBLIC: implementation of the {@link ParsedQueryIF} interface for a TOMA - * query processor. - */ -public class ParsedQuery implements ParsedQueryIF { - - private TomaQuery query; - private BasicQueryProcessor processor; - - /** - * Create a new parsed query object. - * - * @param processor the query processor to use. - * @param query the TOMA query itself. - */ - protected ParsedQuery(BasicQueryProcessor processor, TomaQuery query) { - this.processor = processor; - this.query = query; - } - - public QueryResultIF execute() throws InvalidQueryException { - return processor.execute(query); - } - - public QueryResultIF execute(Map arguments) - throws InvalidQueryException { - return execute(); - } - - /** - * PUBLIC: Returns the variables in the select clause of the first select - * statement in the TOMA query, in the order given there. A variable can occur - * more than once in the resulting list. - * - * @return the list of variables used in the select clause of the first select - * expression (in case there are multiple selects joined together in a - * UNION style). - */ - public List getSelectedVariables() { - List exprs = query.getSelectExpressions(); - List vars = new ArrayList(); - - for (ExpressionIF expr : exprs) { - String name = getVariableName(expr); - if (name != null) { - vars.add(name); - } - } - return vars; - } - - /** - * INTERNAL: Get the name of the variable that participates in this - * expression. - * - * @param expr the expression. - * @return the name of the first variable, or null if there is no variable. - */ - private String getVariableName(ExpressionIF expr) { - if (expr instanceof PathExpression) { - if (((PathExpression) expr).isEmpty()) { - return null; - } else { - PathElementIF start = ((PathExpression) expr).getPathElement(0); - if (start instanceof VariablePath) { - return ((AbstractVariable) start).getVarName(); - } else { - return null; - } - } - } else { - if (expr.getChildCount() > 0) { - return getVariableName(expr.getChild(0)); - } else { - return null; - } - } - } - - /** - * PUBLIC: Returns the variables in the select clause of the first select - * statement in the TOMA query, in no particular order. - * - * @return a collection of all variables used in the select clause of the - * first select expression (in case there are multiple selects joined - * together in a UNION style). - */ - @SuppressWarnings("unchecked") - public Collection getAllVariables() { - List exprs = query.getSelectExpressions(); - Set vars = new CompactHashSet(); - - for (ExpressionIF expr : exprs) { - String name = getVariableName(expr); - if (name != null) { - vars.add(name); - } - } - return vars; - } - - /** - * PUBLIC: Returns all variables in the select clause of the first select - * statement in the TOMA query, which are used in an aggregate function (e.g. - * count). - * - * @return a collection of all variables in the select clause of the first - * select expression, which are used in an aggregate function. - */ - @SuppressWarnings("unchecked") - public Collection getCountedVariables() { - List exprs = query.getSelectExpressions(); - Set vars = new CompactHashSet(); - - for (ExpressionIF expr : exprs) { - if (expr instanceof FunctionIF) { - if (((FunctionIF) expr).isAggregateFunction()) { - String name = getVariableName(expr); - if (name != null) { - vars.add(name); - } - } - } - } - return vars; - } - - public List getOrderBy() { - List orders = query.getOrderBy(); - List exprs = query.getSelectExpressions(); - - List vars = new ArrayList(); - for (QueryOrder o : orders) { - int column = o.getColumn(); - - String name = getVariableName(exprs.get(column - 1)); - if (name != null) { - vars.add(name); - } - } - return vars; - } - - public boolean isOrderedAscending(String name) { - List orders = query.getOrderBy(); - List exprs = query.getSelectExpressions(); - - for (QueryOrder o : orders) { - int column = o.getColumn(); - - String n = getVariableName(exprs.get(column - 1)); - if (n != null && n.equals(name)) { - return (o.getOrder() == SORT_ORDER.ASC); - } - } - return false; - } - - @Override - public String toString() { - return query.getParseTree(); - } -} diff --git a/sandbox/toma/src/main/java/net/ontopia/topicmaps/query/toma/impl/basic/PathExpressionFactory.java b/sandbox/toma/src/main/java/net/ontopia/topicmaps/query/toma/impl/basic/PathExpressionFactory.java deleted file mode 100644 index 4f89d9596..000000000 --- a/sandbox/toma/src/main/java/net/ontopia/topicmaps/query/toma/impl/basic/PathExpressionFactory.java +++ /dev/null @@ -1,98 +0,0 @@ -/** - * Copyright (C) 2009 Space Applications Services - * - * - * This file is part of the Ontopia project. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -package net.ontopia.topicmaps.query.toma.impl.basic; - -import java.util.HashMap; -import java.util.Map; - -import net.ontopia.topicmaps.query.toma.impl.basic.expression.PathExpression; -import net.ontopia.topicmaps.query.toma.impl.basic.path.*; -import net.ontopia.topicmaps.query.toma.parser.PathExpressionFactoryIF; -import net.ontopia.topicmaps.query.toma.parser.ast.AbstractTopic; -import net.ontopia.topicmaps.query.toma.parser.ast.PathElementIF; -import net.ontopia.topicmaps.query.toma.parser.ast.PathExpressionIF; -import net.ontopia.topicmaps.query.toma.parser.ast.VariableDecl; -import net.ontopia.topicmaps.query.toma.parser.ast.VariableIF; - -/** - * INTERNAL: Implementation of {@link PathExpressionFactoryIF} to create - * appropriate AST path expression elements for the {@link BasicQueryProcessor}. - */ -public class PathExpressionFactory implements PathExpressionFactoryIF { - - Map> elements; - - public PathExpressionFactory() { - elements = new HashMap>(); - elements.put("DATA", DataPath.class); - elements.put("ID", ItemIDPath.class); - elements.put("INSTANCE", InstancePath.class); - elements.put("NAME", NamePath.class); - elements.put("OC", OccurrencePath.class); - elements.put("PLAYER", PlayerPath.class); - elements.put("REF", ReferencePath.class); - elements.put("REIFIER", ReifierPath.class); - elements.put("ROLE", RolePath.class); - elements.put("SC", ScopePath.class); - elements.put("SI", SubjectIDPath.class); - elements.put("SL", SubjectLocatorPath.class); - elements.put("SUB", SubTypePath.class); - elements.put("SUPER", SuperTypePath.class); - elements.put("TYPE", TypePath.class); - elements.put("VAR", VariantPath.class); - elements.put("ASSOC", AssocPath.class); - } - - public PathElementIF createElement(String name) { - Class c = elements.get(name.toUpperCase()); - if (c != null) { - try { - return c.newInstance(); - } catch (Exception e) { - return null; - } - } else { - return null; - } - } - - public PathExpressionIF createPathExpression() { - return new PathExpression(); - } - - public PathElementIF createTopic(String type, String id) { - if (type.equals("IID")) { - return new TopicPath(AbstractTopic.IDTYPE.IID, id); - } else if (type.equals("NAME")) { - return new TopicPath(AbstractTopic.IDTYPE.NAME, id); - } else if (type.equals("VAR")) { - return new TopicPath(AbstractTopic.IDTYPE.VAR, id); - } else if (type.equals("SUBJID")) { - return new TopicPath(AbstractTopic.IDTYPE.SI, id); - } else if (type.equals("SUBJLOC")) { - return new TopicPath(AbstractTopic.IDTYPE.SL, id); - } else { - return new TopicPath(AbstractTopic.IDTYPE.IID, id); - } - } - - public VariableIF createVariable(VariableDecl decl) { - return new VariablePath(decl); - } -} diff --git a/sandbox/toma/src/main/java/net/ontopia/topicmaps/query/toma/impl/basic/QueryOptimizer.java b/sandbox/toma/src/main/java/net/ontopia/topicmaps/query/toma/impl/basic/QueryOptimizer.java deleted file mode 100644 index 1ec238f04..000000000 --- a/sandbox/toma/src/main/java/net/ontopia/topicmaps/query/toma/impl/basic/QueryOptimizer.java +++ /dev/null @@ -1,263 +0,0 @@ -/** - * Copyright (C) 2009 Space Applications Services - * - * - * This file is part of the Ontopia project. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -package net.ontopia.topicmaps.query.toma.impl.basic; - -import java.util.ArrayList; -import java.util.List; - -import net.ontopia.topicmaps.query.toma.impl.basic.expression.EqualsExpression; -import net.ontopia.topicmaps.query.toma.impl.basic.expression.LiteralExpression; -import net.ontopia.topicmaps.query.toma.impl.basic.expression.PathExpression; -import net.ontopia.topicmaps.query.toma.impl.basic.path.InstancePath; -import net.ontopia.topicmaps.query.toma.impl.basic.path.ItemIDPath; -import net.ontopia.topicmaps.query.toma.impl.basic.path.NamePath; -import net.ontopia.topicmaps.query.toma.impl.basic.path.SubTypePath; -import net.ontopia.topicmaps.query.toma.impl.basic.path.SubjectIDPath; -import net.ontopia.topicmaps.query.toma.impl.basic.path.SubjectLocatorPath; -import net.ontopia.topicmaps.query.toma.impl.basic.path.SuperTypePath; -import net.ontopia.topicmaps.query.toma.impl.basic.path.TopicPath; -import net.ontopia.topicmaps.query.toma.impl.basic.path.TypePath; -import net.ontopia.topicmaps.query.toma.impl.basic.path.VariablePath; -import net.ontopia.topicmaps.query.toma.impl.basic.path.VariantPath; -import net.ontopia.topicmaps.query.toma.impl.utils.QueryOptimizerIF; -import net.ontopia.topicmaps.query.toma.parser.AntlrWrapException; -import net.ontopia.topicmaps.query.toma.parser.ast.ExpressionIF; -import net.ontopia.topicmaps.query.toma.parser.ast.Level; -import net.ontopia.topicmaps.query.toma.parser.ast.PathElementIF; -import net.ontopia.topicmaps.query.toma.parser.ast.VariableDecl; -import net.ontopia.topicmaps.query.toma.parser.ast.AbstractTopic.IDTYPE; - -/** - * INTERNAL: Query Optimizer for TOMA queries. - */ -public class QueryOptimizer implements QueryOptimizerIF { - - private List optimizers; - - public QueryOptimizer() { - optimizers = new ArrayList(); - optimizers.add(new ReplaceExpressions()); - } - - public ExpressionIF optimize(ExpressionIF expr) { - ExpressionIF e = expr; - for (QueryOptimizerIF opt : optimizers) { - e = opt.optimize(e); - } - return e; - } - - // TODO: other ideas for query optimization - - // - reordering of expressions which are coupled together by an 'and' - // - structure of association path expression should be reordered if the - // start of the path is a variable. Transform: - // $t.(r1)<-$a()->(r2) => $a()-> $t(r1) - // (r2) - // this should improve association path expressions significantly - - @SuppressWarnings("unchecked") - public static class ReplaceExpressions implements QueryOptimizerIF { - - private enum STATUS { - FOUND, MIRROR, NOTFOUND - }; - - private static Class[] IDPATH = { VariablePath.class, ItemIDPath.class }; - private static Class[] NAMEPATH = { VariablePath.class, NamePath.class }; - private static Class[] VARIANTPATH = { VariablePath.class, NamePath.class, - VariantPath.class }; - private static Class[] SLPATH = { VariablePath.class, - SubjectLocatorPath.class }; - private static Class[] SIPATH = { VariablePath.class, SubjectIDPath.class }; - - private static Class[] TYPEPATH = { VariablePath.class, TypePath.class }; - private static Class[] INSTANCEPATH = { VariablePath.class, - InstancePath.class }; - private static Class[] SUBPATH = { VariablePath.class, SubTypePath.class }; - private static Class[] SUPERPATH = { VariablePath.class, - SuperTypePath.class }; - private static Class[] TOPICPATH = { TopicPath.class }; - - public ExpressionIF optimize(ExpressionIF expr) { - if (expr instanceof EqualsExpression) { - ExpressionIF left = expr.getChild(0); - ExpressionIF right = expr.getChild(1); - - STATUS status; - status = checkExpression(left, right, PathExpression.class, - LiteralExpression.class); - if (status != STATUS.NOTFOUND) { - PathExpression path = (PathExpression) (status == STATUS.FOUND ? left - : right); - LiteralExpression literal = (LiteralExpression) (status == STATUS.FOUND ? right - : left); - - VariableDecl varDecl = path.getVariableDeclaration(); - - ExpressionIF result = null; - if (checkSimplePathExpression(path, IDPATH)) { - // $t.id = 'abc' -> $t = i'abc' - result = getTopicEqualsIDExpression(varDecl, IDTYPE.IID, literal - .getValue()); - } else if (checkSimplePathExpression(path, NAMEPATH)) { - // $t.name = 'abc' -> $t = n'abc' - result = getTopicEqualsIDExpression(varDecl, IDTYPE.NAME, literal - .getValue()); - } else if (checkSimplePathExpression(path, VARIANTPATH)) { - // $t.name.var = 'abc' -> $t = v'abc' - result = getTopicEqualsIDExpression(varDecl, IDTYPE.VAR, literal - .getValue()); - } else if (checkSimplePathExpression(path, SLPATH)) { - // $t.sl = 'abc' -> $t = sl'abc' - result = getTopicEqualsIDExpression(varDecl, IDTYPE.SL, literal - .getValue()); - } else if (checkSimplePathExpression(path, SIPATH)) { - // $t.si = 'abc' -> $t = si'abc' - result = getTopicEqualsIDExpression(varDecl, IDTYPE.SI, literal - .getValue()); - } - - // if something went wrong in the optimization process, return the - // unchanged expression. - return (result == null) ? expr : result; - } - - status = checkExpression(left, right, PathExpression.class, - PathExpression.class); - if (status != STATUS.NOTFOUND) { - PathExpression leftPath = (PathExpression) left; - PathExpression rightPath = (PathExpression) right; - PathExpression path = null, topic = null; - - // check if the TopicPath Expression is on the right or left side of - // the equals expression. - if (checkSimplePathExpression(rightPath, TOPICPATH)) { - path = leftPath; - topic = rightPath; - } else if (checkSimplePathExpression(leftPath, TOPICPATH)) { - path = rightPath; - topic = leftPath; - } - - if (path != null) { - // get the level of the last path element - Level level = path.isEmpty() ? null : path.getPathElement( - path.getPathLength() - 1).getLevel(); - - VariableDecl varDecl = path.getVariableDeclaration(); - ExpressionIF result = null; - - if (checkSimplePathExpression(path, TYPEPATH)) { - // $t.type = i'topic' -> $t = i'topic'.instance - result = getReversalTopicExpression(varDecl, topic, - new InstancePath(), level); - } else if (checkSimplePathExpression(path, INSTANCEPATH)) { - // $t.instance = i'topic' -> $t = i'topic'.type - result = getReversalTopicExpression(varDecl, topic, - new TypePath(), level); - } else if (checkSimplePathExpression(path, SUBPATH)) { - // $t.sub = i'topic' -> $t = i'topic'.super - result = getReversalTopicExpression(varDecl, topic, - new SuperTypePath(), level); - } else if (checkSimplePathExpression(path, SUPERPATH)) { - // $t.super = i'topic' -> $t = i'topic'.sub - result = getReversalTopicExpression(varDecl, topic, - new SubTypePath(), level); - } - - // if something went wrong in the optimization process, return the - // unchanged expression. - return (result == null) ? expr : result; - } - } - } - - return expr; - } - - private ExpressionIF getTopicEqualsIDExpression(VariableDecl decl, - IDTYPE type, String val) { - try { - ExpressionIF expr = new EqualsExpression(); - PathExpression l = new PathExpression(); - l.addPath(new VariablePath(decl)); - expr.addChild(l); - PathExpression r = new PathExpression(); - r.addPath(new TopicPath(type, val)); - expr.addChild(r); - return expr; - } catch (AntlrWrapException e) { - return null; - } - } - - private ExpressionIF getReversalTopicExpression(VariableDecl decl, - PathExpression topicExpr, PathElementIF reverseElement, Level level) { - try { - ExpressionIF expr = new EqualsExpression(); - PathExpression l = new PathExpression(); - l.addPath(new VariablePath(decl)); - expr.addChild(l); - PathExpression r = topicExpr; - reverseElement.setLevel(level); - r.addPath(reverseElement); - expr.addChild(r); - return expr; - } catch (AntlrWrapException e) { - return null; - } - } - - private STATUS checkExpression(ExpressionIF left, ExpressionIF right, - Class expectedLeft, Class expectedRight) { - if (expectedLeft.isInstance(left) && expectedRight.isInstance(right)) { - return STATUS.FOUND; - } else if (expectedLeft.isInstance(right) - && expectedRight.isInstance(left)) { - return STATUS.MIRROR; - } else { - return STATUS.NOTFOUND; - } - } - - private boolean checkSimplePathExpression(PathExpression path, - Class... elements) { - // check if the length of the same for both paths - if (path.getPathLength() != elements.length) { - return false; - } - - // now check all elements for equality - for (int idx = 0; idx < path.getPathLength(); idx++) { - PathElementIF pe = path.getPathElement(idx); - - // if they are not of the same class -> false - if (!elements[idx].isInstance(pe)) { - return false; - } - - if (pe.getScope() != null || pe.getType() != null) { - return false; - } - } - return true; - } - } -} diff --git a/sandbox/toma/src/main/java/net/ontopia/topicmaps/query/toma/impl/basic/QueryResult.java b/sandbox/toma/src/main/java/net/ontopia/topicmaps/query/toma/impl/basic/QueryResult.java deleted file mode 100644 index af4bd39b8..000000000 --- a/sandbox/toma/src/main/java/net/ontopia/topicmaps/query/toma/impl/basic/QueryResult.java +++ /dev/null @@ -1,243 +0,0 @@ -/** - * Copyright (C) 2009 Space Applications Services - * - * - * This file is part of the Ontopia project. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -package net.ontopia.topicmaps.query.toma.impl.basic; - -import java.util.List; - -import net.ontopia.topicmaps.query.core.QueryResultIF; - -/** - * PUBLIC: implementation of the {@link QueryResultIF} interface for the TOMA - * {@link BasicQueryProcessor}. - */ -public class QueryResult implements QueryResultIF { - - private List columns; - private List rows; - private int currentRow; - private int from; - private int to; - private boolean isClosed; - - /** - * Create a new {@link QueryResult} instance that is backed by the given - * ResultSet. - * - * @param result the {@link ResultSet} to be used. - * @throws IllegalArgumentException if the given {@link ResultSet} is null. - */ - protected QueryResult(List columns, List rows, int limit, - int offset) throws IllegalArgumentException { - if (columns == null) { - throw new IllegalArgumentException("Parameter 'columns' may not be null."); - } - - if (rows == null) { - throw new IllegalArgumentException("Parameter 'rows' may not be null."); - } - - this.columns = columns; - this.rows = rows; - this.from = (offset == -1) ? 0 : offset; - this.to = Math.min(rows.size() - 1, from - + (limit == -1 ? Integer.MAX_VALUE : limit - 1)); - this.currentRow = -1; - this.isClosed = false; - } - - public void close() { - rows.clear(); - rows = null; - columns = null; - isClosed = true; - } - - /** - * @throws IllegalStateException if this {@link QueryResult} has already been - * closed. - */ - public String getColumnName(int ix) throws IndexOutOfBoundsException, - IllegalStateException { - if (isClosed) { - throw new IllegalStateException( - "Can't do getColumnName() after query result has already been closed."); - } - - return columns.get(ix); - } - - /** - * @throws IllegalStateException if this {@link QueryResult} has already been - * closed. - */ - public String[] getColumnNames() throws IllegalStateException { - if (isClosed) { - throw new IllegalStateException( - "Can't do getColumnNames() after query result has already been closed."); - } - - String[] names = new String[columns.size()]; - for (int i = 0; i < columns.size(); i++) { - names[i] = columns.get(i); - } - return names; - } - - /** - * @throws IllegalStateException if this {@link QueryResult} has already been - * closed. - */ - public int getIndex(String colname) throws IllegalStateException { - if (isClosed) { - throw new IllegalStateException( - "Can't do getIndex() after query result has already been closed."); - } - - int idx = 0; - for (String column : columns) { - if (column.equals(colname)) { - return idx; - } - idx++; - } - return -1; - } - - /** - * @throws IllegalStateException if this {@link QueryResult} has already been - * closed. - */ - public Object getValue(int ix) throws IndexOutOfBoundsException, - IllegalStateException { - if (isClosed) { - throw new IllegalStateException( - "Can't do getValue() after query result has already been closed."); - } - - if (currentRow == -1) { - throw new IllegalStateException( - "The query result is not pointed at a row anymore, " + - "call next() before using this method."); - } - - return rows.get(currentRow).getValue(ix); - } - - /** - * @throws IllegalStateException if this {@link QueryResult} has already been - * closed. - */ - public Object getValue(String colname) throws IllegalStateException { - if (isClosed) { - throw new IllegalStateException( - "Can't do getValue() after query result has already been closed."); - } - - if (currentRow == -1) { - throw new IllegalStateException( - "The query result is not pointed at a row anymore, " + - "call next() before using this method."); - } - - int idx = getIndex(colname); - if (idx == -1) { - throw new IllegalArgumentException("Column '" + colname - + "' not existant in this query result."); - } else { - return rows.get(currentRow).getValue(idx); - } - } - - /** - * @throws IllegalStateException if this {@link QueryResult} has already been - * closed. - */ - public Object[] getValues() throws IllegalStateException { - if (isClosed) { - throw new IllegalStateException( - "Can't do getValues() after query result has already been closed."); - } - - if (currentRow == -1) { - throw new IllegalStateException( - "The query result is not pointed at a row anymore, " + - "call next() before using this method."); - } - - return rows.get(currentRow).getValues(); - } - - /** - * @throws IllegalStateException if this {@link QueryResult} has already been - * closed. - */ - public Object[] getValues(Object[] values) throws IllegalStateException { - if (isClosed) { - throw new IllegalStateException( - "Can't do getValues() after query result has already been closed."); - } - - if (currentRow == -1) { - throw new IllegalStateException( - "The query result is not pointed at a row anymore, " + - "call next() before using this method."); - } - - return rows.get(currentRow).getValues(values); - } - - /** - * @throws IllegalStateException if this {@link QueryResult} has already been - * closed. - */ - public int getWidth() throws IllegalStateException { - if (isClosed) { - throw new IllegalStateException( - "Can't do getWidth() after query result has already been closed."); - } - - return columns.size(); - } - - /** - * @throws IllegalStateException if this {@link QueryResult} has already been - * closed. - */ - public boolean next() throws IllegalStateException { - if (isClosed) { - throw new IllegalStateException( - "Can't do next() after query result has already been closed."); - } - - if (currentRow == -1) { - currentRow = from; - if (currentRow <= to) { - return true; - } else { - return false; - } - } else { - if (++currentRow <= to) { - return true; - } else { - return false; - } - } - } -} diff --git a/sandbox/toma/src/main/java/net/ontopia/topicmaps/query/toma/impl/basic/ResultSet.java b/sandbox/toma/src/main/java/net/ontopia/topicmaps/query/toma/impl/basic/ResultSet.java deleted file mode 100644 index 2f0828c9b..000000000 --- a/sandbox/toma/src/main/java/net/ontopia/topicmaps/query/toma/impl/basic/ResultSet.java +++ /dev/null @@ -1,505 +0,0 @@ -/** - * Copyright (C) 2009 Space Applications Services - * - * - * This file is part of the Ontopia project. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -package net.ontopia.topicmaps.query.toma.impl.basic; - -import java.util.ArrayList; -import java.util.Collection; -import java.util.Collections; -import java.util.Iterator; -import java.util.List; -import java.util.Vector; - -import org.apache.commons.collections.Bag; -import org.apache.commons.collections.bag.HashBag; - -import net.ontopia.utils.CompactHashSet; - -/** - * INTERNAL: This is a very simple implementation of a table, which is used to - * represent matching result for TOMA queries. - *

    - * The underlying data-structure is a {@link Bag}, which allows transparent - * access to unique/duplicate rows. - *

    - */ -public class ResultSet implements Iterable { - - private Vector columns; - private Bag rows; - private boolean unique; - - /** - * Create an empty {@link ResultSet}, i.e. with zero columns. - */ - public ResultSet() { - this(0, false); - } - - /** - * Create a new {@link ResultSet} with the given number of columns. - * - * @param cols the number of columns. - * @param unique indicates whether this {@link ResultSet} should only contain - * unique rows, or allows duplicates. - */ - public ResultSet(int cols, boolean unique) { - columns = new Vector(cols); - columns.setSize(cols); - rows = new HashBag(); - this.unique = unique; - } - - /** - * Create a new {@link ResultSet} that is based on the column definition from - * one or more other {@link ResultSet}'s. The new {@link ResultSet} may - * contain duplicate rows. - * - * @param others the {@link ResultSet}'s - */ - public ResultSet(ResultSet... others) { - int cols = 0; - for (ResultSet rs : others) { - cols += rs.getColumnCount(); - } - columns = new Vector(cols); - columns.setSize(cols); - - int i = 0; - for (ResultSet rs : others) { - for (int j = 0; j < rs.getColumnCount(); j++, i++) { - setColumnName(i, rs.getColumnName(j)); - } - } - - this.rows = new HashBag(); - this.unique = false; - } - - /** - * Returns an unmodifiable {@link List} of the column definitions. - * - * @return an unmodifiable {@link List} of the columns. - */ - public List getColumnDefinitions() { - return Collections.unmodifiableList(columns); - } - - /** - * Returns the name of the column at the given index. - * - * @param index the column index. - * @return the name of the column. - * @throws IndexOutOfBoundsException if the index is outside the range of the - * column definition (e.g. index < 0 or index >= getColumnCount()). - */ - public String getColumnName(int index) throws IndexOutOfBoundsException { - if (index < 0 || index >= columns.size()) { - throw new IndexOutOfBoundsException("No column available for index '" - + index + "'"); - } - return columns.get(index); - } - - /** - * Set the name of a specified column. - * - * @param index the index of the column. - * @param name the new name of the column. - */ - public void setColumnName(int index, String name) { - columns.set(index, name); - } - - /** - * Returns whether a column with the given name exists within this - * {@link ResultSet}. - * - * @param name the name of the column to look for. - * @return true if a column with the given name exists; false otherwise. - */ - public boolean containsColumn(String name) { - return (getColumnIndex(name) > -1); - } - - /** - * Returns the number of columns contained in this {@link ResultSet}. - * - * @return the number of columns. - */ - public int getColumnCount() { - return columns.size(); - } - - /** - * Returns the index of the column with the given name. - * - * @param name the name of the column to look for. - * @return the index of the column, or -1 if no such column exists. - */ - public int getColumnIndex(String name) { - int idx = 0; - for (String column : columns) { - if (column.equals(name)) { - return idx; - } - idx++; - } - return -1; - } - - /** - * Returns whether this {@link ResultSet} contains unique or duplicate rows. - * - * @return true if this {@link ResultSet} only contains unique rows; false - * otherwise. - */ - public boolean isUnique() { - return unique; - } - - /** - * Set whether this {@link ResultSet} only allows unique rows, or can also - * store duplicate ones. - * - * @param unique if this {@link ResultSet} should only store unique rows, use - * true; false otherwise. - */ - public void setUnique(boolean unique) { - this.unique = unique; - } - - /** - * Returns a {@link List} of all shared columns with the given - * {@link ResultSet}. - * - * @param rs the other {@link ResultSet}. - * @return a {@link List} containing the shared columns. - */ - public List getSharedColumns(ResultSet rs) { - List sharedCols = new ArrayList(); - - List vars = getBoundVariables(); - for (String var : vars) { - if (rs.containsColumn(var)) { - sharedCols.add(var); - } - } - - return sharedCols; - } - - /** - * Returns a {@link List} of variables that are present in this - * {@link ResultSet}. - * - * @return a {@link List} of variables in this {@link ResultSet}. - */ - public List getBoundVariables() { - List variables = new ArrayList(); - for (String col : columns) { - if (col.startsWith("$") && !col.contains(".")) { - variables.add(col); - } - } - return variables; - } - - /** - * Returns the number of rows that are stored in this {@link ResultSet}. - * - * @return the number of rows. - */ - public int getRowCount() { - if (unique) { - return rows.uniqueSet().size(); - } else { - return rows.size(); - } - } - - /** - * Returns the index of the last column in this {@link ResultSet}. This is a - * convenience method, and returns the same result as: - * - *
    -   *   getColumnCount() - 1;
    -   * 
    - * - * @return the index of the last column. - */ - public int getLastIndex() { - return columns.size() - 1; - } - - /** - * Adds a new column to this {@link ResultSet}. The new column is appended at - * the end of the existing columns. Every row, that is currently stored in - * this {@link ResultSet} is adjusted to the new column size (filled with zero - * values). - * - * @param name the name of the new column. - */ - public void addColumn(String name) { - columns.add(name); - for (Object r : rows) { - ((Row) r).addColumn(); - } - } - - /** - * Returns an iterator over the rows of this {@link ResultSet}. - * - * @return an iterator over all rows. - */ - @SuppressWarnings("unchecked") - public Iterator iterator() { - if (unique) { - return rows.uniqueSet().iterator(); - } else { - return rows.iterator(); - } - } - - /** - * Return a new {@link Row} that is based on the column definitions of this - * {@link ResultSet}. - *

    - * Note: The returned {@link Row} is not added to the {@link ResultSet}. - * - * @return a new {@link Row} that matches the column definitions of this - * {@link ResultSet}. - */ - public Row createRow() { - Row r = new Row(getColumnCount()); - return r; - } - - /** - * Adds a {@link Row} to this {@link ResultSet}. - * - * @param row the {@link Row} to be added. - */ - public void addRow(Row row) { - rows.add(row); - } - - /** - * Adds all rows from the other {@link ResultSet} to this one. - *

    - * Note: The layout of the two ResultSets has to be the same, otherwise - * this operation will fail. - *

    - * - * @param other the ResultSet to be added. - */ - @SuppressWarnings("unchecked") - public void addAll(ResultSet other) { - rows.addAll(other.rows); - } - - /** - * Remove the given {@link Row} from this {@link ResultSet}. - * - * @param row the {@link Row} to be removed. - */ - public void removeRow(Row row) { - rows.remove(row); - } - - /** - * Indicates whether the given {@link Row} is contained in this - * {@link ResultSet}. - * - * @param row the {@link Row} to be looked up. - * @return true if the {@link Row} is contained in the {@link ResultSet}; - * false otherwise. - */ - public boolean containsRow(Row row) { - return rows.contains(row); - } - - /** - * Remove all rows from this {@link ResultSet}. - */ - public void removeAllRows() { - rows.clear(); - } - - /** - * Returns a unique {@link Collection} of all values in the specified column. - * - * @param idx the column. - * @return a {@link Collection} of values in that column. - */ - @SuppressWarnings("unchecked") - public Collection getValues(int idx) { - Collection col = new CompactHashSet(rows.size()); - - if (idx == -1) - return col; - - for (Object r : rows.uniqueSet()) { - Row row = (Row) r; - Object val = row.getValue(idx); - col.add(val); - } - - return col; - } - - /** - * Returns all values in a specified column. This is a convenience method and - * returns the same result as: - * - *
    -   *   getValues(getColumnIndex(name));
    -   * 
    - * - * @param column the column. - * @return a {@link Collection} of values in that column. - */ - @SuppressWarnings("unchecked") - public Collection getValues(String column) { - int idx = getColumnIndex(column); - return getValues(idx); - } - - /** - * Returns all valid values from a specified column of this {@link ResultSet}. - * A valid value is a non-null value. - * - * @param idx the column. - * @return a {@link Collection} containing all valid values. - */ - @SuppressWarnings("unchecked") - public Collection getValidValues(int idx) { - Collection col = new CompactHashSet(rows.size()); - - if (idx == -1) - return col; - - for (Object r : rows.uniqueSet()) { - Row row = (Row) r; - Object val = row.getValue(idx); - if (val != null) { - col.add(val); - } - } - - return col; - } - - /** - * Returns a new {@link ResultSet} that is the result of a merge operation of - * the current {@link ResultSet} and the given one. - * - * FIXME: this method has to be fixed, it does not produce correct results - * for ResultSet that share more than one column. - * - * @param rs the other {@link ResultSet} to be used for the merging. - * @return a merged {@link ResultSet}. - */ - @SuppressWarnings("unchecked") - public ResultSet merge(ResultSet rs) { - List sharedCols = getSharedColumns(rs); - if (sharedCols.isEmpty()) { - return null; - } else { - String col = sharedCols.get(0); - Collection vals1 = getValues(col); - Collection vals2 = rs.getValues(col); - - vals1.addAll(vals2); - ResultSet result = new ResultSet(1, true); - result.setColumnName(0, col); - - for (Object o : vals1) { - Row r = result.createRow(); - r.setLastValue(o); - result.addRow(r); - } - - return result; - } - } - - /** - * Perform a union operation with the other {@link ResultSet}. As a result, - * the current {@link ResultSet} will be extended with the rows from the other - * {@link ResultSet}. - * - * @param other the {@link ResultSet} that should be merged into the current - * {@link ResultSet}. - * @param distinct indicates whether a distinct union operation should be - * performed or not. - */ - public void union(ResultSet other, boolean distinct) { - for (Row r : other) { - if (!distinct || !containsRow(r)) { - addRow(r); - } - } - } - - /** - * Perform an intersect operation with the other {@link ResultSet}. As a - * result, the current {@link ResultSet} will be reduced to the intersection - * of the two {@link ResultSet}'s. - * - * @param other the {@link ResultSet} that should be intersected with the - * current {@link ResultSet}. - */ - public void intersect(ResultSet other) { - List toDelete = new ArrayList(other.getRowCount()); - for (Row r : this) { - if (!other.containsRow(r)) { - toDelete.add(r); - } - } - rows.removeAll(toDelete); - } - - /** - * Perform an except operation with the other {@link ResultSet}. As a result, - * the current {@link ResultSet} will be reduced with the rows from the other - * {@link ResultSet}. - * - * @param other the {@link ResultSet} that should be removed from the current - * {@link ResultSet}. - */ - public void except(ResultSet other) { - for (Row r : other) { - removeRow(r); - } - } - - /** - * Returns a {@link List} representation of this {@link ResultSet}. - * - * @return a {@link List} containing all {@link Row} objects of the - * {@link ResultSet}. - */ - public List getList() { - List l = new ArrayList(getRowCount()); - for (Row r : this) { - l.add(r); - } - return l; - } -} diff --git a/sandbox/toma/src/main/java/net/ontopia/topicmaps/query/toma/impl/basic/Row.java b/sandbox/toma/src/main/java/net/ontopia/topicmaps/query/toma/impl/basic/Row.java deleted file mode 100644 index 59c85c27e..000000000 --- a/sandbox/toma/src/main/java/net/ontopia/topicmaps/query/toma/impl/basic/Row.java +++ /dev/null @@ -1,250 +0,0 @@ -/** - * Copyright (C) 2009 Space Applications Services - * - * - * This file is part of the Ontopia project. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -package net.ontopia.topicmaps.query.toma.impl.basic; - -import java.util.Vector; - -import net.ontopia.topicmaps.core.TMObjectIF; - -/** - * INTERNAL: Representation of a single row in the ResultSet of a TOMA query. - */ -public class Row implements Cloneable { - - private Vector row; - - /** - * Create a new {@link Row} to be used within a {@link ResultSet}. - * - * @param cols the number of columns this {@link Row} should contain. - */ - public Row(int cols) { - row = new Vector(cols); - row.setSize(cols); - } - - /** - * Returns the number of columns this {@link Row} contains. - * - * @return the number of columns. - */ - public int getColumnCount() { - return row.size(); - } - - /** - * Get the value of the i-th column in the current {@link Row}. - * - * @param column the column to be used. - * @return the value of the specified column. - * @throws IndexOutOfBoundsException if the specified column is not contained - * in the {@link Row}. - */ - public Object getValue(int column) throws IndexOutOfBoundsException { - if (column < 0 || column >= row.size()) { - throw new IndexOutOfBoundsException("No column at index '" + column + "'"); - } - return row.get(column); - } - - /** - * Get the value of the first column of the current {@link Row}. - * - * @return the value of the first column. - */ - public Object getFirstValue() { - return row.get(0); - } - - /** - * Get the value of the last column of the current {@link Row}. - * This is a convenience method, equivalent to: - * - *
    -   *   getValue(getColumnCount() - 1);
    -   * 
    - * - * @return the value of the last column. - */ - public Object getLastValue() { - return row.get(row.size() - 1); - } - - /** - * Set the content at the specified column to a given value. - * - * @param column the column to be used. - * @param val the value to be set. - */ - public void setValue(int column, Object val) { - row.set(column, val); - } - - /** - * Set the value at the last column of the current {@link Row}. - * This is a convenience method, equivalent to: - * - *
    -   *   setValue(getColumnCount() - 1, val);
    -   * 
    - * - * @param val the value to be set. - */ - public void setLastValue(Object val) { - row.set(row.size() - 1, val); - } - - /** - * Returns an array containing all the values of this {@link Row} in the - * correct order. - * - * @return the values stored in an array. - */ - public Object[] getValues() { - return row.toArray(); - } - - /** - * Returns an array containing all the values of this {@link Row} in the - * correct order. If the {@link Row} fits in the specified array with room to - * spare (i.e., the array has more elements than the {@link Row}), the element - * in the array immediately following the end of the {@link Row} is set to - * null. - * - * @param values the array into which the elements of the {@link Row} are to - * be stored, if it is big enough; otherwise, a new array of the same - * runtime type is allocated for this purpose. - * @return an array containing the elements of the {@link Row}. - */ - public Object[] getValues(Object[] values) { - return row.toArray(values); - } - - /** - * Adds another column at the end of this {@link Row}. The element at the new - * column position is set to null. - */ - public void addColumn() { - row.setSize(row.size() + 1); - } - - /** - * Fills this {@link Row} with the values from the given other {@link Row}'s. - *

    - * Note: This method does not check if the column definition of the - * {@link Row}'s match together. - *

    - * - * @param rows the {@link Row}'s to be used to fill this {@link Row}. - */ - public void fill(Row... rows) { - int i = 0; - for (Row r : rows) { - for (int j = 0; j < r.getColumnCount(); j++, i++) { - setValue(i, r.getValue(j)); - } - } - } - - /** - * Indicates whether two objects of type {@link Row} are equal, i.e. - * containing the same elements. - * - * If the elements are of type {@link TMObjectIF}, their object id is compared. - * - * @param obj the {@link Row} object to compare to. - * @return true if the two {@link Row} objects are identical; false otherwise. - */ - @Override - public boolean equals(Object obj) { - if (this == obj) - return true; - - if ((obj == null) || (obj.getClass() != this.getClass())) - return false; - - // object must be Row at this point - Row other = (Row) obj; - - if (row.size() != other.row.size()) - return false; - - for (int idx = 0; idx < row.size(); idx++) { - Object a = row.get(idx); - Object b = other.row.get(idx); - - if (a == null && b == null) - continue; - if (a == null) - return false; - - if (a instanceof TMObjectIF && b instanceof TMObjectIF) { - String idA = ((TMObjectIF) a).getObjectId(); - String idB = ((TMObjectIF) b).getObjectId(); - - if (idA == null && idB == null) - continue; - if (idA == null) - return false; - if (!idA.equals(idB)) - return false; - } else { - if (!a.equals(b)) - return false; - } - } - - return true; - } - - @Override - public int hashCode() { - int hash = 7; - - for (Object col : row) { - int val = 0; - - if (col != null) { - if (col instanceof TMObjectIF) { - val = ((TMObjectIF) col).getObjectId().hashCode(); - } else { - val = col.hashCode(); - } - } - - hash = 31 * hash + val; - } - return hash; - } - - /** - * Returns a clone of the current {@link Row} object. The result is a - * shallow-copy of the underlying row container, i.e. the elements are not - * duplicated but copied. - * - * @return a shallow-copy of this {@link Row}. - */ - @Override - public Object clone() throws CloneNotSupportedException { - Row r = (Row) super.clone(); - - r.row = new Vector(this.row); - return r; - } -} diff --git a/sandbox/toma/src/main/java/net/ontopia/topicmaps/query/toma/impl/basic/RowComparator.java b/sandbox/toma/src/main/java/net/ontopia/topicmaps/query/toma/impl/basic/RowComparator.java deleted file mode 100644 index f2c97146d..000000000 --- a/sandbox/toma/src/main/java/net/ontopia/topicmaps/query/toma/impl/basic/RowComparator.java +++ /dev/null @@ -1,99 +0,0 @@ -/** - * Copyright (C) 2009 Space Applications Services - * - * - * This file is part of the Ontopia project. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -package net.ontopia.topicmaps.query.toma.impl.basic; - -import java.util.Comparator; -import java.util.List; - -import net.ontopia.topicmaps.query.toma.impl.utils.Stringifier; -import net.ontopia.topicmaps.query.toma.parser.ast.QueryOrder; -import net.ontopia.topicmaps.query.toma.parser.ast.QueryOrder.SORT_ORDER; - -/** - * INTERNAL: Comparator for {@link Row} objects based on the "order-by" - * definition of the TOMA query. - */ -public class RowComparator implements Comparator { - - private List ordering; - - public RowComparator(List ordering) { - this.ordering = ordering; - } - - @SuppressWarnings("unchecked") - public int compare(Row row1, Row row2) { - // if we have no ordering defined, - if (ordering.isEmpty()) { - Comparable s1 = Stringifier.toSort(row1.getFirstValue()); - Comparable s2 = Stringifier.toSort(row2.getFirstValue()); - - if (s1 == null || s2 == null) { - if (s1 == null && s2 == null) { - return 0; - } else if (s1 == null) { - return +1; - } else { - return -1; - } - } else { - return s1.compareTo(s2); - } - } else { - for (QueryOrder order : ordering) { - int col = order.getColumn() - 1; - Comparable s1 = Stringifier.toSort(row1.getValue(col)); - Comparable s2 = Stringifier.toSort(row2.getValue(col)); - - int cmp = 0; - if (order.getOrder() == SORT_ORDER.ASC) { - if (s1 == null || s2 == null) { - if (s1 == null && s2 == null) { - cmp = 0; - } else if (s1 == null) { - cmp = +1; - } else { - cmp = -1; - } - } else { - cmp = s1.compareTo(s2); - } - } else { - if (s1 == null || s2 == null) { - if (s1 == null && s2 == null) { - cmp = 0; - } else if (s1 == null) { - cmp = -1; - } else { - cmp = +1; - } - } else { - cmp = s2.compareTo(s1); - } - } - - if (cmp != 0) { - return cmp; - } - } - } - - return 0; - } -} diff --git a/sandbox/toma/src/main/java/net/ontopia/topicmaps/query/toma/impl/basic/expression/AbstractBinaryExpression.java b/sandbox/toma/src/main/java/net/ontopia/topicmaps/query/toma/impl/basic/expression/AbstractBinaryExpression.java deleted file mode 100644 index 63823740d..000000000 --- a/sandbox/toma/src/main/java/net/ontopia/topicmaps/query/toma/impl/basic/expression/AbstractBinaryExpression.java +++ /dev/null @@ -1,69 +0,0 @@ -/** - * Copyright (C) 2009 Space Applications Services - * - * - * This file is part of the Ontopia project. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -package net.ontopia.topicmaps.query.toma.impl.basic.expression; - -import net.ontopia.topicmaps.query.core.InvalidQueryException; -import net.ontopia.topicmaps.query.toma.impl.basic.BasicExpressionIF; -import net.ontopia.topicmaps.query.toma.parser.AntlrWrapException; -import net.ontopia.topicmaps.query.toma.parser.ast.AbstractExpression; -import net.ontopia.topicmaps.query.toma.parser.ast.AbstractPathExpression; -import net.ontopia.topicmaps.query.toma.parser.ast.ExpressionIF; -import net.ontopia.topicmaps.query.toma.parser.ast.VariableDecl; - -/** - * INTERNAL: abstract base class for all binary expressions. - */ -public abstract class AbstractBinaryExpression extends AbstractExpression - implements BasicExpressionIF { - - protected AbstractBinaryExpression(String name) { - super(name, 2); - } - - @Override - public boolean validate() throws AntlrWrapException { - if (!super.validate()) { - return false; - } - - // check the types of variables for cases like: - // $var = $t.name - ExpressionIF left = getChild(0); - ExpressionIF right = getChild(1); - if (left instanceof AbstractPathExpression - && right instanceof AbstractPathExpression) { - AbstractPathExpression leftPath = (AbstractPathExpression) left; - AbstractPathExpression rightPath = (AbstractPathExpression) right; - - try { - if (leftPath.isVariable()) { - VariableDecl leftVar = leftPath.getVariableDeclaration(); - leftVar.constrainTypes(rightPath.output()); - } else if (rightPath.isVariable()) { - VariableDecl rightVar = rightPath.getVariableDeclaration(); - rightVar.constrainTypes(leftPath.output()); - } - } catch (InvalidQueryException e) { - throw new AntlrWrapException(e); - } - } - - return true; - } -} diff --git a/sandbox/toma/src/main/java/net/ontopia/topicmaps/query/toma/impl/basic/expression/AbstractComparisonExpression.java b/sandbox/toma/src/main/java/net/ontopia/topicmaps/query/toma/impl/basic/expression/AbstractComparisonExpression.java deleted file mode 100644 index 0754d14d5..000000000 --- a/sandbox/toma/src/main/java/net/ontopia/topicmaps/query/toma/impl/basic/expression/AbstractComparisonExpression.java +++ /dev/null @@ -1,122 +0,0 @@ -/** - * Copyright (C) 2009 Space Applications Services - * - * - * This file is part of the Ontopia project. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -package net.ontopia.topicmaps.query.toma.impl.basic.expression; - -import java.util.ArrayList; -import java.util.List; - -import net.ontopia.topicmaps.query.core.InvalidQueryException; -import net.ontopia.topicmaps.query.toma.impl.basic.BasicExpressionIF; -import net.ontopia.topicmaps.query.toma.impl.basic.LocalContext; -import net.ontopia.topicmaps.query.toma.impl.basic.ResultSet; -import net.ontopia.topicmaps.query.toma.impl.basic.Row; -import net.ontopia.topicmaps.query.toma.impl.utils.QueryTracer; -import net.ontopia.topicmaps.query.toma.impl.utils.Stringifier; - -/** - * INTERNAL: abstract base class for all comparison expressions. - */ -public abstract class AbstractComparisonExpression extends - AbstractBinaryExpression { - - protected AbstractComparisonExpression(String name) { - super(name); - } - - public ResultSet evaluate(LocalContext context) throws InvalidQueryException { - if (getChildCount() != 2) - return null; - - QueryTracer.enter(this); - - BasicExpressionIF left = (BasicExpressionIF) getChild(0); - BasicExpressionIF right = (BasicExpressionIF) getChild(1); - - ResultSet rs1 = left.evaluate(context); - ResultSet rs2 = right.evaluate(context); - - List sharedColumns = rs1.getSharedColumns(rs2); - List> cols = new ArrayList>(); - for (String col : sharedColumns) { - cols.add(new Pair(rs1.getColumnIndex(col), rs2 - .getColumnIndex(col))); - } - - // TODO: improve code if the resultsets share at least one column - ResultSet rs = new ResultSet(rs1, rs2); - for (Row row1 : rs1) { - Object o1 = row1.getLastValue(); - String str1 = Stringifier.toCompare(o1); - for (Row row2 : rs2) { - if (!checkSharedColumns(row1, row2, cols)) continue; - - Object o2 = row2.getLastValue(); - String str2 = Stringifier.toCompare(o2); - if (satisfiesExpression(str1, str2)) { - Row row3 = rs.createRow(); - row3.fill(row1, row2); - rs.addRow(row3); - } - } - } - - context.addResultSet(rs); - QueryTracer.leave(rs); - return rs; - } - - public static class Pair { - public T a; - public V b; - - public Pair(T a, V b) { - this.a = a; - this.b = b; - } - } - - private boolean checkSharedColumns(Row r1, Row r2, - List> sharedColumns) { - if (!sharedColumns.isEmpty()) { - for (Pair p : sharedColumns) { - Object val1 = r1.getValue(p.a); - Object val2 = r2.getValue(p.b); - if (val1 != null) { - if (!val1.equals(val2)) { - return false; - } - } else if (val2 != null) { - return false; - } - } - return true; - } else { - return true; - } - } - - /** - * Checks whether the two string satisfy the expression. - * - * @param s1 the first string. - * @param s2 the second string. - * @return true if the expression is satisfied; false otherwise. - */ - protected abstract boolean satisfiesExpression(String s1, String s2); -} diff --git a/sandbox/toma/src/main/java/net/ontopia/topicmaps/query/toma/impl/basic/expression/AbstractUnaryExpression.java b/sandbox/toma/src/main/java/net/ontopia/topicmaps/query/toma/impl/basic/expression/AbstractUnaryExpression.java deleted file mode 100644 index 46a78d638..000000000 --- a/sandbox/toma/src/main/java/net/ontopia/topicmaps/query/toma/impl/basic/expression/AbstractUnaryExpression.java +++ /dev/null @@ -1,33 +0,0 @@ -/** - * Copyright (C) 2009 Space Applications Services - * - * - * This file is part of the Ontopia project. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -package net.ontopia.topicmaps.query.toma.impl.basic.expression; - -import net.ontopia.topicmaps.query.toma.impl.basic.BasicExpressionIF; -import net.ontopia.topicmaps.query.toma.parser.ast.AbstractExpression; - -/** - * INTERNAL: abstract base class for all unary expressions. - */ -public abstract class AbstractUnaryExpression extends AbstractExpression - implements BasicExpressionIF { - - protected AbstractUnaryExpression(String name) { - super(name, 1); - } -} diff --git a/sandbox/toma/src/main/java/net/ontopia/topicmaps/query/toma/impl/basic/expression/AndExpression.java b/sandbox/toma/src/main/java/net/ontopia/topicmaps/query/toma/impl/basic/expression/AndExpression.java deleted file mode 100644 index f2ccff9ef..000000000 --- a/sandbox/toma/src/main/java/net/ontopia/topicmaps/query/toma/impl/basic/expression/AndExpression.java +++ /dev/null @@ -1,51 +0,0 @@ -/** - * Copyright (C) 2009 Space Applications Services - * - * - * This file is part of the Ontopia project. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -package net.ontopia.topicmaps.query.toma.impl.basic.expression; - -import net.ontopia.topicmaps.query.core.InvalidQueryException; -import net.ontopia.topicmaps.query.toma.impl.basic.BasicExpressionIF; -import net.ontopia.topicmaps.query.toma.impl.basic.LocalContext; -import net.ontopia.topicmaps.query.toma.impl.basic.ResultSet; -import net.ontopia.topicmaps.query.toma.impl.utils.QueryTracer; - -/** - * INTERNAL: AND expression, returns the intersection of the ResultSets - * of its child expressions. - */ -public class AndExpression extends AbstractBinaryExpression { - - public AndExpression() { - super("AND"); - } - - public ResultSet evaluate(LocalContext context) throws InvalidQueryException { - if (getChildCount() != 2) - return null; - - QueryTracer.enter(this); - - BasicExpressionIF left = (BasicExpressionIF) getChild(0); - BasicExpressionIF right = (BasicExpressionIF) getChild(1); - - left.evaluate(context); - ResultSet rs2 = right.evaluate(context); - QueryTracer.leave(rs2); - return rs2; - } -} diff --git a/sandbox/toma/src/main/java/net/ontopia/topicmaps/query/toma/impl/basic/expression/ConcatStringExpression.java b/sandbox/toma/src/main/java/net/ontopia/topicmaps/query/toma/impl/basic/expression/ConcatStringExpression.java deleted file mode 100644 index 6d0e29e6c..000000000 --- a/sandbox/toma/src/main/java/net/ontopia/topicmaps/query/toma/impl/basic/expression/ConcatStringExpression.java +++ /dev/null @@ -1,81 +0,0 @@ -/** - * Copyright (C) 2009 Space Applications Services - * - * - * This file is part of the Ontopia project. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -package net.ontopia.topicmaps.query.toma.impl.basic.expression; - -import java.util.Iterator; - -import net.ontopia.topicmaps.query.core.InvalidQueryException; -import net.ontopia.topicmaps.query.toma.impl.basic.BasicExpressionIF; -import net.ontopia.topicmaps.query.toma.impl.basic.LocalContext; -import net.ontopia.topicmaps.query.toma.impl.basic.ResultSet; -import net.ontopia.topicmaps.query.toma.impl.basic.Row; -import net.ontopia.topicmaps.query.toma.impl.utils.Stringifier; - -/** - * INTERNAL: Concatenate String expression, similar to the || operator - * in SQL queries. - */ -public class ConcatStringExpression extends AbstractBinaryExpression { - - public ConcatStringExpression() { - super("||"); - } - - public ResultSet evaluate(LocalContext context) throws InvalidQueryException { - if (getChildCount() != 2) - return null; - - BasicExpressionIF left = (BasicExpressionIF) getChild(0); - BasicExpressionIF right = (BasicExpressionIF) getChild(1); - - ResultSet rs1 = left.evaluate(context); - ResultSet rs2 = right.evaluate(context); - - ResultSet rs = new ResultSet(rs1, rs2); - String colName = rs1.getColumnName(rs1.getColumnCount() - 1) + " || " - + rs2.getColumnName(rs2.getColumnCount() - 1); - rs.addColumn(colName); - - Iterator it1 = rs1.iterator(); - Iterator it2 = rs2.iterator(); - - Row row1 = null, row2 = null; - while (it1.hasNext() || it2.hasNext()) { - String s1 = ""; - String s2 = ""; - - if (it1.hasNext()) { - row1 = it1.next(); - s1 = Stringifier.toString(row1.getLastValue()); - } - - if (it2.hasNext()) { - row2 = it2.next(); - s2 = Stringifier.toString(row2.getLastValue()); - } - - Row newRow = rs.createRow(); - newRow.fill(row1, row2); - newRow.setLastValue(s1 + s2); - rs.addRow(newRow); - } - - return rs; - } -} diff --git a/sandbox/toma/src/main/java/net/ontopia/topicmaps/query/toma/impl/basic/expression/EqualsExpression.java b/sandbox/toma/src/main/java/net/ontopia/topicmaps/query/toma/impl/basic/expression/EqualsExpression.java deleted file mode 100644 index 137db9e16..000000000 --- a/sandbox/toma/src/main/java/net/ontopia/topicmaps/query/toma/impl/basic/expression/EqualsExpression.java +++ /dev/null @@ -1,86 +0,0 @@ -/** - * Copyright (C) 2009 Space Applications Services - * - * - * This file is part of the Ontopia project. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -package net.ontopia.topicmaps.query.toma.impl.basic.expression; - -import net.ontopia.topicmaps.query.core.InvalidQueryException; -import net.ontopia.topicmaps.query.toma.impl.basic.BasicExpressionIF; -import net.ontopia.topicmaps.query.toma.impl.basic.LocalContext; -import net.ontopia.topicmaps.query.toma.impl.basic.ResultSet; -import net.ontopia.topicmaps.query.toma.impl.utils.QueryTracer; - -/** - * INTERNAL: Equality operator, checks whether two objects are equal. - */ -public class EqualsExpression extends AbstractComparisonExpression { - public EqualsExpression() { - super("EQUALS"); - } - - @Override - public ResultSet evaluate(LocalContext context) throws InvalidQueryException { - if (getChildCount() != 2) - return null; - - BasicExpressionIF left = (BasicExpressionIF) getChild(0); - BasicExpressionIF right = (BasicExpressionIF) getChild(1); - - // Optimization: - // If the left or right side of the expression is a sole variable - // and the variable has not been bound yet, just bind it to the result of - // the other expression. - if (left instanceof PathExpression && ((PathExpression) left).isVariable()) { - PathExpression path = (PathExpression) left; - String name = path.getVariableName(); - if (context.getResultSet(name) == null) { - return bindVariableToExpression(name, right, context); - } - } else if (right instanceof PathExpression - && ((PathExpression) right).isVariable()) { - PathExpression path = (PathExpression) right; - String name = path.getVariableName(); - if (context.getResultSet(name) == null) { - return bindVariableToExpression(name, left, context); - } - } - - // for normal expressions (without optimization) call the evaluate from the - // super-class. - return super.evaluate(context); - } - - private ResultSet bindVariableToExpression(String name, - BasicExpressionIF expr, LocalContext context) - throws InvalidQueryException { - QueryTracer.enter(this); - - ResultSet rs = expr.evaluate(context); - rs.setColumnName(rs.getLastIndex(), name); - context.addResultSet(rs); - - QueryTracer.leave(rs); - return rs; - } - - protected boolean satisfiesExpression(String s1, String s2) { - if (s1 != null && s2 != null && s1.equals(s2)) - return true; - else - return false; - } -} diff --git a/sandbox/toma/src/main/java/net/ontopia/topicmaps/query/toma/impl/basic/expression/ExistsExpression.java b/sandbox/toma/src/main/java/net/ontopia/topicmaps/query/toma/impl/basic/expression/ExistsExpression.java deleted file mode 100644 index fbc2ca42d..000000000 --- a/sandbox/toma/src/main/java/net/ontopia/topicmaps/query/toma/impl/basic/expression/ExistsExpression.java +++ /dev/null @@ -1,56 +0,0 @@ -/** - * Copyright (C) 2009 Space Applications Services - * - * - * This file is part of the Ontopia project. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -package net.ontopia.topicmaps.query.toma.impl.basic.expression; - -import net.ontopia.topicmaps.query.core.InvalidQueryException; -import net.ontopia.topicmaps.query.toma.impl.basic.BasicExpressionIF; -import net.ontopia.topicmaps.query.toma.impl.basic.LocalContext; -import net.ontopia.topicmaps.query.toma.impl.basic.ResultSet; -import net.ontopia.topicmaps.query.toma.impl.basic.Row; - -/** - * INTERNAL: Exists expression, returns all valid (not-null) results of - * a specified child expression. - */ -public class ExistsExpression extends AbstractUnaryExpression { - - public ExistsExpression() { - super("EXISTS"); - } - - public ResultSet evaluate(LocalContext context) throws InvalidQueryException { - if (getChildCount() != 1) - return null; - - BasicExpressionIF child = (BasicExpressionIF) getChild(0); - ResultSet rs = child.evaluate(context); - - ResultSet result = new ResultSet(rs); - for (Object r : rs) { - Row row = (Row) r; - Object val = row.getLastValue(); - if (val != null) { - result.addRow(row); - } - } - - context.addResultSet(result); - return result; - } -} diff --git a/sandbox/toma/src/main/java/net/ontopia/topicmaps/query/toma/impl/basic/expression/GreaterThanEqualsExpression.java b/sandbox/toma/src/main/java/net/ontopia/topicmaps/query/toma/impl/basic/expression/GreaterThanEqualsExpression.java deleted file mode 100644 index 8afb41606..000000000 --- a/sandbox/toma/src/main/java/net/ontopia/topicmaps/query/toma/impl/basic/expression/GreaterThanEqualsExpression.java +++ /dev/null @@ -1,48 +0,0 @@ -/** - * Copyright (C) 2009 Space Applications Services - * - * - * This file is part of the Ontopia project. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -package net.ontopia.topicmaps.query.toma.impl.basic.expression; - -/** - * INTERNAL: GreaterThanEquals ('>=') operator, checks whether the first - * expression is greater than or equal to the second expression. This operator - * is only defined, if both expression are integers. - *

    - * Note: No generic string comparison is performed in case one of the expressions - * is not an integer as the result can be undefined. - *

    - */ -public class GreaterThanEqualsExpression extends AbstractComparisonExpression { - public GreaterThanEqualsExpression() { - super(">="); - } - - protected boolean satisfiesExpression(String s1, String s2) { - if (s1 == null || s2 == null) - return false; - - try { - int i1 = Integer.valueOf(s1); - int i2 = Integer.valueOf(s2); - - return (i1 >= i2); - } catch (NumberFormatException e) { - return false; - } - } -} diff --git a/sandbox/toma/src/main/java/net/ontopia/topicmaps/query/toma/impl/basic/expression/GreaterThanExpression.java b/sandbox/toma/src/main/java/net/ontopia/topicmaps/query/toma/impl/basic/expression/GreaterThanExpression.java deleted file mode 100644 index 6c79674e4..000000000 --- a/sandbox/toma/src/main/java/net/ontopia/topicmaps/query/toma/impl/basic/expression/GreaterThanExpression.java +++ /dev/null @@ -1,48 +0,0 @@ -/** - * Copyright (C) 2009 Space Applications Services - * - * - * This file is part of the Ontopia project. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -package net.ontopia.topicmaps.query.toma.impl.basic.expression; - -/** - * INTERNAL: GreaterThan ('>') operator, checks whether the first expression is - * greater than the second expression. This operator is only defined, if both - * expression are integers. - *

    - * Note: No generic string comparison is performed in case one of the - * expressions is not an integer as the result can be undefined. - *

    - */ -public class GreaterThanExpression extends AbstractComparisonExpression { - public GreaterThanExpression() { - super("GREATER"); - } - - protected boolean satisfiesExpression(String s1, String s2) { - if (s1 == null || s2 == null) - return false; - - try { - int i1 = Integer.valueOf(s1); - int i2 = Integer.valueOf(s2); - - return (i1 > i2); - } catch (NumberFormatException e) { - return false; - } - } -} diff --git a/sandbox/toma/src/main/java/net/ontopia/topicmaps/query/toma/impl/basic/expression/InExpression.java b/sandbox/toma/src/main/java/net/ontopia/topicmaps/query/toma/impl/basic/expression/InExpression.java deleted file mode 100644 index fd19765c4..000000000 --- a/sandbox/toma/src/main/java/net/ontopia/topicmaps/query/toma/impl/basic/expression/InExpression.java +++ /dev/null @@ -1,158 +0,0 @@ -/** - * Copyright (C) 2009 Space Applications Services - * - * - * This file is part of the Ontopia project. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -package net.ontopia.topicmaps.query.toma.impl.basic.expression; - -import net.ontopia.topicmaps.query.core.InvalidQueryException; -import net.ontopia.topicmaps.query.toma.impl.basic.BasicExpressionIF; -import net.ontopia.topicmaps.query.toma.impl.basic.BasicQueryProcessor; -import net.ontopia.topicmaps.query.toma.impl.basic.LocalContext; -import net.ontopia.topicmaps.query.toma.impl.basic.ResultSet; -import net.ontopia.topicmaps.query.toma.impl.basic.Row; -import net.ontopia.topicmaps.query.toma.impl.utils.Stringifier; -import net.ontopia.topicmaps.query.toma.parser.AntlrWrapException; -import net.ontopia.topicmaps.query.toma.parser.ast.AbstractExpression; -import net.ontopia.topicmaps.query.toma.parser.ast.ExpressionIF; -import net.ontopia.topicmaps.query.toma.parser.ast.PathElementIF; -import net.ontopia.topicmaps.query.toma.parser.ast.TomaQuery; -import net.ontopia.topicmaps.query.toma.parser.ast.PathElementIF.TYPE; - -/** - * INTERNAL: IN expression, checks whether the result of an expression matches - * any of the specified values. - */ -public class InExpression extends AbstractExpression implements - BasicExpressionIF { - - public InExpression() { - // an IN expression can have an arbitrary number of children - super("IN", -1); - } - - public ResultSet evaluate(LocalContext context) throws InvalidQueryException { - // if the value list is empty, we have nothing to do, - // return an empty result. - if (getChildCount() < 1) { - return null; - } - - // get the expression to be evaluated - BasicExpressionIF left = (BasicExpressionIF) getChild(0); - - // the merged ResultSet of the expressions in the IN(...) - ResultSet merged = merge(context); - - // Optimization: - // If the left side of the expression is a sole variable - // and the variable has not been bound yet, just bind it to the result of - // the other expression. - if (left instanceof PathExpression && ((PathExpression) left).isVariable()) { - PathExpression path = (PathExpression) left; - String name = path.getVariableName(); - if (context.getResultSet(name) == null) { - merged.setColumnName(merged.getLastIndex(), name); - context.addResultSet(merged); - return merged; - } - } - - // check whether the merged ResultSet contains Strings - boolean convertToString = false; - if (merged.iterator().hasNext()) { - Row r = merged.iterator().next(); - if (r.getLastValue() instanceof String) { - convertToString = true; - } - } - - ResultSet rsLeft = left.evaluate(context); - - ResultSet result = new ResultSet(rsLeft); - Row compareRow = merged.createRow(); - for (Row row : rsLeft) { - Object val = row.getLastValue(); - if (convertToString) { - val = Stringifier.toString(val); - } - compareRow.setLastValue(val); - - if (merged.containsRow(compareRow)) { - result.addRow((Row) row); - } - } - - context.addResultSet(result); - return result; - } - - private ResultSet merge(LocalContext context) throws InvalidQueryException { - ResultSet result = new ResultSet(1, false); - result.setColumnName(0, "MERGE"); - - for (int i = 1; i < getChildCount(); i++) { - ExpressionIF expr = getChild(i); - ResultSet rs = null; - - if (expr instanceof BasicExpressionIF) { - rs = ((BasicExpressionIF) expr).evaluate(context); - } else if (expr instanceof TomaQuery) { - BasicQueryProcessor processor = context.getProcessor(); - rs = processor.evaluate((TomaQuery) expr); - } - - for (Row r : rs) { - Row newRow = result.createRow(); - newRow.setValue(0, r.getLastValue()); - result.addRow(newRow); - } - } - - return result; - } - - @Override - public boolean validate() throws AntlrWrapException { - if (!super.validate()) { - return false; - } - - // check if all expressions return the same type - PathElementIF.TYPE common = TYPE.UNKNOWN; - for (int i = 1; i < getChildCount(); i++) { - PathElementIF.TYPE output; - ExpressionIF expr = getChild(i); - - if (expr instanceof PathExpression) { - output = ((PathExpression) expr).output(); - } else if (expr instanceof LiteralExpression) { - output = TYPE.STRING; - } else { - // TODO: include other expressions too. - output = TYPE.UNKNOWN; - } - - if (common == TYPE.UNKNOWN) { - common = output; - } else if (output != TYPE.UNKNOWN && common != output) { - throw new AntlrWrapException(new InvalidQueryException( - "Expressions used in IN clause have different result types.")); - } - } - return true; - } -} diff --git a/sandbox/toma/src/main/java/net/ontopia/topicmaps/query/toma/impl/basic/expression/LessThanEqualsExpression.java b/sandbox/toma/src/main/java/net/ontopia/topicmaps/query/toma/impl/basic/expression/LessThanEqualsExpression.java deleted file mode 100644 index a4cf7cc41..000000000 --- a/sandbox/toma/src/main/java/net/ontopia/topicmaps/query/toma/impl/basic/expression/LessThanEqualsExpression.java +++ /dev/null @@ -1,49 +0,0 @@ -/** - * Copyright (C) 2009 Space Applications Services - * - * - * This file is part of the Ontopia project. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -package net.ontopia.topicmaps.query.toma.impl.basic.expression; - -/** - * INTERNAL: LessThanEquals ('<=') operator, checks whether the first - * expression is less than or equal to the second expression. This operator - * is only defined, if both expression are integers. - *

    - * Note: No generic string comparison is performed in case one of the - * expressions is not an integer as the result can be undefined. - *

    - */ -public class LessThanEqualsExpression extends AbstractComparisonExpression { - - public LessThanEqualsExpression() { - super("<="); - } - - protected boolean satisfiesExpression(String s1, String s2) { - if (s1 == null || s2 == null) - return false; - - try { - int i1 = Integer.valueOf(s1); - int i2 = Integer.valueOf(s2); - - return (i1 <= i2); - } catch (NumberFormatException e) { - return false; - } - } -} diff --git a/sandbox/toma/src/main/java/net/ontopia/topicmaps/query/toma/impl/basic/expression/LessThanExpression.java b/sandbox/toma/src/main/java/net/ontopia/topicmaps/query/toma/impl/basic/expression/LessThanExpression.java deleted file mode 100644 index 2db970c9a..000000000 --- a/sandbox/toma/src/main/java/net/ontopia/topicmaps/query/toma/impl/basic/expression/LessThanExpression.java +++ /dev/null @@ -1,48 +0,0 @@ -/** - * Copyright (C) 2009 Space Applications Services - * - * - * This file is part of the Ontopia project. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -package net.ontopia.topicmaps.query.toma.impl.basic.expression; - -/** - * INTERNAL: LessThan ('<') operator, checks whether the first - * expression is less than the second expression. This operator - * is only defined, if both expression are integers. - *

    - * Note: No generic string comparison is performed in case one of the - * expressions is not an integer as the result can be undefined. - *

    - */ -public class LessThanExpression extends AbstractComparisonExpression { - public LessThanExpression() { - super("LESS"); - } - - protected boolean satisfiesExpression(String s1, String s2) { - if (s1 == null || s2 == null) - return false; - - try { - int i1 = Integer.valueOf(s1); - int i2 = Integer.valueOf(s2); - - return (i1 < i2); - } catch (NumberFormatException e) { - return false; - } - } -} diff --git a/sandbox/toma/src/main/java/net/ontopia/topicmaps/query/toma/impl/basic/expression/LiteralExpression.java b/sandbox/toma/src/main/java/net/ontopia/topicmaps/query/toma/impl/basic/expression/LiteralExpression.java deleted file mode 100644 index 67c8183ea..000000000 --- a/sandbox/toma/src/main/java/net/ontopia/topicmaps/query/toma/impl/basic/expression/LiteralExpression.java +++ /dev/null @@ -1,46 +0,0 @@ -/** - * Copyright (C) 2009 Space Applications Services - * - * - * This file is part of the Ontopia project. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -package net.ontopia.topicmaps.query.toma.impl.basic.expression; - -import net.ontopia.topicmaps.query.toma.impl.basic.BasicExpressionIF; -import net.ontopia.topicmaps.query.toma.impl.basic.LocalContext; -import net.ontopia.topicmaps.query.toma.impl.basic.ResultSet; -import net.ontopia.topicmaps.query.toma.impl.basic.Row; -import net.ontopia.topicmaps.query.toma.parser.ast.AbstractLiteral; - -/** - * INTERNAL: Literal expression, transforms a literal into a resultset to be - * used for further evaluation. - */ -public class LiteralExpression extends AbstractLiteral implements - BasicExpressionIF { - - public LiteralExpression(String value) { - super(value); - } - - public ResultSet evaluate(LocalContext context) { - ResultSet rs = new ResultSet(1, false); - rs.setColumnName(0, "LITERAL"); - Row row = rs.createRow(); - row.setValue(0, getValue()); - rs.addRow(row); - return rs; - } -} diff --git a/sandbox/toma/src/main/java/net/ontopia/topicmaps/query/toma/impl/basic/expression/NRegExpIMatchExpression.java b/sandbox/toma/src/main/java/net/ontopia/topicmaps/query/toma/impl/basic/expression/NRegExpIMatchExpression.java deleted file mode 100644 index 791a571f0..000000000 --- a/sandbox/toma/src/main/java/net/ontopia/topicmaps/query/toma/impl/basic/expression/NRegExpIMatchExpression.java +++ /dev/null @@ -1,51 +0,0 @@ -/** - * Copyright (C) 2009 Space Applications Services - * - * - * This file is part of the Ontopia project. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -package net.ontopia.topicmaps.query.toma.impl.basic.expression; - -import java.util.regex.Matcher; -import java.util.regex.Pattern; - -/** - * INTERNAL: Inverted case insensitive regular expression match ('!~*') - * operator, checks whether an expression is NOT matched by the given - * regular expression. - *

    - * Note: For convenience reasons, the specified regular expression is - * automatically extended to match any following string afterwards: "expr.*". - *

    - */ -public class NRegExpIMatchExpression extends AbstractComparisonExpression { - public NRegExpIMatchExpression() { - super("!~*"); - } - - protected boolean satisfiesExpression(String s1, String s2) { - if (s1 != null && s2 != null) { - Pattern p = Pattern.compile(s2 + ".*", Pattern.CASE_INSENSITIVE); - Matcher m = p.matcher(s1); - if (!m.matches()) { - return true; - } else { - return false; - } - } else { - return false; - } - } -} diff --git a/sandbox/toma/src/main/java/net/ontopia/topicmaps/query/toma/impl/basic/expression/NRegExpMatchExpression.java b/sandbox/toma/src/main/java/net/ontopia/topicmaps/query/toma/impl/basic/expression/NRegExpMatchExpression.java deleted file mode 100644 index ef90f1dd7..000000000 --- a/sandbox/toma/src/main/java/net/ontopia/topicmaps/query/toma/impl/basic/expression/NRegExpMatchExpression.java +++ /dev/null @@ -1,50 +0,0 @@ -/** - * Copyright (C) 2009 Space Applications Services - * - * - * This file is part of the Ontopia project. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -package net.ontopia.topicmaps.query.toma.impl.basic.expression; - -import java.util.regex.Matcher; -import java.util.regex.Pattern; - -/** - * INTERNAL: Inverted regular expression match ('!~') operator, checks whether - * an expression is NOT matched by the given regular expression. - *

    - * Note: For convenience reasons, the specified regular expression is - * automatically extended to match any following string afterwards: "expr.*". - *

    - */ -public class NRegExpMatchExpression extends AbstractComparisonExpression { - public NRegExpMatchExpression() { - super("!~"); - } - - protected boolean satisfiesExpression(String s1, String s2) { - if (s1 != null && s2 != null) { - Pattern p = Pattern.compile(s2 + ".*"); - Matcher m = p.matcher(s1); - if (!m.matches()) { - return true; - } else { - return false; - } - } else { - return false; - } - } -} diff --git a/sandbox/toma/src/main/java/net/ontopia/topicmaps/query/toma/impl/basic/expression/NotEqualsExpression.java b/sandbox/toma/src/main/java/net/ontopia/topicmaps/query/toma/impl/basic/expression/NotEqualsExpression.java deleted file mode 100644 index 07102e1c9..000000000 --- a/sandbox/toma/src/main/java/net/ontopia/topicmaps/query/toma/impl/basic/expression/NotEqualsExpression.java +++ /dev/null @@ -1,35 +0,0 @@ -/** - * Copyright (C) 2009 Space Applications Services - * - * - * This file is part of the Ontopia project. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -package net.ontopia.topicmaps.query.toma.impl.basic.expression; - -/** - * INTERNAL: Inequality operator, checks whether two objects are not equal. - */ -public class NotEqualsExpression extends AbstractComparisonExpression { - public NotEqualsExpression() { - super("!="); - } - - protected boolean satisfiesExpression(String s1, String s2) { - if (s1 == null && s2 != null || s1 != null && s2 == null || !s1.equals(s2)) - return true; - else - return false; - } -} diff --git a/sandbox/toma/src/main/java/net/ontopia/topicmaps/query/toma/impl/basic/expression/NotExistsExpression.java b/sandbox/toma/src/main/java/net/ontopia/topicmaps/query/toma/impl/basic/expression/NotExistsExpression.java deleted file mode 100644 index 384b83546..000000000 --- a/sandbox/toma/src/main/java/net/ontopia/topicmaps/query/toma/impl/basic/expression/NotExistsExpression.java +++ /dev/null @@ -1,56 +0,0 @@ -/** - * Copyright (C) 2009 Space Applications Services - * - * - * This file is part of the Ontopia project. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -package net.ontopia.topicmaps.query.toma.impl.basic.expression; - -import net.ontopia.topicmaps.query.core.InvalidQueryException; -import net.ontopia.topicmaps.query.toma.impl.basic.BasicExpressionIF; -import net.ontopia.topicmaps.query.toma.impl.basic.LocalContext; -import net.ontopia.topicmaps.query.toma.impl.basic.ResultSet; -import net.ontopia.topicmaps.query.toma.impl.basic.Row; - -/** - * INTERNAL: Not exists expression, returns all non-valid (null) results of - * a specified child expression. - */ -public class NotExistsExpression extends AbstractUnaryExpression { - - public NotExistsExpression() { - super("NOTEXISTS"); - } - - public ResultSet evaluate(LocalContext context) throws InvalidQueryException { - if (getChildCount() != 1) - return null; - - BasicExpressionIF child = (BasicExpressionIF) getChild(0); - ResultSet rs = child.evaluate(context); - - ResultSet result = new ResultSet(rs); - - for (Row row : rs) { - Object val = row.getValue(rs.getLastIndex()); - if (val == null) { - result.addRow(row); - } - } - - context.addResultSet(result); - return result; - } -} diff --git a/sandbox/toma/src/main/java/net/ontopia/topicmaps/query/toma/impl/basic/expression/OrExpression.java b/sandbox/toma/src/main/java/net/ontopia/topicmaps/query/toma/impl/basic/expression/OrExpression.java deleted file mode 100644 index 40412dd3c..000000000 --- a/sandbox/toma/src/main/java/net/ontopia/topicmaps/query/toma/impl/basic/expression/OrExpression.java +++ /dev/null @@ -1,76 +0,0 @@ -/** - * Copyright (C) 2009 Space Applications Services - * - * - * This file is part of the Ontopia project. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -package net.ontopia.topicmaps.query.toma.impl.basic.expression; - -import java.util.List; - -import net.ontopia.topicmaps.query.core.InvalidQueryException; -import net.ontopia.topicmaps.query.toma.impl.basic.BasicExpressionIF; -import net.ontopia.topicmaps.query.toma.impl.basic.LocalContext; -import net.ontopia.topicmaps.query.toma.impl.basic.ResultSet; -import net.ontopia.topicmaps.query.toma.impl.utils.QueryTracer; - -/** - * INTERNAL: OR expression, returns the union of the {@link ResultSet}'s of its - * child expressions if the two {@link ResultSet}'s have a column in common. - * - * In case, the two {@link ResultSet}'s do not have a column in common, they are - * returned separately. - * - * TODO: better describe the relation of LocalContext and ResultSet. - */ -public class OrExpression extends AbstractBinaryExpression { - - public OrExpression() { - super("OR"); - } - - public ResultSet evaluate(LocalContext context) throws InvalidQueryException { - if (getChildCount() != 2) - return null; - - QueryTracer.enter(this); - - BasicExpressionIF left = (BasicExpressionIF) getChild(0); - BasicExpressionIF right = (BasicExpressionIF) getChild(1); - - LocalContext ctx1 = new LocalContext(context.getTopicMap(), context - .getProcessor()); - ResultSet rs1 = left.evaluate(ctx1); - - LocalContext ctx2 = new LocalContext(context.getTopicMap(), context - .getProcessor()); - ResultSet rs2 = right.evaluate(ctx2); - - // TODO: check if this works for all situations with multiple shared columns - // add complex unit tests - List sharedCols = rs1.getSharedColumns(rs2); - if (sharedCols.isEmpty()) { - context.addResultSet(rs1); - context.addResultSet(rs2); - QueryTracer.leave(rs2); - return rs2; - } else { - ResultSet rs = rs1.merge(rs2); - context.addResultSet(rs); - QueryTracer.leave(rs); - return rs; - } - } -} diff --git a/sandbox/toma/src/main/java/net/ontopia/topicmaps/query/toma/impl/basic/expression/PathExpression.java b/sandbox/toma/src/main/java/net/ontopia/topicmaps/query/toma/impl/basic/expression/PathExpression.java deleted file mode 100644 index bcf2906f8..000000000 --- a/sandbox/toma/src/main/java/net/ontopia/topicmaps/query/toma/impl/basic/expression/PathExpression.java +++ /dev/null @@ -1,176 +0,0 @@ -/** - * Copyright (C) 2009 Space Applications Services - * - * - * This file is part of the Ontopia project. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -package net.ontopia.topicmaps.query.toma.impl.basic.expression; - -import java.util.Collection; - -import net.ontopia.topicmaps.query.core.InvalidQueryException; -import net.ontopia.topicmaps.query.toma.impl.basic.BasicExpressionIF; -import net.ontopia.topicmaps.query.toma.impl.basic.BasicPathElementIF; -import net.ontopia.topicmaps.query.toma.impl.basic.BasicQueryProcessor; -import net.ontopia.topicmaps.query.toma.impl.basic.LocalContext; -import net.ontopia.topicmaps.query.toma.impl.basic.ResultSet; -import net.ontopia.topicmaps.query.toma.impl.basic.Row; -import net.ontopia.topicmaps.query.toma.impl.basic.path.AssocPath; -import net.ontopia.topicmaps.query.toma.impl.utils.QueryTracer; -import net.ontopia.topicmaps.query.toma.parser.ast.AbstractPathExpression; -import net.ontopia.topicmaps.query.toma.parser.ast.PathElementIF; - -/** - * INTERNAL: Path expression to be evaluated by the {@link BasicQueryProcessor}. - */ -public class PathExpression extends AbstractPathExpression implements - BasicExpressionIF { - - public ResultSet evaluate(LocalContext context) throws InvalidQueryException { - QueryTracer.enter(this); - initResultSets(context); - ResultSet rs = createNewResultSet(context); - if (!isEmpty()) { - Row row = rs.createRow(); - evaluateElement(context, PathElementIF.TYPE.NONE, rs, row, 0, 0); - } - QueryTracer.leave(rs); - return rs; - } - - private void initResultSets(LocalContext context) { - for (int i=0; i result = null; - if (input != null) { - result = element.evaluate(context, input); - } - - // if the current PathElement returned nothing, we can fill the rest of - // the row with null's. - if (result == null || result.isEmpty()) { - // This is necessary, because association paths are always implicitly EXISTS - // FIXME: this is a hack, as it breaks NOT EXISTS and EXISTS queries, fix - if (element instanceof AssocPath) { - return; - } - - for (int idx = colIndex; idx < row.getColumnCount(); idx++) { - row.setValue(idx, null); - } - rs.addRow(row); - return; - } - - // iterate over all the result values - Row curRow = row; - int cnt = 0; - for (Object val : result) { - // only clone the row if there is more than 1 value in the ResultSet - if (++cnt > 1) { - try { - curRow = (Row) row.clone(); - } catch (CloneNotSupportedException e) { - // should not happen, as Row implements Cloneable - throw new InvalidQueryException("Internal QueryProcessor error:\n", e); - } - } - - Object last = val; - int newCol = colIndex; - - // if the PathElement returned an array - if (val instanceof Object[]) { - int idx = 0; - int rsSize = element.getResultSize(); - for (Object obj : (Object[]) val) { - if (idx < rsSize) { - curRow.setValue(colIndex + idx++, obj); - } - last = obj; - } - newCol = colIndex + idx; - } else { - if (element.getResultSize() > 0) { - curRow.setValue(newCol++, val); - } - } - - if (pathDepth >= (getPathLength() - 1)) { - curRow.setLastValue(last); - rs.addRow(curRow); - } else { - evaluateElement(context, last, rs, curRow, pathDepth + 1, newCol); - } - } - } - - /** - * Create a {@link ResultSet} that is suitable for this PathExpression. - * - * @return an empty ResultSet - */ - private ResultSet createNewResultSet(LocalContext context) { - int size = 0; - // first, check the correct width for this PathExpression. - for (int idx = 0; idx < getPathLength(); idx++) { - BasicPathElementIF element = (BasicPathElementIF) getPathElement(idx); - size += element.getResultSize(); - } - - // if we have a non-empty PathExpression, add a column to store the result. - if (getPathLength() > 0) { - size++; - } - - ResultSet rs = new ResultSet(size, false); - // set the column names according to the definition of the PathExpression. - for (int colIdx = 0, idx = 0; idx < getPathLength(); idx++) { - BasicPathElementIF element = (BasicPathElementIF) getPathElement(idx); - String[] columns = element.getColumnNames(); - for (String col : columns) { - rs.setColumnName(colIdx++, col); - } - } - - // the result column - if (getPathLength() > 0) { - rs.setColumnName(size - 1, "RESULT"); - } - - return rs; - } -} diff --git a/sandbox/toma/src/main/java/net/ontopia/topicmaps/query/toma/impl/basic/expression/RegExpIMatchExpression.java b/sandbox/toma/src/main/java/net/ontopia/topicmaps/query/toma/impl/basic/expression/RegExpIMatchExpression.java deleted file mode 100644 index 0993b0ef0..000000000 --- a/sandbox/toma/src/main/java/net/ontopia/topicmaps/query/toma/impl/basic/expression/RegExpIMatchExpression.java +++ /dev/null @@ -1,50 +0,0 @@ -/** - * Copyright (C) 2009 Space Applications Services - * - * - * This file is part of the Ontopia project. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -package net.ontopia.topicmaps.query.toma.impl.basic.expression; - -import java.util.regex.Matcher; -import java.util.regex.Pattern; - -/** - * INTERNAL: Case insensitive regular expression match ('~*') operator, - * checks whether an expression is matched by the given regular expression. - *

    - * Note: For convenience reasons, the specified regular expression is - * automatically extended to match any following string afterwards: "expr.*". - *

    - */ -public class RegExpIMatchExpression extends AbstractComparisonExpression { - public RegExpIMatchExpression() { - super("~*"); - } - - protected boolean satisfiesExpression(String s1, String s2) { - if (s1 != null && s2 != null) { - Pattern p = Pattern.compile(s2 + ".*", Pattern.CASE_INSENSITIVE); - Matcher m = p.matcher(s1); - if (m.matches()) { - return true; - } else { - return false; - } - } else { - return false; - } - } -} diff --git a/sandbox/toma/src/main/java/net/ontopia/topicmaps/query/toma/impl/basic/expression/RegExpMatchExpression.java b/sandbox/toma/src/main/java/net/ontopia/topicmaps/query/toma/impl/basic/expression/RegExpMatchExpression.java deleted file mode 100644 index c32213313..000000000 --- a/sandbox/toma/src/main/java/net/ontopia/topicmaps/query/toma/impl/basic/expression/RegExpMatchExpression.java +++ /dev/null @@ -1,50 +0,0 @@ -/** - * Copyright (C) 2009 Space Applications Services - * - * - * This file is part of the Ontopia project. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -package net.ontopia.topicmaps.query.toma.impl.basic.expression; - -import java.util.regex.Matcher; -import java.util.regex.Pattern; - -/** - * INTERNAL: Regular expression match ('~') operator, checks whether an - * expression is matched by the given regular expression. - *

    - * Note: For convenience reasons, the specified regular expression is - * automatically extended to match any following string afterwards: "expr.*". - *

    - */ -public class RegExpMatchExpression extends AbstractComparisonExpression { - public RegExpMatchExpression() { - super("~"); - } - - protected boolean satisfiesExpression(String s1, String s2) { - if (s1 != null && s2 != null) { - Pattern p = Pattern.compile(s2 + ".*"); - Matcher m = p.matcher(s1); - if (m.matches()) { - return true; - } else { - return false; - } - } else { - return false; - } - } -} diff --git a/sandbox/toma/src/main/java/net/ontopia/topicmaps/query/toma/impl/basic/function/AbstractAggregateFunction.java b/sandbox/toma/src/main/java/net/ontopia/topicmaps/query/toma/impl/basic/function/AbstractAggregateFunction.java deleted file mode 100644 index 9c352c5c8..000000000 --- a/sandbox/toma/src/main/java/net/ontopia/topicmaps/query/toma/impl/basic/function/AbstractAggregateFunction.java +++ /dev/null @@ -1,55 +0,0 @@ -/** - * Copyright (C) 2009 Space Applications Services - * - * - * This file is part of the Ontopia project. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -package net.ontopia.topicmaps.query.toma.impl.basic.function; - -import net.ontopia.topicmaps.query.core.InvalidQueryException; -import net.ontopia.topicmaps.query.toma.impl.basic.BasicExpressionIF; -import net.ontopia.topicmaps.query.toma.impl.basic.BasicFunctionIF; -import net.ontopia.topicmaps.query.toma.impl.basic.LocalContext; -import net.ontopia.topicmaps.query.toma.impl.basic.ResultSet; -import net.ontopia.topicmaps.query.toma.parser.ast.AbstractFunction; - -/** - * INTERNAL: Abstract base class for aggregated functions used by the - * {@link BasicQueryProcessor}. - */ -public abstract class AbstractAggregateFunction extends AbstractFunction - implements BasicFunctionIF { - - public AbstractAggregateFunction(String name, int maxParameters) { - super(name, maxParameters, true); - } - - public ResultSet evaluate(LocalContext context) throws InvalidQueryException { - // all functions need to have exactly one child - if (getChildCount() != 1) { - throw new InvalidQueryException("Function '" + getName() - + "' does not have a child."); - } - - // get the child and evaluate it - BasicExpressionIF child = (BasicExpressionIF) getChild(0); - return child.evaluate(context); - } - - public String evaluate(Object obj) throws InvalidQueryException { - throw new InvalidQueryException("Function '" + getName() - + "' is an aggregate function."); - } -} diff --git a/sandbox/toma/src/main/java/net/ontopia/topicmaps/query/toma/impl/basic/function/AbstractSimpleFunction.java b/sandbox/toma/src/main/java/net/ontopia/topicmaps/query/toma/impl/basic/function/AbstractSimpleFunction.java deleted file mode 100644 index 3e059f5bb..000000000 --- a/sandbox/toma/src/main/java/net/ontopia/topicmaps/query/toma/impl/basic/function/AbstractSimpleFunction.java +++ /dev/null @@ -1,66 +0,0 @@ -/** - * Copyright (C) 2009 Space Applications Services - * - * - * This file is part of the Ontopia project. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -package net.ontopia.topicmaps.query.toma.impl.basic.function; - -import java.util.Collection; - -import net.ontopia.topicmaps.query.core.InvalidQueryException; -import net.ontopia.topicmaps.query.toma.impl.basic.BasicExpressionIF; -import net.ontopia.topicmaps.query.toma.impl.basic.BasicFunctionIF; -import net.ontopia.topicmaps.query.toma.impl.basic.LocalContext; -import net.ontopia.topicmaps.query.toma.impl.basic.ResultSet; -import net.ontopia.topicmaps.query.toma.impl.basic.Row; -import net.ontopia.topicmaps.query.toma.parser.ast.AbstractFunction; - -/** - * INTERNAL: Abstract base class for normal functions used for the - * {@link BasicQueryProcessor}. - */ -public abstract class AbstractSimpleFunction extends AbstractFunction implements - BasicFunctionIF { - - public AbstractSimpleFunction(String name, int maxParameters) { - super(name, maxParameters, false); - } - - public ResultSet evaluate(LocalContext context) throws InvalidQueryException { - // all functions need to have exactly one child - if (getChildCount() != 1) { - throw new InvalidQueryException( - "Function '" + getName() + "' does not have a child."); - } - - // get the child and evaluate it - BasicExpressionIF child = (BasicExpressionIF) getChild(0); - ResultSet rs = child.evaluate(context); - - // for each row, execute the function on the last column - for (Object r : rs) { - Row row = (Row) r; - row.setLastValue(evaluate(row.getLastValue())); - } - - return rs; - } - - public Object aggregate(Collection values) throws InvalidQueryException { - throw new InvalidQueryException( - "Function '" + getName() + "' is not an aggregate function."); - } -} diff --git a/sandbox/toma/src/main/java/net/ontopia/topicmaps/query/toma/impl/basic/function/AvgFunction.java b/sandbox/toma/src/main/java/net/ontopia/topicmaps/query/toma/impl/basic/function/AvgFunction.java deleted file mode 100644 index 8404e80c8..000000000 --- a/sandbox/toma/src/main/java/net/ontopia/topicmaps/query/toma/impl/basic/function/AvgFunction.java +++ /dev/null @@ -1,52 +0,0 @@ -/** - * Copyright (C) 2009 Space Applications Services - * - * - * This file is part of the Ontopia project. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -package net.ontopia.topicmaps.query.toma.impl.basic.function; - -import java.util.Collection; - -import net.ontopia.topicmaps.query.core.InvalidQueryException; - -/** - * INTERNAL: Calculates the average value of the outputs from an expression. - *

    - * Note: This function is only defined for numbers. In case the - * encapsulated expression returns something else, the result will be 0. - *

    - */ -public class AvgFunction extends AbstractAggregateFunction { - - public AvgFunction() { - super("AVG", 0); - } - - public Object aggregate(Collection values) throws InvalidQueryException { - double sum = 0.0; - for (Object val : values) { - try { - sum += Double.parseDouble(ToNumFunction.convertToNumber(val)); - } catch (NumberFormatException e) { - throw new InvalidQueryException("A value as input to the '" + getName() - + "' function could not be converted to a number."); - } - } - - double avg = sum / Math.max(values.size(), 1); - return new Double(avg); - } -} diff --git a/sandbox/toma/src/main/java/net/ontopia/topicmaps/query/toma/impl/basic/function/ConcatFunction.java b/sandbox/toma/src/main/java/net/ontopia/topicmaps/query/toma/impl/basic/function/ConcatFunction.java deleted file mode 100644 index 9458a6cfc..000000000 --- a/sandbox/toma/src/main/java/net/ontopia/topicmaps/query/toma/impl/basic/function/ConcatFunction.java +++ /dev/null @@ -1,63 +0,0 @@ -/** - * Copyright (C) 2009 Space Applications Services - * - * - * This file is part of the Ontopia project. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -package net.ontopia.topicmaps.query.toma.impl.basic.function; - -import java.util.Collection; - -import net.ontopia.topicmaps.query.core.InvalidQueryException; -import net.ontopia.topicmaps.query.toma.impl.utils.Stringifier; -import net.ontopia.topicmaps.query.toma.parser.AntlrWrapException; - -/** - * INTERNAL: Concatenate a collection to a string. - */ -public class ConcatFunction extends AbstractAggregateFunction { - private String concatStr; - - public ConcatFunction() { - super("CONCAT", 1); - } - - public Object aggregate(Collection values) throws InvalidQueryException { - StringBuffer sb = new StringBuffer(); - - int cnt = values.size(); - for (Object val : values) { - sb.append(Stringifier.toString(val)); - if (--cnt > 0) { - sb.append(concatStr); - } - } - - return sb.toString(); - } - - @Override - public boolean validate() throws AntlrWrapException { - super.validate(); - - if (parameters.size() != 1) { - throw new AntlrWrapException(new InvalidQueryException( - "The 'concat' function needs to have 1 parameter.")); - } - - concatStr = parameters.get(0); - return true; - } -} diff --git a/sandbox/toma/src/main/java/net/ontopia/topicmaps/query/toma/impl/basic/function/CountFunction.java b/sandbox/toma/src/main/java/net/ontopia/topicmaps/query/toma/impl/basic/function/CountFunction.java deleted file mode 100644 index cbebed181..000000000 --- a/sandbox/toma/src/main/java/net/ontopia/topicmaps/query/toma/impl/basic/function/CountFunction.java +++ /dev/null @@ -1,37 +0,0 @@ -/** - * Copyright (C) 2009 Space Applications Services - * - * - * This file is part of the Ontopia project. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -package net.ontopia.topicmaps.query.toma.impl.basic.function; - -import java.util.Collection; - -import net.ontopia.topicmaps.query.core.InvalidQueryException; - -/** - * INTERNAL: Calculates the number of outputs from an expression. - */ -public class CountFunction extends AbstractAggregateFunction { - - public CountFunction() { - super("COUNT", 0); - } - - public Object aggregate(Collection values) throws InvalidQueryException { - return new Integer(values.size()); - } -} diff --git a/sandbox/toma/src/main/java/net/ontopia/topicmaps/query/toma/impl/basic/function/LengthFunction.java b/sandbox/toma/src/main/java/net/ontopia/topicmaps/query/toma/impl/basic/function/LengthFunction.java deleted file mode 100644 index a6f34e094..000000000 --- a/sandbox/toma/src/main/java/net/ontopia/topicmaps/query/toma/impl/basic/function/LengthFunction.java +++ /dev/null @@ -1,40 +0,0 @@ -/** - * Copyright (C) 2009 Space Applications Services - * - * - * This file is part of the Ontopia project. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -package net.ontopia.topicmaps.query.toma.impl.basic.function; - -import net.ontopia.topicmaps.query.toma.impl.utils.Stringifier; - -/** - * INTERNAL: Calculates the length of an input string. - */ -public class LengthFunction extends AbstractSimpleFunction { - - public LengthFunction() { - super("LENGTH", 0); - } - - public String evaluate(Object obj) { - String str = Stringifier.toString(obj); - if (str != null) { - return String.valueOf(str.length()); - } else { - return str; - } - } -} diff --git a/sandbox/toma/src/main/java/net/ontopia/topicmaps/query/toma/impl/basic/function/LowerCaseFunction.java b/sandbox/toma/src/main/java/net/ontopia/topicmaps/query/toma/impl/basic/function/LowerCaseFunction.java deleted file mode 100644 index 9a8937ec4..000000000 --- a/sandbox/toma/src/main/java/net/ontopia/topicmaps/query/toma/impl/basic/function/LowerCaseFunction.java +++ /dev/null @@ -1,40 +0,0 @@ -/** - * Copyright (C) 2009 Space Applications Services - * - * - * This file is part of the Ontopia project. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -package net.ontopia.topicmaps.query.toma.impl.basic.function; - -import net.ontopia.topicmaps.query.toma.impl.utils.Stringifier; - -/** - * INTERNAL: Transforms an input string into lowercase letters. - */ -public class LowerCaseFunction extends AbstractSimpleFunction { - - public LowerCaseFunction() { - super("LOWERCASE", 0); - } - - public String evaluate(Object obj) { - String str = Stringifier.toString(obj); - if (str != null) { - return str.toLowerCase(); - } else { - return str; - } - } -} diff --git a/sandbox/toma/src/main/java/net/ontopia/topicmaps/query/toma/impl/basic/function/MaxFunction.java b/sandbox/toma/src/main/java/net/ontopia/topicmaps/query/toma/impl/basic/function/MaxFunction.java deleted file mode 100644 index b76c9eabd..000000000 --- a/sandbox/toma/src/main/java/net/ontopia/topicmaps/query/toma/impl/basic/function/MaxFunction.java +++ /dev/null @@ -1,59 +0,0 @@ -/** - * Copyright (C) 2009 Space Applications Services - * - * - * This file is part of the Ontopia project. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -package net.ontopia.topicmaps.query.toma.impl.basic.function; - -import java.util.Collection; - -import net.ontopia.topicmaps.query.core.InvalidQueryException; - -/** - * INTERNAL: Identifies the maximum of a collection. - *

    - * Note: This function is only defined for numbers. In case the - * encapsulated expression returns something else, the result will be 0. - *

    - */ -public class MaxFunction extends AbstractAggregateFunction { - - public MaxFunction() { - super("MAX", 0); - } - - public Object aggregate(Collection values) throws InvalidQueryException { - double max = Double.MIN_VALUE; - for (Object val : values) { - try { - if (val != null) { - max = Math.max(max, Double.parseDouble(ToNumFunction - .convertToNumber(val))); - } - } catch (NumberFormatException e) { - throw new InvalidQueryException("A value as input to the '" + getName() - + "' function could not be converted to a number."); - } - } - - // if no valid value could be found, return 0 - if (max == Double.MIN_VALUE) { - max = 0.0d; - } - - return new Double(max); - } -} diff --git a/sandbox/toma/src/main/java/net/ontopia/topicmaps/query/toma/impl/basic/function/MinFunction.java b/sandbox/toma/src/main/java/net/ontopia/topicmaps/query/toma/impl/basic/function/MinFunction.java deleted file mode 100644 index 591079896..000000000 --- a/sandbox/toma/src/main/java/net/ontopia/topicmaps/query/toma/impl/basic/function/MinFunction.java +++ /dev/null @@ -1,59 +0,0 @@ -/** - * Copyright (C) 2009 Space Applications Services - * - * - * This file is part of the Ontopia project. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -package net.ontopia.topicmaps.query.toma.impl.basic.function; - -import java.util.Collection; - -import net.ontopia.topicmaps.query.core.InvalidQueryException; - -/** - * INTERNAL: Identifies the minimum value in a collection. - *

    - * Note: This function is only defined for numbers. In case the - * encapsulated expression returns something else, the result will be 0. - *

    - */ -public class MinFunction extends AbstractAggregateFunction { - - public MinFunction() { - super("MIN", 0); - } - - public Object aggregate(Collection values) throws InvalidQueryException { - double min = Double.MAX_VALUE; - for (Object val : values) { - try { - if (val != null) { - min = Math.min(min, Double.parseDouble(ToNumFunction - .convertToNumber(val))); - } - } catch (NumberFormatException e) { - throw new InvalidQueryException("A value as input to the '" + getName() - + "' function could not be converted to a number."); - } - } - - // if no valid value could be found, return 0 - if (min == Double.MAX_VALUE) { - min = 0.0d; - } - - return new Double(min); - } -} diff --git a/sandbox/toma/src/main/java/net/ontopia/topicmaps/query/toma/impl/basic/function/SubstrFunction.java b/sandbox/toma/src/main/java/net/ontopia/topicmaps/query/toma/impl/basic/function/SubstrFunction.java deleted file mode 100644 index 523257e9b..000000000 --- a/sandbox/toma/src/main/java/net/ontopia/topicmaps/query/toma/impl/basic/function/SubstrFunction.java +++ /dev/null @@ -1,111 +0,0 @@ -/** - * Copyright (C) 2009 Space Applications Services - * - * - * This file is part of the Ontopia project. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -package net.ontopia.topicmaps.query.toma.impl.basic.function; - -import net.ontopia.topicmaps.query.core.InvalidQueryException; -import net.ontopia.topicmaps.query.toma.impl.utils.Stringifier; -import net.ontopia.topicmaps.query.toma.parser.AntlrWrapException; - -/** - * INTERNAL: Return a substring of the given input string, depending on specific - * parameters. - */ -public class SubstrFunction extends AbstractSimpleFunction { - - private int from; - private int to; - - public SubstrFunction() { - super("SUBSTR", 2); - from = to = -1; - } - - public String evaluate(Object obj) throws InvalidQueryException { - String str = Stringifier.toString(obj); - if (str != null) { - return substr(str); - } else { - return str; - } - } - - @Override - public boolean validate() throws AntlrWrapException { - super.validate(); - - if (parameters.size() < 1 || parameters.size() > 2) { - throw new AntlrWrapException(new InvalidQueryException( - "Only 1 or 2 parameters are allowed for 'substr' function.")); - } - - String param1 = parameters.get(0); - - try { - from = Integer.valueOf(param1) - 1; - if (from < 0) { - throw new AntlrWrapException(new InvalidQueryException( - "negative values are not allowed as parameter for function 'substr': " - + param1)); - } - } catch (NumberFormatException e) { - throw new AntlrWrapException(new InvalidQueryException( - "invalid parameter for function 'substr': " + param1)); - } - - if (parameters.size() == 2) { - String param2 = parameters.get(1); - - try { - int length = Integer.valueOf(param2); - if (length < 0) { - throw new AntlrWrapException(new InvalidQueryException( - "negative values are not allowed as parameter for function 'substr': " - + param2)); - } - to = from + length; - } catch (NumberFormatException e) { - throw new AntlrWrapException(new InvalidQueryException( - "invalid parameter for function 'substr': " + param2)); - } - } - - return true; - } - - private String substr(String str) throws InvalidQueryException { - int localTo = to; - - // if the start index is bigger than the string itself, return an empty - // string. - if (from >= str.length()) { - return ""; - } - - // if the end index is larger than the string itself, just go to the end - if (localTo >= str.length()) { - localTo = -1; - } - - if (to == -1) { - return str.substring(from); - } else { - return str.substring(from, localTo); - } - } -} diff --git a/sandbox/toma/src/main/java/net/ontopia/topicmaps/query/toma/impl/basic/function/SumFunction.java b/sandbox/toma/src/main/java/net/ontopia/topicmaps/query/toma/impl/basic/function/SumFunction.java deleted file mode 100644 index eeea35b11..000000000 --- a/sandbox/toma/src/main/java/net/ontopia/topicmaps/query/toma/impl/basic/function/SumFunction.java +++ /dev/null @@ -1,53 +0,0 @@ -/** - * Copyright (C) 2009 Space Applications Services - * - * - * This file is part of the Ontopia project. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -package net.ontopia.topicmaps.query.toma.impl.basic.function; - -import java.util.Collection; - -import net.ontopia.topicmaps.query.core.InvalidQueryException; - -/** - * INTERNAL: Calculates the sum of a collection. - *

    - * Note: This function is only defined for numbers. In case the - * encapsulated expression returns something else, the result will be 0. - *

    - */ -public class SumFunction extends AbstractAggregateFunction { - - public SumFunction() { - super("SUM", 0); - } - - public Object aggregate(Collection values) throws InvalidQueryException { - double sum = 0.0d; - for (Object val : values) { - try { - if (val != null) { - sum += Double.parseDouble(ToNumFunction.convertToNumber(val)); - } - } catch (NumberFormatException e) { - throw new InvalidQueryException("A value as input to the '" + getName() - + "' function could not be converted to a number."); - } - } - - return new Double(sum); - } -} diff --git a/sandbox/toma/src/main/java/net/ontopia/topicmaps/query/toma/impl/basic/function/TitleCaseFunction.java b/sandbox/toma/src/main/java/net/ontopia/topicmaps/query/toma/impl/basic/function/TitleCaseFunction.java deleted file mode 100644 index b6fccd67a..000000000 --- a/sandbox/toma/src/main/java/net/ontopia/topicmaps/query/toma/impl/basic/function/TitleCaseFunction.java +++ /dev/null @@ -1,63 +0,0 @@ -/** - * Copyright (C) 2009 Space Applications Services - * - * - * This file is part of the Ontopia project. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -package net.ontopia.topicmaps.query.toma.impl.basic.function; - -import net.ontopia.topicmaps.query.toma.impl.utils.Stringifier; - -/** - * INTERNAL: Transforms a string into titlecase style. - */ -public class TitleCaseFunction extends AbstractSimpleFunction { - - public TitleCaseFunction() { - super("TITLECASE", 0); - } - - public String evaluate(Object obj) { - String str = Stringifier.toString(obj); - if (str != null) { - return toTitleCase(str.toLowerCase()); - } else { - return str; - } - } - - private String toTitleCase(String str) { - if (str == null || str.length() == 0) { - return str; - } - int strLen = str.length(); - StringBuilder buffer = new StringBuilder(strLen); - boolean capitalizeNext = true; - for (int i = 0; i < strLen; i++) { - char ch = str.charAt(i); - - if (Character.isWhitespace(ch)) { - buffer.append(ch); - capitalizeNext = true; - } else if (capitalizeNext) { - buffer.append(Character.toTitleCase(ch)); - capitalizeNext = false; - } else { - buffer.append(ch); - } - } - return buffer.toString(); - } -} diff --git a/sandbox/toma/src/main/java/net/ontopia/topicmaps/query/toma/impl/basic/function/ToNumFunction.java b/sandbox/toma/src/main/java/net/ontopia/topicmaps/query/toma/impl/basic/function/ToNumFunction.java deleted file mode 100644 index 50c793e0c..000000000 --- a/sandbox/toma/src/main/java/net/ontopia/topicmaps/query/toma/impl/basic/function/ToNumFunction.java +++ /dev/null @@ -1,56 +0,0 @@ -/** - * Copyright (C) 2009 Space Applications Services - * - * - * This file is part of the Ontopia project. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -package net.ontopia.topicmaps.query.toma.impl.basic.function; - -import java.util.regex.Matcher; -import java.util.regex.Pattern; - -import net.ontopia.topicmaps.query.core.InvalidQueryException; -import net.ontopia.topicmaps.query.toma.impl.utils.Stringifier; - -/** - * INTERNAL: Converts a string into a number. - */ -public class ToNumFunction extends AbstractSimpleFunction { - - private static Pattern pattern = Pattern - .compile("^\\s*([+\\-]?[0-9]+[\\.]?[0-9]*(?:[eE][+\\-]?[0-9]+)?).*"); - - public ToNumFunction() { - super("TO_NUM", 0); - } - - public static String convertToNumber(Object obj) throws InvalidQueryException { - String str = Stringifier.toString(obj); - if (str != null) { - Matcher m = pattern.matcher(str); - if (m.matches()) { - return m.group(1); - } else { - return "0"; - } - } else { - return "0"; - } - } - - public String evaluate(Object obj) throws InvalidQueryException { - return convertToNumber(obj); - } -} diff --git a/sandbox/toma/src/main/java/net/ontopia/topicmaps/query/toma/impl/basic/function/TrimFunction.java b/sandbox/toma/src/main/java/net/ontopia/topicmaps/query/toma/impl/basic/function/TrimFunction.java deleted file mode 100644 index ac224979d..000000000 --- a/sandbox/toma/src/main/java/net/ontopia/topicmaps/query/toma/impl/basic/function/TrimFunction.java +++ /dev/null @@ -1,111 +0,0 @@ -/** - * Copyright (C) 2009 Space Applications Services - * - * - * This file is part of the Ontopia project. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -package net.ontopia.topicmaps.query.toma.impl.basic.function; - -import net.ontopia.topicmaps.query.core.InvalidQueryException; -import net.ontopia.topicmaps.query.toma.impl.utils.Stringifier; -import net.ontopia.topicmaps.query.toma.parser.AntlrWrapException; - -/** - * INTERNAL: Trims characters from a string. - */ -public class TrimFunction extends AbstractSimpleFunction { - - private enum TRIM_TYPE { - LEADING, - TRAILING, - BOTH - }; - - private String replaceExpr[]; - - public TrimFunction() { - super("TRIM", 2); - } - - public String evaluate(Object obj) throws InvalidQueryException { - String str = Stringifier.toString(obj); - if (str != null) { - return trim(str); - } else { - return str; - } - } - - @Override - public boolean validate() throws AntlrWrapException { - super.validate(); - - if (parameters.size() > 2) { - throw new AntlrWrapException(new InvalidQueryException( - "Only up to 2 parameters are allowed for the 'trim' function.")); - } - - TRIM_TYPE trimming = TRIM_TYPE.BOTH; - - if (parameters.size() > 0) { - String param1 = parameters.get(0); - if (param1 != null) { - param1 = param1.toUpperCase(); - } - - if ("BOTH".equals(param1)) { - trimming = TRIM_TYPE.BOTH; - } else if ("LEADING".equals(param1)) { - trimming = TRIM_TYPE.LEADING; - } else if ("TRAILING".equals(param1)) { - trimming = TRIM_TYPE.TRAILING; - } else { - throw new AntlrWrapException(new InvalidQueryException( - "unknown parameter for function 'trim': " - + param1)); - } - } - - String characters = " "; - if (parameters.size() == 2) { - characters = parameters.get(1); - } - - characters.replaceAll(" ", "\\w"); - characters.replaceAll(".", "\\."); - - switch (trimming) { - case BOTH: - replaceExpr = new String[] { "^([" + characters + "])*", - "([" + characters + "])*$" }; - break; - case LEADING: - replaceExpr = new String[] { "^([" + characters + "])*" }; - break; - case TRAILING: - replaceExpr = new String[] { "([" + characters + "])*$" }; - break; - } - return true; - } - - private String trim(String str) throws InvalidQueryException { - String s = str; - for (String regex : replaceExpr) { - s = s.replaceAll(regex, ""); - } - return s; - } -} diff --git a/sandbox/toma/src/main/java/net/ontopia/topicmaps/query/toma/impl/basic/function/UpperCaseFunction.java b/sandbox/toma/src/main/java/net/ontopia/topicmaps/query/toma/impl/basic/function/UpperCaseFunction.java deleted file mode 100644 index 9b08066cd..000000000 --- a/sandbox/toma/src/main/java/net/ontopia/topicmaps/query/toma/impl/basic/function/UpperCaseFunction.java +++ /dev/null @@ -1,40 +0,0 @@ -/** - * Copyright (C) 2009 Space Applications Services - * - * - * This file is part of the Ontopia project. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -package net.ontopia.topicmaps.query.toma.impl.basic.function; - -import net.ontopia.topicmaps.query.toma.impl.utils.Stringifier; - -/** - * INTERNAL: Transforms a string into uppercase. - */ -public class UpperCaseFunction extends AbstractSimpleFunction { - - public UpperCaseFunction() { - super("UPPERCASE", 0); - } - - public String evaluate(Object obj) { - String str = Stringifier.toString(obj); - if (str != null) { - return str.toUpperCase(); - } else { - return str; - } - } -} diff --git a/sandbox/toma/src/main/java/net/ontopia/topicmaps/query/toma/impl/basic/path/AbstractBasicPathElement.java b/sandbox/toma/src/main/java/net/ontopia/topicmaps/query/toma/impl/basic/path/AbstractBasicPathElement.java deleted file mode 100644 index 0c703113d..000000000 --- a/sandbox/toma/src/main/java/net/ontopia/topicmaps/query/toma/impl/basic/path/AbstractBasicPathElement.java +++ /dev/null @@ -1,176 +0,0 @@ -/** - * Copyright (C) 2009 Space Applications Services - * - * - * This file is part of the Ontopia project. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -package net.ontopia.topicmaps.query.toma.impl.basic.path; - -import java.util.Collection; - -import net.ontopia.topicmaps.query.toma.impl.basic.BasicPathElementIF; -import net.ontopia.topicmaps.query.toma.impl.basic.LocalContext; -import net.ontopia.topicmaps.query.toma.impl.basic.expression.PathExpression; -import net.ontopia.topicmaps.query.toma.parser.ast.AbstractPathElement; -import net.ontopia.topicmaps.query.toma.parser.ast.PathExpressionIF; - -/** - * INTERNAL: Abstract base class for elements in a path expression. - */ -public abstract class AbstractBasicPathElement extends AbstractPathElement - implements BasicPathElementIF { - - protected String[] columns; - protected int resultSize; - - protected boolean assignScope; - protected boolean assignType; - - protected AbstractBasicPathElement(String name) { - super(name); - } - - public void initResultSet(LocalContext context) { - resultSize = 0; - if (getBoundInputVariable() != null) { - resultSize++; - } - if (containsSoleUnboundVariable(getScope(), context)) { - assignScope = true; - resultSize++; - } - if (containsSoleUnboundVariable(getType(), context)) { - assignType = true; - resultSize++; - } - if (getBoundVariable() != null) { - resultSize++; - } - - columns = new String[resultSize]; - - int idx = 0; - if (getBoundInputVariable() != null) { - columns[idx++] = getBoundInputVariable().toString(); - } - if (assignScope) { - columns[idx++] = getVariableName(getScope()); - } - if (assignType) { - columns[idx++] = getVariableName(getType()); - } - if (getBoundVariable() != null) { - columns[idx++] = getBoundVariable().toString(); - } - } - - public final String[] getColumnNames() { - return columns; - } - - public final int getResultSize() { - return resultSize; - } - - /** - * Indicates whether the scope should be assigned to a variable. - * - * @return true if the scope should be assigned; false otherwise. - */ - protected boolean isAssignScope() { - return assignScope; - } - - /** - * Indicates whether the type should be assigned to a variable. - * - * @return true if the type should be assigned; false otherwise. - */ - protected boolean isAssignType() { - return assignType; - } - - /** - * Returns the size of the resulting array. - * - * @return the size of the result array. - */ - protected int getResultArraySize() { - int size = 1; - if (getBoundInputVariable() != null) { - size++; - } - if (isAssignScope()) { - size++; - } - if (isAssignType()) { - size++; - } - return size; - } - - /** - * Indicates if the given path expression consists of a sole unbound (i.e. - * currently not bound in the current context) variable. - * - * @param expr the path expression. - * @param context the current evaluation context. - * @return true if the path expression is a sole unbound variable; false - * otherwise. - */ - protected boolean containsSoleUnboundVariable(PathExpressionIF expr, - LocalContext context) { - if (expr != null) { - PathExpression e = (PathExpression) expr; - String varName = e.getVariableName(); - if (varName != null && e.getPathLength() == 1) { - if (context.getResultSet(varName) == null) { - return true; - } - } - } - return false; - } - - /** - * Returns the name of the variable that is part of this path expression. - * - * @param expr the expression. - * @return the name of the variable within the expression, or null, if no - * variable is present. - */ - protected String getVariableName(PathExpressionIF expr) { - if (expr != null) { - PathExpression e = (PathExpression) expr; - return e.getVariableName(); - } - return null; - } - - /** - * Checks whether collection a contains at least one item from collection b. - * - * @return true if collection a contains any item from collection b, false - * otherwise. - */ - protected boolean containsAny(Collection a, Collection b) { - for (Object obj : b) { - if (a.contains(obj)) { - return true; - } - } - return false; - } -} diff --git a/sandbox/toma/src/main/java/net/ontopia/topicmaps/query/toma/impl/basic/path/AssocPath.java b/sandbox/toma/src/main/java/net/ontopia/topicmaps/query/toma/impl/basic/path/AssocPath.java deleted file mode 100644 index ea8873ce9..000000000 --- a/sandbox/toma/src/main/java/net/ontopia/topicmaps/query/toma/impl/basic/path/AssocPath.java +++ /dev/null @@ -1,341 +0,0 @@ -/** - * Copyright (C) 2009 Space Applications Services - * - * - * This file is part of the Ontopia project. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -package net.ontopia.topicmaps.query.toma.impl.basic.path; - -import java.util.ArrayList; -import java.util.Collection; -import java.util.Set; - -import net.ontopia.topicmaps.core.AssociationIF; -import net.ontopia.topicmaps.core.AssociationRoleIF; -import net.ontopia.topicmaps.core.TopicIF; -import net.ontopia.topicmaps.core.index.ClassInstanceIndexIF; -import net.ontopia.topicmaps.query.core.InvalidQueryException; -import net.ontopia.topicmaps.query.toma.impl.basic.LocalContext; -import net.ontopia.topicmaps.query.toma.impl.basic.ResultSet; -import net.ontopia.topicmaps.query.toma.impl.basic.expression.PathExpression; -import net.ontopia.utils.CompactHashSet; - -/** - * INTERNAL: Association path element in an path expression. Returns all topics - * that take part in the specified association. - *

    - * Allowed Input: - *

      - *
    • TOPIC - *
    - *

    - *

    - * Output: TOPIC - *

    - */ -@SuppressWarnings("unchecked") -public class AssocPath extends AbstractBasicPathElement { - static final Set inputSet; - - static { - inputSet = new CompactHashSet(); - inputSet.add(TYPE.TOPIC); - inputSet.add(TYPE.NONE); - } - - private Collection validScopes = null; - private Collection validTypes = null; - private Collection validLeftRoles = null; - private Collection validRightRoles = null; - - private PathExpression leftRole = null; - private PathExpression rightRole = null; - - private boolean leftTypeAssign; - private boolean rightTypeAssign; - - public AssocPath() { - super("ASSOC"); - } - - protected boolean isLevelAllowed() { - return false; - } - - protected boolean isScopeAllowed() { - return true; - } - - protected boolean isTypeAllowed() { - return true; - } - - protected boolean isChildAllowed() { - return true; - } - - protected boolean isAssignLeftType() { - return leftTypeAssign; - } - - protected boolean isAssignRightType() { - return rightTypeAssign; - } - - public Set validInput() { - return inputSet; - } - - public TYPE output() { - return TYPE.TOPIC; - } - - @Override - public void initResultSet(LocalContext context) { - resultSize = 0; - if (getBoundInputVariable() != null) { - resultSize++; - } - if (containsSoleUnboundVariable(getScope(), context)) { - assignScope = true; - resultSize++; - } - if (containsSoleUnboundVariable(getType(), context)) { - assignType = true; - resultSize++; - } - - switch (getChildCount()) { - case 1: - rightRole = (PathExpression) getChild(0); - break; - case 2: - leftRole = (PathExpression) getChild(0); - rightRole = (PathExpression) getChild(1); - break; - } - - if (leftRole != null && containsSoleUnboundVariable(leftRole, context)) { - leftTypeAssign = true; - resultSize++; - } - - if (rightRole != null && containsSoleUnboundVariable(rightRole, context)) { - rightTypeAssign = true; - resultSize++; - } - - if (getBoundVariable() != null) { - resultSize++; - } - - columns = new String[resultSize]; - - int idx = 0; - if (getBoundInputVariable() != null) { - columns[idx++] = getBoundInputVariable().toString(); - } - if (assignScope) { - columns[idx++] = getVariableName(getScope()); - } - if (assignType) { - columns[idx++] = getVariableName(getType()); - } - if (leftTypeAssign) { - columns[idx++] = getVariableName(leftRole); - } - if (rightTypeAssign) { - columns[idx++] = getVariableName(rightRole); - } - if (getBoundVariable() != null) { - columns[idx++] = getBoundVariable().toString(); - } - } - - public Collection evaluate(LocalContext context, Object input) - throws InvalidQueryException { - TopicIF topic = null; - if (input instanceof TopicIF) { - topic = (TopicIF) input; - } - - if (getScope() != null && !isAssignScope()) { - PathExpression scope = (PathExpression) getScope(); - // Optimization: if the scope expression does not contain a variable, we - // can cache it. - if (scope.getVariableName() != null || validScopes == null) { - ResultSet scopes = scope.evaluate(context); - validScopes = (Collection) scopes.getValidValues(scopes - .getLastIndex()); - } - } - - PathExpression type = (PathExpression) getType(); - if (!isAssignType()) { - // Optimization: if the type expression does not contain a variable, we - // can cache it. - if (type.getVariableName() != null || validTypes == null) { - ResultSet types = type.evaluate(context); - validTypes = (Collection) types.getValidValues(types - .getLastIndex()); - } - } - - if (leftRole != null) { - return evaluateLeft(context, topic, leftRole, rightRole, validTypes, - validScopes); - } else { - ClassInstanceIndexIF index = (ClassInstanceIndexIF) context.getTopicMap() - .getIndex("net.ontopia.topicmaps.core.index.ClassInstanceIndexIF"); - - Collection assocTypes = validTypes; - if (assocTypes == null) { - assocTypes = index.getAssociationTypes(); - } - - Collection roles = new ArrayList(); - for (TopicIF t : assocTypes) { - Collection assocs = index.getAssociations((TopicIF) t); - for (AssociationIF a : assocs) { - if (validScopes == null || containsAny(a.getScope(), validScopes)) { - for (Object role : a.getRoles()) { - roles.add(new Object[] { role }); - } - } - } - } - - return evaluateRight(context, rightRole, roles); - } - - } - - private Collection evaluateLeft(LocalContext context, - TopicIF input, PathExpression left, PathExpression right, - Collection validTypes, Collection validScopes) - throws InvalidQueryException { - if (!isAssignLeftType()) { - // Optimization: if the type expression does not contain a variable, we - // can cache it. - if (!left.isEmpty() - && (left.getVariableName() != null || validRightRoles == null)) { - ResultSet roles = left.evaluate(context); - validLeftRoles = (Collection) roles.getValidValues(roles - .getLastIndex()); - } - } - - Collection inputRoles = input.getRoles(); - Collection result = new ArrayList(inputRoles.size()); - for (AssociationRoleIF role : inputRoles) { - if (validLeftRoles == null || validLeftRoles.contains(role.getType())) { - AssociationIF a = role.getAssociation(); - if (validTypes == null || validTypes.contains(a.getType())) { - if (validScopes == null || containsAny(a.getScope(), validScopes)) { - // add all the other roles of this assoc - Set tmp = new CompactHashSet(a.getRoles()); - tmp.remove(role); - - for (AssociationRoleIF otherRole : tmp) { - result.add(new Object[] { role.getType(), otherRole }); - } - } - } - } - } - - return evaluateRight(context, right, result); - } - - private Collection evaluateRight(LocalContext context, - PathExpression right, Collection roles) - throws InvalidQueryException { - - if (!isAssignRightType()) { - // Optimization: if the type expression does not contain a variable, we - // can cache it. - if (!right.isEmpty() - && (right.getVariableName() != null || validRightRoles == null)) { - ResultSet rs = right.evaluate(context); - validRightRoles = (Collection) rs.getValidValues(rs - .getLastIndex()); - } - } - - Collection result = new ArrayList(roles.size()); - for (Object[] row : roles) { - AssociationRoleIF role = (AssociationRoleIF) row[row.length - 1]; - TopicIF leftRoleType = null; - if (row.length == 2) { - leftRoleType = (TopicIF) row[0]; - } - if (validRightRoles == null || validRightRoles.contains(role.getType())) { - fillResultCollection(result, role, leftRoleType); - } - } - return result; - } - - private void fillResultCollection(Collection result, - AssociationRoleIF role, TopicIF leftRoleType) { - - if (isAssignScope()) { - Collection scopes = role.getAssociation().getScope(); - if (scopes != null && !scopes.isEmpty()) { - for (TopicIF scope : scopes) { - fillSingleResult(result, role, scope, leftRoleType); - } - } else { - fillSingleResult(result, role, null, leftRoleType); - } - } else { - fillSingleResult(result, role, null, leftRoleType); - } - } - - private void fillSingleResult(Collection result, - AssociationRoleIF role, TopicIF scope, TopicIF leftRoleType) { - int rsSize = getResultSize(); - if (getBoundVariable() == null) { - rsSize++; - } - - Object[] row = new Object[rsSize]; - int idx = 0; - - if (getBoundInputVariable() != null) { - row[idx++] = role.getAssociation(); - } - - if (isAssignScope()) { - row[idx++] = scope; - } - - if (isAssignType()) { - row[idx++] = role.getAssociation().getType(); - } - - if (isAssignLeftType()) { - row[idx++] = leftRoleType; - } - - if (isAssignRightType()) { - row[idx++] = role.getType(); - } - - row[idx] = role.getPlayer(); - result.add(row); - } -} diff --git a/sandbox/toma/src/main/java/net/ontopia/topicmaps/query/toma/impl/basic/path/DataPath.java b/sandbox/toma/src/main/java/net/ontopia/topicmaps/query/toma/impl/basic/path/DataPath.java deleted file mode 100644 index 0282ab43f..000000000 --- a/sandbox/toma/src/main/java/net/ontopia/topicmaps/query/toma/impl/basic/path/DataPath.java +++ /dev/null @@ -1,94 +0,0 @@ -/** - * Copyright (C) 2009 Space Applications Services - * - * - * This file is part of the Ontopia project. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -package net.ontopia.topicmaps.query.toma.impl.basic.path; - -import java.util.ArrayList; -import java.util.Collection; -import java.util.Set; - -import net.ontopia.topicmaps.core.OccurrenceIF; -import net.ontopia.topicmaps.core.VariantNameIF; -import net.ontopia.topicmaps.query.toma.impl.basic.LocalContext; -import net.ontopia.utils.CompactHashSet; - -/** - * INTERNAL: Data path element in an path expression. Returns the value of - * variants/occurrences as string. - *

    - * Allowed Input: - *

      - *
    • OCCURRENCE - *
    • VARIANT - *
    - *

    - * Output: STRING - *

    - */ -@SuppressWarnings("unchecked") -public class DataPath extends AbstractBasicPathElement { - static final Set inputSet; - - static { - inputSet = new CompactHashSet(); - inputSet.add(TYPE.OCCURRENCE); - inputSet.add(TYPE.VARIANT); - } - - public DataPath() { - super("DATA"); - } - - protected boolean isLevelAllowed() { - return false; - } - - protected boolean isScopeAllowed() { - return false; - } - - protected boolean isTypeAllowed() { - return false; - } - - protected boolean isChildAllowed() { - return false; - } - - public Set validInput() { - return inputSet; - } - - public TYPE output() { - return TYPE.STRING; - } - - public Collection evaluate(LocalContext context, Object input) { - Collection coll = new ArrayList(); - - if (input instanceof OccurrenceIF) { - OccurrenceIF oc = (OccurrenceIF) input; - coll.add(oc.getValue()); - } else if (input instanceof VariantNameIF) { - VariantNameIF var = (VariantNameIF) input; - coll.add(var.getValue()); - } - - return coll; - } -} diff --git a/sandbox/toma/src/main/java/net/ontopia/topicmaps/query/toma/impl/basic/path/InstancePath.java b/sandbox/toma/src/main/java/net/ontopia/topicmaps/query/toma/impl/basic/path/InstancePath.java deleted file mode 100644 index 7d649a38e..000000000 --- a/sandbox/toma/src/main/java/net/ontopia/topicmaps/query/toma/impl/basic/path/InstancePath.java +++ /dev/null @@ -1,117 +0,0 @@ -/** - * Copyright (C) 2009 Space Applications Services - * - * - * This file is part of the Ontopia project. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -package net.ontopia.topicmaps.query.toma.impl.basic.path; - -import java.util.Collection; -import java.util.Set; - -import net.ontopia.topicmaps.core.TopicIF; -import net.ontopia.topicmaps.core.index.ClassInstanceIndexIF; -import net.ontopia.topicmaps.query.toma.impl.basic.LocalContext; -import net.ontopia.topicmaps.query.toma.parser.ast.Level; -import net.ontopia.utils.CompactHashSet; - -/** - * INTERNAL: Instance path element in an path expression. Returns all topics - * that are an instance of a given type. - *

    - * Allowed Input: - *

      - *
    • TOPIC - *
    - *

    - * Output: TOPIC - *

    - */ -@SuppressWarnings("unchecked") -public class InstancePath extends AbstractBasicPathElement { - static final Set inputSet; - - static { - inputSet = new CompactHashSet(); - inputSet.add(TYPE.TOPIC); - } - - public InstancePath() { - super("INSTANCE"); - } - - protected boolean isLevelAllowed() { - return true; - } - - protected boolean isScopeAllowed() { - return false; - } - - protected boolean isTypeAllowed() { - return false; - } - - protected boolean isChildAllowed() { - return false; - } - - public Set validInput() { - return inputSet; - } - - public TYPE output() { - return TYPE.TOPIC; - } - - public Collection evaluate(LocalContext context, Object input) { - TopicIF topic = (TopicIF) input; - - // level is required for this element - Level l = getLevel(); - - // use a set as collection for the types, as one type can occur multiple - // times (and should only be counted once). - Collection types = new CompactHashSet(); - - // include the topic itself, if the start level is 0 - if (l.getStart() == 0) { - types.add(topic); - } - - ClassInstanceIndexIF index = (ClassInstanceIndexIF) context.getTopicMap() - .getIndex("net.ontopia.topicmaps.core.index.ClassInstanceIndexIF"); - - fillTypeList(index.getTopics(topic), l, 1, types, index); - return types; - } - - private void fillTypeList(Collection types, Level l, int depth, - Collection result, ClassInstanceIndexIF index) { - // we are finished if we reached the end of the range, or the typelist is empty - if (depth > l.getEnd() || types == null) { - return; - } - - // only add the types if we are already within the required range - if (depth >= l.getStart()) { - result.addAll(types); - } - - for (TopicIF type : types) { - fillTypeList(index.getTopics(type), l, depth+1, result, index); - } - } -} diff --git a/sandbox/toma/src/main/java/net/ontopia/topicmaps/query/toma/impl/basic/path/ItemIDPath.java b/sandbox/toma/src/main/java/net/ontopia/topicmaps/query/toma/impl/basic/path/ItemIDPath.java deleted file mode 100644 index ff8164b5c..000000000 --- a/sandbox/toma/src/main/java/net/ontopia/topicmaps/query/toma/impl/basic/path/ItemIDPath.java +++ /dev/null @@ -1,91 +0,0 @@ -/** - * Copyright (C) 2009 Space Applications Services - * - * - * This file is part of the Ontopia project. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -package net.ontopia.topicmaps.query.toma.impl.basic.path; - -import java.util.Collection; -import java.util.Set; - -import net.ontopia.infoset.core.LocatorIF; -import net.ontopia.topicmaps.core.TMObjectIF; -import net.ontopia.topicmaps.query.toma.impl.basic.LocalContext; -import net.ontopia.utils.CompactHashSet; - -/** - * INTERNAL: ID path element in an path expression. Returns the item identifiers - * of a given topic map construct as a locator. - *

    - * Allowed Input: - *

      - *
    • TOPIC - *
    • NAME - *
    • VARIANT - *
    • OCCURRENCE - *
    • ASSOCIATION - *
    - *

    - * Output: LOCATOR - *

    - */ -@SuppressWarnings("unchecked") -public class ItemIDPath extends AbstractBasicPathElement { - - static final Set inputSet; - - static { - inputSet = new CompactHashSet(); - inputSet.add(TYPE.TOPIC); - inputSet.add(TYPE.NAME); - inputSet.add(TYPE.VARIANT); - inputSet.add(TYPE.OCCURRENCE); - inputSet.add(TYPE.ASSOCIATION); - } - - public ItemIDPath() { - super("ID"); - } - - protected boolean isLevelAllowed() { - return false; - } - - protected boolean isScopeAllowed() { - return false; - } - - protected boolean isTypeAllowed() { - return false; - } - - protected boolean isChildAllowed() { - return false; - } - - public Set validInput() { - return inputSet; - } - - public TYPE output() { - return TYPE.LOCATOR; - } - - public Collection evaluate(LocalContext context, Object input) { - TMObjectIF tm = (TMObjectIF) input; - return tm.getItemIdentifiers(); - } -} diff --git a/sandbox/toma/src/main/java/net/ontopia/topicmaps/query/toma/impl/basic/path/NamePath.java b/sandbox/toma/src/main/java/net/ontopia/topicmaps/query/toma/impl/basic/path/NamePath.java deleted file mode 100644 index 5467351bd..000000000 --- a/sandbox/toma/src/main/java/net/ontopia/topicmaps/query/toma/impl/basic/path/NamePath.java +++ /dev/null @@ -1,149 +0,0 @@ -/** - * Copyright (C) 2009 Space Applications Services - * - * - * This file is part of the Ontopia project. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -package net.ontopia.topicmaps.query.toma.impl.basic.path; - -import java.util.ArrayList; -import java.util.Collection; -import java.util.Set; - -import net.ontopia.topicmaps.core.TopicIF; -import net.ontopia.topicmaps.core.TopicNameIF; -import net.ontopia.topicmaps.query.core.InvalidQueryException; -import net.ontopia.topicmaps.query.toma.impl.basic.LocalContext; -import net.ontopia.topicmaps.query.toma.impl.basic.ResultSet; -import net.ontopia.topicmaps.query.toma.impl.basic.expression.PathExpression; -import net.ontopia.utils.CompactHashSet; - -/** - * INTERNAL: Name path element in an path expression. Returns all names - * of a given input topic. - *

    - * Allowed Input: - *

      - *
    • TOPIC - *
    - *

    - * Output: NAME - *

    - */ -@SuppressWarnings("unchecked") -public class NamePath extends AbstractBasicPathElement { - static final Set inputSet; - - static { - inputSet = new CompactHashSet(); - inputSet.add(TYPE.TOPIC); - } - - private Collection validScopes = null; - private Collection validTypes = null; - - public NamePath() { - super("NAME"); - } - - protected boolean isLevelAllowed() { - return false; - } - - protected boolean isScopeAllowed() { - return true; - } - - protected boolean isTypeAllowed() { - return true; - } - - protected boolean isChildAllowed() { - return false; - } - - public Set validInput() { - return inputSet; - } - - public TYPE output() { - return TYPE.NAME; - } - - public Collection evaluate(LocalContext context, Object input) - throws InvalidQueryException { - TopicIF topic = (TopicIF) input; - - if (getScope() != null && !isAssignScope()) { - PathExpression scope = (PathExpression) getScope(); - // Optimization: if the scope expression does not contain a variable, we - // can cache it. - if (scope.getVariableName() != null || validScopes == null) { - ResultSet scopes = scope.evaluate(context); - validScopes = scopes.getValidValues(scopes.getLastIndex()); - } - } - - if (getType() != null && !isAssignType()) { - PathExpression type = (PathExpression) getType(); - // Optimization: if the type expression does not contain a variable, we - // can cache it. - if (type.getVariableName() != null || validTypes == null) { - ResultSet types = type.evaluate(context); - validTypes = types.getValidValues(types.getLastIndex()); - } - } - - Collection names = topic.getTopicNames(); - if (validTypes == null && validScopes == null && !isAssignScope() - && !isAssignType()) { - return names; - } else { - Collection result = new ArrayList(); - for (TopicNameIF name : names) { - TopicIF nameType = name.getType(); - if (validTypes == null || validTypes.contains(nameType)) { - if (validScopes == null || - containsAny(name.getScope(), validScopes)) { - fillResultCollection(result, name); - } - } - } - return result; - } - } - - private void fillResultCollection(Collection result, - TopicNameIF name) { - if (isAssignScope()) { - Collection scopes = name.getScope(); - if (scopes.isEmpty()) { - if (isAssignType()) { - result.add(new Object[] { null, name.getType(), name }); - } else { - result.add(new Object[] { null, name }); - } - } else { - for (TopicIF scope : scopes) { - result.add(new Object[] { scope, name.getType(), name }); - } - } - } else if (isAssignType()) { - result.add(new Object[] { name.getType(), name }); - } else { - result.add(new Object[] { name }); - } - } -} diff --git a/sandbox/toma/src/main/java/net/ontopia/topicmaps/query/toma/impl/basic/path/OccurrencePath.java b/sandbox/toma/src/main/java/net/ontopia/topicmaps/query/toma/impl/basic/path/OccurrencePath.java deleted file mode 100644 index c4315b9a9..000000000 --- a/sandbox/toma/src/main/java/net/ontopia/topicmaps/query/toma/impl/basic/path/OccurrencePath.java +++ /dev/null @@ -1,151 +0,0 @@ -/** - * Copyright (C) 2009 Space Applications Services - * - * - * This file is part of the Ontopia project. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -package net.ontopia.topicmaps.query.toma.impl.basic.path; - -import java.util.ArrayList; -import java.util.Collection; -import java.util.Set; - -import net.ontopia.topicmaps.core.OccurrenceIF; -import net.ontopia.topicmaps.core.TopicIF; -import net.ontopia.topicmaps.query.core.InvalidQueryException; -import net.ontopia.topicmaps.query.toma.impl.basic.LocalContext; -import net.ontopia.topicmaps.query.toma.impl.basic.ResultSet; -import net.ontopia.topicmaps.query.toma.impl.basic.expression.PathExpression; -import net.ontopia.utils.CompactHashSet; - -/** - * INTERNAL: Occurrence path element in an path expression. Returns all - * occurrences of a given input topic. - *

    - * Allowed Input: - *

      - *
    • TOPIC - *
    - *

    - *

    - * Output: OCCURRENCE - *

    - */ -@SuppressWarnings("unchecked") -public class OccurrencePath extends AbstractBasicPathElement { - static final Set inputSet; - - static { - inputSet = new CompactHashSet(); - inputSet.add(TYPE.TOPIC); - } - - private Collection validScopes = null; - private Collection validTypes = null; - - public OccurrencePath() { - super("OC"); - } - - protected boolean isLevelAllowed() { - return false; - } - - protected boolean isScopeAllowed() { - return true; - } - - protected boolean isTypeAllowed() { - return true; - } - - protected boolean isChildAllowed() { - return false; - } - - public Set validInput() { - return inputSet; - } - - public TYPE output() { - return TYPE.OCCURRENCE; - } - - public Collection evaluate(LocalContext context, Object input) - throws InvalidQueryException { - TopicIF topic = (TopicIF) input; - - if (getScope() != null && !isAssignScope()) { - PathExpression scope = (PathExpression) getScope(); - // Optimization: if the scope expression does not contain a variable, we - // can cache it. - if (scope.getVariableName() != null || validScopes == null) { - ResultSet scopes = scope.evaluate(context); - validScopes = (Collection) scopes.getValidValues(scopes - .getLastIndex()); - } - } - - if (getType() != null && !isAssignType()) { - PathExpression type = (PathExpression) getType(); - // Optimization: if the type expression does not contain a variable, we - // can cache it. - if (type.getVariableName() != null || validTypes == null) { - ResultSet types = type.evaluate(context); - validTypes = (Collection) types.getValidValues(types - .getLastIndex()); - } - } - - Collection ocs = topic.getOccurrences(); - if (validTypes == null && validScopes == null && !isAssignScope() - && !isAssignType()) { - return ocs; - } else { - Collection result = new ArrayList(); - for (OccurrenceIF oc : ocs) { - TopicIF ocType = oc.getType(); - if (validTypes == null || validTypes.contains(ocType)) { - if (validScopes == null || containsAny(oc.getScope(), validScopes)) { - fillResultCollection(result, oc); - } - } - } - return result; - } - } - - private void fillResultCollection(Collection result, - OccurrenceIF oc) { - if (isAssignScope()) { - Collection scopes = oc.getScope(); - if (scopes.isEmpty()) { - if (isAssignType()) { - result.add(new Object[] { null, oc.getType(), oc }); - } else { - result.add(new Object[] { null, oc }); - } - } else { - for (TopicIF scope : scopes) { - result.add(new Object[] { scope, oc.getType(), oc }); - } - } - } else if (isAssignType()) { - result.add(new Object[] { oc.getType(), oc }); - } else { - result.add(new Object[] { oc }); - } - } -} diff --git a/sandbox/toma/src/main/java/net/ontopia/topicmaps/query/toma/impl/basic/path/PlayerPath.java b/sandbox/toma/src/main/java/net/ontopia/topicmaps/query/toma/impl/basic/path/PlayerPath.java deleted file mode 100644 index 4f9ca64aa..000000000 --- a/sandbox/toma/src/main/java/net/ontopia/topicmaps/query/toma/impl/basic/path/PlayerPath.java +++ /dev/null @@ -1,90 +0,0 @@ -/** - * Copyright (C) 2009 Space Applications Services - * - * - * This file is part of the Ontopia project. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -package net.ontopia.topicmaps.query.toma.impl.basic.path; - -import java.util.ArrayList; -import java.util.Collection; -import java.util.List; -import java.util.Set; - -import net.ontopia.topicmaps.core.AssociationIF; -import net.ontopia.topicmaps.core.AssociationRoleIF; -import net.ontopia.topicmaps.core.TopicIF; -import net.ontopia.topicmaps.query.toma.impl.basic.LocalContext; -import net.ontopia.utils.CompactHashSet; - -/** - * INTERNAL: Player path element in an path expression. Returns all players - * of a given input association. - *

    - * Allowed Input: - *

      - *
    • ASSOCIATION - *
    - *

    - * Output: TOPIC - *

    - */ -@SuppressWarnings("unchecked") -public class PlayerPath extends AbstractBasicPathElement { - static final Set inputSet; - - static { - inputSet = new CompactHashSet(); - inputSet.add(TYPE.ASSOCIATION); - } - - public PlayerPath() { - super("PLAYER"); - } - - protected boolean isLevelAllowed() { - return false; - } - - protected boolean isScopeAllowed() { - return false; - } - - protected boolean isTypeAllowed() { - return false; - } - - protected boolean isChildAllowed() { - return false; - } - - public Set validInput() { - return inputSet; - } - - public TYPE output() { - return TYPE.TOPIC; - } - - public Collection evaluate(LocalContext context, Object input) { - AssociationIF assoc = (AssociationIF) input; - Collection roles = assoc.getRoles(); - List result = new ArrayList(); - for (AssociationRoleIF role : roles) { - result.add(role.getPlayer()); - } - return result; - } -} diff --git a/sandbox/toma/src/main/java/net/ontopia/topicmaps/query/toma/impl/basic/path/ReferencePath.java b/sandbox/toma/src/main/java/net/ontopia/topicmaps/query/toma/impl/basic/path/ReferencePath.java deleted file mode 100644 index 2c5a7dfbe..000000000 --- a/sandbox/toma/src/main/java/net/ontopia/topicmaps/query/toma/impl/basic/path/ReferencePath.java +++ /dev/null @@ -1,95 +0,0 @@ -/** - * Copyright (C) 2009 Space Applications Services - * - * - * This file is part of the Ontopia project. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -package net.ontopia.topicmaps.query.toma.impl.basic.path; - -import java.util.ArrayList; -import java.util.Collection; -import java.util.Set; - -import net.ontopia.infoset.core.LocatorIF; -import net.ontopia.topicmaps.core.OccurrenceIF; -import net.ontopia.topicmaps.core.VariantNameIF; -import net.ontopia.topicmaps.query.toma.impl.basic.LocalContext; -import net.ontopia.utils.CompactHashSet; - -/** - * INTERNAL: Reference path element in an path expression. Returns the locator for - * an variant or occurrence element. - *

    - * Allowed Input: - *

      - *
    • VARIANT - *
    • OCCURRENCE - *
    - *

    - * Output: LOCATOR - *

    - */ -@SuppressWarnings("unchecked") -public class ReferencePath extends AbstractBasicPathElement { - static final Set inputSet; - - static { - inputSet = new CompactHashSet(); - inputSet.add(TYPE.VARIANT); - inputSet.add(TYPE.OCCURRENCE); - } - - public ReferencePath() { - super("REF"); - } - - protected boolean isLevelAllowed() { - return false; - } - - protected boolean isScopeAllowed() { - return false; - } - - protected boolean isTypeAllowed() { - return false; - } - - protected boolean isChildAllowed() { - return false; - } - - public Set validInput() { - return inputSet; - } - - public TYPE output() { - return TYPE.LOCATOR; - } - - public Collection evaluate(LocalContext context, Object input) { - Collection coll = new ArrayList(); - - if (input instanceof OccurrenceIF) { - OccurrenceIF oc = (OccurrenceIF) input; - coll.add(oc.getLocator()); - } else if (input instanceof VariantNameIF) { - VariantNameIF var = (VariantNameIF) input; - coll.add(var.getLocator()); - } - - return coll; - } -} diff --git a/sandbox/toma/src/main/java/net/ontopia/topicmaps/query/toma/impl/basic/path/ReifierPath.java b/sandbox/toma/src/main/java/net/ontopia/topicmaps/query/toma/impl/basic/path/ReifierPath.java deleted file mode 100644 index b263d5093..000000000 --- a/sandbox/toma/src/main/java/net/ontopia/topicmaps/query/toma/impl/basic/path/ReifierPath.java +++ /dev/null @@ -1,91 +0,0 @@ -/** - * Copyright (C) 2009 Space Applications Services - * - * - * This file is part of the Ontopia project. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -package net.ontopia.topicmaps.query.toma.impl.basic.path; - -import java.util.ArrayList; -import java.util.Collection; -import java.util.Set; - -import net.ontopia.topicmaps.core.ReifiableIF; -import net.ontopia.topicmaps.core.TopicIF; -import net.ontopia.topicmaps.query.toma.impl.basic.LocalContext; -import net.ontopia.utils.CompactHashSet; - -/** - * INTERNAL: Reifier path element in an path expression. Returns the reifier for - * an topic map construct. - *

    - * Allowed Input: - *

      - *
    • NAME - *
    • ASSOCIATION - *
    • VARIANT - *
    • OCCURRENCE - *
    - *

    - * Output: TOPIC - *

    - */ -@SuppressWarnings("unchecked") -public class ReifierPath extends AbstractBasicPathElement { - static final Set inputSet; - - static { - inputSet = new CompactHashSet(); - inputSet.add(TYPE.NAME); - inputSet.add(TYPE.VARIANT); - inputSet.add(TYPE.OCCURRENCE); - inputSet.add(TYPE.ASSOCIATION); - } - - public ReifierPath() { - super("REIFIER"); - } - - protected boolean isLevelAllowed() { - return false; - } - - protected boolean isScopeAllowed() { - return false; - } - - protected boolean isTypeAllowed() { - return false; - } - - protected boolean isChildAllowed() { - return false; - } - - public Set validInput() { - return inputSet; - } - - public TYPE output() { - return TYPE.TOPIC; - } - - public Collection evaluate(LocalContext context, Object input) { - ReifiableIF construct = (ReifiableIF) input; - Collection coll = new ArrayList(); - coll.add(construct.getReifier()); - return coll; - } -} diff --git a/sandbox/toma/src/main/java/net/ontopia/topicmaps/query/toma/impl/basic/path/RolePath.java b/sandbox/toma/src/main/java/net/ontopia/topicmaps/query/toma/impl/basic/path/RolePath.java deleted file mode 100644 index 35cb39e20..000000000 --- a/sandbox/toma/src/main/java/net/ontopia/topicmaps/query/toma/impl/basic/path/RolePath.java +++ /dev/null @@ -1,82 +0,0 @@ -/** - * Copyright (C) 2009 Space Applications Services - * - * - * This file is part of the Ontopia project. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -package net.ontopia.topicmaps.query.toma.impl.basic.path; - -import java.util.Collection; -import java.util.Set; - -import net.ontopia.topicmaps.core.AssociationIF; -import net.ontopia.topicmaps.core.TopicIF; -import net.ontopia.topicmaps.query.toma.impl.basic.LocalContext; -import net.ontopia.utils.CompactHashSet; - -/** - * INTERNAL: Role path element in an path expression. Returns all roles for a - * given input association. - *

    - * Allowed Input: - *

      - *
    • ASSOCIATION - *
    - *

    - * Output: TOPIC - *

    - */ -@SuppressWarnings("unchecked") -public class RolePath extends AbstractBasicPathElement { - static final Set inputSet; - - static { - inputSet = new CompactHashSet(); - inputSet.add(TYPE.ASSOCIATION); - } - - public RolePath() { - super("ROLE"); - } - - protected boolean isLevelAllowed() { - return false; - } - - protected boolean isScopeAllowed() { - return false; - } - - protected boolean isTypeAllowed() { - return false; - } - - protected boolean isChildAllowed() { - return false; - } - - public Set validInput() { - return inputSet; - } - - public TYPE output() { - return TYPE.TOPIC; - } - - public Collection evaluate(LocalContext context, Object input) { - AssociationIF assoc = (AssociationIF) input; - return assoc.getRoleTypes(); - } -} diff --git a/sandbox/toma/src/main/java/net/ontopia/topicmaps/query/toma/impl/basic/path/ScopePath.java b/sandbox/toma/src/main/java/net/ontopia/topicmaps/query/toma/impl/basic/path/ScopePath.java deleted file mode 100644 index af21575f5..000000000 --- a/sandbox/toma/src/main/java/net/ontopia/topicmaps/query/toma/impl/basic/path/ScopePath.java +++ /dev/null @@ -1,88 +0,0 @@ -/** - * Copyright (C) 2009 Space Applications Services - * - * - * This file is part of the Ontopia project. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -package net.ontopia.topicmaps.query.toma.impl.basic.path; - -import java.util.Collection; -import java.util.Set; - -import net.ontopia.topicmaps.core.ScopedIF; -import net.ontopia.topicmaps.core.TopicIF; -import net.ontopia.topicmaps.query.toma.impl.basic.LocalContext; -import net.ontopia.utils.CompactHashSet; - -/** - * INTERNAL: Scope path element in an path expression. Returns all the scopes of - * a given topic map construct. - *

    - * Allowed Input: - *

      - *
    • NAME - *
    • VARIANT - *
    • OCCURRENCE - *
    • ASSOCIATION - *
    - *

    - * Output: TOPIC - *

    - */ -@SuppressWarnings("unchecked") -public class ScopePath extends AbstractBasicPathElement { - static final Set inputSet; - - static { - inputSet = new CompactHashSet(); - inputSet.add(TYPE.NAME); - inputSet.add(TYPE.VARIANT); - inputSet.add(TYPE.OCCURRENCE); - inputSet.add(TYPE.ASSOCIATION); - } - - public ScopePath() { - super("SC"); - } - - protected boolean isLevelAllowed() { - return false; - } - - protected boolean isScopeAllowed() { - return false; - } - - protected boolean isTypeAllowed() { - return false; - } - - protected boolean isChildAllowed() { - return false; - } - - public Set validInput() { - return inputSet; - } - - public TYPE output() { - return TYPE.TOPIC; - } - - public Collection evaluate(LocalContext context, Object input) { - ScopedIF scoped = (ScopedIF) input; - return scoped.getScope(); - } -} diff --git a/sandbox/toma/src/main/java/net/ontopia/topicmaps/query/toma/impl/basic/path/SubTypePath.java b/sandbox/toma/src/main/java/net/ontopia/topicmaps/query/toma/impl/basic/path/SubTypePath.java deleted file mode 100644 index 781d995da..000000000 --- a/sandbox/toma/src/main/java/net/ontopia/topicmaps/query/toma/impl/basic/path/SubTypePath.java +++ /dev/null @@ -1,114 +0,0 @@ -/** - * Copyright (C) 2009 Space Applications Services - * - * - * This file is part of the Ontopia project. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -package net.ontopia.topicmaps.query.toma.impl.basic.path; - -import java.util.Collection; -import java.util.Iterator; -import java.util.List; -import java.util.Set; - -import net.ontopia.topicmaps.core.TopicIF; -import net.ontopia.topicmaps.query.toma.impl.basic.LocalContext; -import net.ontopia.topicmaps.query.toma.parser.ast.Level; -import net.ontopia.topicmaps.utils.AssociationWalker; -import net.ontopia.topicmaps.utils.PSI; -import net.ontopia.topicmaps.utils.SubjectIdentityDecider; -import net.ontopia.utils.CompactHashSet; -import net.ontopia.utils.DeciderIF; - -/** - * INTERNAL: Subtype path element in an path expression. Returns all subtypes - * of a given type in the topic map. - *

    - * Allowed Input: - *

      - *
    • TOPIC - *
    - *

    - * Output: TOPIC - *

    - */ -@SuppressWarnings("unchecked") -public class SubTypePath extends AbstractBasicPathElement { - static final Set inputSet; - - static { - inputSet = new CompactHashSet(); - inputSet.add(TYPE.TOPIC); - } - - private AssociationWalker subtypesWalker; - - public SubTypePath() { - super("SUB"); - - DeciderIF assocDecider = new SubjectIdentityDecider(PSI.getXTMSuperclassSubclass()); - DeciderIF subclassDecider = new SubjectIdentityDecider(PSI.getXTMSubclass()); - DeciderIF superclassDecider = new SubjectIdentityDecider(PSI.getXTMSuperclass()); - - subtypesWalker = new AssociationWalker(assocDecider, superclassDecider, subclassDecider); - } - - protected boolean isLevelAllowed() { - return true; - } - - protected boolean isScopeAllowed() { - return false; - } - - protected boolean isTypeAllowed() { - return false; - } - - protected boolean isChildAllowed() { - return false; - } - - public Set validInput() { - return inputSet; - } - - public TYPE output() { - return TYPE.TOPIC; - } - - public Collection evaluate(LocalContext context, Object input) { - TopicIF topic = (TopicIF) input; - - // level is required for this element - Level l = getLevel(); - - // use a set as collection for the types, as one type can occur multiple - // times (and should only be counted once). - Collection types = new CompactHashSet(); - - int start = l.getStart()*2; - int end = (l.getEnd() == Integer.MAX_VALUE) ? l.getEnd() : l.getEnd()*2; - - Iterator it = subtypesWalker.walkPaths(topic).iterator(); - while (it.hasNext()) { - List path = (List) it.next(); - for (int idx = start; idx < path.size() && idx <= end; idx += 2) - types.add((TopicIF) path.get(idx)); - } - - return types; - } -} diff --git a/sandbox/toma/src/main/java/net/ontopia/topicmaps/query/toma/impl/basic/path/SubjectIDPath.java b/sandbox/toma/src/main/java/net/ontopia/topicmaps/query/toma/impl/basic/path/SubjectIDPath.java deleted file mode 100644 index 5bac5eaf0..000000000 --- a/sandbox/toma/src/main/java/net/ontopia/topicmaps/query/toma/impl/basic/path/SubjectIDPath.java +++ /dev/null @@ -1,82 +0,0 @@ -/** - * Copyright (C) 2009 Space Applications Services - * - * - * This file is part of the Ontopia project. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -package net.ontopia.topicmaps.query.toma.impl.basic.path; - -import java.util.Collection; -import java.util.Set; - -import net.ontopia.infoset.core.LocatorIF; -import net.ontopia.topicmaps.core.TopicIF; -import net.ontopia.topicmaps.query.toma.impl.basic.LocalContext; -import net.ontopia.utils.CompactHashSet; - -/** - * INTERNAL: Subject Identifier path element in an path expression. Returns all - * subject identifiers for a given input topic. - *

    - * Allowed Input: - *

      - *
    • TOPIC - *
    - *

    - * Output: LOCATOR - *

    - */ -@SuppressWarnings("unchecked") -public class SubjectIDPath extends AbstractBasicPathElement { - static final Set inputSet; - - static { - inputSet = new CompactHashSet(); - inputSet.add(TYPE.TOPIC); - } - - public SubjectIDPath() { - super("SI"); - } - - protected boolean isLevelAllowed() { - return false; - } - - protected boolean isScopeAllowed() { - return false; - } - - protected boolean isTypeAllowed() { - return false; - } - - protected boolean isChildAllowed() { - return false; - } - - public Set validInput() { - return inputSet; - } - - public TYPE output() { - return TYPE.LOCATOR; - } - - public Collection evaluate(LocalContext context, Object input) { - TopicIF topic = (TopicIF) input; - return topic.getSubjectIdentifiers(); - } -} diff --git a/sandbox/toma/src/main/java/net/ontopia/topicmaps/query/toma/impl/basic/path/SubjectLocatorPath.java b/sandbox/toma/src/main/java/net/ontopia/topicmaps/query/toma/impl/basic/path/SubjectLocatorPath.java deleted file mode 100644 index 692bbe7ed..000000000 --- a/sandbox/toma/src/main/java/net/ontopia/topicmaps/query/toma/impl/basic/path/SubjectLocatorPath.java +++ /dev/null @@ -1,82 +0,0 @@ -/** - * Copyright (C) 2009 Space Applications Services - * - * - * This file is part of the Ontopia project. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -package net.ontopia.topicmaps.query.toma.impl.basic.path; - -import java.util.Collection; -import java.util.Set; - -import net.ontopia.infoset.core.LocatorIF; -import net.ontopia.topicmaps.core.TopicIF; -import net.ontopia.topicmaps.query.toma.impl.basic.LocalContext; -import net.ontopia.utils.CompactHashSet; - -/** - * INTERNAL: Subject Locator path element in an path expression. Returns all - * subject locators for a given input topic. - *

    - * Allowed Input: - *

      - *
    • TOPIC - *
    - *

    - * Output: LOCATOR - *

    - */ -@SuppressWarnings("unchecked") -public class SubjectLocatorPath extends AbstractBasicPathElement { - static final Set inputSet; - - static { - inputSet = new CompactHashSet(); - inputSet.add(TYPE.TOPIC); - } - - public SubjectLocatorPath() { - super("SL"); - } - - protected boolean isLevelAllowed() { - return false; - } - - protected boolean isScopeAllowed() { - return false; - } - - protected boolean isTypeAllowed() { - return false; - } - - protected boolean isChildAllowed() { - return false; - } - - public Set validInput() { - return inputSet; - } - - public TYPE output() { - return TYPE.LOCATOR; - } - - public Collection evaluate(LocalContext context, Object input) { - TopicIF topic = (TopicIF) input; - return topic.getSubjectLocators(); - } -} diff --git a/sandbox/toma/src/main/java/net/ontopia/topicmaps/query/toma/impl/basic/path/SuperTypePath.java b/sandbox/toma/src/main/java/net/ontopia/topicmaps/query/toma/impl/basic/path/SuperTypePath.java deleted file mode 100644 index e9f6dd706..000000000 --- a/sandbox/toma/src/main/java/net/ontopia/topicmaps/query/toma/impl/basic/path/SuperTypePath.java +++ /dev/null @@ -1,114 +0,0 @@ -/** - * Copyright (C) 2009 Space Applications Services - * - * - * This file is part of the Ontopia project. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -package net.ontopia.topicmaps.query.toma.impl.basic.path; - -import java.util.Collection; -import java.util.Iterator; -import java.util.List; -import java.util.Set; - -import net.ontopia.topicmaps.core.TopicIF; -import net.ontopia.topicmaps.query.toma.impl.basic.LocalContext; -import net.ontopia.topicmaps.query.toma.parser.ast.Level; -import net.ontopia.topicmaps.utils.AssociationWalker; -import net.ontopia.topicmaps.utils.PSI; -import net.ontopia.topicmaps.utils.SubjectIdentityDecider; -import net.ontopia.utils.CompactHashSet; -import net.ontopia.utils.DeciderIF; - -/** - * INTERNAL: Supertype path element in an path expression. Returns all supertypes - * of a given type from the topic map. - *

    - * Allowed Input: - *

      - *
    • TOPIC - *
    - *

    - * Output: TOPIC - *

    - */ -@SuppressWarnings("unchecked") -public class SuperTypePath extends AbstractBasicPathElement { - static final Set inputSet; - - static { - inputSet = new CompactHashSet(); - inputSet.add(TYPE.TOPIC); - } - - private AssociationWalker supertypesWalker; - - public SuperTypePath() { - super("SUPER"); - - DeciderIF assocDecider = new SubjectIdentityDecider(PSI.getXTMSuperclassSubclass()); - DeciderIF subclassDecider = new SubjectIdentityDecider(PSI.getXTMSubclass()); - DeciderIF superclassDecider = new SubjectIdentityDecider(PSI.getXTMSuperclass()); - - supertypesWalker = new AssociationWalker(assocDecider, subclassDecider, superclassDecider); - } - - protected boolean isLevelAllowed() { - return true; - } - - protected boolean isScopeAllowed() { - return false; - } - - protected boolean isTypeAllowed() { - return false; - } - - protected boolean isChildAllowed() { - return false; - } - - public Set validInput() { - return inputSet; - } - - public TYPE output() { - return TYPE.TOPIC; - } - - public Collection evaluate(LocalContext context, Object input) { - TopicIF topic = (TopicIF) input; - - // level is required for this element - Level l = getLevel(); - - // use a set as collection for the types, as one type can occur multiple - // times (and should only be counted once). - Collection types = new CompactHashSet(); - - int start = l.getStart()*2; - int end = (l.getEnd() == Integer.MAX_VALUE) ? l.getEnd() : l.getEnd()*2; - - Iterator it = supertypesWalker.walkPaths(topic).iterator(); - while (it.hasNext()) { - List path = (List) it.next(); - for (int idx = start; idx < path.size() && idx <= end; idx += 2) - types.add((TopicIF) path.get(idx)); - } - - return types; - } -} diff --git a/sandbox/toma/src/main/java/net/ontopia/topicmaps/query/toma/impl/basic/path/TopicPath.java b/sandbox/toma/src/main/java/net/ontopia/topicmaps/query/toma/impl/basic/path/TopicPath.java deleted file mode 100644 index 072660fd7..000000000 --- a/sandbox/toma/src/main/java/net/ontopia/topicmaps/query/toma/impl/basic/path/TopicPath.java +++ /dev/null @@ -1,178 +0,0 @@ -/** - * Copyright (C) 2009 Space Applications Services - * - * - * This file is part of the Ontopia project. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -package net.ontopia.topicmaps.query.toma.impl.basic.path; - -import java.util.ArrayList; -import java.util.Collection; -import java.util.List; -import java.util.Set; - -import net.ontopia.infoset.core.LocatorIF; -import net.ontopia.infoset.impl.basic.URILocator; -import net.ontopia.topicmaps.core.TMObjectIF; -import net.ontopia.topicmaps.core.TopicIF; -import net.ontopia.topicmaps.core.TopicMapIF; -import net.ontopia.topicmaps.core.TopicNameIF; -import net.ontopia.topicmaps.core.VariantNameIF; -import net.ontopia.topicmaps.core.index.NameIndexIF; -import net.ontopia.topicmaps.query.toma.impl.basic.BasicPathElementIF; -import net.ontopia.topicmaps.query.toma.impl.basic.LocalContext; -import net.ontopia.topicmaps.query.toma.parser.ast.AbstractTopic; -import net.ontopia.topicmaps.query.toma.parser.ast.PathElementIF; -import net.ontopia.utils.CompactHashSet; - -/** - * INTERNAL: Represents a topic literal. - */ -@SuppressWarnings("unchecked") -public class TopicPath extends AbstractTopic implements BasicPathElementIF { - static final Set inputSet; - - static { - inputSet = new CompactHashSet(); - inputSet.add(TYPE.NONE); - } - - private static final String[] columns = new String[] { "TOPIC" }; - - public TopicPath(AbstractTopic.IDTYPE type, String id) { - super(type, id); - } - - public void initResultSet(LocalContext context) {} - - public String[] getColumnNames() { - return columns; - } - - public int getResultSize() { - return 1; - } - - @Override - protected boolean isChildAllowed() { - return false; - } - - @Override - protected boolean isLevelAllowed() { - return false; - } - - @Override - protected boolean isScopeAllowed() { - return false; - } - - @Override - protected boolean isTypeAllowed() { - return false; - } - - public TYPE output() { - return PathElementIF.TYPE.TOPIC; - } - - public Set validInput() { - return inputSet; - } - - /** - * Evaluate a topic literal and return the real topics that are identified by - * the literal. - * - * @return a Collection of {@link TopicIF} objects. - */ - public Collection evaluate(LocalContext context, Object input) { - TopicMapIF topicmap = context.getTopicMap(); - - List result = new ArrayList(); - - switch (getIDType()) { - - case IID: - getTopicsByIID(topicmap, result); - break; - - case SI: - getTopicsBySI(topicmap, result); - break; - - case SL: - getTopicsBySL(topicmap, result); - break; - - case NAME: - getTopicsByName(topicmap, result); - break; - - case VAR: - getTopicsByVar(topicmap, result); - break; - } - - // should not be reached anyways - return result; - } - - private void getTopicsByIID(TopicMapIF topicmap, List coll) { - LocatorIF locator = topicmap.getStore().getBaseAddress().resolveAbsolute( - "#" + getIdentifier()); - TMObjectIF obj = topicmap.getObjectByItemIdentifier(locator); - if (obj != null && obj instanceof TopicIF) { - coll.add((TopicIF) obj); - } - } - - private void getTopicsBySI(TopicMapIF topicmap, List coll) { - LocatorIF locator = URILocator.create(getIdentifier()); - TopicIF topic = topicmap.getTopicBySubjectIdentifier(locator); - if (topic != null) { - coll.add(topic); - } - } - - private void getTopicsBySL(TopicMapIF topicmap, List coll) { - LocatorIF locator = URILocator.create(getIdentifier()); - TopicIF topic = topicmap.getTopicBySubjectLocator(locator); - if (topic != null) { - coll.add(topic); - } - } - - private void getTopicsByName(TopicMapIF topicmap, List coll) { - NameIndexIF index = (NameIndexIF) topicmap - .getIndex("net.ontopia.topicmaps.core.index.NameIndexIF"); - - Collection names = index.getTopicNames(getIdentifier()); - for (TopicNameIF name : names) { - coll.add(name.getTopic()); - } - } - - private void getTopicsByVar(TopicMapIF topicmap, List coll) { - NameIndexIF index = (NameIndexIF) topicmap - .getIndex("net.ontopia.topicmaps.core.index.NameIndexIF"); - - Collection variants = index.getVariants(getIdentifier()); - for (VariantNameIF name : variants) { - coll.add(name.getTopic()); - } - } -} diff --git a/sandbox/toma/src/main/java/net/ontopia/topicmaps/query/toma/impl/basic/path/TypePath.java b/sandbox/toma/src/main/java/net/ontopia/topicmaps/query/toma/impl/basic/path/TypePath.java deleted file mode 100644 index 029e47591..000000000 --- a/sandbox/toma/src/main/java/net/ontopia/topicmaps/query/toma/impl/basic/path/TypePath.java +++ /dev/null @@ -1,113 +0,0 @@ -/** - * Copyright (C) 2009 Space Applications Services - * - * - * This file is part of the Ontopia project. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -package net.ontopia.topicmaps.query.toma.impl.basic.path; - -import java.util.Collection; -import java.util.Set; - -import net.ontopia.topicmaps.core.TopicIF; -import net.ontopia.topicmaps.query.toma.impl.basic.LocalContext; -import net.ontopia.topicmaps.query.toma.parser.ast.Level; -import net.ontopia.utils.CompactHashSet; - -/** - * INTERNAL: Type path element in an path expression. Returns all types - * of a given input topic. - *

    - * Allowed Input: - *

      - *
    • TOPIC - *
    - *

    - * Output: TOPIC - *

    - */ -@SuppressWarnings("unchecked") -public class TypePath extends AbstractBasicPathElement { - static final Set inputSet; - - static { - inputSet = new CompactHashSet(); - inputSet.add(TYPE.TOPIC); - } - - public TypePath() { - super("TYPE"); - } - - protected boolean isLevelAllowed() { - return true; - } - - protected boolean isScopeAllowed() { - return false; - } - - protected boolean isTypeAllowed() { - return false; - } - - protected boolean isChildAllowed() { - return false; - } - - public Set validInput() { - return inputSet; - } - - public TYPE output() { - return TYPE.TOPIC; - } - - public Collection evaluate(LocalContext context, Object input) { - TopicIF topic = (TopicIF) input; - - // level is required for this element - Level l = getLevel(); - - // use a set as collection for the types, as one type can occur multiple - // times (and should only be counted once). - Collection types = new CompactHashSet(); - - // include the topic itself, if the start level is 0 - if (l.getStart() == 0) { - types.add(topic); - } - - fillTypeList(topic.getTypes(), l, 1, types); - return types; - } - - private void fillTypeList(Collection types, Level l, int depth, - Collection result) { - // we are finished if we reached the end of the range, or the typelist is empty - if (depth > l.getEnd() || types == null) { - return; - } - - // only add the types if we are already within the required range - if (depth >= l.getStart()) { - result.addAll(types); - } - - for (TopicIF type : types) { - fillTypeList(type.getTypes(), l, depth+1, result); - } - } -} diff --git a/sandbox/toma/src/main/java/net/ontopia/topicmaps/query/toma/impl/basic/path/VariablePath.java b/sandbox/toma/src/main/java/net/ontopia/topicmaps/query/toma/impl/basic/path/VariablePath.java deleted file mode 100644 index f891a946c..000000000 --- a/sandbox/toma/src/main/java/net/ontopia/topicmaps/query/toma/impl/basic/path/VariablePath.java +++ /dev/null @@ -1,189 +0,0 @@ -/** - * Copyright (C) 2009 Space Applications Services - * - * - * This file is part of the Ontopia project. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -package net.ontopia.topicmaps.query.toma.impl.basic.path; - -import java.util.ArrayList; -import java.util.Collection; -import java.util.List; -import java.util.Set; - -import net.ontopia.topicmaps.core.TopicIF; -import net.ontopia.topicmaps.core.TopicMapIF; -import net.ontopia.topicmaps.core.TopicNameIF; -import net.ontopia.topicmaps.query.core.InvalidQueryException; -import net.ontopia.topicmaps.query.toma.impl.basic.BasicPathElementIF; -import net.ontopia.topicmaps.query.toma.impl.basic.LocalContext; -import net.ontopia.topicmaps.query.toma.impl.basic.ResultSet; -import net.ontopia.topicmaps.query.toma.impl.basic.Row; -import net.ontopia.topicmaps.query.toma.parser.ast.AbstractVariable; -import net.ontopia.topicmaps.query.toma.parser.ast.VariableDecl; -import net.ontopia.utils.CompactHashSet; - -/** - * INTERNAL: Represents a variable within a TOMA query. - */ -@SuppressWarnings("unchecked") -public class VariablePath extends AbstractVariable implements - BasicPathElementIF { - static final Set inputSet; - - static { - inputSet = new CompactHashSet(); - inputSet.add(TYPE.NONE); - } - - private String[] columns; - private int resultSize; - - public VariablePath(VariableDecl decl) { - super(decl); - } - - public void initResultSet(LocalContext context) { - ResultSet rs = context.getResultSet(toString()); - if (rs == null) { - resultSize = 1; - columns = new String[] { toString() }; - } else { - resultSize = rs.getBoundVariables().size(); - List boundVariables = rs.getBoundVariables(); - boundVariables.remove(toString()); - boundVariables.add(toString()); - columns = boundVariables.toArray(new String[0]); - } - } - - public String[] getColumnNames() { - return columns; - } - - public int getResultSize() { - return resultSize; - } - - @Override - protected boolean isChildAllowed() { - return false; - } - - @Override - protected boolean isLevelAllowed() { - return false; - } - - @Override - protected boolean isScopeAllowed() { - return false; - } - - @Override - protected boolean isTypeAllowed() { - return false; - } - - public TYPE output() { - Set types = getValidTypes(); - if (types.size() != 1) { - return TYPE.UNKNOWN; - } else { - return types.iterator().next(); - } - } - - public Set validInput() { - return inputSet; - } - - public Collection evaluate(LocalContext context, Object input) - throws InvalidQueryException { - // try to get a ResultSet that already bound the variable - ResultSet rs = context.getResultSet(toString()); - - String varName = toString(); - if (rs != null) { - if (getResultSize() > 1) { - List vars = rs.getBoundVariables(); - // move current var to the end of the list - vars.remove(varName); - vars.add(varName); - - int[] indices = new int[vars.size()]; - int idx = 0; - for (String var : vars) { - indices[idx++] = rs.getColumnIndex(var); - } - - Collection result = new ArrayList(rs.getRowCount()); - for (Row r : rs) { - Object[] obj = new Object[indices.length]; - idx = 0; - for (int i : indices) { - obj[idx++] = r.getValue(i); - } - result.add(obj); - } - return result; - } else { - return rs.getValues(varName); - } - } else { - TopicMapIF topicmap = context.getTopicMap(); - - switch (output()) { - case ASSOCIATION: - return topicmap.getAssociations(); - - case TOPIC: - return topicmap.getTopics(); - - case NAME: - { - Collection names = new CompactHashSet(); - for (Object topic : topicmap.getTopics()) { - names.addAll(((TopicIF) topic).getTopicNames()); - } - return names; - } - - case OCCURRENCE: - { - Collection ocs = new CompactHashSet(); - for (Object topic : topicmap.getTopics()) { - ocs.addAll(((TopicIF) topic).getOccurrences()); - } - return ocs; - } - - case VARIANT: - { - Collection vars = new CompactHashSet(); - for (Object topic : topicmap.getTopics()) { - for (Object name : ((TopicIF) topic).getTopicNames()) { - vars.addAll(((TopicNameIF) name).getVariants()); - } - } - return vars; - } - - default: - throw new InvalidQueryException("Variable type '" + output() + "' not yet supported."); - } - } - } -} diff --git a/sandbox/toma/src/main/java/net/ontopia/topicmaps/query/toma/impl/basic/path/VariantPath.java b/sandbox/toma/src/main/java/net/ontopia/topicmaps/query/toma/impl/basic/path/VariantPath.java deleted file mode 100644 index 0f72d95d8..000000000 --- a/sandbox/toma/src/main/java/net/ontopia/topicmaps/query/toma/impl/basic/path/VariantPath.java +++ /dev/null @@ -1,128 +0,0 @@ -/** - * Copyright (C) 2009 Space Applications Services - * - * - * This file is part of the Ontopia project. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -package net.ontopia.topicmaps.query.toma.impl.basic.path; - -import java.util.ArrayList; -import java.util.Collection; -import java.util.Set; - -import net.ontopia.topicmaps.core.TopicIF; -import net.ontopia.topicmaps.core.TopicNameIF; -import net.ontopia.topicmaps.core.VariantNameIF; -import net.ontopia.topicmaps.query.core.InvalidQueryException; -import net.ontopia.topicmaps.query.toma.impl.basic.LocalContext; -import net.ontopia.topicmaps.query.toma.impl.basic.ResultSet; -import net.ontopia.topicmaps.query.toma.impl.basic.expression.PathExpression; -import net.ontopia.utils.CompactHashSet; - -/** - * INTERNAL: Variant path element in an path expression. Returns all variants - * of a given input name. - *

    - * Allowed Input: - *

      - *
    • NAME - *
    - *

    - * Output: VARIANT - *

    - */ -@SuppressWarnings("unchecked") -public class VariantPath extends AbstractBasicPathElement { - static final Set inputSet; - - static { - inputSet = new CompactHashSet(); - inputSet.add(TYPE.NAME); - } - - private Collection validScopes = null; - - public VariantPath() { - super("VAR"); - } - - protected boolean isLevelAllowed() { - return false; - } - - protected boolean isScopeAllowed() { - return true; - } - - protected boolean isTypeAllowed() { - return false; - } - - protected boolean isChildAllowed() { - return false; - } - - public Set validInput() { - return inputSet; - } - - public TYPE output() { - return TYPE.VARIANT; - } - - public Collection evaluate(LocalContext context, Object input) - throws InvalidQueryException { - TopicNameIF name = (TopicNameIF) input; - - if (getScope() != null && !isAssignScope()) { - PathExpression scope = (PathExpression) getScope(); - // Optimization: if the scope expression does not contain a variable, we - // can cache it. - if (scope.getVariableName() != null || validScopes == null) { - ResultSet scopes = scope.evaluate(context); - validScopes = scopes.getValidValues(scopes.getLastIndex()); - } - } - - Collection variants = name.getVariants(); - if (validScopes == null && !isAssignScope()) { - return variants; - } else { - Collection result = new ArrayList(); - for (VariantNameIF var : variants) { - if (validScopes == null || containsAny(var.getScope(), validScopes)) { - fillResultCollection(result, var); - } - } - return result; - } - } - - private void fillResultCollection(Collection result, - VariantNameIF var) { - if (isAssignScope()) { - Collection scopes = var.getScope(); - if (scopes.isEmpty()) { - result.add(new Object[] { null, var }); - } else { - for (TopicIF scope : scopes) { - result.add(new Object[] { scope, var }); - } - } - } else { - result.add(new Object[] { var }); - } - } -} diff --git a/sandbox/toma/src/main/java/net/ontopia/topicmaps/query/toma/impl/utils/QueryOptimizerIF.java b/sandbox/toma/src/main/java/net/ontopia/topicmaps/query/toma/impl/utils/QueryOptimizerIF.java deleted file mode 100644 index d3126fa45..000000000 --- a/sandbox/toma/src/main/java/net/ontopia/topicmaps/query/toma/impl/utils/QueryOptimizerIF.java +++ /dev/null @@ -1,35 +0,0 @@ -/** - * Copyright (C) 2009 Space Applications Services - * - * - * This file is part of the Ontopia project. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -package net.ontopia.topicmaps.query.toma.impl.utils; - -import net.ontopia.topicmaps.query.toma.parser.ast.ExpressionIF; - -/** - * PUBLIC: Interface for a query optimizer of TOMA queries. - */ -public interface QueryOptimizerIF { - /** - * Optimize an expression. - * - * @param expr the expression to be optimized. - * @return an optimized version of the expression, or the expression itself, - * if no optimization was possible/known. - */ - public ExpressionIF optimize(ExpressionIF expr); -} diff --git a/sandbox/toma/src/main/java/net/ontopia/topicmaps/query/toma/impl/utils/QueryTraceListenerIF.java b/sandbox/toma/src/main/java/net/ontopia/topicmaps/query/toma/impl/utils/QueryTraceListenerIF.java deleted file mode 100644 index 6895191a6..000000000 --- a/sandbox/toma/src/main/java/net/ontopia/topicmaps/query/toma/impl/utils/QueryTraceListenerIF.java +++ /dev/null @@ -1,76 +0,0 @@ -/** - * Copyright (C) 2009 Space Applications Services - * - * - * This file is part of the Ontopia project. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -package net.ontopia.topicmaps.query.toma.impl.utils; - -import net.ontopia.topicmaps.query.toma.impl.basic.ResultSet; -import net.ontopia.topicmaps.query.toma.parser.ast.ExpressionIF; - -/** - * PUBLIC: Listener interface for query tracing. - */ -public interface QueryTraceListenerIF { - /** - * Called at the beginning of a query. - */ - public void startQuery(); - - /** - * Called at the end of a query. - */ - public void endQuery(); - - /** - * Called when entering an expression. - */ - public void enter(ExpressionIF expr); - - /** - * Called when leaving an expression. - * @param result the result of the evaluated expression. - */ - public void leave(ResultSet result); - - /** - * Called when starting to sort the query. - */ - public void enterOrderBy(); - - /** - * Called when finished with sorting. - */ - public void leaveOrderBy(); - - /** - * Called when entering a select statement. - * @param result the {@link ResultSet} at the beginning. - */ - public void enterSelect(ResultSet result); - - /** - * Called when leaving a select statement. - * @param result the {@link ResultSet} at the end. - */ - public void leaveSelect(ResultSet result); - - /** - * An arbitrary trace message. - * @param message the message. - */ - public void trace(String message); -} diff --git a/sandbox/toma/src/main/java/net/ontopia/topicmaps/query/toma/impl/utils/QueryTracer.java b/sandbox/toma/src/main/java/net/ontopia/topicmaps/query/toma/impl/utils/QueryTracer.java deleted file mode 100644 index 209c042d8..000000000 --- a/sandbox/toma/src/main/java/net/ontopia/topicmaps/query/toma/impl/utils/QueryTracer.java +++ /dev/null @@ -1,241 +0,0 @@ -/** - * Copyright (C) 2009 Space Applications Services - * - * - * This file is part of the Ontopia project. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -package net.ontopia.topicmaps.query.toma.impl.utils; - -import java.util.List; -import java.util.Stack; - -import net.ontopia.topicmaps.query.toma.impl.basic.ResultSet; -import net.ontopia.topicmaps.query.toma.parser.ast.ExpressionIF; - -import org.slf4j.Logger; -import org.slf4j.LoggerFactory; - -/** - * PUBLIC: Query tracer for TOMA queries. - */ -public class QueryTracer { - // --- initialize logging facility. - static Logger logger = LoggerFactory.getLogger(QueryTracer.class.getName()); - - private static List listeners = new java.util.ArrayList(); - - static { - addListener(new TracePrinter()); - } - - public static void addListener(QueryTraceListenerIF listener) { - listeners.add(listener); - } - - public static void removeListener(QueryTraceListenerIF listener) { - listeners.remove(listener); - } - - // --- Tracer methods - - public static void startQuery() { - for (QueryTraceListenerIF listener : listeners) { - listener.startQuery(); - } - } - - public static void endQuery() { - for (QueryTraceListenerIF listener : listeners) { - listener.endQuery(); - } - } - - public static void enter(ExpressionIF expr) { - for (QueryTraceListenerIF listener : listeners) { - listener.enter(expr); - } - } - - public static void leave(ResultSet result) { - for (QueryTraceListenerIF listener : listeners) { - listener.leave(result); - } - } - - public static void enterOrderBy() { - for (QueryTraceListenerIF listener : listeners) { - listener.enterOrderBy(); - } - } - - public static void leaveOrderBy() { - for (QueryTraceListenerIF listener : listeners) { - listener.leaveOrderBy(); - } - } - - public static void enterSelect(ResultSet result) { - for (QueryTraceListenerIF listener : listeners) { - listener.enterSelect(result); - } - } - - public static void leaveSelect(ResultSet result) { - for (QueryTraceListenerIF listener : listeners) { - listener.leaveSelect(result); - } - } - - // --- QueryTraceListenerIF - - public static class TracePrinter implements QueryTraceListenerIF { - - public static long memoryDeltaThreshold = 1024 * 1024 * 5; - public static float elapsedThreshold = 3.0f; - - private ThreadLocal ti = new ThreadLocal(); - - static class Info { - // has times for predicates we've entered + entire query - private Stack entered = new Stack(); - private long totalMemory; - private long freeMemory; - } - - public boolean isEnabled() { - return logger.isDebugEnabled(); - } - - public void output(String message) { - logger.debug(message); - } - - public void startQuery() { - if (isEnabled()) { - Info info = new Info(); - ti.set(info); - - output(""); - info.entered.push(new Long(System.currentTimeMillis())); - - Runtime rt = Runtime.getRuntime(); - info.totalMemory = rt.totalMemory(); - info.freeMemory = rt.freeMemory(); - } - } - - public void endQuery() { - long memoryDelta = 0l; - float elapsed = 0f; - if (isEnabled()) { - Info info = (Info) ti.get(); - - Runtime rt = Runtime.getRuntime(); - memoryDelta = (info.freeMemory - rt.freeMemory()) - - (rt.totalMemory() - info.totalMemory); - // ! output(getIndent(info) + "MEMORY (" + memoryDelta + ")"); - - elapsed = getElapsed(info); - output(""); - info.entered.pop(); - } - - // log memory consuming query - if (memoryDelta > memoryDeltaThreshold) - logger.warn("Query execution exceeded memory delta threshold " - + memoryDelta + " bytes", new RuntimeException()); - - // log time consuming query - if (elapsed > elapsedThreshold) - logger.warn("Query execution exceeded time elapsed threshold " - + elapsed + " seconds", new RuntimeException()); - } - - public void enter(ExpressionIF expr) { - if (isEnabled()) { - Info info = (Info) ti.get(); - output(getIndent(info) + "ENTER (" + 0 + "): " + expr.toString()); - info.entered.push(new Long(System.currentTimeMillis())); - } - } - - public void leave(ResultSet result) { - if (isEnabled()) { - Info info = (Info) ti.get(); - output(getIndent(info) + "LEAVE (" + getElapsed(info) + ", " - + result.getRowCount() + ")"); - info.entered.pop(); - } - } - - public void enterOrderBy() { - if (isEnabled()) { - Info info = (Info) ti.get(); - output(getIndent(info) + "ENTER order by"); - info.entered.push(new Long(System.currentTimeMillis())); - } - } - - public void leaveOrderBy() { - if (isEnabled()) { - Info info = (Info) ti.get(); - output(getIndent(info) + "LEAVE (" + getElapsed(info) + ")"); - info.entered.pop(); - } - } - - public void enterSelect(ResultSet result) { - if (isEnabled()) { - Info info = (Info) ti.get(); - output(getIndent(info) + "ENTER select (" + 0 + ")"); - info.entered.push(new Long(System.currentTimeMillis())); - } - } - - public void leaveSelect(ResultSet result) { - if (isEnabled()) { - Info info = (Info) ti.get(); - output(getIndent(info) + "LEAVE select (" + getElapsed(info) + ", " + 0 - + ")"); - info.entered.pop(); - } - } - - public void trace(String message) { - if (isEnabled()) { - Info info = (Info) ti.get(); - output(getIndent(info) + message); - } - } - - // internal helpers - - private String getIndent(Info info) { - StringBuffer buf = new StringBuffer(); - for (int ix = 0; ix < info.entered.size(); ix++) - buf.append(" "); - return buf.toString(); - } - - private float getElapsed(Info info) { - try { - Long start = (Long) info.entered.peek(); - return (float) (System.currentTimeMillis() - start.longValue()) / 1000; - } catch (java.util.EmptyStackException e) { - return -1000; - } - } - } -} diff --git a/sandbox/toma/src/main/java/net/ontopia/topicmaps/query/toma/impl/utils/SimpleQueryTracer.java b/sandbox/toma/src/main/java/net/ontopia/topicmaps/query/toma/impl/utils/SimpleQueryTracer.java deleted file mode 100644 index 91c0cc228..000000000 --- a/sandbox/toma/src/main/java/net/ontopia/topicmaps/query/toma/impl/utils/SimpleQueryTracer.java +++ /dev/null @@ -1,51 +0,0 @@ -/** - * Copyright (C) 2009 Space Applications Services - * - * - * This file is part of the Ontopia project. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -package net.ontopia.topicmaps.query.toma.impl.utils; - -import java.io.Writer; -import java.io.IOException; -import net.ontopia.utils.OntopiaRuntimeException; - -/** - * PUBLIC: Simple tracer to output the query trace to a {@link Writer} object. - *

    - * Warning: this method is not thread-safe; any other queries running - * simultaneously will pollute the trace. - *

    - */ -public class SimpleQueryTracer extends QueryTracer.TracePrinter { - private Writer out; - - public SimpleQueryTracer(Writer out) { - this.out = out; - } - - public boolean isEnabled() { - return true; - } - - public void output(String message) { - try { - out.write(message + "\n"); - out.flush(); - } catch (IOException e) { - throw new OntopiaRuntimeException(e); - } - } -} diff --git a/sandbox/toma/src/main/java/net/ontopia/topicmaps/query/toma/impl/utils/Stringifier.java b/sandbox/toma/src/main/java/net/ontopia/topicmaps/query/toma/impl/utils/Stringifier.java deleted file mode 100644 index 098dd6682..000000000 --- a/sandbox/toma/src/main/java/net/ontopia/topicmaps/query/toma/impl/utils/Stringifier.java +++ /dev/null @@ -1,152 +0,0 @@ -/** - * Copyright (C) 2009 Space Applications Services - * - * - * This file is part of the Ontopia project. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -package net.ontopia.topicmaps.query.toma.impl.utils; - -import java.util.Collection; - -import net.ontopia.infoset.core.LocatorIF; -import net.ontopia.topicmaps.core.OccurrenceIF; -import net.ontopia.topicmaps.core.TopicIF; -import net.ontopia.topicmaps.core.TopicNameIF; -import net.ontopia.topicmaps.core.VariantNameIF; - -/** - * INTERNAL: utility class to convert Topic Map constructs into a - * string representation. - */ -public class Stringifier { - - /** - * Returns a string representation of the given object. - * - *
      - *
    • Topic: the address of the first item identifier - *
    • TopicName: the value of the topic name - *
    • VariantName: the value of the variant name - *
    • Locator: the address of the locator - *
    • Occurrence: the value of the occurrence - *
    • any other object: the result of toString() - *
    - * - * @param o the object to be converted. - * @return a string representation of the object - */ - @SuppressWarnings("unchecked") - public static String toString(Object o) { - if (o == null) - return null; - - if (o instanceof TopicIF) { - Collection iids = ((TopicIF) o).getItemIdentifiers(); - if (iids.isEmpty()) { - return ((TopicIF) o).getObjectId(); - } else { - return iids.iterator().next().getAddress(); - } - } else if (o instanceof TopicNameIF) { - return ((TopicNameIF) o).getValue(); - } else if (o instanceof VariantNameIF) { - return ((VariantNameIF) o).getValue(); - } else if (o instanceof LocatorIF) { - return ((LocatorIF) o).getAddress(); - } else if (o instanceof OccurrenceIF) { - return ((OccurrenceIF) o).getValue(); - } else { - return o.toString(); - } - } - - /** - * Returns a string representation of the given object to be used for - * comparison. - * - *
      - *
    • Topic: the object id - *
    • TopicName: the value of the topic name - *
    • VariantName: the value of the variant name - *
    • Locator: the address of the locator - *
    • Occurrence: the value of the occurrence - *
    • any other object: the result of toString() - *
    - * - * @param o the object to be converted. - * @return a string representation of the object - */ - public static String toCompare(Object o) { - if (o == null) - return null; - - if (o instanceof TopicIF) { - return ((TopicIF) o).getObjectId(); - } else if (o instanceof TopicNameIF) { - return ((TopicNameIF) o).getValue(); - } else if (o instanceof VariantNameIF) { - return ((VariantNameIF) o).getValue(); - } else if (o instanceof LocatorIF) { - return ((LocatorIF) o).getAddress(); - } else if (o instanceof OccurrenceIF) { - return ((OccurrenceIF) o).getValue(); - } else { - return o.toString(); - } - } - - /** - * Returns a string representation of the given object to be used for - * comparison. - * - *
      - *
    • Topic: the object id - *
    • TopicName: the value of the topic name - *
    • VariantName: the value of the variant name - *
    • Locator: the address of the locator - *
    • Occurrence: the value of the occurrence - *
    • any other object: the result of toString() - *
    - * - * @param o the object to be converted. - * @return a string representation of the object - */ - @SuppressWarnings("unchecked") - public static Comparable toSort(Object o) { - if (o == null) - return null; - - if (o instanceof TopicIF) { - Collection iids = ((TopicIF) o).getItemIdentifiers(); - if (iids.isEmpty()) { - return ((TopicIF) o).getObjectId(); - } else { - return iids.iterator().next().getAddress(); - } - } else if (o instanceof TopicNameIF) { - return ((TopicNameIF) o).getValue(); - } else if (o instanceof VariantNameIF) { - return ((VariantNameIF) o).getValue(); - } else if (o instanceof LocatorIF) { - return ((LocatorIF) o).getAddress(); - } else if (o instanceof OccurrenceIF) { - return ((OccurrenceIF) o).getValue(); - } else if (o instanceof Integer || o instanceof Double){ - return (Comparable) o; - } else { - return o.toString(); - } - } -} diff --git a/sandbox/toma/src/main/java/net/ontopia/topicmaps/query/toma/impl/utils/TomaQueryProcessorFactory.java b/sandbox/toma/src/main/java/net/ontopia/topicmaps/query/toma/impl/utils/TomaQueryProcessorFactory.java deleted file mode 100644 index 90963cc8d..000000000 --- a/sandbox/toma/src/main/java/net/ontopia/topicmaps/query/toma/impl/utils/TomaQueryProcessorFactory.java +++ /dev/null @@ -1,25 +0,0 @@ -package net.ontopia.topicmaps.query.toma.impl.utils; - -import java.util.Map; - -import net.ontopia.infoset.core.LocatorIF; -import net.ontopia.topicmaps.core.TopicMapIF; -import net.ontopia.topicmaps.query.core.QueryProcessorFactoryIF; -import net.ontopia.topicmaps.query.core.QueryProcessorIF; -import net.ontopia.topicmaps.query.toma.impl.basic.BasicQueryProcessor; - -/** - * PUBLIC: QueryProcessorFactory implementation for the TOMA query language. - */ -public class TomaQueryProcessorFactory implements QueryProcessorFactoryIF { - private static final String NAME = "TOMA"; - - public String getQueryLanguage() { - return NAME; - } - - public QueryProcessorIF createQueryProcessor(TopicMapIF topicmap, - LocatorIF base, Map properties) { - return new BasicQueryProcessor(topicmap); - } -} diff --git a/sandbox/toma/src/main/java/net/ontopia/topicmaps/query/toma/parser/AntlrWrapException.java b/sandbox/toma/src/main/java/net/ontopia/topicmaps/query/toma/parser/AntlrWrapException.java deleted file mode 100644 index ac32e7e19..000000000 --- a/sandbox/toma/src/main/java/net/ontopia/topicmaps/query/toma/parser/AntlrWrapException.java +++ /dev/null @@ -1,39 +0,0 @@ -/** - * Copyright (C) 2009 Space Applications Services - * - * - * This file is part of the Ontopia project. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -package net.ontopia.topicmaps.query.toma.parser; - -import antlr.RecognitionException; - -/** - * INTERNAL: Exception used to wrap other exceptions so that they can - * be thrown from inside ANTLR-generated code. - */ -@SuppressWarnings("serial") -public class AntlrWrapException extends RecognitionException -{ - public Exception exception; - - public AntlrWrapException(Exception exception) { - this.exception = exception; - } - - public Exception getException() { - return exception; - } -} diff --git a/sandbox/toma/src/main/java/net/ontopia/topicmaps/query/toma/parser/ExpressionFactoryIF.java b/sandbox/toma/src/main/java/net/ontopia/topicmaps/query/toma/parser/ExpressionFactoryIF.java deleted file mode 100644 index b64e4d4fa..000000000 --- a/sandbox/toma/src/main/java/net/ontopia/topicmaps/query/toma/parser/ExpressionFactoryIF.java +++ /dev/null @@ -1,53 +0,0 @@ -/** - * Copyright (C) 2009 Space Applications Services - * - * - * This file is part of the Ontopia project. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -package net.ontopia.topicmaps.query.toma.parser; - -import net.ontopia.topicmaps.query.toma.parser.ast.ExpressionIF; -import net.ontopia.topicmaps.query.toma.parser.ast.FunctionIF; - -/** - * INTERNAL: factory to create appropriate AST expression elements to be used - * for execution by the basic or rdbms QueryProcessor. - */ -public interface ExpressionFactoryIF { - /** - * Create a new expression. - * - * @param name the name of the expression. - * @param childs the children of the expression. - * @return the newly created expression. - */ - public ExpressionIF createExpression(String name, ExpressionIF... childs); - - /** - * Create a new literal with the given value. - * - * @param value the value of the literal. - * @return the newly created literal. - */ - public ExpressionIF createLiteral(String value); - - /** - * Create a new function expression, identified by its name. - * - * @param name the name of the function. - * @return the newly created function. - */ - public FunctionIF createFunction(String name); -} diff --git a/sandbox/toma/src/main/java/net/ontopia/topicmaps/query/toma/parser/LocalParseContext.java b/sandbox/toma/src/main/java/net/ontopia/topicmaps/query/toma/parser/LocalParseContext.java deleted file mode 100644 index 4b7fb0056..000000000 --- a/sandbox/toma/src/main/java/net/ontopia/topicmaps/query/toma/parser/LocalParseContext.java +++ /dev/null @@ -1,104 +0,0 @@ -/** - * Copyright (C) 2009 Space Applications Services - * - * - * This file is part of the Ontopia project. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -package net.ontopia.topicmaps.query.toma.parser; - -import net.ontopia.topicmaps.query.core.InvalidQueryException; -import net.ontopia.topicmaps.query.toma.parser.ast.ExpressionIF; -import net.ontopia.topicmaps.query.toma.parser.ast.FunctionIF; -import net.ontopia.topicmaps.query.toma.parser.ast.PathElementIF; -import net.ontopia.topicmaps.query.toma.parser.ast.PathExpressionIF; -import net.ontopia.topicmaps.query.toma.parser.ast.VariableDecl; -import net.ontopia.topicmaps.query.toma.parser.ast.VariableIF; - -/** - * INTERNAL: This class is a convenience wrapper to access - * {@link ExpressionFactoryIF} and {@PathExpressionFactoryIF} instances from - * within the TOMA language parser. - * - * The class just consists of wrapper methods to the appropriate methods in the - * two factories. - */ -public class LocalParseContext { - private PathExpressionFactoryIF pathExpressionFactory; - private ExpressionFactoryIF expressionFactory; - - public LocalParseContext(PathExpressionFactoryIF peFactory, - ExpressionFactoryIF exFactory) { - this.pathExpressionFactory = peFactory; - this.expressionFactory = exFactory; - } - - public PathExpressionIF createPathExpression() throws AntlrWrapException { - PathExpressionIF path = pathExpressionFactory.createPathExpression(); - if (path == null) - throw new AntlrWrapException(new InvalidQueryException( - "unable to create path expression")); - return path; - } - - public PathElementIF createElement(String name) throws AntlrWrapException { - PathElementIF element = pathExpressionFactory.createElement(name); - if (element == null) - throw new AntlrWrapException(new InvalidQueryException( - "unable to create path element '" + name + "'")); - return element; - } - - public PathElementIF createTopic(String type, String id) - throws AntlrWrapException { - PathElementIF topic = pathExpressionFactory.createTopic(type, id); - if (topic == null) - throw new AntlrWrapException(new InvalidQueryException( - "unable to create topic literal with id '" + id + "'")); - return topic; - } - - public VariableIF createVariable(VariableDecl decl) throws AntlrWrapException { - VariableIF var = pathExpressionFactory.createVariable(decl); - if (var == null) - throw new AntlrWrapException(new InvalidQueryException( - "unable to create variable '" + decl.getVariableName() + "'")); - return var; - } - - public ExpressionIF createExpression(String type, ExpressionIF... childs) - throws AntlrWrapException { - ExpressionIF expr = expressionFactory.createExpression(type, childs); - if (expr == null) - throw new AntlrWrapException(new InvalidQueryException( - "unable to create expression '" + type + "'")); - return expr; - } - - public ExpressionIF createLiteral(String value) throws AntlrWrapException { - ExpressionIF expr = expressionFactory.createLiteral(value); - if (expr == null) - throw new AntlrWrapException(new InvalidQueryException( - "unable to create literal with value '" + value + "'")); - return expr; - } - - public FunctionIF createFunction(String name) throws AntlrWrapException { - FunctionIF function = expressionFactory.createFunction(name); - if (function == null) - throw new AntlrWrapException(new InvalidQueryException( - "unable to create function '" + name + "'")); - return function; - } -} diff --git a/sandbox/toma/src/main/java/net/ontopia/topicmaps/query/toma/parser/PathExpressionFactoryIF.java b/sandbox/toma/src/main/java/net/ontopia/topicmaps/query/toma/parser/PathExpressionFactoryIF.java deleted file mode 100644 index 7507ef7c9..000000000 --- a/sandbox/toma/src/main/java/net/ontopia/topicmaps/query/toma/parser/PathExpressionFactoryIF.java +++ /dev/null @@ -1,62 +0,0 @@ -/** - * Copyright (C) 2009 Space Applications Services - * - * - * This file is part of the Ontopia project. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -package net.ontopia.topicmaps.query.toma.parser; - -import net.ontopia.topicmaps.query.toma.parser.ast.PathElementIF; -import net.ontopia.topicmaps.query.toma.parser.ast.PathExpressionIF; -import net.ontopia.topicmaps.query.toma.parser.ast.VariableDecl; -import net.ontopia.topicmaps.query.toma.parser.ast.VariableIF; - -/** - * INTERNAL: factory to create appropriate AST path expression elements to be - * used for execution by the basic or rdbms QueryProcessor. - */ -public interface PathExpressionFactoryIF { - /** - * INTERNAL: Create a new, empty path expression. - * - * @return a newly created path expression - */ - public PathExpressionIF createPathExpression(); - - /** - * INTERNAL: Create a new Variable. - * - * @param decl the declaration for the variable. - * @return a new variable. - */ - public VariableIF createVariable(VariableDecl decl); - - /** - * INTERNAL: Create a new Topic literal. - * - * @param type the type how a topic literal is specified. - * @param id the identifier for this topic. - * @return a new topic literal. - */ - public PathElementIF createTopic(String type, String id); - - /** - * INTERNAL: Create a new path expression element based on the given name. - * - * @param name the type of path element to be created. - * @return a new path expression element. - */ - public PathElementIF createElement(String name); -} diff --git a/sandbox/toma/src/main/java/net/ontopia/topicmaps/query/toma/parser/TomaParser.java b/sandbox/toma/src/main/java/net/ontopia/topicmaps/query/toma/parser/TomaParser.java deleted file mode 100644 index e56866eca..000000000 --- a/sandbox/toma/src/main/java/net/ontopia/topicmaps/query/toma/parser/TomaParser.java +++ /dev/null @@ -1,91 +0,0 @@ -/** - * Copyright (C) 2009 Space Applications Services - * - * - * This file is part of the Ontopia project. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -package net.ontopia.topicmaps.query.toma.parser; - -import java.io.Reader; -import java.io.StringReader; - -import net.ontopia.topicmaps.query.core.InvalidQueryException; -import net.ontopia.topicmaps.query.toma.parser.ast.TomaQuery; -import antlr.RecognitionException; -import antlr.TokenStreamException; -import antlr.TokenStreamIOException; -import antlr.TokenStreamRecognitionException; - -/** - * INTERNAL: The TOMA query language parser. This is a convenient class and acts - * as a wrapper to the auto-generated parser and lexer classes from the antlr - * grammar. - */ -public class TomaParser { - /** - * INTERNAL: Parses a TOMA query. Depending on the parse context, a different - * AST will be created. - * - * @param query the TOMA query to be parsed. - * @param context the parse context to be used. - * @return the parsed query. - * @throws InvalidQueryException if the query is syntactically wrong. - */ - public static TomaQuery parse(String query, LocalParseContext context) - throws InvalidQueryException { - return parse(new StringReader(query), context); - } - - private static TomaQuery parse(Reader queryReader, LocalParseContext context) - throws InvalidQueryException { - try { - RealTomaParser parser = makeParser(queryReader, context); - return parser.query(); - } catch (AntlrWrapException ex) { - Exception e = ex.getException(); - if (e instanceof InvalidQueryException) - throw (InvalidQueryException) e; - else - throw new InvalidQueryException(e); - } catch (RecognitionException ex) { - throw new InvalidQueryException("Lexical error at " - /* + getBaseAddress().getAddress() + ":" */+ ex.line + ":" + ex.column - + ": " + ex.getMessage()); - } catch (TokenStreamRecognitionException e) { - RecognitionException ex = e.recog; - throw new InvalidQueryException("Lexical error at " - /* + getBaseAddress().getAddress() + ":" */+ ex.line + ":" + ex.column - + ": " + ex.getMessage()); - } catch (TokenStreamIOException ex) { - throw new InvalidQueryException(ex.io.toString()); - } catch (TokenStreamException ex) { - throw new InvalidQueryException("Lexical error: " + ex.getMessage()); - } - } - - // --- Internal methods - - /** - * INTERNAL: create a new TOMA parser that internally contains the - * auto-generated lexer and parser from the antlr grammar. - */ - private static RealTomaParser makeParser(Reader reader, - LocalParseContext context) throws InvalidQueryException { - TomaLexer lexer = new TomaLexer(reader); - RealTomaParser parser = new RealTomaParser(lexer); - parser.init(context); - return parser; - } -} diff --git a/sandbox/toma/src/main/java/net/ontopia/topicmaps/query/toma/parser/ast/ASTElementIF.java b/sandbox/toma/src/main/java/net/ontopia/topicmaps/query/toma/parser/ast/ASTElementIF.java deleted file mode 100644 index cf9f19f2d..000000000 --- a/sandbox/toma/src/main/java/net/ontopia/topicmaps/query/toma/parser/ast/ASTElementIF.java +++ /dev/null @@ -1,44 +0,0 @@ -/** - * Copyright (C) 2009 Space Applications Services - * - * - * This file is part of the Ontopia project. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -package net.ontopia.topicmaps.query.toma.parser.ast; - -import net.ontopia.topicmaps.query.toma.parser.AntlrWrapException; -import net.ontopia.topicmaps.query.toma.util.IndentedStringBuilder; - -/** - * INTERNAL: Common base interface for all elements of the AST. This contains - * just a common method for printing the AST on screen. - */ -public interface ASTElementIF { - - /** - * Validates if this element is syntactically correct. - * @return true if validation was successful. - * @throws AntlrWrapException if an syntax error was found. - */ - public boolean validate() throws AntlrWrapException; - - /** - * Fills the parse tree with a string representation of this AST element. - * - * @param buf the buffer to use. - * @param level the current level of within the parse tree. - */ - public void fillParseTree(IndentedStringBuilder buf, int level); -} diff --git a/sandbox/toma/src/main/java/net/ontopia/topicmaps/query/toma/parser/ast/AbstractExpression.java b/sandbox/toma/src/main/java/net/ontopia/topicmaps/query/toma/parser/ast/AbstractExpression.java deleted file mode 100644 index 2828f5052..000000000 --- a/sandbox/toma/src/main/java/net/ontopia/topicmaps/query/toma/parser/ast/AbstractExpression.java +++ /dev/null @@ -1,158 +0,0 @@ -/** - * Copyright (C) 2009 Space Applications Services - * - * - * This file is part of the Ontopia project. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -package net.ontopia.topicmaps.query.toma.parser.ast; - -import java.util.ArrayList; -import java.util.Collections; -import java.util.List; - -import net.ontopia.topicmaps.query.core.InvalidQueryException; -import net.ontopia.topicmaps.query.toma.impl.utils.QueryOptimizerIF; -import net.ontopia.topicmaps.query.toma.parser.AntlrWrapException; -import net.ontopia.topicmaps.query.toma.util.IndentedStringBuilder; - -/** - * INTERNAL: Abstract base class for all expressions in the TOMA AST. - */ -public abstract class AbstractExpression implements ExpressionIF { - protected String name; - protected ArrayList childs; - protected int requiredChilds; - - /** - * Create a new expression with the given name. - * @param name the name of the expression - * @param reqChilds the number of required child expressions - */ - protected AbstractExpression(String name, int reqChilds) { - this.name = name; - childs = new ArrayList(); - this.requiredChilds = reqChilds; - } - - /** - * Get the name of the expression. - * @return the name. - */ - public String getName() { - return name; - } - - /** - * Replace the child at index. - * - * @param index the index of the child to be replaced. - * @param expr the expression to be used. - */ - public void setChild(int index, ExpressionIF expr) { - childs.set(index, expr); - } - - /** - * Add an expression as a child to this expression. - * @param expr the expression to be added as a child. - * @throws AntlrWrapException if this operation is not allowed. - */ - public void addChild(ExpressionIF expr) throws AntlrWrapException { - childs.add(expr); - } - - /** - * Get the number of children. - * @return the number of children. - */ - public int getChildCount() { - return childs.size(); - } - - /** - * Get the child expression at the given index. - * @param idx the given index. - * @return the nth child expression or null if outside the range. - */ - public ExpressionIF getChild(int idx) { - try { - return childs.get(idx); - } catch (IndexOutOfBoundsException e) { - return null; - } - } - - /** - * Get a list containing all children. - * @return a list with all children. - */ - public List getChilds() { - return Collections.unmodifiableList(childs); - } - - public boolean validate() throws AntlrWrapException { - if (requiredChilds > 0 && getChildCount() != requiredChilds) { - throw new AntlrWrapException(new InvalidQueryException("expression '" - + getName() + "' has " + getChildCount() + " instead of " - + requiredChilds + " child(s).")); - } - - // validate all children - for (ExpressionIF child : childs) { - child.validate(); - } - - return true; - } - - public ExpressionIF optimize(QueryOptimizerIF optimizer) { - for (int i=0; i - * - * This file is part of the Ontopia project. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -package net.ontopia.topicmaps.query.toma.parser.ast; - -import java.util.ArrayList; - -import net.ontopia.topicmaps.query.core.InvalidQueryException; -import net.ontopia.topicmaps.query.toma.parser.AntlrWrapException; -import net.ontopia.topicmaps.query.toma.util.IndentedStringBuilder; - -/** - * INTERNAL: Abstract base class for functions in the TOMA AST. - */ -public abstract class AbstractFunction extends AbstractExpression implements FunctionIF { - - protected ArrayList parameters; - private int maxParameters; - private boolean isAggregate; - - /** - * Create a new function with the given name and a maximum number of - * allowed parameters. - * - * @param name the name of the function. - * @param maxParameters the maximum allowed number of parameters. - * @param aggregate if the function is an aggregate function or not. - */ - public AbstractFunction(String name, int maxParameters, boolean aggregate) { - super(name, 1); - - parameters = new ArrayList(); - this.maxParameters = maxParameters; - this.isAggregate = aggregate; - } - - /** - * Add a parameter for this function. - * @param param the parameter to be added. - */ - public void addParam(String param) throws AntlrWrapException { - if (parameters.size() == maxParameters) { - throw new AntlrWrapException(new InvalidQueryException("Function '" - + getName() + "' has wrong number of parameters")); - } else { - parameters.add(param); - } - } - - public boolean isAggregateFunction() { - return isAggregate; - } - - @Override - public void fillParseTree(IndentedStringBuilder buf, int level) { - StringBuffer sb = new StringBuffer(); - - sb.append(String.format("(%1$10s)", getName())); - - if (parameters.size() > 0) { - sb.append(" ["); - for (String param : parameters) { - sb.append(param); - sb.append(","); - } - sb.append("]"); - } - - buf.append(sb.toString(), level); - - // a function exactly has one child. - if (childs.size() == 1) { - childs.get(0).fillParseTree(buf, level + 1); - } - } - - public String toString() { - StringBuffer sb = new StringBuffer(); - - sb.append(getName()); - sb.append("("); - - for (ExpressionIF child : childs) { - sb.append(child.toString()); - } - - for (String param : parameters) { - sb.append(","); - sb.append("'"); - sb.append(param); - sb.append("'"); - } - - sb.append(")"); - - return sb.toString(); - } -} diff --git a/sandbox/toma/src/main/java/net/ontopia/topicmaps/query/toma/parser/ast/AbstractLiteral.java b/sandbox/toma/src/main/java/net/ontopia/topicmaps/query/toma/parser/ast/AbstractLiteral.java deleted file mode 100644 index 7fc52a986..000000000 --- a/sandbox/toma/src/main/java/net/ontopia/topicmaps/query/toma/parser/ast/AbstractLiteral.java +++ /dev/null @@ -1,59 +0,0 @@ -/** - * Copyright (C) 2009 Space Applications Services - * - * - * This file is part of the Ontopia project. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -package net.ontopia.topicmaps.query.toma.parser.ast; - -import net.ontopia.topicmaps.query.core.InvalidQueryException; -import net.ontopia.topicmaps.query.toma.parser.AntlrWrapException; -import net.ontopia.topicmaps.query.toma.util.IndentedStringBuilder; - -/** - * INTERNAL: Abstract base class for literals in the AST. - */ -public abstract class AbstractLiteral extends AbstractExpression implements - ExpressionIF { - private String value; - - public AbstractLiteral(String value) { - super("LITERAL", 0); - this.value = value; - } - - public String getValue() { - return value; - } - - public void setValue(String value) { - this.value = value; - } - - @Override - public void addChild(ExpressionIF child) throws AntlrWrapException { - throw new AntlrWrapException(new InvalidQueryException( - "Literals can not have children")); - } - - @Override - public void fillParseTree(IndentedStringBuilder buf, int level) { - buf.append("( LITERAL) [" + getValue() + "]", level); - } - - public String toString() { - return "'" + value + "'"; - } -} diff --git a/sandbox/toma/src/main/java/net/ontopia/topicmaps/query/toma/parser/ast/AbstractPathElement.java b/sandbox/toma/src/main/java/net/ontopia/topicmaps/query/toma/parser/ast/AbstractPathElement.java deleted file mode 100644 index 5274ac8fc..000000000 --- a/sandbox/toma/src/main/java/net/ontopia/topicmaps/query/toma/parser/ast/AbstractPathElement.java +++ /dev/null @@ -1,248 +0,0 @@ -/** - * Copyright (C) 2009 Space Applications Services - * - * - * This file is part of the Ontopia project. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -package net.ontopia.topicmaps.query.toma.parser.ast; - -import java.util.ArrayList; - -import net.ontopia.topicmaps.query.core.InvalidQueryException; -import net.ontopia.topicmaps.query.toma.parser.AntlrWrapException; -import net.ontopia.topicmaps.query.toma.util.IndentedStringBuilder; - -/** - * INTERNAL: Abstract base class for path elements in the AST. - */ -public abstract class AbstractPathElement implements PathElementIF { - private String name; - private PathExpressionIF scope; - private PathExpressionIF type; - private Level level; - private VariableIF boundInputVariable; - private VariableIF boundVariable; - private ArrayList childs; - - /** - * Create a new path element with the given name. - * @param name the name of the path element. - */ - public AbstractPathElement(String name) { - this.name = name; - this.scope = null; - this.level = null; - this.boundInputVariable = null; - this.boundVariable = null; - this.childs = null; - } - - /** - * Get the name of this path element. - * - * @return the name of the path element - */ - public String getName() { - return this.name; - } - - public void setType(PathExpressionIF expr) throws AntlrWrapException { - if (isTypeAllowed()) { - this.type = expr; - } else { - throw new AntlrWrapException(new InvalidQueryException( - "Type not valid at this path element")); - } - } - - public PathExpressionIF getType() { - return type; - } - - public void setLevel(Level level) throws AntlrWrapException { - if (isLevelAllowed()) { - this.level = level; - } else { - throw new AntlrWrapException(new InvalidQueryException( - "Level not valid at this path element")); - } - } - - public Level getLevel() { - return level; - } - - public void setScope(PathExpressionIF expr) throws AntlrWrapException { - if (isScopeAllowed()) { - this.scope = expr; - } else { - throw new AntlrWrapException(new InvalidQueryException( - "Scope not valid at this path element")); - } - } - - public PathExpressionIF getScope() { - return scope; - } - - public void bindInputVariable(VariableIF var) throws AntlrWrapException { - this.boundInputVariable = var; - } - - public VariableIF getBoundInputVariable() { - return boundInputVariable; - } - - public void bindVariable(VariableIF var) throws AntlrWrapException { - this.boundVariable = var; - } - - public VariableIF getBoundVariable() { - return boundVariable; - } - - public void addChild(PathExpressionIF child) throws AntlrWrapException { - if (isChildAllowed()) { - if (childs == null) { - childs = new ArrayList(); - } - - childs.add(child); - } else { - throw new AntlrWrapException(new InvalidQueryException( - "Scope not valid at this path element")); - } - } - - public int getChildCount() { - if (isChildAllowed()) { - if (childs != null) { - return childs.size(); - } else { - return 0; - } - } else { - return 0; - } - } - - public PathExpressionIF getChild(int idx) { - if (isChildAllowed()) { - if (childs != null) { - return childs.get(idx); - } else { - return null; - } - } else { - return null; - } - } - - /** - * Indicates if a level setting is allowed for this element. - * @return true if allowed, false otherwise. - */ - protected abstract boolean isLevelAllowed(); - - /** - * Indicates if a scope expression is allowed for this element. - * @return true if allowed, false otherwise. - */ - protected abstract boolean isScopeAllowed(); - - /** - * Indicates if a type expression is allowed for this element. - * @return true if allowed, false otherwise. - */ - protected abstract boolean isTypeAllowed(); - - /** - * Indicates if a child is allowed for this element. - * @return true if allowed, false otherwise. - */ - protected abstract boolean isChildAllowed(); - - public boolean validate() throws AntlrWrapException { - // Check if no level has been set for type/instance/sub/super - // elements. If this is the case, set it to the default: Level(1, 1) - if (isLevelAllowed() && getLevel() == null) { - setLevel(new Level(1)); - } - - VariableIF var = getBoundVariable(); - if (var != null) { - try { - ((AbstractVariable) var).constrainTypes(output()); - } catch (InvalidQueryException e) { - throw new AntlrWrapException(e); - } - } - - // special case for Association Paths - var = getBoundInputVariable(); - if (var != null) { - try { - ((AbstractVariable) var).constrainTypes(TYPE.ASSOCIATION); - } catch (InvalidQueryException e) { - throw new AntlrWrapException(e); - } - } - - return true; - } - - public void fillParseTree(IndentedStringBuilder buf, int depth) { - StringBuilder sb = new StringBuilder(); - sb.append(String.format("(%1$10s)", getName())); - - if (type != null) { - sb.append(String.format(" [%1$s]", type.toString())); - } - - if (scope != null) { - sb.append(String.format(" @%1$s", scope.toString())); - } - - if (this.level != null) { - sb.append(String.format(" (%1$s)", level.toString())); - } - - buf.append(sb.toString(), depth); - - for (int i=0; i - * - * This file is part of the Ontopia project. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -package net.ontopia.topicmaps.query.toma.parser.ast; - -import java.util.ArrayList; -import java.util.List; -import java.util.Set; - -import net.ontopia.topicmaps.query.core.InvalidQueryException; -import net.ontopia.topicmaps.query.toma.parser.AntlrWrapException; -import net.ontopia.topicmaps.query.toma.parser.ast.PathElementIF.TYPE; -import net.ontopia.topicmaps.query.toma.util.IndentedStringBuilder; - -/** - * INTERNAL: Abstract base class for path expressions in the AST. - */ -public abstract class AbstractPathExpression extends AbstractExpression - implements PathExpressionIF { - - private ArrayList path; - - public AbstractPathExpression() { - super("PATHEXPR", 0); - this.path = new ArrayList(); - } - - public List getBoundVariables() { - List vars = new ArrayList(); - return vars; - } - - public void addPath(PathElementIF next) throws AntlrWrapException { - path.add(next); - } - - public boolean isEmpty() { - return path.isEmpty(); - } - - public boolean isVariable() { - if (getPathLength() == 1) { - PathElementIF element = path.get(0); - if (element instanceof VariableIF) { - return true; - } - } - return false; - } - - public String getVariableName() { - if (getPathLength() > 0) { - PathElementIF element = path.get(0); - if (element instanceof VariableIF) { - return ((VariableIF) element).toString(); - } - } - return null; - } - - public VariableDecl getVariableDeclaration() { - if (getPathLength() > 0) { - PathElementIF element = path.get(0); - if (element instanceof VariableIF) { - return ((VariableIF) element).getDeclaration(); - } - } - return null; - } - - public int getPathLength() { - return path.size(); - } - - public PathElementIF getPathElement(int idx) { - return path.get(idx); - } - - @Override - public void addChild(ExpressionIF child) throws AntlrWrapException { - throw new AntlrWrapException(new InvalidQueryException( - "PathExpressions can not have children")); - } - - public TYPE output() { - if (!isEmpty()) { - PathElementIF lastElement = path.get(path.size() - 1); - return lastElement.output(); - } else { - return PathElementIF.TYPE.NONE; - } - } - - @Override - public boolean validate() throws AntlrWrapException { - super.validate(); - - PathElementIF.TYPE output = PathElementIF.TYPE.NONE; - PathElementIF last = null; - for (PathElementIF element : path) { - // validate the element itself - element.validate(); - // get the valid input for this element - Set validInput = element.validInput(); - - // if the first element was a VariablePath, constrain the types - if (last instanceof AbstractVariable) { - AbstractVariable var = (AbstractVariable) last; - try { - var.constrainTypes(validInput); - } catch (InvalidQueryException e) { - throw new AntlrWrapException(e); - } - } else { - // check if the types match - if (validInput != null && !validInput.contains(output)) { - throw new AntlrWrapException(new InvalidQueryException( - "path element '" + element.toString() + "' not allowed after '" - + last.toString() + "'")); - } - } - - output = element.output(); - last = element; - } - - return true; - } - - @Override - public void fillParseTree(IndentedStringBuilder buf, int level) { - for (PathElementIF pe : path) { - pe.fillParseTree(buf, level++); - } - } - - public String toString() { - StringBuffer sb = new StringBuffer(); - - if (path != null) { - for (int i=0; i - * - * This file is part of the Ontopia project. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -package net.ontopia.topicmaps.query.toma.parser.ast; - -import net.ontopia.topicmaps.query.toma.util.IndentedStringBuilder; - -/** - * INTERNAL: Abstract base class for Topic Literals in the AST. - */ -public abstract class AbstractTopic extends AbstractPathElement { - public enum IDTYPE { - IID, SI, SL, NAME, VAR - }; - - private IDTYPE idType; - private String identifier; - - public AbstractTopic(IDTYPE type, String id) { - super("TOPIC"); - this.idType = type; - this.identifier = id; - } - - public IDTYPE getIDType() { - return idType; - } - - public void setIDType(IDTYPE type) { - this.idType = type; - } - - public String getIdentifier() { - return identifier; - } - - public void setIdentifier(String identifier) { - this.identifier = identifier; - } - - @Override - public void fillParseTree(IndentedStringBuilder buf, int level) { - buf.append("( TOPIC) [" + getTypeString() + "] [" + getIdentifier() + "]", level); - } - - private String getTypeString() { - switch (idType) { - case IID: - return "i"; - - case SI: - return "si"; - - case SL: - return "sl"; - - case NAME: - return "n"; - - case VAR: - return "v"; - } - - return "unknown"; - } - - @Override - public String toString() { - StringBuffer sb = new StringBuffer(); - sb.append(getTypeString()); - sb.append("'"); - sb.append(identifier); - sb.append("'"); - return sb.toString(); - } -} diff --git a/sandbox/toma/src/main/java/net/ontopia/topicmaps/query/toma/parser/ast/AbstractVariable.java b/sandbox/toma/src/main/java/net/ontopia/topicmaps/query/toma/parser/ast/AbstractVariable.java deleted file mode 100644 index e609fe7bd..000000000 --- a/sandbox/toma/src/main/java/net/ontopia/topicmaps/query/toma/parser/ast/AbstractVariable.java +++ /dev/null @@ -1,90 +0,0 @@ -/** - * Copyright (C) 2009 Space Applications Services - * - * - * This file is part of the Ontopia project. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -package net.ontopia.topicmaps.query.toma.parser.ast; - -import java.util.Collection; -import java.util.Set; - -import net.ontopia.topicmaps.query.core.InvalidQueryException; -import net.ontopia.topicmaps.query.toma.util.IndentedStringBuilder; - -/** - * INTERNAL: Abstract base class for variable in the AST. - */ -public abstract class AbstractVariable extends AbstractPathElement implements - VariableIF { - private VariableDecl decl; - - /** - * Create a new variable with the given name. - * - * @param name the name of the variable. - */ - public AbstractVariable(VariableDecl decl) { - super("VARIABLE"); - this.decl = decl; - } - - public String getVarName() { - return decl.getVariableName(); - } - - public VariableDecl getDeclaration() { - return decl; - } - - public Set getValidTypes() { - return decl.getValidTypes(); - } - - /** - * Constrain the types for this variable. - * @see VariableDecl - */ - public void constrainTypes(TYPE... types) throws InvalidQueryException { - decl.constrainTypes(types); - } - - /** - * Constrain the types for this variable. - * @see VariableDecl - */ - public void constrainTypes(Collection types) throws InvalidQueryException { - decl.constrainTypes(types); - } - - @Override - public void fillParseTree(IndentedStringBuilder buf, int level) { - Set validTypes = getValidTypes(); - String type; - - if (validTypes.size() > 1) { - type = "UNKNOWN"; - } else { - type = validTypes.iterator().next().toString(); - } - - buf.append("( VARIABLE) [" + getVarName() + "] [" + type + "]", level); - } - - @Override - public String toString() { - return "$" + decl.getVariableName(); - } -} diff --git a/sandbox/toma/src/main/java/net/ontopia/topicmaps/query/toma/parser/ast/ExpressionIF.java b/sandbox/toma/src/main/java/net/ontopia/topicmaps/query/toma/parser/ast/ExpressionIF.java deleted file mode 100644 index 83fac02ad..000000000 --- a/sandbox/toma/src/main/java/net/ontopia/topicmaps/query/toma/parser/ast/ExpressionIF.java +++ /dev/null @@ -1,68 +0,0 @@ -/** - * Copyright (C) 2009 Space Applications Services - * - * - * This file is part of the Ontopia project. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -package net.ontopia.topicmaps.query.toma.parser.ast; - -import java.util.List; - -import net.ontopia.topicmaps.query.toma.impl.utils.QueryOptimizerIF; -import net.ontopia.topicmaps.query.toma.parser.AntlrWrapException; - -/** - * INTERNAL: represents a TOMA expression in the AST. - */ -public interface ExpressionIF extends ASTElementIF { - /** - * Adds an expression as a child to this expression. - * - * @param expr the expression to be added as a child. - * @throws AntlrWrapException if the expression is not allowed to have child - * expressions. - */ - public void addChild(ExpressionIF expr) throws AntlrWrapException; - - /** - * Get the number of child expressions. - * - * @return the number of children. - */ - public int getChildCount(); - - /** - * Get the child at the specified index. - * - * @param idx the index of the child. - * @return the child at the given index. - */ - public ExpressionIF getChild(int idx); - - /** - * Get the children of this expression as a {@link List}. - * - * @return the list of children. - */ - public List getChilds(); - - /** - * Optimize this expression with the given optimizer. - * - * @param optimizer the optimizer to be used. - * @return the optimized expression to be used afterwards. - */ - public ExpressionIF optimize(QueryOptimizerIF optimizer); -} diff --git a/sandbox/toma/src/main/java/net/ontopia/topicmaps/query/toma/parser/ast/FunctionIF.java b/sandbox/toma/src/main/java/net/ontopia/topicmaps/query/toma/parser/ast/FunctionIF.java deleted file mode 100644 index ef59c19a5..000000000 --- a/sandbox/toma/src/main/java/net/ontopia/topicmaps/query/toma/parser/ast/FunctionIF.java +++ /dev/null @@ -1,45 +0,0 @@ -/** - * Copyright (C) 2009 Space Applications Services - * - * - * This file is part of the Ontopia project. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -package net.ontopia.topicmaps.query.toma.parser.ast; - -import net.ontopia.topicmaps.query.toma.parser.AntlrWrapException; - -/** - * INTERNAL: Represents a function call in the AST. - * Syntactically, a function has an instance of {@link ExpressionIF} as child and - * an arbitrary number of parameters. - */ -public interface FunctionIF extends ExpressionIF { - - /** - * Add a parameter, that will be used while executing the function. - * - * @param param the parameter to be added. - * @throws AntlrWrapException if the number of arguments is not valid - * for this function. - */ - public void addParam(String param) throws AntlrWrapException; - - /** - * Returns whether this is an aggregate function or not. - * - * @return true if this is an aggregate function, false otherwise. - */ - public boolean isAggregateFunction(); -} diff --git a/sandbox/toma/src/main/java/net/ontopia/topicmaps/query/toma/parser/ast/Level.java b/sandbox/toma/src/main/java/net/ontopia/topicmaps/query/toma/parser/ast/Level.java deleted file mode 100644 index 83b4993a4..000000000 --- a/sandbox/toma/src/main/java/net/ontopia/topicmaps/query/toma/parser/ast/Level.java +++ /dev/null @@ -1,105 +0,0 @@ -/** - * Copyright (C) 2009 Space Applications Services - * - * - * This file is part of the Ontopia project. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -package net.ontopia.topicmaps.query.toma.parser.ast; - -/** - * INTERNAL: Indicates the level parameter for several path element expression, - * e.g. type, instance, super, sub. A Level has a start and end value indicating - * the range for this operations. - */ -public class Level { - private int start; - private int end; - - /** - * Creates a new range in the form [level, level]. - * - * @param level the specified level. - */ - public Level(int level) { - this(level, level); - } - - /** - * Creates a new range in the form [start, end]. - * - * @param start the start of the range. - * @param end the end of the range. - */ - public Level(int start, int end) { - this.start = start; - this.end = end; - } - - /** - * Get the start value. - * - * @return the start value. - */ - public int getStart() { - return start; - } - - /** - * Set the start value. - * - * @param start the start value to be set. - */ - public void setStart(int start) { - this.start = start; - } - - /** - * Get the end value. - * - * @return the end value. - */ - public int getEnd() { - return end; - } - - /** - * Set the end value. - * - * @param end the end value to be set. - */ - public void setEnd(int end) { - this.end = end; - } - - public String toString() { - StringBuffer sb = new StringBuffer(); - if (start == end) { - sb.append(convertLevelToString(start)); - } else { - sb.append(convertLevelToString(start)); - sb.append(".."); - sb.append(convertLevelToString(end)); - } - return sb.toString(); - } - - private String convertLevelToString(int lvl) { - if (lvl == Integer.MAX_VALUE) { - return "*"; - } else { - return String.valueOf(lvl); - } - } -} diff --git a/sandbox/toma/src/main/java/net/ontopia/topicmaps/query/toma/parser/ast/PathElementIF.java b/sandbox/toma/src/main/java/net/ontopia/topicmaps/query/toma/parser/ast/PathElementIF.java deleted file mode 100644 index f00b6bda3..000000000 --- a/sandbox/toma/src/main/java/net/ontopia/topicmaps/query/toma/parser/ast/PathElementIF.java +++ /dev/null @@ -1,127 +0,0 @@ -/** - * Copyright (C) 2009 Space Applications Services - * - * - * This file is part of the Ontopia project. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -package net.ontopia.topicmaps.query.toma.parser.ast; - -import java.util.Set; - -import net.ontopia.topicmaps.query.toma.parser.AntlrWrapException; - -/** - * INTERNAL: Represents a path element of a path expression in the AST. - */ -public interface PathElementIF extends ASTElementIF { - /** - * Indicates the different constructs that can be the in/output of an - * evaluated {@link PathElementIF}. - */ - public enum TYPE { - TOPIC, - ASSOCIATION, - NAME, - VARIANT, - OCCURRENCE, - LOCATOR, - STRING, - NONE, - UNKNOWN - }; - - /** - * Use the given level for this element. - * - * @param l the level to be used. - * @throws AntlrWrapException if the element does not support levels. - */ - public void setLevel(Level l) throws AntlrWrapException; - - /** - * Get the specified level for this element. - * - * @return the level if specified, null otherwise. - */ - public Level getLevel(); - - /** - * Use the given expression as a type for this element. - * - * @param expr the expression to be used as a type. - * @throws AntlrWrapException if the element does not support types. - */ - public void setType(PathExpressionIF expr) throws AntlrWrapException; - - /** - * Get the type of this path element. - * - * @return the specified type, null otherwise. - */ - public PathExpressionIF getType(); - - /** - * Use the given expression as a scope for this element. - * - * @param expr the expression to be used as a scope. - * @throws AntlrWrapException if this element does not support scopes. - */ - public void setScope(PathExpressionIF expr) throws AntlrWrapException; - - /** - * Get the scope for this path element. - * - * @return the specified scope, null otherwise. - */ - public PathExpressionIF getScope(); - - /** - * Bind a variable to this path element. - * - * @param var the variable to use for binding. - * @throws AntlrWrapException - */ - public void bindVariable(VariableIF var) throws AntlrWrapException; - - /** - * Bind an input variable to this path element. - * - * @param var the variable to use for binding. - * @throws AntlrWrapException - */ - public void bindInputVariable(VariableIF var) throws AntlrWrapException; - - /** - * Add a {@link PathExpressionIF} as a child to this path element. - * - * @param expr the expression to be added as a child. - * @throws AntlrWrapException if this element does not support children. - */ - public void addChild(PathExpressionIF expr) throws AntlrWrapException; - - /** - * Specifies the set of valid input types for this {@link PathElementIF}. - * - * @return a {@link Set} of {@link TYPE} containing valid the valid input. - */ - public Set validInput(); - - /** - * Specifies the output type for this {@link PathElementIF}. - * - * @return the {@link TYPE} that is the output of this element. - */ - public TYPE output(); -} diff --git a/sandbox/toma/src/main/java/net/ontopia/topicmaps/query/toma/parser/ast/PathExpressionIF.java b/sandbox/toma/src/main/java/net/ontopia/topicmaps/query/toma/parser/ast/PathExpressionIF.java deleted file mode 100644 index 4bd450526..000000000 --- a/sandbox/toma/src/main/java/net/ontopia/topicmaps/query/toma/parser/ast/PathExpressionIF.java +++ /dev/null @@ -1,45 +0,0 @@ -/** - * Copyright (C) 2009 Space Applications Services - * - * - * This file is part of the Ontopia project. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -package net.ontopia.topicmaps.query.toma.parser.ast; - -import net.ontopia.topicmaps.query.toma.parser.AntlrWrapException; -import net.ontopia.topicmaps.query.toma.parser.ast.PathElementIF.TYPE; - -/** - * INTERNAL: Represents a TOMA path expression in the AST. A path expression - * consists of a root node and a path of arbitrary length. - */ -public interface PathExpressionIF extends ExpressionIF { - /** - * Append a path element {@link PathElementIF} to the end of the path - * expression. - * - * @param element the element to be appended. - * @throws AntlrWrapException if the path element to be appended would create - * an invalid path expression. - */ - public void addPath(PathElementIF element) throws AntlrWrapException; - - /** - * Specifies the output type for this {@link PathExpressionIF}. - * - * @return the {@link TYPE} that is the output of this element. - */ - public TYPE output(); -} diff --git a/sandbox/toma/src/main/java/net/ontopia/topicmaps/query/toma/parser/ast/QueryOrder.java b/sandbox/toma/src/main/java/net/ontopia/topicmaps/query/toma/parser/ast/QueryOrder.java deleted file mode 100644 index 058510ceb..000000000 --- a/sandbox/toma/src/main/java/net/ontopia/topicmaps/query/toma/parser/ast/QueryOrder.java +++ /dev/null @@ -1,76 +0,0 @@ -/** - * Copyright (C) 2009 Space Applications Services - * - * - * This file is part of the Ontopia project. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -package net.ontopia.topicmaps.query.toma.parser.ast; - -/** - * INTERNAL: Represents the query order of a specific column in TOMA query. - * - * Two different {@link SORT_ORDER} are defined: - *
      - *
    • ASC - ascending - *
    • DESC - descending - *
    - * - * The default sort order is ASC. - */ -public class QueryOrder -{ - public enum SORT_ORDER - { - ASC, - DESC - }; - - private int column; - private SORT_ORDER order; - - /** - * Create a default ordering for a specific column. - * @param column the column to be sorted. - */ - public QueryOrder(int column) { - this(column, SORT_ORDER.ASC); - } - - /** - * Create a specific ordering fo a column. - * @param column the column to be sorted. - * @param order the ordering to be used. - */ - public QueryOrder(int column, SORT_ORDER order) { - this.column = column; - this.order = order; - } - - public int getColumn() { - return column; - } - - public void setColumn(int column) { - this.column = column; - } - - public SORT_ORDER getOrder() { - return order; - } - - public void setOrder(SORT_ORDER order) { - this.order = order; - } -} diff --git a/sandbox/toma/src/main/java/net/ontopia/topicmaps/query/toma/parser/ast/SelectStatement.java b/sandbox/toma/src/main/java/net/ontopia/topicmaps/query/toma/parser/ast/SelectStatement.java deleted file mode 100644 index 8baf87d03..000000000 --- a/sandbox/toma/src/main/java/net/ontopia/topicmaps/query/toma/parser/ast/SelectStatement.java +++ /dev/null @@ -1,275 +0,0 @@ -/** - * Copyright (C) 2009 Space Applications Services - * - * - * This file is part of the Ontopia project. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -package net.ontopia.topicmaps.query.toma.parser.ast; - -import java.util.ArrayList; -import java.util.HashMap; -import java.util.List; -import java.util.Map; - -import net.ontopia.topicmaps.query.core.InvalidQueryException; -import net.ontopia.topicmaps.query.toma.parser.AntlrWrapException; -import net.ontopia.topicmaps.query.toma.parser.ast.PathElementIF.TYPE; -import net.ontopia.topicmaps.query.toma.util.IndentedStringBuilder; - -/** - * INTERNAL: Represents a single select statement within a TOMA query. A Toma - * query can contain multiple nested select statements as well as select - * statements combined in a union-type style. - */ -public class SelectStatement implements ASTElementIF { - public enum UNION_TYPE { - NOUNION, UNION, UNIONALL, INTERSECT, EXCEPT - }; - - private boolean distinct; - private List selects; - private ExpressionIF clause; - private UNION_TYPE unionType; - private Map variables; - - /** - * Create a new empty Select Statement. - */ - public SelectStatement() { - distinct = false; - selects = new ArrayList(); - clause = null; - unionType = UNION_TYPE.NOUNION; - variables = new HashMap(); - } - - /** - * Set the distinct flag for this select statement, indicating whether - * duplicate rows are present in the output or not. - * - * @param enabled whether distinct behavior should be enabled or not. - */ - public void setDistinct(boolean enabled) { - distinct = enabled; - } - - /** - * Check whether distinct behavior is enabled or not. - * - * @return the current distinct behavior. - */ - public boolean isDistinct() { - return distinct; - } - - /** - * Set the union type for this select statement. - * - * @param type the union type to be set. - */ - public void setUnionType(UNION_TYPE type) { - unionType = type; - } - - /** - * Get the union type for this select statement. - * - * @return the union type. - */ - public UNION_TYPE getUnionType() { - return unionType; - } - - /** - * Add another select clause expression to this statement. - * - * @param sp the select expression to be added. - */ - public void addSelect(ExpressionIF sp) { - selects.add(sp); - } - - /** - * Get the number of select clauses present. - * - * @return the number of select clauses. - */ - public int getSelectCount() { - return selects.size(); - } - - public int getAggregatedSelectCount() { - int numAggregate = 0; - for (ExpressionIF expr : selects) { - if (expr instanceof FunctionIF) { - if (((FunctionIF) expr).isAggregateFunction()) { - numAggregate++; - } - } - } - - return numAggregate; - } - - /** - * Get the select clause at the given index. - * - * @param index the specified index. - * @return the select clause at the given index or null if the index is out of - * range. - */ - public ExpressionIF getSelect(int index) { - try { - return selects.get(index); - } catch (IndexOutOfBoundsException e) { - return null; - } - } - - /** - * Set the where clause for this select statement. As the where clauses are - * structured in a tree, there is only one root clause that contains all other - * available clauses. - * - * @param clause the expression to be used as a where clause. - */ - public void setClause(ExpressionIF clause) { - this.clause = clause; - } - - /** - * Get the where clause for this select statement. - * - * @return the where clause expression. - */ - public ExpressionIF getClause() { - return this.clause; - } - - /** - * Gets a variable declaration for the given variable name. If there is no - * variable declaration available yet, a new one will be created. - * - * @param varName the name of the variable. - * @return the variable declaration for this variable. - */ - public VariableDecl getVariableDeclaration(String varName) { - String name = varName.toUpperCase(); - VariableDecl vDecl = variables.get(name); - if (vDecl == null) { - vDecl = new VariableDecl(name); - variables.put(name, vDecl); - } - return vDecl; - } - - public void addDeclarations(Map declarations) { - variables.putAll(declarations); - } - - public boolean isAggregated() { - // validate all select projections - int numAggregate = 0; - for (ExpressionIF expr : selects) { - if (expr instanceof FunctionIF) { - if (((FunctionIF) expr).isAggregateFunction()) { - numAggregate++; - } - } - } - - return (numAggregate > 0); - } - - public boolean validate() throws AntlrWrapException { - // validate all select projections - int numAggregate = 0; - for (ExpressionIF expr : selects) { - if (expr instanceof FunctionIF) { - if (((FunctionIF) expr).isAggregateFunction()) { - numAggregate++; - } - } - expr.validate(); - } - - // check that no aggregate function is used in the where clause. - checkAggregate(clause); - - // validate the where clauses - clause.validate(); - - // validate that all variables are known - for (VariableDecl var : variables.values()) { - if (var.getValidTypes().size() != 1) { - // if a variable has no qualified type up to now, - // we assume it's of type topic. - try { - var.constrainTypes(TYPE.TOPIC); - } catch (InvalidQueryException e) { - // if this fails -> throw error that variable could not - // be qualified to a type. - throw new AntlrWrapException(new InvalidQueryException("Variable '" - + var.getVariableName() + "' could not be qualified to a type.")); - } - } - } - - return true; - } - - private void checkAggregate(ExpressionIF expr) throws AntlrWrapException { - if (expr instanceof FunctionIF) { - if (((FunctionIF) expr).isAggregateFunction()) { - throw new AntlrWrapException(new InvalidQueryException("Aggregate Function '" - + expr.toString() + "' not allowed in where clause.")); - } - } - - for (int i = 0; i < expr.getChildCount(); i++) { - checkAggregate(expr.getChild(i)); - } - } - - public void fillParseTree(IndentedStringBuilder buf, int level) { - switch (unionType) { - case UNION: - buf.append("( UNION)", level); - break; - - case UNIONALL: - buf.append("( UNION) [ALL]", level); - break; - - case INTERSECT: - buf.append("( EXCEPT)", level); - break; - - case EXCEPT: - buf.append("( INTERSECT)", level); - break; - } - - buf.append("( SELECT) [" + (distinct ? "DISTINCT" : "ALL") + "]", level); - for (ExpressionIF path : selects) { - path.fillParseTree(buf, level + 1); - } - - if (clause != null) { - buf.append("( WHERE)", level); - clause.fillParseTree(buf, level + 1); - } - } -} diff --git a/sandbox/toma/src/main/java/net/ontopia/topicmaps/query/toma/parser/ast/TomaQuery.java b/sandbox/toma/src/main/java/net/ontopia/topicmaps/query/toma/parser/ast/TomaQuery.java deleted file mode 100644 index ab46f7c19..000000000 --- a/sandbox/toma/src/main/java/net/ontopia/topicmaps/query/toma/parser/ast/TomaQuery.java +++ /dev/null @@ -1,219 +0,0 @@ -/** - * Copyright (C) 2009 Space Applications Services - * - * - * This file is part of the Ontopia project. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -package net.ontopia.topicmaps.query.toma.parser.ast; - -import java.util.ArrayList; -import java.util.List; - -import net.ontopia.topicmaps.query.core.InvalidQueryException; -import net.ontopia.topicmaps.query.toma.parser.AntlrWrapException; -import net.ontopia.topicmaps.query.toma.util.IndentedStringBuilder; - -/** - * INTERNAL: Represents a full TOMA query in the AST. A TOMA query consists of - * an arbitrary number of {@link SelectStatement} that can be combined using set - * operations (union, intersect, except), an ordering of columns, as well as - * limit and offset values to further constrain the output of the query. - */ -public class TomaQuery extends AbstractExpression implements ExpressionIF { - private ArrayList statements; - private ArrayList orderBy; - private int limit; - private int offset; - - /** - * Create a new TOMA query. - */ - public TomaQuery() { - super("TOMA", 0); - statements = new ArrayList(); - orderBy = new ArrayList(); - limit = -1; - offset = -1; - } - - /** - * Add a new select statement. - * - * @param statement the statement to be added. - */ - public void addStatement(SelectStatement statement) { - statements.add(statement); - } - - /** - * Get the number of select statements. - * - * @return the number of select statements. - */ - public int getStatementCount() { - return statements.size(); - } - - /** - * Get the select statement at a certain index. - * - * @param idx the specified index. - * @return the select statement at the specified index or null if the index is - * not valid. - */ - public SelectStatement getStatement(int idx) { - try { - return statements.get(idx); - } catch (IndexOutOfBoundsException e) { - return null; - } - } - - /** - * Add a column ordering to this query. - * - * @param column the column to be sorted. - * @param sorting the sort order to be used. - */ - public void addOrderBy(int column, QueryOrder.SORT_ORDER sorting) { - orderBy.add(new QueryOrder(column, sorting)); - } - - /** - * Get the defined orderings for this query. - * - * @return a list of all query orderings. - */ - public List getOrderBy() { - return orderBy; - } - - /** - * Get a list of all select clauses of the first select expression - * in a TOMA query. - * - * @return a list of all select clauses. - */ - public ArrayList getSelectExpressions() { - ArrayList result = new ArrayList(); - if (statements.size() > 0) { - SelectStatement stmt = statements.get(0); - for (int idx = 0; idx < stmt.getSelectCount(); idx++) { - result.add(stmt.getSelect(idx)); - } - } - return result; - } - - /** - * Get offset value for this query. - * - * @return the offset value. - */ - public int getOffset() { - return offset; - } - - /** - * Set the offset value for this query. - * - * @param offset the offset value to be set. - * @throws AntlrWrapException if a negative offset is given. - */ - public void setOffset(int offset) throws AntlrWrapException { - if (offset < 0) { - throw new AntlrWrapException(new InvalidQueryException( - "Negative offset not valid.")); - } - this.offset = offset; - } - - /** - * Set the limit value for this query. - * - * @param limit the limit value to be set. - * @throws AntlrWrapException if a negative limit is given. - */ - public void setLimit(int limit) throws AntlrWrapException { - if (limit < 0) { - throw new AntlrWrapException(new InvalidQueryException( - "Negative limit not valid.")); - } - this.limit = limit; - } - - /** - * Get the limit value for this query. - * - * @return the limit value. - */ - public int getLimit() { - return limit; - } - - /** - * Get a string representation of the AST. - * - * @return the AST in string representation. - */ - public String getParseTree() { - IndentedStringBuilder buf = new IndentedStringBuilder(2); - fillParseTree(buf, 0); - return buf.toString(); - } - - @Override - public boolean validate() throws AntlrWrapException { - super.validate(); - - // validate select statements - for (SelectStatement stmt : statements) { - stmt.validate(); - } - - // check if orderBy columns are valid - SelectStatement stmt = statements.get(0); - int sc = stmt.getSelectCount(); - for (QueryOrder order : orderBy) { - if (order.getColumn() < 1 || order.getColumn() > sc) { - throw new AntlrWrapException(new InvalidQueryException( - "order by references an invalid column")); - } - } - - return true; - } - - public void fillParseTree(IndentedStringBuilder buf, int level) { - buf.append("( TOMA)", level); - - for (SelectStatement stmt : statements) { - stmt.fillParseTree(buf, level + 1); - } - - if (orderBy.size() > 0) { - buf.append("( ORDER BY)", level + 1); - for (QueryOrder q : orderBy) { - buf.append("( COLUMN) [" + q.getColumn() + "]", level + 2); - buf.append("( SORTING) [" + q.getOrder() + "]", level + 2); - } - } - - if (getLimit() >= 0) - buf.append("( LIMIT) [" + getLimit() + "]", level + 1); - if (getOffset() >= 0) - buf.append("( OFFSET) [" + getOffset() + "]", level + 1); - } -} diff --git a/sandbox/toma/src/main/java/net/ontopia/topicmaps/query/toma/parser/ast/VariableDecl.java b/sandbox/toma/src/main/java/net/ontopia/topicmaps/query/toma/parser/ast/VariableDecl.java deleted file mode 100644 index 00a13d8d0..000000000 --- a/sandbox/toma/src/main/java/net/ontopia/topicmaps/query/toma/parser/ast/VariableDecl.java +++ /dev/null @@ -1,106 +0,0 @@ -/** - * Copyright (C) 2009 Space Applications Services - * - * - * This file is part of the Ontopia project. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -package net.ontopia.topicmaps.query.toma.parser.ast; - -import java.util.Arrays; -import java.util.Collection; -import java.util.Set; - -import net.ontopia.topicmaps.query.core.InvalidQueryException; -import net.ontopia.utils.CompactHashSet; - -/** - * INTERNAL: The variable declaration within a SelectStatement. - */ -public class VariableDecl { - private String varName; - private Set validTypes; - - @SuppressWarnings("unchecked") - public VariableDecl(String name) { - this.varName = name; - this.validTypes = new CompactHashSet(); - - // add all valid types - validTypes.add(PathElementIF.TYPE.TOPIC); - validTypes.add(PathElementIF.TYPE.ASSOCIATION); - validTypes.add(PathElementIF.TYPE.NAME); - validTypes.add(PathElementIF.TYPE.OCCURRENCE); - validTypes.add(PathElementIF.TYPE.VARIANT); - validTypes.add(PathElementIF.TYPE.LOCATOR); - validTypes.add(PathElementIF.TYPE.STRING); - } - - /** - * Get the name of the variable. - * - * @return the name of the variable. - */ - public String getVariableName() { - return varName; - } - - /** - * Get all valid types for this variable. - * - * @return the valid types as a Set. - */ - public Set getValidTypes() { - return validTypes; - } - - /** - * Further constrain the valid types of a variable. The result is {current - * types} intersect {constrained types}. - * - * @param types the further constrained types for this variable. - * @throws InvalidQueryException if there resulting set is empty. - */ - public void constrainTypes(PathElementIF.TYPE... types) - throws InvalidQueryException { - constrainTypes(Arrays.asList(types)); - } - - /** - * Further constrain the valid types of a variable. The result is {current - * types} intersect {constrained types}. - * - * @param types the further constrained types for this variable. - * @throws InvalidQueryException if there resulting set is empty. - */ - @SuppressWarnings("unchecked") - public void constrainTypes(Collection types) - throws InvalidQueryException { - - Set newTypes = new CompactHashSet(); - for (PathElementIF.TYPE type : types) { - if (validTypes.contains(type)) { - newTypes.add(type); - } - } - - if (newTypes.isEmpty()) { - throw new InvalidQueryException("Resulting Type Set for variable '" - + varName + "' is empty."); - } else { - validTypes.clear(); - validTypes = newTypes; - } - } -} diff --git a/sandbox/toma/src/main/java/net/ontopia/topicmaps/query/toma/parser/ast/VariableIF.java b/sandbox/toma/src/main/java/net/ontopia/topicmaps/query/toma/parser/ast/VariableIF.java deleted file mode 100644 index 8a441e067..000000000 --- a/sandbox/toma/src/main/java/net/ontopia/topicmaps/query/toma/parser/ast/VariableIF.java +++ /dev/null @@ -1,39 +0,0 @@ -/** - * Copyright (C) 2009 Space Applications Services - * - * - * This file is part of the Ontopia project. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -package net.ontopia.topicmaps.query.toma.parser.ast; - -/** - * INTERNAL: Represents a variable in the AST. - */ -public interface VariableIF extends PathElementIF { - - /** - * Get the name of the variable. - * - * @return the name. - */ - public String getVarName(); - - /** - * Get the declaration for this variable path element. - * - * @return the variable declaration. - */ - public VariableDecl getDeclaration(); -} diff --git a/sandbox/toma/src/main/java/net/ontopia/topicmaps/query/toma/parser/package.html b/sandbox/toma/src/main/java/net/ontopia/topicmaps/query/toma/parser/package.html deleted file mode 100644 index 47f128263..000000000 --- a/sandbox/toma/src/main/java/net/ontopia/topicmaps/query/toma/parser/package.html +++ /dev/null @@ -1,11 +0,0 @@ - -

    -Contains the TOMA query parser and relevant interfaces as well as the abstract syntax tree (AST) classes. -

    - -

    -The use of the two factories (ExpressionFactoryIF, PathExpressionFactoryIF) may seem -unnecessary, but it allows the use of the same parser for different QueryProcessorIF -implementations (operating on in-memory or rdbms topic maps). -

    - \ No newline at end of file diff --git a/sandbox/toma/src/main/java/net/ontopia/topicmaps/query/toma/parser/toma.g b/sandbox/toma/src/main/java/net/ontopia/topicmaps/query/toma/parser/toma.g deleted file mode 100644 index e29e5e98d..000000000 --- a/sandbox/toma/src/main/java/net/ontopia/topicmaps/query/toma/parser/toma.g +++ /dev/null @@ -1,458 +0,0 @@ - -header { package net.ontopia.topicmaps.query.toma.parser; } - -{ - import net.ontopia.topicmaps.query.toma.parser.ast.*; - import java.util.Map; - import java.util.HashMap; -} - -/** - * INTERNAL: Parser for the toma query language. - */ -class RealTomaParser extends Parser; - -options { - defaultErrorHandler = false; - k = 3; -} - -{ - private LocalParseContext context; - private Map variables; - - public void init(LocalParseContext c) { - this.context = c; - this.variables = new HashMap(); - } - - /** - * Tries to convert a string into an integer and throws an AntlrWrapException - * if it does not work. - */ - protected int getInt(String s) throws AntlrWrapException { - try { - return Integer.parseInt(s); - } catch (NumberFormatException e) { - throw new AntlrWrapException(e); - } - } - - protected VariableDecl getVariableDeclaration(String varName) { - String name = varName.toUpperCase(); - VariableDecl decl = variables.get(name); - if (decl == null) { - decl = new VariableDecl(name); - variables.put(name, decl); - } - return decl; - } - - /** - * Add all current variable declarations to the given SelectStatement, - * and empties the variable map afterwards. - */ - protected void addDeclarations(SelectStatement stmt) { - stmt.addDeclarations(variables); - variables.clear(); - } - - /** - * Create a path expression that is started by a variable - */ - protected PathExpressionIF createVariablePath(String varName) throws AntlrWrapException { - VariableDecl vDecl = getVariableDeclaration(varName); - VariableIF var = context.createVariable(vDecl); - PathExpressionIF pe = context.createPathExpression(); - pe.addPath(var); - return pe; - } - - protected VariableIF createVariable(String varName) throws AntlrWrapException { - VariableDecl vDecl = getVariableDeclaration(varName); - VariableIF var = context.createVariable(vDecl); - return var; - } -} - -// the TOMA grammar - -query returns [TomaQuery q]: - q=statement { q.validate(); } - SEMICOLON; - -statement returns [TomaQuery q]: - { q = new TomaQuery(); SelectStatement stmt; } - stmt=select { q.addStatement(stmt); addDeclarations(stmt); } - ( { SelectStatement.UNION_TYPE type; } - ( UNION { type = SelectStatement.UNION_TYPE.UNION; } - | INTERSECT { type = SelectStatement.UNION_TYPE.INTERSECT; } - | EXCEPT { type = SelectStatement.UNION_TYPE.EXCEPT; } - ) - (ALL { type = SelectStatement.UNION_TYPE.UNIONALL; })? - stmt=select { stmt.setUnionType(type); - q.addStatement(stmt); - addDeclarations(stmt); } - )* - (order[q])? - (limit[q])? - (offset[q])?; - -select returns [SelectStatement stmt]: - { stmt = new SelectStatement(); } - SELECT - ( ALL { stmt.setDistinct(false); } - | DISTINCT { stmt.setDistinct(true); } - )? - selectlist[stmt] - ( { ExpressionIF e; } - WHERE e=orclause { stmt.setClause(e); } - ); - -selectlist [SelectStatement stmt]: - { ExpressionIF e; } - e=expr { stmt.addSelect(e); } - ( - COMMA e=expr { stmt.addSelect(e); } - )*; - -orclause returns [ExpressionIF e]: - { ExpressionIF left, right; } - e=andclause - ( - OR right=andclause { left=e; e = context.createExpression("OR", left, right); } - )*; - -andclause returns [ExpressionIF e]: - { ExpressionIF left, right; } - e=clause - ( - AND right=clause { left=e; e = context.createExpression("AND", left, right); } - )*; - -clause returns [ExpressionIF e]: - { ExpressionIF left, right; String exprID; } - ( - { exprID = "EXISTS"; } - (NOT { exprID = "NOTEXISTS"; })? - EXISTS left=expr - { e = context.createExpression(exprID, left); } - | LPAREN e=orclause RPAREN - | - left=expr - ( - e=comparator right=expr - { e.addChild(left); e.addChild(right); } - | { exprID = "NOTEXISTS"; } - IS (NOT { exprID = "EXISTS"; })? - NULL { e = context.createExpression(exprID, left); } - | IN LPAREN { e = context.createExpression("IN"); - e.addChild(left); } - ( right=statement { e.addChild(right); } - | right=expr { e.addChild(right); } - ( - COMMA right=atomexpr { e.addChild(right); } - )* - )? RPAREN - ) - ); - -expr returns [ExpressionIF p]: - { ExpressionIF left, right; } - p=atomexpr - (DOUBLEPIPE right=atomexpr - { left = p; p = context.createExpression("||", left, right); })*; - -atomexpr returns [ExpressionIF p]: - ( p=topicpathexpr - | { p = context.createPathExpression(); } - assocpathexpr[(PathExpressionIF) p, null] - | s:STRING { p = context.createLiteral(s.getText()); } - | { FunctionIF f; ExpressionIF left; } - f=function { p = f; } - LPAREN - left=atomexpr { p.addChild(left); } - ( - COMMA functionparam { f.addParam(LT(0).getText()); } - )* - RPAREN - ); - -topicpathexpr returns [PathExpressionIF p]: - p=pathexpr - (DOT assocleftside[p])?; - -assocpathexpr [PathExpressionIF p, PathExpressionIF left]: - { PathElementIF pe = context.createElement("ASSOC"); - if (left != null) pe.addChild(left); - p.addPath(pe); - PathExpressionIF type, scope, right; } - (assocVar:VARIABLE { pe.bindInputVariable( - createVariable(assocVar.getText())); })? - LPAREN type=pathexpr RPAREN { pe.setType(type); } - ( ATSCOPE - { PathElementIF tl; } - ( var:VARIABLE { scope = createVariablePath(var.getText()); } - | tl=topicliteral { scope = context.createPathExpression(); } - { scope.addPath(tl); } - | LPAREN scope=pathexpr RPAREN - ) { pe.setScope(scope); })? - RARROW - LPAREN right=roleexpr RPAREN { pe.addChild(right); } - (LSQUARE - bindVar:VARIABLE { pe.bindVariable(createVariable(bindVar.getText())); } - RSQUARE - )? - ( { PathElementIF part; } - DOT part=pathpart { p.addPath(part); } - )* - (DOT assocleftside[p])?; - -assocleftside [PathExpressionIF p]: - { PathExpressionIF left; } - LPAREN left=roleexpr RPAREN LARROW assocpathexpr[p, left]; - -roleexpr returns [PathExpressionIF p]: - ( // create an empty PathExpression in the case of an $$ - ANONYM { p = context.createPathExpression(); } - | p=pathexpr - ); - -pathexpr returns [PathExpressionIF path]: - { path = context.createPathExpression(); } - ( - { PathElementIF topic; } - topic=topicliteral { path.addPath(topic); } - | var:VARIABLE { path.addPath(createVariable(var.getText())); } - ) - ( { PathElementIF pe; } - DOT pe=pathpart { path.addPath(pe); } - )*; - -pathpart returns [PathElementIF p]: - ( ID | SI | SL | NAME | VAR | OC | REF | DATA | SC | PLAYER | - ROLE | REIFIER | TYPE | INSTANCE | SUB | SUPER ) - { p = context.createElement(LT(0).getText()); } - ( LPAREN - ( { PathExpressionIF type; } - type=pathexpr { p.setType(type); } - | { Level l; } - l=level { p.setLevel(l); } - ) - RPAREN - )? - ( ATSCOPE - { PathExpressionIF pe; PathElementIF e; } - ( var:VARIABLE { pe = createVariablePath(var.getText()); } - | e=topicliteral { pe = context.createPathExpression(); } - { pe.addPath(e); } - | LPAREN pe=pathexpr RPAREN - ) { p.setScope(pe); } - )? - ( LSQUARE - bound:VARIABLE { p.bindVariable(createVariable(bound.getText())); } - RSQUARE - )?; - -order [TomaQuery q]: - ORDER BY orderpart[q] (COMMA orderpart[q])*; - -orderpart [TomaQuery q]: - { QueryOrder.SORT_ORDER order = QueryOrder.SORT_ORDER.ASC; } - col:INT - ( ASC { order = QueryOrder.SORT_ORDER.ASC; } - | DESC { order = QueryOrder.SORT_ORDER.DESC; } - )? - { q.addOrderBy(getInt(col.getText()), order); }; - -limit [TomaQuery q]: - LIMIT i:INT { q.setLimit(getInt(i.getText())); }; - -offset [TomaQuery q]: - OFFSET o:INT { q.setOffset(getInt(o.getText())); }; - -level returns [Level l]: - { int start = 0; int end = 0; } - ( i:INT { start = end = getInt(i.getText()); } - | ASTERISK { start = 0; end = Integer.MAX_VALUE; } - | s:INT RANGE { start = getInt(s.getText()); } - ( e:INT { end = getInt(e.getText()); } - | ASTERISK { end = Integer.MAX_VALUE; } - ) - ) { l = new Level(start, end); }; - -topicliteral returns [PathElementIF root]: - { String type; } - ( ITEMID { type = "IID"; } - | NAMELITERAL { type = "NAME"; } - | VARLITERAL { type = "VAR"; } - | SUBJID { type = "SUBJID"; } - | SUBJLOC { type = "SUBJLOC"; } - | IDENTIFIER { type = "IID"; } - ) { root = context.createTopic(type, LT(0).getText()); }; - -comparator returns [ExpressionIF e]: - ( NOTEQUALS | EQUALS | LESSTHAN | GREATERTHAN | LESSTHANEQ - | GREATERTHANEQ | REGEXPCS | REGEXPCI | REGEXPNCS | REGEXPNCI) - { e = context.createExpression(LT(0).getText()); }; - -function returns [FunctionIF f]: - ( f=aggregate_function - | f=simple_function - ); - -aggregate_function returns [FunctionIF f]: - ( COUNT | SUM | MAX | MIN | AVG | CONCAT) - { f = context.createFunction(LT(0).getText()); }; - -simple_function returns [FunctionIF f]: - ( LOWERCASE | UPPERCASE | TITLECASE | LENGTH | SUBSTR | TRIM | TO_NUM) - { f = context.createFunction(LT(0).getText()); }; - -functionparam: - ( INT - | IDENTIFIER - | STRING - ); - -/** - * INTERNAL: Lexer for TOMA query language. - */ -class TomaLexer extends Lexer; - -options { - // can't include U+FFFF in the vocabulary, because antlr 2.7.1 uses it - // to represent EOF... - charVocabulary = '\1'..'\uFFFE'; - caseSensitive = true; - caseSensitiveLiterals = false; - testLiterals = false; - k = 4; -} - -tokens { - SELECT = "select"; - WHERE = "where"; - ORDER = "order"; - BY = "by"; - NOT = "not"; - AND = "and"; - OR = "or"; - EXISTS = "exists"; - IN = "in"; - IS = "is"; - NULL = "null"; - DESC = "desc"; - ASC = "asc"; - LIMIT = "limit"; - OFFSET = "offset"; - ID = "id"; - SI = "si"; - SL = "sl"; - NAME = "name"; - VAR = "var"; - OC = "oc"; - REF = "ref"; - DATA = "data"; - SC = "sc"; - PLAYER = "player"; - ROLE = "role"; - REIFIER = "reifier"; - TYPE = "type"; - INSTANCE = "instance"; - SUPER = "super"; - SUB = "sub"; - UNION = "union"; - INTERSECT = "intersect"; - EXCEPT = "except"; - ALL = "all"; - DISTINCT = "distinct"; - - // AGGREGATE FUNCTIONS - COUNT = "count"; - SUM = "sum"; - MAX = "max"; - MIN = "min"; - AVG = "avg"; - CONCAT = "concat"; - - // STRING FUNCTIONS - LOWERCASE = "lowercase"; - UPPERCASE = "uppercase"; - TITLECASE = "titlecase"; - LENGTH = "length"; - SUBSTR = "substr"; - TRIM = "trim"; - - // CONVERSION FUNCTIONS - TO_NUM = "to_num"; -} - -IDENTIFIER options { testLiterals = true; }: - ('A'..'Z' | 'a'..'z') - ('A'..'Z' | 'a'..'z' | '0'..'9' | '_' | { LA(2)!='>' }? '-')*; - -WS: - (' ' | '\t' | '\n' { newline(); } | '\r') - { $setType(Token.SKIP); }; - -ITEMID: 'i' STRING; -NAMELITERAL: 'n' STRING; -VARLITERAL: 'v' STRING; -SUBJID: "si" STRING; -SUBJLOC: "sl" STRING; - -STRING: - '\'' - ( - options { generateAmbigWarnings=false; }: - ~('\'' | '\n') - | '\n' { newline(); } - | { LA(1)=='\\' }? '\'' - )* - '\'' - { setText(new String(text.getBuffer(), _begin+1, (text.length()-_begin)-2)); }; - -COMMENT: - "#" (~'\n')* '\n' - { $setType(Token.SKIP); newline(); }; - -VARIABLE: - '$' - ('A'..'Z' | 'a'..'z' | '_') - ('A'..'Z' | 'a'..'z' | '0'..'9' | '_' )* - { setText(new String(text.getBuffer(), _begin+1, (text.length()-_begin)-1)); }; - -INT: ('0'..'9')+; - -ASTERISK options { paraphrase = "*"; } : '*' ; -COLON options { paraphrase = ":"; } : ':' ; -SEMICOLON options { paraphrase = ":"; } : ';' ; -QUESTIONM options { paraphrase = "?"; } : '?' ; -SLASH options { paraphrase = "/"; } : '/' ; -ATSCOPE options { paraphrase = "@"; } : '@' ; -COMMA options { paraphrase = ","; } : ',' ; -LPAREN options { paraphrase = "("; } : '(' ; -RPAREN options { paraphrase = ")"; } : ')' ; -LSQUARE options { paraphrase = "["; } : '[' ; -RSQUARE options { paraphrase = "]"; } : ']' ; -DOT options { paraphrase = "."; } : '.' ; -RARROW options { paraphrase = "->"; } : "->" ; -LARROW options { paraphrase = "<-"; } : "<-" ; -ANONYM options { paraphrase = "$$"; } : "$$" ; -LCURLY options { paraphrase = "{"; } : '{' ; -RCURLY options { paraphrase = "}"; } : '}' ; -PIPE options { paraphrase = "|"; } : '|' ; -DOUBLEPIPE options { paraphrase = "||"; } : "||" ; -RANGE options { paraphrase = ".."; } : ".." ; - -NOTEQUALS options { paraphrase = "!="; } : "!=" ; -EQUALS options { paraphrase = "="; } : "=" ; -LESSTHAN options { paraphrase = "<"; } : "<" ; -GREATERTHAN options { paraphrase = ">"; } : ">" ; -LESSTHANEQ options { paraphrase = "<="; } : "<=" ; -GREATERTHANEQ options { paraphrase = ">="; } : ">=" ; -REGEXPCS options { paraphrase = "~"; } : '~' ; -REGEXPCI options { paraphrase = "~*"; } : "~*" ; -REGEXPNCS options { paraphrase = "!~"; } : "!~" ; -REGEXPNCI options { paraphrase = "!~*"; }: "!~*" ; diff --git a/sandbox/toma/src/main/java/net/ontopia/topicmaps/query/toma/tools/QueryTool.java b/sandbox/toma/src/main/java/net/ontopia/topicmaps/query/toma/tools/QueryTool.java deleted file mode 100644 index 83e110bc4..000000000 --- a/sandbox/toma/src/main/java/net/ontopia/topicmaps/query/toma/tools/QueryTool.java +++ /dev/null @@ -1,170 +0,0 @@ -/** - * Copyright (C) 2009 Space Applications Services - * - * - * This file is part of the Ontopia project. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -package net.ontopia.topicmaps.query.toma.tools; - -import java.io.IOException; -import java.net.MalformedURLException; - -import net.ontopia.topicmaps.core.TopicMapIF; -import net.ontopia.topicmaps.impl.basic.TopicMap; -import net.ontopia.topicmaps.query.core.InvalidQueryException; -import net.ontopia.topicmaps.query.core.ParsedQueryIF; -import net.ontopia.topicmaps.query.core.QueryProcessorIF; -import net.ontopia.topicmaps.query.core.QueryResultIF; -import net.ontopia.topicmaps.query.toma.impl.basic.BasicQueryProcessor; -import net.ontopia.topicmaps.query.toma.impl.utils.Stringifier; -import net.ontopia.topicmaps.utils.DuplicateSuppressionUtils; -import net.ontopia.topicmaps.utils.ImportExportUtils; -import net.ontopia.utils.CmdlineOptions; -import net.ontopia.utils.CmdlineUtils; - -/** - * PUBLIC: A simple command-line tool to run TOMA queries against a given topic - * map. - */ -public class QueryTool { - - public static void main(String[] argv) { - - // Initialize logging - CmdlineUtils.initializeLogging(); - - // Initialize command line option parser and listeners - CmdlineOptions options = new CmdlineOptions("QueryTool", argv); - OptionsListener ohandler = new OptionsListener(); - - // Register local options - options.addLong(ohandler, "debug", 'd'); - - // Register logging options - CmdlineUtils.registerLoggingOptions(options); - - // Parse command line options - try { - options.parse(); - } catch (CmdlineOptions.OptionsException e) { - System.err.println("Error: " + e.getMessage()); - usage(); - System.exit(1); - } - - // Get command line arguments - String[] args = options.getArguments(); - - if (args.length != 2) { - System.err.println("Error: Must have exactly two arguments!"); - usage(); - System.exit(1); - } - - try { - // Run the query - runquery(args[0], args[1], ohandler); - } catch (java.net.MalformedURLException e) { - System.err.println(e); - System.exit(2); - } catch (java.io.IOException e) { - System.err.println(e); - System.exit(2); - } catch (InvalidQueryException e) { - System.err.println(e); - System.exit(2); - } - } - - private static void usage() { - System.out.println("QueryTool [options] "); - System.out.println(""); - System.out.println(" Runs a toma query against a topic map."); - System.out.println(" Options:"); - CmdlineUtils.printLoggingOptionsUsage(System.out); - System.out.println(" --debug: turn on debugging output"); - System.out.println(""); - System.out - .println(" : url or file name of topic map to be queried"); - System.out.println(" : query string or file containing query"); - System.out.println(""); - } - - private static void runquery(String tmfile, String query, - OptionsListener ohandler) throws IOException, MalformedURLException, - InvalidQueryException { - - TopicMapIF tm = ImportExportUtils.getReader(tmfile).read(); - // run duplicate suppression only on in-memory topic maps. too expensive on - // rdbms topic maps. - if (tm instanceof TopicMap) - DuplicateSuppressionUtils.removeDuplicates(tm); - - if (ohandler.debug) { - System.out.println("Query: " + query + "\n"); - } - - QueryProcessorIF processor = new BasicQueryProcessor(tm); - ParsedQueryIF pquery = processor.parse(query); - - if (ohandler.debug) { - System.out.println("Parsed query: \n" + pquery + "\n"); - } - - long time = System.currentTimeMillis(); - QueryResultIF result = pquery.execute(); - System.out.println("Query time: " + (System.currentTimeMillis() - time) - + "ms\n"); - - int rows = 0; - - for (int ix = 0; ix < result.getWidth(); ix++) - System.out.print(String.format("%1$30s |", result.getColumnName(ix))); - System.out.println(); - for (int ix = 0; ix < result.getWidth(); ix++) - System.out.print("-------------------------------|"); - System.out.println(); - - while (result.next()) { - for (int ix = 0; ix < result.getWidth(); ix++) - System.out.print(String.format("%1$30s |", getString(Stringifier - .toString(result.getValue(ix)), 30))); - System.out.println(""); - rows++; - } - - System.out.println("\nRows: " + rows); - } - - private static String getString(String str, int maxLength) { - if (str == null) - return null; - if (str.length() > maxLength) { - return "..." + str.substring(str.length() - maxLength + 4, str.length()); - } else { - return str; - } - } - - private static class OptionsListener implements CmdlineOptions.ListenerIF { - boolean debug; - - public void processOption(char option, String value) - throws CmdlineOptions.OptionsException { - if (option == 'd') - debug = true; - } - } -} diff --git a/sandbox/toma/src/main/java/net/ontopia/topicmaps/query/toma/tools/TomaQueryTest.java b/sandbox/toma/src/main/java/net/ontopia/topicmaps/query/toma/tools/TomaQueryTest.java deleted file mode 100644 index 9e03630ff..000000000 --- a/sandbox/toma/src/main/java/net/ontopia/topicmaps/query/toma/tools/TomaQueryTest.java +++ /dev/null @@ -1,128 +0,0 @@ -/** - * Copyright (C) 2009 Space Applications Services - * - * - * This file is part of the Ontopia project. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -package net.ontopia.topicmaps.query.toma.tools; - -import java.io.IOException; -import java.io.StringWriter; - -import java.util.*; - -import net.ontopia.topicmaps.core.TopicMapIF; -import net.ontopia.topicmaps.core.TopicIF; -import net.ontopia.topicmaps.query.core.InvalidQueryException; -import net.ontopia.topicmaps.query.core.ParsedQueryIF; -import net.ontopia.topicmaps.query.core.QueryProcessorIF; -import net.ontopia.topicmaps.query.core.QueryResultIF; -import net.ontopia.topicmaps.query.toma.impl.basic.BasicQueryProcessor; -import net.ontopia.topicmaps.query.toma.impl.utils.QueryTracer; -import net.ontopia.topicmaps.query.toma.impl.utils.SimpleQueryTracer; -import net.ontopia.topicmaps.query.toma.impl.utils.Stringifier; -import net.ontopia.topicmaps.utils.DuplicateSuppressionUtils; -import net.ontopia.topicmaps.utils.ImportExportUtils; - -public class TomaQueryTest -{ - - public static void main(String[] args) - { - String tmfile = "./toma/src/test/resources/query/ItalianOpera.ltm"; - //String tmfile = "./toma/src/test/resources/query/ItalianOpera.ltm"; - //String tmfile = "./toma/src/test/int-occs.ltm"; - //String tmfile = "./toma/src/test/resources/query/full.ltm"; - //String tmfile = "./toma/src/test/resources/query/hierarchies.ltm"; - //String tmfile = "./toma/src/test/resources/query/family.ltm"; - - try - { - TopicMapIF tm = ImportExportUtils.getReader(tmfile).read(); - DuplicateSuppressionUtils.removeDuplicates(tm); - - //String query = "select $t where $t.(teacher)<-$a(pupil-of)->(pupil).(person)<-$b(born-in)->(place) = i'milano';"; - //String query = "select $t.id where milano.(place)<-(born-in)->(person).(pupil)<-(pupil-of)->(teacher) = $t;"; - - //String query = "select $t where $t.(person)<-$b(born-in)->(place) = i'milano';"; - //String query = "select $a.role where $a(defined-by)->($$) = i'ontopia';"; - //String query = "select $t, $a where $t.type(1) = i'opera' and $t.name ~ 'F' and exists $t.oc(article)[$a];"; - //String query = "select $a where $a.player = 'ltm';"; - //String query = "select $t where $t.type IN (format, standard);"; - //String query = "select $M.NAME, $M.oc where $M.type = opera and $M.name ~ 'Cav' order by 1;"; - //String query = "select avg($t.oc(pages)), count($t) where $t.type(1) = standard and exists $t.oc(pages);"; - //String query = "select $t where ontopia.(project)<-$a(i'contributes-to')@year2009->(person) = $t;"; - //String query = "select $t where tn.($$)<-$a(contributes-to)->(project).($$)<-(implements)->(standard) = $t;"; - //String query = "select $t.oc(libretto)@web where exists $t.oc(libretto)@web;"; - //String query = "select $OPERA, $COMPOSER, $WORK where shakespeare.(writer)<-(written-by)->(work) = $WORK and $WORK.(source)<-(based-on)->(result) = $OPERA and $OPERA.(work)<-(composed-by)->(composer) = $COMPOSER order by 2;"; - //String query = "select $PERSON, $PROJECT where ltm-standard.(standard)<-(implements)->(project) = $PROJECT and $PROJECT.(project)<-(contributes-to)->(person) = $PERSON;"; - //String query = "select distinct $OPERA where $OPERA.type = opera and $OPERA.(work)<-(appears-in)->(character) = $CHAR and " + - //"$CHAR.(character)<-(has-voice)->(voice-type) = $TYPE " + - //"order by 1;"; - //String query = "select $t where $t.name@short-name = 'Leoni';"; - //String query = "select $TOPIC, $TOPIC.oc(bibref).data where exists $TOPIC.oc(bibref) union select $TOPIC, $REIFIER.oc(bibref) where $a.player = $TOPIC and $reifier = $a.reifier and exists $reifier.oc(bibref) order by 1 desc, 2;"; - //String query = "select $p, count($c) where $p.(project)<-(contributes-to)->(person) = $c;"; - //String query = "select $p, $c where exists $p.(project)<-(contributes-to)->(person)[$c];"; - //String query = "select $t.name, $t.oc where exists $t order by 1;"; - //String query = "select $COMPOSER, count($OPERA) where exists $COMPOSER.(composer)<-(composed-by)->(work)[$OPERA] order by 2 desc;"; - //String query = "select $topic.name($type)@$scope, $type, $scope where $topic.type = city;"; - //String query = "select sum($pages) where $t.type = standard and $pages = $t.oc(pages);"; - //String query = "select $t where $t.instance IN (select $n where $n.type = standard);"; - //String query = "select $a, $association, $role, $player where $a($association)->($role) = $player;"; - //String query = "select $a, $person, $association, $place where $person.(person)<-$a($association)->(place) = $place;"; - //String query = "select $PLACE, $PERSON where exists $PERSON.(person)<-(born-in)->(place)[$PLACE] and $PERSON.(person)<-(died-in)->(place) = $PLACE order by 1, 2;"; - //String query = "select $PERSON where $person.type = composer and exists $PERSON.($$)<-(composed-by)->($$);"; - String query = "select $person, $city where ($t.super = writer or $t = writer) and $person.type = $t and $city.name = 'Rome' and $person.($$)<-(died-in)->($$) = $city;"; - - QueryProcessorIF processor = new BasicQueryProcessor(tm); - ParsedQueryIF pquery = processor.parse(query); - - System.out.println("Parsed query: \n" + pquery + "\n\n"); - - StringWriter writer = new StringWriter(); - SimpleQueryTracer tracer = new SimpleQueryTracer(writer); - QueryTracer.addListener(tracer); - - long time = System.currentTimeMillis(); - QueryResultIF result = pquery.execute(); - long elapsed = (System.currentTimeMillis() - time); - int rows = 0; - - QueryTracer.removeListener(tracer); - - for (int ix = 0; ix < result.getWidth(); ix++) - System.out.print(result.getColumnName(ix) + " | "); - System.out.println(); - System.out.println("----------------------------------------------------"); - - while (result.next()) { - for (int ix = 0; ix < result.getWidth(); ix++) - System.out.print(Stringifier.toString(result.getValue(ix)) + " | "); - System.out.println(""); - rows++; - } - - System.out.println("Query time: " + elapsed + "ms"); - System.out.println("Rows: " + rows); - -// System.out.println("Trace: \n" + writer.toString()); - - } catch (IOException e) { - e.printStackTrace(); - } catch (InvalidQueryException e) { - e.printStackTrace(); - } - } -} diff --git a/sandbox/toma/src/main/java/net/ontopia/topicmaps/query/toma/util/IndentedStringBuilder.java b/sandbox/toma/src/main/java/net/ontopia/topicmaps/query/toma/util/IndentedStringBuilder.java deleted file mode 100644 index 118dfa03f..000000000 --- a/sandbox/toma/src/main/java/net/ontopia/topicmaps/query/toma/util/IndentedStringBuilder.java +++ /dev/null @@ -1,89 +0,0 @@ -/** - * Copyright (C) 2009 Space Applications Services - * - * - * This file is part of the Ontopia project. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -package net.ontopia.topicmaps.query.toma.util; - -/** - * PUBLIC: An indented StringBuilder implementation. This class can be used to - * create indented tree-like outputs e.g. a syntax tree. - */ -public class IndentedStringBuilder { - public static final int DEFAULT_INDENTATION_SIZE = 2; - - private StringBuilder internalBuffer; - private int indentSize; - private int cnt; - - /** - * PUBLIC: Create a new indented StringBuilder instance with a default - * indentation of {@link DEFAULT_INDENTATION_SIZE}. - */ - public IndentedStringBuilder() { - this(DEFAULT_INDENTATION_SIZE); - } - - /** - * PUBLIC: Create a new indented StringBuilder instance with a custom - * indentation size. - * - * @param indentSize the desired indentation size. - */ - public IndentedStringBuilder(int indentSize) { - internalBuffer = new StringBuilder(); - this.indentSize = indentSize; - this.cnt = 1; - } - - /** - * PUBLIC: Append a line to the current buffer. - * Note: a carriage return is automatically added to the line. - * - * @param line the line to be added. - * @param level the required level of indentation. - */ - public void append(String line, int level) { - addIndentation(level); - - internalBuffer.append(String.format("==%1$2s== ", cnt++)); - internalBuffer.append(line); - internalBuffer.append('\n'); - } - - /** - * PUBLIC: Get a string representation. - * - * @return a string representation - */ - @Override - public String toString() { - return internalBuffer.toString(); - } - - /** - * INTERNAL: Add the required indentation. - * - * @param level the required indentation level. - */ - private void addIndentation(int level) { - String indentation = ""; - if (level > 0 && indentSize > 0) { - indentation = String.format("%1$" + level * indentSize + "s", ' '); - } - internalBuffer.append(indentation); - } -} diff --git a/sandbox/toma/src/main/resources/META-INF/services/net.ontopia.topicmaps.query.core.QueryProcessorFactoryIF b/sandbox/toma/src/main/resources/META-INF/services/net.ontopia.topicmaps.query.core.QueryProcessorFactoryIF deleted file mode 100644 index 45cfd5780..000000000 --- a/sandbox/toma/src/main/resources/META-INF/services/net.ontopia.topicmaps.query.core.QueryProcessorFactoryIF +++ /dev/null @@ -1 +0,0 @@ -net.ontopia.topicmaps.query.toma.impl.utils.TomaQueryProcessorFactory \ No newline at end of file diff --git a/sandbox/toma/src/main/scripts/querytool.sh b/sandbox/toma/src/main/scripts/querytool.sh deleted file mode 100755 index 7987bdf5b..000000000 --- a/sandbox/toma/src/main/scripts/querytool.sh +++ /dev/null @@ -1,6 +0,0 @@ -#!/bin/bash - -LIBDIR=./lib -CLASSPATH=./classes$(find $LIBDIR -name *.jar -exec printf :{} ';') -echo $CLASSPATH -java -cp $CLASSPATH net.ontopia.topicmaps.query.toma.tools.QueryTool "$@" diff --git a/sandbox/toma/src/test/java/net/ontopia/AbstractOntopiaTestCase.java b/sandbox/toma/src/test/java/net/ontopia/AbstractOntopiaTestCase.java deleted file mode 100644 index 2c231c17f..000000000 --- a/sandbox/toma/src/test/java/net/ontopia/AbstractOntopiaTestCase.java +++ /dev/null @@ -1,210 +0,0 @@ -package net.ontopia; - -import java.io.BufferedReader; -import java.io.File; -import java.io.FileReader; -import java.io.IOException; - -import junit.framework.TestCase; -import net.ontopia.utils.OntopiaRuntimeException; - -public abstract class AbstractOntopiaTestCase extends TestCase { - - protected static int asserts = 0; - - public AbstractOntopiaTestCase(String name) { - super(name); - } - - public static int getAssertCount() { - return asserts; - } - - static public void assertTrue(String message, boolean condition) { - TestCase.assertTrue(message, condition); - asserts++; - } - static public void assertTrue(boolean condition) { - TestCase.assertTrue(condition); - asserts++; - } - static public void assertEquals(String message, Object expected, Object actual) { - TestCase.assertEquals(message, expected, actual); - asserts++; - } - static public void assertEquals(Object expected, Object actual) { - TestCase.assertEquals(expected, actual); - asserts++; - } - static public void assertEquals(String message, double expected, double actual, double delta) { - TestCase.assertEquals(message, expected, actual, delta); - asserts++; - } - static public void assertEquals(double expected, double actual, double delta) { - TestCase.assertEquals(expected, actual, delta); - asserts++; - } - static public void assertEquals(String message, float expected, float actual, float delta) { - TestCase.assertEquals(message, expected, actual, delta); - asserts++; - } - static public void assertEquals(float expected, float actual, float delta) { - TestCase.assertEquals(expected, actual, delta); - asserts++; - } - static public void assertEquals(String message, long expected, long actual) { - TestCase.assertEquals(message, expected, actual); - asserts++; - } - static public void assertEquals(long expected, long actual) { - TestCase.assertEquals(expected, actual); - asserts++; - } - static public void assertEquals(String message, boolean expected, boolean actual) { - TestCase.assertEquals(message, expected, actual); - asserts++; - } - static public void assertEquals(boolean expected, boolean actual) { - TestCase.assertEquals(expected, actual); - asserts++; - } - static public void assertEquals(String message, byte expected, byte actual) { - TestCase.assertEquals(message, expected, actual); - asserts++; - } - static public void assertEquals(byte expected, byte actual) { - TestCase.assertEquals(expected, actual); - asserts++; - } - static public void assertEquals(String message, char expected, char actual) { - TestCase.assertEquals(message, expected, actual); - asserts++; - } - static public void assertEquals(char expected, char actual) { - TestCase.assertEquals(expected, actual); - asserts++; - } - static public void assertEquals(String message, short expected, short actual) { - TestCase.assertEquals(message, expected, actual); - asserts++; - } - static public void assertEquals(short expected, short actual) { - TestCase.assertEquals(expected, actual); - asserts++; - } - static public void assertEquals(String message, int expected, int actual) { - TestCase.assertEquals(message, expected, actual); - asserts++; - } - static public void assertEquals(int expected, int actual) { - TestCase.assertEquals(expected, actual); - asserts++; - } - static public void assertNotNull(Object object) { - TestCase.assertNotNull(object); - asserts++; - } - static public void assertNotNull(String message, Object object) { - TestCase.assertNotNull(message, object); - asserts++; - } - static public void assertNull(Object object) { - TestCase.assertNull(object); - asserts++; - } - static public void assertNull(String message, Object object) { - TestCase.assertNull(message, object); - asserts++; - } - static public void assertSame(String message, Object expected, Object actual) { - TestCase.assertSame(message, expected, actual); - asserts++; - } - static public void assertSame(Object expected, Object actual) { - TestCase.assertSame(expected, actual); - asserts++; - } - - static public void fail(String message, Throwable e) { - e.printStackTrace(); - TestCase.fail(message); - } - - - // Test directory - - public static String getTestDirectory() { - String testroot = System.getProperty("net.ontopia.test.root"); - // Fall back to the user home directory - if (testroot == null) - testroot = System.getProperty("user.dir") + File.separator + "src/test/resources"; - // Complain if the directory couldn't be found. - if (testroot == null) - throw new OntopiaRuntimeException("Could not find test root directory." + - " Please set the 'net.ontopia.test.root'" + - " system property."); - return testroot; - } - - // File convenience methods - - protected void verifyDirectory(String dir) { - File thedir = new File(dir); - if (!thedir.exists()) - thedir.mkdir(); - } - - protected void verifyDirectory(String base, String dir) { - File thedir = new File(base + File.separator + dir); - if (!thedir.exists()) - thedir.mkdir(); - } - - protected void verifyDirectory(String base, String sub1, String sub2) { - File thedir = new File(base + File.separator + sub1 + File.separator + - sub2); - if (!thedir.exists()) - thedir.mkdirs(); - } - - /** - * Read in content from file. If the file doesn't exist or has no content - * a valid empty String will be returned. - */ - protected String getFileContent(String file) { - StringBuffer content = new StringBuffer(""); - try { - BufferedReader read = new BufferedReader(new FileReader(file)); - String line = read.readLine(); - if (line != null) - content.append( line ); - while (line != null) { - line = read.readLine(); - if (line != null) - content.append( line ); - } - read.close(); - } catch (IOException e) { - // we accept that - } - - return content.toString(); - } - - public String resolveFileName(String filename) { - String root = getTestDirectory(); - return root + File.separator + filename; - } - - public String resolveFileName(String dir, String filename) { - String root = getTestDirectory(); - return root + File.separator + dir + File.separator + filename; - } - - public String resolveFileName(String dir, String subdir, String filename) { - String root = getTestDirectory(); - return root + File.separator + dir + File.separator + subdir + File.separator + - filename; - } - -} diff --git a/sandbox/toma/src/test/java/net/ontopia/topicmaps/AbstractTopicMapTestCase.java b/sandbox/toma/src/test/java/net/ontopia/topicmaps/AbstractTopicMapTestCase.java deleted file mode 100644 index e01001af5..000000000 --- a/sandbox/toma/src/test/java/net/ontopia/topicmaps/AbstractTopicMapTestCase.java +++ /dev/null @@ -1,34 +0,0 @@ -package net.ontopia.topicmaps; - -import net.ontopia.AbstractOntopiaTestCase; -import net.ontopia.infoset.core.LocatorIF; -import net.ontopia.topicmaps.core.*; - -public abstract class AbstractTopicMapTestCase extends AbstractOntopiaTestCase { - - public AbstractTopicMapTestCase(String name) { - super(name); - } - - public TopicIF getTopicById(TopicMapIF topicmap, String id) { - LocatorIF base = topicmap.getStore().getBaseAddress(); - return (TopicIF) - topicmap.getObjectByItemIdentifier(base.resolveAbsolute("#"+id)); - } - - protected TMObjectIF getObjectById(TopicMapIF topicmap, String id) { - LocatorIF base = topicmap.getStore().getBaseAddress(); - return (TMObjectIF) - topicmap.getObjectByItemIdentifier(base.resolveAbsolute("#"+id)); - } - - public TopicIF getTopicById(TopicMapIF topicmap, LocatorIF base, String id) { - return (TopicIF) - topicmap.getObjectByItemIdentifier(base.resolveAbsolute("#"+id)); - } - - public TMObjectIF getObjectById(TopicMapIF topicmap, LocatorIF base, String id) { - return topicmap.getObjectByItemIdentifier(base.resolveAbsolute("#"+id)); - } - -} diff --git a/sandbox/toma/src/test/java/net/ontopia/topicmaps/query/toma/AbstractTomaQueryTestCase.java b/sandbox/toma/src/test/java/net/ontopia/topicmaps/query/toma/AbstractTomaQueryTestCase.java deleted file mode 100644 index cd72fc524..000000000 --- a/sandbox/toma/src/test/java/net/ontopia/topicmaps/query/toma/AbstractTomaQueryTestCase.java +++ /dev/null @@ -1,404 +0,0 @@ - -package net.ontopia.topicmaps.query.toma; - -import java.io.File; -import java.io.IOException; -import java.util.ArrayList; -import java.util.Collections; -import java.util.HashMap; -import java.util.HashSet; -import java.util.List; -import java.util.Map; -import java.util.Set; - -import net.ontopia.infoset.core.LocatorIF; -import net.ontopia.infoset.impl.basic.URILocator; -import net.ontopia.topicmaps.core.TMObjectIF; -import net.ontopia.topicmaps.core.TopicIF; -import net.ontopia.topicmaps.core.TopicMapBuilderIF; -import net.ontopia.topicmaps.core.TopicMapIF; -import net.ontopia.topicmaps.core.TopicMapImporterIF; -import net.ontopia.topicmaps.impl.basic.InMemoryTopicMapStore; -import net.ontopia.topicmaps.query.core.DeclarationContextIF; -import net.ontopia.topicmaps.query.core.InvalidQueryException; -import net.ontopia.topicmaps.query.core.ParsedQueryIF; -import net.ontopia.topicmaps.query.core.QueryProcessorIF; -import net.ontopia.topicmaps.query.core.QueryResultIF; -import net.ontopia.topicmaps.query.toma.impl.basic.BasicQueryProcessor; -import net.ontopia.topicmaps.query.utils.QueryUtils; -import net.ontopia.topicmaps.AbstractTopicMapTestCase; -import net.ontopia.topicmaps.utils.ImportExportUtils; -import net.ontopia.topicmaps.xml.XTMTopicMapReader; - -@SuppressWarnings("unchecked") -public abstract class AbstractTomaQueryTestCase extends AbstractTopicMapTestCase { - - public LocatorIF base; - public TopicMapIF topicmap; - public TopicMapBuilderIF builder; - public QueryProcessorIF processor; - - public AbstractTomaQueryTestCase(String name) { - super(name); - } - - // ===== Helper methods (topic maps) - - protected TopicIF getTopicById(String id) { - return getTopicById(topicmap, base, id); - } - - protected TMObjectIF getObjectById(String id) { - return getObjectById(topicmap, base, id); - } - - protected void closeStore() { - if (topicmap != null) - topicmap.getStore().close(); - base = null; - topicmap = null; - builder = null; - processor = null; - } - - protected void load(String filename) throws IOException { - // IMPORTANT: This method is being overloaded by the RDBMS - // implementation to provide the right object implementations. - File file = new File(resolveFileName("query", filename)); - - InMemoryTopicMapStore store = new InMemoryTopicMapStore(); - topicmap = store.getTopicMap(); - builder = store.getTopicMap().getBuilder(); - base = new URILocator(file.toURL()); - - TopicMapImporterIF importer = ImportExportUtils.getImporter(file.toString()); - if (importer instanceof XTMTopicMapReader) - ((XTMTopicMapReader) importer).setValidation(false); - importer.importInto(topicmap); - - processor = new BasicQueryProcessor(topicmap); - } - - protected void makeEmpty() { - // IMPORTANT: This method is being overloaded by the RDBMS - // implementation to provide the right object implementations. - InMemoryTopicMapStore store = new InMemoryTopicMapStore(); - topicmap = store.getTopicMap(); - - builder = store.getTopicMap().getBuilder(); - processor = new BasicQueryProcessor(topicmap); - } - - // ===== Helper methods (query) - - public void addMatch(List matches) { - Map match = new HashMap(); - matches.add(match); - } - - public void addMatch(List matches, String var1, Object obj1) { - Map match = new HashMap(); - match.put(var1, obj1); - matches.add(match); - } - - public void addMatch(List matches, String var1, Object obj1, - String var2, Object obj2) { - Map match = new HashMap(); - match.put(var1, obj1); - match.put(var2, obj2); - matches.add(match); - } - - public void addMatch(List matches, String var1, Object obj1, - String var2, Object obj2, - String var3, Object obj3) { - Map match = new HashMap(); - match.put(var1, obj1); - match.put(var2, obj2); - match.put(var3, obj3); - matches.add(match); - } - - public void addMatch(List matches, String var1, Object obj1, - String var2, Object obj2, - String var3, Object obj3, - String var4, Object obj4) { - Map match = new HashMap(); - match.put(var1, obj1); - match.put(var2, obj2); - match.put(var3, obj3); - match.put(var4, obj4); - matches.add(match); - } - - /** - * Tests whether the given query returns a single row with no columns, - * i.e. a query match with no unbound variables. - * @param query The query to and test. - */ - protected void verifyQuery(String query) throws InvalidQueryException { - // verify that we do not get any parse or query errors - QueryResultIF result = processor.execute(query); - try { - assertTrue(result.next()); - assertEquals(0, result.getWidth()); - assertFalse(result.next()); - } finally { - result.close(); - } - } - - protected void verifyQuery(List matches, String query) - throws InvalidQueryException { - verifyQuery(matches, query, null, null); - } - - protected void verifyQuery(List matches, String query, Map args) - throws InvalidQueryException { - verifyQuery(matches, query, null, args); - } - - protected void verifyQuery(List matches, String query, String ruleset) - throws InvalidQueryException { - verifyQuery(matches, query, ruleset, null); - } - - @SuppressWarnings("deprecation") - protected void verifyQuery(List matches, String query, String ruleset, Map args) - throws InvalidQueryException { - - matches = new ArrayList(matches); // avoid modifying caller's list - - if (ruleset != null) - processor.load(ruleset); - - QueryResultIF result = null; - if (args != null) - result = processor.parse(query).execute(args); - else - result = processor.execute(query); - - //! System.out.println("____QUERY: " + query); - //! System.out.println(" MATCHES: " + matches); - //! int i=0; - try { - while (result.next()) { - //! i++; - //! System.out.println(" ROW " + i + ": " + Arrays.asList(result.getValues())); - Map match = getMatch(result); - assertTrue("match not found in expected results: " + match + " => " + matches, - matches.contains(match)); - matches.remove(match); - //! System.out.println("____removing: " + match); - } - } finally { - result.close(); - } - assertTrue("expected matches not found: " + matches, - matches.isEmpty()); - } - - protected void verifyQueryExists(List matches, String query) - throws InvalidQueryException { - - matches = new ArrayList(matches); // avoid modifying caller's list - - QueryResultIF result = null; - result = processor.execute(query); - - //! System.out.println("____QUERY: " + query); - //! System.out.println(" MATCHES: " + matches); - //! int i=0; - try { - while (result.next()) { - //! i++; - //! System.out.println(" ROW " + i + ": " + Arrays.asList(result.getValues())); - Map match = getMatch(result); - assertTrue("match not found in expected results: " + match + " => " + matches, - matches.contains(match)); - matches.remove(match); - //! System.out.println("____removing: " + match); - } - } finally { - result.close(); - } - } - - protected void verifyQuerySubset(List matches, String query) - throws InvalidQueryException { - verifyQuerySubset(matches, query, null, null); - } - - protected void verifyQuerySubset(List matches, String query, Map args) - throws InvalidQueryException { - verifyQuerySubset(matches, query, null, args); - } - - protected void verifyQuerySubset(List matches, String query, String ruleset) - throws InvalidQueryException { - verifyQuerySubset(matches, query, ruleset, null); - } - - @SuppressWarnings("deprecation") - protected void verifyQuerySubset(List matches, String query, String ruleset, Map args) - throws InvalidQueryException { - - matches = new ArrayList(matches); // avoid modifying caller's list - - if (ruleset != null) - processor.load(ruleset); - - QueryResultIF result = null; - if (args != null) - result = processor.parse(query).execute(args); - else - result = processor.execute(query); - - //! System.out.println("____QUERY: " + query); - //! System.out.println(" MATCHES: " + matches); - //! int i=0; - try { - while (result.next()) { - //! i++; - //! System.out.println(" ROW " + i + ": " + Arrays.asList(result.getValues())); - Map match = getMatch(result); - matches.remove(match); - //! System.out.println("____removing: " + match); - } - } finally { - result.close(); - } - assertTrue("expected matches not found: " + matches, - matches.isEmpty()); - } - - protected void verifyQueryPre(List matches, String decls, String query) - throws InvalidQueryException { - - // parse the declarations - DeclarationContextIF context = QueryUtils.parseDeclarations(topicmap, decls); - - // run the query - QueryResultIF result = processor.execute(query, context); - - //! System.out.println("____QUERY: " + query); - //! System.out.println(" MATCHES: " + matches); - //! int i=0; - try { - while (result.next()) { - //! i++; - //! System.out.println(" ROW " + i + ": " + Arrays.asList(result.getValues())); - Map match = getMatch(result); - assertTrue("match not found in expected results: " + match + " => " + matches, - matches.contains(match)); - matches.remove(match); - //! System.out.println("____removing: " + match); - } - } finally { - result.close(); - } - - assertTrue("expected matches not found: " + matches, - matches.isEmpty()); - } - - protected void verifyQueryOrder(List matches, String query) - throws InvalidQueryException { - - int pos = 0; - QueryResultIF result = processor.execute(query); - try { - while (result.next()) { - Map match = getMatch(result); - assertTrue("match not found in position " + pos + ": " + match + " => " + matches, - matches.get(pos).equals(match)); - pos++; - } - } finally { - result.close(); - } - - assertTrue("bad number of matches returned: " + pos, - matches.size() == pos); - } - - protected void findAny(String query) throws InvalidQueryException { - // verify that we do not get any parse or query errors - QueryResultIF result = processor.execute(query); - try { - while (result.next()) { - // just loop over rows for the sake of it - } - } finally { - result.close(); - } - } - - protected void findNothing(String query) throws InvalidQueryException { - QueryResultIF result = processor.execute(query); - try { - assertTrue("found values, but shouldn't have", - !result.next()); - } finally { - result.close(); - } - } - - protected void findNothing(String query, Map args) throws InvalidQueryException { - QueryResultIF result = processor.execute(query, args); - try { - assertTrue("found values, but shouldn't have", - !result.next()); - } finally { - result.close(); - } -} - - protected void getParseError(String query) { - getParseError(query, Collections.EMPTY_MAP); - } - - protected void getParseError(String query, Map parameters) { - QueryResultIF result = null; - try { - result = processor.execute(query, parameters); - fail("query '" + query + "' parsed OK, but shouldn't have"); - } catch (InvalidQueryException e) { - } finally { - if (result != null) result.close(); - } - } - - public ParsedQueryIF parse(String query) throws InvalidQueryException { - return processor.parse(query); - } - - public Map getMatch(QueryResultIF result) { - Map match = new HashMap(); - for (int ix = 0; ix < result.getWidth(); ix++) { - String vname = result.getColumnName(ix); - match.put(vname, result.getValue(ix)); - } - return match; - } - - public Set getMatchSet(QueryResultIF result) { - Set match = new HashSet(); - for (int ix = 0; ix < result.getWidth(); ix++) - match.add(result.getValue(ix)); - return match; - } - - public Map makeArguments(String argument, String value) { - Map args = new HashMap(); - args.put(argument, getTopicById(value)); - return args; - } - - public Map makeArguments(String argument, TMObjectIF value) { - Map args = new HashMap(); - args.put(argument, value); - return args; - } -} diff --git a/sandbox/toma/src/test/java/net/ontopia/topicmaps/query/toma/AggregateFunctionTest.java b/sandbox/toma/src/test/java/net/ontopia/topicmaps/query/toma/AggregateFunctionTest.java deleted file mode 100644 index f23abc8ee..000000000 --- a/sandbox/toma/src/test/java/net/ontopia/topicmaps/query/toma/AggregateFunctionTest.java +++ /dev/null @@ -1,116 +0,0 @@ -package net.ontopia.topicmaps.query.toma; - -import java.io.IOException; -import java.util.ArrayList; -import java.util.List; - -import net.ontopia.topicmaps.query.core.InvalidQueryException; -import net.ontopia.topicmaps.query.impl.basic.QueryMatches; - -@SuppressWarnings("unchecked") -public class AggregateFunctionTest extends AbstractTomaQueryTestCase { - - public AggregateFunctionTest(String name) { - super(name); - } - - /// context management - - public void setUp() { - QueryMatches.initialSize = 1; - } - - public void tearDown() { - closeStore(); - } - - /// checking query structure - - public void testCount() throws InvalidQueryException, IOException { - load("full.ltm"); - - List matches = new ArrayList(); - addMatch(matches, "COUNT($T)", new Integer(2)); - - verifyQuery(matches, "select count($t) where $t.type(1) = format;"); - } - - public void testSum() throws InvalidQueryException, IOException { - load("full.ltm"); - - List matches = new ArrayList(); - addMatch(matches, "SUM($T.OC(i'pages'))", new Double(200)); - - verifyQuery(matches, - "select sum($t.oc(pages)) where $t.type = standard and exists $t.oc(pages);"); - } - - public void testMin() throws InvalidQueryException, IOException { - load("full.ltm"); - - List matches = new ArrayList(); - addMatch(matches, "MIN($T.OC(i'pages'))", new Double(80)); - - verifyQuery(matches, - "select min($t.oc(pages)) where $t.type = standard and exists $t.oc(pages);"); - } - - public void testMax() throws InvalidQueryException, IOException { - load("full.ltm"); - - List matches = new ArrayList(); - addMatch(matches, "MAX($T.OC(i'pages'))", new Double(120)); - - verifyQuery(matches, - "select max($t.oc(pages)) where $t.type = standard and exists $t.oc(pages);"); - } - - public void testAvg() throws InvalidQueryException, IOException { - load("full.ltm"); - - List matches = new ArrayList(); - addMatch(matches, "AVG($T.OC(i'pages'))", new Double(100)); - - verifyQuery(matches, - "select avg($t.oc(pages)) where $t.type = standard and exists $t.oc(pages);"); - } - - public void testGroupedAggregation() throws InvalidQueryException, - IOException { - load("full.ltm"); - - List matches = new ArrayList(); - addMatch(matches, "$P", getTopicById("ontopia"), "COUNT($C)", new Integer(2)); - addMatch(matches, "$P", getTopicById("tinytim"), "COUNT($C)", new Integer(1)); - - verifyQuery(matches, - "select $P, count($c) where $p.(project)<-(contributes-to)->(person) = $c;"); - } - - public void testCombinedAggregate() throws InvalidQueryException, IOException { - load("full.ltm"); - - List matches = new ArrayList(); - addMatch(matches, "SUM($T.OC(i'pages'))", new Double(200), "COUNT($T)", - new Integer(2)); - - verifyQuery( - matches, - "select sum($t.oc(pages)), count($t) where $t.type = standard and exists $t.oc(pages);"); - } - - public void testConcat() throws InvalidQueryException, IOException { - load("family.ltm"); - - // this test creates a permutation of the possible - // result (as sorting is done after aggregating), and checks if the actual - // result is within the available matches. - List matches = new ArrayList(); - addMatch(matches, "CONCAT($T.NAME,',')", "Edvin Garshol,Petter Garshol"); - addMatch(matches, "CONCAT($T.NAME,',')", "Petter Garshol,Edvin Garshol"); - - verifyQueryExists( - matches, - "select concat($t.name, ',') where $t.type = father and $t.name ~ '(Edvin|Petter).*Garshol';"); - } -} diff --git a/sandbox/toma/src/test/java/net/ontopia/topicmaps/query/toma/AndTest.java b/sandbox/toma/src/test/java/net/ontopia/topicmaps/query/toma/AndTest.java deleted file mode 100644 index 4535e9e26..000000000 --- a/sandbox/toma/src/test/java/net/ontopia/topicmaps/query/toma/AndTest.java +++ /dev/null @@ -1,47 +0,0 @@ -package net.ontopia.topicmaps.query.toma; - -import java.io.IOException; -import java.util.ArrayList; -import java.util.List; - -import net.ontopia.topicmaps.query.core.InvalidQueryException; -import net.ontopia.topicmaps.query.impl.basic.QueryMatches; - -@SuppressWarnings("unchecked") -public class AndTest extends AbstractTomaQueryTestCase { - - public AndTest(String name) { - super(name); - } - - /// context management - - public void setUp() { - QueryMatches.initialSize = 1; - } - - public void tearDown() { - closeStore(); - } - - /// and tests - - public void testSimpleAnd() throws InvalidQueryException, IOException { - load("full.ltm"); - - List matches = new ArrayList(); - addMatch(matches, "$T", getTopicById("tn")); - - verifyQuery(matches, "select $t where $t.type = person and $t.name !~ 'Lars';"); - } - - public void testCombineTwoVariable() throws InvalidQueryException, IOException { - load("full.ltm"); - - List matches = new ArrayList(); - addMatch(matches, "$T", getTopicById("xtm-standard")); - addMatch(matches, "$T", getTopicById("ltm-standard")); - - verifyQuery(matches, "select $t where $s = standard and $t.type = $s and not exists $t.name@fullname;"); - } -} diff --git a/sandbox/toma/src/test/java/net/ontopia/topicmaps/query/toma/AssociationTest.java b/sandbox/toma/src/test/java/net/ontopia/topicmaps/query/toma/AssociationTest.java deleted file mode 100644 index 7e2cc152a..000000000 --- a/sandbox/toma/src/test/java/net/ontopia/topicmaps/query/toma/AssociationTest.java +++ /dev/null @@ -1,110 +0,0 @@ -package net.ontopia.topicmaps.query.toma; - -import java.io.IOException; -import java.util.ArrayList; -import java.util.List; - -import net.ontopia.topicmaps.query.core.InvalidQueryException; -import net.ontopia.topicmaps.query.impl.basic.QueryMatches; - -@SuppressWarnings("unchecked") -public class AssociationTest extends AbstractTomaQueryTestCase { - - public AssociationTest(String name) { - super(name); - } - - /// context management - - public void setUp() { - QueryMatches.initialSize = 1; - } - - public void tearDown() { - closeStore(); - } - - /// association tests - - public void testSimpleAssociation() throws InvalidQueryException, IOException { - load("full.ltm"); - - List matches = new ArrayList(); - addMatch(matches, "$T", getTopicById("xtm")); - addMatch(matches, "$T", getTopicById("ltm")); - - verifyQuery(matches, "select $t where (format-for)->(format) = $t;"); - } - - public void testAssociationWithTwoRoles() throws InvalidQueryException, IOException { - load("full.ltm"); - - List matches = new ArrayList(); - addMatch(matches, "$T", getTopicById("tn")); - addMatch(matches, "$T", getTopicById("lmg")); - - verifyQuery(matches, "select $t where ontopia.(project)<-(contributes-to)->(person) = $t;"); - } - - public void testAssociationWithScope() throws InvalidQueryException, IOException { - load("full.ltm"); - - List matches = new ArrayList(); - addMatch(matches, "$T", getTopicById("tn")); - - verifyQuery(matches, "select $t where ontopia.(project)<-(contributes-to)@(year2009)->(person) = $t;"); - } - - public void testAssociationPlayer() throws InvalidQueryException, IOException { - load("full.ltm"); - - List matches = new ArrayList(); - addMatch(matches, "$A.PLAYER", getTopicById("tn")); - addMatch(matches, "$A.PLAYER", getTopicById("lmg")); - addMatch(matches, "$A.PLAYER", getTopicById("ontopia")); - addMatch(matches, "$A.PLAYER", getTopicById("ontopia")); - addMatch(matches, "$A.PLAYER", getTopicById("lh")); - addMatch(matches, "$A.PLAYER", getTopicById("tinytim")); - - verifyQuery(matches, "select $a.player where exists $a(contributes-to)->($$);"); - } - - public void testDistinctAssociationPlayer() throws InvalidQueryException, IOException { - load("full.ltm"); - - List matches = new ArrayList(); - addMatch(matches, "$A.PLAYER", getTopicById("tn")); - addMatch(matches, "$A.PLAYER", getTopicById("lmg")); - addMatch(matches, "$A.PLAYER", getTopicById("lh")); - addMatch(matches, "$A.PLAYER", getTopicById("tinytim")); - addMatch(matches, "$A.PLAYER", getTopicById("ontopia")); - - verifyQuery(matches, "select distinct $a.player where exists $a(contributes-to)->($$);"); - } - - public void testChainedAssociation() throws InvalidQueryException, IOException { - load("full.ltm"); - - List matches = new ArrayList(); - addMatch(matches, "$T", getTopicById("ltm-standard")); - addMatch(matches, "$T", getTopicById("xtm-standard")); - - // get all the standards that are implemented by the project, tn contributes to - verifyQuery( - matches, - "select $t where tn.($$)<-$a(contributes-to)->(project).($$)<-(implements)->(standard) = $t;"); - } - - public void testTypeAssignment() throws InvalidQueryException, IOException { - load("full.ltm"); - - List matches = new ArrayList(); - addMatch(matches, "$ATYPE", getTopicById("contributes-to"), "$ROLE", - getTopicById("person"), "$PLAYER", getTopicById("tn")); - - verifyQuery( - matches, - "select $atype, $role, $player where exists ($atype)->($role)[$player] and $player = tn;"); - } - -} diff --git a/sandbox/toma/src/test/java/net/ontopia/topicmaps/query/toma/ComparisonTest.java b/sandbox/toma/src/test/java/net/ontopia/topicmaps/query/toma/ComparisonTest.java deleted file mode 100644 index 7a83f344a..000000000 --- a/sandbox/toma/src/test/java/net/ontopia/topicmaps/query/toma/ComparisonTest.java +++ /dev/null @@ -1,126 +0,0 @@ -package net.ontopia.topicmaps.query.toma; - -import java.io.IOException; -import java.util.ArrayList; -import java.util.List; - -import net.ontopia.topicmaps.query.core.InvalidQueryException; -import net.ontopia.topicmaps.query.impl.basic.QueryMatches; - -@SuppressWarnings("unchecked") -public class ComparisonTest extends AbstractTomaQueryTestCase { - - public ComparisonTest(String name) { - super(name); - } - - /// context management - - public void setUp() { - QueryMatches.initialSize = 1; - } - - public void tearDown() { - closeStore(); - } - - /// comparison tests - - public void testEquals() throws InvalidQueryException, IOException { - load("full.ltm"); - - List matches = new ArrayList(); - addMatch(matches, "$T", getTopicById("xtm")); - - verifyQuery(matches, "select $t where $t = i'xtm';"); - } - - public void testNotEquals() throws InvalidQueryException, IOException { - load("full.ltm"); - - List matches = new ArrayList(); - addMatch(matches, "$T", getTopicById("ltm")); - - verifyQuery(matches, "select $t where $t.type = format and $t != i'xtm';"); - } - - public void testLessThan() throws InvalidQueryException, IOException { - load("full.ltm"); - - List matches = new ArrayList(); - addMatch(matches, "$T", getTopicById("ltm-standard")); - - verifyQuery(matches, "select $t where $t.oc(pages) < '100';"); - } - - public void testLessThanEquals() throws InvalidQueryException, IOException { - load("full.ltm"); - - List matches = new ArrayList(); - addMatch(matches, "$T", getTopicById("ltm-standard")); - - verifyQuery(matches, "select $t where $t.oc(pages) <= '80';"); - } - - public void testGreaterThan() throws InvalidQueryException, IOException { - load("full.ltm"); - - List matches = new ArrayList(); - addMatch(matches, "$T", getTopicById("xtm-standard")); - - verifyQuery(matches, "select $t where $t.oc(pages) > '100';"); - } - - public void testGreaterThanEquals() throws InvalidQueryException, IOException { - load("full.ltm"); - - List matches = new ArrayList(); - addMatch(matches, "$T", getTopicById("xtm-standard")); - - verifyQuery(matches, "select $t where $t.oc(pages) >= '120';"); - } - - public void testRegExp() throws InvalidQueryException, IOException { - load("full.ltm"); - - List matches = new ArrayList(); - addMatch(matches, "$T", getTopicById("xtm-standard")); - addMatch(matches, "$T", getTopicById("ltm-standard")); - - verifyQuery(matches, "select $t where $t.name ~ '.*standard';"); - } - - public void testRegExpCaseInsensitive() throws InvalidQueryException, - IOException { - load("full.ltm"); - - List matches = new ArrayList(); - addMatch(matches, "$T", getTopicById("standard")); - addMatch(matches, "$T", getTopicById("xtm-standard")); - addMatch(matches, "$T", getTopicById("ltm-standard")); - - verifyQuery(matches, "select $t where $t.name ~* '.*STANDARD';"); - } - - public void testNotRegExp() throws InvalidQueryException, - IOException { - load("full.ltm"); - - List matches = new ArrayList(); - addMatch(matches, "$T", getTopicById("ltm-standard")); - addMatch(matches, "$T", getTopicById("topic-maps")); - - verifyQuery(matches, "select $t where $t.type = standard and $t.name !~ 'XTM';"); - } - - public void testNotRegExpCaseInsensitive() throws InvalidQueryException, IOException { - load("full.ltm"); - - List matches = new ArrayList(); - addMatch(matches, "$T", getTopicById("ltm-standard")); - addMatch(matches, "$T", getTopicById("topic-maps")); - - verifyQuery(matches, - "select $t where $t.type = standard and $t.name !~* 'xtm';"); - } -} diff --git a/sandbox/toma/src/test/java/net/ontopia/topicmaps/query/toma/FunctionTest.java b/sandbox/toma/src/test/java/net/ontopia/topicmaps/query/toma/FunctionTest.java deleted file mode 100644 index 12668ac26..000000000 --- a/sandbox/toma/src/test/java/net/ontopia/topicmaps/query/toma/FunctionTest.java +++ /dev/null @@ -1,94 +0,0 @@ -package net.ontopia.topicmaps.query.toma; - -import java.io.IOException; -import java.util.ArrayList; -import java.util.List; - -import net.ontopia.topicmaps.query.core.InvalidQueryException; -import net.ontopia.topicmaps.query.impl.basic.QueryMatches; - -@SuppressWarnings("unchecked") -public class FunctionTest extends AbstractTomaQueryTestCase { - - public FunctionTest(String name) { - super(name); - } - - /// context management - - public void setUp() { - QueryMatches.initialSize = 1; - } - - public void tearDown() { - closeStore(); - } - - /// function tests - - public void testLowercase() throws InvalidQueryException, IOException { - load("full.ltm"); - - List matches = new ArrayList(); - addMatch(matches, "$T", getTopicById("format")); - - verifyQuery(matches, "select $t where lowercase($t.name) = 'format';"); - } - - public void testUppercase() throws InvalidQueryException, IOException { - load("full.ltm"); - - List matches = new ArrayList(); - addMatch(matches, "$T", getTopicById("format")); - - verifyQuery(matches, "select $t where uppercase($t.name) = 'FORMAT';"); - } - - public void testTitlecase() throws InvalidQueryException, IOException { - load("full.ltm"); - - List matches = new ArrayList(); - addMatch(matches, "$T", getTopicById("format-for")); - - verifyQuery(matches, "select $t where titlecase($t.name) = 'Format For';"); - } - - public void testToNum() throws InvalidQueryException, IOException { - load("full.ltm"); - - List matches = new ArrayList(); - addMatch(matches, "TO_NUM($T.OC(i'mass'))", "2.0"); - - verifyQuery(matches, "select to_num($t.oc(mass)) where $t = xtm-standard;"); - } - - public void testSubstr() throws InvalidQueryException, IOException { - load("full.ltm"); - - List matches = new ArrayList(); - addMatch(matches, "SUBSTR($T.NAME,'1','3')", "XTM"); - addMatch(matches, "SUBSTR($T.NAME,'1','3')", "The"); - - verifyQuery(matches, "select substr($t.name, 1, 3) where $t.type = format;"); - } - - public void testTrim() throws InvalidQueryException, IOException { - load("full.ltm"); - - List matches = new ArrayList(); - addMatch(matches, "TRIM($T.NAME,'BOTH',' Project')", "Ontopia"); - addMatch(matches, "TRIM($T.NAME,'BOTH',' Project')", "TinyTIM"); - - verifyQuery(matches, "select trim($t.name, BOTH, ' Project') where $t.type = project;"); - } - - public void testLength() throws InvalidQueryException, IOException { - load("full.ltm"); - - List matches = new ArrayList(); - addMatch(matches, "LENGTH(TRIM($T.NAME,'BOTH',' Project'))", "7"); - addMatch(matches, "LENGTH(TRIM($T.NAME,'BOTH',' Project'))", "7"); - - verifyQuery(matches, "select length(trim($t.name, BOTH, ' Project')) where $t.type = project;"); - } -} diff --git a/sandbox/toma/src/test/java/net/ontopia/topicmaps/query/toma/InTest.java b/sandbox/toma/src/test/java/net/ontopia/topicmaps/query/toma/InTest.java deleted file mode 100644 index 211fd1ea9..000000000 --- a/sandbox/toma/src/test/java/net/ontopia/topicmaps/query/toma/InTest.java +++ /dev/null @@ -1,87 +0,0 @@ -package net.ontopia.topicmaps.query.toma; - -import java.io.IOException; -import java.util.ArrayList; -import java.util.List; - -import net.ontopia.topicmaps.query.core.InvalidQueryException; -import net.ontopia.topicmaps.query.impl.basic.QueryMatches; - -@SuppressWarnings("unchecked") -public class InTest extends AbstractTomaQueryTestCase { - - public InTest(String name) { - super(name); - } - - /// context management - - public void setUp() { - QueryMatches.initialSize = 1; - } - - public void tearDown() { - closeStore(); - } - - /// IN tests - - public void testSimpleIN() throws InvalidQueryException, IOException { - load("full.ltm"); - - List matches = new ArrayList(); - addMatch(matches, "$T", getTopicById("format")); - addMatch(matches, "$T", getTopicById("standard")); - - verifyQuery( - matches, - "select $t where $t IN (format, standard);"); - } - - public void testDifferentTypes() throws InvalidQueryException, IOException { - load("full.ltm"); - - String query = "select $T where $T IN (format.instance, 'XTM standard');"; - try { - processor.execute(query); - fail("accepted invalid IN query."); - } catch (InvalidQueryException e) { - } - } - - public void testComplexIN() throws InvalidQueryException, IOException { - load("full.ltm"); - - List matches = new ArrayList(); - addMatch(matches, "$T", getTopicById("xtm")); - addMatch(matches, "$T", getTopicById("ltm")); - addMatch(matches, "$T", getTopicById("xtm-standard")); - - verifyQuery( - matches, - "select $t where $s.name = 'XTM standard' and $t IN (format.instance, $s);"); - } - - public void testStringIN() throws InvalidQueryException, IOException { - load("full.ltm"); - - List matches = new ArrayList(); - addMatch(matches, "$T", getTopicById("xtm-standard")); - addMatch(matches, "$T", getTopicById("ltm-standard")); - - verifyQuery( - matches, - "select $t where $t.name IN ('XTM standard', 'LTM standard');"); - } - - public void testSubSelect() throws InvalidQueryException, IOException { - load("full.ltm"); - - List matches = new ArrayList(); - addMatch(matches, "$T", getTopicById("standard")); - - verifyQuery( - matches, - "select $t where $t.instance IN (select $n where $n.type = standard);"); - } -} diff --git a/sandbox/toma/src/test/java/net/ontopia/topicmaps/query/toma/OrTest.java b/sandbox/toma/src/test/java/net/ontopia/topicmaps/query/toma/OrTest.java deleted file mode 100644 index 3e1e1001f..000000000 --- a/sandbox/toma/src/test/java/net/ontopia/topicmaps/query/toma/OrTest.java +++ /dev/null @@ -1,38 +0,0 @@ -package net.ontopia.topicmaps.query.toma; - -import java.io.IOException; -import java.util.ArrayList; -import java.util.List; - -import net.ontopia.topicmaps.query.core.InvalidQueryException; -import net.ontopia.topicmaps.query.impl.basic.QueryMatches; - -@SuppressWarnings("unchecked") -public class OrTest extends AbstractTomaQueryTestCase { - - public OrTest(String name) { - super(name); - } - - /// context management - - public void setUp() { - QueryMatches.initialSize = 1; - } - - public void tearDown() { - closeStore(); - } - - /// or tests - - public void testSimpleOr() throws InvalidQueryException, IOException { - load("full.ltm"); - - List matches = new ArrayList(); - addMatch(matches, "$T", getTopicById("ltm-standard")); - addMatch(matches, "$T", getTopicById("xtm-standard")); - - verifyQuery(matches, "select $t where $t.oc(version) = '1.2' or $t.oc(pages) = '120';"); - } -} diff --git a/sandbox/toma/src/test/java/net/ontopia/topicmaps/query/toma/ParsedQueryTest.java b/sandbox/toma/src/test/java/net/ontopia/topicmaps/query/toma/ParsedQueryTest.java deleted file mode 100644 index 50cb76e76..000000000 --- a/sandbox/toma/src/test/java/net/ontopia/topicmaps/query/toma/ParsedQueryTest.java +++ /dev/null @@ -1,101 +0,0 @@ -package net.ontopia.topicmaps.query.toma; - -import java.io.IOException; -import java.util.Collection; -import java.util.List; - -import net.ontopia.topicmaps.query.core.InvalidQueryException; -import net.ontopia.topicmaps.query.core.ParsedQueryIF; -import net.ontopia.topicmaps.query.impl.basic.QueryMatches; - -public class ParsedQueryTest extends AbstractTomaQueryTestCase { - - public ParsedQueryTest(String name) { - super(name); - } - - /// context management - - public void setUp() { - QueryMatches.initialSize = 1; - } - - public void tearDown() { - closeStore(); - } - - /// checking query structure - - public void testSimpleQuery() throws InvalidQueryException { - makeEmpty(); - ParsedQueryIF query = parse("select $T where exists $T;"); - List vars = query.getSelectedVariables(); - - assertTrue("bad number of variables in selected variables", vars.size() == 1); - assertTrue("selected variables does not contain T: " + vars, vars.contains("T")); - closeStore(); - } - - public void testSimpleQuery2() throws InvalidQueryException { - makeEmpty(); - ParsedQueryIF query = parse("select $A, $B where exists $A and exists $B;"); - List vars = query.getSelectedVariables(); - - assertTrue("bad number of variables in selected variables", vars.size() == 2); - assertTrue("selected variables does not contain A in first position", - vars.get(0).equals("A")); - assertTrue("selected variables does not contain B in second position", - vars.get(1).equals("B")); - closeStore(); - } - - public void testSimpleCount() throws InvalidQueryException { - makeEmpty(); - ParsedQueryIF query = parse("select count($B) where $A.instance(1) = $B;"); - Collection vars = query.getCountedVariables(); - assertTrue("bad number of variables in counted variables", vars.size() == 1); - assertTrue("selected variables does not contain B", vars.contains("B")); - closeStore(); - } - - public void testNoCount() throws InvalidQueryException { - makeEmpty(); - ParsedQueryIF query = parse("select $A, $B where $A.instance(1) = $B;"); - Collection vars = query.getCountedVariables(); - assertTrue("bad number of variables in counted variables", vars.size() == 0); - closeStore(); - } - - public void testAllVariables() throws InvalidQueryException, IOException { - load("family.ltm"); - ParsedQueryIF query = parse("select $A, $B where $A.instance(1) = $B;"); - Collection vars = query.getAllVariables(); - assertTrue("bad number of variables in all variables", vars.size() == 2); - assertTrue("all variables does not contain A", vars.contains("A")); - assertTrue("all variables does not contain B", vars.contains("B")); - closeStore(); - } - - public void testOrderBy() throws InvalidQueryException, IOException { - load("family.ltm"); - ParsedQueryIF query = parse("select $A, $B where $A.instance(1) = $B order by 2, 1;"); - List vars = query.getOrderBy(); - assertTrue("bad number of variables in order by variables", - vars.size() == 2); - assertTrue("order by variables does not contain B in first position", - vars.get(0).equals("B")); - assertTrue("order by variables does not contain A in second position", - vars.get(1).equals("A")); - closeStore(); - } - - public void testOrderByAscending() throws InvalidQueryException, IOException { - load("family.ltm"); - ParsedQueryIF query = parse("select $A, $B where $A.instance(1) = $B order by 2 desc, 1;"); - assertTrue("B is ordered descending, not ascending", - !query.isOrderedAscending("B")); - assertTrue("A is ordered ascending, not descending", - query.isOrderedAscending("A")); - closeStore(); - } -} diff --git a/sandbox/toma/src/test/java/net/ontopia/topicmaps/query/toma/PathExpressionTest.java b/sandbox/toma/src/test/java/net/ontopia/topicmaps/query/toma/PathExpressionTest.java deleted file mode 100644 index cb448b60f..000000000 --- a/sandbox/toma/src/test/java/net/ontopia/topicmaps/query/toma/PathExpressionTest.java +++ /dev/null @@ -1,185 +0,0 @@ -package net.ontopia.topicmaps.query.toma; - -import java.io.IOException; -import java.util.ArrayList; -import java.util.Collection; -import java.util.List; - -import net.ontopia.topicmaps.core.TopicNameIF; -import net.ontopia.topicmaps.query.core.InvalidQueryException; -import net.ontopia.topicmaps.query.impl.basic.QueryMatches; - -@SuppressWarnings("unchecked") -public class PathExpressionTest extends AbstractTomaQueryTestCase { - - public PathExpressionTest(String name) { - super(name); - } - - /// context management - - public void setUp() { - QueryMatches.initialSize = 1; - } - - public void tearDown() { - closeStore(); - } - - /// id path expressions - - public void testID() throws InvalidQueryException, IOException { - load("full.ltm"); - - List matches = new ArrayList(); - addMatch(matches, "$T.ID", getTopicById("ontopia").getItemIdentifiers().iterator().next()); - - verifyQuery(matches, "select $t.id where $t.id = 'ontopia';"); - } - - /// name path expressions - - public void testName() throws InvalidQueryException, IOException { - load("full.ltm"); - - List matches = new ArrayList(); - addMatch(matches, "$T.NAME", getTopicById("ontopia").getTopicNames().iterator().next()); - - verifyQuery(matches, "select $t.name where $t.name = 'Ontopia Project';"); - } - - public void testNonExistantName() throws InvalidQueryException, IOException { - load("full.ltm"); - - findNothing("select $t.name where $t.name@blabla = 'Ontopia Project';"); - findNothing("select $t.name where $t.name(myname) = 'Ontopia Project';"); - } - - /// variant path expressions - - public void testVariant() throws InvalidQueryException, IOException { - load("full.ltm"); - - List matches = new ArrayList(); - Collection topicNames = getTopicById("ltm").getTopicNames(); - for (Object o : topicNames) { - TopicNameIF name = (TopicNameIF) o; - for (Object var : name.getVariants()) { - addMatch(matches, "$T.NAME.VAR", var); - } - } - - verifyQuery(matches, "select $t.name.var where $t.name = 'The linear topic map notation';"); - } - - public void testVariantWithScope() throws InvalidQueryException, IOException { - load("full.ltm"); - - List matches = new ArrayList(); - addMatch(matches, "$T", getTopicById("ltm")); - - verifyQuery(matches, "select $t where exists $t.name.var@german;"); - } - - /// occurrence path expressions - - public void testOccurrence() throws InvalidQueryException, IOException { - load("full.ltm"); - - List matches = new ArrayList(); - addMatch(matches, "$T.OC", getTopicById("ontopia").getOccurrences().iterator().next()); - - verifyQuery(matches, "select $t.oc where $t = i'ontopia';"); - } - - public void testTypedOccurrence() throws InvalidQueryException, IOException { - load("full.ltm"); - - List matches = new ArrayList(); - addMatch(matches, "$T", getTopicById("ltm")); - addMatch(matches, "$T", getTopicById("topic-maps")); - - verifyQuery(matches, "select $t where exists $t.oc(specification);"); - } - - /// subject indicator path expressions - - public void testSubjectIndicator() throws InvalidQueryException, IOException { - load("full.ltm"); - - List matches = new ArrayList(); - addMatch(matches, "$T.SI", getTopicById("ltm").getSubjectIdentifiers().iterator().next()); - - verifyQuery(matches, "select $t.si where $t = i'ltm';"); - } - - /// scope path expressions - - public void testScope() throws InvalidQueryException, IOException { - load("full.ltm"); - - List matches = new ArrayList(); - addMatch(matches, "$T", getTopicById("topic-maps")); - - verifyQuery(matches, "select $t where exists $t.name.sc;"); - } - - /// player path expressions - - public void testPlayer() throws InvalidQueryException, IOException { - load("full.ltm"); - - List matches = new ArrayList(); - addMatch(matches, "$A.PLAYER", getTopicById("topic-maps")); - addMatch(matches, "$A.PLAYER", getTopicById("ltm")); - addMatch(matches, "$A.PLAYER", getTopicById("xtm")); - - verifyQuery(matches, "select distinct $a.player where exists $a(format-for)->($$);"); - } - - /// role path expressions - - public void testRole() throws InvalidQueryException, IOException { - load("full.ltm"); - - List matches = new ArrayList(); - addMatch(matches, "$A.ROLE", getTopicById("format")); - addMatch(matches, "$A.ROLE", getTopicById("standard")); - - verifyQuery(matches, "select distinct $a.role where exists $a(format-for)->($$);"); - } - - /// reifier path expressions - - public void testReifier() throws InvalidQueryException, IOException { - load("full.ltm"); - - List matches = new ArrayList(); - addMatch(matches, "$A.REIFIER", getTopicById("xtm-standard")); - - verifyQuery(matches, "select $a.reifier where $a(format-for)->(format) = i'xtm';"); - } - - /// type path expressions - - public void testType() throws InvalidQueryException, IOException { - load("full.ltm"); - - List matches = new ArrayList(); - addMatch(matches, "$T.TYPE", getTopicById("format")); - - verifyQuery(matches, "select $t.type(1) where $t = i'xtm';"); - } - - /// instance path expressions - - public void testInstance() throws InvalidQueryException, IOException { - load("full.ltm"); - - List matches = new ArrayList(); - addMatch(matches, "$T.INSTANCE", getTopicById("xtm")); - addMatch(matches, "$T.INSTANCE", getTopicById("ltm")); - - verifyQuery(matches, "select $t.instance(1) where $t = i'format';"); - } -} diff --git a/sandbox/toma/src/test/java/net/ontopia/topicmaps/query/toma/QueryProcessorTest.java b/sandbox/toma/src/test/java/net/ontopia/topicmaps/query/toma/QueryProcessorTest.java deleted file mode 100644 index 0210379ef..000000000 --- a/sandbox/toma/src/test/java/net/ontopia/topicmaps/query/toma/QueryProcessorTest.java +++ /dev/null @@ -1,161 +0,0 @@ -package net.ontopia.topicmaps.query.toma; - -import java.io.IOException; -import java.util.ArrayList; -import java.util.List; - -import net.ontopia.topicmaps.core.TopicIF; -import net.ontopia.topicmaps.core.TopicNameIF; -import net.ontopia.topicmaps.query.core.InvalidQueryException; -import net.ontopia.topicmaps.query.impl.basic.QueryMatches; - -@SuppressWarnings("unchecked") -public class QueryProcessorTest extends AbstractTomaQueryTestCase { - - public QueryProcessorTest(String name) { - super(name); - } - - /// context management - - public void setUp() { - QueryMatches.initialSize = 1; - } - - public void tearDown() { - closeStore(); - } - - /// column bound tests - - public void testTwoColumnsBound() throws InvalidQueryException, IOException { - load("full.ltm"); - - List matches = new ArrayList(); - TopicIF t = getTopicById("tn"); - addMatch(matches, "$T", t, "$T.NAME", t.getTopicNames().iterator().next()); - t = getTopicById("lmg"); - addMatch(matches, "$T", t, "$T.NAME", t.getTopicNames().iterator().next()); - t = getTopicById("lh"); - addMatch(matches, "$T", t, "$T.NAME", t.getTopicNames().iterator().next()); - - verifyQuery(matches, "select $t, $t.name where $t.type = person;"); - } - - public void testTwoColumnsUnbound() throws InvalidQueryException, IOException { - load("full.ltm"); - - List matches = new ArrayList(); - TopicIF ltm = getTopicById("ltm"); - TopicIF xtm = getTopicById("xtm"); - Object tn = getTopicById("tn").getTopicNames().iterator().next(); - Object lmg = getTopicById("lmg").getTopicNames().iterator().next(); - Object lh = getTopicById("lh").getTopicNames().iterator().next(); - - addMatch(matches, "$T", ltm, "$P.NAME", tn); - addMatch(matches, "$T", ltm, "$P.NAME", lmg); - addMatch(matches, "$T", ltm, "$P.NAME", lh); - addMatch(matches, "$T", xtm, "$P.NAME", tn); - addMatch(matches, "$T", xtm, "$P.NAME", lmg); - addMatch(matches, "$T", xtm, "$P.NAME", lh); - - verifyQuery(matches, - "select $t, $p.name where $t.type = format and $p.type = person;"); - } - - public void testThreeColumnsMixed() throws InvalidQueryException, IOException { - load("full.ltm"); - - List matches = new ArrayList(); - TopicIF ltm = getTopicById("ltm"); - Object ltmName = ltm.getTopicNames().iterator().next(); - TopicIF xtm = getTopicById("xtm"); - Object xtmName = xtm.getTopicNames().iterator().next(); - Object tn = getTopicById("tn").getTopicNames().iterator().next(); - Object lmg = getTopicById("lmg").getTopicNames().iterator().next(); - Object lh = getTopicById("lh").getTopicNames().iterator().next(); - - addMatch(matches, "$T", ltm, "$T.NAME", ltmName, "$P.NAME", tn); - addMatch(matches, "$T", ltm, "$T.NAME", ltmName, "$P.NAME", lmg); - addMatch(matches, "$T", ltm, "$T.NAME", ltmName, "$P.NAME", lh); - addMatch(matches, "$T", xtm, "$T.NAME", xtmName, "$P.NAME", tn); - addMatch(matches, "$T", xtm, "$T.NAME", xtmName, "$P.NAME", lmg); - addMatch(matches, "$T", xtm, "$T.NAME", xtmName, "$P.NAME", lh); - - verifyQuery(matches, - "select $t, $t.name, $p.name where $t.type = format and $p.type = person;"); - } - - public void testThreeColumnsBound() throws InvalidQueryException, IOException { - load("complex.ltm"); - - List matches = new ArrayList(); - - addMatch(matches, "$PERSON", getTopicById("bohr"), "$PLACE", getTopicById("copenhagen")); - addMatch(matches, "$PERSON", getTopicById("humboldt"), "$PLACE", getTopicById("berlin")); - addMatch(matches, "$PERSON", getTopicById("schroedinger"), "$PLACE", getTopicById("wien")); - - verifyQueryOrder( - matches, - "select $PERSON, $PLACE where $PERSON.(person)<-(born-in)->($$) = $PLACE and $PERSON.(person)<-(died-in)->($$) = $DIED and $PLACE = $DIED order by 1;"); - } - - public void testThreeColumnsBoundWithSquareBracket() throws InvalidQueryException, IOException { - load("complex.ltm"); - - List matches = new ArrayList(); - - addMatch(matches, "$PERSON", getTopicById("bohr"), "$PLACE", getTopicById("copenhagen")); - addMatch(matches, "$PERSON", getTopicById("humboldt"), "$PLACE", getTopicById("berlin")); - addMatch(matches, "$PERSON", getTopicById("schroedinger"), "$PLACE", getTopicById("wien")); - - verifyQueryOrder( - matches, - "select $PERSON, $PLACE where exists $PERSON.(person)<-(born-in)->($$)[$PLACE] and exists $PERSON.(person)<-(died-in)->($$)[$DIED] and $PLACE = $DIED order by 1;"); - } - - /// limit and offset tests - - public void testLimit() throws InvalidQueryException, IOException { - load("family.ltm"); - - List matches = new ArrayList(); - addMatch(matches, "$T", getTopicById("asle")); - addMatch(matches, "$T", getTopicById("edvin")); - addMatch(matches, "$T", getTopicById("kfg")); - - verifyQueryOrder(matches, "select $t where $t.type = father order by 1 limit 3;"); - } - - public void testOffset() throws InvalidQueryException, IOException { - load("family.ltm"); - - List matches = new ArrayList(); - addMatch(matches, "$T", getTopicById("edvin")); - addMatch(matches, "$T", getTopicById("kfg")); - - verifyQueryOrder(matches, "select $t where $t.type = father order by 1 limit 2 offset 1;"); - } - - /// concat string tests - - public void testConcatInWhere() throws InvalidQueryException, IOException { - load("full.ltm"); - - List matches = new ArrayList(); - addMatch(matches, "$T", getTopicById("ltm-standard")); - - verifyQueryOrder(matches, "select $t where $t.oc(mass) = '3.0' || ' kg';"); - } - - public void testConcatInSelect() throws InvalidQueryException, IOException { - load("full.ltm"); - - List matches = new ArrayList(); - TopicNameIF tn = (TopicNameIF) getTopicById("tn").getTopicNames() - .iterator().next(); - addMatch(matches, "||", tn.getValue() + " - Superman"); - - verifyQueryOrder(matches, "select $t.name || ' - Superman' where $t = tn;"); - } -} diff --git a/sandbox/toma/src/test/java/net/ontopia/topicmaps/query/toma/QueryResultTest.java b/sandbox/toma/src/test/java/net/ontopia/topicmaps/query/toma/QueryResultTest.java deleted file mode 100644 index e060ad5ff..000000000 --- a/sandbox/toma/src/test/java/net/ontopia/topicmaps/query/toma/QueryResultTest.java +++ /dev/null @@ -1,146 +0,0 @@ -package net.ontopia.topicmaps.query.toma; - -import java.io.IOException; - -import net.ontopia.topicmaps.core.TopicIF; -import net.ontopia.topicmaps.query.core.InvalidQueryException; -import net.ontopia.topicmaps.query.core.QueryResultIF; -import net.ontopia.topicmaps.query.impl.basic.QueryMatches; - -public class QueryResultTest extends AbstractTomaQueryTestCase { - - public QueryResultTest(String name) { - super(name); - } - - /// context management - - public void setUp() { - QueryMatches.initialSize = 1; - } - - public void tearDown() { - closeStore(); - } - - /// test cases - - public void testColumnName() throws InvalidQueryException, IOException { - load("family.ltm"); - - String query = "select $M, $F where $M.(mother)<-$A(parenthood)->(father) = $F;"; - QueryResultIF result = processor.execute(query); - - assertTrue("$M not first column", result.getColumnName(0).equals("$M")); - assertTrue("$F not second column", result.getColumnName(1).equals("$F")); - - try { - result.getColumnName(2); - fail("accepted non-existent column"); - } catch (IndexOutOfBoundsException e) { - } - - try { - result.getColumnName(-1); - fail("accepted non-existent column"); - } catch (IndexOutOfBoundsException e) { - } - } - - public void testColumnNames() throws InvalidQueryException, IOException { - load("family.ltm"); - - String query = "select $M, $F where $M.(mother)<-$A(parenthood)->(father) = $F;"; - QueryResultIF result = processor.execute(query); - String[] cols = result.getColumnNames(); - - assertTrue("wrong length of column name array", cols.length == 2); - assertTrue("$M not first column", cols[0].equals("$M")); - assertTrue("$F not second column", cols[1].equals("$F")); - } - - public void testGetIndex() throws InvalidQueryException, IOException{ - load("family.ltm"); - - String query = "select $M, $F where $M.(mother)<-$A(parenthood)->(father) = $F;"; - QueryResultIF result = processor.execute(query); - - assertTrue("variable $M had bad index", - result.getIndex("$M") == 0); - assertTrue("variable $F had bad index", - result.getIndex("$F") == 1); - assertTrue("non-existent variable $A was found", - result.getIndex("$A") == -1); - } - - public void testGetWidthSelect() throws InvalidQueryException, IOException{ - load("family.ltm"); - - String query = "select $M, $F where $M.(mother)<-$A(parenthood)->(father) = $F;"; - QueryResultIF result = processor.execute(query); - assertTrue("result had wrong width", result.getWidth() == 2); - } - - public void testGetValue() throws InvalidQueryException, IOException { - load("family.ltm"); - - String query = "select $M where $M.type = father;"; - QueryResultIF result = processor.execute(query); - - assertTrue("result had wrong width", result.getWidth() == 1); - - try { - result.getValue(0); - fail("accepted getValue before calling next"); - } catch (IllegalStateException e) { - } - - assertTrue("query needs to have at least 1 row as a result", result.next()); - - Object topic = result.getValue(0); - assertTrue("result must be of type TopicIF", topic instanceof TopicIF); - - try { - result.getValue(2); - fail("accepted non-existant column for getValue"); - } catch (IndexOutOfBoundsException e) { - } - } - - public void testGetValues() throws InvalidQueryException, IOException { - load("family.ltm"); - - String query = "select $M where $M.type = father;"; - QueryResultIF result = processor.execute(query); - - assertTrue("result had wrong width", result.getWidth() == 1); - - try { - result.getValues(); - fail("accepted getValues before calling next"); - } catch (IllegalStateException e) { - } - - assertTrue("query needs to have at least 1 row as a result", result.next()); - - Object[] values = result.getValues(); - assertTrue("values empty", values != null); - assertTrue("size of values array not matching", values.length == 1); - } - - public void testClose() throws InvalidQueryException, IOException { - load("family.ltm"); - - String query = "select $M where $M.type = father;"; - QueryResultIF result = processor.execute(query); - - // close result set - result.close(); - - try { - result.getWidth(); - fail("accepted getWidth after close"); - } catch (IllegalStateException e) { - } - } -} diff --git a/sandbox/toma/src/test/java/net/ontopia/topicmaps/query/toma/ScopeTest.java b/sandbox/toma/src/test/java/net/ontopia/topicmaps/query/toma/ScopeTest.java deleted file mode 100644 index 7ccc1b5de..000000000 --- a/sandbox/toma/src/test/java/net/ontopia/topicmaps/query/toma/ScopeTest.java +++ /dev/null @@ -1,69 +0,0 @@ -package net.ontopia.topicmaps.query.toma; - -import java.io.IOException; -import java.util.ArrayList; -import java.util.Collection; -import java.util.List; - -import net.ontopia.topicmaps.core.TopicIF; -import net.ontopia.topicmaps.core.TopicNameIF; -import net.ontopia.topicmaps.core.VariantNameIF; -import net.ontopia.topicmaps.query.core.InvalidQueryException; -import net.ontopia.topicmaps.query.impl.basic.QueryMatches; - -@SuppressWarnings("unchecked") -public class ScopeTest extends AbstractTomaQueryTestCase { - - public ScopeTest(String name) { - super(name); - } - - /// context management - - public void setUp() { - QueryMatches.initialSize = 1; - } - - public void tearDown() { - closeStore(); - } - - /// association tests - - public void testScopeUsingPath() throws InvalidQueryException, IOException { - load("full.ltm"); - - List matches = new ArrayList(); - addMatch(matches, "$T", getTopicById("topic-maps")); - - verifyQuery(matches, "select $t where exists $t.oc(specification)@english;"); - } - - public void testAssignScope() throws InvalidQueryException, IOException { - load("full.ltm"); - - List matches = new ArrayList(); - fillMatchesWithVariantsAndScopes(matches, getTopicById("xtm")); - fillMatchesWithVariantsAndScopes(matches, getTopicById("ltm")); - - verifyQuery(matches, "select $t, $t.name.var@$scope, $scope where $t.type = format;"); - } - - private void fillMatchesWithVariantsAndScopes(List matches, TopicIF topic) { - Collection names = topic.getTopicNames(); - for (Object name : names) { - TopicNameIF n = (TopicNameIF) name; - for (Object o : n.getVariants()) { - VariantNameIF var = (VariantNameIF) o; - Collection scopes = var.getScope(); - if (scopes == null || scopes.isEmpty()) { - addMatch(matches, "$T", topic, "$T.NAME.VAR@$SCOPE", o, "$SCOPE", null); - } else { - for (Object scope : scopes) { - addMatch(matches, "$T", topic, "$T.NAME.VAR@$SCOPE", o, "$SCOPE", scope); - } - } - } - } - } -} diff --git a/sandbox/toma/src/test/java/net/ontopia/topicmaps/query/toma/TomaXMLTestRunner.java b/sandbox/toma/src/test/java/net/ontopia/topicmaps/query/toma/TomaXMLTestRunner.java deleted file mode 100644 index 3b3a19657..000000000 --- a/sandbox/toma/src/test/java/net/ontopia/topicmaps/query/toma/TomaXMLTestRunner.java +++ /dev/null @@ -1,83 +0,0 @@ -package net.ontopia.topicmaps.query.toma; - -import net.ontopia.topicmaps.query.toma.parser.TomaParser; - -import org.apache.xerces.parsers.SAXParser; -import org.xml.sax.Attributes; -import org.xml.sax.SAXException; -import org.xml.sax.helpers.DefaultHandler; - -public class TomaXMLTestRunner { - private String queryFile = "src/test-data/toma/queries.xml"; - - protected void setUp() { - } - - protected void tearDown() { - } - - public void testXML() { - QueryHandler handler = new QueryHandler(); - SAXParser p = new SAXParser(); - p.setContentHandler(handler); - - try { - p.parse(queryFile); - } catch (Exception e) { - e.printStackTrace(); - // fail("could not load query file '" + queryFile + "'"); - } - } - - class QueryHandler extends DefaultHandler { - String desc; - String query; - String result; - String success; - - String pcdata; - - @Override - public void startElement(String namespaceURI, String localName, - String qName, Attributes atts) { - pcdata = ""; - } - - @Override - public void endElement(String uri, String localName, String qName) - throws SAXException { - if (localName.equalsIgnoreCase("testcase")) { - System.out.println("-----------------------------"); - System.out.println("running query: "); - System.out.println(" desc - " + desc); - System.out.println(" query - " + query); - - @SuppressWarnings("unused") - TomaParser parser = new TomaParser(); - try { - // parser.parse(query); - // assertTrue(true); - } catch (Exception e) { - // fail("parsing error"); - } - - System.out.println(); - - } else if (localName.equalsIgnoreCase("desc")) { - desc = pcdata; - } else if (localName.equalsIgnoreCase("query")) { - query = pcdata; - } else if (localName.equalsIgnoreCase("result")) { - result = pcdata; - } else if (localName.equalsIgnoreCase("success")) { - success = pcdata; - } - } - - @Override - public void characters(char[] characters, int start, int length) - throws SAXException { - pcdata += new String(characters, start, length); - } - } -} diff --git a/sandbox/toma/src/test/java/net/ontopia/topicmaps/query/toma/TypeHierarchyTest.java b/sandbox/toma/src/test/java/net/ontopia/topicmaps/query/toma/TypeHierarchyTest.java deleted file mode 100644 index 41b567ef3..000000000 --- a/sandbox/toma/src/test/java/net/ontopia/topicmaps/query/toma/TypeHierarchyTest.java +++ /dev/null @@ -1,232 +0,0 @@ -package net.ontopia.topicmaps.query.toma; - -import java.io.IOException; -import java.util.ArrayList; -import java.util.List; - -import net.ontopia.topicmaps.query.core.InvalidQueryException; -import net.ontopia.topicmaps.query.impl.basic.QueryMatches; - -@SuppressWarnings("unchecked") -public class TypeHierarchyTest extends AbstractTomaQueryTestCase { - - public TypeHierarchyTest(String name) { - super(name); - } - - /// context management - - public void setUp() { - QueryMatches.initialSize = 1; - } - - public void tearDown() { - closeStore(); - } - - /// type hierarchies - - public void testTypeLevelZero() throws InvalidQueryException, IOException { - load("hierarchies.ltm"); - - // type(0) gets the topic itself - List matches = new ArrayList(); - addMatch(matches, "$T.TYPE", getTopicById("topicA")); - - verifyQuery(matches, "select $t.type(0) where $t = i'topicA';"); - } - - public void testNoType() throws InvalidQueryException, IOException { - load("hierarchies.ltm"); - - // topicA does not have a type - findNothing("select $t.type(1) where $t = i'topicA';"); - } - - public void testTypeWithRange() throws InvalidQueryException, IOException { - load("hierarchies.ltm"); - - // topicC has topicB, which has topicA as type - List matches = new ArrayList(); - addMatch(matches, "$T.TYPE", getTopicById("topicA")); - addMatch(matches, "$T.TYPE", getTopicById("topicB")); - - verifyQuery(matches, "select $t.type(1..*) where $t = i'topicC';"); - } - - public void testTypeWithRange2() throws InvalidQueryException, IOException { - load("hierarchies.ltm"); - - // topicC has topicB, which has topicA as type - List matches = new ArrayList(); - addMatch(matches, "$T.TYPE", getTopicById("topicA")); - addMatch(matches, "$T.TYPE", getTopicById("topicB")); - addMatch(matches, "$T.TYPE", getTopicById("topicC")); - - verifyQuery(matches, "select $t.type(1..3) where $t = i'topicD';"); - } - - public void testTypeWithStar() throws InvalidQueryException, IOException { - load("hierarchies.ltm"); - - // topicC has topicB, which has topicA as type - List matches = new ArrayList(); - addMatch(matches, "$T.TYPE", getTopicById("topicA")); - addMatch(matches, "$T.TYPE", getTopicById("topicB")); - - verifyQuery(matches, "select $t.type(*) where $t = i'topicB';"); - } - - /// instance hierarchies - - public void testInstanceLevelZero() throws InvalidQueryException, IOException { - load("hierarchies.ltm"); - - // instance(0) gets the topic itself - List matches = new ArrayList(); - addMatch(matches, "$T.INSTANCE", getTopicById("topicA")); - - verifyQuery(matches, "select $t.instance(0) where $t = i'topicA';"); - } - - public void testNoInstance() throws InvalidQueryException, IOException { - load("hierarchies.ltm"); - - // topicD does not have an instance - findNothing("select $t.instance(1) where $t = i'topicD';"); - } - - public void testInstanceWithRange() throws InvalidQueryException, IOException { - load("hierarchies.ltm"); - - List matches = new ArrayList(); - addMatch(matches, "$T.INSTANCE", getTopicById("topicC")); - addMatch(matches, "$T.INSTANCE", getTopicById("topicD")); - - verifyQuery(matches, "select $t.instance(1..*) where $t = i'topicB';"); - } - - public void testInstanceWithRange2() throws InvalidQueryException, IOException { - load("hierarchies.ltm"); - - // topicC has topicB, which has topicA as type - List matches = new ArrayList(); - addMatch(matches, "$T.INSTANCE", getTopicById("topicB")); - addMatch(matches, "$T.INSTANCE", getTopicById("topicC")); - addMatch(matches, "$T.INSTANCE", getTopicById("topicD")); - - verifyQuery(matches, "select $t.instance(1..3) where $t = i'topicA';"); - } - - public void testInstanceWithStar() throws InvalidQueryException, IOException { - load("hierarchies.ltm"); - - // topicC has topicB, which has topicA as type - List matches = new ArrayList(); - addMatch(matches, "$T.INSTANCE", getTopicById("topicC")); - addMatch(matches, "$T.INSTANCE", getTopicById("topicD")); - - verifyQuery(matches, "select $t.instance(*) where $t = i'topicC';"); - } - - /// supertype-subtype hierarchies - - public void testSubTypeLevelZero() throws InvalidQueryException, IOException { - load("hierarchies.ltm"); - - // sub(0) gets the type itself - List matches = new ArrayList(); - addMatch(matches, "$T.SUB", getTopicById("typeA")); - - verifyQuery(matches, "select $t.sub(0) where $t = i'typeA';"); - } - - public void testNoSubType() throws InvalidQueryException, IOException { - load("hierarchies.ltm"); - - // typeD does not have a sub type - findNothing("select $t.sub(1) where $t = i'typeD';"); - } - - public void testSubTypeWithRange() throws InvalidQueryException, IOException { - load("hierarchies.ltm"); - - List matches = new ArrayList(); - addMatch(matches, "$T.SUB", getTopicById("typeC")); - addMatch(matches, "$T.SUB", getTopicById("typeD")); - - verifyQuery(matches, "select $t.sub(1..*) where $t = i'typeB';"); - } - - public void testSubTypeWithRange2() throws InvalidQueryException, IOException { - load("hierarchies.ltm"); - - List matches = new ArrayList(); - addMatch(matches, "$T.SUB", getTopicById("typeB")); - addMatch(matches, "$T.SUB", getTopicById("typeC")); - addMatch(matches, "$T.SUB", getTopicById("typeD")); - - verifyQuery(matches, "select $t.sub(1..3) where $t = i'typeA';"); - } - - public void testSubTypeWithStar() throws InvalidQueryException, IOException { - load("hierarchies.ltm"); - - List matches = new ArrayList(); - addMatch(matches, "$T.SUB", getTopicById("typeC")); - addMatch(matches, "$T.SUB", getTopicById("typeD")); - - verifyQuery(matches, "select $t.sub(*) where $t = i'typeC';"); - } - - // super type tests - - public void testSuperTypeLevelZero() throws InvalidQueryException, IOException { - load("hierarchies.ltm"); - - // super(0) gets the type itself - List matches = new ArrayList(); - addMatch(matches, "$T.SUPER", getTopicById("typeD")); - - verifyQuery(matches, "select $t.super(0) where $t = i'typeD';"); - } - - public void testNoSuperType() throws InvalidQueryException, IOException { - load("hierarchies.ltm"); - - // typeA does not have a super type - findNothing("select $t.super(1) where $t = i'typeA';"); - } - - public void testSuperTypeWithRange() throws InvalidQueryException, IOException { - load("hierarchies.ltm"); - - List matches = new ArrayList(); - addMatch(matches, "$T.SUPER", getTopicById("typeA")); - addMatch(matches, "$T.SUPER", getTopicById("typeB")); - - verifyQuery(matches, "select $t.super(1..*) where $t = i'typeC';"); - } - - public void testSuperTypeWithRange2() throws InvalidQueryException, IOException { - load("hierarchies.ltm"); - - List matches = new ArrayList(); - addMatch(matches, "$T.SUPER", getTopicById("typeA")); - addMatch(matches, "$T.SUPER", getTopicById("typeB")); - addMatch(matches, "$T.SUPER", getTopicById("typeC")); - - verifyQuery(matches, "select $t.super(1..3) where $t = i'typeD';"); - } - - public void testSuperTypeWithStar() throws InvalidQueryException, IOException { - load("hierarchies.ltm"); - - List matches = new ArrayList(); - addMatch(matches, "$T.SUPER", getTopicById("typeA")); - addMatch(matches, "$T.SUPER", getTopicById("typeB")); - - verifyQuery(matches, "select $t.super(*) where $t = i'typeB';"); - } - -} diff --git a/sandbox/toma/src/test/java/net/ontopia/topicmaps/query/toma/UnionTest.java b/sandbox/toma/src/test/java/net/ontopia/topicmaps/query/toma/UnionTest.java deleted file mode 100644 index cb38d9e36..000000000 --- a/sandbox/toma/src/test/java/net/ontopia/topicmaps/query/toma/UnionTest.java +++ /dev/null @@ -1,79 +0,0 @@ -package net.ontopia.topicmaps.query.toma; - -import java.io.IOException; -import java.util.ArrayList; -import java.util.List; - -import net.ontopia.topicmaps.query.core.InvalidQueryException; -import net.ontopia.topicmaps.query.impl.basic.QueryMatches; - -@SuppressWarnings("unchecked") -public class UnionTest extends AbstractTomaQueryTestCase { - - public UnionTest(String name) { - super(name); - } - - /// context management - - public void setUp() { - QueryMatches.initialSize = 1; - } - - public void tearDown() { - closeStore(); - } - - /// function tests - - public void testUnion() throws InvalidQueryException, IOException { - load("full.ltm"); - - List matches = new ArrayList(); - addMatch(matches, "$T", getTopicById("topic-maps")); - addMatch(matches, "$T", getTopicById("ltm-standard")); - addMatch(matches, "$T", getTopicById("xtm-standard")); - - verifyQuery( - matches, - "select $t where exists $t.oc(mass) union select $t where $t.type = standard;"); - } - - public void testUnionAll() throws InvalidQueryException, IOException { - load("full.ltm"); - - List matches = new ArrayList(); - addMatch(matches, "$T", getTopicById("topic-maps")); - addMatch(matches, "$T", getTopicById("ltm-standard")); - addMatch(matches, "$T", getTopicById("xtm-standard")); - addMatch(matches, "$T", getTopicById("ltm-standard")); - addMatch(matches, "$T", getTopicById("xtm-standard")); - - verifyQuery( - matches, - "select $t where exists $t.oc(mass) union all select $t where $t.type = standard;"); - } - - public void testExcept() throws InvalidQueryException, IOException { - load("full.ltm"); - - List matches = new ArrayList(); - addMatch(matches, "$T", getTopicById("topic-maps")); - addMatch(matches, "$T", getTopicById("ltm-standard")); - - verifyQuery( - matches, - "select $t where $t.type = standard except select $t where $t.name ~* 'XTM';"); - } - - public void testIntersect() throws InvalidQueryException, IOException { - load("full.ltm"); - - List matches = new ArrayList(); - addMatch(matches, "$T", getTopicById("xtm-standard")); - - verifyQuery( - matches, - "select $t where $t.type = standard intersect select $t where $t.name ~* 'XTM';"); - } -} diff --git a/sandbox/toma/src/test/resources/query/complex.ltm b/sandbox/toma/src/test/resources/query/complex.ltm deleted file mode 100644 index 3c0ff6fd7..000000000 --- a/sandbox/toma/src/test/resources/query/complex.ltm +++ /dev/null @@ -1,45 +0,0 @@ -/* topic types */ - -[person = "Person"] -[city = "City"] - -/* association types */ - -[born-in = "born in"] -[died-in = "died in"] - -/* occurrence types */ - -/* scope types */ - -/* topics, associations and occurrences */ - -[einstein : person = "Albert Einstein"] -[bohr : person = "Nils Bohr"] -[gauss : person = "Carl Friedrich Gauss"] -[humboldt : person = "Alexander von Humboldt"] -[schroedinger : person = "Erwin Schrödinger"] -[pauli : person = "Wolfgang Pauli"] - -[ulm : city = "Ulm"] -[princeton : city = "Princeton"] -[copenhagen : city = "Copenhagen"] -[braunschweig : city = "Braunschweig"] -[goettingen : city = "Göttingen"] -[berlin : city = "Berlin"] -[wien : city = "Wien"] -[zurich : city = "Zürich"] - -born-in(einstein, ulm) -born-in(bohr, copenhagen) -born-in(gauss, braunschweig) -born-in(humboldt, berlin) -born-in(schroedinger, wien) -born-in(pauli, wien) - -died-in(einstein, princeton) -died-in(bohr, copenhagen) -died-in(gauss, goettingen) -died-in(humboldt, berlin) -died-in(schroedinger, wien) -died-in(pauli, zurich) \ No newline at end of file diff --git a/sandbox/toma/src/test/resources/query/family.ltm b/sandbox/toma/src/test/resources/query/family.ltm deleted file mode 100644 index 04512e7ea..000000000 --- a/sandbox/toma/src/test/resources/query/family.ltm +++ /dev/null @@ -1,52 +0,0 @@ - -#TOPICMAP tm - -/* Associations */ - -parenthood(lmg : child, bjorg : mother, kfg : father) -parenthood(silje : child, bjorg : mother, kfg : father) -parenthood(astri : child, bjorg : mother, kfg : father) - -parenthood(trygve : child, may : mother, petter : father) -parenthood(tine : child, may : mother, petter : father) -parenthood(julie : child, may : mother, petter : father) - -parenthood(kfg : child, kjellaug : mother, edvin : father) -parenthood(petter : child, kjellaug : mother, edvin : father) - -parenthood(lms : child, gerd : mother, asle : father) - -parenthood(gerd : child, bertha : mother, magnus : father) -parenthood(bjorg : child, bertha : mother, magnus : father) -parenthood(asle : child, unknown1 : mother, unknown2 : father) - - -/* Names; needed for sorting */ - -[silje = "Silje England Garshol"] -[astri = "Astri England Garshol"] -[trygve = "Trygve Garshol"] -[tine = "Tine Garshol"] -[julie = "Julie Garshol"] -[lmg = "Lars Marius Garshol"] -[bjorg = "Bjørg England"] -[may = "May Stenersen"] -[kjellaug = "Kjellaug Garshol"] -[edvin : father = "Edvin Garshol"; "5"] -[kfg : father = "Knut Garshol"; "4"] -[petter : father = "Petter Garshol";"2"] - -[lms = "Lars Magne Skalle"] -[gerd = "Gerd Skalle"] -[asle : father = "Asle Skalle"; "6"] -[magnus : father = "Magnus England";"3"] -[bertha = "Bertha England"] -[unknown1 = "Unknown 1"] -[unknown2 : father = "Unknown 2"; "1"] - -/* ID duplicate for case sensitivity testing */ - -[TRYGVE = "WRONG WRONG WRONG"] - -/* bug 2123 */ -{asle, age, [[23]]} diff --git a/sandbox/toma/src/test/resources/query/full.ltm b/sandbox/toma/src/test/resources/query/full.ltm deleted file mode 100644 index 3a9a49482..000000000 --- a/sandbox/toma/src/test/resources/query/full.ltm +++ /dev/null @@ -1,80 +0,0 @@ -/* topic types */ - -[format = "Format"] -[standard = "Standard"] -[project = "Project"] -[organization = "Organization"] -[person = "Person"] - -/* association types */ - -[format-for = "Format for"] -[defined-by = "Defined by"] -[contributes-to = "Contributes to"] -[implements = "Implements"] - -/* occurrence types */ - -[specification = "Specification"] -[homepage = "Home page"] -[version = "Version"] -[pages = "Number of pages"] -[mass = "Mass"] - -/* scope types */ - -[english = "English language"] -[german = "German language"] -[year2009 = "Year 2009"] - -/* topics, associations and occurrences */ - -[topic-maps : standard = "Topic maps" - = "ISO/IEC 13250 Topic Maps" / fullname] -{topic-maps, specification, - "http://www.y12.doe.gov/sgml/sc34/document/0129.pdf"} / english - -[xtm : format = "XTM Syntax" - ("XML Topic Map Syntax" / english)] - -[ltm : format = "The linear topic map notation"; - "linear topic map notation, the" - ("Die lineare Topic Map Notation" / german) - @"http://www.ontopia.net/topicmaps/ltm-tech-report.html"] -{ltm, specification, "http://www.ontopia.net/topicmaps/ltm-tech-report.html"} / german - -[ltm-standard : standard = "LTM standard"] -format-for(ltm, topic-maps) ~ ltm-standard -{ltm-standard, version, [[1.2]]} -{ltm-standard, mass, [[3.0 kg]]} -{ltm-standard, pages, [[80]]} - -[xtm-standard : standard = "XTM standard"] -format-for(xtm, topic-maps) ~ xtm-standard -{xtm-standard, version, [[2.0]]} -{xtm-standard, mass, [[2.0 kg]]} -{xtm-standard, pages, [[120]]} - -[ontopia : project = "Ontopia Project"] -{ontopia, homepage, "http://code.google.com/p/ontopia/"} - -[tinytim : project = "TinyTIM Project"] -{tinytim, homepage, "http://tinytim.sourceforge.net/"} - -[topicmaps.org : organization = "TopicMaps.Org"] -{topicmaps.org, homepage, "http://www.topicmaps.org"} - -defined-by(ltm, ontopia) -defined-by(xtm, topicmaps.org) - -[tn : person = "Thomas Neidhart"] -[lmg : person = "Lars Marius Garshol"] -[lh : person = "Lars Heuer"] - -contributes-to(tn, ontopia) / year2009 -contributes-to(lmg, ontopia) -contributes-to(lh, tinytim) - -implements(ontopia, xtm-standard) -implements(ontopia, ltm-standard) -implements(tinytim, xtm-standard) diff --git a/sandbox/toma/src/test/resources/query/hierarchies.ltm b/sandbox/toma/src/test/resources/query/hierarchies.ltm deleted file mode 100644 index 83eac4d01..000000000 --- a/sandbox/toma/src/test/resources/query/hierarchies.ltm +++ /dev/null @@ -1,27 +0,0 @@ - -/* - Topic map with instance-of relationships _and_ subclasses used by - the query engine test cases. -*/ - -[subclass-of = "Subclass of" - @"http://www.topicmaps.org/xtm/1.0/core.xtm#superclass-subclass"] -[superclass = "Superclass" - @"http://www.topicmaps.org/xtm/1.0/core.xtm#superclass"] -[subclass = "Subclass" - @"http://www.topicmaps.org/xtm/1.0/core.xtm#subclass"] - -[typeA = "Type A"] -[typeB = "Type B"] -[typeC = "Type C"] -[typeD = "Type D"] -subclass-of([typeA] : superclass, [typeB] : subclass) -subclass-of([typeB] : superclass, [typeC] : subclass) -subclass-of([typeA] : superclass, [typeC] : subclass) -subclass-of([typeC] : superclass, [typeD] : subclass) - -/* type-instance examples */ -[topicA = "Topic A"] -[topicB : topicA = "Topic B"] -[topicC : topicA topicB = "Topic C"] -[topicD : topicC = "Topic D"]