Project

General

Profile

« Previous | Next » 

Revision 5629

Added by berkley over 13 years ago

changes for dataone .5 schema updates

View differences:

src/loaddtdschema-oracle.sql
51 51
  VALUES ('Schema', '/schema/RegistryService/RegistryEntryType.xsd', '/schema/RegistryService/RegistryEntryType.xsd');
52 52

  
53 53
INSERT INTO xml_catalog (entry_type, public_id, system_id)
54
  VALUES ('Schema', 'http://dataone.org/service/types/SystemMetadata/0.1', '/schema/D1_SCHEMA_0_4/systemmetadata.xsd');
54
  VALUES ('Schema', 'http://dataone.org/service/types/SystemMetadata/0.5', '/schema/D1_SCHEMA_0_5/systemmetadata.xsd');
55 55
INSERT INTO xml_catalog (entry_type, public_id, system_id)
56
  VALUES ('Schema', 'http://dataone.org/service/types/common/0.1', '/schema/D1_SCHEMA_0_4/common.xsd');
56
  VALUES ('Schema', 'http://dataone.org/service/types/common/0.5', '/schema/D1_SCHEMA_0_5/common.xsd');
57 57
  
58 58
INSERT INTO db_version (version, status, date_created) 
59 59
  VALUES ('1.10.0',1,CURRENT_DATE);
src/upgrade-db-to-1.10.0-postgres.sql
19 19
 */
20 20
 
21 21
INSERT INTO xml_catalog (entry_type, public_id, system_id)
22
  VALUES ('Schema', 'http://dataone.org/service/types/SystemMetadata/0.1', '/schema/D1_SCHEMA_0_4/systemmetadata.xsd');
22
  VALUES ('Schema', 'http://dataone.org/service/types/SystemMetadata/0.5', '/schema/D1_SCHEMA_0_5/systemmetadata.xsd');
23 23
INSERT INTO xml_catalog (entry_type, public_id, system_id)
24
  VALUES ('Schema', 'http://dataone.org/service/types/common/0.1', '/schema/D1_SCHEMA_0_4/common.xsd');
24
  VALUES ('Schema', 'http://dataone.org/service/types/common/0.5', '/schema/D1_SCHEMA_0_5/common.xsd');
25 25
  
26 26
/*
27 27
 * update the database version
src/loaddtdschema-postgres.sql
51 51
  VALUES ('Schema', 'http://ecoinformatics.org/registryentry-1.0.0', '/schema/RegistryService/RegistryEntryType.xsd');
52 52

  
53 53
INSERT INTO xml_catalog (entry_type, public_id, system_id)
54
  VALUES ('Schema', 'http://dataone.org/service/types/SystemMetadata/0.1', '/schema/D1_SCHEMA_0_4/systemmetadata.xsd');
54
  VALUES ('Schema', 'http://dataone.org/service/types/SystemMetadata/0.5', '/schema/D1_SCHEMA_0_5/systemmetadata.xsd');
55 55
INSERT INTO xml_catalog (entry_type, public_id, system_id)
56
  VALUES ('Schema', 'http://dataone.org/service/types/common/0.1', '/schema/D1_SCHEMA_0_4/common.xsd');
56
  VALUES ('Schema', 'http://dataone.org/service/types/common/0.5', '/schema/D1_SCHEMA_0_5/common.xsd');
57 57

  
58 58
INSERT INTO db_version (version, status, date_created) 
59 59
  VALUES ('1.10.0',1,CURRENT_DATE);
src/upgrade-db-to-1.10.0-oracle.sql
17 17
 * Register the DataONE schemas
18 18
 */
19 19
INSERT INTO xml_catalog (entry_type, public_id, system_id)
20
  VALUES ('Schema', 'http://dataone.org/service/types/SystemMetadata/0.1', '/schema/D1_SCHEMA_0_4/systemmetadata.xsd');
20
  VALUES ('Schema', 'http://dataone.org/service/types/SystemMetadata/0.5', '/schema/D1_SCHEMA_0_5/systemmetadata.xsd');
21 21
INSERT INTO xml_catalog (entry_type, public_id, system_id)
22
  VALUES ('Schema', 'http://dataone.org/service/types/common/0.1', '/schema/D1_SCHEMA_0_4/common.xsd');
22
  VALUES ('Schema', 'http://dataone.org/service/types/common/0.5', '/schema/D1_SCHEMA_0_5/common.xsd');
23 23
  
24 24
/*
25 25
 * update the database version
src/edu/ucsb/nceas/metacat/restservice/ResourceHandler.java
40 40
import org.apache.commons.httpclient.util.DateParser;
41 41
import org.apache.commons.io.IOUtils;
42 42
import org.apache.log4j.Logger;
43
import org.apache.maven.artifact.ant.shaded.IOUtil;
43 44
import org.dataone.service.exceptions.BaseException;
44 45
import org.dataone.service.exceptions.IdentifierNotUnique;
45 46
import org.dataone.service.exceptions.InsufficientResources;
......
67 68
import edu.ucsb.nceas.metacat.service.SessionService;
68 69
import edu.ucsb.nceas.metacat.util.RequestUtil;
69 70
import edu.ucsb.nceas.metacat.util.SessionData;
70

  
71
import org.dataone.service.streaming.util.StreamUtil;
71 72
/**
72 73
 * 
73 74
 * Implements Earthgrid REST API to Metacat <br/><br/> 
......
996 997
    private String streamToString(InputStream is)
997 998
    throws IOException
998 999
    {
999
        byte b[] = new byte[1024];
1000
        int numread = is.read(b, 0, 1024);
1001
        String response = new String();
1002
        while(numread != -1)
1003
        {
1004
            response += new String(b, 0, numread);
1005
            numread = is.read(b, 0, 1024);
1006
        }
1007
        return response;
1000
        return IOUtil.toString(is);
1008 1001
    }
1009 1002

  
1010 1003
    private InputStream stringToStream(String s)
......
1063 1056
        return h;
1064 1057
    }
1065 1058
    
1059
    /*private Hashtable processMMP(InputStream is)
1060
      throws IOException
1061
    {
1062
        String[] searchStrings = {"boundary=", "Content-Disposition: attachment; filename=systemmetadata",
1063
                "Content-Disposition: attachment; filename=object"};
1064
        byte[] b = new byte[1024];
1065
        int numread = is.read(b, 0, 1024);
1066
        int ssi = 0;
1067
        while(numread != -1)
1068
        {
1069
            String s = new String(b, 0, numread);
1070
            int[] result = StreamUtil.lookForMatch(searchStrings[ssi], s);
1071
            
1072
        }
1073
    }*/
1066 1074
    
1067 1075
    /**
1068 1076
     * Earthgrid API > Put Service >Put Function : calls MetacatHandler > handleInsertOrUpdateAction 
src/edu/ucsb/nceas/metacat/AuthLdap.java
388 388
			for (boolean moreReferrals = true; moreReferrals;) {
389 389
				try {
390 390
					// Perform the search
391
				    
391 392
					NamingEnumeration answer = sctx.search("", filter, ctls);
392 393

  
393 394
					// Return the answer
src/edu/ucsb/nceas/metacat/dataone/CrudService.java
315 315
        // Check if we are handling metadata or data
316 316
        boolean isScienceMetadata = isScienceMetadata(sysmeta);
317 317
        
318
        /* TODO:
319
         * For EML documents, the data url field needs to be checked here
320
         * and the describes and describedBy fields of the system metadata
321
         * need to be set with the appropriate uri.  Older EML documents
322
         * maybe have ecogrid:// uri's embedded in them.  See bug 618 
323
         * (https://trac.dataone.org/ticket/618) for more info on this.
324
         */
325 318
        if (isScienceMetadata) {
326 319
            // CASE METADATA:
327 320
            try {

Also available in: Unified diff