Code Search for Developers
 
 
  

KnowledgeRenderer.java from ThinkCap Collaborative Knowledge Portal at Krugle


Show KnowledgeRenderer.java syntax highlighted

/*
 * Created on Dec 25, 2005
 *
 * Copyright 2005 The Ecoinformatics Collaboratory, University of Vermont.
 * 
 * Licensed under the GNU General Public License.
 * You may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 * 
 *      http://www.gnu.org/licenses/gpl.html
 * 
 * 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.
 * 
 * TODO 
 */
package org.integratedmodelling.thinkcap.portal.rendering;

import java.io.PrintWriter;

/**
 * Base class for a knowledge renderer that takes knowledge in some form and outputs its rendering
 * in whatever form is supported (mostly HTML for Thinkcap, but could be different). We 
 * derive renderers for concepts, instances, constraints, and query forms, and tie them to 
 * ontologies. When Thinkcap is required to render something, it will recurse the type hierarchy
 * until a suitable renderer is found. Renderers are used for instances as well as literals and
 * class values.
 * 
 * The default renderers tie to owl:Thing do whatever something like pOWL would do. Any other
 * renderer is supposed to do something that is more related to the specific concept.
 * 
 * @author UVM Affiliate
 *
 */
public abstract class KnowledgeRenderer {

	/**
	 * The constructor of the derived class should take the object to render, so that
	 * the render() function can be called without parameters.
	 *
	 */
    public KnowledgeRenderer() {
 
            /* TODO setup directories */
            /* TODO read concept templates, specifying optional fields or inheritances to ignore, grouping of properties etc */
            /* TODO read output format templates, specifying how to render a list form into a target format */
    }

    /**
     * Implementations are supposed to catch all exceptions and output suitable content if
     * exceptions occur.
     * 
     * @param writer
     */
    abstract void render(PrintWriter writer); 
    
}




See more files for this project here

ThinkCap Collaborative Knowledge Portal

A portal to explore and edit the knowledge contained in a set of ontologies in intuitive ways. Presents a Dictionary view (a Google-like interface), a Thesaurus view (a graphical display with simplified relationships) and a full graphical Concept view.

Project homepage: http://sourceforge.net/projects/thinkcap
Programming language(s): Java,JavaScript,XML
License: other

  ConceptRenderer.java
  ConstraintRenderer.java
  InstanceRenderer.java
  KnowledgeRenderer.java
  QueryRenderer.java
  RendererFactory.java