// Globals.getEntryType(mapMSBibToBibtexTypeString(sourceType)));
// BibtexEntry entry = new BibtexEntry(BibtexFields.DEFAULT_BIBTEXENTRY_ID,
// mapMSBibToBibtexType(sourceType));
BibtexEntry entry = null;
if(tag == null)
entry = new BibtexEntry(BibtexFields.DEFAULT_BIBTEXENTRY_ID,
mapMSBibToBibtexType(sourceType));
else
entry = new BibtexEntry(tag,
mapMSBibToBibtexType(sourceType)); // id assumes an existing database so don't
// Todo: add check for BibTexEntry types
// BibtexEntry entry = new BibtexEntry();
// if(sourceType.equals("Book"))
// entry.setType(BibtexEntryType.BOOK);
// else if(sourceType.equals("BookSection"))
// entry.setType(BibtexEntryType.INBOOK);
// else if(sourceType.equals("JournalArticle"))
// entry.setType(BibtexEntryType.ARTICLE);
// else if(sourceType.equals("ArticleInAPeriodical"))
// entry.setType(BibtexEntryType.ARTICLE);
// else if(sourceType.equals("ConferenceProceedings"))
// entry.setType(BibtexEntryType.CONFERENCE);
// else if(sourceType.equals("Report"))
// entry.setType(BibtexEntryType.TECHREPORT);
// else if(sourceType.equals("InternetSite"))
// entry.setType(BibtexEntryType.OTHER);
// else if(sourceType.equals("DocumentFromInternetSite"))
// entry.setType(BibtexEntryType.OTHER);
// else if(sourceType.equals("DocumentFromInternetSite"))
// entry.setType(BibtexEntryType.OTHER);
// else if(sourceType.equals("ElectronicSource"))
// entry.setType(BibtexEntryType.OTHER);
// else if(sourceType.equals("Art"))
// entry.setType(BibtexEntryType.OTHER);
// else if(sourceType.equals("SoundRecording"))
// entry.setType(BibtexEntryType.OTHER);
// else if(sourceType.equals("Performance"))
// entry.setType(BibtexEntryType.OTHER);
// else if(sourceType.equals("Film"))
// entry.setType(BibtexEntryType.OTHER);
// else if(sourceType.equals("Interview"))
// entry.setType(BibtexEntryType.OTHER);
// else if(sourceType.equals("Patent"))
// entry.setType(BibtexEntryType.OTHER);
// else if(sourceType.equals("Case"))
// entry.setType(BibtexEntryType.OTHER);
// else if(sourceType.equals("Misc"))
// entry.setType(BibtexEntryType.MISC);
// else
// entry.setType(BibtexEntryType.MISC);
HashMap<String, String> hm = new HashMap<String, String>();
if(tag != null)
hm.put("bibtexkey",tag);
// if(GUID != null)
// hm.put("GUID",GUID);
if(LCID >= 0)
hm.put("language",getLanguage(LCID));
if(title != null)
hm.put("title",title);
if(year != null)
hm.put("year",year);
if(shortTitle != null)
hm.put(MSBIB+"shorttitle",shortTitle);
if(comments != null)
hm.put("note",comments);
addAuthor(hm,"author",authors);
addAuthor(hm,MSBIB+"bookauthor",bookAuthors);
addAuthor(hm,"editor",editors);
addAuthor(hm,MSBIB+"translator",translators);
addAuthor(hm,MSBIB+"producername",producerNames);
addAuthor(hm,MSBIB+"composer",composers);
addAuthor(hm,MSBIB+"conductor",conductors);
addAuthor(hm,MSBIB+"performer",performers);
addAuthor(hm,MSBIB+"writer",writers);
addAuthor(hm,MSBIB+"director",directors);
addAuthor(hm,MSBIB+"compiler",compilers);
addAuthor(hm,MSBIB+"interviewer",interviewers);
addAuthor(hm,MSBIB+"interviewee",interviewees);
addAuthor(hm,MSBIB+"inventor",inventors);
addAuthor(hm,MSBIB+"counsel",counsels);
if(pages !=null )
hm.put("pages",pages.toString("--"));
if(volume !=null )
hm.put("volume",volume);
if(numberOfVolumes !=null )
hm.put(MSBIB+"numberofvolume",numberOfVolumes);
if(edition !=null )
hm.put("edition",edition);
if(edition !=null )
hm.put("edition",edition);
parseStandardNumber(standardNumber,hm);
if(publisher !=null )
hm.put("publisher",publisher);
if(publisher !=null )
hm.put("publisher",publisher);
if(address !=null )
hm.put("address",address);
if(bookTitle !=null )
hm.put("booktitle",bookTitle);
if(chapterNumber !=null )
hm.put("chapter",chapterNumber);
if(journalName !=null )
hm.put("journal",journalName);
if(issue !=null )
hm.put("number",issue);
if(periodicalTitle !=null )
hm.put("organization",periodicalTitle);
if(conferenceName !=null )
hm.put("organization",conferenceName);
if(department !=null )
hm.put("school",department);
if(institution !=null )
hm.put("institution",institution);
// if(thesisType !=null )
// hm.put("type",thesisType);
// if(internetSiteTitle !=null )
// hm.put("title",internetSiteTitle);
if(dateAccessed !=null )
hm.put(MSBIB+"accessed",dateAccessed);
if(url !=null )
hm.put("url",url);
if(productionCompany !=null )
hm.put(MSBIB+"productioncompany",productionCompany);
// if(publicationTitle !=null )
// hm.put("title",publicationTitle);
if(medium !=null )
hm.put(MSBIB+"medium",medium);
// if(albumTitle !=null )
// hm.put("title",albumTitle);
if(recordingNumber !=null )
hm.put(MSBIB+"recordingnumber",recordingNumber);
if(theater !=null )
hm.put(MSBIB+"theater",theater);
if(distributor !=null )
hm.put(MSBIB+"distributor",distributor);
// if(broadcastTitle !=null )
// hm.put("title",broadcastTitle);
if(broadcaster !=null )
hm.put(MSBIB+"broadcaster",broadcaster);
if(station !=null )
hm.put(MSBIB+"station",station);
if(type !=null )
hm.put(MSBIB+"type",type);
if(patentNumber !=null )
hm.put(MSBIB+"patentnumber",patentNumber);
if(court !=null )
hm.put(MSBIB+"court",court);
if(reporter !=null )
hm.put(MSBIB+"reporter",reporter);
if(caseNumber !=null )
hm.put(MSBIB+"casenumber",caseNumber);
if(abbreviatedCaseNumber !=null )
hm.put(MSBIB+"abbreviatedcasenumber",abbreviatedCaseNumber);
if(bibTex_Series !=null )
hm.put("series",bibTex_Series);
if(bibTex_Abstract !=null )
hm.put("abstract",bibTex_Abstract);
if(bibTex_KeyWords !=null )
hm.put("keywords",bibTex_KeyWords);
if(bibTex_CrossRef !=null )
hm.put("crossref",bibTex_CrossRef);
if(bibTex_HowPublished !=null )
hm.put("howpublished",bibTex_HowPublished);
if(bibTex_Affiliation !=null )
hm.put("affiliation",bibTex_Affiliation);
if(bibTex_Contents !=null )
hm.put("contents",bibTex_Contents);
if(bibTex_Copyright !=null )
hm.put("copyright",bibTex_Copyright);
if(bibTex_Price !=null )
hm.put("price",bibTex_Price);
if(bibTex_Size !=null )
hm.put("size",bibTex_Size);
entry.setField(hm);
return entry;
}