Difference between revisions of "LibccLicense"

From Creative Commons
Jump to: navigation, search
(Interface)
(Interface)
Line 9: Line 9:
  
 
=== Interface ===
 
=== Interface ===
* License Attributes
+
* '''get_jurisdiction'''(uri) - returns the jurisdiction for the given license.
** Standard
+
* '''get_jurisdictions'''(short or bitcode) - returns the available jurisdiction for the given short name or bitcode.
*** CC_NC
+
* '''get_locale'''(uri) – returns the locale for the given license.
*** CC_SA
+
* '''get_locales'''(jurisdiction, short or bitcode) – returns the available locales for the given jurisdiction and short name or bitcode.
*** CC_ND
+
* '''get_name'''(uri) – returns the name of the license.
*** CC_BY
+
* '''get_version'''(uri) – returns the version of the license.
** Sampling
+
* '''get_versions'''(short, jurisdiction) - returns the available versions for the given short name or bitcode and jurisdiction.
*** SAMPLING_NC
+
* '''get_short'''(uri) - returns the short name for the given uri.
 
+
* '''has_flag'''(attribute,uri) – returns if the flag is set for the given uri.
* Data accessors.
+
* '''family_flags'''(family) - returns the flags available for a given family.
** get_jurisdiction(uri)
+
* '''family'''(uri) – returns the family the given uri belongs to.
** get_jurisdictions(short)
+
* '''get_notification'''(uri[,url]) - returns the notification string for the given url with an option to provide a verification url.
** get_locale(uri)
+
* '''verify_uri'''(uri) - returns whether or not the given uri is recognized by the system.
** get_locales(short)
+
* '''get_license'''(family,flags, jurisdiction,locale) – returns the uri which satisfies the given attributes.
** get_name(uri)
+
* '''get_all_licenses'''() - returns all general licenses available.
** get_version(uri)
+
* '''get_general_licenses'''(family) - returns all general licenses in a family.
** get_versions(short, jurisdiction)
+
* '''get_families'''() – returns a list of available families.
** get_short(uri)
 
** has_flag(attribute,uri)
 
** category_flags(category)
 
** category(uri)
 
** get_notification(uri[,url])
 
 
 
* Data verification.
 
** verify_uri(uri)
 
 
 
* License chooser (return uris)
 
** get_license(category,jurisdiction,locale,flags)
 
** get_license_options(category,jurisdiction,locale)
 
** get_all_licenses()
 
** get_general_licenses(category)
 
** get_licenses(category)
 
** get_categories()
 
  
 
=== Data Structure ===
 
=== Data Structure ===

Revision as of 23:22, 19 June 2007

Purpose

To provide a generic interface to the CC license data, license choice data and license choice logic.

Audience

Application developers who wish to choose and/or verify CC licenses.

Implementation

This library will be implemented in C to provide maximum portability.

Interface

  • get_jurisdiction(uri) - returns the jurisdiction for the given license.
  • get_jurisdictions(short or bitcode) - returns the available jurisdiction for the given short name or bitcode.
  • get_locale(uri) – returns the locale for the given license.
  • get_locales(jurisdiction, short or bitcode) – returns the available locales for the given jurisdiction and short name or bitcode.
  • get_name(uri) – returns the name of the license.
  • get_version(uri) – returns the version of the license.
  • get_versions(short, jurisdiction) - returns the available versions for the given short name or bitcode and jurisdiction.
  • get_short(uri) - returns the short name for the given uri.
  • has_flag(attribute,uri) – returns if the flag is set for the given uri.
  • family_flags(family) - returns the flags available for a given family.
  • family(uri) – returns the family the given uri belongs to.
  • get_notification(uri[,url]) - returns the notification string for the given url with an option to provide a verification url.
  • verify_uri(uri) - returns whether or not the given uri is recognized by the system.
  • get_license(family,flags, jurisdiction,locale) – returns the uri which satisfies the given attributes.
  • get_all_licenses() - returns all general licenses available.
  • get_general_licenses(family) - returns all general licenses in a family.
  • get_families() – returns a list of available families.

Data Structure

  • Data Types (informal)
    • uri
    • name
    • notification
    • deed
    • sampling

Diskwise

  • licenses
    • creative_commons_sampling
    • creative_commons
      • licenses
      • flags
      • name
      • general

Bindings

  • Python

Uses

libccLicense system implementation guidelines

  • Gnome
  • KDE
  • OpenMoko
  • Sugar (OLPC)