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 interface represents a statement of a wiki article. This can be sentences in the
019     * controlled natural language or informal comments.
020     * 
021     * @author Tobias Kuhn
022     */
023    public interface Statement {
024            
025            /**
026             * This method is the first one to be called. It provides the ontology and the article object.
027             * The article can be null if the statement is not assigned to an article.
028             * 
029             * @param ontology The ontology.
030             * @param article The article.
031             */
032            public void init(Ontology ontology, Article article);
033    
034            /**
035             * Returns the ontology this statement belongs to.
036             * 
037             * @return The ontology.
038             */
039            public Ontology getOntology();
040    
041            /**
042             * Returns the owner ontology element of this statement.
043             * 
044             * @return The owner ontology element.
045             */
046            public Article getArticle();
047            
048            /**
049             * Returns the text of this statement in the given language.
050             * 
051             * @param language The language.
052             * @return The text.
053             */
054            public String getText(String language);
055            
056            /**
057             * Returns a serialization of the statement.
058             * 
059             * @return The serialized representation of the statement.
060             */
061            public String serialize();
062    
063    }