Example #1
0
const Package::AttributionList Package::AttributionNames(bool localized) const
{
    AttributionList result;
    IRI fileAsIRI(MakePropertyIRI("file-as"));
    for ( auto item : PropertiesMatching(DCType::Creator) )
    {
        auto extension = item->ExtensionWithIdentifier(fileAsIRI);
        if ( extension )
            result.emplace_back(extension->Value());
        else
            result.emplace_back((localized? item->LocalizedValue() : item->Value()));
    }
    return result;
}
Example #2
0
const Package::AttributionList Package::AttributionNames() const
{
    AttributionList result;
    IRI fileAsIRI(MakePropertyIRI("file-as"));
    for ( auto item : MetadataItemsWithDCType(Metadata::DCType::Creator) )
    {
        const Metadata::Extension* extension = item->ExtensionWithProperty(fileAsIRI);
        if ( extension != nullptr )
            result.emplace_back(extension->Value());
        else
            result.emplace_back(item->Value());
    }
    return result;
}
Example #3
0
const Package::AttributionList Package::ContributorNames(bool localized) const
{
    AttributionList result;
    for ( auto item : PropertiesMatching(MakePropertyIRI("contributor", "dcterms")) )
    {
        result.emplace_back((localized? item->LocalizedValue() : item->Value()));
    }
    return result;
}
Example #4
0
const Package::AttributionList Package::AuthorNames() const
{
    AttributionList result;
    for ( auto item : MetadataItemsWithDCType(Metadata::DCType::Creator) )
    {
        result.emplace_back(item->Value());
    }
    return result;
}
Example #5
0
const Package::AttributionList Package::AuthorNames(bool localized) const
{
    AttributionList result;
    for ( auto item : PropertiesMatching(DCType::Creator) )
    {
        result.emplace_back((localized? item->LocalizedValue() : item->Value()));
    }
    
    if ( result.empty() )
    {
        // maybe they're using dcterms:creator instead?
        for ( auto item : PropertiesMatching(MakePropertyIRI("creator", "dcterms")) )
        {
            result.emplace_back((localized? item->LocalizedValue() : item->Value()));
        }
    }
    
    return result;
}