[][src]Trait papers::scientific_publication_adapter::ScientificPublicationAdapter

pub trait ScientificPublicationAdapter {
    fn name(&self) -> &str;
fn author_cache(&self) -> &HashMap<String, String>;
fn author_cache_mut(&mut self) -> &mut HashMap<String, String>;
fn update_statements_for_publication_id(
        &self,
        publication_id: &String,
        item: &mut Entity
    ); fn publication_id_from_item(&mut self, item: &Entity) -> Option<String> { ... }
fn get_author_list(
        &mut self,
        _publication_id: &String
    ) -> Vec<GenericAuthorInfo> { ... }
fn get_identifier_list(
        &mut self,
        _ids: &Vec<GenericWorkIdentifier>
    ) -> Vec<GenericWorkIdentifier> { ... }
fn author_property(&self) -> Option<String> { ... }
fn publication_property(&self) -> Option<String> { ... }
fn topic_property(&self) -> Option<String> { ... }
fn get_work_issn(&self, _publication_id: &String) -> Option<String> { ... }
fn get_work_titles(&self, _publication_id: &String) -> Vec<LocaleString> { ... }
fn do_cache_work(&mut self, _publication_id: &String) -> Option<String> { ... }
fn reference(&self) -> Vec<Reference> { ... }
fn sanitize_author_name(&self, author_name: &String) -> String { ... }
fn update_statements_for_publication_id_default(
        &self,
        publication_id: &String,
        item: &mut Entity,
        caches: &mut WikidataPapersCache
    ) { ... }
fn titles_are_equal(&self, t1: &String, t2: &String) -> bool { ... }
fn update_work_item_with_title(
        &self,
        publication_id: &String,
        item: &mut Entity
    ) { ... }
fn update_work_item_with_journal(
        &self,
        publication_id: &String,
        item: &mut Entity,
        caches: &mut WikidataPapersCache
    ) { ... }
fn update_work_item_with_property(
        &self,
        publication_id: &String,
        item: &mut Entity
    ) { ... }
fn get_wb_time_from_partial(
        &self,
        property: String,
        year: u32,
        month: Option<u8>,
        day: Option<u8>
    ) -> Statement { ... }
fn get_external_identifier_from_item(
        &self,
        item: &Entity,
        property: &str
    ) -> Option<String> { ... }
fn set_author_cache_entry(&mut self, catalog_author_id: &String, q: &String) { ... }
fn get_author_item_from_cache(
        &self,
        catalog_author_id: &String
    ) -> Option<&String> { ... }
fn author_cache_is_empty(&self) -> bool { ... }
fn update_author_item(
        &mut self,
        source_author_name: &String,
        author_id: &String,
        author_name: &String,
        item: &mut Entity
    ) { ... } }

Required methods

fn name(&self) -> &str

Returns the name of the resource; internal/debugging use only

fn author_cache(&self) -> &HashMap<String, String>

Returns a cache object reference for the author_id => wikidata_item mapping; this is handled automatically

fn author_cache_mut(&mut self) -> &mut HashMap<String, String>

Returns a mutable cache object reference for the author_id => wikidata_item mapping; this is handled automatically

fn update_statements_for_publication_id(
    &self,
    publication_id: &String,
    item: &mut Entity
)

Adds/updates "special" statements of an item from the resource, given the publication ID. Many common statements, title, aliases etc are automatically handeled via update_statements_for_publication_id_default

Loading content...

Provided methods

fn publication_id_from_item(&mut self, item: &Entity) -> Option<String>

Tries to determine the publication ID of the resource, from a Wikidata item

fn get_author_list(
    &mut self,
    _publication_id: &String
) -> Vec<GenericAuthorInfo>

Returns a list of the authors, if available, with list number, name, catalog-specific author ID, and WIkidata ID, as available

fn get_identifier_list(
    &mut self,
    _ids: &Vec<GenericWorkIdentifier>
) -> Vec<GenericWorkIdentifier>

Returns a list of IDs for that paper (PMID, DOI etc.)

fn author_property(&self) -> Option<String>

Returns the property for an author ID of the resource as a String, e.g. P4012 for Semantic Scholar

fn publication_property(&self) -> Option<String>

Returns the property for a publication ID of the resource as a String, e.g. P4011 for Semantic Scholar

fn topic_property(&self) -> Option<String>

Returns the property for a topic ID of the resource as a String, e.g. P6611 for Semantic Scholar

fn get_work_issn(&self, _publication_id: &String) -> Option<String>

fn get_work_titles(&self, _publication_id: &String) -> Vec<LocaleString>

fn do_cache_work(&mut self, _publication_id: &String) -> Option<String>

fn reference(&self) -> Vec<Reference>

fn sanitize_author_name(&self, author_name: &String) -> String

fn update_statements_for_publication_id_default(
    &self,
    publication_id: &String,
    item: &mut Entity,
    caches: &mut WikidataPapersCache
)

fn titles_are_equal(&self, t1: &String, t2: &String) -> bool

fn update_work_item_with_title(
    &self,
    publication_id: &String,
    item: &mut Entity
)

fn update_work_item_with_journal(
    &self,
    publication_id: &String,
    item: &mut Entity,
    caches: &mut WikidataPapersCache
)

fn update_work_item_with_property(
    &self,
    publication_id: &String,
    item: &mut Entity
)

fn get_wb_time_from_partial(
    &self,
    property: String,
    year: u32,
    month: Option<u8>,
    day: Option<u8>
) -> Statement

fn get_external_identifier_from_item(
    &self,
    item: &Entity,
    property: &str
) -> Option<String>

fn set_author_cache_entry(&mut self, catalog_author_id: &String, q: &String)

fn get_author_item_from_cache(
    &self,
    catalog_author_id: &String
) -> Option<&String>

fn author_cache_is_empty(&self) -> bool

fn update_author_item(
    &mut self,
    source_author_name: &String,
    author_id: &String,
    author_name: &String,
    item: &mut Entity
)

Loading content...

Implementors

impl ScientificPublicationAdapter for Crossref2Wikidata[src]

fn get_author_list(
    &mut self,
    _publication_id: &String
) -> Vec<GenericAuthorInfo>
[src]

fn author_property(&self) -> Option<String>[src]

fn publication_property(&self) -> Option<String>[src]

fn topic_property(&self) -> Option<String>[src]

fn do_cache_work(&mut self, _publication_id: &String) -> Option<String>[src]

fn sanitize_author_name(&self, author_name: &String) -> String[src]

fn update_statements_for_publication_id_default(
    &self,
    publication_id: &String,
    item: &mut Entity,
    caches: &mut WikidataPapersCache
)
[src]

fn titles_are_equal(&self, t1: &String, t2: &String) -> bool[src]

fn update_work_item_with_title(
    &self,
    publication_id: &String,
    item: &mut Entity
)
[src]

fn update_work_item_with_journal(
    &self,
    publication_id: &String,
    item: &mut Entity,
    caches: &mut WikidataPapersCache
)
[src]

fn update_work_item_with_property(
    &self,
    publication_id: &String,
    item: &mut Entity
)
[src]

fn get_wb_time_from_partial(
    &self,
    property: String,
    year: u32,
    month: Option<u8>,
    day: Option<u8>
) -> Statement
[src]

fn get_external_identifier_from_item(
    &self,
    item: &Entity,
    property: &str
) -> Option<String>
[src]

fn set_author_cache_entry(&mut self, catalog_author_id: &String, q: &String)[src]

fn get_author_item_from_cache(
    &self,
    catalog_author_id: &String
) -> Option<&String>
[src]

fn author_cache_is_empty(&self) -> bool[src]

fn update_author_item(
    &mut self,
    source_author_name: &String,
    author_id: &String,
    author_name: &String,
    item: &mut Entity
)
[src]

impl ScientificPublicationAdapter for Orcid2Wikidata[src]

fn get_identifier_list(
    &mut self,
    _ids: &Vec<GenericWorkIdentifier>
) -> Vec<GenericWorkIdentifier>
[src]

fn publication_property(&self) -> Option<String>[src]

fn topic_property(&self) -> Option<String>[src]

fn get_work_issn(&self, _publication_id: &String) -> Option<String>[src]

fn get_work_titles(&self, _publication_id: &String) -> Vec<LocaleString>[src]

fn do_cache_work(&mut self, _publication_id: &String) -> Option<String>[src]

fn reference(&self) -> Vec<Reference>[src]

fn sanitize_author_name(&self, author_name: &String) -> String[src]

fn update_statements_for_publication_id_default(
    &self,
    publication_id: &String,
    item: &mut Entity,
    caches: &mut WikidataPapersCache
)
[src]

fn titles_are_equal(&self, t1: &String, t2: &String) -> bool[src]

fn update_work_item_with_title(
    &self,
    publication_id: &String,
    item: &mut Entity
)
[src]

fn update_work_item_with_journal(
    &self,
    publication_id: &String,
    item: &mut Entity,
    caches: &mut WikidataPapersCache
)
[src]

fn update_work_item_with_property(
    &self,
    publication_id: &String,
    item: &mut Entity
)
[src]

fn get_wb_time_from_partial(
    &self,
    property: String,
    year: u32,
    month: Option<u8>,
    day: Option<u8>
) -> Statement
[src]

fn get_external_identifier_from_item(
    &self,
    item: &Entity,
    property: &str
) -> Option<String>
[src]

fn set_author_cache_entry(&mut self, catalog_author_id: &String, q: &String)[src]

fn get_author_item_from_cache(
    &self,
    catalog_author_id: &String
) -> Option<&String>
[src]

fn author_cache_is_empty(&self) -> bool[src]

fn update_author_item(
    &mut self,
    source_author_name: &String,
    author_id: &String,
    author_name: &String,
    item: &mut Entity
)
[src]

impl ScientificPublicationAdapter for Pubmed2Wikidata[src]

fn publication_id_from_item(&mut self, item: &Entity) -> Option<String>[src]

fn author_property(&self) -> Option<String>[src]

fn topic_property(&self) -> Option<String>[src]

fn reference(&self) -> Vec<Reference>[src]

fn sanitize_author_name(&self, author_name: &String) -> String[src]

fn update_statements_for_publication_id_default(
    &self,
    publication_id: &String,
    item: &mut Entity,
    caches: &mut WikidataPapersCache
)
[src]

fn titles_are_equal(&self, t1: &String, t2: &String) -> bool[src]

fn update_work_item_with_title(
    &self,
    publication_id: &String,
    item: &mut Entity
)
[src]

fn update_work_item_with_journal(
    &self,
    publication_id: &String,
    item: &mut Entity,
    caches: &mut WikidataPapersCache
)
[src]

fn update_work_item_with_property(
    &self,
    publication_id: &String,
    item: &mut Entity
)
[src]

fn get_wb_time_from_partial(
    &self,
    property: String,
    year: u32,
    month: Option<u8>,
    day: Option<u8>
) -> Statement
[src]

fn get_external_identifier_from_item(
    &self,
    item: &Entity,
    property: &str
) -> Option<String>
[src]

fn set_author_cache_entry(&mut self, catalog_author_id: &String, q: &String)[src]

fn get_author_item_from_cache(
    &self,
    catalog_author_id: &String
) -> Option<&String>
[src]

fn author_cache_is_empty(&self) -> bool[src]

fn update_author_item(
    &mut self,
    source_author_name: &String,
    author_id: &String,
    author_name: &String,
    item: &mut Entity
)
[src]

impl ScientificPublicationAdapter for Semanticscholar2Wikidata[src]

fn publication_id_from_item(&mut self, item: &Entity) -> Option<String>[src]

fn get_work_issn(&self, _publication_id: &String) -> Option<String>[src]

fn reference(&self) -> Vec<Reference>[src]

fn sanitize_author_name(&self, author_name: &String) -> String[src]

fn update_statements_for_publication_id_default(
    &self,
    publication_id: &String,
    item: &mut Entity,
    caches: &mut WikidataPapersCache
)
[src]

fn titles_are_equal(&self, t1: &String, t2: &String) -> bool[src]

fn update_work_item_with_title(
    &self,
    publication_id: &String,
    item: &mut Entity
)
[src]

fn update_work_item_with_journal(
    &self,
    publication_id: &String,
    item: &mut Entity,
    caches: &mut WikidataPapersCache
)
[src]

fn update_work_item_with_property(
    &self,
    publication_id: &String,
    item: &mut Entity
)
[src]

fn get_wb_time_from_partial(
    &self,
    property: String,
    year: u32,
    month: Option<u8>,
    day: Option<u8>
) -> Statement
[src]

fn get_external_identifier_from_item(
    &self,
    item: &Entity,
    property: &str
) -> Option<String>
[src]

fn set_author_cache_entry(&mut self, catalog_author_id: &String, q: &String)[src]

fn get_author_item_from_cache(
    &self,
    catalog_author_id: &String
) -> Option<&String>
[src]

fn author_cache_is_empty(&self) -> bool[src]

fn update_author_item(
    &mut self,
    source_author_name: &String,
    author_id: &String,
    author_name: &String,
    item: &mut Entity
)
[src]

Loading content...