de.fuberlin.wiwiss.wiqa.explanation.html
Class ExplanationToHTMLRenderer

java.lang.Object
  extended byde.fuberlin.wiwiss.wiqa.explanation.html.ExplanationToHTMLRenderer

public class ExplanationToHTMLRenderer
extends Object

Service that returns HTML representations for an entire Explanation or some of its parts.

Version:
$Id: ExplanationToHTMLRenderer.java,v 1.1 2006/01/16 12:20:21 cyganiak Exp $
Author:
Richard Cyganiak (richard@cyganiak.de)

Constructor Summary
ExplanationToHTMLRenderer(Explanation expl, de.fuberlin.wiwiss.ng4j.NamedGraphSet repository)
          Sets up a new renderer.
 
Method Summary
 String getDetailsAsHTML()
           
 String getExplanationAsHTML()
           
 String getExplanationPartsAsHTML()
           
 String getObjectAsHTML()
           
 String getPolicyAsHTML()
           
 String getPredicateAsHTML()
           
 String getSubjectAsHTML()
           
static String renderExplanationPart(ExplanationPart part, de.fuberlin.wiwiss.ng4j.NamedGraphSet repository)
          Convenience method for rendering a single explanation part.
 void setPrefixes(PrefixMapping prefixes)
          Sets a prefix map that will be used to render URIs as QNames.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ExplanationToHTMLRenderer

public ExplanationToHTMLRenderer(Explanation expl,
                                 de.fuberlin.wiwiss.ng4j.NamedGraphSet repository)
Sets up a new renderer.

Parameters:
expl - The explanation to be rendered
repository - The unfiltered repository, used to retrieve labels for resources
Method Detail

renderExplanationPart

public static String renderExplanationPart(ExplanationPart part,
                                           de.fuberlin.wiwiss.ng4j.NamedGraphSet repository)
Convenience method for rendering a single explanation part.

Parameters:
part - An explanation part
repository - The unfiltered repository, used to retrieve labels for resources
Returns:
An HTML fragment representing the explanation part

setPrefixes

public void setPrefixes(PrefixMapping prefixes)
Sets a prefix map that will be used to render URIs as QNames.

Parameters:
prefixes - A prefix map

getSubjectAsHTML

public String getSubjectAsHTML()
Returns:
An HTML representation of the explained triple's subject, including QName compression and URI linking

getPredicateAsHTML

public String getPredicateAsHTML()
Returns:
An HTML representation of the explained triple's predicate, including QName compression and URI linking

getObjectAsHTML

public String getObjectAsHTML()
Returns:
An HTML representation of the explained triple's object, including QName compression and URI linking

getPolicyAsHTML

public String getPolicyAsHTML()
Returns:
An HTML representation of the explained triple's policy URI, including QName compression and URI linking

getExplanationPartsAsHTML

public String getExplanationPartsAsHTML()
Returns:
An HTML representation of the parts of the explanation

getDetailsAsHTML

public String getDetailsAsHTML()
Returns:
An HTML representation of the more detailed alternative version of the explanation, if available

getExplanationAsHTML

public String getExplanationAsHTML()
Returns:
An HTML representation of the entire explanation