チェンジセット 269 : SPARQLBuilderWWW2016/src/java
- 更新日時:
- 2016/03/14 20:01:59 (9 年 前)
- パス:
- SPARQLBuilderWWW2016/src/java/org/biohackathon/SPARQLBuilder
- ファイル:
-
- 7 変更
凡例:
- 変更なし
- 追加
- 削除
-
SPARQLBuilderWWW2016/src/java/org/biohackathon/SPARQLBuilder/OWL/AcquiredStructureAnalyzer.java
r267 r269 3 3 import java.util.*; 4 4 5 import jp.riken.accc.db.rdf.crawler.dataStructure.sparql.JenaModelGenerator; 6 import jp.riken.accc.db.rdf.crawler.dataStructure.sparql.URICollection; 5 import jp.riken.accc.db.sparqlBuilderMetadata.crawler.dataStructure.sparql.JenaModelGenerator; 6 import jp.riken.accc.db.sparqlBuilderMetadata.crawler.dataStructure.sparql.URICollection; 7 import jp.riken.accc.db.sparqlBuilderMetadata.crawler.dataStructure.sparql.crawler.CrawledMetadata; 8 import jp.riken.accc.db.sparqlBuilderMetadata.crawler.dataStructure.sparql.crawler.Dataset; 7 9 8 10 import com.hp.hpl.jena.query.Query; … … 20 22 public class AcquiredStructureAnalyzer implements RDFSchemaAnalyzer { 21 23 22 private Model model = null; 23 private String endpointURI = null; 24 private String[] graphURIs = null; 24 private CrawledMetadata crawledMetadata = null; 25 25 26 26 public String getEndpointURI(){ 27 return endpointURI;27 return crawledMetadata.getEndpointURI(); 28 28 } 29 29 30 30 public String[] getGraphURIs(){ 31 return graphURIs;31 return crawledMetadata.getGraphURIs(); 32 32 } 33 33 … … 57 57 */ 58 58 59 public AcquiredStructureAnalyzer(String endpointURI, String[] graphURIs, Model model){ 60 this.model = model; 61 this.endpointURI = endpointURI; 62 this.graphURIs = graphURIs; 63 } 64 65 private String[] filterGraphURIs(String[] orgGraphURIs){ 59 public AcquiredStructureAnalyzer(CrawledMetadata crawledMetadata){ 60 this.crawledMetadata = crawledMetadata; 61 } 62 63 private String filterGraphURIs(String orgGraphURIs){ 66 64 // TODO 67 return graphURIs; 68 } 69 70 71 public SClass[] listClasses(String[] graphURIs, boolean countInstances) throws Exception{ 72 return getOWLClasses(graphURIs, null, null, countInstances); 73 } 74 75 76 77 78 public SClass[] getOWLClasses(String[] graphURIs, String[] keywords, String language, boolean countInstances) throws Exception{ 79 return getOWLClassList(graphURIs, keywords, language, countInstances).toArray(new SClass[0]); 80 } 81 82 public List<SClass> getOWLClassList(String[] graphURIs, String[] keywords, String language, boolean countInstances) throws Exception{ 83 String[] targetGraphURIs = filterGraphURIs(graphURIs); 84 65 return orgGraphURIs; 66 } 67 68 69 public SClass[] listClasses(String graphURI, boolean countInstances) throws Exception{ 70 return getOWLClasses(graphURI, null, null, countInstances); 71 } 72 73 74 75 76 public SClass[] getOWLClasses(String graphURI, String[] keywords, String language, boolean countInstances) throws Exception{ 77 return getOWLClassList(graphURI, keywords, language, countInstances).toArray(new SClass[0]); 78 } 79 80 public List<SClass> getOWLClassList(String graphURI, String[] keywords, String language, boolean countInstances) throws Exception{ 81 String targetGraphURI = filterGraphURIs(graphURI); 82 83 Dataset dataset = crawledMetadata.getDataset(targetGraphURI); 84 85 85 86 StringBuffer queryStr = new StringBuffer(); 86 87 queryStr.append("PREFIX owl: <http://www.w3.org/2002/07/owl#>\n"); … … 88 89 queryStr.append("PREFIX rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#>\n"); 89 90 queryStr.append("SELECT DISTINCT ?c ?pLabel ?entities\n"); 90 // if (targetGraphURIs != null) { 91 // for (String graphURI : targetGraphURIs) { 92 // queryStr.append("FROM <"); 93 // queryStr.append(graphURI); 94 // queryStr.append(">\n"); 95 // } 96 // } 91 if (targetGraphURI != null) { 92 queryStr.append("FROM <"); 93 queryStr.append(targetGraphURI); 94 queryStr.append(">\n"); 95 } 97 96 queryStr.append("WHERE{\n"); 98 97 queryStr.append(" ?cp <").append(URICollection.PROPERTY_VOID_CLASS).append("> ?c. \n"); … … 133 132 try { 134 133 // long start = System.currentTimeMillis(); 135 qexec = QueryExecutionFactory.create(query, model);134 qexec = QueryExecutionFactory.create(query, dataset.getModel()); 136 135 results = qexec.execSelect(); 137 136 // long end = System.currentTimeMillis(); … … 177 176 178 177 179 public ClassLink[] getNextClass(String[] graphURIs, String originClass, int limit, boolean countLinks) throws Exception{ 180 String[] targetGraphURIs = filterGraphURIs(graphURIs); 181 178 public ClassLink[] getNextClass(String graphURI, String originClass, int limit, boolean countLinks) throws Exception{ 179 String targetGraphURI = filterGraphURIs(graphURI); 180 Dataset dataset = crawledMetadata.getDataset(targetGraphURI); 181 182 182 183 StringBuffer queryStr = new StringBuffer(); 183 184 queryStr.append("PREFIX owl: <http://www.w3.org/2002/07/owl#>\n"); … … 188 189 queryStr.append("SELECT DISTINCT ?indPropCat ?c ?dat ?d ?p ?numLnkInsStart ?numLnkInsEnd ?numInsDom ?numInsRan ?numTriples\n"); 189 190 190 // if (targetGraphURIs != null) { 191 // for (String graphURI : targetGraphURIs) { 192 // queryStr.append("FROM <"); 193 // queryStr.append(graphURI); 194 // queryStr.append(">\n"); 195 // } 196 // } 191 if (targetGraphURI != null) { 192 queryStr.append("FROM <"); 193 queryStr.append(targetGraphURI); 194 queryStr.append(">\n"); 195 } 197 196 198 197 queryStr.append("WHERE{\n"); … … 254 253 try { 255 254 long start = System.currentTimeMillis(); 256 qexec = QueryExecutionFactory.create(query, model);255 qexec = QueryExecutionFactory.create(query, dataset.getModel()); 257 256 results = qexec.execSelect(); 258 257 long end = System.currentTimeMillis(); … … 363 362 */ 364 363 365 public LabelMap[] getLabels(String [] graphURIs, String[] resourceURIs,364 public LabelMap[] getLabels(String graphURI, String[] resourceURIs, 366 365 String language) throws Exception { 367 if (resourceURIs == null || resourceURIs.length == 0) { 368 return new LabelMap[0]; 369 } 366 // if (resourceURI == null || resourceURIs.length == 0) { 367 // return new LabelMap[0]; 368 // } 369 370 String targetGraphURI = filterGraphURIs(graphURI); 371 Dataset dataset = crawledMetadata.getDataset(targetGraphURI); 372 373 370 374 StringBuffer queryStr = new StringBuffer(); 371 375 queryStr.append("PREFIX owl: <http://www.w3.org/2002/07/owl#>\n"); … … 373 377 queryStr.append("PREFIX rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#>\n"); 374 378 queryStr.append("SELECT DISTINCT ?res ?label \n"); 375 if (graphURIs != null) { 376 for (String graphURI : graphURIs) { 379 if (targetGraphURI != null) { 377 380 queryStr.append("FROM <"); 378 queryStr.append( graphURI);381 queryStr.append(targetGraphURI); 379 382 queryStr.append(">\n"); 380 }381 383 } 382 384 queryStr.append("WHERE{\n"); … … 399 401 400 402 Query query = QueryFactory.create(queryStr.toString()); 401 QueryExecution qexec = QueryExecutionFactory.create(query, model);403 QueryExecution qexec = QueryExecutionFactory.create(query, dataset.getModel()); 402 404 403 405 ResultSet results = qexec.execSelect(); -
SPARQLBuilderWWW2016/src/java/org/biohackathon/SPARQLBuilder/OWL/EndpointAnalyzer.java
r268 r269 148 148 */ 149 149 150 public List<SClass> getOWLClassList(String [] graphURIs, String[] keywords,150 public List<SClass> getOWLClassList(String graphURI, String[] keywords, 151 151 String language, 152 152 … … 157 157 // public List<SClass> 158 158 159 public SClass[] getOWLClasses(String [] graphURIs, String[] keywords,159 public SClass[] getOWLClasses(String graphURI, String[] keywords, 160 160 String language, 161 161 … … 170 170 queryStr.append("SELECT DISTINCT ?c ?pLabel \n"); 171 171 } 172 if (graphURI s!= null) {173 for (String graphURI : graphURIs) {172 if (graphURI != null) { 173 // for (String graphURI : graphURIs) { 174 174 queryStr.append("FROM <"); 175 175 queryStr.append(graphURI); 176 176 queryStr.append(">\n"); 177 }177 // } 178 178 } 179 179 queryStr.append("WHERE{\n"); … … 271 271 } 272 272 273 public SClass[] listClasses(String [] graphURIs, boolean countInstances)273 public SClass[] listClasses(String graphURI, boolean countInstances) 274 274 throws Exception { 275 275 StringBuffer queryStr = new StringBuffer(); … … 283 283 } 284 284 285 if (graphURI s!= null) {286 for (String graphURI : graphURIs) {285 if (graphURI != null) { 286 // for (String graphURI : graphURIs) { 287 287 queryStr.append("FROM <"); 288 288 queryStr.append(graphURI); 289 289 queryStr.append(">\n"); 290 }290 // } 291 291 } 292 292 queryStr.append("WHERE{\n"); … … 374 374 * @since 28.01.2014 375 375 */ 376 public Instance[] getInstances(String [] graphURIs, String keyword)376 public Instance[] getInstances(String graphURI, String keyword) 377 377 throws Exception { 378 378 StringBuffer queryStr = new StringBuffer(); … … 381 381 queryStr.append("PREFIX rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#>\n"); 382 382 queryStr.append("SELECT DISTINCT ?ins ?c \n"); 383 if (graphURIs != null) { 384 for (String graphURI : graphURIs) { 383 if (graphURI != null) { 385 384 queryStr.append("FROM <"); 386 385 queryStr.append(graphURI); 387 386 queryStr.append(">\n"); 388 }389 387 } 390 388 queryStr.append("WHERE{\n"); … … 450 448 * @since 28.01.2014 451 449 */ 452 public ClassLink[] getNextClass(String [] graphURIs, String originClass,450 public ClassLink[] getNextClass(String graphURI, String originClass, 453 451 int limit, boolean countLinks) throws Exception { 454 ClassLink[] cLinks = getNextClassSub(graphURI s, originClass, limit,452 ClassLink[] cLinks = getNextClassSub(graphURI, originClass, limit, 455 453 false); 456 454 if (countLinks) { 457 cLinks = countLinks(graphURI s, originClass, cLinks);455 cLinks = countLinks(graphURI, originClass, cLinks); 458 456 } 459 457 return cLinks; 460 458 } 461 459 462 private ClassLink[] getNextClassSub(String [] graphURIs, String originClass,460 private ClassLink[] getNextClassSub(String graphURI, String originClass, 463 461 int limit, boolean countLinks) throws Exception { 464 462 StringBuffer queryStr = new StringBuffer(); … … 474 472 } 475 473 476 if (graphURIs != null) { 477 for (String graphURI : graphURIs) { 474 if (graphURI != null) { 478 475 queryStr.append("FROM <"); 479 476 queryStr.append(graphURI); 480 477 queryStr.append(">\n"); 481 }482 478 } 483 479 queryStr.append("WHERE{\n"); … … 615 611 * @since 28.01.2014 616 612 */ 617 public ClassLink[] getNextClassViaInstanceLink(String [] graphURIs,613 public ClassLink[] getNextClassViaInstanceLink(String graphURI, 618 614 String originClass, int limit) throws Exception { 619 615 StringBuffer queryStr = new StringBuffer(); … … 622 618 queryStr.append("PREFIX rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#>\n"); 623 619 queryStr.append("SELECT DISTINCT ?pf ?pr (COUNT(?pf) AS ?numOfForwardLinks) (COUNT(?pr) AS ?numOfReverseLinks) (COUNT(DISTINCT(?insOrg)) AS ?numOfOriginInstances) (COUNT(DISTINCT(?ins)) AS ?numOfLinkedInstances) ?c \n"); 624 if (graphURI s!= null) {625 for (String graphURI : graphURIs) {620 if (graphURI != null) { 621 // for (String graphURI : graphURIs) { 626 622 queryStr.append("FROM <"); 627 623 queryStr.append(graphURI); 628 624 queryStr.append(">\n"); 629 }625 // } 630 626 } 631 627 queryStr.append("WHERE{\n"); … … 757 753 * @since 28.01.2014 758 754 */ 759 public InstanceLink[] getNextInstancesViaInstanceLink(String [] graphURIs,755 public InstanceLink[] getNextInstancesViaInstanceLink(String graphURI, 760 756 String originInstance, int limit) throws Exception { 761 757 StringBuffer queryStr = new StringBuffer(); … … 764 760 queryStr.append("PREFIX rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#>\n"); 765 761 queryStr.append("SELECT DISTINCT ?pf ?pr ?ins ?c \n"); 766 if (graphURIs != null) { 767 for (String graphURI : graphURIs) { 762 if (graphURI != null) { 768 763 queryStr.append("FROM <"); 769 764 queryStr.append(graphURI); 770 765 queryStr.append(">\n"); 771 }772 766 } 773 767 queryStr.append("WHERE{\n"); … … 833 827 } 834 828 835 public LabelMap[] getLabels(String [] graphURIs, String[] resourceURIs,829 public LabelMap[] getLabels(String graphURI, String[] resourceURIs, 836 830 String language) throws Exception { 837 if (resourceURIs == null || resourceURIs.length == 0) {838 return new LabelMap[0];839 }831 // if (resourceURIs == null || resourceURIs.length == 0) { 832 // return new LabelMap[0]; 833 // } 840 834 StringBuffer queryStr = new StringBuffer(); 841 835 queryStr.append("PREFIX owl: <http://www.w3.org/2002/07/owl#>\n"); … … 843 837 queryStr.append("PREFIX rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#>\n"); 844 838 queryStr.append("SELECT DISTINCT ?res ?label \n"); 845 if (graphURIs != null) { 846 for (String graphURI : graphURIs) { 839 if (graphURI != null) { 847 840 queryStr.append("FROM <"); 848 841 queryStr.append(graphURI); 849 842 queryStr.append(">\n"); 850 }851 843 } 852 844 queryStr.append("WHERE{\n"); … … 896 888 } 897 889 898 public ClassLink[] countLinks(String [] graphURIs, String startClassURI,890 public ClassLink[] countLinks(String graphURI, String startClassURI, 899 891 ClassLink[] classLinks) throws Exception { 900 892 if (classLinks == null || classLinks.length == 0) { … … 908 900 909 901 queryStr.append("SELECT (COUNT(?os) AS ?numOfLinks) (COUNT(DISTINCT(?is)) AS ?numOfOriginInstances) (COUNT(DISTINCT(?os)) AS ?numOfLinkedInstances) \n"); 910 if (graphURIs != null) { 911 for (String graphURI : graphURIs) { 902 if (graphURI != null) { 912 903 queryStr.append("FROM <"); 913 904 queryStr.append(graphURI); 914 905 queryStr.append(">\n"); 915 }916 906 } 917 907 … … 1003 993 1004 994 queryStr.append("SELECT (COUNT(?ics) AS ?numOfOriginClassInstances) \n"); 1005 if (graphURIs != null) { 1006 for (String graphURI : graphURIs) { 995 if (graphURI != null) { 1007 996 queryStr.append("FROM <"); 1008 997 queryStr.append(graphURI); 1009 998 queryStr.append(">\n"); 1010 }1011 999 } 1012 1000 … … 1056 1044 1057 1045 queryStr.append("SELECT (COUNT(?ocs) AS ?numOfLinkedClassInstances) \n"); 1058 if (graphURIs != null) { 1059 for (String graphURI : graphURIs) { 1046 if (graphURI != null) { 1060 1047 queryStr.append("FROM <"); 1061 1048 queryStr.append(graphURI); 1062 1049 queryStr.append(">\n"); 1063 }1064 1050 } 1065 1051 -
SPARQLBuilderWWW2016/src/java/org/biohackathon/SPARQLBuilder/OWL/RDFSchemaAnalyzer.java
r267 r269 27 27 * @since 28.01.2014 28 28 */ 29 public SClass[] getOWLClasses(String [] graphURIs, String[] keyword, String language, boolean countInstances) throws Exception;29 public SClass[] getOWLClasses(String graphURI, String[] keyword, String language, boolean countInstances) throws Exception; 30 30 31 public List<SClass> getOWLClassList(String [] graphURIs, String[] keyword, String language, boolean countInstances) throws Exception;31 public List<SClass> getOWLClassList(String graphURI, String[] keyword, String language, boolean countInstances) throws Exception; 32 32 33 public SClass[] listClasses(String [] graphURIs, boolean countInstances) throws Exception;33 public SClass[] listClasses(String graphURI, boolean countInstances) throws Exception; 34 34 35 35 /** … … 66 66 * @since 28.01.2014 67 67 */ 68 public ClassLink[] getNextClass(String [] graphURIs, String originClass, int limit, boolean countLinks) throws Exception;68 public ClassLink[] getNextClass(String graphURI, String originClass, int limit, boolean countLinks) throws Exception; 69 69 70 70 /** … … 111 111 // int limit) throws Exception; 112 112 113 public LabelMap[] getLabels(String [] graphURIs, String[] resourceURIs, String language) throws Exception;113 public LabelMap[] getLabels(String graphURI, String[] resourceURIs, String language) throws Exception; 114 114 115 115 // public ClassLink[] countLinks(String[] graphURIs, String startClassURI, -
SPARQLBuilderWWW2016/src/java/org/biohackathon/SPARQLBuilder/OWL/RDFSchemaAnalyzerFactory.java
r267 r269 8 8 import org.biohackathon.SPARQLBuilder.endpointMetadata.MetadataManager; 9 9 10 import jp.riken.accc.db.rdf.crawler.dataStructure.sparql.JenaModelGenerator; 10 import jp.riken.accc.db.sparqlBuilderMetadata.crawler.dataStructure.sparql.JenaModelGenerator; 11 import jp.riken.accc.db.sparqlBuilderMetadata.crawler.dataStructure.sparql.crawler.CrawledMetadata; 11 12 12 13 public class RDFSchemaAnalyzerFactory { … … 47 48 } 48 49 49 public MetadataFile[] getMetadataFiles(){50 return metadataManager.get MetadataFiles();50 public CrawledMetadata[] getMetadataFiles(){ 51 return metadataManager.getCrawlerMetadataList(); 51 52 } 52 53 53 54 54 55 public RDFSchemaAnalyzer create(String uri) throws Exception{ 55 MetadataFile mFile = metadataManager.getMetadataFile(uri);56 if( mFile== null ){56 CrawledMetadata crawledMetadata = metadataManager.getCrawledMetadata(uri); 57 if( crawledMetadata == null ){ 57 58 return new EndpointAnalyzer(uri); 58 59 }else{ 59 JenaModelGenerator jmGene = new JenaModelGenerator(mFile.getFilePath()); 60 return new AcquiredStructureAnalyzer(jmGene.getEndpointURI(), jmGene.getGraphURIs(), jmGene.getModel()); 60 return new AcquiredStructureAnalyzer(crawledMetadata); 61 61 } 62 62 } -
SPARQLBuilderWWW2016/src/java/org/biohackathon/SPARQLBuilder/OWL/StructureCrawler.java
r267 r269 6 6 import java.util.Set; 7 7 8 import jp.riken.accc.db. rdf.crawler.dataStructure.SchemaCategory;9 import jp.riken.accc.db. rdf.crawler.dataStructure.sparql.JenaModelGenerator;10 import jp.riken.accc.db. rdf.crawler.dataStructure.sparql.RDFsCrawlerImpl;8 import jp.riken.accc.db.sparqlBuilderMetadata.crawler.dataStructure.SchemaCategory; 9 import jp.riken.accc.db.sparqlBuilderMetadata.crawler.dataStructure.sparql.JenaModelGenerator; 10 import jp.riken.accc.db.sparqlBuilderMetadata.crawler.dataStructure.sparql.RDFsCrawlerImpl; 11 11 12 12 public class StructureCrawler { … … 75 75 } 76 76 77 public void crawl(String endPURI, String outFileName) throws Exception { 78 RDFsCrawlerImpl impl = new RDFsCrawlerImpl(endPURI); 79 // Resource[] res = impl.getRDFProperties(); 80 // Resource[] res = impl.getInferedRDFsClassesFromInstances(); 81 // Resource[] res = impl.getDomainRangeDeclaredRDFProperties(); 82 // Resource[] res = impl.getDeclaredRDFsClasses(); 83 // for(Resource r: res){ 84 // System.out.println(r.getURI().toString()); 85 // } 86 // Model model = impl.getProperiesFromDomainRangeDecls(); 87 // Model model = impl.getPropertiesFromInstanceDecls(); 88 // RDFWriter writer = model.getWriter("N3"); 89 // writer.setProperty("showXMLDeclaration","true"); 90 // writer.write(model,System.out,""); 91 // model.close(); 92 77 public void crawl(String endPURI, String crawlName, String outFileName) throws Exception { 78 RDFsCrawlerImpl impl = new RDFsCrawlerImpl(endPURI, crawlName); 93 79 SchemaCategory sc = impl.determineSchemaCategory(); 94 80 -
SPARQLBuilderWWW2016/src/java/org/biohackathon/SPARQLBuilder/endpointMetadata/MetadataFile.java
r267 r269 5 5 import java.util.Calendar; 6 6 7 import jp.riken.accc.db. rdf.crawler.dataStructure.sparql.URICollection;7 import jp.riken.accc.db.sparqlBuilderMetadata.crawler.dataStructure.sparql.URICollection; 8 8 9 9 import org.apache.jena.riot.RDFDataMgr; -
SPARQLBuilderWWW2016/src/java/org/biohackathon/SPARQLBuilder/endpointMetadata/MetadataManager.java
r267 r269 5 5 import java.util.Set; 6 6 7 import jp.riken.accc.db.sparqlBuilderMetadata.crawler.dataStructure.sparql.crawler.CrawledMetadata; 8 import jp.riken.accc.db.sparqlBuilderMetadata.crawler.dataStructure.sparql.crawler.CrawledMetadataFileReader; 9 7 10 public class MetadataManager { 8 11 9 HashMap<String, MetadataFile> metadataTable = null;12 HashMap<String,CrawledMetadata> metadataTable = null; 10 13 11 14 /* … … 22 25 }*/ 23 26 24 public MetadataFile[] getMetadataFiles(){25 return metadataTable.values().toArray(new MetadataFile[0]);27 public CrawledMetadata[] getCrawlerMetadataList(){ 28 return metadataTable.values().toArray(new CrawledMetadata[0]); 26 29 } 27 public MetadataFile getMetadataFile(String uri){30 public CrawledMetadata getCrawledMetadata(String uri){ 28 31 return metadataTable.get(uri); 29 32 } … … 41 44 42 45 public void init(String metadataDirStr) throws Exception{ 43 metadataTable = new HashMap<String, MetadataFile>();46 metadataTable = new HashMap<String,CrawledMetadata>(); 44 47 File metadataDir = new File(metadataDirStr); 45 48 File[] files = null; … … 58 61 } 59 62 for(File file: files){ 60 MetadataFile metadataFile= null;63 CrawledMetadata crawledMetadata = null; 61 64 try{ 62 metadataFile = new MetadataFile(file);63 String uri = metadataFile.getEndpointURI();65 crawledMetadata = CrawledMetadataFileReader.readFile(file.getCanonicalPath()); 66 String uri = crawledMetadata.getEndpointURI(); 64 67 if( uri != null ){ 65 68 if( metadataTable.containsKey(uri)){ 66 MetadataFiletempMF = metadataTable.get(uri);67 if(tempMF.get EndDateTime().before(metadataFile.getEndDateTime()) ){69 CrawledMetadata tempMF = metadataTable.get(uri); 70 if(tempMF.getDefaultDataset().getCrawlLog().crawlEndTime.before(crawledMetadata.getDefaultDataset().getCrawlLog().crawlEndTime) ){ 68 71 metadataTable.remove(uri); 69 metadataTable.put(uri, metadataFile);72 metadataTable.put(uri, crawledMetadata); 70 73 } 71 74 }else{ 72 metadataTable.put(uri, metadataFile);75 metadataTable.put(uri, crawledMetadata); 73 76 } 74 77 }