//GuessParserName is used to guess the appropriate parser given a URI func (world *World) GuessParserName(uri *Uri) string { var cUriAsString *C.uchar if cUriAsString = C.librdf_uri_as_string(uri.librdf_uri); cUriAsString == nil { return "" } defer C.free(unsafe.Pointer(cUriAsString)) var cParserName *C.char if cParserName = C.librdf_parser_guess_name2(world.librdf_world, nil, nil, cUriAsString); cParserName == nil { return "" } defer C.free(unsafe.Pointer(cParserName)) parserName := C.GoString(cParserName) return parserName }
//ToString serializers a URI to string func (uri Uri) ToString() string { cUriString := C.librdf_uri_as_string(uri.librdf_uri) defer C.free(unsafe.Pointer(cUriString)) return C.GoString((*C.char)(unsafe.Pointer(cUriString))) }