Aspose::Words::Bibliography::Source class

Source class

Represents an individual source, such as a book, journal article, or interview.

class Source : public System::Object

Methods

MethodDescription
get_AbbreviatedCaseNumber() constGets or sets the abbreviated case number of a source.
get_AlbumTitle() constGets or sets the album title of a source.
get_BookTitle() constGets or sets the book title of a source.
get_Broadcaster() constGets or sets the broadcaster of a source.
get_BroadcastTitle() constGets or sets the broadcast title of a source.
get_CaseNumber() constGets or sets the case number of a source.
get_ChapterNumber() constGets or sets the chapter number of a source.
get_City() constGets or sets the city of a source.
get_Comments() constGets or sets the comments of a source.
get_ConferenceName() constGets or sets the conference or proceedings name of a source.
get_Contributors() constGets contributors list (author, editor, writer etc) of a source.
get_CountryOrRegion() constGets or sets the country or region of a source.
get_Court() constGets or sets the court of a source.
get_Day() constGets or sets the day of a source.
get_DayAccessed() constGets or sets the day accessed of a source.
get_Department() constGets or sets the department of a source.
get_Distributor() constGets or sets the distributor of a source.
get_Doi() constGets or sets the digital object identifier.
get_Edition() constGets or sets the editor of a source.
get_Guid() constGets or sets the guid of a source.
get_Institution() constGets or sets the institution of a source.
get_InternetSiteTitle() constGets or sets the internet site title of a source.
get_Issue() constGets or sets the issue of a source.
get_JournalName() constGets or sets the journal name of a source.
get_Lcid() constGets or sets the locale ID of a source.
get_Medium() constGets or sets the medium of a source.
get_Month() constGets or sets the month of a source.
get_MonthAccessed() constGets or sets the month accessed of a source.
get_NumberVolumes() constGets or sets the number of volumes of a source.
get_Pages() constGets or sets the pages of a source.
get_PatentNumber() constGets or sets the patent number of a source.
get_PeriodicalTitle() constGets or sets the periodical title of a source.
get_ProductionCompany() constGets or sets the production company of a source.
get_PublicationTitle() constGets or sets the publication title of a source.
get_Publisher() constGets or sets the publisher of a source.
get_RecordingNumber() constGets or sets the recording number of a source.
get_RefOrder() constGets or sets the reference order of a source.
get_Reporter() constGets or sets the reporter of a source.
get_ShortTitle() constGets or sets the short title of a source.
get_SourceType() constGets or sets the source type of a source.
get_StandardNumber() constGets or sets the standard number of a source.
get_StateOrProvince() constGets or sets the state or province of a source.
get_Station() constGets or sets the station of a source.
get_Tag() constGets or sets the identifying tag name of a source.
get_Theater() constGets or sets the theater of a source.
get_ThesisType() constGets or sets the thesis type of a source.
get_Title() constGets or sets the title of a source.
get_Type() constGets or sets the type of a source.
get_Url() constGets or sets the url of a source.
get_Version() constGets or sets the version of a source.
get_Volume() constGets or sets the volume of a source.
get_Year() constGets or sets the year of a source.
get_YearAccessed() constGets or sets the year accessed of a source.
GetType() const override
Is(const System::TypeInfo&) const override
set_AbbreviatedCaseNumber(const System::String&)Setter for Aspose::Words::Bibliography::Source::get_AbbreviatedCaseNumber.
set_AlbumTitle(const System::String&)Setter for Aspose::Words::Bibliography::Source::get_AlbumTitle.
set_BookTitle(const System::String&)Setter for Aspose::Words::Bibliography::Source::get_BookTitle.
set_Broadcaster(const System::String&)Setter for Aspose::Words::Bibliography::Source::get_Broadcaster.
set_BroadcastTitle(const System::String&)Setter for Aspose::Words::Bibliography::Source::get_BroadcastTitle.
set_CaseNumber(const System::String&)Setter for Aspose::Words::Bibliography::Source::get_CaseNumber.
set_ChapterNumber(const System::String&)Setter for Aspose::Words::Bibliography::Source::get_ChapterNumber.
set_City(const System::String&)Setter for Aspose::Words::Bibliography::Source::get_City.
set_Comments(const System::String&)Setter for Aspose::Words::Bibliography::Source::get_Comments.
set_ConferenceName(const System::String&)Setter for Aspose::Words::Bibliography::Source::get_ConferenceName.
set_CountryOrRegion(const System::String&)Setter for Aspose::Words::Bibliography::Source::get_CountryOrRegion.
set_Court(const System::String&)Setter for Aspose::Words::Bibliography::Source::get_Court.
set_Day(const System::String&)Setter for Aspose::Words::Bibliography::Source::get_Day.
set_DayAccessed(const System::String&)Setter for Aspose::Words::Bibliography::Source::get_DayAccessed.
set_Department(const System::String&)Setter for Aspose::Words::Bibliography::Source::get_Department.
set_Distributor(const System::String&)Setter for Aspose::Words::Bibliography::Source::get_Distributor.
set_Doi(const System::String&)Setter for Aspose::Words::Bibliography::Source::get_Doi.
set_Edition(const System::String&)Setter for Aspose::Words::Bibliography::Source::get_Edition.
set_Guid(const System::String&)Setter for Aspose::Words::Bibliography::Source::get_Guid.
set_Institution(const System::String&)Setter for Aspose::Words::Bibliography::Source::get_Institution.
set_InternetSiteTitle(const System::String&)Setter for Aspose::Words::Bibliography::Source::get_InternetSiteTitle.
set_Issue(const System::String&)Setter for Aspose::Words::Bibliography::Source::get_Issue.
set_JournalName(const System::String&)Setter for Aspose::Words::Bibliography::Source::get_JournalName.
set_Lcid(const System::String&)Setter for Aspose::Words::Bibliography::Source::get_Lcid.
set_Medium(const System::String&)Setter for Aspose::Words::Bibliography::Source::get_Medium.
set_Month(const System::String&)Setter for Aspose::Words::Bibliography::Source::get_Month.
set_MonthAccessed(const System::String&)Setter for Aspose::Words::Bibliography::Source::get_MonthAccessed.
set_NumberVolumes(const System::String&)Setter for Aspose::Words::Bibliography::Source::get_NumberVolumes.
set_Pages(const System::String&)Setter for Aspose::Words::Bibliography::Source::get_Pages.
set_PatentNumber(const System::String&)Setter for Aspose::Words::Bibliography::Source::get_PatentNumber.
set_PeriodicalTitle(const System::String&)Setter for Aspose::Words::Bibliography::Source::get_PeriodicalTitle.
set_ProductionCompany(const System::String&)Setter for Aspose::Words::Bibliography::Source::get_ProductionCompany.
set_PublicationTitle(const System::String&)Setter for Aspose::Words::Bibliography::Source::get_PublicationTitle.
set_Publisher(const System::String&)Setter for Aspose::Words::Bibliography::Source::get_Publisher.
set_RecordingNumber(const System::String&)Setter for Aspose::Words::Bibliography::Source::get_RecordingNumber.
set_RefOrder(const System::String&)Setter for Aspose::Words::Bibliography::Source::get_RefOrder.
set_Reporter(const System::String&)Setter for Aspose::Words::Bibliography::Source::get_Reporter.
set_ShortTitle(const System::String&)Setter for Aspose::Words::Bibliography::Source::get_ShortTitle.
set_SourceType(Aspose::Words::Bibliography::SourceType)Setter for Aspose::Words::Bibliography::Source::get_SourceType.
set_StandardNumber(const System::String&)Setter for Aspose::Words::Bibliography::Source::get_StandardNumber.
set_StateOrProvince(const System::String&)Setter for Aspose::Words::Bibliography::Source::get_StateOrProvince.
set_Station(const System::String&)Setter for Aspose::Words::Bibliography::Source::get_Station.
set_Tag(const System::String&)Setter for Aspose::Words::Bibliography::Source::get_Tag.
set_Theater(const System::String&)Setter for Aspose::Words::Bibliography::Source::get_Theater.
set_ThesisType(const System::String&)Setter for Aspose::Words::Bibliography::Source::get_ThesisType.
set_Title(const System::String&)Setter for Aspose::Words::Bibliography::Source::get_Title.
set_Type(const System::String&)Setter for Aspose::Words::Bibliography::Source::get_Type.
set_Url(const System::String&)Setter for Aspose::Words::Bibliography::Source::get_Url.
set_Version(const System::String&)Setter for Aspose::Words::Bibliography::Source::get_Version.
set_Volume(const System::String&)Setter for Aspose::Words::Bibliography::Source::get_Volume.
set_Year(const System::String&)Setter for Aspose::Words::Bibliography::Source::get_Year.
set_YearAccessed(const System::String&)Setter for Aspose::Words::Bibliography::Source::get_YearAccessed.
Source(const System::String&, Aspose::Words::Bibliography::SourceType)Initialize a new instance of the Source class.
static Type()

Examples

Shows how to get bibliography sources available in the document.

auto document = System::MakeObject<Aspose::Words::Document>(get_MyDir() + u"Bibliography sources.docx");

System::SharedPtr<Aspose::Words::Bibliography::Bibliography> bibliography = document->get_Bibliography();
ASSERT_EQ(12, bibliography->get_Sources()->get_Count());

// Get default data from bibliography sources.
System::SharedPtr<Aspose::Words::Bibliography::Source> source = bibliography->get_Sources()->LINQ_FirstOrDefault();
ASSERT_EQ(u"Book 0 (No LCID)", source->get_Title());
ASSERT_EQ(Aspose::Words::Bibliography::SourceType::Book, source->get_SourceType());
ASSERT_EQ(3, source->get_Contributors()->LINQ_Count());
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(u"BookNoLCID", source->get_Tag());
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", Aspose::Words::Bibliography::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(2, (System::ExplicitCast<Aspose::Words::Bibliography::PersonCollection>(editor))->LINQ_Count());

auto authors = System::ExplicitCast<Aspose::Words::Bibliography::PersonCollection>(contributors->get_Author());
ASSERT_EQ(2, authors->LINQ_Count());

System::SharedPtr<Aspose::Words::Bibliography::Person> person = authors->idx_get(0);
ASSERT_EQ(u"Roxanne", person->get_First());
ASSERT_EQ(u"Brielle", person->get_Middle());
ASSERT_EQ(u"Tejeda", person->get_Last());

See Also