001 // This file is part of AceWiki.
002 // Copyright 2008-2012, AceWiki developers.
003 //
004 // AceWiki is free software: you can redistribute it and/or modify it under the terms of the GNU
005 // Lesser General Public License as published by the Free Software Foundation, either version 3 of
006 // the License, or (at your option) any later version.
007 //
008 // AceWiki is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without
009 // even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
010 // Lesser General Public License for more details.
011 //
012 // You should have received a copy of the GNU Lesser General Public License along with AceWiki. If
013 // not, see http://www.gnu.org/licenses/.
014
015 package ch.uzh.ifi.attempto.acewiki.core;
016
017 /**
018 * This class represents a "dummy" ontology element, which cannot be part of ontological statements
019 * but represents an article. This class is at the moment only used for the main page, which does
020 * not represent a specific word (i.e. ontological entity) but is otherwise a normal article.
021 *
022 * @author Tobias Kuhn
023 */
024 public class DummyOntologyElement extends AbstractOntologyElement {
025
026 String type;
027 String text;
028
029 /**
030 * Creates a new dummy ontology element.
031 *
032 * @param type The type of the dummy ontology element.
033 * @param text The text of the dummy ontology element.
034 */
035 public DummyOntologyElement(String type, String text) {
036 this.type = type;
037 this.text = text;
038 }
039
040 public String[] getWords() {
041 return new String[] {};
042 }
043
044 public String getWord() {
045 return null;
046 }
047
048 public String[] getHeadwords() {
049 return new String[] {text};
050 }
051
052 public void setWords(String serializedWords) {
053 }
054
055 public String serializeWords() {
056 return "";
057 }
058
059 public String getType() {
060 return type;
061 }
062
063 public String getInternalType() {
064 return type;
065 }
066
067 }