CrossClj

1.1.44 docs

SourceDocs



RECENT
    VARS
    ->LanguageMap
    agent-preference-sequential-compare
    charset-acceptable?
    encoding-acceptable?
    highest-charset-quality
    highest-encoding-quality
    highest-language-quality
    highest-media-type-quality
    identity-acceptable?
    lang-matches?
    language-acceptable?
    make-charset-quality-assessor
    make-combined-quality-assessor
    make-encoding-quality-assessor
    make-language-quality-assessor
    make-media-type-quality-assessor
    map->LanguageMap
    media-type-acceptable?
    parse-encoding
    parse-language
    select-best-representation
    skip-rejected
    to-vary-header
    vary
    wrap-quality-assessor

    « Index of all namespaces of this project

    (->LanguageMap language quality)
    Positional factory function for class yada.representation.LanguageMap.
    
    A selection algorithm that compares each quality in turn,
    only moving to the next quality if the comparison is a draw.
    (charset-acceptable? rep acceptable-charset)
    (encoding-acceptable? rep acceptable-encoding)
    (highest-charset-quality accepts)
    Given a collection of acceptable charsets, return a function that
    will return the quality.
    (highest-encoding-quality accepts)
    Given a collection of acceptable encodings, return a function that
    will return the quality for a given representation.
    (highest-language-quality accepts)
    Given a collection of acceptable languages, return a function that
    will return the quality for a given representation.
    (highest-media-type-quality accepts)
    Given a collection of acceptable mime-types, return a function that will return the quality.
    
    (identity-acceptable? acceptable-encoding)
    (lang-matches? accepts rep)
    Inputs: [accepts :- [s/Str] rep :- [s/Str]]
    
    See RFC 4647 Basic Filtering
    (language-acceptable? acceptable-language rep)
    Inputs: [acceptable-language :- {:language [s/Str], :quality java.lang.Float} rep :- {:language [s/Str], :quality java.lang.Float}]
    
    (make-charset-quality-assessor req k)
    (make-combined-quality-assessor req)
    (make-encoding-quality-assessor req k)
    (make-language-quality-assessor req k)
    (make-media-type-quality-assessor req k)
    (map->LanguageMap m__7585__auto__)
    Factory function for class yada.representation.LanguageMap, taking a map of keywords to field values.
    
    (media-type-acceptable? rep acceptable)
    Compare a single acceptable mime-type (extracted from an Accept
    header) and a candidate. If the candidate is acceptable, return a
    sortable vector [acceptable-quality specificity parameter-count
    candidate-quality]. Specificity prefers text/html over text/* over
    */*. Parameter count gives preference to candidates with a greater
    number of parameters, which prefers text/html;level=1 over
    text/html. This meets the criteria in the HTTP
    specifications. Although the preference that should result with
    multiple parameters is not specified formally, candidates that have a
    greater number of parameters are preferred.
    (parse-encoding s)
    (parse-language s)
    (select-best-representation req reps)(select-best-representation req reps rater)
    Given a request and a collection of representations, pick the best
    representation. This scores each representation against each of 4
    dimensions, each score contributes to its overall rating, the best
    being decided by the given algorithm, which defaults to
    'agent-preference-sequential-compare'.
    Private
    (skip-rejected f)
    Short-circuit attempts to process already rejected representation
    metadata.
    (to-vary-header vary)
    From the result of vary, construct a header
    
    (vary reps)
    From a representation-seq, find the variable dimensions
    
    Private
    (wrap-quality-assessor f k)
    Return a function that will either reject, or associate a quality, to
    the given representation metadata.