[Mulgara-svn] r1456 - in branches/xa11: . jxdata/iTQL/fulltext_queries src/jar/content-rdfxml/java/org/mulgara/content/rdfxml/writer src/jar/query/java/org/mulgara/query/filter src/jar/query/java/org/mulgara/query/filter/value src/jar/resolver-lucene/java/org/mulgara/resolver/lucene src/jar/server/java/org/mulgara/server src/jar/tuples/java/org/mulgara/store/tuples src/jar/util/java/org/mulgara/util src/jar/web/java/org/mulgara/webquery tools/src/org/mulgara/tools
pag at mulgara.org
pag at mulgara.org
Sat Jan 24 04:13:56 UTC 2009
Author: pag
Date: 2009-01-23 20:13:55 -0800 (Fri, 23 Jan 2009)
New Revision: 1456
Added:
branches/xa11/jxdata/iTQL/fulltext_queries/exportData1.txt
branches/xa11/jxdata/iTQL/fulltext_queries/exportResult1.txt
branches/xa11/jxdata/iTQL/fulltext_queries/queryResult20.txt
branches/xa11/jxdata/iTQL/fulltext_queries/queryResult21.txt
Modified:
branches/xa11/common.properties
branches/xa11/jxdata/iTQL/fulltext_queries/queryResult17.txt
branches/xa11/jxdata/iTQL/fulltext_queries/queryResult18.txt
branches/xa11/jxdata/iTQL/fulltext_queries/queryResult19.txt
branches/xa11/jxdata/iTQL/fulltext_queries/test.jxu
branches/xa11/log4j-conf.xml
branches/xa11/src/jar/content-rdfxml/java/org/mulgara/content/rdfxml/writer/RDFXMLWriter.java
branches/xa11/src/jar/query/java/org/mulgara/query/filter/AbstractIsIriFnUnitTest.java
branches/xa11/src/jar/query/java/org/mulgara/query/filter/EqualityComparisonUnitTest.java
branches/xa11/src/jar/query/java/org/mulgara/query/filter/IsBlankFnUnitTest.java
branches/xa11/src/jar/query/java/org/mulgara/query/filter/IsLiteralFnUnitTest.java
branches/xa11/src/jar/query/java/org/mulgara/query/filter/LangMatchesUnitTest.java
branches/xa11/src/jar/query/java/org/mulgara/query/filter/Or.java
branches/xa11/src/jar/query/java/org/mulgara/query/filter/OrUnitTest.java
branches/xa11/src/jar/query/java/org/mulgara/query/filter/RegexFnUnitTest.java
branches/xa11/src/jar/query/java/org/mulgara/query/filter/value/Var.java
branches/xa11/src/jar/resolver-lucene/java/org/mulgara/resolver/lucene/FullTextStringIndex.java
branches/xa11/src/jar/resolver-lucene/java/org/mulgara/resolver/lucene/FullTextStringIndexTuples.java
branches/xa11/src/jar/resolver-lucene/java/org/mulgara/resolver/lucene/FullTextStringIndexUnitTest.java
branches/xa11/src/jar/resolver-lucene/java/org/mulgara/resolver/lucene/LuceneConstraint.java
branches/xa11/src/jar/resolver-lucene/java/org/mulgara/resolver/lucene/LuceneResolver.java
branches/xa11/src/jar/resolver-lucene/java/org/mulgara/resolver/lucene/LuceneResolverFactory.java
branches/xa11/src/jar/resolver-lucene/java/org/mulgara/resolver/lucene/LuceneResolverUnitTest.java
branches/xa11/src/jar/resolver-lucene/java/org/mulgara/resolver/lucene/LuceneTransformer.java
branches/xa11/src/jar/server/java/org/mulgara/server/EmbeddedMulgaraServer.java
branches/xa11/src/jar/tuples/java/org/mulgara/store/tuples/UnboundJoin.java
branches/xa11/src/jar/util/java/org/mulgara/util/TempDir.java
branches/xa11/src/jar/web/java/org/mulgara/webquery/QueryResponsePage.java
branches/xa11/tools/src/org/mulgara/tools/Tql.java
Log:
Merged trunk back in
Modified: branches/xa11/common.properties
===================================================================
--- branches/xa11/common.properties 2009-01-24 01:07:45 UTC (rev 1455)
+++ branches/xa11/common.properties 2009-01-24 04:13:55 UTC (rev 1456)
@@ -5,7 +5,7 @@
# Product properties
project =mulgara
description =Mulgara Semantic Store
-mulgara-version=2.0.7-xa11
+mulgara-version=2.0.7
year =2001-2008
default.build.label=${description} Version ${mulgara-version} (Build @@build@@)
Copied: branches/xa11/jxdata/iTQL/fulltext_queries/exportData1.txt (from rev 1455, trunk/jxdata/iTQL/fulltext_queries/exportData1.txt)
===================================================================
--- branches/xa11/jxdata/iTQL/fulltext_queries/exportData1.txt (rev 0)
+++ branches/xa11/jxdata/iTQL/fulltext_queries/exportData1.txt 2009-01-24 04:13:55 UTC (rev 1456)
@@ -0,0 +1,430 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+<!DOCTYPE rdf:RDF [
+ <!ENTITY dc 'http://purl.org/dc/elements/1.1/'>
+ <!ENTITY rdfs 'http://www.w3.org/2000/01/rdf-schema#'>
+ <!ENTITY ns4 'urn:pmid:'>
+ <!ENTITY owl 'http://www.w3.org/2002/07/owl#'>
+ <!ENTITY rdf 'http://www.w3.org/1999/02/22-rdf-syntax-ns#'>
+ <!ENTITY ns5 'http://mulgara.org/mulgara/Document#'>]>
+
+<rdf:RDF
+ xmlns:dc="&dc;"
+ xmlns:rdfs="&rdfs;"
+ xmlns:ns4="&ns4;"
+ xmlns:owl="&owl;"
+ xmlns:rdf="&rdf;"
+ xmlns:ns5="&ns5;">
+
+ <rdf:Description rdf:about="urn:pmid:10941725">
+ <ns5:title>Methylmercury accumulation in tissues and its effects on growth and appetite in captive great egrets.</ns5:title>
+ </rdf:Description>
+ <rdf:Description rdf:about="urn:pmid:10941726">
+ <ns5:title>Histologic, neurologic, and immunologic effects of methylmercury in captive great egrets.</ns5:title>
+ </rdf:Description>
+ <rdf:Description rdf:about="urn:pmid:10941727">
+ <ns5:title>The effect of dietary aflatoxin on wild turkey poults.</ns5:title>
+ </rdf:Description>
+ <rdf:Description rdf:about="urn:pmid:10941728">
+ <ns5:title>Hematologic and serum chemistry values of the captive European wildcat.</ns5:title>
+ </rdf:Description>
+ <rdf:Description rdf:about="urn:pmid:10941729">
+ <ns5:title>Evaluation of zuclopenthixol acetate to decrease handling stress in wapiti.</ns5:title>
+ </rdf:Description>
+ <rdf:Description rdf:about="urn:pmid:10941730">
+ <ns5:title>Microbes in tree swallow semen.</ns5:title>
+ </rdf:Description>
+ <rdf:Description rdf:about="urn:pmid:10941731">
+ <ns5:title>Validation of the fluorescence polarization assay and comparison to other serological assays for the detection of serum antibodies to Brucella abortus in bison.</ns5:title>
+ </rdf:Description>
+ <rdf:Description rdf:about="urn:pmid:10941732">
+ <ns5:title>Safety and efficacy of Brucella abortus strain RB51 vaccine in captive pregnant elk.</ns5:title>
+ </rdf:Description>
+ <rdf:Description rdf:about="urn:pmid:10941733">
+ <ns5:title>Safety of Brucella abortus strain RB51 in bull elk.</ns5:title>
+ </rdf:Description>
+ <rdf:Description rdf:about="urn:pmid:10941734">
+ <ns5:title>Efficacy of a type C botulism vaccine in green-winged teal.</ns5:title>
+ </rdf:Description>
+ <rdf:Description rdf:about="urn:pmid:10941735">
+ <ns5:title>Serologic and molecular evidence of Ehrlichia spp. in coyotes in California.</ns5:title>
+ </rdf:Description>
+ <rdf:Description rdf:about="urn:pmid:10941736">
+ <ns5:title>Epizootic vesicular disease in captive California sea lions.</ns5:title>
+ </rdf:Description>
+ <rdf:Description rdf:about="urn:pmid:10941737">
+ <ns5:title>A morbillivirus antibody survey of Atlantic walrus, narwhal and beluga in Canada.</ns5:title>
+ </rdf:Description>
+ <rdf:Description rdf:about="urn:pmid:10941738">
+ <ns5:title>Antigenic, phenotypic and molecular characterization confirms Babesia odocoilei isolated from three cervids.</ns5:title>
+ </rdf:Description>
+ <rdf:Description rdf:about="urn:pmid:10941739">
+ <ns5:title>Sylvatic trichinellosis in southwestern Spain.</ns5:title>
+ </rdf:Description>
+ <rdf:Description rdf:about="urn:pmid:10941740">
+ <ns5:title>Use of a two-step Percoll gradient for separation of loggerhead sea turtle peripheral blood mononuclear cells.</ns5:title>
+ </rdf:Description>
+ <rdf:Description rdf:about="urn:pmid:10941741">
+ <ns5:title>Blood plasma chemistries from wild mourning doves held in captivity.</ns5:title>
+ </rdf:Description>
+ <rdf:Description rdf:about="urn:pmid:10941742">
+ <ns5:title>Immobilization of wild ocelots with tiletamine and zolazepam in southern Texas.</ns5:title>
+ </rdf:Description>
+ <rdf:Description rdf:about="urn:pmid:10941743">
+ <ns5:title>Survival of Trichomonas gallinae in white-winged dove carcasses.</ns5:title>
+ </rdf:Description>
+ <rdf:Description rdf:about="urn:pmid:10941744">
+ <ns5:title>Evaluation of host preferences by helminths and ectoparasites among black-tailed jackrabbits in northern California.</ns5:title>
+ </rdf:Description>
+ <rdf:Description rdf:about="urn:pmid:10941745">
+ <ns5:title>Strigea falconispalumbi in Eurasian buzzards from Germany.</ns5:title>
+ </rdf:Description>
+ <rdf:Description rdf:about="urn:pmid:10941746">
+ <ns5:title>Parelaphostrongyliasis in white-tailed deer in Missouri.</ns5:title>
+ </rdf:Description>
+ <rdf:Description rdf:about="urn:pmid:10941747">
+ <ns5:title>Gastric intramural hematoma and hemoperitoneum in a captive northern fur seal.</ns5:title>
+ </rdf:Description>
+ <rdf:Description rdf:about="urn:pmid:10941748">
+ <ns5:title>Sarcoma of possible nerve sheath origin in a captive muskrat.</ns5:title>
+ </rdf:Description>
+ <rdf:Description rdf:about="urn:pmid:10941749">
+ <ns5:title>Absence of antibodies against canine distemper virus in free-ranging populations of the Eurasian badger in Great Britain.</ns5:title>
+ </rdf:Description>
+ <rdf:Description rdf:about="urn:pmid:10941750">
+ <ns5:title>First report of myxomatosis in Mexico.</ns5:title>
+ </rdf:Description>
+ <rdf:Description rdf:about="urn:pmid:10941751">
+ <ns5:title>Bovine virus diarrhea virus in free-living deer from Denmark.</ns5:title>
+ </rdf:Description>
+ <rdf:Description rdf:about="urn:pmid:10941752">
+ <ns5:title>An epizootic of hemorrhagic disease in white-tailed deer in Missouri.</ns5:title>
+ </rdf:Description>
+ <rdf:Description rdf:about="urn:pmid:10941753">
+ <ns5:title>Attempted transmission of Ehrlichia chaffeensis among white-tailed deer by Amblyomma maculatum.</ns5:title>
+ </rdf:Description>
+ <rdf:Description rdf:about="urn:pmid:10941754">
+ <ns5:title>Brucellosis in ringed seals and harp seals from Canada. lforbes at em.agr.ca.</ns5:title>
+ </rdf:Description>
+ <rdf:Description rdf:about="urn:pmid:11079685">
+ <ns5:title>The effect of different grain diets on fecal shedding of Escherichia coli O157:H7 by steers.</ns5:title>
+ </rdf:Description>
+ <rdf:Description rdf:about="urn:pmid:11079686">
+ <ns5:title>Comparison of aqueous chemical treatments to eliminate Salmonella on alfalfa seeds.</ns5:title>
+ </rdf:Description>
+ <rdf:Description rdf:about="urn:pmid:11079687">
+ <ns5:title>Enrichment procedures and plating media for isolation of Yersinia enterocolitica.</ns5:title>
+ </rdf:Description>
+ <rdf:Description rdf:about="urn:pmid:11079688">
+ <ns5:title>Genotypes and enterotoxicity of Staphylococcus aureus isolated from the hands and nasal cavities of flight-catering employees.</ns5:title>
+ </rdf:Description>
+ <rdf:Description rdf:about="urn:pmid:11079689">
+ <ns5:title>Stimulation of starter culture for further reduction of foodborne pathogens during salami fermentation.</ns5:title>
+ </rdf:Description>
+ <rdf:Description rdf:about="urn:pmid:11079690">
+ <ns5:title>Bacillus cereus group strains, their hemolysin BL activity, and their detection in foods using a 16S RNA and hemolysin BL gene-targeted multiplex polymerase chain reaction system.</ns5:title>
+ </rdf:Description>
+ <rdf:Description rdf:about="urn:pmid:11079691">
+ <ns5:title>Bacterial spore inhibition and inactivation in foods by pressure, chemical preservatives, and mild heat.</ns5:title>
+ </rdf:Description>
+ <rdf:Description rdf:about="urn:pmid:11079692">
+ <ns5:title>Nonproteolytic Clostridium botulinum toxigenesis in cooked turkey stored under modified atmospheres.</ns5:title>
+ </rdf:Description>
+ <rdf:Description rdf:about="urn:pmid:11079693">
+ <ns5:title>Detection of guaiacol produced by Alicyclobacillus acidoterrestris in apple juice by sensory and chromatographic analyses, and comparison with spore and vegetative cell populations.</ns5:title>
+ </rdf:Description>
+ <rdf:Description rdf:about="urn:pmid:11079694">
+ <ns5:title>Aerobiology of a high-line speed cattle abattoir.</ns5:title>
+ </rdf:Description>
+ <rdf:Description rdf:about="urn:pmid:11079695">
+ <ns5:title>The synergistic effect of excimer and low-pressure mercury lamps on the disinfection of flowing water.</ns5:title>
+ </rdf:Description>
+ <rdf:Description rdf:about="urn:pmid:11079696">
+ <ns5:title>Ultraviolet spectrophotometric characterization and bactericidal properties of electrolyzed oxidizing water as influenced by amperage and pH.</ns5:title>
+ </rdf:Description>
+ <rdf:Description rdf:about="urn:pmid:11079697">
+ <ns5:title>Prevalence of high-risk food consumption and food-handling practices among adults: a multistate survey, 1996 to 1997. The Foodnet Working Group.</ns5:title>
+ </rdf:Description>
+ <rdf:Description rdf:about="urn:pmid:11079698">
+ <ns5:title>Influence of hygienic quality of raw materials on biogenic amine production during ripening and storage of dry fermented sausages.</ns5:title>
+ </rdf:Description>
+ <rdf:Description rdf:about="urn:pmid:11079699">
+ <ns5:title>Formation of biogenic amines in raw milk Hispánico cheese manufactured with proteinases and different levels of starter culture.</ns5:title>
+ </rdf:Description>
+ <rdf:Description rdf:about="urn:pmid:11079700">
+ <ns5:title>Mixed starter cultures to control biogenic amine production in dry fermented sausages.</ns5:title>
+ </rdf:Description>
+ <rdf:Description rdf:about="urn:pmid:11079701">
+ <ns5:title>Detection of radiation-induced hydrocarbons and 2-alkylcyclobutanones in irradiated perilla seeds.</ns5:title>
+ </rdf:Description>
+ <rdf:Description rdf:about="urn:pmid:11079702">
+ <ns5:title>A differential medium for the enumeration of the spoilage yeast Zygosaccharomyces bailii in wine.</ns5:title>
+ </rdf:Description>
+ <rdf:Description rdf:about="urn:pmid:11079703">
+ <ns5:title>Norwalk-like virus sequences detected by reverse transcription-polymerase chain reaction in mineral waters imported into or bottled in Switzerland.</ns5:title>
+ </rdf:Description>
+ <rdf:Description rdf:about="urn:pmid:11079704">
+ <ns5:title>Prevalence and characteristics of shiga toxin-producing Escherichia coli in beef cattle slaughtered on Prince Edward Island.</ns5:title>
+ </rdf:Description>
+ <rdf:Description rdf:about="urn:pmid:11079705">
+ <ns5:title>Analysis and modeling of the variability associated with UV inactivation of Escherichia coli in apple cider.</ns5:title>
+ </rdf:Description>
+ <rdf:Description rdf:about="urn:pmid:11079706">
+ <ns5:title>Yersinia enterocolitica biogroup 1A, serotype O:5 in chicken carcasses.</ns5:title>
+ </rdf:Description>
+ <rdf:Description rdf:about="urn:pmid:11079707">
+ <ns5:title>Reduction of Campylobacter jejuni in a simulated chicken digestive tract by Lactobacilli cultures.</ns5:title>
+ </rdf:Description>
+ <rdf:Description rdf:about="urn:pmid:11079708">
+ <ns5:title>Thermal stability of moniliformin at varying temperature, pH, and time in an aqueous environment.</ns5:title>
+ </rdf:Description>
+ <rdf:Description rdf:about="urn:pmid:11079709">
+ <ns5:title>Detection and analysis of animal materials in food and feed.</ns5:title>
+ </rdf:Description>
+ <rdf:Description rdf:about="urn:pmid:11041128">
+ <ns5:title>A summary of reported foodborne disease incidents in Sweden, 1992 to 1997.</ns5:title>
+ </rdf:Description>
+ <rdf:Description rdf:about="urn:pmid:11041129">
+ <ns5:title>Evaluation of safe food-handling instructions on raw meat and poultry products.</ns5:title>
+ </rdf:Description>
+ <rdf:Description rdf:about="urn:pmid:11041130">
+ <ns5:title>Interventions for the reduction of Salmonella Typhimurium DT 104 and non-O157:H7 enterohemorrhagic Escherichia coli on beef surfaces.</ns5:title>
+ </rdf:Description>
+ <rdf:Description rdf:about="urn:pmid:11041131">
+ <ns5:title>Protective effect of Enterococcus faecium J96, a potential probiotic strain, on chicks infected with Salmonella Pullorum.</ns5:title>
+ </rdf:Description>
+ <rdf:Description rdf:about="urn:pmid:11041132">
+ <ns5:title>Surface application of lysozyme, nisin, and EDTA to inhibit spoilage and pathogenic bacteria on ham and bologna.</ns5:title>
+ </rdf:Description>
+ <rdf:Description rdf:about="urn:pmid:11041133">
+ <ns5:title>Differentiation between types and strains of Clostridium botulinum by riboprinting.</ns5:title>
+ </rdf:Description>
+ <rdf:Description rdf:about="urn:pmid:11041134">
+ <ns5:title>Influence of traditional brine washing of smear Taleggio cheese on the surface spreading of Listeria innocua.</ns5:title>
+ </rdf:Description>
+ <rdf:Description rdf:about="urn:pmid:11041135">
+ <ns5:title>Antimicrobial effect of rosemary extracts.</ns5:title>
+ </rdf:Description>
+ <rdf:Description rdf:about="urn:pmid:11041136">
+ <ns5:title>Effect of conjugated bile salts on antibiotic susceptibility of bile salt-tolerant Lactobacillus and Bifidobacterium isolates.</ns5:title>
+ </rdf:Description>
+ <rdf:Description rdf:about="urn:pmid:11041137">
+ <ns5:title>Heat resistance of Alicyclobacillus acidocaldarius in water, various buffers, and orange juice.</ns5:title>
+ </rdf:Description>
+ <rdf:Description rdf:about="urn:pmid:11041138">
+ <ns5:title>Extension of the shelf life of prawns (Penaeus japonicus) by vacuum packaging and high-pressure treatment.</ns5:title>
+ </rdf:Description>
+ <rdf:Description rdf:about="urn:pmid:11041139">
+ <ns5:title>Visual color and doneness indicators and the incidence of premature brown color in beef patties cooked to four end point temperatures.</ns5:title>
+ </rdf:Description>
+ <rdf:Description rdf:about="urn:pmid:11041140">
+ <ns5:title>The mycobiota of speck, a traditional Tyrolean smoked and cured ham.</ns5:title>
+ </rdf:Description>
+ <rdf:Description rdf:about="urn:pmid:11041141">
+ <ns5:title>Comparison of capillary and test tube procedures for analysis of thermal inactivation kinetics of mold spores.</ns5:title>
+ </rdf:Description>
+ <rdf:Description rdf:about="urn:pmid:11041142">
+ <ns5:title>Isolation of Cyclospora oocysts from fruits and vegetables using lectin-coated paramagnetic beads.</ns5:title>
+ </rdf:Description>
+ <rdf:Description rdf:about="urn:pmid:11041143">
+ <ns5:title>Formation of heterocyclic amines in fried fish fiber during processing and storage.</ns5:title>
+ </rdf:Description>
+ <rdf:Description rdf:about="urn:pmid:11041144">
+ <ns5:title>Detection, quantitation, and identification of residual aminopenicillins by high-performance liquid chromatography after fluorescamine derivation.</ns5:title>
+ </rdf:Description>
+ <rdf:Description rdf:about="urn:pmid:11041145">
+ <ns5:title>Milkborne campylobacter infection in Hungary.</ns5:title>
+ </rdf:Description>
+ <rdf:Description rdf:about="urn:pmid:11041146">
+ <ns5:title>Diminution of Campylobacter colonization in neonatal pigs reared off-sow.</ns5:title>
+ </rdf:Description>
+ <rdf:Description rdf:about="urn:pmid:11041147">
+ <ns5:title>Comparison of the attachment of Escherichia coli O157:H7, Listeria monocytogenes, Salmonella typhimurium, and Pseudomonas fluorescens to lettuce leaves.</ns5:title>
+ </rdf:Description>
+ <rdf:Description rdf:about="urn:pmid:11041148">
+ <ns5:title>Listeria monocytogenes contamination pattern in pig slaughterhouses.</ns5:title>
+ </rdf:Description>
+ <rdf:Description rdf:about="urn:pmid:11041149">
+ <ns5:title>Improved detection of nontyphoid and typhoid Salmonellae with balanced agar formulations.</ns5:title>
+ </rdf:Description>
+ <rdf:Description rdf:about="urn:pmid:11041150">
+ <ns5:title>Comparison of different peptidase substrates for evaluation of microbial quality of aerobically stored meats.</ns5:title>
+ </rdf:Description>
+ <rdf:Description rdf:about="urn:pmid:11252224">
+ <ns5:title>[Nikolaĭ Vladimirovich Timofeev-Resovskiĭ (1900-1981). (Essay on his life and works)]</ns5:title>
+ </rdf:Description>
+ <rdf:Description rdf:about="urn:pmid:11130944">
+ <ns5:title>Theoretical foundation and experimental proof of the accumulating transfer of tritium from water into DNA and other biomolecules in vitro and in vivo.</ns5:title>
+ </rdf:Description>
+ <rdf:Description rdf:about="urn:pmid:11252225">
+ <ns5:title>The A beta 6w302 gene and molecular mechanisms of resistance to the spread of radiation-induced lymphoma in a mouse mutant, survivor-27.</ns5:title>
+ </rdf:Description>
+ <rdf:Description rdf:about="urn:pmid:11252226">
+ <ns5:title>[Study of genome instability using DNA fingerprinting of the offspring of male mice subjected to chronic low dose gamma irradiation]</ns5:title>
+ </rdf:Description>
+ <rdf:Description rdf:about="urn:pmid:11252227">
+ <ns5:title>[Independence of DNA repair after gamma irradiation and radioadaptive response in lymphocytes of patients with Bloom syndrome]</ns5:title>
+ </rdf:Description>
+ <rdf:Description rdf:about="urn:pmid:11252228">
+ <ns5:title>[Changes in the number of DNA-protein cross links in spleen lymphocytes of mice exposed to low intensity low dose gamma irradiation]</ns5:title>
+ </rdf:Description>
+ <rdf:Description rdf:about="urn:pmid:11252229">
+ <ns5:title>[Radiation mapping as one of main methods of creating high resolution maps of human and animal genomes]</ns5:title>
+ </rdf:Description>
+ <rdf:Description rdf:about="urn:pmid:11130945">
+ <ns5:title>Distinguishing potential sources of genotoxic exposure via HPRT mutations.</ns5:title>
+ </rdf:Description>
+ <rdf:Description rdf:about="urn:pmid:11130946">
+ <ns5:title>Some aspects of the plant radioresistance.</ns5:title>
+ </rdf:Description>
+ <rdf:Description rdf:about="urn:pmid:11252230">
+ <ns5:title>[Increased radiosensitivity after irradiation of lymphocytes low adaptive doses]</ns5:title>
+ </rdf:Description>
+ <rdf:Description rdf:about="urn:pmid:11252231">
+ <ns5:title>[Results of and prospects for methods of determination of the frequency of mutant cells for glycophorin A and T-cell receptor loci to estimate long-term genotoxic effect of ionizing radiation]</ns5:title>
+ </rdf:Description>
+ <rdf:Description rdf:about="urn:pmid:11252232">
+ <ns5:title>[Potential relationship between mutation process induced by low doses of ionizing radiation, and positional dynamics of chromosomes in nuclei of eukaryotic cells]</ns5:title>
+ </rdf:Description>
+ <rdf:Description rdf:about="urn:pmid:11252233">
+ <ns5:title>[Genetic effects in Drosophila melanogaster induced by chronic low-dose irradiation]</ns5:title>
+ </rdf:Description>
+ <rdf:Description rdf:about="urn:pmid:11130947">
+ <ns5:title>Biology versus engineering: the TMI accident as a case study in problems of dosimetry.</ns5:title>
+ </rdf:Description>
+ <rdf:Description rdf:about="urn:pmid:11130948">
+ <ns5:title>Assessment of external dose to inhabitants evacuated from the 30-km zone soon after the Chernobyl accident.</ns5:title>
+ </rdf:Description>
+ <rdf:Description rdf:about="urn:pmid:11252234">
+ <ns5:title>[Results of cytogenetic studies of the consequences of the Chernobyl accident]</ns5:title>
+ </rdf:Description>
+ <rdf:Description rdf:about="urn:pmid:11252235">
+ <ns5:title>[Cytogenetic studies of blood lymphocytes of cosmonauts after long-ter, space flights]</ns5:title>
+ </rdf:Description>
+ <rdf:Description rdf:about="urn:pmid:11252236">
+ <ns5:title>[Mutagenesis in Muridae from regions with increased radiation level]</ns5:title>
+ </rdf:Description>
+ <rdf:Description rdf:about="urn:pmid:11252237">
+ <ns5:title>[Radiation-population monitoring of Pinus sylvestris L. in the zone of the Chernobyl power plant]</ns5:title>
+ </rdf:Description>
+ <rdf:Description rdf:about="urn:pmid:11130949">
+ <ns5:title>Genomic instability, bystander effects and radiation risks: implications for development of protection strategies for man and the environment.</ns5:title>
+ </rdf:Description>
+ <rdf:Description rdf:about="urn:pmid:11130950">
+ <ns5:title>Estimation of genetic risks of exposure to ionizing radiation: status in the year 2000.</ns5:title>
+ </rdf:Description>
+ <rdf:Description rdf:about="urn:pmid:11130951">
+ <ns5:title>Exposition of humans to low doses and low dose rate irradiation: an urgent need for new markers and new models.</ns5:title>
+ </rdf:Description>
+ <rdf:Description rdf:about="urn:pmid:11252238">
+ <ns5:title>[Current problems of estimation of genetic risk of human exposure to radiation]</ns5:title>
+ </rdf:Description>
+ <rdf:Description rdf:about="urn:pmid:11076293">
+ <ns5:title>[Small cell carcinoma and carcinoids of the lung: morphology of apoptosis and expression of biomolecular markers of tumor growth]</ns5:title>
+ </rdf:Description>
+ <rdf:Description rdf:about="urn:pmid:11076294">
+ <ns5:title>[Ultrastructural phenotypes of tumor cells of endocrine-cellular neoplasms of hepatopancreatoduodenal organs and their role in determining the degree of malignancy and prognosis of these diseases]</ns5:title>
+ </rdf:Description>
+ <rdf:Description rdf:about="urn:pmid:11076295">
+ <ns5:title>[Morphofunctional characteristics of cellular and tissue components of the thyroid gland during its pathology]</ns5:title>
+ </rdf:Description>
+ <rdf:Description rdf:about="urn:pmid:11076292">
+ <ns5:title>[The role of immunohistochemical methods for determining the type of treatment and prognosis of tumoral diseases]</ns5:title>
+ </rdf:Description>
+ <rdf:Description rdf:about="urn:pmid:11076296">
+ <ns5:title>[Cytomorphological differentiation diagnosis and evaluation of p53mut, bcl-2, CD95 in peripheral B-cell small cell lymphomas]</ns5:title>
+ </rdf:Description>
+ <rdf:Description rdf:about="urn:pmid:11076297">
+ <ns5:title>[Morphological manifestations of large cell anaplastic Ki1(CD30)-positive lymphoma in children]</ns5:title>
+ </rdf:Description>
+ <rdf:Description rdf:about="urn:pmid:11076298">
+ <ns5:title>[Ultrastructure of the thymus after gamma irradiation during inhibition of steroidogenesis]</ns5:title>
+ </rdf:Description>
+ <rdf:Description rdf:about="urn:pmid:11076299">
+ <ns5:title>[Algorithm of immunomorphological criteria of diagnosis of gastric mucosa dysplasias and early cancer in stomach biopsies]</ns5:title>
+ </rdf:Description>
+ <rdf:Description rdf:about="urn:pmid:11076300">
+ <ns5:title>[Eccrine mucinous adenocarcinoma]</ns5:title>
+ </rdf:Description>
+ <rdf:Description rdf:about="urn:pmid:11076301">
+ <ns5:title>[Malignant cylindroma]</ns5:title>
+ </rdf:Description>
+ <rdf:Description rdf:about="urn:pmid:11076302">
+ <ns5:title>[Spitz's nevus: differential diagnosis with malignant skin melanoma]</ns5:title>
+ </rdf:Description>
+ <rdf:Description rdf:about="urn:pmid:11076303">
+ <ns5:title>[Microphotography: some peculiarities of microphotography using black-and-white and color reversible films]</ns5:title>
+ </rdf:Description>
+ <rdf:Description rdf:about="urn:pmid:11076304">
+ <ns5:title>[Autopsy: problems and approaches to their solving]</ns5:title>
+ </rdf:Description>
+ <rdf:Description rdf:about="urn:pmid:11244631">
+ <ns5:title>[Emergency hormonal contraception in France in 2000]</ns5:title>
+ </rdf:Description>
+ <rdf:Description rdf:about="urn:pmid:11244632">
+ <ns5:title>[Postpartum hemorrhage: treatment by embolization]</ns5:title>
+ </rdf:Description>
+ <rdf:Description rdf:about="urn:pmid:11244633">
+ <ns5:title>[Umbilical cutaneous metastasis (or Sister Mary Joseph's nodule) disclosing an ovarian adenocarcinoma]</ns5:title>
+ </rdf:Description>
+ <rdf:Description rdf:about="urn:pmid:11244634">
+ <ns5:title>[Human papillomavirus typing in routine cervical smears. Results from a series of 3778 patients]</ns5:title>
+ </rdf:Description>
+ <rdf:Description rdf:about="urn:pmid:11244635">
+ <ns5:title>[Fetal arrhythmias: diagnosis, prognosis, treatment; apropos of 33 cases]</ns5:title>
+ </rdf:Description>
+ <rdf:Description rdf:about="urn:pmid:11244636">
+ <ns5:title>[Role of luteinizing hormone in follicular and corpus luteum physiology]</ns5:title>
+ </rdf:Description>
+ <rdf:Description rdf:about="urn:pmid:11244637">
+ <ns5:title>[Effects of hormone replacement therapy for menopause on prognostic factors of breast cancer]</ns5:title>
+ </rdf:Description>
+ <rdf:Description rdf:about="urn:pmid:11244638">
+ <ns5:title>[The First World War and venereal disease morbidity. I. The amplitude of the plague]</ns5:title>
+ </rdf:Description>
+ <rdf:Description rdf:about="urn:pmid:11244639">
+ <ns5:title>[Analogues agonists and antagonists: what is their role outside of fertilization in vitro?]</ns5:title>
+ </rdf:Description>
+ <rdf:Description rdf:about="urn:pmid:11244640">
+ <ns5:title>[Thin layer cytology of the cervix uteri]</ns5:title>
+ </rdf:Description>
+ <rdf:Description rdf:about="urn:pmid:11244641">
+ <ns5:title>[Controversy: systemic amniocentesis for women 38 years and more? Is it still lawful to recommend amniocentesis with the sole criterion being maternal age of 38 years or more?]</ns5:title>
+ </rdf:Description>
+ <rdf:Description rdf:about="urn:pmid:11270348">
+ <ns5:title>[Controversy: systemic amniocentesis for women 38 years and more? Is it not premature to no longer accept performing amniocentesis on a patient age 38 years or more?]</ns5:title>
+ </rdf:Description>
+ <rdf:Description rdf:about="urn:pmid:11246480">
+ <ns5:title>Acceptance and digestibility of some selected browse feeds with varying tannin content as supplements in sheep nutrition in west Africa.</ns5:title>
+ </rdf:Description>
+ <rdf:Description rdf:about="urn:pmid:11244860">
+ <ns5:title>Haematology and plasma biochemistry of Stamboek pre-pubertal gilts in Italy: reference values.</ns5:title>
+ </rdf:Description>
+ <rdf:Description rdf:about="urn:pmid:11244861">
+ <ns5:title>Course of epidermal growth factor (EGF) and insulin-like growth factor I (IGF-I) in mammary secretions of the goat during end-pregnancy and early lactation.</ns5:title>
+ </rdf:Description>
+ <rdf:Description rdf:about="urn:pmid:11244863">
+ <ns5:title>Evaluation of a transportable [Ca++] and pH analyser and of the impact of different anticoagulants and sampling sites in cattle.</ns5:title>
+ </rdf:Description>
+ <rdf:Description rdf:about="urn:pmid:11244862">
+ <ns5:title>Differential electrocardiographic study on Iberica and Duroc breeds of pig during physical maturation.</ns5:title>
+ </rdf:Description>
+ <rdf:Description rdf:about="urn:pmid:11244864">
+ <ns5:title>Production of reactive oxygen species in neutrophils after repeated bouts of exercise in standardbred trotters.</ns5:title>
+ </rdf:Description>
+ <rdf:Description rdf:about="urn:pmid:11244586">
+ <ns5:title>[Radiofrequency: storm looming over hepatic surgery]</ns5:title>
+ </rdf:Description>
+ <rdf:Description rdf:about="urn:pmid:11244587">
+ <ns5:title>[Curative treatment of local and regional rectal cancer recurrences]</ns5:title>
+ </rdf:Description>
+ <rdf:Description rdf:about="urn:pmid:11244588">
+ <ns5:title>[Proximal bile duct cholangiocarcinomas]</ns5:title>
+ </rdf:Description>
+ <rdf:Description rdf:about="urn:pmid:11244589">
+ <ns5:title>[Cholelithiasis in heart transplant patients]</ns5:title>
+ </rdf:Description>
+ <rdf:Description rdf:about="urn:pmid:11244590">
+ <ns5:title>[Immediate postoperative complications after a laparoscopic partial posterior fundoplication. Early laparoscopic reoperation]</ns5:title>
+ </rdf:Description>
+</rdf:RDF>
Copied: branches/xa11/jxdata/iTQL/fulltext_queries/exportResult1.txt (from rev 1455, trunk/jxdata/iTQL/fulltext_queries/exportResult1.txt)
===================================================================
--- branches/xa11/jxdata/iTQL/fulltext_queries/exportResult1.txt (rev 0)
+++ branches/xa11/jxdata/iTQL/fulltext_queries/exportResult1.txt 2009-01-24 04:13:55 UTC (rev 1456)
@@ -0,0 +1,2 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<answer xmlns="http://mulgara.org/tql#"><query><message>Successfully exported @server@#fulltext2 to @baseuri@/tmp/fulltext2.rdf.</message></query></answer>
Modified: branches/xa11/jxdata/iTQL/fulltext_queries/queryResult17.txt
===================================================================
--- branches/xa11/jxdata/iTQL/fulltext_queries/queryResult17.txt 2009-01-24 01:07:45 UTC (rev 1455)
+++ branches/xa11/jxdata/iTQL/fulltext_queries/queryResult17.txt 2009-01-24 04:13:55 UTC (rev 1456)
@@ -1,2 +1,2 @@
<?xml version="1.0" encoding="UTF-8"?>
-<answer xmlns="http://mulgara.org/tql#"><query><variables><pmid/><title/><score/></variables><solution><pmid resource="urn:pmid:11076292"/><title>[The role of immunohistochemical methods for determining the type of treatment and prognosis of tumoral diseases]</title><score datatype="http://www.w3.org/2001/XMLSchema#double">1.67</score></solution><solution><pmid resource="urn:pmid:11076294"/><title>[Ultrastructural phenotypes of tumor cells of endocrine-cellular neoplasms of hepatopancreatoduodenal organs and their role in determining the degree of malignancy and prognosis of these diseases]</title><score datatype="http://www.w3.org/2001/XMLSchema#double">1.38</score></solution></query></answer>
+<answer xmlns="http://mulgara.org/tql#"><query><variables><pmid/><title/><score/></variables><solution><pmid resource="urn:pmid:11076292"/><title>[The role of immunohistochemical methods for determining the type of treatment and prognosis of tumoral diseases]</title><score datatype="http://www.w3.org/2001/XMLSchema#double">1.50</score></solution><solution><pmid resource="urn:pmid:11076294"/><title>[Ultrastructural phenotypes of tumor cells of endocrine-cellular neoplasms of hepatopancreatoduodenal organs and their role in determining the degree of malignancy and prognosis of these diseases]</title><score datatype="http://www.w3.org/2001/XMLSchema#double">1.20</score></solution></query></answer>
Modified: branches/xa11/jxdata/iTQL/fulltext_queries/queryResult18.txt
===================================================================
--- branches/xa11/jxdata/iTQL/fulltext_queries/queryResult18.txt 2009-01-24 01:07:45 UTC (rev 1455)
+++ branches/xa11/jxdata/iTQL/fulltext_queries/queryResult18.txt 2009-01-24 04:13:55 UTC (rev 1456)
@@ -1,2 +1,2 @@
<?xml version="1.0" encoding="UTF-8"?>
-<answer xmlns="http://mulgara.org/tql#"><query><variables><pmid/><title/><sc1/><sc2/></variables><solution><pmid resource="urn:pmid:11076292"/><title>[The role of immunohistochemical methods for determining the type of treatment and prognosis of tumoral diseases]</title><sc1 datatype="http://www.w3.org/2001/XMLSchema#double">1.67</sc1></solution><solution><pmid resource="urn:pmid:11076294"/><title>[Ultrastructural phenotypes of tumor cells of endocrine-cellular neoplasms of hepatopancreatoduodenal organs and their role in determining the degree of malignancy and prognosis of these diseases]</title><sc1 datatype="http://www.w3.org/2001/XMLSchema#double">1.38</sc1></solution><solution><pmid resource="urn:pmid:11244589"/><title>[Cholelithiasis in heart transplant patients]</title><sc2 datatype="http://www.w3.org/2001/XMLSchema#double">2.75</sc2></solution></query></answer>
+<answer xmlns="http://mulgara.org/tql#"><query><variables><pmid/><title/><sc1/><sc2/></variables><solution><pmid resource="urn:pmid:11076292"/><title>[The role of immunohistochemical methods for determining the type of treatment and prognosis of tumoral diseases]</title><sc1 datatype="http://www.w3.org/2001/XMLSchema#double">1.50</sc1></solution><solution><pmid resource="urn:pmid:11076294"/><title>[Ultrastructural phenotypes of tumor cells of endocrine-cellular neoplasms of hepatopancreatoduodenal organs and their role in determining the degree of malignancy and prognosis of these diseases]</title><sc1 datatype="http://www.w3.org/2001/XMLSchema#double">1.20</sc1></solution><solution><pmid resource="urn:pmid:11244589"/><title>[Cholelithiasis in heart transplant patients]</title><sc2 datatype="http://www.w3.org/2001/XMLSchema#double">2.61</sc2></solution></query></answer>
Modified: branches/xa11/jxdata/iTQL/fulltext_queries/queryResult19.txt
===================================================================
--- branches/xa11/jxdata/iTQL/fulltext_queries/queryResult19.txt 2009-01-24 01:07:45 UTC (rev 1455)
+++ branches/xa11/jxdata/iTQL/fulltext_queries/queryResult19.txt 2009-01-24 04:13:55 UTC (rev 1456)
@@ -1,2 +1,2 @@
<?xml version="1.0" encoding="UTF-8"?>
-<answer xmlns="http://mulgara.org/tql#"><query><variables><pmid/><title/><sc1/><sc2/></variables><solution><pmid resource="urn:pmid:11076294"/><title>[Ultrastructural phenotypes of tumor cells of endocrine-cellular neoplasms of hepatopancreatoduodenal organs and their role in determining the degree of malignancy and prognosis of these diseases]</title><sc1 datatype="http://www.w3.org/2001/XMLSchema#double">1.38</sc1><sc2 datatype="http://www.w3.org/2001/XMLSchema#double">1.04</sc2></solution></query></answer>
+<answer xmlns="http://mulgara.org/tql#"><query><variables><pmid/><title/><sc1/><sc2/></variables><solution><pmid resource="urn:pmid:11076294"/><title>[Ultrastructural phenotypes of tumor cells of endocrine-cellular neoplasms of hepatopancreatoduodenal organs and their role in determining the degree of malignancy and prognosis of these diseases]</title><sc1 datatype="http://www.w3.org/2001/XMLSchema#double">1.20</sc1><sc2 datatype="http://www.w3.org/2001/XMLSchema#double">0.92</sc2></solution></query></answer>
Copied: branches/xa11/jxdata/iTQL/fulltext_queries/queryResult20.txt (from rev 1455, trunk/jxdata/iTQL/fulltext_queries/queryResult20.txt)
===================================================================
--- branches/xa11/jxdata/iTQL/fulltext_queries/queryResult20.txt (rev 0)
+++ branches/xa11/jxdata/iTQL/fulltext_queries/queryResult20.txt 2009-01-24 04:13:55 UTC (rev 1456)
@@ -0,0 +1,2 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<answer xmlns="http://mulgara.org/tql#"><query><variables><pred/><obj/></variables><solution><pred resource="http://mulgara.org/mulgara/Document#title"/><obj>Epizootic vesicular disease in captive California sea lions.</obj></solution></query></answer>
Copied: branches/xa11/jxdata/iTQL/fulltext_queries/queryResult21.txt (from rev 1455, trunk/jxdata/iTQL/fulltext_queries/queryResult21.txt)
===================================================================
--- branches/xa11/jxdata/iTQL/fulltext_queries/queryResult21.txt (rev 0)
+++ branches/xa11/jxdata/iTQL/fulltext_queries/queryResult21.txt 2009-01-24 04:13:55 UTC (rev 1456)
@@ -0,0 +1,2 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<answer xmlns="http://mulgara.org/tql#"><query><variables><subj/><obj/></variables><solution><subj resource="urn:pmid:10941725"/><obj>Methylmercury accumulation in tissues and its effects on growth and appetite in captive great egrets.</obj></solution><solution><subj resource="urn:pmid:10941726"/><obj>Histologic, neurologic, and immunologic effects of methylmercury in captive great egrets.</obj></solution><solution><subj resource="urn:pmid:10941727"/><obj>The effect of dietary aflatoxin on wild turkey poults.</obj></solution><solution><subj resource="urn:pmid:10941728"/><obj>Hematologic and serum chemistry values of the captive European wildcat.</obj></solution><solution><subj resource="urn:pmid:10941729"/><obj>Evaluation of zuclopenthixol acetate to decrease handling stress in wapiti.</obj></solution><solution><subj resource="urn:pmid:10941730"/><obj>Microbes in tree swallow semen.</obj></solution><solution><subj resource="urn:pmid:10941731"/><obj>Validation of the fluorescence polarization assay and comparison to other serological assays for the detection of serum antibodies to Brucella abortus in bison.</obj></solution><solution><subj resource="urn:pmid:10941732"/><obj>Safety and efficacy of Brucella abortus strain RB51 vaccine in captive pregnant elk.</obj></solution><solution><subj resource="urn:pmid:10941733"/><obj>Safety of Brucella abortus strain RB51 in bull elk.</obj></solution><solution><subj resource="urn:pmid:10941734"/><obj>Efficacy of a type C botulism vaccine in green-winged teal.</obj></solution><solution><subj resource="urn:pmid:10941735"/><obj>Serologic and molecular evidence of Ehrlichia spp. in coyotes in California.</obj></solution><solution><subj resource="urn:pmid:10941736"/><obj>Epizootic vesicular disease in captive California sea lions.</obj></solution><solution><subj resource="urn:pmid:10941737"/><obj>A morbillivirus antibody survey of Atlantic walrus, narwhal and beluga in Canada.</obj></solution><solution><subj resource="urn:pmid:10941738"/><obj>Antigenic, phenotypic and molecular characterization confirms Babesia odocoilei isolated from three cervids.</obj></solution><solution><subj resource="urn:pmid:10941739"/><obj>Sylvatic trichinellosis in southwestern Spain.</obj></solution><solution><subj resource="urn:pmid:10941740"/><obj>Use of a two-step Percoll gradient for separation of loggerhead sea turtle peripheral blood mononuclear cells.</obj></solution><solution><subj resource="urn:pmid:10941741"/><obj>Blood plasma chemistries from wild mourning doves held in captivity.</obj></solution><solution><subj resource="urn:pmid:10941742"/><obj>Immobilization of wild ocelots with tiletamine and zolazepam in southern Texas.</obj></solution><solution><subj resource="urn:pmid:10941743"/><obj>Survival of Trichomonas gallinae in white-winged dove carcasses.</obj></solution><solution><subj resource="urn:pmid:10941744"/><obj>Evaluation of host preferences by helminths and ectoparasites among black-tailed jackrabbits in northern California.</obj></solution><solution><subj resource="urn:pmid:10941745"/><obj>Strigea falconispalumbi in Eurasian buzzards from Germany.</obj></solution><solution><subj resource="urn:pmid:10941746"/><obj>Parelaphostrongyliasis in white-tailed deer in Missouri.</obj></solution><solution><subj resource="urn:pmid:10941747"/><obj>Gastric intramural hematoma and hemoperitoneum in a captive northern fur seal.</obj></solution><solution><subj resource="urn:pmid:10941748"/><obj>Sarcoma of possible nerve sheath origin in a captive muskrat.</obj></solution><solution><subj resource="urn:pmid:10941749"/><obj>Absence of antibodies against canine distemper virus in free-ranging populations of the Eurasian badger in Great Britain.</obj></solution><solution><subj resource="urn:pmid:10941750"/><obj>First report of myxomatosis in Mexico.</obj></solution><solution><subj resource="urn:pmid:10941751"/><obj>Bovine virus diarrhea virus in free-living deer from Denmark.</obj></solution><solution><subj resource="urn:pmid:10941752"/><obj>An epizootic of hemorrhagic disease in white-tailed deer in Missouri.</obj></solution><solution><subj resource="urn:pmid:10941753"/><obj>Attempted transmission of Ehrlichia chaffeensis among white-tailed deer by Amblyomma maculatum.</obj></solution><solution><subj resource="urn:pmid:10941754"/><obj>Brucellosis in ringed seals and harp seals from Canada. lforbes at em.agr.ca.</obj></solution><solution><subj resource="urn:pmid:11041128"/><obj>A summary of reported foodborne disease incidents in Sweden, 1992 to 1997.</obj></solution><solution><subj resource="urn:pmid:11041129"/><obj>Evaluation of safe food-handling instructions on raw meat and poultry products.</obj></solution><solution><subj resource="urn:pmid:11041130"/><obj>Interventions for the reduction of Salmonella Typhimurium DT 104 and non-O157:H7 enterohemorrhagic Escherichia coli on beef surfaces.</obj></solution><solution><subj resource="urn:pmid:11041131"/><obj>Protective effect of Enterococcus faecium J96, a potential probiotic strain, on chicks infected with Salmonella Pullorum.</obj></solution><solution><subj resource="urn:pmid:11041132"/><obj>Surface application of lysozyme, nisin, and EDTA to inhibit spoilage and pathogenic bacteria on ham and bologna.</obj></solution><solution><subj resource="urn:pmid:11041133"/><obj>Differentiation between types and strains of Clostridium botulinum by riboprinting.</obj></solution><solution><subj resource="urn:pmid:11041134"/><obj>Influence of traditional brine washing of smear Taleggio cheese on the surface spreading of Listeria innocua.</obj></solution><solution><subj resource="urn:pmid:11041135"/><obj>Antimicrobial effect of rosemary extracts.</obj></solution><solution><subj resource="urn:pmid:11041136"/><obj>Effect of conjugated bile salts on antibiotic susceptibility of bile salt-tolerant Lactobacillus and Bifidobacterium isolates.</obj></solution><solution><subj resource="urn:pmid:11041137"/><obj>Heat resistance of Alicyclobacillus acidocaldarius in water, various buffers, and orange juice.</obj></solution><solution><subj resource="urn:pmid:11041138"/><obj>Extension of the shelf life of prawns (Penaeus japonicus) by vacuum packaging and high-pressure treatment.</obj></solution><solution><subj resource="urn:pmid:11041139"/><obj>Visual color and doneness indicators and the incidence of premature brown color in beef patties cooked to four end point temperatures.</obj></solution><solution><subj resource="urn:pmid:11041140"/><obj>The mycobiota of speck, a traditional Tyrolean smoked and cured ham.</obj></solution><solution><subj resource="urn:pmid:11041141"/><obj>Comparison of capillary and test tube procedures for analysis of thermal inactivation kinetics of mold spores.</obj></solution><solution><subj resource="urn:pmid:11041142"/><obj>Isolation of Cyclospora oocysts from fruits and vegetables using lectin-coated paramagnetic beads.</obj></solution><solution><subj resource="urn:pmid:11041143"/><obj>Formation of heterocyclic amines in fried fish fiber during processing and storage.</obj></solution><solution><subj resource="urn:pmid:11041144"/><obj>Detection, quantitation, and identification of residual aminopenicillins by high-performance liquid chromatography after fluorescamine derivation.</obj></solution><solution><subj resource="urn:pmid:11041145"/><obj>Milkborne campylobacter infection in Hungary.</obj></solution><solution><subj resource="urn:pmid:11041146"/><obj>Diminution of Campylobacter colonization in neonatal pigs reared off-sow.</obj></solution><solution><subj resource="urn:pmid:11041147"/><obj>Comparison of the attachment of Escherichia coli O157:H7, Listeria monocytogenes, Salmonella typhimurium, and Pseudomonas fluorescens to lettuce leaves.</obj></solution><solution><subj resource="urn:pmid:11041148"/><obj>Listeria monocytogenes contamination pattern in pig slaughterhouses.</obj></solution><solution><subj resource="urn:pmid:11041149"/><obj>Improved detection of nontyphoid and typhoid Salmonellae with balanced agar formulations.</obj></solution><solution><subj resource="urn:pmid:11041150"/><obj>Comparison of different peptidase substrates for evaluation of microbial quality of aerobically stored meats.</obj></solution><solution><subj resource="urn:pmid:11076292"/><obj>[The role of immunohistochemical methods for determining the type of treatment and prognosis of tumoral diseases]</obj></solution><solution><subj resource="urn:pmid:11076293"/><obj>[Small cell carcinoma and carcinoids of the lung: morphology of apoptosis and expression of biomolecular markers of tumor growth]</obj></solution><solution><subj resource="urn:pmid:11076294"/><obj>[Ultrastructural phenotypes of tumor cells of endocrine-cellular neoplasms of hepatopancreatoduodenal organs and their role in determining the degree of malignancy and prognosis of these diseases]</obj></solution><solution><subj resource="urn:pmid:11076295"/><obj>[Morphofunctional characteristics of cellular and tissue components of the thyroid gland during its pathology]</obj></solution><solution><subj resource="urn:pmid:11076296"/><obj>[Cytomorphological differentiation diagnosis and evaluation of p53mut, bcl-2, CD95 in peripheral B-cell small cell lymphomas]</obj></solution><solution><subj resource="urn:pmid:11076297"/><obj>[Morphological manifestations of large cell anaplastic Ki1(CD30)-positive lymphoma in children]</obj></solution><solution><subj resource="urn:pmid:11076298"/><obj>[Ultrastructure of the thymus after gamma irradiation during inhibition of steroidogenesis]</obj></solution><solution><subj resource="urn:pmid:11076299"/><obj>[Algorithm of immunomorphological criteria of diagnosis of gastric mucosa dysplasias and early cancer in stomach biopsies]</obj></solution><solution><subj resource="urn:pmid:11076300"/><obj>[Eccrine mucinous adenocarcinoma]</obj></solution><solution><subj resource="urn:pmid:11076301"/><obj>[Malignant cylindroma]</obj></solution><solution><subj resource="urn:pmid:11076302"/><obj>[Spitz's nevus: differential diagnosis with malignant skin melanoma]</obj></solution><solution><subj resource="urn:pmid:11076303"/><obj>[Microphotography: some peculiarities of microphotography using black-and-white and color reversible films]</obj></solution><solution><subj resource="urn:pmid:11076304"/><obj>[Autopsy: problems and approaches to their solving]</obj></solution><solution><subj resource="urn:pmid:11079685"/><obj>The effect of different grain diets on fecal shedding of Escherichia coli O157:H7 by steers.</obj></solution><solution><subj resource="urn:pmid:11079686"/><obj>Comparison of aqueous chemical treatments to eliminate Salmonella on alfalfa seeds.</obj></solution><solution><subj resource="urn:pmid:11079687"/><obj>Enrichment procedures and plating media for isolation of Yersinia enterocolitica.</obj></solution><solution><subj resource="urn:pmid:11079688"/><obj>Genotypes and enterotoxicity of Staphylococcus aureus isolated from the hands and nasal cavities of flight-catering employees.</obj></solution><solution><subj resource="urn:pmid:11079689"/><obj>Stimulation of starter culture for further reduction of foodborne pathogens during salami fermentation.</obj></solution><solution><subj resource="urn:pmid:11079690"/><obj>Bacillus cereus group strains, their hemolysin BL activity, and their detection in foods using a 16S RNA and hemolysin BL gene-targeted multiplex polymerase chain reaction system.</obj></solution><solution><subj resource="urn:pmid:11079691"/><obj>Bacterial spore inhibition and inactivation in foods by pressure, chemical preservatives, and mild heat.</obj></solution><solution><subj resource="urn:pmid:11079692"/><obj>Nonproteolytic Clostridium botulinum toxigenesis in cooked turkey stored under modified atmospheres.</obj></solution><solution><subj resource="urn:pmid:11079693"/><obj>Detection of guaiacol produced by Alicyclobacillus acidoterrestris in apple juice by sensory and chromatographic analyses, and comparison with spore and vegetative cell populations.</obj></solution><solution><subj resource="urn:pmid:11079694"/><obj>Aerobiology of a high-line speed cattle abattoir.</obj></solution><solution><subj resource="urn:pmid:11079695"/><obj>The synergistic effect of excimer and low-pressure mercury lamps on the disinfection of flowing water.</obj></solution><solution><subj resource="urn:pmid:11079696"/><obj>Ultraviolet spectrophotometric characterization and bactericidal properties of electrolyzed oxidizing water as influenced by amperage and pH.</obj></solution><solution><subj resource="urn:pmid:11079697"/><obj>Prevalence of high-risk food consumption and food-handling practices among adults: a multistate survey, 1996 to 1997. The Foodnet Working Group.</obj></solution><solution><subj resource="urn:pmid:11079698"/><obj>Influence of hygienic quality of raw materials on biogenic amine production during ripening and storage of dry fermented sausages.</obj></solution><solution><subj resource="urn:pmid:11079699"/><obj>Formation of biogenic amines in raw milk Hispánico cheese manufactured with proteinases and different levels of starter culture.</obj></solution><solution><subj resource="urn:pmid:11079700"/><obj>Mixed starter cultures to control biogenic amine production in dry fermented sausages.</obj></solution><solution><subj resource="urn:pmid:11079701"/><obj>Detection of radiation-induced hydrocarbons and 2-alkylcyclobutanones in irradiated perilla seeds.</obj></solution><solution><subj resource="urn:pmid:11079702"/><obj>A differential medium for the enumeration of the spoilage yeast Zygosaccharomyces bailii in wine.</obj></solution><solution><subj resource="urn:pmid:11079703"/><obj>Norwalk-like virus sequences detected by reverse transcription-polymerase chain reaction in mineral waters imported into or bottled in Switzerland.</obj></solution><solution><subj resource="urn:pmid:11079704"/><obj>Prevalence and characteristics of shiga toxin-producing Escherichia coli in beef cattle slaughtered on Prince Edward Island.</obj></solution><solution><subj resource="urn:pmid:11079705"/><obj>Analysis and modeling of the variability associated with UV inactivation of Escherichia coli in apple cider.</obj></solution><solution><subj resource="urn:pmid:11079706"/><obj>Yersinia enterocolitica biogroup 1A, serotype O:5 in chicken carcasses.</obj></solution><solution><subj resource="urn:pmid:11079707"/><obj>Reduction of Campylobacter jejuni in a simulated chicken digestive tract by Lactobacilli cultures.</obj></solution><solution><subj resource="urn:pmid:11079708"/><obj>Thermal stability of moniliformin at varying temperature, pH, and time in an aqueous environment.</obj></solution><solution><subj resource="urn:pmid:11079709"/><obj>Detection and analysis of animal materials in food and feed.</obj></solution><solution><subj resource="urn:pmid:11130944"/><obj>Theoretical foundation and experimental proof of the accumulating transfer of tritium from water into DNA and other biomolecules in vitro and in vivo.</obj></solution><solution><subj resource="urn:pmid:11130945"/><obj>Distinguishing potential sources of genotoxic exposure via HPRT mutations.</obj></solution><solution><subj resource="urn:pmid:11130946"/><obj>Some aspects of the plant radioresistance.</obj></solution><solution><subj resource="urn:pmid:11130947"/><obj>Biology versus engineering: the TMI accident as a case study in problems of dosimetry.</obj></solution><solution><subj resource="urn:pmid:11130948"/><obj>Assessment of external dose to inhabitants evacuated from the 30-km zone soon after the Chernobyl accident.</obj></solution><solution><subj resource="urn:pmid:11130949"/><obj>Genomic instability, bystander effects and radiation risks: implications for development of protection strategies for man and the environment.</obj></solution><solution><subj resource="urn:pmid:11130950"/><obj>Estimation of genetic risks of exposure to ionizing radiation: status in the year 2000.</obj></solution><solution><subj resource="urn:pmid:11130951"/><obj>Exposition of humans to low doses and low dose rate irradiation: an urgent need for new markers and new models.</obj></solution><solution><subj resource="urn:pmid:11244586"/><obj>[Radiofrequency: storm looming over hepatic surgery]</obj></solution><solution><subj resource="urn:pmid:11244587"/><obj>[Curative treatment of local and regional rectal cancer recurrences]</obj></solution><solution><subj resource="urn:pmid:11244588"/><obj>[Proximal bile duct cholangiocarcinomas]</obj></solution><solution><subj resource="urn:pmid:11244589"/><obj>[Cholelithiasis in heart transplant patients]</obj></solution><solution><subj resource="urn:pmid:11244590"/><obj>[Immediate postoperative complications after a laparoscopic partial posterior fundoplication. Early laparoscopic reoperation]</obj></solution><solution><subj resource="urn:pmid:11244631"/><obj>[Emergency hormonal contraception in France in 2000]</obj></solution><solution><subj resource="urn:pmid:11244632"/><obj>[Postpartum hemorrhage: treatment by embolization]</obj></solution><solution><subj resource="urn:pmid:11244633"/><obj>[Umbilical cutaneous metastasis (or Sister Mary Joseph's nodule) disclosing an ovarian adenocarcinoma]</obj></solution><solution><subj resource="urn:pmid:11244634"/><obj>[Human papillomavirus typing in routine cervical smears. Results from a series of 3778 patients]</obj></solution><solution><subj resource="urn:pmid:11244635"/><obj>[Fetal arrhythmias: diagnosis, prognosis, treatment; apropos of 33 cases]</obj></solution><solution><subj resource="urn:pmid:11244636"/><obj>[Role of luteinizing hormone in follicular and corpus luteum physiology]</obj></solution><solution><subj resource="urn:pmid:11244637"/><obj>[Effects of hormone replacement therapy for menopause on prognostic factors of breast cancer]</obj></solution><solution><subj resource="urn:pmid:11244638"/><obj>[The First World War and venereal disease morbidity. I. The amplitude of the plague]</obj></solution><solution><subj resource="urn:pmid:11244639"/><obj>[Analogues agonists and antagonists: what is their role outside of fertilization in vitro?]</obj></solution><solution><subj resource="urn:pmid:11244640"/><obj>[Thin layer cytology of the cervix uteri]</obj></solution><solution><subj resource="urn:pmid:11244641"/><obj>[Controversy: systemic amniocentesis for women 38 years and more? Is it still lawful to recommend amniocentesis with the sole criterion being maternal age of 38 years or more?]</obj></solution><solution><subj resource="urn:pmid:11244860"/><obj>Haematology and plasma biochemistry of Stamboek pre-pubertal gilts in Italy: reference values.</obj></solution><solution><subj resource="urn:pmid:11244861"/><obj>Course of epidermal growth factor (EGF) and insulin-like growth factor I (IGF-I) in mammary secretions of the goat during end-pregnancy and early lactation.</obj></solution><solution><subj resource="urn:pmid:11244862"/><obj>Differential electrocardiographic study on Iberica and Duroc breeds of pig during physical maturation.</obj></solution><solution><subj resource="urn:pmid:11244863"/><obj>Evaluation of a transportable [Ca++] and pH analyser and of the impact of different anticoagulants and sampling sites in cattle.</obj></solution><solution><subj resource="urn:pmid:11244864"/><obj>Production of reactive oxygen species in neutrophils after repeated bouts of exercise in standardbred trotters.</obj></solution><solution><subj resource="urn:pmid:11246480"/><obj>Acceptance and digestibility of some selected browse feeds with varying tannin content as supplements in sheep nutrition in west Africa.</obj></solution><solution><subj resource="urn:pmid:11252224"/><obj>[Nikolaĭ Vladimirovich Timofeev-Resovskiĭ (1900-1981). (Essay on his life and works)]</obj></solution><solution><subj resource="urn:pmid:11252225"/><obj>The A beta 6w302 gene and molecular mechanisms of resistance to the spread of radiation-induced lymphoma in a mouse mutant, survivor-27.</obj></solution><solution><subj resource="urn:pmid:11252226"/><obj>[Study of genome instability using DNA fingerprinting of the offspring of male mice subjected to chronic low dose gamma irradiation]</obj></solution><solution><subj resource="urn:pmid:11252227"/><obj>[Independence of DNA repair after gamma irradiation and radioadaptive response in lymphocytes of patients with Bloom syndrome]</obj></solution><solution><subj resource="urn:pmid:11252228"/><obj>[Changes in the number of DNA-protein cross links in spleen lymphocytes of mice exposed to low intensity low dose gamma irradiation]</obj></solution><solution><subj resource="urn:pmid:11252229"/><obj>[Radiation mapping as one of main methods of creating high resolution maps of human and animal genomes]</obj></solution><solution><subj resource="urn:pmid:11252230"/><obj>[Increased radiosensitivity after irradiation of lymphocytes low adaptive doses]</obj></solution><solution><subj resource="urn:pmid:11252231"/><obj>[Results of and prospects for methods of determination of the frequency of mutant cells for glycophorin A and T-cell receptor loci to estimate long-term genotoxic effect of ionizing radiation]</obj></solution><solution><subj resource="urn:pmid:11252232"/><obj>[Potential relationship between mutation process induced by low doses of ionizing radiation, and positional dynamics of chromosomes in nuclei of eukaryotic cells]</obj></solution><solution><subj resource="urn:pmid:11252233"/><obj>[Genetic effects in Drosophila melanogaster induced by chronic low-dose irradiation]</obj></solution><solution><subj resource="urn:pmid:11252234"/><obj>[Results of cytogenetic studies of the consequences of the Chernobyl accident]</obj></solution><solution><subj resource="urn:pmid:11252235"/><obj>[Cytogenetic studies of blood lymphocytes of cosmonauts after long-ter, space flights]</obj></solution><solution><subj resource="urn:pmid:11252236"/><obj>[Mutagenesis in Muridae from regions with increased radiation level]</obj></solution><solution><subj resource="urn:pmid:11252237"/><obj>[Radiation-population monitoring of Pinus sylvestris L. in the zone of the Chernobyl power plant]</obj></solution><solution><subj resource="urn:pmid:11252238"/><obj>[Current problems of estimation of genetic risk of human exposure to radiation]</obj></solution><solution><subj resource="urn:pmid:11270348"/><obj>[Controversy: systemic amniocentesis for women 38 years and more? Is it not premature to no longer accept performing amniocentesis on a patient age 38 years or more?]</obj></solution></query></answer>
Modified: branches/xa11/jxdata/iTQL/fulltext_queries/test.jxu
===================================================================
--- branches/xa11/jxdata/iTQL/fulltext_queries/test.jxu 2009-01-24 01:07:45 UTC (rev 1455)
+++ branches/xa11/jxdata/iTQL/fulltext_queries/test.jxu 2009-01-24 04:13:55 UTC (rev 1456)
@@ -2,6 +2,18 @@
<jxu>
<set name="debug" value="false" />
+ <!-- drop all fulltext models -->
+ <set name="query"
+ value="drop <@server@#model1> ;
+ drop <@server@#fulltext> ;
+ drop <@server@#fulltext2> ;
+ drop <@server@#normal_zh> ;
+ drop <@server@#fulltext_zh> ;
+ drop <@server@#numbers_test> ;
+ drop <@server@#numbers_fulltext> ;"/>
+
+ <eval stepClass="org.mulgara.store.jxunit.QueryJX" />
+
<!-- Create a normal model -->
<set name="modelName" value="@server@#model1" />
<set name="loadCommand" value="load <@baseuri@/jxdata/iTQL/data.rdf> into <@server@#model1> ;" />
@@ -314,8 +326,8 @@
order by $pmid $title;"/>
<eval stepClass="org.mulgara.store.jxunit.QueryJX" />
- <subst name="queryResult" regexp="1\.67[0-9]*" value="1.67"/>
- <subst name="queryResult" regexp="1\.38[0-9]*" value="1.38"/>
+ <subst name="queryResult" regexp="1\.(50|51)[0-9]*" value="1.50"/>
+ <subst name="queryResult" regexp="1\.(20|21)[0-9]*" value="1.20"/>
<ifEqual converse="true" file="queryResult17.txt" name="queryResult">
<save name="queryResult" file="badQuery17Result.xml"/>
<fail>Output failed. Check badQuery17Result.xml for output.</fail>
@@ -334,9 +346,9 @@
order by $pmid $title;"/>
<eval stepClass="org.mulgara.store.jxunit.QueryJX" />
- <subst name="queryResult" regexp="1\.67[0-9]*" value="1.67"/>
- <subst name="queryResult" regexp="1\.38[0-9]*" value="1.38"/>
- <subst name="queryResult" regexp="2\.75[0-9]*" value="2.75"/>
+ <subst name="queryResult" regexp="1\.(50|51)[0-9]*" value="1.50"/>
+ <subst name="queryResult" regexp="1\.(20|21)[0-9]*" value="1.20"/>
+ <subst name="queryResult" regexp="2\.(61|62)[0-9]*" value="2.61"/>
<ifEqual converse="true" file="queryResult18.txt" name="queryResult">
<save name="queryResult" file="badQuery18Result.xml"/>
<fail>Output failed. Check badQuery18Result.xml for output.</fail>
@@ -355,13 +367,55 @@
order by $pmid $title;"/>
<eval stepClass="org.mulgara.store.jxunit.QueryJX" />
- <subst name="queryResult" regexp="1\.38[0-9]*" value="1.38"/>
- <subst name="queryResult" regexp="1\.04[0-9]*" value="1.04"/>
+ <subst name="queryResult" regexp="1\.(20|21)[0-9]*" value="1.20"/>
+ <subst name="queryResult" regexp="0\.(92|93)[0-9]*" value="0.92"/>
<ifEqual converse="true" file="queryResult19.txt" name="queryResult">
<save name="queryResult" file="badQuery19Result.xml"/>
<fail>Output failed. Check badQuery19Result.xml for output.</fail>
</ifEqual>
+ <!-- Query Lucene model with only a subject given -->
+ <set name="query"
+ value="select $pred $obj from <@server@#model1>
+ where <urn:pmid:10941736> $pred $obj in <@server@#fulltext2>
+ order by $pred $obj;"/>
+
+ <eval stepClass="org.mulgara.store.jxunit.QueryJX" />
+ <ifEqual converse="true" file="queryResult20.txt" name="queryResult">
+ <save name="queryResult" file="badQuery20Result.xml"/>
+ <fail>Output failed. Check badQuery20Result.xml for output.</fail>
+ </ifEqual>
+
+ <!-- Query Lucene model with only a predicate given -->
+ <set name="query"
+ value="select $subj $obj from <@server@#model1>
+ where $subj <http://mulgara.org/mulgara/Document#title> $obj in <@server@#fulltext2>
+ order by $subj $obj;"/>
+
+ <eval stepClass="org.mulgara.store.jxunit.QueryJX" />
+ <ifEqual converse="true" file="queryResult21.txt" name="queryResult">
+ <save name="queryResult" file="badQuery21Result.xml"/>
+ <fail>Output failed. Check badQuery21Result.xml for output.</fail>
+ </ifEqual>
+
+ <!-- Export Lucene model -->
+ <set name="query" value="export <@server@#fulltext2> to <@baseuri@/tmp/fulltext2.rdf>;"/>
+
+ <eval stepClass="org.mulgara.store.jxunit.QueryJX" />
+ <ifEqual converse="true" file="exportResult1.txt" name="queryResult">
+ <save name="queryResult" file="badExportResult1.xml"/>
+ <fail>Output failed. Check badExportResult1.xml for output.</fail>
+ </ifEqual>
+
+ <set name="exportData" file="../../../tmp/fulltext2.rdf"/>
+ <!-- Disabled until we come up with a good xml diff strategy, as things like
+ - the order of the attributes change between jvm's
+ <ifEqual converse="true" file="exportData1.txt" name="exportData">
+ <save name="exportData" file="badExportData1.xml"/>
+ <fail>Output failed. Check badExportData1.xml for output.</fail>
+ </ifEqual>
+ -->
+
<!-- Drop the fulltext model -->
<set name="query"
value="drop <@server@#model1> ;
Modified: branches/xa11/log4j-conf.xml
===================================================================
--- branches/xa11/log4j-conf.xml 2009-01-24 01:07:45 UTC (rev 1455)
+++ branches/xa11/log4j-conf.xml 2009-01-24 04:13:55 UTC (rev 1456)
@@ -51,7 +51,14 @@
</appender>
<!-- (Insert category elements here) -->
+ <logger name="org.mulgara">
+ <level value="info" />
+ </logger>
+ <logger name="org.mulgara.resolver.lucene">
+ <level value="debug" />
+ </logger>
+
<!-- Default is to log messages of "warn" priority to the logfile appender -->
<root>
<priority value="warn"/>
Modified: branches/xa11/src/jar/content-rdfxml/java/org/mulgara/content/rdfxml/writer/RDFXMLWriter.java
===================================================================
--- branches/xa11/src/jar/content-rdfxml/java/org/mulgara/content/rdfxml/writer/RDFXMLWriter.java 2009-01-24 01:07:45 UTC (rev 1455)
+++ branches/xa11/src/jar/content-rdfxml/java/org/mulgara/content/rdfxml/writer/RDFXMLWriter.java 2009-01-24 04:13:55 UTC (rev 1456)
@@ -195,7 +195,6 @@
// Statements may be lazily evaluated. Materializing caches them
Tuples tuples = new StatementsWrapperTuples(statements);
Tuples materializedTuples = TuplesOperations.materialize(tuples);
- tuples.close();
// ensure variables are in the right order
Tuples projectedTuples = TuplesOperations.project(materializedTuples,
Modified: branches/xa11/src/jar/query/java/org/mulgara/query/filter/AbstractIsIriFnUnitTest.java
===================================================================
--- branches/xa11/src/jar/query/java/org/mulgara/query/filter/AbstractIsIriFnUnitTest.java 2009-01-24 01:07:45 UTC (rev 1455)
+++ branches/xa11/src/jar/query/java/org/mulgara/query/filter/AbstractIsIriFnUnitTest.java 2009-01-24 04:13:55 UTC (rev 1456)
@@ -80,7 +80,7 @@
assertTrue(f.equals(fn));
fail("No exception when testing an unbound value");
} catch (QueryException qe) {
- assertTrue(qe.getMessage().startsWith("Unbound column"));
+ assertTrue(qe.getMessage().startsWith("Resolving unbound variable"));
}
assertTrue(c.next());
Modified: branches/xa11/src/jar/query/java/org/mulgara/query/filter/EqualityComparisonUnitTest.java
===================================================================
--- branches/xa11/src/jar/query/java/org/mulgara/query/filter/EqualityComparisonUnitTest.java 2009-01-24 01:07:45 UTC (rev 1455)
+++ branches/xa11/src/jar/query/java/org/mulgara/query/filter/EqualityComparisonUnitTest.java 2009-01-24 04:13:55 UTC (rev 1456)
@@ -280,19 +280,19 @@
assertTrue(f.equals(eq));
fail("No exception when testing an unbound value for equality");
} catch (QueryException qe) {
- assertTrue(qe.getMessage().startsWith("Unbound column"));
+ assertTrue(qe.getMessage().startsWith("Resolving unbound variable"));
}
try {
assertTrue(f.equals(same));
fail("No exception when testing an unbound value for equivalency");
} catch (QueryException qe) {
- assertTrue(qe.getMessage().startsWith("Unbound column"));
+ assertTrue(qe.getMessage().startsWith("Resolving unbound variable"));
}
try {
assertTrue(f.equals(ne));
fail("No exception when testing an unbound value for inequality");
} catch (QueryException qe) {
- assertTrue(qe.getMessage().startsWith("Unbound column"));
+ assertTrue(qe.getMessage().startsWith("Resolving unbound variable"));
}
break;
Modified: branches/xa11/src/jar/query/java/org/mulgara/query/filter/IsBlankFnUnitTest.java
===================================================================
--- branches/xa11/src/jar/query/java/org/mulgara/query/filter/IsBlankFnUnitTest.java 2009-01-24 01:07:45 UTC (rev 1455)
+++ branches/xa11/src/jar/query/java/org/mulgara/query/filter/IsBlankFnUnitTest.java 2009-01-24 04:13:55 UTC (rev 1456)
@@ -101,7 +101,7 @@
assertTrue(f.equals(fn));
fail("No exception when testing an unbound value");
} catch (QueryException qe) {
- assertTrue(qe.getMessage().startsWith("Unbound column"));
+ assertTrue(qe.getMessage().startsWith("Resolving unbound variable"));
}
assertTrue(c.next());
Modified: branches/xa11/src/jar/query/java/org/mulgara/query/filter/IsLiteralFnUnitTest.java
===================================================================
--- branches/xa11/src/jar/query/java/org/mulgara/query/filter/IsLiteralFnUnitTest.java 2009-01-24 01:07:45 UTC (rev 1455)
+++ branches/xa11/src/jar/query/java/org/mulgara/query/filter/IsLiteralFnUnitTest.java 2009-01-24 04:13:55 UTC (rev 1456)
@@ -104,7 +104,7 @@
assertTrue(f.equals(fn));
fail("No exception when testing an unbound value");
} catch (QueryException qe) {
- assertTrue(qe.getMessage().startsWith("Unbound column"));
+ assertTrue(qe.getMessage().startsWith("Resolving unbound variable"));
}
assertTrue(c.next());
Modified: branches/xa11/src/jar/query/java/org/mulgara/query/filter/LangMatchesUnitTest.java
===================================================================
--- branches/xa11/src/jar/query/java/org/mulgara/query/filter/LangMatchesUnitTest.java 2009-01-24 01:07:45 UTC (rev 1455)
+++ branches/xa11/src/jar/query/java/org/mulgara/query/filter/LangMatchesUnitTest.java 2009-01-24 04:13:55 UTC (rev 1456)
@@ -189,7 +189,7 @@
assertTrue(f.equals(fn));
fail("No exception when testing an unbound value");
} catch (QueryException qe) {
- assertTrue(qe.getMessage().startsWith("Unbound column"));
+ assertTrue(qe.getMessage().startsWith("Resolving unbound variable"));
}
break;
Modified: branches/xa11/src/jar/query/java/org/mulgara/query/filter/Or.java
===================================================================
--- branches/xa11/src/jar/query/java/org/mulgara/query/filter/Or.java 2009-01-24 01:07:45 UTC (rev 1455)
+++ branches/xa11/src/jar/query/java/org/mulgara/query/filter/Or.java 2009-01-24 04:13:55 UTC (rev 1456)
@@ -52,7 +52,7 @@
result = filters.get(0).test(context);
} catch (QueryException e) {
// true on the RHS gives true
- if (!testList(context, tail(filters))) return true;
+ if (testList(context, tail(filters))) return true;
throw e;
}
return result || testList(context, tail(filters));
Modified: branches/xa11/src/jar/query/java/org/mulgara/query/filter/OrUnitTest.java
===================================================================
--- branches/xa11/src/jar/query/java/org/mulgara/query/filter/OrUnitTest.java 2009-01-24 01:07:45 UTC (rev 1455)
+++ branches/xa11/src/jar/query/java/org/mulgara/query/filter/OrUnitTest.java 2009-01-24 04:13:55 UTC (rev 1456)
@@ -108,7 +108,9 @@
new Node[] {falseLiteral, new BlankNodeImpl(1001)},
new Node[] {trueLiteral, new BlankNodeImpl(1002)},
new Node[] {falseLiteral, null},
- new Node[] {trueLiteral, null}
+ new Node[] {trueLiteral, null},
+ new Node[] {null, falseLiteral},
+ new Node[] {null, trueLiteral}
};
TestContext c = new TestContext(new String[] {"x", "y"}, rows);
c.beforeFirst();
@@ -179,6 +181,15 @@
assertTrue(c.next());
assertTrue(t.equals(fn));
+ assertTrue(c.next());
+ try {
+ fn.getValue();
+ fail("Logic operation on an unbound");
+ } catch (QueryException qe) { }
+
+ assertTrue(c.next());
+ assertTrue(t.equals(fn));
+
assertFalse(c.next());
}
Modified: branches/xa11/src/jar/query/java/org/mulgara/query/filter/RegexFnUnitTest.java
===================================================================
--- branches/xa11/src/jar/query/java/org/mulgara/query/filter/RegexFnUnitTest.java 2009-01-24 01:07:45 UTC (rev 1455)
+++ branches/xa11/src/jar/query/java/org/mulgara/query/filter/RegexFnUnitTest.java 2009-01-24 04:13:55 UTC (rev 1456)
@@ -194,7 +194,7 @@
assertTrue(f.equals(fn));
fail("No exception when testing an unbound value");
} catch (QueryException qe) {
- assertTrue(qe.getMessage().startsWith("Unbound column"));
+ assertTrue(qe.getMessage().startsWith("Resolving unbound variable"));
}
break;
Modified: branches/xa11/src/jar/query/java/org/mulgara/query/filter/value/Var.java
===================================================================
--- branches/xa11/src/jar/query/java/org/mulgara/query/filter/value/Var.java 2009-01-24 01:07:45 UTC (rev 1455)
+++ branches/xa11/src/jar/query/java/org/mulgara/query/filter/value/Var.java 2009-01-24 04:13:55 UTC (rev 1456)
@@ -233,7 +233,11 @@
* @throws QueryException Indicates an error getting data out of the context.
*/
public long resolveLocal() throws QueryException {
- return getLocalContext().getColumnValue(varIndex);
+ Context localContext = getLocalContext();
+ if (!localContext.isBound(varIndex)) {
+ throw new QueryException("Resolving unbound variable: " + name);
+ }
+ return localContext.getColumnValue(varIndex);
}
/**
Modified: branches/xa11/src/jar/resolver-lucene/java/org/mulgara/resolver/lucene/FullTextStringIndex.java
===================================================================
--- branches/xa11/src/jar/resolver-lucene/java/org/mulgara/resolver/lucene/FullTextStringIndex.java 2009-01-24 01:07:45 UTC (rev 1455)
+++ branches/xa11/src/jar/resolver-lucene/java/org/mulgara/resolver/lucene/FullTextStringIndex.java 2009-01-24 04:13:55 UTC (rev 1456)
@@ -41,6 +41,7 @@
import org.apache.lucene.analysis.standard.StandardAnalyzer;
import org.apache.lucene.document.Document;
import org.apache.lucene.document.Field;
+import org.apache.lucene.document.FieldSelector;
import org.apache.lucene.index.IndexReader;
import org.apache.lucene.index.IndexWriter;
import org.apache.lucene.index.Term;
@@ -53,6 +54,7 @@
import org.apache.lucene.search.HitCollector;
import org.apache.lucene.search.IndexSearcher;
import org.apache.lucene.search.MatchAllDocsQuery;
+import org.apache.lucene.search.PhraseQuery;
import org.apache.lucene.search.Query;
import org.apache.lucene.search.ScoreDoc;
import org.apache.lucene.search.TermQuery;
@@ -536,58 +538,64 @@
/**
* Find a string within the fulltext string pool. The search is based on the
- * {@link StandardAnalyzer} used to add the string. Subject and predicate can
- * be supplied {null}.
+ * {@link StandardAnalyzer} used to add the string.
*
- * @param subject subject maybe null
- * @param predicate predicate maybe null
- * @param literal literal to be searched via the analyzer. Must always be
- * supplied
+ * @param subject subject; may be null
+ * @param predicate predicate; may be null
+ * @param literal literal to be searched via the analyzer; may be null
* @return Object containing the hits
* @throws FullTextStringIndexException IOException occurs on reading index
*/
public Hits find(String subject, String predicate, String literal) throws FullTextStringIndexException {
- if ((literal == null) || (literal.length() == 0)) {
- throw new FullTextStringIndexException("Literal has not been supplied a value");
- }
+ Query query;
- Hits hits = null;
- BooleanQuery bQuery = new BooleanQuery();
+ if (subject == null && predicate == null && literal == null) {
+ query = new MatchAllDocsQuery();
+ } else {
+ BooleanQuery bQuery = new BooleanQuery();
+ query = bQuery;
- try {
// debug logging
if (logger.isDebugEnabled()) {
logger.debug("Searching the fulltext string index pool with subject :" + subject +
" predicate :" + predicate + " literal :" + literal);
}
- if ((subject != null) && (subject.length() > 0)) {
+ if (subject != null) {
TermQuery tSubject = new TermQuery(new Term(SUBJECT_KEY, subject));
+ if (literal != null) tSubject.setBoost(0); // if scoring, don't affect the score
bQuery.add(tSubject, BooleanClause.Occur.MUST);
}
- if ((predicate != null) && (predicate.length() > 0)) {
+ if (predicate != null) {
TermQuery tPredicate = new TermQuery(new Term(PREDICATE_KEY, predicate));
+ if (literal != null) tPredicate.setBoost(0); // if scoring, don't affect the score
bQuery.add(tPredicate, BooleanClause.Occur.MUST);
}
- Query qliteral = null;
+ if (literal != null) {
+ Query qliteral = null;
- // Are we performing a reverse string lookup?
- if (enableReverseTextIndex && isLeadingWildcard(literal)) {
- literal = reverseLiteralSearch(literal);
- QueryParser parser = new QueryParser(REVERSE_LITERAL_KEY, analyzer);
- qliteral = parser.parse(literal);
- } else {
- QueryParser parser = new QueryParser(LITERAL_KEY, analyzer);
- qliteral = parser.parse(literal);
+ try {
+ // Are we performing a reverse string lookup?
+ if (enableReverseTextIndex && isLeadingWildcard(literal)) {
+ literal = reverseLiteralSearch(literal);
+ QueryParser parser = new QueryParser(REVERSE_LITERAL_KEY, analyzer);
+ qliteral = parser.parse(literal);
+ } else {
+ QueryParser parser = new QueryParser(LITERAL_KEY, analyzer);
+ qliteral = parser.parse(literal);
+ }
+ } catch (ParseException ex) {
+ logger.error("Unable to parse query '" + literal + "'", ex);
+ throw new FullTextStringIndexException("Unable to parse query '" + literal + "'", ex);
+ }
+
+ bQuery.add(qliteral, BooleanClause.Occur.MUST);
}
- // submit the literal to the boolean query
- bQuery.add(qliteral, BooleanClause.Occur.MUST);
-
// debug logging
- if (logger.isDebugEnabled()) {
+ if (literal != null && logger.isDebugEnabled()) {
if ((literal.startsWith("*") || literal.startsWith("?")) && enableReverseTextIndex) {
logger.debug("Searching the fulltext string index pool with parsed query as " +
bQuery.toString(REVERSE_LITERAL_KEY));
@@ -596,23 +604,10 @@
bQuery.toString(LITERAL_KEY));
}
}
-
- //Perform query
- indexSearcher.search(bQuery, hits = new Hits(indexSearcher.getIndexReader()));
-
- if (logger.isDebugEnabled()) {
- logger.debug("Got hits: " + hits.length());
- }
- } catch (IOException ex) {
- closeIndexers = true;
- logger.error("Unable to read results for query '" + bQuery.toString(LITERAL_KEY) + "'", ex);
- throw new FullTextStringIndexException("Unable to read results for query '" + bQuery.toString(LITERAL_KEY) + "'", ex);
- } catch (ParseException ex) {
- logger.error("Unable to parse query '" + bQuery.toString(LITERAL_KEY) + "'", ex);
- throw new FullTextStringIndexException("Unable to parse query '" + bQuery.toString(LITERAL_KEY) + "'", ex);
}
- return hits;
+ //Perform query
+ return find(query);
}
/**
@@ -642,6 +637,10 @@
//Perform query
indexSearcher.search(query, hits = new Hits(indexSearcher.getIndexReader()));
+
+ if (logger.isDebugEnabled()) {
+ logger.debug("Got hits: " + hits.length());
+ }
} catch (IOException ex) {
closeIndexers = true;
logger.error("Unable to read results for query '" + query.toString(LITERAL_KEY) + "'", ex);
@@ -652,6 +651,64 @@
}
/**
+ * The maximum number of documents the given query could return.
+ *
+ * @param subject the subject; may be null
+ * @param predicate the predicate; may be null
+ * @param literal literal to be searched via the analyzer; may be null
+ * @return the maximum number of documents
+ * @throws FullTextStringIndexException if an error occurred
+ */
+ public long getMaxDocs(String subject, String predicate, String object)
+ throws FullTextStringIndexException {
+ long total = -1;
+
+ try {
+ if (subject != null) {
+ total = indexSearcher.docFreq(new Term(SUBJECT_KEY, subject));
+ if (total == 0) return 0;
+ }
+
+ if (predicate != null) {
+ if (total > 0)
+ total = Math.min(indexSearcher.docFreq(new Term(PREDICATE_KEY, subject)), total);
+ if (total == 0) return 0;
+ }
+
+ if (object != null) {
+ QueryParser parser = new QueryParser(LITERAL_KEY, analyzer);
+ total = findMinDocCount(parser.parse(object), total);
+ }
+
+ return (total >= 0) ? total : indexSearcher.maxDoc();
+ } catch (IOException ioe) {
+ closeIndexers = true;
+ throw new FullTextStringIndexException("Unable to count results for query '" + object + "'", ioe);
+ } catch (ParseException pe) {
+ throw new FullTextStringIndexException("Unable to parse query '" + object + "'", pe);
+ }
+ }
+
+ private long findMinDocCount(Query q, long max) throws IOException {
+ long count = max;
+
+ if (q instanceof TermQuery) {
+ Term term = ((TermQuery)q).getTerm();
+ count = Math.min(indexSearcher.docFreq(term), count);
+ } else if (q instanceof BooleanQuery) {
+ for (BooleanClause clause : ((BooleanQuery)q).getClauses()) {
+ if (clause.isRequired()) count = findMinDocCount(clause.getQuery(), count);
+ }
+ } else if (q instanceof PhraseQuery) {
+ for (Term term : ((PhraseQuery)q).getTerms()) {
+ count = Math.min(indexSearcher.docFreq(term), count);
+ }
+ }
+
+ return count;
+ }
+
+ /**
* Acquire the indexers.
*
* @param forWrites whether to acquire an index writer
@@ -735,7 +792,7 @@
* around 20B/entry on 32-bit and 33B/entry on 64-bit systems for the hits array, allowing us
* to handle 1M hits without too much trouble.
*/
- public static class Hits extends HitCollector {
+ public static class Hits extends HitCollector implements Cloneable {
private final IndexReader reader;
private final List<ScoreDoc> hits = new ArrayList<ScoreDoc>();
private boolean closed = false;
@@ -753,8 +810,8 @@
return hits.size();
}
- public final Document doc(int n) throws IOException {
- return reader.document(hits.get(n).doc);
+ public final Document doc(int n, FieldSelector fs) throws IOException {
+ return reader.document(hits.get(n).doc, fs);
}
public final float score(int n) throws IOException {
@@ -767,5 +824,14 @@
closed = true;
reader.decRef();
}
+
+ public Hits clone() {
+ reader.incRef();
+ try {
+ return (Hits) super.clone();
+ } catch (CloneNotSupportedException e) {
+ throw new Error(getClass() + " doesn't support clone, which it must", e);
+ }
+ }
}
}
Modified: branches/xa11/src/jar/resolver-lucene/java/org/mulgara/resolver/lucene/FullTextStringIndexTuples.java
===================================================================
--- branches/xa11/src/jar/resolver-lucene/java/org/mulgara/resolver/lucene/FullTextStringIndexTuples.java 2009-01-24 01:07:45 UTC (rev 1455)
+++ branches/xa11/src/jar/resolver-lucene/java/org/mulgara/resolver/lucene/FullTextStringIndexTuples.java 2009-01-24 04:13:55 UTC (rev 1456)
@@ -34,12 +34,17 @@
import java.util.Collections;
import java.util.ArrayList;
import java.util.List;
+import java.util.Set;
// Third party packages
import org.apache.log4j.Logger;
import org.apache.lucene.document.Document;
+import org.apache.lucene.document.FieldSelector;
+import org.apache.lucene.document.FieldSelectorResult;
// JRDf
+import org.jrdf.graph.BlankNode;
+import org.jrdf.graph.Literal;
import org.jrdf.graph.URIReference;
// local packages
@@ -56,6 +61,9 @@
import org.mulgara.resolver.spi.Resolution;
import org.mulgara.resolver.spi.ResolverSession;
import org.mulgara.store.tuples.AbstractTuples;
+import org.mulgara.store.tuples.Annotation;
+import org.mulgara.store.tuples.DefinablePrefixAnnotation;
+import org.mulgara.store.tuples.MandatoryBindingAnnotation;
import org.mulgara.store.tuples.Tuples;
/**
@@ -82,11 +90,12 @@
/** Logger. */
private final static Logger logger = Logger.getLogger(FullTextStringIndexTuples.class);
- /**
- * The native Lucene query result to represent as a {@link Tuples}.
- */
+ /** The native Lucene query result to represent as a {@link Tuples}. */
private FullTextStringIndex.Hits hits;
+ /** Which fields to load from the documents. */
+ private FieldSelector fieldSelector;
+
/**
* The current document within the {@link #hits}.
*
@@ -94,26 +103,34 @@
*/
private Document document;
- /**
- * The index of the next {@link #document} within the {@link #hits}.
- */
+ /** The index of the next {@link #document} within the {@link #hits}. */
private int nextDocumentIndex = 0;
- /**
- * Session used to localize Lucene text into string pool nodes.
- */
- private ResolverSession session;
+ /** Session used to localize Lucene text into string pool nodes. */
+ private final ResolverSession session;
- /**
- * The number of items in to tuples
- */
+ /** The number of items in tuples */
private long rowCount = -1;
- private final List<Variable> variableList = new ArrayList<Variable>(3);
+ /** The upper bound on the number of items in tuples */
+ private long rowUpperBound = -1;
+
+ /** The list of variables as found in the constraint */
+ private final List<Variable> constrVariableList = new ArrayList<Variable>(4);
+ /** The list of lucene keys corresponding to the variables found in the constraint */
+ private final List<String> constrLuceneKeyList = new ArrayList<String>(3);
+ /** The current list of variables (possibly re-ordered from definePrefix()) */
+ private final List<Variable> variableList = new ArrayList<Variable>(4);
+ /** The list of lucene keys corresponding to the (re-ordered) variable-list */
private final List<String> luceneKeyList = new ArrayList<String>(3);
- private LuceneConstraint constraint;
+ private final FullTextStringIndex fullTextStringIndex;
+ private final LuceneConstraint constraint;
+ private final ConstraintElement subjectElement;
+ private final ConstraintElement predicateElement;
+ private final ConstraintElement objectElement;
+
//
// Constructor
//
@@ -133,101 +150,132 @@
*/
FullTextStringIndexTuples(FullTextStringIndex fullTextStringIndex,
LuceneConstraint constraint, ResolverSession session) throws QueryException {
+ this.fullTextStringIndex = fullTextStringIndex;
this.session = session;
this.constraint = constraint;
- try {
- // Validate and globalize subject
- String subject = null;
- ConstraintElement subjectElement = constraint.getSubject();
- if (subjectElement == null) {
- // backwards compat with simple constraint
- subjectElement = constraint.getBindingVar();
- }
+ // process subject
+ subjectElement = constraint.getSubject();
- if (subjectElement instanceof Variable) {
- variableList.add((Variable)subjectElement);
- luceneKeyList.add(FullTextStringIndex.SUBJECT_KEY);
- } else if (subjectElement instanceof LocalNode) {
- try {
- URIReference subjectURI = (URIReference) session.globalize(((
- LocalNode) subjectElement).getValue());
- subject = subjectURI.getURI().toString();
- } catch (ClassCastException ec) {
- throw new QueryException("Bad subject in Lucene constraint", ec);
- }
- }
+ if (subjectElement instanceof Variable) {
+ constrVariableList.add((Variable)subjectElement);
+ constrLuceneKeyList.add(FullTextStringIndex.SUBJECT_KEY);
+ }
- // Validate and globalize predicate
- String predicate = null;
- ConstraintElement predicateElement = constraint.getPredicate();
- if (predicateElement instanceof Variable) {
- variableList.add((Variable)predicateElement);
- luceneKeyList.add(FullTextStringIndex.PREDICATE_KEY);
- } else if (predicateElement instanceof LocalNode) {
- try {
- URIReference predicateURI = (URIReference) session.globalize(((
- LocalNode) predicateElement).getValue());
- predicate = predicateURI.getURI().toString();
- } catch (ClassCastException ec) {
- throw new QueryException("Bad predicate in Lucene constraint", ec);
- }
- }
+ // process predicate
+ predicateElement = constraint.getPredicate();
- // Validate and globalize object
- String object;
- ConstraintElement objectElement = constraint.getObject();
- try {
- LiteralImpl objectLiteral = (LiteralImpl) session.globalize(((LocalNode)
- objectElement).getValue());
- object = objectLiteral.getLexicalForm();
- } catch (ClassCastException e) {
- throw new QueryException("The object of any rdf:object statement in a mulgara:LuceneModel " +
- "must be a literal.", e);
- }
+ if (predicateElement instanceof Variable) {
+ constrVariableList.add((Variable)predicateElement);
+ constrLuceneKeyList.add(FullTextStringIndex.PREDICATE_KEY);
+ }
- // Get the score variable
- Variable score = constraint.getScoreVar();
- if (score != null) {
- variableList.add(score);
- }
+ // process object
+ objectElement = constraint.getObject();
- if (logger.isInfoEnabled()) {
- logger.info("Searching for " + subject + " : " + predicate + " : " + object);
- }
- // Initialize fields
- hits = fullTextStringIndex.find(subject, predicate, object);
- setVariables(variableList);
- } catch (GlobalizeException e) {
- throw new QueryException("Couldn't globalize constraint elements", e);
- } catch (FullTextStringIndexException e) {
- throw new QueryException("Couldn't generate answer from text index", e);
+ if (objectElement instanceof Variable) {
+ constrVariableList.add((Variable)objectElement);
+ constrLuceneKeyList.add(FullTextStringIndex.LITERAL_KEY);
}
+
+ // Get the score variable
+ Variable score = constraint.getScoreVar();
+ if (score != null) {
+ constrVariableList.add(score);
+ }
+
+ setVariables(constrVariableList);
+
+ variableList.addAll(constrVariableList);
+ luceneKeyList.addAll(constrLuceneKeyList);
}
//
// Implementation of AbstractTuples methods
//
- public void beforeFirst(long[] prefix,
- int suffixTruncation) throws TuplesException {
+ public void beforeFirst(long[] prefix, int suffixTruncation) throws TuplesException {
+ final String subject = getString(subjectElement, prefix);
+ final String predicate = getString(predicateElement, prefix);
+ final String object = getString(objectElement, prefix);
+ assert (constraint.getScoreVar() == null || object != null) :
+ "Internal error: lucene-query string not bound even though a score is requested";
+
+ if (logger.isDebugEnabled()) {
+ logger.debug("Searching for " + subject + " : " + predicate + " : " + object);
+ }
+
+ try {
+ hits = fullTextStringIndex.find(subject, predicate, object);
+ } catch (FullTextStringIndexException e) {
+ throw new TuplesException("Couldn't generate answer from text index: subject='" + subject +
+ "', predicate='" + predicate + "', object='" + object + "'", e);
+ }
+
+ fieldSelector = new FieldSelector() {
+ public FieldSelectorResult accept(String fieldName) {
+ if (fieldName.equals(FullTextStringIndex.SUBJECT_KEY) && subject == null ||
+ fieldName.equals(FullTextStringIndex.PREDICATE_KEY) && predicate == null ||
+ (fieldName.equals(FullTextStringIndex.LITERAL_KEY) ||
+ fieldName.equals(FullTextStringIndex.REVERSE_LITERAL_KEY)) && object == null) {
+ return FieldSelectorResult.LOAD;
+ } else {
+ return FieldSelectorResult.NO_LOAD;
+ }
+ }
+ };
+
document = null;
nextDocumentIndex = 0;
+ rowCount = -1;
+ rowUpperBound = -1;
}
+ private String getString(ConstraintElement ce, long[] prefix) throws TuplesException {
+ long boundVal = 0;
+ if (ce instanceof LocalNode) {
+ boundVal = ((LocalNode)ce).getValue();
+ } else if (ce instanceof Variable) {
+ int idx = variableList.indexOf(ce);
+ boundVal = (idx < prefix.length) ? prefix[idx] : 0;
+ }
+
+ if (boundVal == 0) return null;
+
+ try {
+ Object val = session.globalize(boundVal);
+ if (val instanceof URIReference) return ((URIReference)val).getURI().toString();
+ if (val instanceof Literal) return ((Literal)val).getLexicalForm();
+ if (val instanceof BlankNode) return "";
+
+ throw new TuplesException("Unknown node-type for Lucene constraint '" + ce + "': local-value=" + boundVal + ", global-value=" + val + ", class=" + val.getClass());
+ } catch (GlobalizeException e) {
+ throw new TuplesException("Couldn't globalize value " + boundVal, e);
+ }
+ }
+
public void close() throws TuplesException {
try {
- hits.close();
+ if (hits != null) hits.close();
} catch (IOException ioe) {
throw new TuplesException("Error closing fulltext index hits", ioe);
}
}
+ public FullTextStringIndexTuples clone() {
+ FullTextStringIndexTuples clone = (FullTextStringIndexTuples) super.clone();
+ if (hits != null) clone.hits = hits.clone();
+ return clone;
+ }
+
public long getColumnValue(int column) throws TuplesException {
try {
if (column >= 0 && column < luceneKeyList.size()) {
- URI uri = new URI(document.get((String) luceneKeyList.get(column)));
- return session.localize(new URIReferenceImpl(uri));
+ String luceneKey = luceneKeyList.get(column);
+ if (luceneKey == FullTextStringIndex.LITERAL_KEY)
+ return session.localize(new LiteralImpl(document.get(luceneKey)));
+ else
+ return session.localize(new URIReferenceImpl(new URI(document.get(luceneKey))));
} else if (column == luceneKeyList.size()) {
// Generate the score column
return session.localize(new LiteralImpl(hits.score(nextDocumentIndex - 1)));
@@ -237,8 +285,7 @@
} catch (IOException e) {
throw new TuplesException("Couldn't get column " + column + " value", e);
} catch (LocalizeException e) {
- throw new TuplesException("Couldn't localize column " + column + " value",
- e);
+ throw new TuplesException("Couldn't localize column " + column + " value", e);
} catch (URISyntaxException e) {
throw new TuplesException("Couldn't get column " + column + " value", e);
}
@@ -253,9 +300,42 @@
}
public long getRowUpperBound() throws TuplesException {
- return getRowCount();
+ if (rowUpperBound == -1) {
+ try {
+ rowUpperBound = (hits != null) ? getRowCount() :
+ fullTextStringIndex.getMaxDocs(getString(subjectElement, Tuples.NO_PREFIX),
+ getString(predicateElement, Tuples.NO_PREFIX),
+ getString(objectElement, Tuples.NO_PREFIX));
+ } catch (FullTextStringIndexException e) {
+ throw new TuplesException("Couldn't row upper-bound from text index: subject='" +
+ getString(subjectElement, Tuples.NO_PREFIX) + "', predicate='" +
+ getString(predicateElement, Tuples.NO_PREFIX) + "', object='" +
+ getString(objectElement, Tuples.NO_PREFIX) + "'", e);
+ }
+ }
+
+ return rowUpperBound;
}
+ public int getRowCardinality() throws TuplesException {
+ long bound = getRowUpperBound();
+
+ if (bound == 0) return Tuples.ZERO;
+ if (bound == 1) return Tuples.ONE;
+ return Tuples.MANY;
+
+ /* Exact, but slower
+ if (getRowUpperBound() == 0) return Tuples.ZERO;
+
+ if (hits == null) beforeFirst();
+
+ long count = getRowCount();
+ if (count == 0) return Tuples.ZERO;
+ if (count == 1) return Tuples.ONE;
+ return Tuples.MANY;
+ */
+ }
+
/**
* Lucene never generates unbound columns.
*
@@ -274,9 +354,11 @@
}
public boolean next() throws TuplesException {
+ assert hits != null : "next() called without beforeFirst()";
+
try {
if (nextDocumentIndex < getRowCount()) {
- document = hits.doc(nextDocumentIndex++);
+ document = hits.doc(nextDocumentIndex++, fieldSelector);
return true;
} else {
document = null;
@@ -295,4 +377,41 @@
public boolean isComplete() {
return false;
}
+
+ public Annotation getAnnotation(Class<? extends org.mulgara.store.tuples.Annotation> annotationClass) throws TuplesException {
+ // the object (lucene query string) is required when a score is requested
+ if (annotationClass.equals(MandatoryBindingAnnotation.class) &&
+ objectElement instanceof Variable && constraint.getScoreVar() != null) {
+ return new MandatoryBindingAnnotation(new Variable[] { (Variable)objectElement });
+ }
+
+ // support re-ordering the variables so any variables can be bound in the prefix
+ if (annotationClass.equals(DefinablePrefixAnnotation.class)) {
+ return new DefinablePrefixAnnotation() {
+ public void definePrefix(Set boundVars) throws TuplesException {
+ if (boundVars.contains(constraint.getScoreVar()))
+ throw new TuplesException("Score variable may not be bound");
+
+ variableList.clear();
+ luceneKeyList.clear();
+
+ for (boolean useBound : new boolean[] { true, false }) {
+ for (int idx = 0; idx < constrLuceneKeyList.size(); idx++) {
+ Variable var = constrVariableList.get(idx);
+
+ if (boundVars.contains(var) == useBound) {
+ variableList.add(var);
+ luceneKeyList.add(constrLuceneKeyList.get(idx));
+ }
+ }
+ }
+
+ if (constraint.getScoreVar() != null) variableList.add(constraint.getScoreVar());
+ setVariables(variableList);
+ }
+ };
+ }
+
+ return null;
+ }
}
Modified: branches/xa11/src/jar/resolver-lucene/java/org/mulgara/resolver/lucene/FullTextStringIndexUnitTest.java
===================================================================
--- branches/xa11/src/jar/resolver-lucene/java/org/mulgara/resolver/lucene/FullTextStringIndexUnitTest.java 2009-01-24 01:07:45 UTC (rev 1455)
+++ branches/xa11/src/jar/resolver-lucene/java/org/mulgara/resolver/lucene/FullTextStringIndexUnitTest.java 2009-01-24 04:13:55 UTC (rev 1456)
@@ -496,7 +496,7 @@
int docsRemoved = 0;
for (int docNo = 0; docNo < hits.length(); docNo++) {
- String uri = hits.doc(docNo).getField(FullTextStringIndex.SUBJECT_KEY).stringValue();
+ String uri = hits.doc(docNo, null).getField(FullTextStringIndex.SUBJECT_KEY).stringValue();
logger.debug("Found supernatural in :" + uri);
Modified: branches/xa11/src/jar/resolver-lucene/java/org/mulgara/resolver/lucene/LuceneConstraint.java
===================================================================
--- branches/xa11/src/jar/resolver-lucene/java/org/mulgara/resolver/lucene/LuceneConstraint.java 2009-01-24 01:07:45 UTC (rev 1455)
+++ branches/xa11/src/jar/resolver-lucene/java/org/mulgara/resolver/lucene/LuceneConstraint.java 2009-01-24 04:13:55 UTC (rev 1456)
@@ -96,33 +96,35 @@
ConstraintElement p = constraint.getElement(1);
ConstraintElement o = constraint.getElement(2);
- // extract the binding variable
- ConstraintElement b = p.equals(searchPred) ? o : s;
-
- if (!(b instanceof Variable)) {
- throw new SymbolicTransformationException("Lucene query binder must be a variable: " + b);
- }
-
- binder = (Variable)b;
-
// extract predicate, object, score
if (p.equals(searchPred)) {
- if (s.equals(binder)) {
+ if (s.equals(o)) {
throw new SymbolicTransformationException("subject and object of '" + searchPred +
"' may not be the same: " + s);
}
subject = s;
+ assignBinder(o);
} else if (p.equals(scorePred)) {
if (!(o instanceof Variable)) {
throw new SymbolicTransformationException("Lucene query score must be a variable: " + o);
}
score = (Variable)o;
+ assignBinder(s);
} else {
+ subject = s;
predicate = p;
object = o;
}
}
+ private final void assignBinder(ConstraintElement b) throws SymbolicTransformationException {
+ if (!(b instanceof Variable)) {
+ throw new SymbolicTransformationException("Lucene query binder must be a variable: " + b);
+ }
+
+ binder = (Variable)b;
+ }
+
/**
* Merge the given constraint into this lucene constraint.
*
@@ -130,11 +132,22 @@
*/
void conjoinWith(LuceneConstraint constraint) throws SymbolicTransformationException {
model = getNoDup(constraint.model, model, "Can't combine lucene constraints against different models", "model");
- subject = getNoDup(constraint.subject, subject, "Can't combine lucene constraints with different subjects", "subj");
+
+ if (binder != null && constraint.binder != null) {
+ subject = getNoDup(constraint.subject, subject, "Can't combine lucene constraints with different subjects", "subj");
+ assignBinder(getNoDup(constraint.binder, binder, "Mismatched binder variable", "var"));
+ } else if (binder != null) {
+ assignBinder(getNoDup(constraint.subject, binder, "Mismatched binder variable", "var"));
+ } else if (constraint.binder != null) {
+ assignBinder(getNoDup(constraint.binder, subject, "Mismatched binder variable", "var"));
+ subject = constraint.subject;
+ } else {
+ subject = getNoDup(constraint.subject, subject, "Can't combine lucene constraints with different subjects", "subj");
+ }
+
predicate = getNoDup(constraint.predicate, predicate, "Only one predicate supported per search", "pred");
object = getNoDup(constraint.object, object, "Only one object supported per search", "obj");
- binder = getNoDup(constraint.binder, binder, "Mismatched binder variable", "var");
score = getNoDup(constraint.score, score, "Only one score supported per search", "score");
}
@@ -165,7 +178,7 @@
if (subject == null && score != null)
throw new SymbolicTransformationException("Missing <mulgara:search> for lucene constraint: " +
"binder=" + binder + ", predicate=" + predicate +
- "query=" + object + ", score=" + score);
+ ", query=" + object + ", score=" + score);
}
public ConstraintElement getModel() {
Modified: branches/xa11/src/jar/resolver-lucene/java/org/mulgara/resolver/lucene/LuceneResolver.java
===================================================================
--- branches/xa11/src/jar/resolver-lucene/java/org/mulgara/resolver/lucene/LuceneResolver.java 2009-01-24 01:07:45 UTC (rev 1455)
+++ branches/xa11/src/jar/resolver-lucene/java/org/mulgara/resolver/lucene/LuceneResolver.java 2009-01-24 04:13:55 UTC (rev 1456)
@@ -114,7 +114,8 @@
protected final XAResource xares;
- protected final Map<Long, FullTextStringIndex> indexes = new HashMap<Long, FullTextStringIndex>();
+ // for abort() only
+ protected Collection<FullTextStringIndex> indexes;
//
// Constructors
@@ -135,7 +136,7 @@
this.resolverSession = resolverSession;
this.resolverFactory = resolverFactory;
this.forWrites = forWrites;
- this.xares = new LuceneXAResource(10, resolverFactory, indexes.values());
+ this.xares = new LuceneXAResource(10, resolverFactory, this);
}
//
@@ -371,13 +372,19 @@
// generate the tuples
try {
FullTextStringIndex stringIndex = getFullTextStringIndex(((LocalNode)modelElement).getValue());
- Tuples tmpTuples = new FullTextStringIndexTuples(stringIndex, (LuceneConstraint) constraint, resolverSession);
+
+ /* run the query now and materialize the result; it is often much faster to run a large query
+ * and grab all resulting lucene documents than it is to run many smaller queries. Ideally we
+ * would try and figure out which approach is better on a query-by-query basis.
+ */
+ Tuples tmpTuples = new FullTextStringIndexTuples(stringIndex, (LuceneConstraint)constraint, resolverSession);
Tuples tuples = TuplesOperations.sort(tmpTuples);
tmpTuples.close();
return new TuplesWrapperResolution(tuples, constraint);
} catch (TuplesException te) {
throw new QueryException("Failed to sort tuples and close", te);
+
} catch (IOException ioe) {
throw new QueryException("Failed to open string index", ioe);
} catch (FullTextStringIndexException ef) {
@@ -387,17 +394,17 @@
private FullTextStringIndex getFullTextStringIndex(long model)
throws FullTextStringIndexException, IOException {
- FullTextStringIndex index = indexes.get(model);
+ FullTextStringIndex index = LuceneXAResource.getCurrentIndexes().get(model);
if (index == null) {
index = new FullTextStringIndex(resolverFactory.getIndexerCache(Long.toString(model)), forWrites);
- indexes.put(model, index);
+ LuceneXAResource.getCurrentIndexes().put(model, index);
}
return index;
}
public void abort() {
try {
- closeIndexes(indexes.values(), false);
+ closeIndexes(indexes, false);
} catch (Exception e) {
logger.error("Error closing fulltext index", e);
}
@@ -442,18 +449,18 @@
*/
private static class LuceneXAResource
extends AbstractXAResource<RMInfo<LuceneXAResource.LuceneTxInfo>,LuceneXAResource.LuceneTxInfo> {
- private final Collection<FullTextStringIndex> indexes;
+ private static final ThreadLocal<Map<Long, FullTextStringIndex>> currentIndexes = new ThreadLocal<Map<Long, FullTextStringIndex>>();
+ private final LuceneResolver resolver;
/**
* Construct a {@link LuceneXAResource} with a specified transaction timeout.
*
* @param transactionTimeout transaction timeout period, in seconds
* @param resolverFactory the resolver-factory we belong to
- * @param indexes the list of lucene indexes
*/
- public LuceneXAResource(int transactionTimeout, ResolverFactory resolverFactory, Collection<FullTextStringIndex> indexes) {
+ public LuceneXAResource(int transactionTimeout, ResolverFactory resolverFactory, LuceneResolver resolver) {
super(transactionTimeout, resolverFactory);
- this.indexes = indexes;
+ this.resolver = resolver;
}
protected RMInfo<LuceneTxInfo> newResourceManager() {
@@ -461,41 +468,56 @@
}
protected LuceneTxInfo newTransactionInfo() {
- LuceneTxInfo txInfo = new LuceneTxInfo();
- txInfo.indexes = indexes;
- return txInfo;
+ return new LuceneTxInfo();
}
+ public static Map<Long, FullTextStringIndex> getCurrentIndexes() {
+ return currentIndexes.get();
+ }
+
//
// Methods implementing XAResource
//
protected void doStart(LuceneTxInfo tx, int flags, boolean isNew) {
+ currentIndexes.set(tx.indexes);
+ resolver.indexes = tx.indexes.values();
}
protected void doEnd(LuceneTxInfo tx, int flags) {
+ currentIndexes.set(null);
}
protected int doPrepare(LuceneTxInfo tx) throws Exception {
- for (FullTextStringIndex index : tx.indexes)
+ for (FullTextStringIndex index : tx.indexes.values())
index.prepare();
return XA_OK;
}
protected void doCommit(LuceneTxInfo tx) throws Exception {
- closeIndexes(tx.indexes, true);
+ closeIndexes(tx.indexes.values(), true);
+ tx.indexes.clear(); // so transactionCompleted does not close a second time
}
protected void doRollback(LuceneTxInfo tx) throws Exception {
- closeIndexes(tx.indexes, false);
+ closeIndexes(tx.indexes.values(), false);
+ tx.indexes.clear(); // so transactionCompleted does not close a second time
}
protected void doForget(LuceneTxInfo tx) {
}
+ protected void transactionCompleted(LuceneTxInfo tx) {
+ super.transactionCompleted(tx);
+ try {
+ closeIndexes(tx.indexes.values(), false);
+ } catch (Exception e) {
+ logger.error("Error closing fulltext index", e);
+ }
+ }
static class LuceneTxInfo extends TxInfo {
- public Collection<FullTextStringIndex> indexes;
+ public final Map<Long, FullTextStringIndex> indexes = new HashMap<Long, FullTextStringIndex>();
}
}
}
Modified: branches/xa11/src/jar/resolver-lucene/java/org/mulgara/resolver/lucene/LuceneResolverFactory.java
===================================================================
--- branches/xa11/src/jar/resolver-lucene/java/org/mulgara/resolver/lucene/LuceneResolverFactory.java 2009-01-24 01:07:45 UTC (rev 1455)
+++ branches/xa11/src/jar/resolver-lucene/java/org/mulgara/resolver/lucene/LuceneResolverFactory.java 2009-01-24 04:13:55 UTC (rev 1456)
@@ -141,10 +141,10 @@
/**
* {@inheritDoc}
- * @return <code>false</code> - this graph does not support exports.
+ * @return <code>true</code> - this graph supports exports.
*/
public boolean supportsExport() {
- return false;
+ return true;
}
/**
Modified: branches/xa11/src/jar/resolver-lucene/java/org/mulgara/resolver/lucene/LuceneResolverUnitTest.java
===================================================================
--- branches/xa11/src/jar/resolver-lucene/java/org/mulgara/resolver/lucene/LuceneResolverUnitTest.java 2009-01-24 01:07:45 UTC (rev 1455)
+++ branches/xa11/src/jar/resolver-lucene/java/org/mulgara/resolver/lucene/LuceneResolverUnitTest.java 2009-01-24 04:13:55 UTC (rev 1456)
@@ -45,6 +45,7 @@
import org.mulgara.query.Variable;
import org.mulgara.query.operation.Modification;
import org.mulgara.query.rdf.Mulgara;
+import org.mulgara.query.rdf.LiteralImpl;
import org.mulgara.query.rdf.URIReferenceImpl;
import org.mulgara.resolver.Database;
import org.mulgara.resolver.JotmTransactionManagerFactory;
@@ -80,7 +81,8 @@
public static Test suite() {
TestSuite suite = new TestSuite();
- suite.addTest(new LuceneResolverUnitTest("testConcurrentQuery"));
+ suite.addTest(new LuceneResolverUnitTest("testBasicQueries"));
+ suite.addTest(new LuceneResolverUnitTest("testConcurrentQueries"));
suite.addTest(new LuceneResolverUnitTest("testConcurrentReadTransaction"));
suite.addTest(new LuceneResolverUnitTest("testTransactionIsolation"));
suite.addTest(new LuceneResolverUnitTest("testLuceneConstraint"));
@@ -161,10 +163,109 @@
}
/**
+ * Basic queries.
+ */
+ public void testBasicQueries() throws Exception {
+ logger.info("Testing basic queries");
+
+ try {
+ Session session = database.newSession();
+
+ try {
+ // Load some test data
+ URI fileURI = new File(textDirectory + File.separator + "data.n3").toURI();
+
+ if (session.modelExists(modelURI)) {
+ session.removeModel(modelURI);
+ }
+ session.createModel(modelURI, luceneModelType);
+ session.setModel(modelURI, new GraphResource(fileURI));
+
+ // Run simple query with variable subject and fixed predicate
+ String q = "select $s from <foo:bar> where $s <foo:hasText> 'American' in <" + modelURI + ">;";
+ Answer answer = session.query(parseQuery(q));
+ compareResults(new String[][] { { "foo:node5" }, { "foo:node6" }, { "foo:node7" } }, answer);
+ answer.close();
+
+ // Run simple query with variable subject and predicate
+ q = "select $s $p from <foo:bar> where $s $p 'American' in <" + modelURI + ">;";
+ answer = session.query(parseQuery(q));
+ compareResults(new String[][] { { "foo:node5", "foo:hasText" },
+ { "foo:node6", "foo:hasText" },
+ { "foo:node7", "foo:hasText" } },
+ answer);
+ answer.close();
+
+ // Run simple query with fixed subject and variable predicate
+ q = "select $p from <foo:bar> where <foo:node6> $p 'American' in <" + modelURI + ">;";
+ answer = session.query(parseQuery(q));
+ compareResults(new String[][] { { "foo:hasText" } }, answer);
+ answer.close();
+
+ // Run simple query with fixed subject and variable predicate and object
+ q = "select $p $o from <foo:bar> where <foo:node9> $p $o in <" + modelURI + ">;";
+ answer = session.query(parseQuery(q));
+ compareResults(new String[][] { { "foo:hasText", "Antibiotic Use Working Group" } }, answer, true);
+ answer.close();
+
+ // Run simple query with fixed predicate and variable subject and object
+ q = "select $s $o from <foo:bar> where $s <foo:hasText> $o in <" + modelURI + "> order by $s limit 3;";
+ answer = session.query(parseQuery(q));
+ compareResults(new String[][] {
+ { "foo:node1", "AACP Pneumothorax Consensus Group" },
+ { "foo:node10", "Atypical Squamous Cells Intraepithelial" },
+ { "foo:node11", "Lesion Triage Study (ALTS) Group" },
+ },
+ answer, true);
+
+ answer.close();
+
+ // Run simple query with variable subject, predicate, and object
+ q = "select $s $p $o from <foo:bar> where $s $p $o in <" + modelURI + "> order by $s limit 3;";
+ answer = session.query(parseQuery(q));
+ compareResults(new String[][] {
+ { "foo:node1", "foo:hasText", "AACP Pneumothorax Consensus Group" },
+ { "foo:node10", "foo:hasText", "Atypical Squamous Cells Intraepithelial" },
+ { "foo:node11", "foo:hasText", "Lesion Triage Study (ALTS) Group" },
+ },
+ answer, true);
+
+ answer.close();
+
+ // Run extended query with variable subject and fixed predicate
+ q = "select $s from <foo:bar> where $s <mulgara:search> $b in <" + modelURI + "> and $b <foo:hasText> 'American' in <" + modelURI + ">;";
+ answer = session.query(parseQuery(q));
+ compareResults(new String[][] { { "foo:node5" }, { "foo:node6" }, { "foo:node7" } }, answer);
+ answer.close();
+
+ // Run extended query with variable subject and predicate
+ q = "select $s $p from <foo:bar> where $s <mulgara:search> $b in <" + modelURI + "> and $b $p 'American' in <" + modelURI + ">;";
+ answer = session.query(parseQuery(q));
+ compareResults(new String[][] { { "foo:node5", "foo:hasText" },
+ { "foo:node6", "foo:hasText" },
+ { "foo:node7", "foo:hasText" } },
+ answer);
+ answer.close();
+
+ // Run extended query with fixed subject and variable predicate
+ q = "select $p from <foo:bar> where <foo:node6> <mulgara:search> $b in <" + modelURI + "> and $b $p 'American' in <" + modelURI + ">;";
+ answer = session.query(parseQuery(q));
+ compareResults(new String[][] { { "foo:hasText" } }, answer);
+ answer.close();
+
+ } finally {
+ session.close();
+ }
+ } catch (Exception e) {
+ fail(e);
+ }
+ }
+
+ /**
* Two queries, in parallel.
*/
- public void testConcurrentQuery() throws Exception {
- logger.info("Testing concurrentQuery");
+ public void testConcurrentQueries() throws Exception {
+ logger.info("Testing concurrentQueries");
try {
// Load some test data
@@ -446,7 +547,7 @@
transf.transform(context, q);
ConstraintExpression ce = q.getConstraintExpression();
- checkConstraint(ce, null, "test:title", "blah", "foo", null);
+ checkConstraint(ce, "foo", "test:title", "blah", null, null);
// basic complex query
q = new TestMutableLocalQuery(parseQuery(
@@ -504,8 +605,8 @@
transf.transform(context, q);
cc = checkConstraint(q.getConstraintExpression(), 2);
- checkConstraint(cc.getElements().get(0), null, "test:title", "blah", "foo", null);
- checkConstraint(cc.getElements().get(1), null, "test:author", "Smith", "foo", null);
+ checkConstraint(cc.getElements().get(0), "foo", "test:title", "blah", null, null);
+ checkConstraint(cc.getElements().get(1), "foo", "test:author", "Smith", null, null);
// two simple queries, shared var and predicate
q = new TestMutableLocalQuery(parseQuery(
@@ -516,8 +617,8 @@
transf.transform(context, q);
cc = checkConstraint(q.getConstraintExpression(), 2);
- checkConstraint(cc.getElements().get(0), null, "test:title", "blah", "foo", null);
- checkConstraint(cc.getElements().get(1), null, "test:title", "Smith", "foo", null);
+ checkConstraint(cc.getElements().get(0), "foo", "test:title", "blah", null, null);
+ checkConstraint(cc.getElements().get(1), "foo", "test:title", "Smith", null, null);
// two simple queries, separate vars
q = new TestMutableLocalQuery(parseQuery(
@@ -528,8 +629,8 @@
transf.transform(context, q);
cc = checkConstraint(q.getConstraintExpression(), 2);
- checkConstraint(cc.getElements().get(0), null, "test:title", "blah", "foo", null);
- checkConstraint(cc.getElements().get(1), null, "test:author", "Smith", "bar", null);
+ checkConstraint(cc.getElements().get(0), "foo", "test:title", "blah", null, null);
+ checkConstraint(cc.getElements().get(1), "bar", "test:author", "Smith", null, null);
// two complex queries with scores but shared var
q = new TestMutableLocalQuery(parseQuery(
@@ -574,7 +675,7 @@
transf.transform(context, q);
cc = checkConstraint(q.getConstraintExpression(), 2);
- checkConstraint(cc.getElements().get(0), null, "test:title", "blah", "foo", null);
+ checkConstraint(cc.getElements().get(0), "foo", "test:title", "blah", null, null);
checkConstraint(cc.getElements().get(1), "foo", "test:author", "Smith", "search2", "score2");
// a simple query and a complex query, shared var, different constraint order
@@ -588,7 +689,7 @@
transf.transform(context, q);
cc = checkConstraint(q.getConstraintExpression(), 2);
- checkConstraint(cc.getElements().get(0), null, "test:title", "blah", "foo", null);
+ checkConstraint(cc.getElements().get(0), "foo", "test:title", "blah", null, null);
checkConstraint(cc.getElements().get(1), "foo", "test:author", "Smith", "search2", "score2");
// a simple query and a complex query, separate vars
@@ -602,7 +703,7 @@
transf.transform(context, q);
cc = checkConstraint(q.getConstraintExpression(), 2);
- checkConstraint(cc.getElements().get(0), null, "test:title", "blah", "foo", null);
+ checkConstraint(cc.getElements().get(0), "foo", "test:title", "blah", null, null);
checkConstraint(cc.getElements().get(1), "bar", "test:author", "Smith", "search2", "score2");
// invalid: complex query with multiple different predicates
@@ -727,12 +828,7 @@
assertTrue(ce instanceof LuceneConstraint);
LuceneConstraint lc = (LuceneConstraint)ce;
- if (expSubj != null) {
- assertTrue(lc.getSubject() instanceof Variable);
- assertEquals(expSubj, ((Variable)lc.getSubject()).getName());
- } else {
- assertNull(lc.getSubject());
- }
+ assertEquals(expSubj, ((Variable)lc.getSubject()).getName());
assertTrue(lc.getPredicate() instanceof URIReference);
assertEquals(URI.create(expPred), ((URIReference)lc.getPredicate()).getURI());
@@ -740,7 +836,11 @@
assertTrue(lc.getObject() instanceof Literal);
assertEquals(expObj, ((Literal)lc.getObject()).getLexicalForm());
- assertEquals(expBind, lc.getBindingVar().getName());
+ if (expBind != null) {
+ assertEquals(expBind, lc.getBindingVar().getName());
+ } else {
+ assertNull(lc.getBindingVar());
+ }
if (expScore != null) {
assertEquals(expScore, lc.getScoreVar().getName());
@@ -771,14 +871,21 @@
}
private void compareResults(String[][] expected, Answer answer) throws Exception {
+ compareResults(expected, answer, false);
+ }
+
+ private void compareResults(String[][] expected, Answer answer, boolean lastIsLiteral)
+ throws Exception {
try {
answer.beforeFirst();
for (int i = 0; i < expected.length; i++) {
assertTrue("Answer short at row " + i, answer.next());
assertEquals(expected[i].length, answer.getNumberOfVariables());
for (int j = 0; j < expected[i].length; j++) {
- URIReferenceImpl uri = new URIReferenceImpl(new URI(expected[i][j]));
- assertEquals(uri, answer.getObject(j));
+ Object exp = (lastIsLiteral && j == expected[i].length - 1) ?
+ new LiteralImpl(expected[i][j]) :
+ new URIReferenceImpl(new URI(expected[i][j]));
+ assertEquals(exp, answer.getObject(j));
}
}
assertFalse(answer.next());
Modified: branches/xa11/src/jar/resolver-lucene/java/org/mulgara/resolver/lucene/LuceneTransformer.java
===================================================================
--- branches/xa11/src/jar/resolver-lucene/java/org/mulgara/resolver/lucene/LuceneTransformer.java 2009-01-24 01:07:45 UTC (rev 1455)
+++ branches/xa11/src/jar/resolver-lucene/java/org/mulgara/resolver/lucene/LuceneTransformer.java 2009-01-24 04:13:55 UTC (rev 1456)
@@ -34,6 +34,7 @@
import org.mulgara.query.ConstraintConjunction;
import org.mulgara.query.ConstraintOperation;
import org.mulgara.query.QueryException;
+import org.mulgara.query.Variable;
import org.mulgara.query.rdf.URIReferenceImpl;
import org.mulgara.resolver.spi.AbstractSymbolicTransformer;
import org.mulgara.resolver.spi.SymbolicTransformationContext;
@@ -117,15 +118,22 @@
if (trans instanceof LuceneConstraint) {
LuceneConstraint lc = (LuceneConstraint)trans;
- List<LuceneConstraint> cumulative = luceneArgs.get(lc.getBindingVar());
+ Variable b = lc.getBindingVar();
+ if (b == null && lc.getSubject() instanceof Variable) b = (Variable)lc.getSubject();
+ if (b == null) {
+ retainedArgs.add(lc);
+ continue;
+ }
+
+ List<LuceneConstraint> cumulative = luceneArgs.get(b);
if (cumulative == null) {
cumulative = new ArrayList<LuceneConstraint>();
cumulative.add(lc);
- luceneArgs.put(lc.getBindingVar(), cumulative);
+ luceneArgs.put(b, cumulative);
} else if (cumulative.size() > 1 ||
- cumulative.get(0).getSubject() == null &&
+ cumulative.get(0).getBindingVar() == null &&
cumulative.get(0).getPredicate() != null &&
- lc.getSubject() == null && lc.getPredicate() != null) {
+ lc.getBindingVar() == null && lc.getPredicate() != null) {
// backwards compat hack for multiple simple queries
cumulative.add(lc);
} else {
@@ -133,6 +141,8 @@
if (logger.isTraceEnabled()) logger.trace("Updated LC with: " + cumulative.iterator().next() + "; result: " + lc);
transformed = true;
}
+
+ if (logger.isTraceEnabled()) logger.trace("Updated LC with: " + lc + "; result: " + cumulative);
} else {
retainedArgs.add(trans);
}
Modified: branches/xa11/src/jar/server/java/org/mulgara/server/EmbeddedMulgaraServer.java
===================================================================
--- branches/xa11/src/jar/server/java/org/mulgara/server/EmbeddedMulgaraServer.java 2009-01-24 01:07:45 UTC (rev 1455)
+++ branches/xa11/src/jar/server/java/org/mulgara/server/EmbeddedMulgaraServer.java 2009-01-24 04:13:55 UTC (rev 1456)
@@ -800,7 +800,7 @@
*
*/
private static void cleanUpTemporaryFiles() {
- File tempDirectory = TempDir.getTempDir();
+ File tempDirectory = TempDir.getTempDir(false);
// Add a filter to ensure we only delete the correct files
File[] list = tempDirectory.listFiles(new TemporaryFileNameFilter());
Modified: branches/xa11/src/jar/tuples/java/org/mulgara/store/tuples/UnboundJoin.java
===================================================================
--- branches/xa11/src/jar/tuples/java/org/mulgara/store/tuples/UnboundJoin.java 2009-01-24 01:07:45 UTC (rev 1455)
+++ branches/xa11/src/jar/tuples/java/org/mulgara/store/tuples/UnboundJoin.java 2009-01-24 04:13:55 UTC (rev 1456)
@@ -474,7 +474,7 @@
for (int j = 0; j < operandBinding[i].length; j++) {
if (fooOperand[i][j] == PREFIX) {
// Variable first bound to a next method parameter prefix column passed to beforeFirst.
- operandBinding[i][j] = (j < prefix.length) ? prefix[fooColumn[i][j]] : Tuples.UNBOUND;
+ operandBinding[i][j] = (fooColumn[i][j] < prefix.length) ? prefix[fooColumn[i][j]] : Tuples.UNBOUND;
} else {
// Variable first bound to a leftward operand column
operandBinding[i][j] = operands[fooOperand[i][j]].getColumnValue(fooColumn[i][j]);
Modified: branches/xa11/src/jar/util/java/org/mulgara/util/TempDir.java
===================================================================
--- branches/xa11/src/jar/util/java/org/mulgara/util/TempDir.java 2009-01-24 01:07:45 UTC (rev 1455)
+++ branches/xa11/src/jar/util/java/org/mulgara/util/TempDir.java 2009-01-24 04:13:55 UTC (rev 1456)
@@ -28,7 +28,8 @@
package org.mulgara.util;
// Java 2 standard packages
-import java.io.*;
+import java.io.File;
+import java.io.IOException;
// Third party packages
import org.apache.log4j.Logger;
@@ -38,40 +39,29 @@
* Manages the creation of temporary files in a controlled location.
*
* @created 2004-12-03
- *
* @author David Makepeace
- *
* @version $Revision: 1.9 $
- *
* @modified $Date: 2005/01/05 04:59:29 $
- *
* @maintenanceAuthor $Author: newmana $
- *
* @company <A href="mailto:info at PIsoftware.com">Plugged In Software</A>
- *
- * @copyright ©2001 <a href="http://www.pisoftware.com/">Plugged In
- * Software Pty Ltd</a>
+ * @copyright ©2001 <a href="http://www.pisoftware.com/">Plugged In Software Pty Ltd</a>
* @licence <a href="{@docRoot}/../../LICENCE">Mozilla Public License v1.1</a>
*/
public final class TempDir {
+ /** Logger. */
+ private static final Logger logger = Logger.getLogger(TempDir.class);
+ private static final File systemTempDir = new File(System.getProperty("java.io.tmpdir"));
- /**
- * Logger.
- */
- private final static Logger logger = Logger.getLogger(TempDir.class);
-
- private static final File systemTempDir =
- new File(System.getProperty("java.io.tmpdir"));
-
private static File tempDir = null;
+ public static File getTempDir() {
+ return getTempDir(true);
+ }
- public static synchronized File getTempDir() {
+ public static synchronized File getTempDir(boolean failIfNotDir) {
if (tempDir == null) {
// Initialize tempDir.
- File dir = new File(
- systemTempDir, "mulgara_" + System.getProperty("user.name")
- );
+ File dir = new File(systemTempDir, "mulgara_" + System.getProperty("user.name"));
dir.mkdirs();
if (dir.isDirectory()) {
tempDir = dir;
@@ -81,13 +71,11 @@
}
}
- if (!tempDir.isDirectory()) {
+ if (!tempDir.isDirectory() && failIfNotDir) {
// The temporary directory has gone away! This is a fatal error because,
// for security reasons, we don't want to just revert to using the system
// temporary directory.
- logger.error(
- "The temporary directory no longer exists! (" + tempDir + ")"
- );
+ logger.error("The temporary directory no longer exists! (" + tempDir + ")");
System.exit(1);
}
@@ -100,9 +88,7 @@
throw new IllegalArgumentException("dir is null");
}
if (!dir.isDirectory()) {
- throw new IllegalArgumentException(
- "dir (" + dir + ") is not a directory"
- );
+ throw new IllegalArgumentException("dir (" + dir + ") is not a directory");
}
tempDir = dir;
}
@@ -111,10 +97,7 @@
/**
* Creates an empty file in the current mulgara temp directory.
*/
- public static synchronized File createTempFile(
- String prefix, String suffix
- ) throws IOException {
+ public static synchronized File createTempFile(String prefix, String suffix) throws IOException {
return File.createTempFile(prefix, suffix, getTempDir());
}
-
}
Modified: branches/xa11/src/jar/web/java/org/mulgara/webquery/QueryResponsePage.java
===================================================================
--- branches/xa11/src/jar/web/java/org/mulgara/webquery/QueryResponsePage.java 2009-01-24 01:07:45 UTC (rev 1455)
+++ branches/xa11/src/jar/web/java/org/mulgara/webquery/QueryResponsePage.java 2009-01-24 04:13:55 UTC (rev 1456)
@@ -284,7 +284,8 @@
// got to the end of this result, so clean it up
resultFinished(result);
} catch (TuplesException e) {
- throw new IOException("Error accessing the results of the query: " + e.getMessage());
+ throw (IOException)
+ new IOException("Error accessing the results of the query: " + e.getMessage()).initCause(e);
}
return resultTable;
}
@@ -338,7 +339,7 @@
}
return new Anchor(new URI(EXECUTE_LINK + "?" + params), text);
} catch (URISyntaxException e) {
- throw new IOException("Bad data returned from server");
+ throw (IOException) new IOException("Bad data returned from server").initCause(e);
}
}
@@ -374,7 +375,8 @@
a.addAttr(Attr.TITLE, "Forward to next page of results");
return new TableRow(new TableData(a).addAttr(Attr.COLSPAN, width));
} catch (URISyntaxException e) {
- throw new IOException("Unabled to emit a relative URL: " + e.getMessage());
+ throw (IOException)
+ new IOException("Unabled to emit a relative URL: " + e.getMessage()).initCause(e);
}
}
Modified: branches/xa11/tools/src/org/mulgara/tools/Tql.java
===================================================================
--- branches/xa11/tools/src/org/mulgara/tools/Tql.java 2009-01-24 01:07:45 UTC (rev 1455)
+++ branches/xa11/tools/src/org/mulgara/tools/Tql.java 2009-01-24 04:13:55 UTC (rev 1456)
@@ -37,7 +37,7 @@
private static final URI HOST = URI.create("rmi://localhost/server1");
/**
- * Run a set of SPARQL queries against a local server.
+ * Run a set of TQL queries against a local server.
* @param args A list of filenames containing the queries to run.
* @throws Exception Any kind of exception is just displayed on stderr, without any handling.
*/
More information about the Mulgara-svn
mailing list