Bibliography
Inheritance: java.lang.Object
public class Bibliography
Represents the list of bibliography sources available in the document.
Examples:
Shows how to get bibliography sources available in the document.
Document document = new Document(getMyDir() + "Bibliography sources.docx");
Bibliography bibliography = document.getBibliography();
Assert.assertEquals(12, bibliography.getSources().size());
Collection sources = bibliography.getSources();
Source source = (Source)bibliography.getSources().toArray()[0];
Assert.assertEquals("Book 0 (No LCID)", source.getTitle());
Assert.assertEquals(SourceType.BOOK, source.getSourceType());
Assert.assertNull(source.getAbbreviatedCaseNumber());
Assert.assertNull(source.getAlbumTitle());
Assert.assertNull(source.getBookTitle());
Assert.assertNull(source.getBroadcaster());
Assert.assertNull(source.getBroadcastTitle());
Assert.assertNull(source.getCaseNumber());
Assert.assertNull(source.getChapterNumber());
Assert.assertNull(source.getComments());
Assert.assertNull(source.getConferenceName());
Assert.assertNull(source.getCountryOrRegion());
Assert.assertNull(source.getCourt());
Assert.assertNull(source.getDay());
Assert.assertNull(source.getDayAccessed());
Assert.assertNull(source.getDepartment());
Assert.assertNull(source.getDistributor());
Assert.assertNull(source.getEdition());
Assert.assertNull(source.getGuid());
Assert.assertNull(source.getInstitution());
Assert.assertNull(source.getInternetSiteTitle());
Assert.assertNull(source.getIssue());
Assert.assertNull(source.getJournalName());
Assert.assertNull(source.getLcid());
Assert.assertNull(source.getMedium());
Assert.assertNull(source.getMonth());
Assert.assertNull(source.getMonthAccessed());
Assert.assertNull(source.getNumberVolumes());
Assert.assertNull(source.getPages());
Assert.assertNull(source.getPatentNumber());
Assert.assertNull(source.getPeriodicalTitle());
Assert.assertNull(source.getProductionCompany());
Assert.assertNull(source.getPublicationTitle());
Assert.assertNull(source.getPublisher());
Assert.assertNull(source.getRecordingNumber());
Assert.assertNull(source.getRefOrder());
Assert.assertNull(source.getReporter());
Assert.assertNull(source.getShortTitle());
Assert.assertNull(source.getStandardNumber());
Assert.assertNull(source.getStateOrProvince());
Assert.assertNull(source.getStation());
Assert.assertEquals("BookNoLCID", source.getTag());
Assert.assertNull(source.getTheater());
Assert.assertNull(source.getThesisType());
Assert.assertNull(source.getType());
Assert.assertNull(source.getUrl());
Assert.assertNull(source.getVersion());
Assert.assertNull(source.getVolume());
Assert.assertNull(source.getYear());
Assert.assertNull(source.getYearAccessed());
ContributorCollection contributors = source.getContributors();
Assert.assertNull(contributors.getArtist());
Assert.assertNull(contributors.getBookAuthor());
Assert.assertNull(contributors.getCompiler());
Assert.assertNull(contributors.getComposer());
Assert.assertNull(contributors.getConductor());
Assert.assertNull(contributors.getCounsel());
Assert.assertNull(contributors.getDirector());
Assert.assertNotNull(contributors.getEditor());
Assert.assertNull(contributors.getInterviewee());
Assert.assertNull(contributors.getInterviewer());
Assert.assertNull(contributors.getInventor());
Assert.assertNull(contributors.getPerformer());
Assert.assertNull(contributors.getProducer());
Assert.assertNotNull(contributors.getTranslator());
Assert.assertNull(contributors.getWriter());
Contributor editor = contributors.getEditor();
Assert.assertEquals(2, ((PersonCollection)editor).getCount());
PersonCollection authors = (PersonCollection)contributors.getAuthor();
Assert.assertEquals(2, authors.getCount());
Person person = authors.get(0);
Assert.assertEquals("Roxanne", person.getFirst());
Assert.assertEquals("Brielle", person.getMiddle());
Assert.assertEquals("Tejeda", person.getLast());
Methods
Method | Description |
---|---|
getBibliographyStyle() | Gets a string that represents the name of the active style to use for a bibliography. |
getSources() | Gets a collection that represents all the sources contained in a bibliography. |
setBibliographyStyle(String value) | Sets a string that represents the name of the active style to use for a bibliography. |
getBibliographyStyle()
public String getBibliographyStyle()
Gets a string that represents the name of the active style to use for a bibliography.
Returns: java.lang.String - A string that represents the name of the active style to use for a bibliography.
getSources()
public ArrayList getSources()
Gets a collection that represents all the sources contained in a bibliography.
Examples:
Shows how to get bibliography sources available in the document.
Document document = new Document(getMyDir() + "Bibliography sources.docx");
Bibliography bibliography = document.getBibliography();
Assert.assertEquals(12, bibliography.getSources().size());
Collection sources = bibliography.getSources();
Source source = (Source)bibliography.getSources().toArray()[0];
Assert.assertEquals("Book 0 (No LCID)", source.getTitle());
Assert.assertEquals(SourceType.BOOK, source.getSourceType());
Assert.assertNull(source.getAbbreviatedCaseNumber());
Assert.assertNull(source.getAlbumTitle());
Assert.assertNull(source.getBookTitle());
Assert.assertNull(source.getBroadcaster());
Assert.assertNull(source.getBroadcastTitle());
Assert.assertNull(source.getCaseNumber());
Assert.assertNull(source.getChapterNumber());
Assert.assertNull(source.getComments());
Assert.assertNull(source.getConferenceName());
Assert.assertNull(source.getCountryOrRegion());
Assert.assertNull(source.getCourt());
Assert.assertNull(source.getDay());
Assert.assertNull(source.getDayAccessed());
Assert.assertNull(source.getDepartment());
Assert.assertNull(source.getDistributor());
Assert.assertNull(source.getEdition());
Assert.assertNull(source.getGuid());
Assert.assertNull(source.getInstitution());
Assert.assertNull(source.getInternetSiteTitle());
Assert.assertNull(source.getIssue());
Assert.assertNull(source.getJournalName());
Assert.assertNull(source.getLcid());
Assert.assertNull(source.getMedium());
Assert.assertNull(source.getMonth());
Assert.assertNull(source.getMonthAccessed());
Assert.assertNull(source.getNumberVolumes());
Assert.assertNull(source.getPages());
Assert.assertNull(source.getPatentNumber());
Assert.assertNull(source.getPeriodicalTitle());
Assert.assertNull(source.getProductionCompany());
Assert.assertNull(source.getPublicationTitle());
Assert.assertNull(source.getPublisher());
Assert.assertNull(source.getRecordingNumber());
Assert.assertNull(source.getRefOrder());
Assert.assertNull(source.getReporter());
Assert.assertNull(source.getShortTitle());
Assert.assertNull(source.getStandardNumber());
Assert.assertNull(source.getStateOrProvince());
Assert.assertNull(source.getStation());
Assert.assertEquals("BookNoLCID", source.getTag());
Assert.assertNull(source.getTheater());
Assert.assertNull(source.getThesisType());
Assert.assertNull(source.getType());
Assert.assertNull(source.getUrl());
Assert.assertNull(source.getVersion());
Assert.assertNull(source.getVolume());
Assert.assertNull(source.getYear());
Assert.assertNull(source.getYearAccessed());
ContributorCollection contributors = source.getContributors();
Assert.assertNull(contributors.getArtist());
Assert.assertNull(contributors.getBookAuthor());
Assert.assertNull(contributors.getCompiler());
Assert.assertNull(contributors.getComposer());
Assert.assertNull(contributors.getConductor());
Assert.assertNull(contributors.getCounsel());
Assert.assertNull(contributors.getDirector());
Assert.assertNotNull(contributors.getEditor());
Assert.assertNull(contributors.getInterviewee());
Assert.assertNull(contributors.getInterviewer());
Assert.assertNull(contributors.getInventor());
Assert.assertNull(contributors.getPerformer());
Assert.assertNull(contributors.getProducer());
Assert.assertNotNull(contributors.getTranslator());
Assert.assertNull(contributors.getWriter());
Contributor editor = contributors.getEditor();
Assert.assertEquals(2, ((PersonCollection)editor).getCount());
PersonCollection authors = (PersonCollection)contributors.getAuthor();
Assert.assertEquals(2, authors.getCount());
Person person = authors.get(0);
Assert.assertEquals("Roxanne", person.getFirst());
Assert.assertEquals("Brielle", person.getMiddle());
Assert.assertEquals("Tejeda", person.getLast());
Returns: java.util.ArrayList - A collection that represents all the sources contained in a bibliography.
setBibliographyStyle(String value)
public void setBibliographyStyle(String value)
Sets a string that represents the name of the active style to use for a bibliography.
Parameters:
Parameter | Type | Description |
---|---|---|
value | java.lang.String | A string that represents the name of the active style to use for a bibliography. |