Class FileStorage
- java.lang.Object
-
- io.outofprintmagazine.web.storage.FileStorage
-
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description com.fasterxml.jackson.databind.JsonNode
getCorpusAggregatesIdfJson(String corpus)
String
getCorpusAggregatesIdfString(String corpus)
com.fasterxml.jackson.databind.JsonNode
getCorpusAggregatesJson(String corpus)
com.fasterxml.jackson.databind.JsonNode
getCorpusAggregatesMBJson(String corpus)
String
getCorpusAggregatesMBString(String corpus)
String
getCorpusAggregatesString(String corpus)
com.fasterxml.jackson.databind.JsonNode
getCorpusBatchJson(String corpus)
String
getCorpusBatchString(String corpus)
com.fasterxml.jackson.databind.JsonNode
getCorpusDocumentAggregatesJson(String corpus, String document)
String
getCorpusDocumentAggregatesString(String corpus, String document)
protected com.fasterxml.jackson.databind.JsonNode
getCorpusDocumentJson(String corpus, String scratchFileName)
com.fasterxml.jackson.databind.JsonNode
getCorpusDocumentLexiconLemma(String corpus, String document, String lemma)
com.fasterxml.jackson.databind.JsonNode
getCorpusDocumentOOPJson(String corpus, String document)
com.fasterxml.jackson.databind.node.ObjectNode
getCorpusDocumentOOPMetadata(String corpus, String document)
String
getCorpusDocumentOOPString(String corpus, String document)
com.fasterxml.jackson.databind.JsonNode
getCorpusDocumentPipelineJson(String corpus, String document)
String
getCorpusDocumentPipelineString(String corpus, String document)
com.fasterxml.jackson.databind.JsonNode
getCorpusDocumentStanfordJson(String corpus, String document)
String
getCorpusDocumentStanfordString(String corpus, String document)
protected InputStream
getCorpusDocumentStream(String corpus, String scratchFileName)
protected String
getCorpusDocumentString(String corpus, String scratchFileName)
com.fasterxml.jackson.databind.JsonNode
getCorpusDocumentTfidfJson(String corpus, String document)
String
getCorpusDocumentTfidfString(String corpus, String document)
com.fasterxml.jackson.databind.JsonNode
getCorpusDocumentTopicModelLemma(String corpus, String document, String lemma)
com.fasterxml.jackson.databind.JsonNode
getCorpusDocumentTopicModelLemmaPOS(String corpus, String document, String lemma)
String
getCorpusDocumentTxtString(String corpus, String document)
com.fasterxml.jackson.databind.JsonNode
getCorpusDocumentZJson(String corpus, String document)
String
getCorpusDocumentZString(String corpus, String document)
protected String
getCorpusFilePath(String corpus, String fileName)
protected String
getCorpusPath(String corpus)
com.fasterxml.jackson.databind.JsonNode
getCorpusTopicModelLemma(String corpus, String lemma)
com.fasterxml.jackson.databind.JsonNode
getCorpusTopicModelLemmaPOS(String corpus, String lemma)
static FileStorage
getInstance(Properties p)
protected com.fasterxml.jackson.databind.ObjectMapper
getMapper()
com.fasterxml.jackson.databind.node.ArrayNode
listCorpora()
com.fasterxml.jackson.databind.node.ArrayNode
listCorpusDocuments(String corpus)
-
-
-
Method Detail
-
getMapper
protected com.fasterxml.jackson.databind.ObjectMapper getMapper()
-
getInstance
public static FileStorage getInstance(Properties p) throws IOException
- Throws:
IOException
-
getCorpusPath
protected String getCorpusPath(String corpus) throws IOException
- Throws:
IOException
-
getCorpusFilePath
protected String getCorpusFilePath(String corpus, String fileName) throws IOException
- Throws:
IOException
-
getCorpusDocumentStream
protected InputStream getCorpusDocumentStream(String corpus, String scratchFileName) throws IOException
- Throws:
IOException
-
getCorpusDocumentString
protected String getCorpusDocumentString(String corpus, String scratchFileName) throws IOException
- Throws:
IOException
-
getCorpusDocumentJson
protected com.fasterxml.jackson.databind.JsonNode getCorpusDocumentJson(String corpus, String scratchFileName) throws IOException
- Throws:
IOException
-
listCorpora
public com.fasterxml.jackson.databind.node.ArrayNode listCorpora() throws IOException
- Specified by:
listCorpora
in interfaceIStorage
- Throws:
IOException
-
getCorpusBatchString
public String getCorpusBatchString(String corpus) throws IOException
- Specified by:
getCorpusBatchString
in interfaceIStorage
- Throws:
IOException
-
getCorpusBatchJson
public com.fasterxml.jackson.databind.JsonNode getCorpusBatchJson(String corpus) throws IOException
- Specified by:
getCorpusBatchJson
in interfaceIStorage
- Throws:
IOException
-
getCorpusAggregatesString
public String getCorpusAggregatesString(String corpus) throws IOException
- Specified by:
getCorpusAggregatesString
in interfaceIStorage
- Throws:
IOException
-
getCorpusAggregatesJson
public com.fasterxml.jackson.databind.JsonNode getCorpusAggregatesJson(String corpus) throws IOException
- Specified by:
getCorpusAggregatesJson
in interfaceIStorage
- Throws:
IOException
-
getCorpusAggregatesIdfString
public String getCorpusAggregatesIdfString(String corpus) throws IOException
- Specified by:
getCorpusAggregatesIdfString
in interfaceIStorage
- Throws:
IOException
-
getCorpusAggregatesIdfJson
public com.fasterxml.jackson.databind.JsonNode getCorpusAggregatesIdfJson(String corpus) throws IOException
- Specified by:
getCorpusAggregatesIdfJson
in interfaceIStorage
- Throws:
IOException
-
listCorpusDocuments
public com.fasterxml.jackson.databind.node.ArrayNode listCorpusDocuments(String corpus) throws IOException
- Specified by:
listCorpusDocuments
in interfaceIStorage
- Throws:
IOException
-
getCorpusDocumentTxtString
public String getCorpusDocumentTxtString(String corpus, String document) throws IOException
- Specified by:
getCorpusDocumentTxtString
in interfaceIStorage
- Throws:
IOException
-
getCorpusDocumentOOPString
public String getCorpusDocumentOOPString(String corpus, String document) throws IOException
- Specified by:
getCorpusDocumentOOPString
in interfaceIStorage
- Throws:
IOException
-
getCorpusDocumentOOPJson
public com.fasterxml.jackson.databind.JsonNode getCorpusDocumentOOPJson(String corpus, String document) throws IOException
- Specified by:
getCorpusDocumentOOPJson
in interfaceIStorage
- Throws:
IOException
-
getCorpusDocumentAggregatesString
public String getCorpusDocumentAggregatesString(String corpus, String document) throws IOException
- Specified by:
getCorpusDocumentAggregatesString
in interfaceIStorage
- Throws:
IOException
-
getCorpusDocumentAggregatesJson
public com.fasterxml.jackson.databind.JsonNode getCorpusDocumentAggregatesJson(String corpus, String document) throws IOException
- Specified by:
getCorpusDocumentAggregatesJson
in interfaceIStorage
- Throws:
IOException
-
getCorpusDocumentPipelineString
public String getCorpusDocumentPipelineString(String corpus, String document) throws IOException
- Specified by:
getCorpusDocumentPipelineString
in interfaceIStorage
- Throws:
IOException
-
getCorpusDocumentPipelineJson
public com.fasterxml.jackson.databind.JsonNode getCorpusDocumentPipelineJson(String corpus, String document) throws IOException
- Specified by:
getCorpusDocumentPipelineJson
in interfaceIStorage
- Throws:
IOException
-
getCorpusDocumentStanfordString
public String getCorpusDocumentStanfordString(String corpus, String document) throws IOException
- Specified by:
getCorpusDocumentStanfordString
in interfaceIStorage
- Throws:
IOException
-
getCorpusDocumentStanfordJson
public com.fasterxml.jackson.databind.JsonNode getCorpusDocumentStanfordJson(String corpus, String document) throws IOException
- Specified by:
getCorpusDocumentStanfordJson
in interfaceIStorage
- Throws:
IOException
-
getCorpusDocumentOOPMetadata
public com.fasterxml.jackson.databind.node.ObjectNode getCorpusDocumentOOPMetadata(String corpus, String document) throws IOException
- Specified by:
getCorpusDocumentOOPMetadata
in interfaceIStorage
- Throws:
IOException
-
getCorpusDocumentTfidfString
public String getCorpusDocumentTfidfString(String corpus, String document) throws IOException
- Specified by:
getCorpusDocumentTfidfString
in interfaceIStorage
- Throws:
IOException
-
getCorpusDocumentTfidfJson
public com.fasterxml.jackson.databind.JsonNode getCorpusDocumentTfidfJson(String corpus, String document) throws IOException
- Specified by:
getCorpusDocumentTfidfJson
in interfaceIStorage
- Throws:
IOException
-
getCorpusDocumentZString
public String getCorpusDocumentZString(String corpus, String document) throws IOException
- Specified by:
getCorpusDocumentZString
in interfaceIStorage
- Throws:
IOException
-
getCorpusDocumentZJson
public com.fasterxml.jackson.databind.JsonNode getCorpusDocumentZJson(String corpus, String document) throws IOException
- Specified by:
getCorpusDocumentZJson
in interfaceIStorage
- Throws:
IOException
-
getCorpusAggregatesMBString
public String getCorpusAggregatesMBString(String corpus) throws IOException
- Specified by:
getCorpusAggregatesMBString
in interfaceIStorage
- Throws:
IOException
-
getCorpusAggregatesMBJson
public com.fasterxml.jackson.databind.JsonNode getCorpusAggregatesMBJson(String corpus) throws IOException
- Specified by:
getCorpusAggregatesMBJson
in interfaceIStorage
- Throws:
IOException
-
getCorpusTopicModelLemma
public com.fasterxml.jackson.databind.JsonNode getCorpusTopicModelLemma(String corpus, String lemma) throws IOException
- Specified by:
getCorpusTopicModelLemma
in interfaceIStorage
- Throws:
IOException
-
getCorpusTopicModelLemmaPOS
public com.fasterxml.jackson.databind.JsonNode getCorpusTopicModelLemmaPOS(String corpus, String lemma) throws IOException
- Specified by:
getCorpusTopicModelLemmaPOS
in interfaceIStorage
- Throws:
IOException
-
getCorpusDocumentTopicModelLemma
public com.fasterxml.jackson.databind.JsonNode getCorpusDocumentTopicModelLemma(String corpus, String document, String lemma) throws IOException
- Specified by:
getCorpusDocumentTopicModelLemma
in interfaceIStorage
- Throws:
IOException
-
getCorpusDocumentTopicModelLemmaPOS
public com.fasterxml.jackson.databind.JsonNode getCorpusDocumentTopicModelLemmaPOS(String corpus, String document, String lemma) throws IOException
- Specified by:
getCorpusDocumentTopicModelLemmaPOS
in interfaceIStorage
- Throws:
IOException
-
getCorpusDocumentLexiconLemma
public com.fasterxml.jackson.databind.JsonNode getCorpusDocumentLexiconLemma(String corpus, String document, String lemma) throws IOException
- Specified by:
getCorpusDocumentLexiconLemma
in interfaceIStorage
- Throws:
IOException
-
-