mas01mj@584: #include mas01mj@584: mas01mj@584: int main() mas01mj@584: { mas01mj@584: librdf_world* world = librdf_new_world(); mas01mj@584: librdf_storage* storage = librdf_new_storage(world, "audiodb", "test.adb", "new='yes'"); mas01mj@584: mas01mj@584: librdf_model *model; mas01mj@584: if (!(model = librdf_new_model(world, storage, NULL))) mas01mj@584: goto librdf_error; mas01mj@584: mas01mj@584: librdf_storage_close(storage); mas01mj@584: /* mas01mj@584: librdf_query *query; mas01mj@584: if (!(query = librdf_new_query(world, "sparql", NULL, "PREFIX abc: SELECT ?capital ?country WHERE { ?x abc:cityname ?capital ; abc:isCapitalOf ?y . ?y abc:countryname ?country ; abc:isInContinent abc:Africa . }", NULL))) mas01mj@584: goto librdf_error; mas01mj@584: mas01mj@584: librdf_query_results *results; mas01mj@584: if (!(results = librdf_query_execute(query, model))) mas01mj@584: goto librdf_error; mas01mj@584: mas01mj@584: if(!librdf_query_results_is_bindings(results)) mas01mj@584: goto librdf_error; mas01mj@584: */ mas01mj@584: return 0; mas01mj@584: mas01mj@584: librdf_error: mas01mj@584: printf("Wah!\n"); mas01mj@584: return 1; mas01mj@584: }