GSP
Quick Navigator

Search Site

Unix VPS
A - Starter
B - Basic
C - Preferred
D - Commercial
MPS - Dedicated
Previous VPSs
* Sign Up! *

Support
Contact Us
Online Help
Handbooks
Domain Status
Man Pages

FAQ
Virtual Servers
Pricing
Billing
Technical

Network
Facilities
Connectivity
Topology Map

Miscellaneous
Server Agreement
Year 2038
Credits
 

USA Flag

 

 

Man Pages


Manual Reference Pages  -  RDF::TRINE::STORE::LANGUAGEPREFERENCE (3)

.ds Aq ’

NAME

RDF::Trine::Store::LanguagePreference - RDF Store proxy for filtering language tagged literals

CONTENTS

VERSION

This document describes RDF::Trine::Store::LanguagePreference version 1.014

SYNOPSIS



 use RDF::Trine::Store::LanguagePreference;



DESCRIPTION

RDF::Trine::Store::LanguagePreference provides a RDF::Trine::Store API to filter the statements made available from some underlying store object based on a users’ language preferences (e.g. coming from an Accept-Language HTTP header value).

METHODS

Beyond the methods documented below, this class inherits methods from the RDF::Trine::Store class.
new ( $store, { $lang1 => $q1, $lang2 => $q2, ... } ) Returns a new storage object that will act as a proxy for the $store object, filtering language literals based on the expressed language preferences.
new_with_config ( $hashref ) Returns a new storage object configured with a hashref with certain keys as arguments.

The storetype key must be LanguagePreference for this backend.

The following key must also be used:
store A configuration hash for the underlying store object.
preferred_languages A hash reference mapping language tags to quality values in the range [0, 1]. The referent may be changed between operations to change the set of preferred languages used in statement matching.

new_with_config ( \%config ) Returns a new RDF::Trine::Store object based on the supplied configuration hashref.
language_preferences Returns a hash of the language preference quality values.
language_preference( $lang ) Return the quality value preference for the given language.
update_language_preference( $lang => $qvalue ) Update the quality value preference for the given language.
get_statements ( $subject, $predicate, $object [, $context] ) Returns a stream object of all statements matching the specified subject, predicate and objects. Any of the arguments may be undef to match any value.
count_statements ( $subject, $predicate, $object, $context ) Returns a count of all the statements matching the specified subject, predicate, object, and context. Any of the arguments may be undef to match any value.
qvalueForLanguage ( $language, \%cache ) Returns the q-value for $language based on the current language preference. %cache is used across multiple calls to this method for performance reasons.
siteQValueForLanguage ( $language ) Returns an implementation-specific q-value preference for the given $language. This method may be overridden by subclasses to control the default preferred language.
availableLanguagesForStatement( $statement ) Returns a list of language tags that are available in the underlying store for the given statement object. For example, if $statement represented the triple:



 dbpedia:Los_Angeles rdf:label "Los Angeles"@en



and the underlying store contains the triples:



 dbpedia:Los_Angeles rdf:label "Los Angeles"@en
 dbpedia:Los_Angeles rdf:label "XXXXXX"@ja
 dbpedia:Los_Angeles rdf:label "XXX-XXXXXXXX"@ru



then the return value would be (en, ja, ru).

languagePreferenceAllowsStatement ( $statement, \%cache ) Returns true if the $statement is allowed by the current language preference. %cache is used across multiple calls to this method for performance reasons.
supports ( [ $feature ] ) If $feature is specified, returns true if the feature is supported by the store, false otherwise. If $feature is not specified, returns a list of supported features.

BUGS

Please report any bugs or feature requests to through the GitHub web interface at <https://github.com/kasei/perlrdf/issues>.

AUTHOR

Gregory Todd Williams <gwilliams@cpan.org>

COPYRIGHT

Copyright (c) 2006-2012 Gregory Todd Williams. This program is free software; you can redistribute it and/or modify it under the same terms as Perl itself.
Search for    or go to Top of page |  Section 3 |  Main Index


perl v5.20.3 RDF::TRINE::STORE::LANGUAGEPREFERENCE (3) 2015-05-17

Powered by GSP Visit the GSP FreeBSD Man Page Interface.
Output converted with manServer 1.07.