Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- http://lprapp14.fao.org:8090/openrdf-sesame/repositories/biotech
- PREFIX skosxl:<http://www.w3.org/2008/05/skos-xl#>.
- PREFIX skos:<http://www.w3.org/2004/02/skos/core#>.
- SELECT ?uri ?xlabLit
- WHERE {
- ?termuri skos:related ?uri .
- ?uri skosxl:prefLabel ?xlabel .
- ?xlabel skosxl:literalForm ?xlabLit .
- FILTER ( (regex(str(?termuri), 'http://aims.fao.org/aos/biotechglossary/c_4387')) && (lang(?xlabLit)='es') )
- }
- $agrovoc = new agrovoc_remote('http://agrovoc.fao.org/axis/services/SKOSWS', 'AgrovocWS');
- //dpm($agrovoc->simple_search_by_mode2('rice'));
- dpm($agrovoc->get_all_labels_by_termcode2('6599'));
- //dpm($agrovoc->getConceptByKeyword2('rice bean'));
- ==================================================
- dc:contributor
- dc:coverage
- dc:creator
- dc:date
- dc:description
- dc:format
- dc:identifier
- dc:language
- dc:publisher
- dc:relation
- dc:rights
- dc:source
- dc:subject
- dc:title
- dc:type
- Raw metadata record URL
- Record publication date
- Repository Record identifier
- Set: setSpec (raw value)
- URL to resource
- EXPLAIN SELECT node.nid AS nid, node.title AS node_title, node.language AS node_language, node.created AS node_created, 'node' AS field_data_field_images_node_entity_type, 'node' AS field_data_body_node_entity_type FROM node node LEFT JOIN domain_access domain_access ON node.nid = domain_access.nid AND domain_access.realm = 'domain_id' WHERE (( (domain_access.gid = '1') AND (domain_access.realm = 'domain_id') )AND(( (node.status = '1') AND (node.type IN ('news')) AND (node.language IN ('en')) ))) ORDER BY node_created DESC LIMIT 10 OFFSET 80;
- EXPLAIN SELECT node.nid AS nid, node.title AS node_title, node.language AS node_language, node.created AS node_created, 'node' AS field_data_field_images_node_entity_type, 'node' AS field_data_body_node_entity_type FROM node node USE INDEX(node_created) LEFT JOIN domain_access domain_access ON node.nid = domain_access.nid AND domain_access.realm = 'domain_id' WHERE (( (domain_access.gid = '1') AND (domain_access.realm = 'domain_id') )AND(( (node.status = '1') AND (node.type IN ('news')) AND (node.language IN ('en')) ))) ORDER BY node_created DESC LIMIT 10 OFFSET 80;
- explain select count(*) from node_access;
- ========================================================
- asanchez75@python:/var/www/mhea/sites/all/themes/mhea$ drush-de media
- Project media (7.x-1.3) downloaded to /var/www/mhea/sites/all/modules/contrib/media. [success]
- Project media contains 3 modules: file_entity, media_internet, media.
- The following extensions will be enabled: media, file_entity
- Do you really want to continue? (y/n): y
- file_entity was enabled successfully. [ok]
- media was enabled successfully.
- ========================================================
- git diff --staged --word-diff
- git config --global merge.tool
- ========================================================
- DNA
- http://aims.fao.org/aos/biotechglossary/c_4387
- dpm(_sparql_query_getDataFromWS('DNA', 'en'));
- dpm(
- _sparql_query_execute(
- _sparql_query_getRelatedTermsByURI('http://aims.fao.org/aos/biotechglossary/c_4387','es')
- )
- );
- dpm(
- _sparql_query_execute(
- _sparql_query_getNameTermsByURI('DNA','es')
- )
- );
- =========================================================
- first step
- rice tungro spherical virus
- --simpleSearchByMode2
- second step
- 34140
- --getConceptInfoByTermcode
- [[34140], [Rice tungro spherical virus,LO, rice tungro spherical virus,SK, 水稻东格鲁球形病毒,ZH, Virus sferico tungro del riso,IT, rizs tungro szférikus vírus,HU, Wirus RTSV,PL, Vírus esferiforme tungro do arroz,PT, Virus sphérique tungro du riz,FR, ويروس گرد تونگروي برنج,FA, धान टंग्रो गोलाकार विषाणु,HI, Rice tungro spherical virus,TH, rice tungro spherical virus,CS, сферический вирус риса тунгро,RU, Rice tungro spherical virus,EN, イネツングロスフェリカルウイルス,JA, Virus esférico tungro del arroz,ES, RICE TUNGRO SPHERICAL VIRUS,DE], [UF], [USE, 34138], [BT, 5985], [NT], [RT, 34137]]
- third step
- get_all_labels_by_termcode2
- ==============================================
- rice bean
- --simpleSearchByMode2
- 13921
- --getConceptInfoByTermcode
- [[13921], [vigna,SK, rizsbab,HU, ถั่วเล็บมือนาง,TH, rice bean,CS, rice bean,EN, рисовая фасоль,RU, Feijão-arroz,PT, Haricot riz,FR, REISBOHNE,DE, Fríjol de arroz,ES, ツルアズキ,JA, राइस बीन्स,HI, لوبياهاي آردي,FA], [UF], [USE, 8246], [BT, 8228], [NT], [RT, 3348, 331243]]
- third step
- get_all_labels_by_termcode2
- ================================================
- rice (plant)
- --simpleSearchByMode2
- 331295
- --getConceptInfoByTermcode
- [[331295], [rice (plant),EN], [UF], [USE, 5435], [BT, 3354], [NT, 5436, 5437, 5438, 8076, 24352, 24353, 24354, 34362], [RT, 16032, 34891, 25512, 11125]]
- ================================================
- rice weevil
- $agrovoc = new agrovoc_remote('http://agrovoc.fao.org/axis/services/SKOSWS', 'AgrovocWS');
- $concept = $agrovoc->getConceptByKeyword2('Agrovoc', 'rice bean');
- dpm($concept);
- include_once("/var/www/agridrupal/sites/all/libraries/arc2/ARC2.php");
- $base = 'http://localhost/agridrupal';
- $data = $concept;
- $parser = ARC2::getRDFParser();
- $parser->parse($base, $data);
- dpm($parser->getTriples());
- ===================================================
- 7440 Informational No matching taxonomy term found for source value 'ecology' in vocabulary Subject Specializations.
- 7440 Informational No matching taxonomy term found for source value 'land cover change' in vocabulary Subject Specializations.
- 7440 26029
- sftp://dev.f3b74e44-32c3-45e6-a000-58efb4149b5f@appserver.dev.f3b74e44-32c3-45e6-a000-58efb4149b5f.drush.in:2222/srv/bindings/3d7472ee202a4e1fa4c0dffe07c53652/code
- SELECT `node`.`title` , `node`.`nid`, `content_field_autor`.`value`
- FROM `content_type_publicaciones`
- INNER JOIN `node` ON `content_type_publicaciones`.`nid` = `node`.`nid`
- INNER JOIN `content_field_autor`.`nid` = `node`.`nid`
- WHERE `node`.`type` = 'publicaciones'
- AND `content_type_publicaciones`.`field_edicion_value` = '2012'
- LIMIT 0 , 30
- 1. el layout
- 2. ayuda para contsruir queries broader, narrower y related (seach term)
- 3. que parametros de las consultas SPARQL creen que podrian cambiar
- 3.1 si usa SKOS - XL la consulta puede cambiar mucho
- 1. the term’s label in other languages
- 2. non-preferred terms or other term variants
- 3. the definition in the current language
- 4. Related terms in the current language (this is currently based on a search of the full set of terms in the current language against the keywords in the current term’s definition field to check for matches. Implementation team shall run such a query and explicitly build these relations into the model)
- 5. The clickable URI of the resource
- ===================================================
- TRUNCATE TABLE `agrovocfield_index` ;
- TRUNCATE TABLE `taxonomy_index` ;
- TRUNCATE TABLE `taxonomy_term_data` ;
- TRUNCATE TABLE `taxonomy_term_hierarchy` ;
- TRUNCATE TABLE `i18n_translation_set` ;
- taxonomy_field_presave
- ====================================================
- select distinct ?o ?coord
- where {
- ?s dbpedia-owl:country ?o .
- ?o georss:point ?coord .
- FILTER (lang(?coord) = 'en')
- }
- limit 10
- ====================================================
- $config['remote_store_endpoint'] = 'http://202.45.142.113:10035/repositories/agris';
- $store = ARC2::getRemoteStore($config);
- $uri =
- $query = _sparql_query_getRelatedTermsBySubjectURI('http://aims.fao.org/aos/agrovoc/c_35332', 'eng', 10);
- dpm($query);
- $rows = $store->query($query, 'rows');
- dpm($rows);
- function _sparql_query_getRelatedTermsBySubjectURI($uri, $lang, $limit) {
- return
- "prefix bibo: <http://purl.org/ontology/bibo/>
- prefix dcterms: <http://purl.org/dc/terms/>
- select distinct ?s ?title ?uri ?lang
- where {
- ?s dcterms:title ?title .
- ?s dcterms:subject ?subject .
- ?s bibo:uri ?uri .
- ?s bibo:language ?lang
- filter ((str(?subject) = '" . $uri . "') && (str(?lang) = '" . $lang . "'))
- }
- limit " . $limit;
- }
- EXPLAIN SELECT t.* FROM field_data_field_publication_language t WHERE (entity_type = 'node') AND (entity_id IN ('17962', '17963', '17964', '17966', '17967', '17971', '17972')) AND (language IN ('und')) AND (deleted = '0') ORDER BY delta ASC;
- EXPLAIN SELECT t.* FROM field_data_field_publication_language t USE INDEX(delta) WHERE (entity_type = 'node') AND (entity_id IN ('17962', '17963', '17964', '17966', '17967', '17971', '17972')) AND (language IN ('und')) AND (deleted = '0') ORDER BY delta ASC;
- EXPLAIN SELECT n.nid AS nid, n.status AS
- STATUS FROM apachesolr_index_entities_node aien
- INNER JOIN node n ON n.nid = aien.entity_id
- WHERE (
- aien.status <> n.status
- )
- LIMIT 1000
- mtnorg_old
- geogloria
- bd_can
- template_postgis
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement