Class AbstractOOPServlet
- java.lang.Object
-
- javax.servlet.GenericServlet
-
- javax.servlet.http.HttpServlet
-
- io.outofprintmagazine.web.servlets.AbstractOOPServlet
-
- All Implemented Interfaces:
Serializable,javax.servlet.Servlet,javax.servlet.ServletConfig
- Direct Known Subclasses:
AbstractOOPCacheableServlet,ActorAnnotation,ActorsScalar,CorporaViewer,CorpusDocumentsViewer,LexiconLemma,OOPActorsViewer,OOPCloudViewer,OOPCorpusAnnotationCVScoresViewer,OOPCorpusCVScoresViewer,OOPCorpusDocumentAnnotationTfidfViewer,OOPCorpusDocumentAnnotationZScoresViewer,OOPCorpusDocumentZScoresViewer,OOPDocumentViewer,OOPEditorViewer,OOPFactCheckerViewer,OOPLexiconViewer,OOPPullQuotesViewer,OOPStoryArcViewer,OOPStreamViewer,OOPStreamViewerTokens,StanfordBratViewer,TextMediumViewer,TextOutOfPrintViewer,TextViewer,TokenIdxSentence,TokensAnnotationScalar,TokensAnnotationSubannotationScalar
public abstract class AbstractOOPServlet extends javax.servlet.http.HttpServlet- See Also:
- Serialized Form
-
-
Constructor Summary
Constructors Constructor Description AbstractOOPServlet()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected DoublecalculateSimilarity(String targetCorpus, String corpus, String document)protected com.fasterxml.jackson.databind.node.ObjectNodecreateObject(int id, String name, BigDecimal score)protected com.fasterxml.jackson.databind.node.ObjectNodecreateObjectCloud(int id, String name, BigDecimal score)protected com.fasterxml.jackson.databind.node.ObjectNodecreateObjectTidy(int id, String name, BigDecimal score)protected org.jsoup.nodes.ElementgeneratePst(com.fasterxml.jackson.databind.JsonNode stats)protected com.fasterxml.jackson.databind.node.ObjectNodegetAnnotationDescription(String corpus, String document, String annotation)protected com.fasterxml.jackson.databind.ObjectMappergetMapper()protected IStoragegetStorage()voidinit(javax.servlet.ServletConfig config)protected StringplainTextToHtml(String input)protected com.fasterxml.jackson.databind.node.ArrayNodereformatTidyArray(com.fasterxml.jackson.databind.node.ArrayNode input, String format)protected voidsetAnnotationDescriptionsAttribute(javax.servlet.http.HttpServletRequest request, String corpus, String document)protected voidsetContentTypeJson(javax.servlet.http.HttpServletResponse response)protected voidsetDocumentListAttribute(javax.servlet.http.HttpServletRequest request, String corpus)protected voidsetMetadataAttributes(javax.servlet.http.HttpServletRequest request, String corpus, String document)protected voidsetPstAttribute(javax.servlet.http.HttpServletRequest request, String corpus, String document)protected voidsetStatsAttribute(javax.servlet.http.HttpServletRequest request, String corpus, String document)-
Methods inherited from class javax.servlet.http.HttpServlet
doDelete, doGet, doHead, doOptions, doPost, doPut, doTrace, getLastModified, service, service
-
-
-
-
Method Detail
-
init
public void init(javax.servlet.ServletConfig config) throws javax.servlet.ServletException- Specified by:
initin interfacejavax.servlet.Servlet- Overrides:
initin classjavax.servlet.GenericServlet- Throws:
javax.servlet.ServletException
-
getStorage
protected IStorage getStorage()
-
getMapper
protected com.fasterxml.jackson.databind.ObjectMapper getMapper()
-
plainTextToHtml
protected String plainTextToHtml(String input) throws IOException
- Throws:
IOException
-
generatePst
protected org.jsoup.nodes.Element generatePst(com.fasterxml.jackson.databind.JsonNode stats)
-
setPstAttribute
protected void setPstAttribute(javax.servlet.http.HttpServletRequest request, String corpus, String document) throws IOException- Throws:
IOException
-
setMetadataAttributes
protected void setMetadataAttributes(javax.servlet.http.HttpServletRequest request, String corpus, String document) throws IOException- Throws:
IOException
-
setStatsAttribute
protected void setStatsAttribute(javax.servlet.http.HttpServletRequest request, String corpus, String document) throws IOException- Throws:
IOException
-
getAnnotationDescription
protected com.fasterxml.jackson.databind.node.ObjectNode getAnnotationDescription(String corpus, String document, String annotation) throws IOException
- Throws:
IOException
-
setAnnotationDescriptionsAttribute
protected void setAnnotationDescriptionsAttribute(javax.servlet.http.HttpServletRequest request, String corpus, String document) throws IOException- Throws:
IOException
-
setContentTypeJson
protected void setContentTypeJson(javax.servlet.http.HttpServletResponse response)
-
createObjectTidy
protected com.fasterxml.jackson.databind.node.ObjectNode createObjectTidy(int id, String name, BigDecimal score)
-
createObject
protected com.fasterxml.jackson.databind.node.ObjectNode createObject(int id, String name, BigDecimal score)
-
createObjectCloud
protected com.fasterxml.jackson.databind.node.ObjectNode createObjectCloud(int id, String name, BigDecimal score)
-
reformatTidyArray
protected com.fasterxml.jackson.databind.node.ArrayNode reformatTidyArray(com.fasterxml.jackson.databind.node.ArrayNode input, String format)
-
calculateSimilarity
protected Double calculateSimilarity(String targetCorpus, String corpus, String document) throws IOException
- Throws:
IOException
-
setDocumentListAttribute
protected void setDocumentListAttribute(javax.servlet.http.HttpServletRequest request, String corpus) throws IOException- Throws:
IOException
-
-