Flickcurl Flickr API Manual | ||||
---|---|---|---|---|
Top | Description |
typedef flickcurl_serializer; flickcurl_serializer_factory; flickcurl_serializer * flickcurl_new_serializer (flickcurl *fc
,void *data
,flickcurl_serializer_factory *factory
); void flickcurl_free_serializer (flickcurl_serializer *serializer
); int flickcurl_serialize_photo (flickcurl_serializer *fcs
,flickcurl_photo *photo
); enum flickcurl_term_type;
typedef struct flickcurl_serializer_s flickcurl_serializer;
Serializer from Photo and metadata to RDF triples
typedef struct { int version; void (*emit_namespace)(void* user_data, const char* prefix, size_t prefix_len, const char* uri, size_t uri_len); void (*emit_triple)(void* user_data, const char* subject, int subject_type, const char* predicate_nspace, const char* predicate_name, const char *object, int object_type, const char *datatype_uri); void (*emit_finish)(void* user_data); } flickcurl_serializer_factory;
Triples serializer factory
API version 1 is all that is supported.
flickcurl_serializer * flickcurl_new_serializer (flickcurl *fc
,void *data
,flickcurl_serializer_factory *factory
);
Create a new triples serializer for generating a RDF triples representation of a Flickr photo.
The factory must contain the methods and the correct factory API version as described in flickcurl_serializer_factory
|
flickcurl object |
|
user data for factory methods |
|
triples serializer factory |
Returns : |
a new serializer object or NULL on failure |
void flickcurl_free_serializer (flickcurl_serializer *serializer
);
Destructor for triples serializer object
|
serializer object |
int flickcurl_serialize_photo (flickcurl_serializer *fcs
,flickcurl_photo *photo
);
Serialize photo description to RDF triples
|
flickcurl serializer object |
|
photo object |
Returns : |
non-0 on failure |
typedef enum { FLICKCURL_TERM_TYPE_RESOURCE = 1, FLICKCURL_TERM_TYPE_BLANK = 2, FLICKCURL_TERM_TYPE_LITERAL = 5 } flickcurl_term_type;
Triple part types
These are the same enumeration values as used by Raptor V2 raptor_term_type enumeration and Raptor V1 raptor_identifier_type enumeration.