KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > com > hp > hpl > jena > rdf > arp > test > Performance


1
2 /*
3  * (c) Copyright 2003, 2004, 2005 Hewlett-Packard Development Company, LP
4  * See end of file.
5  */

6 package com.hp.hpl.jena.rdf.arp.test;
7 import java.io.*;
8
9 import com.hp.hpl.jena.rdf.arp.*;
10 import org.xml.sax.ErrorHandler JavaDoc;
11 import org.xml.sax.SAXParseException JavaDoc;
12
13 class Performance {
14     static String JavaDoc allFiles[][] =
15         {
16             {
17                 "testing/arp/onts/ont1",
18                 "http://cicho0.tripod.com/cs_Courses_ont" },
19             {
20             "testing/arp/onts/ont2",
21                 "http://cicho0.tripod.com/cs_LecturingStaff_ont" },
22                 {
23             "testing/arp/onts/ont3",
24                 "http://cicho0.tripod.com/cs_Staff_ont" },
25                 {
26             "testing/arp/onts/ont4",
27                 "http://cicho0.tripod.com/Dep_of_Computer_Science" },
28                 {
29             "testing/arp/onts/ont10",
30                 "http://daml.umbc.edu/ontologies/calendar-ont.daml" },
31                 {
32             "testing/arp/onts/ont11",
33                 "http://daml.umbc.edu/ontologies/classification.daml" },
34                 {
35             "testing/arp/onts/ont12",
36                 "http://daml.umbc.edu/ontologies/dreggie-ont.daml" },
37                 {
38             "testing/arp/onts/ont13",
39                 "http://daml.umbc.edu/ontologies/profile-ont.daml" },
40                 {
41             "testing/arp/onts/ont14",
42                 "http://daml.umbc.edu/ontologies/talk-ont.daml" },
43                 {
44             "testing/arp/onts/ont15",
45                 "http://daml.umbc.edu/ontologies/topic-ont.daml" },
46                 {
47             "testing/arp/onts/ont16",
48                 "http://daml.umbc.edu/ontologies/trust-ont.daml" },
49                 {
50             "testing/arp/onts/ont17",
51                 "http://derpi.tuwien.ac.at/~andrei/cerif-rdf-dc-mn.daml" },
52                 {
53             "testing/arp/onts/ont18",
54                 "http://edge.mcs.drexel.edu/MUG/2001/05/16/sbf.daml" },
55                 {
56             "testing/arp/onts/ont19",
57                 "http://grcinet.grci.com/maria/www/codipsite/Onto/DublinCore/DublinCore_V27Aug2001.daml" },
58                 {
59             "testing/arp/onts/ont20",
60                 "http://grcinet.grci.com/maria/www/codipsite/Onto/Project/ProjectOntology_V26Jul2001.daml" },
61                 {
62             "testing/arp/onts/ont21",
63                 "http://grcinet.grci.com/maria/www/codipsite/Onto/TMD/TMDOntology_V27Aug2001.daml" },
64                 {
65             "testing/arp/onts/ont22",
66                 "http://grcinet.grci.com/maria/www/codipsite/Onto/WebDirectory/WebDirectory_V27Aug2001.daml" },
67                 {
68             "testing/arp/onts/ont23",
69                 "http://grcinet.grci.com/maria/www/CodipSite/Onto/WebSite/WebSiteOntology_V27Aug2001.daml" },
70                 {
71             "testing/arp/onts/ont26",
72                 "http://isx.com/~phaglic/horus/daml/onts/englishpubont.daml" },
73                 {
74             "testing/arp/onts/ont27",
75                 "http://ksl.stanford.edu/projects/DAML/chimaera-jtp-cardinality-test1.daml" },
76                 {
77             "testing/arp/onts/ont28",
78                 "http://mnemosyne.umd.edu/~aelkiss/daml/serial1.2.daml" },
79             /*
80             {
81                 "testing/arp/onts/ont71",
82                     "http://orlando.drc.com/daml/Ontology/TaskListUJTLScenario/current/" },
83 */

84                 {
85             "testing/arp/onts/ont29",
86                 "http://mnemosyne.umd.edu/~aelkiss/weather-ont.daml" },
87                 {
88             "testing/arp/onts/ont30",
89                 "http://mr.teknowledge.com/DAML/ArtOntology.daml" },
90                 {
91             "testing/arp/onts/ont31",
92                 "http://mr.teknowledge.com/daml/Homeworks/HomeWork1/ResearchProjectOntology.daml" },
93                 {
94             "testing/arp/onts/ont32",
95                 "http://mr.teknowledge.com/daml/homeworks/HomeWork3/BriefingOntology.daml" },
96                 {
97             "testing/arp/onts/ont34",
98                 "http://mr.teknowledge.com/DAML/Imaging.daml" },
99                 {
100             "testing/arp/onts/ont35",
101                 "http://mr.teknowledge.com/daml/ontologies/ImageFingerprinting/2001/04/BriefingsOntology.daml" },
102                 {
103             "testing/arp/onts/ont36",
104                 "http://mr.teknowledge.com/daml/ontologies/ImageFingerprinting/2001/04/ImageFingerprintingOntology-web.daml" },
105                 {
106             "testing/arp/onts/ont37",
107                 "http://mr.teknowledge.com/daml/ontologies/ImageFingerprinting/2001/04/ImageFingerprintsOntology-briefings.daml" },
108                 {
109             "testing/arp/onts/ont38",
110                 "http://mr.teknowledge.com/DAML/pptOntology.daml" },
111                 {
112             "testing/arp/onts/ont39",
113                 "http://ontobroker.semanticweb.org/ontos/compontos/tourism_I1.daml" },
114                 {
115             "testing/arp/onts/ont40",
116                 "http://ontobroker.semanticweb.org/ontos/compontos/tourism_I2.daml" },
117                 {
118             "testing/arp/onts/ont41",
119                 "http://ontobroker.semanticweb.org/ontos/compontos/tourism_I3.daml" },
120                 {
121             "testing/arp/onts/ont42",
122                 "http://ontobroker.semanticweb.org/ontos/compontos/tourism_I4.daml" },
123                 {
124             "testing/arp/onts/ont43",
125                 "http://ontobroker.semanticweb.org/ontos/compontos/tourism_II1.daml" },
126                 {
127             "testing/arp/onts/ont44",
128                 "http://ontobroker.semanticweb.org/ontos/compontos/tourism_II2.daml" },
129                 {
130             "testing/arp/onts/ont45",
131                 "http://ontobroker.semanticweb.org/ontos/compontos/tourism_II3.daml" },
132                 {
133             "testing/arp/onts/ont46",
134                 "http://ontobroker.semanticweb.org/ontos/compontos/tourism_II4.daml" },
135                 {
136             "testing/arp/onts/ont47",
137                 "http://ontobroker.semanticweb.org/ontos/compontos/tourism_III1.daml" },
138                 {
139             "testing/arp/onts/ont48",
140                 "http://ontobroker.semanticweb.org/ontos/compontos/tourism_III2.daml" },
141                 {
142             "testing/arp/onts/ont49",
143                 "http://ontobroker.semanticweb.org/ontos/compontos/tourism_III3.daml" },
144                 {
145             "testing/arp/onts/ont50",
146                 "http://ontobroker.semanticweb.org/ontos/compontos/tourism_III4.daml" },
147                 {
148             "testing/arp/onts/ont53",
149                 "http://opencyc.sourceforge.net/daml/cyc-transportation.daml" },
150                 {
151             "testing/arp/onts/ont54",
152                 "http://opencyc.sourceforge.net/daml/cyc.daml" },
153                 {
154             "testing/arp/onts/ont55",
155                 "http://opencyc.sourceforge.net/daml/naics" },
156                 {
157             "testing/arp/onts/ont56",
158                 "http://orlando.drc.com/daml/ontology/Bibliographic/current/" },
159                 {
160             "testing/arp/onts/ont57",
161                 "http://orlando.drc.com/daml/Ontology/Commercial/Shipping/current/" },
162                 {
163             "testing/arp/onts/ont58",
164                 "http://orlando.drc.com/daml/Ontology/Condition/UJTL/v4.0/current/" },
165                 {
166             "testing/arp/onts/ont59",
167                 "http://orlando.drc.com/daml/Ontology/DAML-extension/current/" },
168                 {
169             "testing/arp/onts/ont60",
170                 "http://orlando.drc.com/daml/ontology/DC/current/" },
171                 {
172             "testing/arp/onts/ont61",
173                 "http://orlando.drc.com/daml/ontology/Fugitive/current/" },
174                 {
175             "testing/arp/onts/ont62",
176                 "http://orlando.drc.com/daml/Ontology/Genealogy/current/" },
177                 {
178             "testing/arp/onts/ont63",
179                 "http://orlando.drc.com/daml/ontology/Glossary/current/" },
180                 {
181             "testing/arp/onts/ont64",
182                 "http://orlando.drc.com/daml/Ontology/GPS/Coordinates/current/" },
183                 {
184             "testing/arp/onts/ont65",
185                 "http://orlando.drc.com/daml/Ontology/Intelligence/Report/current/" },
186                 {
187             "testing/arp/onts/ont66",
188                 "http://orlando.drc.com/daml/ontology/Locator/current/" },
189                 {
190             "testing/arp/onts/ont67",
191                 "http://orlando.drc.com/daml/ontology/Organization/current/" },
192                 {
193             "testing/arp/onts/ont68",
194                 "http://orlando.drc.com/daml/ontology/Person/current/" },
195                 {
196             "testing/arp/onts/ont69",
197                 "http://orlando.drc.com/daml/Ontology/POC/current/" },
198                 {
199             "testing/arp/onts/ont70",
200                 "http://orlando.drc.com/daml/ontology/TaskList/current/" },
201                 /*
202                 {
203             "testing/arp/onts/ont71",
204                 "http://orlando.drc.com/daml/Ontology/TaskListUJTLScenario/current/" },
205                 {
206             "testing/arp/onts/ont72",
207                 "http://orlando.drc.com/daml/Ontology/Thesaurus/CALL/current/" },
208                 {
209             "testing/arp/onts/ont73",
210                 "http://orlando.drc.com/daml/ontology/UniversalProperty/current/" },
211                 {
212             "testing/arp/onts/ont74",
213                 "http://orlando.drc.com/daml/ontology/VES/current/" },
214                 {
215             "testing/arp/onts/ont75",
216                 "http://orlando.drc.com/SemanticWeb/DAML/Ontology/dc" },
217                 {
218             "testing/arp/onts/ont76",
219                 "http://orlando.drc.com/SemanticWeb/DAML/Ontology/DIS/Entity/Platform/Land" },
220                 {
221             "testing/arp/onts/ont77",
222                 "http://orlando.drc.com/SemanticWeb/DAML/Ontology/Goal-Objective" },
223                 {
224             "testing/arp/onts/ont78",
225                 "http://orlando.drc.com/SemanticWeb/DAML/Ontology/NationalSecurity" },
226                 {
227             "testing/arp/onts/ont79",
228                 "http://orlando.drc.com/SemanticWeb/DAML/Ontology/VES" },
229                 {
230             "testing/arp/onts/ont80",
231                 "http://orlando.drc.com/SemanticWeb/OWL/Ontology/spaceshuttle/crew" },
232                 {
233             "testing/arp/onts/ont81",
234                 "http://orlando.drc.com/SemanticWeb/OWL/Ontology/spaceshuttle/mission" },
235                 {
236             "testing/arp/onts/ont83",
237                 "http://phd1.cs.yale.edu:8080/ontologies/wsdl-ont.daml" },
238                 {
239             "testing/arp/onts/ont84",
240                 "http://phd1.cs.yale.edu:8080/umls/UMLSinDAML/NET/SRDEF.daml" },
241                 {
242             "testing/arp/onts/ont85",
243                 "http://phd1.cs.yale.edu:8080/umls/UMLSinDAML/NET/SRSTR.daml" },
244                 {
245             "testing/arp/onts/ont86",
246                 "http://projects.teknowledge.com/DAML/DynamicOntology1.daml" },
247                 {
248             "testing/arp/onts/ont87",
249                 "http://projects.teknowledge.com/DAML/Ontology.daml" },
250                 {
251             "testing/arp/onts/ont88", "http://purl.org/net/swn" }, {
252             "testing/arp/onts/ont89", "http://purl.org/rss/1.0/" }, {
253             "testing/arp/onts/ont90",
254                 "http://reliant.teknowledge.com/DAML/SUO.daml" },
255                 {
256             "testing/arp/onts/ont91",
257                 "http://ubot.lockheedmartin.com/ubot/2001/08/baby-shoe/shoeproj-ont.daml" },
258                 {
259             "testing/arp/onts/ont92",
260                 "http://ubot.lockheedmartin.com/ubot/2001/08/extraction-ont.daml" },
261                 {
262             "testing/arp/onts/ont93",
263                 "http://ubot.lockheedmartin.com/ubot/2001/08/ubot-ont.daml" },
264                 {
265             "testing/arp/onts/ont94",
266                 "http://www.ai.sri.com/daml/ontologies/sri-basic/1-0/Awards.daml" },
267                 {
268             "testing/arp/onts/ont95",
269                 "http://www.ai.sri.com/daml/ontologies/sri-basic/1-0/Bio.daml" },
270                 {
271             "testing/arp/onts/ont96",
272                 "http://www.ai.sri.com/daml/ontologies/sri-basic/1-0/ContactInfo.daml" },
273                 {
274             "testing/arp/onts/ont97",
275                 "http://www.ai.sri.com/daml/ontologies/sri-basic/1-0/Course.daml" },
276                 {
277             "testing/arp/onts/ont98",
278                 "http://www.ai.sri.com/daml/ontologies/sri-basic/1-0/Date.daml" },
279                 {
280             "testing/arp/onts/ont99",
281                 "http://www.ai.sri.com/daml/ontologies/sri-basic/1-0/Image.daml" },
282                 {
283             "testing/arp/onts/ont100",
284                 "http://www.ai.sri.com/daml/ontologies/sri-basic/1-0/Organization.daml" },
285                 {
286             "testing/arp/onts/ont101",
287                 "http://www.ai.sri.com/daml/ontologies/sri-basic/1-0/Person.daml" },
288                 {
289             "testing/arp/onts/ont102",
290                 "http://www.ai.sri.com/daml/ontologies/sri-basic/1-0/ProfessionalExperienceAndEducation.daml" },
291                 {
292             "testing/arp/onts/ont103",
293                 "http://www.ai.sri.com/daml/ontologies/sri-basic/1-0/Project.daml" },
294                 {
295             "testing/arp/onts/ont104",
296                 "http://www.ai.sri.com/daml/ontologies/sri-basic/1-0/Publication.daml" },
297                 {
298             "testing/arp/onts/ont105",
299                 "http://www.ai.sri.com/daml/ontologies/sri-basic/1-0/Researcher.daml" },
300                 {
301             "testing/arp/onts/ont106",
302                 "http://www.ai.sri.com/daml/ontologies/sri-basic/1-0/Time.daml" },
303                 {
304             "testing/arp/onts/ont107",
305                 "http://www.ai.sri.com/daml/ontologies/sri-basic/1-0/Topic.daml" },
306                 {
307             "testing/arp/onts/ont108",
308                 "http://www.cs.man.ac.uk/~horrocks/Ontologies/tambis.daml" },
309                 {
310             "testing/arp/onts/ont109",
311                 "http://www.cs.umbc.edu/~yzou1/daml/acl.daml" },
312                 {
313             "testing/arp/onts/ont110",
314                 "http://www.cs.umbc.edu/~yzou1/daml/acldaml.daml" },
315                 {
316             "testing/arp/onts/ont111",
317                 "http://www.cs.umd.edu/projects/plus/DAML/onts/beer1.0.daml" },
318                 {
319             "testing/arp/onts/ont112",
320                 "http://www.cs.umd.edu/projects/plus/DAML/onts/cs1.0.daml" },
321                 {
322             "testing/arp/onts/ont113",
323                 "http://www.cs.umd.edu/projects/plus/DAML/onts/cs1.1.daml" },
324                 {
325             "testing/arp/onts/ont114",
326                 "http://www.cs.umd.edu/projects/plus/DAML/onts/docmnt1.0.daml" },
327                 {
328             "testing/arp/onts/ont115",
329                 "http://www.cs.umd.edu/projects/plus/DAML/onts/general1.0.daml" },
330                 {
331             "testing/arp/onts/ont116",
332                 "http://www.cs.umd.edu/projects/plus/DAML/onts/personal1.0.daml" },
333                 {
334             "testing/arp/onts/ont117",
335                 "http://www.cs.umd.edu/projects/plus/DAML/onts/tseont.daml" },
336                 {
337             "testing/arp/onts/ont118",
338                 "http://www.cs.umd.edu/projects/plus/DAML/onts/univ1.0.daml" },
339                 {
340             "testing/arp/onts/ont119",
341                 "http://www.cs.umd.edu/~golbeck/daml/baseball.daml" },
342                 {
343             "testing/arp/onts/ont120",
344                 "http://www.cs.umd.edu/~golbeck/daml/running.daml" },
345                 {
346             "testing/arp/onts/ont121",
347                 "http://www.cs.umd.edu/~golbeck/daml/vegetarian.daml" },
348                 {
349             "testing/arp/onts/ont122",
350                 "http://www.cs.yale.edu/~dvm/daml/agent-ont.daml" },
351                 {
352             "testing/arp/onts/ont123",
353                 "http://www.cs.yale.edu/~dvm/daml/bib-ont.daml" },
354                 {
355             "testing/arp/onts/ont124",
356                 "http://www.cs.yale.edu/~dvm/daml/drsonto.daml" },
357                 {
358             "testing/arp/onts/ont125",
359                 "http://www.cs.yale.edu/~dvm/daml/exp-ont.daml" },
360                 {
361             "testing/arp/onts/ont126",
362                 "http://www.cs.yale.edu/~dvm/daml/pddlonto.daml" },
363                 {
364             "testing/arp/onts/ont127",
365                 "http://www.cyc.com/2002/04/08/cyc.daml" },
366                 {
367             "testing/arp/onts/ont129",
368                 "http://www.daml.org/2000/10/daml-ont" },
369                 {
370             "testing/arp/onts/ont130",
371                 "http://www.daml.org/2000/12/daml+oil" },
372                 {
373             "testing/arp/onts/ont131",
374                 "http://www.daml.org/2001/01/gedcom/gedcom.daml" },
375                 {
376             "testing/arp/onts/ont132",
377                 "http://www.daml.org/2001/02/geofile/geofile-ont.daml" },
378                 {
379             "testing/arp/onts/ont133",
380                 "http://www.daml.org/2001/02/projectplan/projectplan.daml" },
381                 {
382             "testing/arp/onts/ont134",
383                 "http://www.daml.org/2001/03/daml+oil" },
384                 {
385             "testing/arp/onts/ont135",
386                 "http://www.daml.org/2001/06/itinerary/itinerary-ont.daml" },
387                 {
388             "testing/arp/onts/ont136",
389                 "http://www.daml.org/2001/06/map/map-ont" },
390                 {
391             "testing/arp/onts/ont137",
392                 "http://www.daml.org/2001/08/baseball/baseball-ont" },
393                 {
394             "testing/arp/onts/ont138",
395                 "http://www.daml.org/2001/10/agenda/agenda-ont" },
396                 {
397             "testing/arp/onts/ont139",
398                 "http://www.daml.org/2001/12/factbook/factbook-ont" },
399                 {
400             "testing/arp/onts/ont140",
401                 "http://www.daml.org/ontologies/ontologies-ont" },
402                 {
403             "testing/arp/onts/ont141",
404                 "http://www.daml.org/projects/integration/projects-20010811" },
405                 {
406             "testing/arp/onts/ont142",
407                 "http://www.daml.org/tools/tools-ont" },
408                 {
409             "testing/arp/onts/ont143",
410                 "http://www.daml.ri.cmu.edu/ont/AirportCodes.daml" },
411                 {
412             "testing/arp/onts/ont144",
413                 "http://www.daml.ri.cmu.edu/ont/homework/atlas-cmu.daml" },
414                 {
415             "testing/arp/onts/ont145",
416                 "http://www.daml.ri.cmu.edu/ont/homework/atlas-date.daml" },
417                 {
418             "testing/arp/onts/ont146",
419                 "http://www.daml.ri.cmu.edu/ont/homework/atlas-employment_categories.daml" },
420                 {
421             "testing/arp/onts/ont147",
422                 "http://www.daml.ri.cmu.edu/ont/homework/atlas-publications.daml" },
423                 {
424             "testing/arp/onts/ont148",
425                 "http://www.daml.ri.cmu.edu/ont/homework/cmu-ri-center-ont.daml" },
426                 {
427             "testing/arp/onts/ont149",
428                 "http://www.daml.ri.cmu.edu/ont/homework/cmu-ri-courses-ont.daml" },
429                 {
430             "testing/arp/onts/ont150",
431                 "http://www.daml.ri.cmu.edu/ont/homework/cmu-ri-employmenttypes-ont.daml" },
432                 {
433             "testing/arp/onts/ont151",
434                 "http://www.daml.ri.cmu.edu/ont/homework/cmu-ri-labgroup-ont.daml" },
435                 {
436             "testing/arp/onts/ont152",
437                 "http://www.daml.ri.cmu.edu/ont/homework/cmu-ri-people-ont.daml" },
438                 {
439             "testing/arp/onts/ont153",
440                 "http://www.daml.ri.cmu.edu/ont/homework/cmu-ri-project-ont.daml" },
441                 {
442             "testing/arp/onts/ont154",
443                 "http://www.daml.ri.cmu.edu/ont/homework/cmu-ri-publications-ont.daml" },
444                 {
445             "testing/arp/onts/ont155",
446                 "http://www.daml.ri.cmu.edu/ont/USCity.daml" },
447                 {
448             "testing/arp/onts/ont156",
449                 "http://www.daml.ri.cmu.edu/ont/USRegionState.daml" },
450                 {
451             "testing/arp/onts/ont157",
452                 "http://www.davincinetbook.com:8080/daml/rdf/homework3/projectGutenbergOnt.daml" },
453                 {
454             "testing/arp/onts/ont161",
455                 "http://www.isi.edu/webscripter/bibtex.o.daml" },
456                 {
457             "testing/arp/onts/ont162",
458                 "http://www.isi.edu/webscripter/communityreview/abstract-review-o" },
459                 {
460             "testing/arp/onts/ont163",
461                 "http://www.isi.edu/webscripter/communityreview/scientific-review-o" },
462                 {
463             "testing/arp/onts/ont164",
464                 "http://www.isi.edu/webscripter/division.o.daml" },
465                 {
466             "testing/arp/onts/ont165",
467                 "http://www.isi.edu/webscripter/document.o.daml" },
468                 {
469             "testing/arp/onts/ont166",
470                 "http://www.isi.edu/webscripter/event.o.daml" },
471                 {
472             "testing/arp/onts/ont167",
473                 "http://www.isi.edu/webscripter/person.o.daml" },
474                 {
475             "testing/arp/onts/ont168",
476                 "http://www.isi.edu/webscripter/project.o.daml" },
477                 {
478             "testing/arp/onts/ont169",
479                 "http://www.isi.edu/webscripter/publication.o.daml" },
480                 {
481             "testing/arp/onts/ont170",
482                 "http://www.isi.edu/webscripter/snapshot.o.daml" },
483                 {
484             "testing/arp/onts/ont171",
485                 "http://www.isi.edu/webscripter/todo.o.daml" },
486                 {
487             "testing/arp/onts/ont172",
488                 "http://www.kestrel.edu/DAML/2000/12/CAPACITY.daml" },
489                 {
490             "testing/arp/onts/ont173",
491                 "http://www.kestrel.edu/DAML/2000/12/DEMAND.daml" },
492                 {
493             "testing/arp/onts/ont174",
494                 "http://www.kestrel.edu/DAML/2000/12/instances.daml" },
495                 {
496             "testing/arp/onts/ont175",
497                 "http://www.kestrel.edu/DAML/2000/12/OPERATION.daml" },
498                 {
499             "testing/arp/onts/ont176",
500                 "http://www.kestrel.edu/DAML/2000/12/RESOURCE.daml" },
501                 {
502             "testing/arp/onts/ont177",
503                 "http://www.kestrel.edu/DAML/2000/12/TIME.daml" },
504                 {
505             "testing/arp/onts/ont178",
506                 "http://www.ksl.stanford.edu/projects/DAML/ksl-daml-desc.daml" },
507                 {
508             "testing/arp/onts/ont179",
509                 "http://www.ksl.stanford.edu/projects/DAML/ksl-daml-instances.daml" },
510                 {
511             "testing/arp/onts/ont181",
512                 "http://www.lgi2p.ema.fr/~ranwezs/ontologies/musicV1.0.daml" },
513                 {
514             "testing/arp/onts/ont182",
515                 "http://www.lgi2p.ema.fr/~ranwezs/ontologies/soccerV2.0.daml" },
516                 {
517             "testing/arp/onts/ont183",
518                 "http://www.semanticweb.org/library/wordnet/wordnet-20000620.rdfs" },
519                 {
520             "testing/arp/onts/ont184",
521                 "http://www.semanticweb.org/ontologies/swrc-onto-2000-09-10.daml" },
522                 {
523             "testing/arp/onts/ont185",
524                 "http://www.w3.org/2000/10/annotation-ns#" },
525                 {
526             "testing/arp/onts/ont186",
527                 "http://www.w3.org/2000/10/annotationType#" },
528                 {
529             "testing/arp/onts/ont187",
530                 "http://www.w3.org/2000/10/swap/infoset/infoset-diagram.rdf" },
531                 {
532             "testing/arp/onts/ont188",
533                 "http://www.w3.org/2000/10/swap/pim/contact.rdf" },
534                 {
535             "testing/arp/onts/ont189",
536                 "http://www.w3.org/2000/10/swap/pim/doc.rdf" },
537                 {
538             "testing/arp/onts/ont190",
539                 "http://www.w3.org/2001/03/earl/0.95.rdf" },
540                 {
541             "testing/arp/onts/ont191", "http://www.w3.org/2001/03/thread" }, {
542             "testing/arp/onts/ont192",
543                 "http://www.w3.org/2001/05/rdf-ds/datastore-schema" },
544                 */

545                 };
546     static String JavaDoc files[][];
547     static int totalLength;
548     static int totalTime;
549     static public void main(String JavaDoc args[]) {
550         int k;
551         files = new String JavaDoc[20][];
552         for (int ii = 0;
553             ii + files.length <= allFiles.length;
554             ii += files.length) {
555             for (k = 0; k < files.length; k++)
556                 files[k] = allFiles[ii+k];
557             totalLength = 0;
558             double s1 = speed();
559             double s2 = speed();
560             System.err.println(
561                     files[0][0]
562                         + "\t"
563                         + totalLength
564                         + "\t"
565                         + s1 +"\t" + s2
566                         + "\t"
567                         + files[0][1]);
568             
569         }
570         System.err.println("Total time: " + totalTime + " ms");
571     }
572     static byte[][] load() {
573         byte rslt[][] = new byte[files.length][];
574         for (int i = 0; i < files.length; i++) {
575             File f = new File(files[i][0]);
576             totalLength += (int) f.length();
577             if (f.length() == 0)
578                 continue;
579             rslt[i] = new byte[(int) f.length()];
580             try {
581                 InputStream in = new FileInputStream(f);
582                 in.read(rslt[i]);
583                 in.close();
584             } catch (IOException e) {
585                 System.err.println(files[i][1] + " " + e.getMessage());
586             }
587         }
588         return rslt;
589     }
590     static int sum(byte array[]) {
591         int r = 0;
592         if (array == null)
593             return 0;
594         for (int i = 0; i < array.length; i++)
595             r += array[i];
596         return r;
597     }
598     static double speed() {
599         boolean realData = false;
600         byte data[][] = load();
601         int s = 0;
602         long startRead = System.currentTimeMillis();
603         for (int i = 0; i < files.length; i++)
604             for (int k = 0; k < 50; k++)
605                 s += sum(data[i]);
606         long startTest = System.currentTimeMillis();
607         for (int i = 0; i < files.length; i++)
608             try {
609                 if (data[i] == null)
610                     continue;
611                 realData = true;
612                 parseRDF(new ByteArrayInputStream(data[i]), files[i][1]);
613             } catch (IOException e) {
614                 System.err.println("byteArray " + e.getMessage());
615             }
616         long endTime = System.currentTimeMillis();
617         totalTime += (int)(endTime-startTest);
618         if (!realData)
619             return Double.NaN;
620         return (double) (endTime - startTest)
621             / (double) (startTest - startRead);
622     }
623     static void parseRDF(InputStream in, String JavaDoc base) throws IOException {
624         ErrorHandler JavaDoc eh = new ErrorHandler JavaDoc() {
625             public void warning(SAXParseException JavaDoc e) {
626             }
627             public void error(SAXParseException JavaDoc e) {
628             }
629             public void fatalError(SAXParseException JavaDoc e) {
630             }
631         };
632         InputStream oldIn = System.in;
633         InputStream ntIn = null;
634         try {
635             System.setIn(in);
636             NTriple.mainEh(
637                 new String JavaDoc[] { "-b", base, "-t" },
638                 eh, null);
639
640         } catch (Exception JavaDoc e) {
641             System.err.println(base + " " + e.toString());
642         } finally {
643             System.setIn(oldIn);
644             if (ntIn != null)
645                 ntIn.close();
646         }
647     }
648
649 }
650 /*
651  * (c) Copyright 2003, 2004, 2005 Hewlett-Packard Development Company, LP
652  * All rights reserved.
653  *
654  * Redistribution and use in source and binary forms, with or without
655  * modification, are permitted provided that the following conditions
656  * are met:
657  * 1. Redistributions of source code must retain the above copyright
658  * notice, this list of conditions and the following disclaimer.
659  * 2. Redistributions in binary form must reproduce the above copyright
660  * notice, this list of conditions and the following disclaimer in the
661  * documentation and/or other materials provided with the distribution.
662  * 3. The name of the author may not be used to endorse or promote products
663  * derived from this software without specific prior written permission.
664
665  * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
666  * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
667  * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
668  * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
669  * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
670  * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
671  * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
672  * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
673  * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
674  * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
675  */
Popular Tags