Project

General

Profile

« Previous | Next » 

Revision 3034

Added by perry over 17 years ago

initial import of changes to metacat source and config files to support spatial option

View differences:

DBQuery.java
59 59
import edu.ucsb.nceas.morpho.datapackage.Triple;
60 60
import edu.ucsb.nceas.morpho.datapackage.TripleCollection;
61 61

  
62
import edu.ucsb.nceas.metacat.spatial.MetacatSpatialQuery;
63
import edu.ucsb.nceas.metacat.spatial.PersistentMetacatSpatialDataset;
64
import edu.ucsb.nceas.metacat.spatial.MetacatSpatialDataset;
65
import edu.ucsb.nceas.metacat.spatial.MetacatSpatialDocument;
66
import edu.ucsb.nceas.metacat.spatial.MetacatSpatialConstants;
67 62

  
68 63
/**
69 64
 * A Class that searches a relational DB for elements and attributes that have
......
392 387
                                      throws Exception
393 388
    {
394 389
      
395
      MetacatSpatialDataset metacatSpatialData = null; 
396
      
397
if (MetacatSpatialConstants.runSpatialOption == true  ) {
398
        metacatSpatialData = new MetacatSpatialDataset(); 
399
}  
400 390
      int offset = 1;
401 391
      // this is a hack for offset
402 392
      if (out == null)
......
456 446
      while (tableHasRows)
457 447
      {
458 448
        docid = rs.getString(1).trim();
459
        //if ( METACAT_SPATIAL ) {
460
	if (MetacatSpatialConstants.runSpatialOption == true  ) {
461
          System.out.println("###################################################");
462
          System.out.println("###################################################");
463
          System.out.println("###################################################");
464
          System.out.println("###################################################");
465
          System.out.println("###################################################");
466
          System.out.println("################ " + docid + " ####################");
467
          
468
          // make sure that the spatial dataset is initialized
469
          MetacatSpatialQuery spatialQuery = new  MetacatSpatialQuery();
470
          
471
          // create the spatial document 
472
          MetacatSpatialDocument msdoc = spatialQuery.getSpatialDocument(docid);
473

  
474
          // add the spatial document to the spatial dataset
475
          metacatSpatialData.add(msdoc);
476

  
477
          // write the persistent spatial dataset
478
          //////metacatSpatialData.write();
479
          
480
          System.out.println("###################################################");
481
          System.out.println("###################################################");
482
          System.out.println("###################################################");
483
          System.out.println("###################################################");
484
          System.out.println("###################################################");
485
        }
486 449
        docname = rs.getString(2);
487 450
        doctype = rs.getString(3);
488 451
        createDate = rs.getString(4);
......
658 621

  
659 622
     
660 623
     //write the persistent spatial dataset
624
     /*
661 625
	 if(metacatSpatialData != null){
662 626
		metacatSpatialData.writeTextQueryData();
663 627
	 }
664
	
628
      */
629

  
665 630
     return resultsetBuffer;
666 631
    }//findReturnDoclist
667 632

  

Also available in: Unified diff