Person
Inheritance: java.lang.Object
public class Person
Represents individual (a person) bibliography source contributor.
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());
Constructors
Constructor | Description |
---|---|
Person(String last, String first, String middle) | Initialize a new instance of the Person class. |
Methods
Method | Description |
---|---|
equals(Person other) | |
equals(Object obj) | |
getFirst() | Gets the first name of a person. |
getLast() | Gets the last name of a person. |
getMiddle() | Gets the middle name of a person. |
hashCode() | |
setFirst(String value) | Sets the first name of a person. |
setLast(String value) | Sets the last name of a person. |
setMiddle(String value) | Sets the middle name of a person. |
Person(String last, String first, String middle)
public Person(String last, String first, String middle)
Initialize a new instance of the Person class.
Parameters:
Parameter | Type | Description |
---|---|---|
last | java.lang.String | The last name. |
first | java.lang.String | The last name. |
middle | java.lang.String | The last name. |
equals(Person other)
public boolean equals(Person other)
Parameters:
Parameter | Type | Description |
---|---|---|
other | Person |
Returns: boolean
equals(Object obj)
public boolean equals(Object obj)
Parameters:
Parameter | Type | Description |
---|---|---|
obj | java.lang.Object |
Returns: boolean
getFirst()
public String getFirst()
Gets the first name of a person.
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.lang.String - The first name of a person.
getLast()
public String getLast()
Gets the last name of a person.
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.lang.String - The last name of a person.
getMiddle()
public String getMiddle()
Gets the middle name of a person.
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.lang.String - The middle name of a person.
hashCode()
public int hashCode()
Returns: int
setFirst(String value)
public void setFirst(String value)
Sets the first name of a person.
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());
Parameters:
Parameter | Type | Description |
---|---|---|
value | java.lang.String | The first name of a person. |
setLast(String value)
public void setLast(String value)
Sets the last name of a person.
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());
Parameters:
Parameter | Type | Description |
---|---|---|
value | java.lang.String | The last name of a person. |
setMiddle(String value)
public void setMiddle(String value)
Sets the middle name of a person.
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());
Parameters:
Parameter | Type | Description |
---|---|---|
value | java.lang.String | The middle name of a person. |