Aspose::Words::Bibliography::Source class
Contents
[
Hide
]Source class
Represents an individual source, such as a book, journal article, or interview.
class Source : public System::Object
Methods
| Method | Description |
|---|---|
| Source(const System::String &, Aspose::Words::Bibliography::SourceType) | Initialize a new instance of the Source class. |
| get_AbbreviatedCaseNumber() const | Gets or sets the abbreviated case number of a source. |
| get_AlbumTitle() const | Gets or sets the album title of a source. |
| get_BookTitle() const | Gets or sets the book title of a source. |
| get_BroadcastTitle() const | Gets or sets the broadcast title of a source. |
| get_Broadcaster() const | Gets or sets the broadcaster of a source. |
| get_CaseNumber() const | Gets or sets the case number of a source. |
| get_ChapterNumber() const | Gets or sets the chapter number of a source. |
| get_City() const | Gets or sets the city of a source. |
| get_Comments() const | Gets or sets the comments of a source. |
| get_ConferenceName() const | Gets or sets the conference or proceedings name of a source. |
| get_Contributors() const | Gets contributors list (author, editor, writer etc) of a source. |
| get_CountryOrRegion() const | Gets or sets the country or region of a source. |
| get_Court() const | Gets or sets the court of a source. |
| get_Day() const | Gets or sets the day of a source. |
| get_DayAccessed() const | Gets or sets the day accessed of a source. |
| get_Department() const | Gets or sets the department of a source. |
| get_Distributor() const | Gets or sets the distributor of a source. |
| get_Doi() const | Gets or sets the digital object identifier. |
| get_Edition() const | Gets or sets the editor of a source. |
| get_Guid() const | Gets or sets the guid of a source. |
| get_Institution() const | Gets or sets the institution of a source. |
| get_InternetSiteTitle() const | Gets or sets the internet site title of a source. |
| get_Issue() const | Gets or sets the issue of a source. |
| get_JournalName() const | Gets or sets the journal name of a source. |
| get_Lcid() const | Gets or sets the locale ID of a source. |
| get_Medium() const | Gets or sets the medium of a source. |
| get_Month() const | Gets or sets the month of a source. |
| get_MonthAccessed() const | Gets or sets the month accessed of a source. |
| get_NumberVolumes() const | Gets or sets the number of volumes of a source. |
| get_Pages() const | Gets or sets the pages of a source. |
| get_PatentNumber() const | Gets or sets the patent number of a source. |
| get_PeriodicalTitle() const | Gets or sets the periodical title of a source. |
| get_ProductionCompany() const | Gets or sets the production company of a source. |
| get_PublicationTitle() const | Gets or sets the publication title of a source. |
| get_Publisher() const | Gets or sets the publisher of a source. |
| get_RecordingNumber() const | Gets or sets the recording number of a source. |
| get_RefOrder() const | Gets or sets the reference order of a source. |
| get_Reporter() const | Gets or sets the reporter of a source. |
| get_ShortTitle() const | Gets or sets the short title of a source. |
| get_SourceType() const | Gets or sets the source type of a source. |
| get_StandardNumber() const | Gets or sets the standard number of a source. |
| get_StateOrProvince() const | Gets or sets the state or province of a source. |
| get_Station() const | Gets or sets the station of a source. |
| get_Tag() const | Gets or sets the identifying tag name of a source. |
| get_Theater() const | Gets or sets the theater of a source. |
| get_ThesisType() const | Gets or sets the thesis type of a source. |
| get_Title() const | Gets or sets the title of a source. |
| get_Type() const | Gets or sets the type of a source. |
| get_Url() const | Gets or sets the url of a source. |
| get_Version() const | Gets or sets the version of a source. |
| get_Volume() const | Gets or sets the volume of a source. |
| get_Year() const | Gets or sets the year of a source. |
| get_YearAccessed() const | Gets or sets the year accessed of a source. |
| set_AbbreviatedCaseNumber(const System::String &) | Sets the abbreviated case number of a source. |
| set_AlbumTitle(const System::String &) | Sets the album title of a source. |
| set_BookTitle(const System::String &) | Sets the book title of a source. |
| set_BroadcastTitle(const System::String &) | Sets the broadcast title of a source. |
| set_Broadcaster(const System::String &) | Sets the broadcaster of a source. |
| set_CaseNumber(const System::String &) | Sets the case number of a source. |
| set_ChapterNumber(const System::String &) | Sets the chapter number of a source. |
| set_City(const System::String &) | Sets the city of a source. |
| set_Comments(const System::String &) | Sets the comments of a source. |
| set_ConferenceName(const System::String &) | Sets the conference or proceedings name of a source. |
| set_CountryOrRegion(const System::String &) | Sets the country or region of a source. |
| set_Court(const System::String &) | Sets the court of a source. |
| set_Day(const System::String &) | Sets the day of a source. |
| set_DayAccessed(const System::String &) | Sets the day accessed of a source. |
| set_Department(const System::String &) | Sets the department of a source. |
| set_Distributor(const System::String &) | Sets the distributor of a source. |
| set_Doi(const System::String &) | Sets the digital object identifier. |
| set_Edition(const System::String &) | Sets the editor of a source. |
| set_Guid(const System::String &) | Sets the guid of a source. |
| set_Institution(const System::String &) | Sets the institution of a source. |
| set_InternetSiteTitle(const System::String &) | Sets the internet site title of a source. |
| set_Issue(const System::String &) | Sets the issue of a source. |
| set_JournalName(const System::String &) | Sets the journal name of a source. |
| set_Lcid(const System::String &) | Sets the locale ID of a source. |
| set_Medium(const System::String &) | Sets the medium of a source. |
| set_Month(const System::String &) | Sets the month of a source. |
| set_MonthAccessed(const System::String &) | Sets the month accessed of a source. |
| set_NumberVolumes(const System::String &) | Sets the number of volumes of a source. |
| set_Pages(const System::String &) | Sets the pages of a source. |
| set_PatentNumber(const System::String &) | Sets the patent number of a source. |
| set_PeriodicalTitle(const System::String &) | Sets the periodical title of a source. |
| set_ProductionCompany(const System::String &) | Sets the production company of a source. |
| set_PublicationTitle(const System::String &) | Sets the publication title of a source. |
| set_Publisher(const System::String &) | Sets the publisher of a source. |
| set_RecordingNumber(const System::String &) | Sets the recording number of a source. |
| set_RefOrder(const System::String &) | Sets the reference order of a source. |
| set_Reporter(const System::String &) | Sets the reporter of a source. |
| set_ShortTitle(const System::String &) | Sets the short title of a source. |
| set_SourceType(Aspose::Words::Bibliography::SourceType) | Sets the source type of a source. |
| set_StandardNumber(const System::String &) | Sets the standard number of a source. |
| set_StateOrProvince(const System::String &) | Sets the state or province of a source. |
| set_Station(const System::String &) | Sets the station of a source. |
| set_Tag(const System::String &) | Sets the identifying tag name of a source. |
| set_Theater(const System::String &) | Sets the theater of a source. |
| set_ThesisType(const System::String &) | Sets the thesis type of a source. |
| set_Title(const System::String &) | Sets the title of a source. |
| set_Type(const System::String &) | Sets the type of a source. |
| set_Url(const System::String &) | Sets the url of a source. |
| set_Version(const System::String &) | Sets the version of a source. |
| set_Volume(const System::String &) | Sets the volume of a source. |
| set_Year(const System::String &) | Sets the year of a source. |
| set_YearAccessed(const System::String &) | Sets the year accessed of a source. |
Examples
Shows how to get bibliography sources available in the document.
auto document = System::MakeObject<Aspose::Words::Document>(System::String(get_MyDir() + u"Bibliography sources.docx"));
System::SharedPtr<Aspose::Words::Bibliography::Bibliography> bibliography = document->get_Bibliography();
ASSERT_EQ(bibliography->get_Sources()->get_Count(), 12);
// Get default data from bibliography sources.
System::SharedPtr<Aspose::Words::Bibliography::Source> source = bibliography->get_Sources()->LINQ_FirstOrDefault();
ASSERT_EQ(source->get_Title(), u"Book 0 (No LCID)");
ASSERT_EQ(source->get_SourceType(), SourceType::Book);
ASSERT_EQ(source->get_Contributors()->LINQ_Count(), 3);
ASSERT_TRUE(System::TestTools::IsNull(source->get_AbbreviatedCaseNumber()));
ASSERT_TRUE(System::TestTools::IsNull(source->get_AlbumTitle()));
ASSERT_TRUE(System::TestTools::IsNull(source->get_BookTitle()));
ASSERT_TRUE(System::TestTools::IsNull(source->get_Broadcaster()));
ASSERT_TRUE(System::TestTools::IsNull(source->get_BroadcastTitle()));
ASSERT_TRUE(System::TestTools::IsNull(source->get_CaseNumber()));
ASSERT_TRUE(System::TestTools::IsNull(source->get_ChapterNumber()));
ASSERT_TRUE(System::TestTools::IsNull(source->get_Comments()));
ASSERT_TRUE(System::TestTools::IsNull(source->get_ConferenceName()));
ASSERT_TRUE(System::TestTools::IsNull(source->get_CountryOrRegion()));
ASSERT_TRUE(System::TestTools::IsNull(source->get_Court()));
ASSERT_TRUE(System::TestTools::IsNull(source->get_Day()));
ASSERT_TRUE(System::TestTools::IsNull(source->get_DayAccessed()));
ASSERT_TRUE(System::TestTools::IsNull(source->get_Department()));
ASSERT_TRUE(System::TestTools::IsNull(source->get_Distributor()));
ASSERT_TRUE(System::TestTools::IsNull(source->get_Doi()));
ASSERT_TRUE(System::TestTools::IsNull(source->get_Edition()));
ASSERT_TRUE(System::TestTools::IsNull(source->get_Guid()));
ASSERT_TRUE(System::TestTools::IsNull(source->get_Institution()));
ASSERT_TRUE(System::TestTools::IsNull(source->get_InternetSiteTitle()));
ASSERT_TRUE(System::TestTools::IsNull(source->get_Issue()));
ASSERT_TRUE(System::TestTools::IsNull(source->get_JournalName()));
ASSERT_TRUE(System::TestTools::IsNull(source->get_Lcid()));
ASSERT_TRUE(System::TestTools::IsNull(source->get_Medium()));
ASSERT_TRUE(System::TestTools::IsNull(source->get_Month()));
ASSERT_TRUE(System::TestTools::IsNull(source->get_MonthAccessed()));
ASSERT_TRUE(System::TestTools::IsNull(source->get_NumberVolumes()));
ASSERT_TRUE(System::TestTools::IsNull(source->get_Pages()));
ASSERT_TRUE(System::TestTools::IsNull(source->get_PatentNumber()));
ASSERT_TRUE(System::TestTools::IsNull(source->get_PeriodicalTitle()));
ASSERT_TRUE(System::TestTools::IsNull(source->get_ProductionCompany()));
ASSERT_TRUE(System::TestTools::IsNull(source->get_PublicationTitle()));
ASSERT_TRUE(System::TestTools::IsNull(source->get_Publisher()));
ASSERT_TRUE(System::TestTools::IsNull(source->get_RecordingNumber()));
ASSERT_TRUE(System::TestTools::IsNull(source->get_RefOrder()));
ASSERT_TRUE(System::TestTools::IsNull(source->get_Reporter()));
ASSERT_TRUE(System::TestTools::IsNull(source->get_ShortTitle()));
ASSERT_TRUE(System::TestTools::IsNull(source->get_StandardNumber()));
ASSERT_TRUE(System::TestTools::IsNull(source->get_StateOrProvince()));
ASSERT_TRUE(System::TestTools::IsNull(source->get_Station()));
ASSERT_EQ(source->get_Tag(), u"BookNoLCID");
ASSERT_TRUE(System::TestTools::IsNull(source->get_Theater()));
ASSERT_TRUE(System::TestTools::IsNull(source->get_ThesisType()));
ASSERT_TRUE(System::TestTools::IsNull(source->get_Type()));
ASSERT_TRUE(System::TestTools::IsNull(source->get_Url()));
ASSERT_TRUE(System::TestTools::IsNull(source->get_Version()));
ASSERT_TRUE(System::TestTools::IsNull(source->get_Volume()));
ASSERT_TRUE(System::TestTools::IsNull(source->get_Year()));
ASSERT_TRUE(System::TestTools::IsNull(source->get_YearAccessed()));
// Also, you can create a new source.
auto newSource = System::MakeObject<Aspose::Words::Bibliography::Source>(u"New source", SourceType::Misc);
System::SharedPtr<Aspose::Words::Bibliography::ContributorCollection> contributors = source->get_Contributors();
ASSERT_TRUE(System::TestTools::IsNull(contributors->get_Artist()));
ASSERT_TRUE(System::TestTools::IsNull(contributors->get_BookAuthor()));
ASSERT_TRUE(System::TestTools::IsNull(contributors->get_Compiler()));
ASSERT_TRUE(System::TestTools::IsNull(contributors->get_Composer()));
ASSERT_TRUE(System::TestTools::IsNull(contributors->get_Conductor()));
ASSERT_TRUE(System::TestTools::IsNull(contributors->get_Counsel()));
ASSERT_TRUE(System::TestTools::IsNull(contributors->get_Director()));
ASSERT_FALSE(System::TestTools::IsNull(contributors->get_Editor()));
ASSERT_TRUE(System::TestTools::IsNull(contributors->get_Interviewee()));
ASSERT_TRUE(System::TestTools::IsNull(contributors->get_Interviewer()));
ASSERT_TRUE(System::TestTools::IsNull(contributors->get_Inventor()));
ASSERT_TRUE(System::TestTools::IsNull(contributors->get_Performer()));
ASSERT_TRUE(System::TestTools::IsNull(contributors->get_Producer()));
ASSERT_FALSE(System::TestTools::IsNull(contributors->get_Translator()));
ASSERT_TRUE(System::TestTools::IsNull(contributors->get_Writer()));
System::SharedPtr<Aspose::Words::Bibliography::Contributor> editor = contributors->get_Editor();
ASSERT_EQ((System::ExplicitCast<Aspose::Words::Bibliography::PersonCollection>(editor))->LINQ_Count(), 2);
auto authors = System::ExplicitCast<Aspose::Words::Bibliography::PersonCollection>(contributors->get_Author());
ASSERT_EQ(authors->LINQ_Count(), 2);
System::SharedPtr<Aspose::Words::Bibliography::Person> person = authors->idx_get(0);
ASSERT_EQ(person->get_First(), u"Roxanne");
ASSERT_EQ(person->get_Middle(), u"Brielle");
ASSERT_EQ(person->get_Last(), u"Tejeda");
See Also
- Namespace Aspose::Words::Bibliography
- Library Aspose.Words for C++