Index: tags/extensions/SemanticCompoundQueries/REL_0_2_5/SCQ_QueryResult.php |
— | — | @@ -0,0 +1,35 @@ |
| 2 | +<?php |
| 3 | + |
| 4 | +if ( !defined( 'MEDIAWIKI' ) ) die(); |
| 5 | + |
| 6 | +/** |
| 7 | + * Subclass of SMWQueryResult - this class was mostly created in order to |
| 8 | + * get around an inconvenient print-request-compatibility check in |
| 9 | + * SMWQueryResult::addRow() |
| 10 | + * |
| 11 | + * @ingroup SemanticCompoundQueries |
| 12 | + * @author Yaron Koren |
| 13 | + */ |
| 14 | +class SCQQueryResult extends SMWQueryResult { |
| 15 | + |
| 16 | + function addResult( $new_result ) { |
| 17 | + // create an array of the pages already in this query result, |
| 18 | + // so that we can check against it to make sure that pages |
| 19 | + // aren't included twice |
| 20 | + $existing_page_names = array(); |
| 21 | + while ( $row = $this->getNext() ) { |
| 22 | + if ( $row[0] instanceof SMWResultArray ) { |
| 23 | + $content = $row[0]->getContent(); |
| 24 | + $existing_page_names[] = $content[0]->getLongText( SMW_OUTPUT_WIKI ); |
| 25 | + } |
| 26 | + } |
| 27 | + while ( ( $row = $new_result->getNext() ) !== false ) { |
| 28 | + $row[0]->display_options = $new_result->display_options; |
| 29 | + $content = $row[0]->getContent(); |
| 30 | + $page_name = $content[0]->getLongText( SMW_OUTPUT_WIKI ); |
| 31 | + if ( ! in_array( $page_name, $existing_page_names ) ) |
| 32 | + $this->m_content[] = $row; |
| 33 | + } |
| 34 | + reset( $this->m_content ); |
| 35 | + } |
| 36 | +} |
Property changes on: tags/extensions/SemanticCompoundQueries/REL_0_2_5/SCQ_QueryResult.php |
___________________________________________________________________ |
Name: svn:eol-style |
1 | 37 | + native |
Index: tags/extensions/SemanticCompoundQueries/REL_0_2_5/SCQ_QueryProcessor.php |
— | — | @@ -0,0 +1,151 @@ |
| 2 | +<?php |
| 3 | + |
| 4 | +if ( !defined( 'MEDIAWIKI' ) ) die(); |
| 5 | + |
| 6 | +/** |
| 7 | + * Class that holds static functions for handling compound queries. |
| 8 | + * This class inherits from Semantic MediaWiki's SMWQueryProcessor. |
| 9 | + * |
| 10 | + * @ingroup SemanticCompoundQueries |
| 11 | + * @author Yaron Koren |
| 12 | + */ |
| 13 | +class SCQQueryProcessor extends SMWQueryProcessor { |
| 14 | + |
| 15 | + /** |
| 16 | + * An alternative to explode() - that function won't work here, |
| 17 | + * because we don't want to split the string on all semicolons, just |
| 18 | + * the ones that aren't contained within square brackets |
| 19 | + */ |
| 20 | + public static function getSubParams( $param ) { |
| 21 | + $sub_params = array(); |
| 22 | + $sub_param = ""; |
| 23 | + $uncompleted_square_brackets = 0; |
| 24 | + for ( $i = 0; $i < strlen( $param ); $i++ ) { |
| 25 | + $c = $param[$i]; |
| 26 | + if ( ( $c == ';' ) && ( $uncompleted_square_brackets <= 0 ) ) { |
| 27 | + $sub_params[] = trim( $sub_param ); |
| 28 | + $sub_param = ""; |
| 29 | + } else { |
| 30 | + $sub_param .= $c; |
| 31 | + if ( $c == '[' ) |
| 32 | + $uncompleted_square_brackets++; |
| 33 | + elseif ( $c == ']' ) |
| 34 | + $uncompleted_square_brackets--; |
| 35 | + } |
| 36 | + } |
| 37 | + $sub_params[] = trim( $sub_param ); |
| 38 | + return $sub_params; |
| 39 | + } |
| 40 | + |
| 41 | + /** |
| 42 | + */ |
| 43 | + public static function doCompoundQuery( &$parser ) { |
| 44 | + global $smwgQEnabled, $smwgIQRunningNumber; |
| 45 | + if ( $smwgQEnabled ) { |
| 46 | + $smwgIQRunningNumber++; |
| 47 | + $params = func_get_args(); |
| 48 | + array_shift( $params ); // we already know the $parser ... |
| 49 | + $other_params = array(); |
| 50 | + $query_result = null; |
| 51 | + $results = array(); |
| 52 | + foreach ( $params as $param ) { |
| 53 | + // very primitive heuristic - if the parameter |
| 54 | + // includes a square bracket, then it's a |
| 55 | + // sub-query; otherwise it's a regular parameter |
| 56 | + if ( strpos( $param, '[' ) !== false ) { |
| 57 | + $sub_params = self::getSubParams( $param ); |
| 58 | + $next_result = self::getQueryResultFromFunctionParams( $sub_params, SMW_OUTPUT_WIKI ); |
| 59 | + if ( method_exists( $next_result, 'getResults' ) ) { // SMW 1.5+ |
| 60 | + $results = self::mergeSMWQueryResults( $results, $next_result->getResults() ); |
| 61 | + } else { |
| 62 | + if ( $query_result == null ) |
| 63 | + $query_result = new SCQQueryResult( $next_result->getPrintRequests(), new SMWQuery() ); |
| 64 | + $query_result->addResult( $next_result ); |
| 65 | + } |
| 66 | + } else { |
| 67 | + $parts = explode( '=', $param, 2 ); |
| 68 | + if ( count( $parts ) >= 2 ) { |
| 69 | + $other_params[strtolower( trim( $parts[0] ) )] = $parts[1]; // don't trim here, some params care for " " |
| 70 | + } |
| 71 | + } |
| 72 | + } |
| 73 | + if ( is_null( $query_result ) ) // SMW 1.5+ |
| 74 | + $query_result = new SCQQueryResult( $next_result->getPrintRequests(), new SMWQuery(), $results, smwfGetStore() ); |
| 75 | + $result = SCQQueryProcessor::getResultFromQueryResult( $query_result, $other_params, null, SMW_OUTPUT_WIKI ); |
| 76 | + } else { |
| 77 | + wfLoadExtensionMessages( 'SemanticMediaWiki' ); |
| 78 | + $result = smwfEncodeMessages( array( wfMsgForContent( 'smw_iq_disabled' ) ) ); |
| 79 | + } |
| 80 | + return $result; |
| 81 | + } |
| 82 | + |
| 83 | + static function getQueryResultFromFunctionParams( $rawparams, $outputmode, $context = SMWQueryProcessor::INLINE_QUERY, $showmode = false ) { |
| 84 | + self::processFunctionParams( $rawparams, $querystring, $params, $printouts, $showmode ); |
| 85 | + return self::getQueryResultFromQueryString( $querystring, $params, $printouts, SMW_OUTPUT_WIKI, $context ); |
| 86 | + } |
| 87 | + |
| 88 | + /** |
| 89 | + * Combine two arrays of SMWWikiPageValue objects into one |
| 90 | + */ |
| 91 | + static function mergeSMWQueryResults( $result1, $result2 ) { |
| 92 | + if ( $result1 == null ) { |
| 93 | + return $result2; |
| 94 | + } |
| 95 | + $existing_page_names = array(); |
| 96 | + foreach ( $result1 as $r1 ) { |
| 97 | + $existing_page_names[] = $r1->getWikiValue(); |
| 98 | + } |
| 99 | + foreach ( $result2 as $r2 ) { |
| 100 | + $page_name = $r2->getWikiValue(); |
| 101 | + if ( ! in_array( $page_name, $existing_page_names ) ) { |
| 102 | + $result1[] = $r2; |
| 103 | + } |
| 104 | + } |
| 105 | + return $result1; |
| 106 | + } |
| 107 | + |
| 108 | + static function getQueryResultFromQueryString( $querystring, $params, $extraprintouts, $outputmode, $context = SMWQueryProcessor::INLINE_QUERY ) { |
| 109 | + wfProfileIn( 'SCQQueryProcessor::getQueryResultFromQueryString' ); |
| 110 | + $query = self::createQuery( $querystring, $params, $context, null, $extraprintouts ); |
| 111 | + $query_result = smwfGetStore()->getQueryResult( $query ); |
| 112 | + $display_options = array(); |
| 113 | + foreach ( $params as $key => $value ) { |
| 114 | + // special handling for 'icon' field, since it requires |
| 115 | + // conversion of a name to a URL |
| 116 | + if ( $key == 'icon' ) { |
| 117 | + $icon_title = Title::newFromText( $value ); |
| 118 | + $icon_image_page = new ImagePage( $icon_title ); |
| 119 | + // method was only added in MW 1.13 |
| 120 | + if ( method_exists( 'ImagePage', 'getDisplayedFile' ) ) { |
| 121 | + $icon_url = $icon_image_page->getDisplayedFile()->getURL(); |
| 122 | + $display_options['icon'] = $icon_url; |
| 123 | + } |
| 124 | + } else { |
| 125 | + $display_options[$key] = $value; |
| 126 | + } |
| 127 | + if ( method_exists( $query_result, 'getResults' ) ) { // SMW 1.5+ |
| 128 | + foreach ( $query_result->getResults() as $wiki_page ) { |
| 129 | + $wiki_page->display_options = $display_options; |
| 130 | + } |
| 131 | + } else { |
| 132 | + $query_result->display_options = $display_options; |
| 133 | + } |
| 134 | + } |
| 135 | + |
| 136 | + wfProfileOut( 'SCQQueryProcessor::getQueryResultFromQueryString' ); |
| 137 | + return $query_result; |
| 138 | + } |
| 139 | + |
| 140 | + /* |
| 141 | + * Matches getResultFromQueryResult() from SMWQueryProcessor, |
| 142 | + * except that formats of type 'debug' and 'count' aren't handled |
| 143 | + */ |
| 144 | + static function getResultFromQueryResult( $res, $params, $extraprintouts, $outputmode, $context = SMWQueryProcessor::INLINE_QUERY, $format = '' ) { |
| 145 | + wfProfileIn( 'SCQQueryProcessor::getResultFromQueryResult' ); |
| 146 | + $format = self::getResultFormat( $params ); |
| 147 | + $printer = self::getResultPrinter( $format, $context, $res ); |
| 148 | + $result = $printer->getResult( $res, $params, $outputmode ); |
| 149 | + wfProfileOut( 'SCQQueryProcessor::getResultFromQueryResult' ); |
| 150 | + return $result; |
| 151 | + } |
| 152 | +} |
Property changes on: tags/extensions/SemanticCompoundQueries/REL_0_2_5/SCQ_QueryProcessor.php |
___________________________________________________________________ |
Name: svn:eol-style |
1 | 153 | + native |
Index: tags/extensions/SemanticCompoundQueries/REL_0_2_5/SemanticCompoundQueries.i18n.magic.php |
— | — | @@ -0,0 +1,23 @@ |
| 2 | +<?php |
| 3 | + |
| 4 | +$magicWords = array(); |
| 5 | + |
| 6 | +$magicWords['en'] = array( |
| 7 | + 'compound_query' => array( 0, 'compound_query' ), |
| 8 | +); |
| 9 | + |
| 10 | +$magicWords['ar'] = array( |
| 11 | + 'compound_query' => array( '0', 'استعلام_مركب', 'compound_query' ), |
| 12 | +); |
| 13 | + |
| 14 | +$magicWords['arz'] = array( |
| 15 | + 'compound_query' => array( '0', 'استعلام_مركب', 'compound_query' ), |
| 16 | +); |
| 17 | + |
| 18 | +$magicWords['nds-nl'] = array( |
| 19 | + 'compound_query' => array( '0', 'samen-estelde_zeukopdrach', 'samengestelde_zoekopdracht', 'compound_query' ), |
| 20 | +); |
| 21 | + |
| 22 | +$magicWords['nl'] = array( |
| 23 | + 'compound_query' => array( '0', 'samengestelde_zoekopdracht', 'compound_query' ), |
| 24 | +); |
Property changes on: tags/extensions/SemanticCompoundQueries/REL_0_2_5/SemanticCompoundQueries.i18n.magic.php |
___________________________________________________________________ |
Name: svn:keywords |
1 | 25 | + Id |
Name: svn:eol-style |
2 | 26 | + native |
Index: tags/extensions/SemanticCompoundQueries/REL_0_2_5/SemanticCompoundQueries.i18n.php |
— | — | @@ -0,0 +1,296 @@ |
| 2 | +<?php |
| 3 | +/** |
| 4 | + * Internationalisation file for SemanticCompoundQueries extension. |
| 5 | + * |
| 6 | + * @addtogroup Extensions |
| 7 | + */ |
| 8 | + |
| 9 | +// FIXME: Can be enabled when new style magic words are used (introduced in r52503) |
| 10 | +// require_once( dirname( __FILE__ ) . '/SemanticCompoundQueries.i18n.magic.php' ); |
| 11 | + |
| 12 | +$messages = array(); |
| 13 | + |
| 14 | +/** English |
| 15 | + * @author Yaron Koren |
| 16 | + */ |
| 17 | +$messages['en'] = array( |
| 18 | + 'semanticcompoundqueries-desc' => 'A parser function that displays multiple semantic queries at the same time', |
| 19 | +); |
| 20 | + |
| 21 | +/** Message documentation (Message documentation) |
| 22 | + * @author Fryed-peach |
| 23 | + * @author Purodha |
| 24 | + */ |
| 25 | +$messages['qqq'] = array( |
| 26 | + 'semanticcompoundqueries-desc' => '{{desc}}', |
| 27 | +); |
| 28 | + |
| 29 | +/** Arabic (العربية) |
| 30 | + * @author Meno25 |
| 31 | + */ |
| 32 | +$messages['ar'] = array( |
| 33 | + 'semanticcompoundqueries-desc' => 'دالة محلل تعرض استعلامات دلالية متعددة في نفس الوقت', |
| 34 | +); |
| 35 | + |
| 36 | +/** Belarusian (Taraškievica orthography) (Беларуская (тарашкевіца)) |
| 37 | + * @author EugeneZelenko |
| 38 | + * @author Jim-by |
| 39 | + */ |
| 40 | +$messages['be-tarask'] = array( |
| 41 | + 'semanticcompoundqueries-desc' => 'Функцыя парсэра, якая паказвае шматлікія сэмантычныя запыты ў адзін час', |
| 42 | +); |
| 43 | + |
| 44 | +/** Breton (Brezhoneg) |
| 45 | + * @author Fulup |
| 46 | + */ |
| 47 | +$messages['br'] = array( |
| 48 | + 'semanticcompoundqueries-desc' => "Un arc'hwel eus ar parser a ziskwel meur a reked ereadurel war un dro", |
| 49 | +); |
| 50 | + |
| 51 | +/** Bosnian (Bosanski) |
| 52 | + * @author CERminator |
| 53 | + */ |
| 54 | +$messages['bs'] = array( |
| 55 | + 'semanticcompoundqueries-desc' => 'Parserska funkcija koja prikazuje više semantičkih upita u isto vrijeme', |
| 56 | +); |
| 57 | + |
| 58 | +/** German (Deutsch) |
| 59 | + * @author Purodha |
| 60 | + */ |
| 61 | +$messages['de'] = array( |
| 62 | + 'semanticcompoundqueries-desc' => 'Eine Parserfunktion, die mehrere semantische Abfragen zugleich anzuzeigen erlaubt', |
| 63 | +); |
| 64 | + |
| 65 | +/** Lower Sorbian (Dolnoserbski) |
| 66 | + * @author Michawiki |
| 67 | + */ |
| 68 | +$messages['dsb'] = array( |
| 69 | + 'semanticcompoundqueries-desc' => 'Parserowa funkcija, kótaraž rownocasnje zwobraznjujo někotare semantiske wótpšašanja', |
| 70 | +); |
| 71 | + |
| 72 | +/** Greek (Ελληνικά) |
| 73 | + * @author Omnipaedista |
| 74 | + */ |
| 75 | +$messages['el'] = array( |
| 76 | + 'semanticcompoundqueries-desc' => 'Μια λεξιαναλυτική συνάρτηση που προβάλλει πολλαπλά σημασιολογικά αιτήματα ταυτόχρονα', |
| 77 | +); |
| 78 | + |
| 79 | +/** Spanish (Español) |
| 80 | + * @author Crazymadlover |
| 81 | + */ |
| 82 | +$messages['es'] = array( |
| 83 | + 'semanticcompoundqueries-desc' => 'Una función analizadora que muestra múltiples consultas semánticas al mismo tiempo', |
| 84 | +); |
| 85 | + |
| 86 | +/** Finnish (Suomi) |
| 87 | + * @author Centerlink |
| 88 | + * @author Crt |
| 89 | + */ |
| 90 | +$messages['fi'] = array( |
| 91 | + 'semanticcompoundqueries-desc' => 'Jäsennintoiminto, joka näyttää useita semanttisia kyselyjä samaan aikaan.', |
| 92 | +); |
| 93 | + |
| 94 | +/** French (Français) |
| 95 | + * @author IAlex |
| 96 | + */ |
| 97 | +$messages['fr'] = array( |
| 98 | + 'semanticcompoundqueries-desc' => 'Une fonction du parseur qui affiche plusieurs requêtes sémantiques en même temps', |
| 99 | +); |
| 100 | + |
| 101 | +/** Galician (Galego) |
| 102 | + * @author Toliño |
| 103 | + */ |
| 104 | +$messages['gl'] = array( |
| 105 | + 'semanticcompoundqueries-desc' => 'Unha función analítica que mostra varias pescudas semánticas ao mesmo tempo', |
| 106 | +); |
| 107 | + |
| 108 | +/** Swiss German (Alemannisch) |
| 109 | + * @author Als-Holder |
| 110 | + */ |
| 111 | +$messages['gsw'] = array( |
| 112 | + 'semanticcompoundqueries-desc' => 'E Parserfunktion, wu erlaubt, mehreri semantischi Abfroge uf eimol aazzeige', |
| 113 | +); |
| 114 | + |
| 115 | +/** Hebrew (עברית) |
| 116 | + * @author Rotemliss |
| 117 | + */ |
| 118 | +$messages['he'] = array( |
| 119 | + 'semanticcompoundqueries-desc' => 'הוראת מפענח המציגה מספר שאילתות סמנטיות בעת ובעונה אחת', |
| 120 | +); |
| 121 | + |
| 122 | +/** Hiligaynon (Ilonggo) |
| 123 | + * @author Tagimata |
| 124 | + */ |
| 125 | +$messages['hil'] = array( |
| 126 | + 'semanticcompoundqueries-desc' => 'Ang parser panksiyon nga nagapakita sang multiple semantik pamangkotanon sa parehas nga tiyempo', |
| 127 | +); |
| 128 | + |
| 129 | +/** Upper Sorbian (Hornjoserbsce) |
| 130 | + * @author Michawiki |
| 131 | + */ |
| 132 | +$messages['hsb'] = array( |
| 133 | + 'semanticcompoundqueries-desc' => 'Parserowa funkcija, kotraž wjacore semantiske wotprašowanja nadobo zwobrazuje', |
| 134 | +); |
| 135 | + |
| 136 | +/** Hungarian (Magyar) |
| 137 | + * @author Glanthor Reviol |
| 138 | + */ |
| 139 | +$messages['hu'] = array( |
| 140 | + 'semanticcompoundqueries-desc' => 'Egyszerre több szemantikus lekérdezést megjelenítő elemzőfüggvény', |
| 141 | +); |
| 142 | + |
| 143 | +/** Interlingua (Interlingua) |
| 144 | + * @author McDutchie |
| 145 | + */ |
| 146 | +$messages['ia'] = array( |
| 147 | + 'semanticcompoundqueries-desc' => 'Un function syntactic que presenta plure consultas semantic al mesme tempore', |
| 148 | +); |
| 149 | + |
| 150 | +/** Indonesian (Bahasa Indonesia) |
| 151 | + * @author Bennylin |
| 152 | + */ |
| 153 | +$messages['id'] = array( |
| 154 | + 'semanticcompoundqueries-desc' => 'Fungsi parser untuk menampilkan beberapa kueri semantik secara bersamaan', |
| 155 | +); |
| 156 | + |
| 157 | +/** Italian (Italiano) |
| 158 | + * @author Gianfranco |
| 159 | + */ |
| 160 | +$messages['it'] = array( |
| 161 | + 'semanticcompoundqueries-desc' => 'Una funzione di parsing che mostra più query semantiche contemporaneamente', |
| 162 | +); |
| 163 | + |
| 164 | +/** Japanese (日本語) |
| 165 | + * @author Fryed-peach |
| 166 | + */ |
| 167 | +$messages['ja'] = array( |
| 168 | + 'semanticcompoundqueries-desc' => '複数の意味的クエリーを一度に表示するパーサー関数', |
| 169 | +); |
| 170 | + |
| 171 | +/** Colognian (Ripoarisch) |
| 172 | + * @author Purodha |
| 173 | + */ |
| 174 | +$messages['ksh'] = array( |
| 175 | + 'semanticcompoundqueries-desc' => 'En Paaser_Funkßuhn öm ettlijje semantesche Froore op eijmohl aanzezeije.', |
| 176 | +); |
| 177 | + |
| 178 | +/** Luxembourgish (Lëtzebuergesch) |
| 179 | + * @author Robby |
| 180 | + */ |
| 181 | +$messages['lb'] = array( |
| 182 | + 'semanticcompoundqueries-desc' => 'Eng Parserfonctioun déi et erlaabt méi semantesch Ufroe mateneen ze weisen', |
| 183 | +); |
| 184 | + |
| 185 | +/** Macedonian (Македонски) |
| 186 | + * @author Bjankuloski06 |
| 187 | + */ |
| 188 | +$messages['mk'] = array( |
| 189 | + 'semanticcompoundqueries-desc' => 'Парсерска функција која прикажува повеќе семантички барања истовремено', |
| 190 | +); |
| 191 | + |
| 192 | +/** Dutch (Nederlands) |
| 193 | + * @author Siebrand |
| 194 | + */ |
| 195 | +$messages['nl'] = array( |
| 196 | + 'semanticcompoundqueries-desc' => 'Een parserfunctie die meerdere semantische zoekopdrachten op hetzelfde moment kan weergeven', |
| 197 | +); |
| 198 | + |
| 199 | +/** Norwegian (bokmål) (Norsk (bokmål)) |
| 200 | + * @author Nghtwlkr |
| 201 | + */ |
| 202 | +$messages['no'] = array( |
| 203 | + 'semanticcompoundqueries-desc' => 'En tolkefunksjon som viser flere semantiske spørringer samtidig', |
| 204 | +); |
| 205 | + |
| 206 | +/** Occitan (Occitan) |
| 207 | + * @author Cedric31 |
| 208 | + */ |
| 209 | +$messages['oc'] = array( |
| 210 | + 'semanticcompoundqueries-desc' => "Una foncion del parser qu'aficha mai d'una requèsta semanticas a l'encòp", |
| 211 | +); |
| 212 | + |
| 213 | +/** Polish (Polski) |
| 214 | + * @author Sp5uhe |
| 215 | + */ |
| 216 | +$messages['pl'] = array( |
| 217 | + 'semanticcompoundqueries-desc' => 'Funkcja parsera wyświetlająca różnorodne znaczeniowo zapytania w tym samym czasie', |
| 218 | +); |
| 219 | + |
| 220 | +/** Piedmontese (Piemontèis) |
| 221 | + * @author Dragonòt |
| 222 | + */ |
| 223 | +$messages['pms'] = array( |
| 224 | + 'semanticcompoundqueries-desc' => 'Na fonsion dël parser che a visualisa vàire antërogassion semàntiche al midem temp', |
| 225 | +); |
| 226 | + |
| 227 | +/** Portuguese (Português) |
| 228 | + * @author Hamilton Abreu |
| 229 | + * @author Waldir |
| 230 | + */ |
| 231 | +$messages['pt'] = array( |
| 232 | + 'semanticcompoundqueries-desc' => 'Uma função de análise gramatical que mostra várias consultas semânticas em simultâneo', |
| 233 | +); |
| 234 | + |
| 235 | +/** Brazilian Portuguese (Português do Brasil) |
| 236 | + * @author Eduardo.mps |
| 237 | + */ |
| 238 | +$messages['pt-br'] = array( |
| 239 | + 'semanticcompoundqueries-desc' => 'Uma função analisadora que exibe múltiplas consultas semânticas ao mesmo tempo', |
| 240 | +); |
| 241 | + |
| 242 | +/** Tarandíne (Tarandíne) |
| 243 | + * @author Joetaras |
| 244 | + */ |
| 245 | +$messages['roa-tara'] = array( |
| 246 | + 'semanticcompoundqueries-desc' => "'Na funziona de analisi ca visualizze le inderrogazziune semandiche multiple jndr'à 'u stesse mumende", |
| 247 | +); |
| 248 | + |
| 249 | +/** Russian (Русский) |
| 250 | + * @author Александр Сигачёв |
| 251 | + */ |
| 252 | +$messages['ru'] = array( |
| 253 | + 'semanticcompoundqueries-desc' => 'Функция парсера, показывающая несколько семантических запросов за один раз', |
| 254 | +); |
| 255 | + |
| 256 | +/** Slovak (Slovenčina) |
| 257 | + * @author Helix84 |
| 258 | + */ |
| 259 | +$messages['sk'] = array( |
| 260 | + 'semanticcompoundqueries-desc' => 'Funkcia syntaktického analyzátora, ktorá zobrazuje viaceré sémantické požiadavky naraz', |
| 261 | +); |
| 262 | + |
| 263 | +/** Serbian Cyrillic ekavian (Српски (ћирилица)) |
| 264 | + * @author Михајло Анђелковић |
| 265 | + */ |
| 266 | +$messages['sr-ec'] = array( |
| 267 | + 'semanticcompoundqueries-desc' => 'Парсер-функција која приказује више семантичких захтева истовремено', |
| 268 | +); |
| 269 | + |
| 270 | +/** Serbian Latin ekavian (Srpski (latinica)) |
| 271 | + * @author Liangent |
| 272 | + */ |
| 273 | +$messages['sr-el'] = array( |
| 274 | + 'semanticcompoundqueries-desc' => 'Parser-funkcija koja prikazuje više semantičkih zahteva istovremeno', |
| 275 | +); |
| 276 | + |
| 277 | +/** Swedish (Svenska) |
| 278 | + * @author Boivie |
| 279 | + */ |
| 280 | +$messages['sv'] = array( |
| 281 | + 'semanticcompoundqueries-desc' => 'En parserfunktion som visar flera semantiska frågor på samma gång', |
| 282 | +); |
| 283 | + |
| 284 | +/** Turkish (Türkçe) |
| 285 | + * @author Vito Genovese |
| 286 | + */ |
| 287 | +$messages['tr'] = array( |
| 288 | + 'semanticcompoundqueries-desc' => 'Birden fazla anlamsal sorguyu aynı anda görüntüleyen bir ayrıştırıcı fonksiyon', |
| 289 | +); |
| 290 | + |
| 291 | +/** Vietnamese (Tiếng Việt) |
| 292 | + * @author Minh Nguyen |
| 293 | + */ |
| 294 | +$messages['vi'] = array( |
| 295 | + 'semanticcompoundqueries-desc' => 'Hàm cú pháp hiển thị nhiều truy vấn ngữ nghĩa cùng lúc', |
| 296 | +); |
| 297 | + |
Property changes on: tags/extensions/SemanticCompoundQueries/REL_0_2_5/SemanticCompoundQueries.i18n.php |
___________________________________________________________________ |
Name: svn:keywords |
1 | 298 | + Id |
Name: svn:eol-style |
2 | 299 | + native |
Index: tags/extensions/SemanticCompoundQueries/REL_0_2_5/SemanticCompoundQueries.php |
— | — | @@ -0,0 +1,46 @@ |
| 2 | +<?php |
| 3 | +/** |
| 4 | + * Initialization file for SemanticCompoundQueries |
| 5 | + * |
| 6 | + * @file |
| 7 | + * @ingroup SemanticCompoundQueries |
| 8 | + * @author Yaron Koren |
| 9 | + */ |
| 10 | + |
| 11 | +if ( !defined( 'MEDIAWIKI' ) ) die(); |
| 12 | + |
| 13 | +define( 'SCQ_VERSION', '0.2.5' ); |
| 14 | + |
| 15 | +$wgExtensionCredits['parserhook'][] = array( |
| 16 | + 'path' => __FILE__, |
| 17 | + 'name' => 'Semantic Compound Queries', |
| 18 | + 'version' => SCQ_VERSION, |
| 19 | + 'author' => 'Yaron Koren', |
| 20 | + 'url' => 'http://www.mediawiki.org/wiki/Extension:Semantic_Compound_Queries', |
| 21 | + 'descriptionmsg' => 'semanticcompoundqueries-desc', |
| 22 | +); |
| 23 | + |
| 24 | +$wgExtensionMessagesFiles['SemanticCompoundQueries'] = dirname( __FILE__ ) . '/SemanticCompoundQueries.i18n.php'; |
| 25 | + |
| 26 | + |
| 27 | +$wgHooks['ParserFirstCallInit'][] = 'scqgRegisterParser'; |
| 28 | +// FIXME: Can be removed when new style magic words are used (introduced in r52503) |
| 29 | +$wgHooks['LanguageGetMagic'][] = 'scqgLanguageGetMagic'; |
| 30 | + |
| 31 | +$scqIP = $IP . '/extensions/SemanticCompoundQueries'; |
| 32 | +$wgAutoloadClasses['SCQQueryProcessor'] = $scqIP . '/SCQ_QueryProcessor.php'; |
| 33 | +$wgAutoloadClasses['SCQQueryResult'] = $scqIP . '/SCQ_QueryResult.php'; |
| 34 | + |
| 35 | +function scqgRegisterParser( &$parser ) { |
| 36 | + $parser->setFunctionHook( 'compound_query', array( 'SCQQueryProcessor', 'doCompoundQuery' ) ); |
| 37 | + return true; // always return true, in order not to stop MW's hook processing! |
| 38 | +} |
| 39 | + |
| 40 | +// FIXME: Can be removed when new style magic words are used (introduced in r52503) |
| 41 | +function scqgLanguageGetMagic( &$magicWords, $langCode = "en" ) { |
| 42 | + switch ( $langCode ) { |
| 43 | + default: |
| 44 | + $magicWords['compound_query'] = array ( 0, 'compound_query' ); |
| 45 | + } |
| 46 | + return true; |
| 47 | +} |
Property changes on: tags/extensions/SemanticCompoundQueries/REL_0_2_5/SemanticCompoundQueries.php |
___________________________________________________________________ |
Name: svn:eol-style |
1 | 48 | + native |
Index: tags/extensions/SemanticCompoundQueries/REL_0_2_5/README |
— | — | @@ -0,0 +1,52 @@ |
| 2 | +Semantic Compound Queries Extension |
| 3 | + |
| 4 | + Version 0.2.5 |
| 5 | + Yaron Koren |
| 6 | + |
| 7 | +This is free software licensed under the GNU General Public License. Please |
| 8 | +see http://www.gnu.org/copyleft/gpl.html for further details, including the |
| 9 | +full text and terms of the license. |
| 10 | + |
| 11 | +== Overview == |
| 12 | + |
| 13 | +Semantic Compound Queries is an extension to MediaWiki that defines a |
| 14 | +parser function, '#compound_query', that displays the results of the |
| 15 | +equivalent of multiple Semantic MediaWiki #ask queries at the same time. |
| 16 | +The syntax of #compound_query resembles that of #ask, but with more than |
| 17 | +one query, and with the elements of each sub-query delimited by semicolons |
| 18 | +instead of pipes. Elements that are common across all sub-queries, like |
| 19 | +'format=' and 'width=' (for maps) should be placed after all sub-queries. |
| 20 | + |
| 21 | +A sample call to #compound query, which retrieves both biographies, along |
| 22 | +with their subject; and fiction books, along with their author; is: |
| 23 | + |
| 24 | +{{#compound_query:[[Category:Books]][[Has gentre::Biography]];?Covers subject=Subject |
| 25 | + |[[Category:Books]][[Has genre::Fiction]];?Has author=Author |
| 26 | + |format=list}} |
| 27 | + |
| 28 | +For more information, see the extension homepage at: |
| 29 | +http://www.mediawiki.org/wiki/Extension:Semantic_Compound_Queries |
| 30 | + |
| 31 | +== Requirements == |
| 32 | + |
| 33 | +This version of the Semantic Compound Queries extension requires MediaWiki 1.8 |
| 34 | +or higher and Semantic MediaWiki 1.2 or higher. |
| 35 | + |
| 36 | +== Installation == |
| 37 | + |
| 38 | +To install the extension, place the entire 'SemanticCompoundQueries' directory |
| 39 | +within your MediaWiki 'extensions' directory, then add the following |
| 40 | +line to your 'LocalSettings.php' file: |
| 41 | + |
| 42 | + require_once( "$IP/extensions/SemanticCompoundQueries/SemanticCompoundQueries.php" ); |
| 43 | + |
| 44 | +== Contact == |
| 45 | + |
| 46 | +Comments, questions, suggestions and bug reports should be sent to |
| 47 | +the Semantic MediaWiki mailing list: |
| 48 | + |
| 49 | + https://lists.sourceforge.net/lists/listinfo/semediawiki-user |
| 50 | + |
| 51 | +If possible, please add "[SCQ]" at the beginning of the subject line, to |
| 52 | +clarify the subject matter. |
| 53 | + |
Property changes on: tags/extensions/SemanticCompoundQueries/REL_0_2_5/README |
___________________________________________________________________ |
Name: svn:eol-style |
1 | 54 | + native |