001: /*
002: * (c) Copyright 2003, 2004, 2005, 2006, 2007, 2008 Hewlett-Packard Development Company, LP
003: * See end of file.
004: */
005: package com.hp.hpl.jena.rdf.arp.test;
006:
007: import java.io.ByteArrayInputStream;
008: import java.io.File;
009: import java.io.FileInputStream;
010: import java.io.IOException;
011: import java.io.InputStream;
012:
013: import org.xml.sax.ErrorHandler;
014: import org.xml.sax.SAXParseException;
015:
016: import com.hp.hpl.jena.rdf.arp.NTriple;
017:
018: class Performance {
019: static String allFiles[][] = {
020: { "testing/arp/onts/ont1",
021: "http://cicho0.tripod.com/cs_Courses_ont" },
022: { "testing/arp/onts/ont2",
023: "http://cicho0.tripod.com/cs_LecturingStaff_ont" },
024: { "testing/arp/onts/ont3",
025: "http://cicho0.tripod.com/cs_Staff_ont" },
026: { "testing/arp/onts/ont4",
027: "http://cicho0.tripod.com/Dep_of_Computer_Science" },
028: { "testing/arp/onts/ont10",
029: "http://daml.umbc.edu/ontologies/calendar-ont.daml" },
030: { "testing/arp/onts/ont11",
031: "http://daml.umbc.edu/ontologies/classification.daml" },
032: { "testing/arp/onts/ont12",
033: "http://daml.umbc.edu/ontologies/dreggie-ont.daml" },
034: { "testing/arp/onts/ont13",
035: "http://daml.umbc.edu/ontologies/profile-ont.daml" },
036: { "testing/arp/onts/ont14",
037: "http://daml.umbc.edu/ontologies/talk-ont.daml" },
038: { "testing/arp/onts/ont15",
039: "http://daml.umbc.edu/ontologies/topic-ont.daml" },
040: { "testing/arp/onts/ont16",
041: "http://daml.umbc.edu/ontologies/trust-ont.daml" },
042: { "testing/arp/onts/ont17",
043: "http://derpi.tuwien.ac.at/~andrei/cerif-rdf-dc-mn.daml" },
044: { "testing/arp/onts/ont18",
045: "http://edge.mcs.drexel.edu/MUG/2001/05/16/sbf.daml" },
046: {
047: "testing/arp/onts/ont19",
048: "http://grcinet.grci.com/maria/www/codipsite/Onto/DublinCore/DublinCore_V27Aug2001.daml" },
049: {
050: "testing/arp/onts/ont20",
051: "http://grcinet.grci.com/maria/www/codipsite/Onto/Project/ProjectOntology_V26Jul2001.daml" },
052: {
053: "testing/arp/onts/ont21",
054: "http://grcinet.grci.com/maria/www/codipsite/Onto/TMD/TMDOntology_V27Aug2001.daml" },
055: {
056: "testing/arp/onts/ont22",
057: "http://grcinet.grci.com/maria/www/codipsite/Onto/WebDirectory/WebDirectory_V27Aug2001.daml" },
058: {
059: "testing/arp/onts/ont23",
060: "http://grcinet.grci.com/maria/www/CodipSite/Onto/WebSite/WebSiteOntology_V27Aug2001.daml" },
061: { "testing/arp/onts/ont26",
062: "http://isx.com/~phaglic/horus/daml/onts/englishpubont.daml" },
063: { "testing/arp/onts/ont27",
064: "http://ksl.stanford.edu/projects/DAML/chimaera-jtp-cardinality-test1.daml" },
065: { "testing/arp/onts/ont28",
066: "http://mnemosyne.umd.edu/~aelkiss/daml/serial1.2.daml" },
067: /*
068: {
069: "testing/arp/onts/ont71",
070: "http://orlando.drc.com/daml/Ontology/TaskListUJTLScenario/current/" },
071: */
072: { "testing/arp/onts/ont29",
073: "http://mnemosyne.umd.edu/~aelkiss/weather-ont.daml" },
074: { "testing/arp/onts/ont30",
075: "http://mr.teknowledge.com/DAML/ArtOntology.daml" },
076: {
077: "testing/arp/onts/ont31",
078: "http://mr.teknowledge.com/daml/Homeworks/HomeWork1/ResearchProjectOntology.daml" },
079: { "testing/arp/onts/ont32",
080: "http://mr.teknowledge.com/daml/homeworks/HomeWork3/BriefingOntology.daml" },
081: { "testing/arp/onts/ont34",
082: "http://mr.teknowledge.com/DAML/Imaging.daml" },
083: {
084: "testing/arp/onts/ont35",
085: "http://mr.teknowledge.com/daml/ontologies/ImageFingerprinting/2001/04/BriefingsOntology.daml" },
086: {
087: "testing/arp/onts/ont36",
088: "http://mr.teknowledge.com/daml/ontologies/ImageFingerprinting/2001/04/ImageFingerprintingOntology-web.daml" },
089: {
090: "testing/arp/onts/ont37",
091: "http://mr.teknowledge.com/daml/ontologies/ImageFingerprinting/2001/04/ImageFingerprintsOntology-briefings.daml" },
092: { "testing/arp/onts/ont38",
093: "http://mr.teknowledge.com/DAML/pptOntology.daml" },
094: { "testing/arp/onts/ont39",
095: "http://ontobroker.semanticweb.org/ontos/compontos/tourism_I1.daml" },
096: { "testing/arp/onts/ont40",
097: "http://ontobroker.semanticweb.org/ontos/compontos/tourism_I2.daml" },
098: { "testing/arp/onts/ont41",
099: "http://ontobroker.semanticweb.org/ontos/compontos/tourism_I3.daml" },
100: { "testing/arp/onts/ont42",
101: "http://ontobroker.semanticweb.org/ontos/compontos/tourism_I4.daml" },
102: { "testing/arp/onts/ont43",
103: "http://ontobroker.semanticweb.org/ontos/compontos/tourism_II1.daml" },
104: { "testing/arp/onts/ont44",
105: "http://ontobroker.semanticweb.org/ontos/compontos/tourism_II2.daml" },
106: { "testing/arp/onts/ont45",
107: "http://ontobroker.semanticweb.org/ontos/compontos/tourism_II3.daml" },
108: { "testing/arp/onts/ont46",
109: "http://ontobroker.semanticweb.org/ontos/compontos/tourism_II4.daml" },
110: { "testing/arp/onts/ont47",
111: "http://ontobroker.semanticweb.org/ontos/compontos/tourism_III1.daml" },
112: { "testing/arp/onts/ont48",
113: "http://ontobroker.semanticweb.org/ontos/compontos/tourism_III2.daml" },
114: { "testing/arp/onts/ont49",
115: "http://ontobroker.semanticweb.org/ontos/compontos/tourism_III3.daml" },
116: { "testing/arp/onts/ont50",
117: "http://ontobroker.semanticweb.org/ontos/compontos/tourism_III4.daml" },
118: { "testing/arp/onts/ont53",
119: "http://opencyc.sourceforge.net/daml/cyc-transportation.daml" },
120: { "testing/arp/onts/ont54",
121: "http://opencyc.sourceforge.net/daml/cyc.daml" },
122: { "testing/arp/onts/ont55",
123: "http://opencyc.sourceforge.net/daml/naics" },
124: { "testing/arp/onts/ont56",
125: "http://orlando.drc.com/daml/ontology/Bibliographic/current/" },
126: { "testing/arp/onts/ont57",
127: "http://orlando.drc.com/daml/Ontology/Commercial/Shipping/current/" },
128: { "testing/arp/onts/ont58",
129: "http://orlando.drc.com/daml/Ontology/Condition/UJTL/v4.0/current/" },
130: { "testing/arp/onts/ont59",
131: "http://orlando.drc.com/daml/Ontology/DAML-extension/current/" },
132: { "testing/arp/onts/ont60",
133: "http://orlando.drc.com/daml/ontology/DC/current/" },
134: { "testing/arp/onts/ont61",
135: "http://orlando.drc.com/daml/ontology/Fugitive/current/" },
136: { "testing/arp/onts/ont62",
137: "http://orlando.drc.com/daml/Ontology/Genealogy/current/" },
138: { "testing/arp/onts/ont63",
139: "http://orlando.drc.com/daml/ontology/Glossary/current/" },
140: { "testing/arp/onts/ont64",
141: "http://orlando.drc.com/daml/Ontology/GPS/Coordinates/current/" },
142: { "testing/arp/onts/ont65",
143: "http://orlando.drc.com/daml/Ontology/Intelligence/Report/current/" },
144: { "testing/arp/onts/ont66",
145: "http://orlando.drc.com/daml/ontology/Locator/current/" },
146: { "testing/arp/onts/ont67",
147: "http://orlando.drc.com/daml/ontology/Organization/current/" },
148: { "testing/arp/onts/ont68",
149: "http://orlando.drc.com/daml/ontology/Person/current/" },
150: { "testing/arp/onts/ont69",
151: "http://orlando.drc.com/daml/Ontology/POC/current/" },
152: { "testing/arp/onts/ont70",
153: "http://orlando.drc.com/daml/ontology/TaskList/current/" },
154: /*
155: {
156: "testing/arp/onts/ont71",
157: "http://orlando.drc.com/daml/Ontology/TaskListUJTLScenario/current/" },
158: {
159: "testing/arp/onts/ont72",
160: "http://orlando.drc.com/daml/Ontology/Thesaurus/CALL/current/" },
161: {
162: "testing/arp/onts/ont73",
163: "http://orlando.drc.com/daml/ontology/UniversalProperty/current/" },
164: {
165: "testing/arp/onts/ont74",
166: "http://orlando.drc.com/daml/ontology/VES/current/" },
167: {
168: "testing/arp/onts/ont75",
169: "http://orlando.drc.com/SemanticWeb/DAML/Ontology/dc" },
170: {
171: "testing/arp/onts/ont76",
172: "http://orlando.drc.com/SemanticWeb/DAML/Ontology/DIS/Entity/Platform/Land" },
173: {
174: "testing/arp/onts/ont77",
175: "http://orlando.drc.com/SemanticWeb/DAML/Ontology/Goal-Objective" },
176: {
177: "testing/arp/onts/ont78",
178: "http://orlando.drc.com/SemanticWeb/DAML/Ontology/NationalSecurity" },
179: {
180: "testing/arp/onts/ont79",
181: "http://orlando.drc.com/SemanticWeb/DAML/Ontology/VES" },
182: {
183: "testing/arp/onts/ont80",
184: "http://orlando.drc.com/SemanticWeb/OWL/Ontology/spaceshuttle/crew" },
185: {
186: "testing/arp/onts/ont81",
187: "http://orlando.drc.com/SemanticWeb/OWL/Ontology/spaceshuttle/mission" },
188: {
189: "testing/arp/onts/ont83",
190: "http://phd1.cs.yale.edu:8080/ontologies/wsdl-ont.daml" },
191: {
192: "testing/arp/onts/ont84",
193: "http://phd1.cs.yale.edu:8080/umls/UMLSinDAML/NET/SRDEF.daml" },
194: {
195: "testing/arp/onts/ont85",
196: "http://phd1.cs.yale.edu:8080/umls/UMLSinDAML/NET/SRSTR.daml" },
197: {
198: "testing/arp/onts/ont86",
199: "http://projects.teknowledge.com/DAML/DynamicOntology1.daml" },
200: {
201: "testing/arp/onts/ont87",
202: "http://projects.teknowledge.com/DAML/Ontology.daml" },
203: {
204: "testing/arp/onts/ont88", "http://purl.org/net/swn" }, {
205: "testing/arp/onts/ont89", "http://purl.org/rss/1.0/" }, {
206: "testing/arp/onts/ont90",
207: "http://reliant.teknowledge.com/DAML/SUO.daml" },
208: {
209: "testing/arp/onts/ont91",
210: "http://ubot.lockheedmartin.com/ubot/2001/08/baby-shoe/shoeproj-ont.daml" },
211: {
212: "testing/arp/onts/ont92",
213: "http://ubot.lockheedmartin.com/ubot/2001/08/extraction-ont.daml" },
214: {
215: "testing/arp/onts/ont93",
216: "http://ubot.lockheedmartin.com/ubot/2001/08/ubot-ont.daml" },
217: {
218: "testing/arp/onts/ont94",
219: "http://www.ai.sri.com/daml/ontologies/sri-basic/1-0/Awards.daml" },
220: {
221: "testing/arp/onts/ont95",
222: "http://www.ai.sri.com/daml/ontologies/sri-basic/1-0/Bio.daml" },
223: {
224: "testing/arp/onts/ont96",
225: "http://www.ai.sri.com/daml/ontologies/sri-basic/1-0/ContactInfo.daml" },
226: {
227: "testing/arp/onts/ont97",
228: "http://www.ai.sri.com/daml/ontologies/sri-basic/1-0/Course.daml" },
229: {
230: "testing/arp/onts/ont98",
231: "http://www.ai.sri.com/daml/ontologies/sri-basic/1-0/Date.daml" },
232: {
233: "testing/arp/onts/ont99",
234: "http://www.ai.sri.com/daml/ontologies/sri-basic/1-0/Image.daml" },
235: {
236: "testing/arp/onts/ont100",
237: "http://www.ai.sri.com/daml/ontologies/sri-basic/1-0/Organization.daml" },
238: {
239: "testing/arp/onts/ont101",
240: "http://www.ai.sri.com/daml/ontologies/sri-basic/1-0/Person.daml" },
241: {
242: "testing/arp/onts/ont102",
243: "http://www.ai.sri.com/daml/ontologies/sri-basic/1-0/ProfessionalExperienceAndEducation.daml" },
244: {
245: "testing/arp/onts/ont103",
246: "http://www.ai.sri.com/daml/ontologies/sri-basic/1-0/Project.daml" },
247: {
248: "testing/arp/onts/ont104",
249: "http://www.ai.sri.com/daml/ontologies/sri-basic/1-0/Publication.daml" },
250: {
251: "testing/arp/onts/ont105",
252: "http://www.ai.sri.com/daml/ontologies/sri-basic/1-0/Researcher.daml" },
253: {
254: "testing/arp/onts/ont106",
255: "http://www.ai.sri.com/daml/ontologies/sri-basic/1-0/Time.daml" },
256: {
257: "testing/arp/onts/ont107",
258: "http://www.ai.sri.com/daml/ontologies/sri-basic/1-0/Topic.daml" },
259: {
260: "testing/arp/onts/ont108",
261: "http://www.cs.man.ac.uk/~horrocks/Ontologies/tambis.daml" },
262: {
263: "testing/arp/onts/ont109",
264: "http://www.cs.umbc.edu/~yzou1/daml/acl.daml" },
265: {
266: "testing/arp/onts/ont110",
267: "http://www.cs.umbc.edu/~yzou1/daml/acldaml.daml" },
268: {
269: "testing/arp/onts/ont111",
270: "http://www.cs.umd.edu/projects/plus/DAML/onts/beer1.0.daml" },
271: {
272: "testing/arp/onts/ont112",
273: "http://www.cs.umd.edu/projects/plus/DAML/onts/cs1.0.daml" },
274: {
275: "testing/arp/onts/ont113",
276: "http://www.cs.umd.edu/projects/plus/DAML/onts/cs1.1.daml" },
277: {
278: "testing/arp/onts/ont114",
279: "http://www.cs.umd.edu/projects/plus/DAML/onts/docmnt1.0.daml" },
280: {
281: "testing/arp/onts/ont115",
282: "http://www.cs.umd.edu/projects/plus/DAML/onts/general1.0.daml" },
283: {
284: "testing/arp/onts/ont116",
285: "http://www.cs.umd.edu/projects/plus/DAML/onts/personal1.0.daml" },
286: {
287: "testing/arp/onts/ont117",
288: "http://www.cs.umd.edu/projects/plus/DAML/onts/tseont.daml" },
289: {
290: "testing/arp/onts/ont118",
291: "http://www.cs.umd.edu/projects/plus/DAML/onts/univ1.0.daml" },
292: {
293: "testing/arp/onts/ont119",
294: "http://www.cs.umd.edu/~golbeck/daml/baseball.daml" },
295: {
296: "testing/arp/onts/ont120",
297: "http://www.cs.umd.edu/~golbeck/daml/running.daml" },
298: {
299: "testing/arp/onts/ont121",
300: "http://www.cs.umd.edu/~golbeck/daml/vegetarian.daml" },
301: {
302: "testing/arp/onts/ont122",
303: "http://www.cs.yale.edu/~dvm/daml/agent-ont.daml" },
304: {
305: "testing/arp/onts/ont123",
306: "http://www.cs.yale.edu/~dvm/daml/bib-ont.daml" },
307: {
308: "testing/arp/onts/ont124",
309: "http://www.cs.yale.edu/~dvm/daml/drsonto.daml" },
310: {
311: "testing/arp/onts/ont125",
312: "http://www.cs.yale.edu/~dvm/daml/exp-ont.daml" },
313: {
314: "testing/arp/onts/ont126",
315: "http://www.cs.yale.edu/~dvm/daml/pddlonto.daml" },
316: {
317: "testing/arp/onts/ont127",
318: "http://www.cyc.com/2002/04/08/cyc.daml" },
319: {
320: "testing/arp/onts/ont129",
321: "http://www.daml.org/2000/10/daml-ont" },
322: {
323: "testing/arp/onts/ont130",
324: "http://www.daml.org/2000/12/daml+oil" },
325: {
326: "testing/arp/onts/ont131",
327: "http://www.daml.org/2001/01/gedcom/gedcom.daml" },
328: {
329: "testing/arp/onts/ont132",
330: "http://www.daml.org/2001/02/geofile/geofile-ont.daml" },
331: {
332: "testing/arp/onts/ont133",
333: "http://www.daml.org/2001/02/projectplan/projectplan.daml" },
334: {
335: "testing/arp/onts/ont134",
336: "http://www.daml.org/2001/03/daml+oil" },
337: {
338: "testing/arp/onts/ont135",
339: "http://www.daml.org/2001/06/itinerary/itinerary-ont.daml" },
340: {
341: "testing/arp/onts/ont136",
342: "http://www.daml.org/2001/06/map/map-ont" },
343: {
344: "testing/arp/onts/ont137",
345: "http://www.daml.org/2001/08/baseball/baseball-ont" },
346: {
347: "testing/arp/onts/ont138",
348: "http://www.daml.org/2001/10/agenda/agenda-ont" },
349: {
350: "testing/arp/onts/ont139",
351: "http://www.daml.org/2001/12/factbook/factbook-ont" },
352: {
353: "testing/arp/onts/ont140",
354: "http://www.daml.org/ontologies/ontologies-ont" },
355: {
356: "testing/arp/onts/ont141",
357: "http://www.daml.org/projects/integration/projects-20010811" },
358: {
359: "testing/arp/onts/ont142",
360: "http://www.daml.org/tools/tools-ont" },
361: {
362: "testing/arp/onts/ont143",
363: "http://www.daml.ri.cmu.edu/ont/AirportCodes.daml" },
364: {
365: "testing/arp/onts/ont144",
366: "http://www.daml.ri.cmu.edu/ont/homework/atlas-cmu.daml" },
367: {
368: "testing/arp/onts/ont145",
369: "http://www.daml.ri.cmu.edu/ont/homework/atlas-date.daml" },
370: {
371: "testing/arp/onts/ont146",
372: "http://www.daml.ri.cmu.edu/ont/homework/atlas-employment_categories.daml" },
373: {
374: "testing/arp/onts/ont147",
375: "http://www.daml.ri.cmu.edu/ont/homework/atlas-publications.daml" },
376: {
377: "testing/arp/onts/ont148",
378: "http://www.daml.ri.cmu.edu/ont/homework/cmu-ri-center-ont.daml" },
379: {
380: "testing/arp/onts/ont149",
381: "http://www.daml.ri.cmu.edu/ont/homework/cmu-ri-courses-ont.daml" },
382: {
383: "testing/arp/onts/ont150",
384: "http://www.daml.ri.cmu.edu/ont/homework/cmu-ri-employmenttypes-ont.daml" },
385: {
386: "testing/arp/onts/ont151",
387: "http://www.daml.ri.cmu.edu/ont/homework/cmu-ri-labgroup-ont.daml" },
388: {
389: "testing/arp/onts/ont152",
390: "http://www.daml.ri.cmu.edu/ont/homework/cmu-ri-people-ont.daml" },
391: {
392: "testing/arp/onts/ont153",
393: "http://www.daml.ri.cmu.edu/ont/homework/cmu-ri-project-ont.daml" },
394: {
395: "testing/arp/onts/ont154",
396: "http://www.daml.ri.cmu.edu/ont/homework/cmu-ri-publications-ont.daml" },
397: {
398: "testing/arp/onts/ont155",
399: "http://www.daml.ri.cmu.edu/ont/USCity.daml" },
400: {
401: "testing/arp/onts/ont156",
402: "http://www.daml.ri.cmu.edu/ont/USRegionState.daml" },
403: {
404: "testing/arp/onts/ont157",
405: "http://www.davincinetbook.com:8080/daml/rdf/homework3/projectGutenbergOnt.daml" },
406: {
407: "testing/arp/onts/ont161",
408: "http://www.isi.edu/webscripter/bibtex.o.daml" },
409: {
410: "testing/arp/onts/ont162",
411: "http://www.isi.edu/webscripter/communityreview/abstract-review-o" },
412: {
413: "testing/arp/onts/ont163",
414: "http://www.isi.edu/webscripter/communityreview/scientific-review-o" },
415: {
416: "testing/arp/onts/ont164",
417: "http://www.isi.edu/webscripter/division.o.daml" },
418: {
419: "testing/arp/onts/ont165",
420: "http://www.isi.edu/webscripter/document.o.daml" },
421: {
422: "testing/arp/onts/ont166",
423: "http://www.isi.edu/webscripter/event.o.daml" },
424: {
425: "testing/arp/onts/ont167",
426: "http://www.isi.edu/webscripter/person.o.daml" },
427: {
428: "testing/arp/onts/ont168",
429: "http://www.isi.edu/webscripter/project.o.daml" },
430: {
431: "testing/arp/onts/ont169",
432: "http://www.isi.edu/webscripter/publication.o.daml" },
433: {
434: "testing/arp/onts/ont170",
435: "http://www.isi.edu/webscripter/snapshot.o.daml" },
436: {
437: "testing/arp/onts/ont171",
438: "http://www.isi.edu/webscripter/todo.o.daml" },
439: {
440: "testing/arp/onts/ont172",
441: "http://www.kestrel.edu/DAML/2000/12/CAPACITY.daml" },
442: {
443: "testing/arp/onts/ont173",
444: "http://www.kestrel.edu/DAML/2000/12/DEMAND.daml" },
445: {
446: "testing/arp/onts/ont174",
447: "http://www.kestrel.edu/DAML/2000/12/instances.daml" },
448: {
449: "testing/arp/onts/ont175",
450: "http://www.kestrel.edu/DAML/2000/12/OPERATION.daml" },
451: {
452: "testing/arp/onts/ont176",
453: "http://www.kestrel.edu/DAML/2000/12/RESOURCE.daml" },
454: {
455: "testing/arp/onts/ont177",
456: "http://www.kestrel.edu/DAML/2000/12/TIME.daml" },
457: {
458: "testing/arp/onts/ont178",
459: "http://www.ksl.stanford.edu/projects/DAML/ksl-daml-desc.daml" },
460: {
461: "testing/arp/onts/ont179",
462: "http://www.ksl.stanford.edu/projects/DAML/ksl-daml-instances.daml" },
463: {
464: "testing/arp/onts/ont181",
465: "http://www.lgi2p.ema.fr/~ranwezs/ontologies/musicV1.0.daml" },
466: {
467: "testing/arp/onts/ont182",
468: "http://www.lgi2p.ema.fr/~ranwezs/ontologies/soccerV2.0.daml" },
469: {
470: "testing/arp/onts/ont183",
471: "http://www.semanticweb.org/library/wordnet/wordnet-20000620.rdfs" },
472: {
473: "testing/arp/onts/ont184",
474: "http://www.semanticweb.org/ontologies/swrc-onto-2000-09-10.daml" },
475: {
476: "testing/arp/onts/ont185",
477: "http://www.w3.org/2000/10/annotation-ns#" },
478: {
479: "testing/arp/onts/ont186",
480: "http://www.w3.org/2000/10/annotationType#" },
481: {
482: "testing/arp/onts/ont187",
483: "http://www.w3.org/2000/10/swap/infoset/infoset-diagram.rdf" },
484: {
485: "testing/arp/onts/ont188",
486: "http://www.w3.org/2000/10/swap/pim/contact.rdf" },
487: {
488: "testing/arp/onts/ont189",
489: "http://www.w3.org/2000/10/swap/pim/doc.rdf" },
490: {
491: "testing/arp/onts/ont190",
492: "http://www.w3.org/2001/03/earl/0.95.rdf" },
493: {
494: "testing/arp/onts/ont191", "http://www.w3.org/2001/03/thread" }, {
495: "testing/arp/onts/ont192",
496: "http://www.w3.org/2001/05/rdf-ds/datastore-schema" },
497: */
498: };
499: static String files[][];
500: static int totalLength;
501: static int totalTime;
502:
503: static public void main(String args[]) {
504: int k;
505: files = new String[20][];
506: for (int ii = 0; ii + files.length <= allFiles.length; ii += files.length) {
507: for (k = 0; k < files.length; k++)
508: files[k] = allFiles[ii + k];
509: totalLength = 0;
510: double s1 = speed();
511: double s2 = speed();
512: System.err.println(files[0][0] + "\t" + totalLength + "\t"
513: + s1 + "\t" + s2 + "\t" + files[0][1]);
514:
515: }
516: System.err.println("Total time: " + totalTime + " ms");
517: }
518:
519: static byte[][] load() {
520: byte rslt[][] = new byte[files.length][];
521: for (int i = 0; i < files.length; i++) {
522: File f = new File(files[i][0]);
523: totalLength += (int) f.length();
524: if (f.length() == 0)
525: continue;
526: rslt[i] = new byte[(int) f.length()];
527: try {
528: InputStream in = new FileInputStream(f);
529: in.read(rslt[i]);
530: in.close();
531: } catch (IOException e) {
532: System.err.println(files[i][1] + " " + e.getMessage());
533: }
534: }
535: return rslt;
536: }
537:
538: static int sum(byte array[]) {
539: int r = 0;
540: if (array == null)
541: return 0;
542: for (int i = 0; i < array.length; i++)
543: r += array[i];
544: return r;
545: }
546:
547: static double speed() {
548: boolean realData = false;
549: byte data[][] = load();
550: int s = 0;
551: long startRead = System.currentTimeMillis();
552: for (int i = 0; i < files.length; i++)
553: for (int k = 0; k < 50; k++)
554: s += sum(data[i]);
555: long startTest = System.currentTimeMillis();
556: for (int i = 0; i < files.length; i++)
557: try {
558: if (data[i] == null)
559: continue;
560: realData = true;
561: parseRDF(new ByteArrayInputStream(data[i]), files[i][1]);
562: } catch (IOException e) {
563: System.err.println("byteArray " + e.getMessage());
564: }
565: long endTime = System.currentTimeMillis();
566: totalTime += (int) (endTime - startTest);
567: if (!realData)
568: return Double.NaN;
569: return (double) (endTime - startTest)
570: / (double) (startTest - startRead);
571: }
572:
573: static void parseRDF(InputStream in, String base)
574: throws IOException {
575: ErrorHandler eh = new ErrorHandler() {
576: public void warning(SAXParseException e) {
577: }
578:
579: public void error(SAXParseException e) {
580: }
581:
582: public void fatalError(SAXParseException e) {
583: }
584: };
585: InputStream oldIn = System.in;
586: InputStream ntIn = null;
587: try {
588: System.setIn(in);
589: NTriple.mainEh(new String[] { "-b", base, "-t" }, eh, null);
590:
591: } catch (Exception e) {
592: System.err.println(base + " " + e.toString());
593: } finally {
594: System.setIn(oldIn);
595: if (ntIn != null)
596: ntIn.close();
597: }
598: }
599:
600: }
601: /*
602: * (c) Copyright 2003, 2004, 2005, 2006, 2007, 2008 Hewlett-Packard Development Company, LP
603: * All rights reserved.
604: *
605: * Redistribution and use in source and binary forms, with or without
606: * modification, are permitted provided that the following conditions
607: * are met:
608: * 1. Redistributions of source code must retain the above copyright
609: * notice, this list of conditions and the following disclaimer.
610: * 2. Redistributions in binary form must reproduce the above copyright
611: * notice, this list of conditions and the following disclaimer in the
612: * documentation and/or other materials provided with the distribution.
613: * 3. The name of the author may not be used to endorse or promote products
614: * derived from this software without specific prior written permission.
615:
616: * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
617: * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
618: * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
619: * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
620: * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
621: * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
622: * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
623: * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
624: * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
625: * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
626: */
|