Class HtmlTriplePatternFragmentWriterImpl
- java.lang.Object
-
- org.linkeddatafragments.views.LinkedDataFragmentWriterBase
-
- org.linkeddatafragments.views.TriplePatternFragmentWriterBase
-
- org.vivoweb.linkeddatafragments.views.HtmlTriplePatternFragmentWriterImpl
-
- All Implemented Interfaces:
ILinkedDataFragmentWriter
public class HtmlTriplePatternFragmentWriterImpl extends TriplePatternFragmentWriterBase implements ILinkedDataFragmentWriter
Serializes anILinkedDataFragmentto the HTML format- Author:
- Miel Vander Sande
-
-
Constructor Summary
Constructors Constructor Description HtmlTriplePatternFragmentWriterImpl(Map<String,String> prefixes, HashMap<String,IDataSource> datasources)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static voidsetContextPath(String path)voidwriteError(javax.servlet.ServletOutputStream outputStream, Exception ex)Writes a 5XX errorvoidwriteFragment(javax.servlet.ServletOutputStream outputStream, IDataSource datasource, ITriplePatternFragment fragment, ITriplePatternFragmentRequest tpfRequest)voidwriteNotFound(javax.servlet.ServletOutputStream outputStream, javax.servlet.http.HttpServletRequest request)Writes a 404 Not Found error-
Methods inherited from class org.linkeddatafragments.views.TriplePatternFragmentWriterBase
writeFragment
-
Methods inherited from class org.linkeddatafragments.views.LinkedDataFragmentWriterBase
getDatasources, getPrefixes
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface org.linkeddatafragments.views.ILinkedDataFragmentWriter
writeFragment
-
-
-
-
Constructor Detail
-
HtmlTriplePatternFragmentWriterImpl
public HtmlTriplePatternFragmentWriterImpl(Map<String,String> prefixes, HashMap<String,IDataSource> datasources) throws IOException
- Parameters:
prefixes-datasources-- Throws:
IOException
-
-
Method Detail
-
setContextPath
public static void setContextPath(String path)
-
writeFragment
public void writeFragment(javax.servlet.ServletOutputStream outputStream, IDataSource datasource, ITriplePatternFragment fragment, ITriplePatternFragmentRequest tpfRequest) throws IOException, freemarker.template.TemplateException- Specified by:
writeFragmentin classTriplePatternFragmentWriterBase- Parameters:
outputStream-datasource-fragment-tpfRequest-- Throws:
IOExceptionfreemarker.template.TemplateException
-
writeNotFound
public void writeNotFound(javax.servlet.ServletOutputStream outputStream, javax.servlet.http.HttpServletRequest request) throws ExceptionDescription copied from interface:ILinkedDataFragmentWriterWrites a 404 Not Found error- Specified by:
writeNotFoundin interfaceILinkedDataFragmentWriter- Parameters:
outputStream- The response stream to write torequest- Request that is unable to answer- Throws:
Exception- Error that occurs while serializing
-
writeError
public void writeError(javax.servlet.ServletOutputStream outputStream, Exception ex) throws ExceptionDescription copied from interface:ILinkedDataFragmentWriterWrites a 5XX error- Specified by:
writeErrorin interfaceILinkedDataFragmentWriter- Parameters:
outputStream- The response stream to write toex- Exception that occurred- Throws:
Exception- Error that occurs while serializing
-
-