public class MachinetagsInterface
extends java.lang.Object
http://userscripts.org/scripts/show/5464
Dan Catt wrote a very good piece about machine tags - he called them "triple tags" - last year:
http://geobloggers.com/archives/2006/01/11/advanced-tagging-and-tripletags/
Update : Dan's gone and written another excellent piece about all of this stuff now that we've launched machine tags: http://geobloggers.com/archives/2007/01/24/offtopic-ish-flickr-ramps-up-triple-tag-support/
Namespaces MUST begin with any character between a - z; remaining characters MAY be a - z, 0 - 9 and underbars. Namespaces are case-insensitive.
Predicates MUST begin with any character between a - z; remaining characters MAY be a - z, 0 - 9 and underbars. Namespaces are case-insensitive.
Values MAY contain any characters that a "plain vanilla" tags use. Values may also contain spaces but, like regular tags, they need to wrapped in quotes.
Predicates and values are separated by an equals symbol : "="
For example:
Specifically, using the "machinetags" parameter in the 'flickr.photos.search' method. Like tags, you can specify multiple machine tags as a comma separated list.
{"machine_tags" => "dc:"}
{"machine_tags" => "dc:title="}
{"machine_tags" => "dc:title=\"mr. camera\"}
{"machine_tags" => "*:*=\"mr. camera\""}
{"machine_tags" => "*:title="}
{"machine_tags" => "*:title=\"mr. camera\""}
{"machine_tags" => "dc:*=\"mr. camera\""}
It is a hard problem for reasons far too dull to get in to here. It's on the list.
If you are concerned about colliding namespaces you should consider adding an additional machine tag to define your namespace. For example:
dc:subject=tags xmlns:dc=http://purl.org/dc/elements/1.1/Like tags, in general, we expect (hope?) that the community will develop its own standards by consensus over time.
We have plans to go back and re-import them as machine tags but for now, only new tags will be processed as machine tags.
In the meantime, if you re-save a machine from the 'edit this tag' page it will be re-imported as a machine tag.
It's close enough to being a predicate that it makes for a good short-hand.
See also: http://weblog.scifihifi.com/2005/08/05/meta-tags-the-poor-mans-rdf
| Constructor and Description |
|---|
MachinetagsInterface(java.lang.String apiKey,
java.lang.String sharedSecret,
Transport transportAPI) |
| Modifier and Type | Method and Description |
|---|---|
NamespacesList<Namespace> |
getNamespaces(java.lang.String predicate,
int perPage,
int page)
Return a list of unique namespaces, optionally limited by a given predicate, in alphabetical order.
|
NamespacesList<Pair> |
getPairs(java.lang.String namespace,
java.lang.String predicate,
int perPage,
int page)
Return a list of unique namespace and predicate pairs, optionally limited by predicate or namespace, in alphabetical order.
|
NamespacesList<Predicate> |
getPredicates(java.lang.String namespace,
int perPage,
int page)
Return a list of unique predicates, optionally limited by a given namespace.
|
NamespacesList<Value> |
getRecentValues(java.lang.String namespace,
java.lang.String predicate,
java.util.Date addedSince)
Fetch recently used (or created) machine tags values.
|
NamespacesList<Value> |
getValues(java.lang.String namespace,
java.lang.String predicate,
int perPage,
int page)
Return a list of unique values for a namespace and predicate.
|
public MachinetagsInterface(java.lang.String apiKey,
java.lang.String sharedSecret,
Transport transportAPI)
public NamespacesList<Namespace> getNamespaces(java.lang.String predicate, int perPage, int page) throws FlickrException
predicate - perPage - page - FlickrExceptionpublic NamespacesList<Pair> getPairs(java.lang.String namespace, java.lang.String predicate, int perPage, int page) throws FlickrException
namespace - optional, can be nullpredicate - optional, can be nullperPage - The number of photos to show per pagepage - The page offsetFlickrExceptionpublic NamespacesList<Predicate> getPredicates(java.lang.String namespace, int perPage, int page) throws FlickrException
namespace - The namespace that all values should be restricted to.perPage - The number of photos to show per pagepage - The page offsetFlickrExceptionpublic NamespacesList<Value> getValues(java.lang.String namespace, java.lang.String predicate, int perPage, int page) throws FlickrException
namespace - The namespace that all values should be restricted to.predicate - The predicate that all values should be restricted to.perPage - The number of photos to show per pagepage - The page offsetFlickrExceptionpublic NamespacesList<Value> getRecentValues(java.lang.String namespace, java.lang.String predicate, java.util.Date addedSince) throws FlickrException
namespace - The namespace that all values should be restricted to.predicate - The predicate that all values should be restricted to.addedSince - Only return machine tags values that have been added since this Date.FlickrException