Catmandu-Store-AAT
view release on metacpan - search on metacpan
view release on metacpan or search on metacpan
NAME
Catmandu::Store::AAT - Retrieve items from the AAT
SYNOPSIS
This module contains a store to lookup a Subject in the AAT
<https://www.getty.edu/research/tools/vocabularies/aat/> using its
SPARQL endpoint <http://vocab.getty.edu/sparql>.
Also included is a fix to match a term to a Subject and a fix to search
for a term in the AAT.
lookup_in_store(objectName, AAT, lang:nl)
aat_match(objectName, -lang:nl)
aat_search(objectName, -lang:nl)
lib/Catmandu/Fix/aat_match.pm view on Meta::CPAN
=head1 SYNOPSIS
aat_match(
path,
-lang: nl
)
=head1 DESCRIPTION
Perform a direct match between a term and the L<SPARQL endpoint|http://vocab.getty.edu/sparql> of the AAT.
This fix will attempt to find a I<Subject> for which the I<prefLabel> in I<lang> (optional, default C<nl>)
equals the term. Will return a single item if one is found, or an empty hash if none was found.
Returns the following data:
{
'id' => 'The dc:identifier of the Subject',
'prefLabel' => 'The prefLabel in the provided language',
'uri' => 'The URI of the Subject'
}
lib/Catmandu/Fix/aat_search.pm view on Meta::CPAN
=head1 SYNOPSIS
aat_search(
path,
-lang: nl
)
=head1 DESCRIPTION
Perform a search for a term and the L<SPARQL endpoint|http://vocab.getty.edu/sparql> of the AAT.
This fix will attempt to find a I<Subject> that contains a I<prefLabel>, I<altLabel> or a
I<Subject ID> containing the searched for term. More details can be found L<here|http://vocab.getty.edu/doc/#Full_Text_Search>
(C<luc:term> is used).
Returns an array of results containing the following data:
{
'id' => 'The dc:identifier of the Subject',
'prefLabel' => 'The prefLabel in the provided language',
'uri' => 'The URI of the Subject'
lib/Catmandu/Store/AAT.pm view on Meta::CPAN
=head1 NAME
=for html <a href="https://travis-ci.org/thedatahub/Catmandu-Store-AAT"><img src="https://travis-ci.org/thedatahub/Catmandu-Store-AAT.svg?branch=master"></a>
Catmandu::Store::AAT - Retrieve items from the AAT
=head1 SYNOPSIS
This module contains a L<store|Catmandu::Store::AAT> to lookup a I<Subject> in the L<AAT|https://www.getty.edu/research/tools/vocabularies/aat/>
using its L<SPARQL endpoint|http://vocab.getty.edu/sparql>.
Also included is a L<fix|Catmandu::Fix::aat_match> to match a term to a I<Subject> and a
L<fix|Catmandu::Fix::aat_search> to search for a term in the AAT.
lookup_in_store(objectName, AAT, lang:nl)
aat_match(objectName, -lang:nl)
aat_search(objectName, -lang:nl)
lib/Catmandu/Store/AAT/SPARQL.pm view on Meta::CPAN
has lang => (is => 'ro', default => 'nl');
has results => (is => 'lazy');
has ua => (is => 'lazy');
sub _build_ua {
my $self = shift;
my $ua = LWP::UserAgent->new(
agent => sprintf('catmandu-store-aat/%s', $VERSION)
);
# Otherwise, the endpoint blows up.
$ua->default_header('Accept' => '*/*');
return $ua;
}
sub _build_results {
my $self = shift;
my $r = $self->get();
return $r;
}
view all matches for this distributionview release on metacpan - search on metacpan
( run in 1.319 second using v1.00-cache-2.02-grep-82fe00e-cpan-4673cadbf75 )