public class PaperDocAccess extends DocumentAccess
| Constructor and Description |
|---|
PaperDocAccess() |
| Modifier and Type | Method and Description |
|---|---|
boolean |
addAttachmentForPaper(java.lang.String docId,
byte[] bytes,
java.lang.String fileName)
add text/plain attachment for a paper
|
boolean |
addAttachmentForVolumePaper(java.lang.String docId,
byte[] bytes,
java.lang.String fileName) |
boolean |
addCSVAttachmentForPaper(java.lang.String docId,
byte[] bytes,
java.lang.String fileName)
add csv attachment for a paper
|
boolean |
addHtmlAttachmentForPaper(java.lang.String docId,
byte[] bytes,
java.lang.String fileName)
add text/html attachment for a paper
|
<T> boolean |
addPdfAttachmentForPaper(java.lang.String docId,
byte[] bytes,
java.lang.String fileName,
java.lang.Class<T> classOfT) |
boolean |
addXmlAttachmentForPaper(java.lang.String docId,
byte[] bytes,
java.lang.String fileName)
add text/xml attachment for a paper
|
java.util.ArrayList<CorpusModel> |
getAllCorpus()
get all existing corpus
|
java.util.ArrayList<CorpusModel> |
getAllCorpusByOrgnizer(DocAccessConstants.ResTypeEnum type)
get all existing corpus by orgnizer,exp: ResTypeEnum.acm
|
java.util.ArrayList<CorpusModel> |
getAllCorpusByYear(int year)
get all existing corpus by year, exp:2008
|
java.util.ArrayList<java.lang.String> |
getAllDocumentsOfCorpus(java.lang.String corpusId)
get all paperId list of a given corpus
|
java.lang.String |
getCorpusIdByOrgnizerYearAndConference(DocAccessConstants.ResTypeEnum orgnizer,
int year,
DocAccessConstants.ResConferenceEnum conf) |
java.lang.StringBuffer |
getDocAttachemtContent(java.lang.String docId,
DocAccessConstants.EnumAttachment att) |
PaperDocModel |
getPaperDocumentByDocId(java.lang.String docId)
to get a paper document by the given docId
|
PaperDocModel |
getPaperDocumentByResIdAndResType(java.lang.String pId,
DocAccessConstants.ResTypeEnum resType)
to get a paper document by the IEEE/Pubmed id and resource type
|
java.util.ArrayList<java.lang.String> |
getPaperIdsByAuthor(java.lang.String author,
DocAccessConstants.ResTypeEnum resType)
to get paper docId list by the given author,descending=false
ieee names looks like:
Gammie, G.; Wang, A.; Minh Chau; Gururajarao, S.; Pitts, R.; Jumel, F.; Engel, S.; Royannez, P.; Lagerquist, R.; Mair, H.; Vaccani, J.; Baldwin, G.; Heragu, K.; Mandal, R.; Clinton, M.; Arden, D.; Uming Ko
|
java.util.ArrayList<java.lang.String> |
getPaperIdsByEndYear(java.lang.String endYear,
DocAccessConstants.ResTypeEnum resType)
to get paper docId list by the given year and later,descending=true
|
java.util.ArrayList<java.lang.String> |
getPaperIdsByPubTitle(java.lang.String pubTitle,
DocAccessConstants.ResTypeEnum resType)
to get paper docId list by the given author,descending=false
|
java.util.ArrayList<java.lang.String> |
getPaperIdsByTerm(java.lang.String aTerm,
DocAccessConstants.ResTypeEnum resType)
to get paper docId list from the given term
|
java.util.ArrayList<java.lang.String> |
getPaperIdsByYear(java.lang.String year,
DocAccessConstants.ResTypeEnum resType)
to get paper docId list by the given year
|
java.util.ArrayList<java.lang.String> |
getPaperIdsByYearAndAuthor(java.lang.String year,
java.lang.String author,
DocAccessConstants.ResTypeEnum resType)
to get paper docId list by the given year, prefix of author,and resType
|
java.util.ArrayList<java.lang.String> |
getPaperIdsByYearAndPubTitle(java.lang.String year,
java.lang.String pubTitle,
DocAccessConstants.ResTypeEnum resType)
to get paper docId list by the given year, prefix of pubTitle,and resType
|
java.util.ArrayList<java.lang.String> |
getPaperIdsByYearAndTerm(java.lang.String year,
java.lang.String aTerm,
DocAccessConstants.ResTypeEnum resType)
to get paper docId list from the given term and year
|
java.util.ArrayList<java.lang.String> |
getPaperIdsByYearRange(java.lang.String yearStart,
java.lang.String yearEnd,
DocAccessConstants.ResTypeEnum resType)
to get paper docId list by the given year and later,descending=true
|
java.util.ArrayList<java.lang.String> |
getPaperTermsByDocId(java.lang.String docId)
to get all the terms(keywords) of a paper document by the given docId
|
java.util.ArrayList<ExtractSentenceModel> |
getSentenceByDocIdAndType(java.lang.String docId,
DocAccessConstants.SentenceTypeEnum type)
get Rhetoric Sentences by docId and Rhetoric type
|
java.lang.String |
getUrlOfPaperAttachment(java.lang.String docId,
DocAccessConstants.EnumAttachment att)
get url of a given attachment
|
VolumePaperModel |
getVolumePaperbyDocId(java.lang.String docId)
to get a Div volume paper by the given docId
|
static void |
main(java.lang.String[] args) |
boolean |
updatePaperdocumentByDoc(PaperDocModel newModel)
update or add new properties of a PaperDocModel, the pModel should contain docId in property:id
|
findDocument, getAttachmentsByDocId, getDbClient, getDBUri, getList, getListBy2Parameters, getListByParameter, getVolumePaperAttachmentsByDocId, printClassPath, remove, removeAllByViewAndClass, removeDocument, saveDocument, saveModel, updateDocument, viewpublic boolean addHtmlAttachmentForPaper(java.lang.String docId,
byte[] bytes,
java.lang.String fileName)
docId - document id from a DB documentbytes - file ContentfileName - the name should include its suffix, exp: "a.txt,b.html"public boolean addAttachmentForPaper(java.lang.String docId,
byte[] bytes,
java.lang.String fileName)
docId - document id from a DB documentbytes - file ContentfileName - the name should include its suffix, exp: "a.txt,b.html"public boolean addAttachmentForVolumePaper(java.lang.String docId,
byte[] bytes,
java.lang.String fileName)
public boolean addXmlAttachmentForPaper(java.lang.String docId,
byte[] bytes,
java.lang.String fileName)
docId - document id from a DB documentbytes - file ContentfileName - the name should include its suffix, exp: "a.txt,c.xml"public <T> boolean addPdfAttachmentForPaper(java.lang.String docId,
byte[] bytes,
java.lang.String fileName,
java.lang.Class<T> classOfT)
public boolean addCSVAttachmentForPaper(java.lang.String docId,
byte[] bytes,
java.lang.String fileName)
docId - paper idbytes - contentsfileName - a name of this file exp:Token.csvpublic boolean updatePaperdocumentByDoc(PaperDocModel newModel)
newModel - a model with all needed property values, should be get from DBpublic java.util.ArrayList<java.lang.String> getPaperTermsByDocId(java.lang.String docId)
docId - document id of a record in DBpublic PaperDocModel getPaperDocumentByDocId(java.lang.String docId)
docId - document id of a record in DBpublic VolumePaperModel getVolumePaperbyDocId(java.lang.String docId)
docId - paper idpublic PaperDocModel getPaperDocumentByResIdAndResType(java.lang.String pId, DocAccessConstants.ResTypeEnum resType)
pId - IEEE/Pubmed idresType - resource typepublic java.lang.String getUrlOfPaperAttachment(java.lang.String docId,
DocAccessConstants.EnumAttachment att)
docId - paper idatt - of attachment from EnumAttachmentpublic java.lang.StringBuffer getDocAttachemtContent(java.lang.String docId,
DocAccessConstants.EnumAttachment att)
public java.util.ArrayList<java.lang.String> getPaperIdsByYearAndTerm(java.lang.String year,
java.lang.String aTerm,
DocAccessConstants.ResTypeEnum resType)
year - exp:"2013"aTerm - match a term start from given termresType - Pubmed / IEEEpublic java.util.ArrayList<java.lang.String> getPaperIdsByTerm(java.lang.String aTerm,
DocAccessConstants.ResTypeEnum resType)
aTerm - search term which is used to match "thesaurusterms","controlledterms" and "controlledterms"resType - Pubmed / IEEEpublic java.util.ArrayList<java.lang.String> getPaperIdsByEndYear(java.lang.String endYear,
DocAccessConstants.ResTypeEnum resType)
endYear - from current year to the endYearresType - Pubmed / IEEEpublic java.util.ArrayList<java.lang.String> getPaperIdsByYear(java.lang.String year,
DocAccessConstants.ResTypeEnum resType)
year - exp:2002resType - Pubmed / IEEEpublic java.util.ArrayList<java.lang.String> getPaperIdsByYearRange(java.lang.String yearStart,
java.lang.String yearEnd,
DocAccessConstants.ResTypeEnum resType)
yearStart - exp:"2008"yearEnd - exp:"2013"resType - Pubmed / IEEEpublic java.util.ArrayList<java.lang.String> getPaperIdsByYearAndAuthor(java.lang.String year,
java.lang.String author,
DocAccessConstants.ResTypeEnum resType)
year - exp:"2013"author - match authors start from the given authorresType - Pubmed / IEEEpublic java.util.ArrayList<java.lang.String> getPaperIdsByAuthor(java.lang.String author,
DocAccessConstants.ResTypeEnum resType)
author - exp: "Minh"resType - Pubmed / IEEEpublic java.util.ArrayList<java.lang.String> getPaperIdsByYearAndPubTitle(java.lang.String year,
java.lang.String pubTitle,
DocAccessConstants.ResTypeEnum resType)
year - exp:"2002"pubTitle - match a pubTitle start with given pubTitleresType - Pubmed / IEEEpublic java.util.ArrayList<java.lang.String> getPaperIdsByPubTitle(java.lang.String pubTitle,
DocAccessConstants.ResTypeEnum resType)
pubTitle - match a pubTitle start with given pubTitleresType - Pubmed / IEEEpublic java.util.ArrayList<CorpusModel> getAllCorpus()
public java.util.ArrayList<CorpusModel> getAllCorpusByOrgnizer(DocAccessConstants.ResTypeEnum type)
type - resource type , exp: acm or ieeepublic java.util.ArrayList<CorpusModel> getAllCorpusByYear(int year)
year - exp:2008public java.lang.String getCorpusIdByOrgnizerYearAndConference(DocAccessConstants.ResTypeEnum orgnizer, int year, DocAccessConstants.ResConferenceEnum conf)
public java.util.ArrayList<java.lang.String> getAllDocumentsOfCorpus(java.lang.String corpusId)
corpusId - id of a corpuspublic java.util.ArrayList<ExtractSentenceModel> getSentenceByDocIdAndType(java.lang.String docId, DocAccessConstants.SentenceTypeEnum type)
docId - paper idtype - a SentenceTypeEnum typepublic static void main(java.lang.String[] args)