Produced by Araxis Merge on 12/21/2017 6:15:13 PM Eastern Standard Time. See www.araxis.com for information about Merge. This report uses XHTML and CSS2, and is best viewed with a modern standards-compliant browser. For optimum results when printing this report, use landscape orientation and enable printing of background images and colours in your browser.
| # | Location | File | Last Modified |
|---|---|---|---|
| 1 | Genisis_2.0_v7_bld7.zip\TS\Service\term-service\src\main\java\gov\va\genisis2\ts\fuseki | FusekiClient.java | Thu Dec 14 19:57:15 2017 UTC |
| 2 | Genisis_2.0_v7_bld7.zip\TS\Service\term-service\src\main\java\gov\va\genisis2\ts\fuseki | FusekiClient.java | Thu Dec 21 22:11:52 2017 UTC |
| Description | Between Files 1 and 2 |
|
|---|---|---|
| Text Blocks | Lines | |
| Unchanged | 2 | 114 |
| Changed | 1 | 2 |
| Inserted | 0 | 0 |
| Removed | 0 | 0 |
| Whitespace | |
|---|---|
| Character case | Differences in character case are significant |
| Line endings | Differences in line endings (CR and LF characters) are ignored |
| CR/LF characters | Not shown in the comparison detail |
No regular expressions were active.
| 1 | package go v.va.genis is2.ts.fus eki; | |
| 2 | ||
| 3 | import org .apache.je na.query.Q ueryExecut ion; | |
| 4 | import org .apache.je na.query.Q ueryExecut ionFactory ; | |
| 5 | import org .apache.je na.query.R esultSet; | |
| 6 | import org .apache.je na.update. UpdateExec utionFacto ry; | |
| 7 | import org .apache.je na.update. UpdateFact ory; | |
| 8 | import org .apache.je na.update. UpdateProc essor; | |
| 9 | import org .apache.je na.update. UpdateRequ est; | |
| 10 | import org .springfra mework.ste reotype.Co mponent; | |
| 11 | ||
| 12 | /** | |
| 13 | * @author {II | |
| 14 | * | |
| 15 | */ | |
| 16 | @Component | |
| 17 | public cla ss FusekiC lient { | |
| 18 | ||
| 19 | pr ivate long queryConn ectionTime out = 5000 L; | |
| 20 | pr ivate long queryRead Timeout = 5000L; | |
| 21 | ||
| 22 | pu blic Resul tSet perfo rmSelectQu ery(QueryE xecution q e, String sparqlEndP oint) { | |
| 23 | qe.s etTimeout( queryReadT imeout, qu eryConnect ionTimeout ); | |
| 24 | retu rn qe.exec Select(); | |
| 25 | } | |
| 26 | ||
| 27 | pu blic void performUpd ate(String command, String spa rqlEndPoin t) { | |
| 28 | perf ormUpdate( UpdateFact ory.create (command), sparqlEnd Point); | |
| 29 | } | |
| 30 | ||
| 31 | pu blic void performUpd ate(Update Request re quest, Str ing sparql EndPoint) { | |
| 32 | Upda teProcesso r proc = U pdateExecu tionFactor y.createRe mote(reque st, sparql EndPoint); | |
| 33 | proc .execute() ; | |
| 34 | } | |
| 35 | ||
| 36 | /* * | |
| 37 | * Returns t rue or fal se if the given quer y string i s containd in the tr iple | |
| 38 | * store Que ry should be in the format of ASK {?s ?p ?o} | |
| 39 | * | |
| 40 | * @param qu ery | |
| 41 | * @param sp arqlEndpoi nt | |
| 42 | * @return | |
| 43 | * @throws E xception | |
| 44 | * / | |
| 45 | pu blic boole an perform Ask(String query, St ring sparq lEndpoint) throws Ex ception { | |
| 46 | Quer yExecution qe = Quer yExecution Factory.sp arqlServic e(sparqlEn dpoint, qu ery); | |
| 47 | Bool ean exists = null; | |
| 48 | try { | |
| 49 | exists = qe.exec Ask(); | |
| 50 | } ca tch (Excep tion e) { | |
| 51 | throw new Except ion("Error trying to exceute c ommand: " + e); | |
| 52 | } fi nally { | |
| 53 | if (qe != null) | |
| 54 | qe.close (); | |
| 55 | } | |
| 56 | retu rn exists; | |
| 57 | } | |
| 58 | } |
Araxis Merge (but not the data content of this report) is Copyright © 1993-2016 Araxis Ltd (www.araxis.com). All rights reserved.