Project

General

Profile

« Previous | Next » 

Revision 5523

Added by berkley over 14 years ago

moved the dataone types to the metacat.properties file

View differences:

lib/metacat.properties
14 14

  
15 15
############### Server Values #################
16 16

  
17
server.name=localhost
18
server.httpPort=80
19
server.httpSSLPort=443
17
server.name=slickrock.local
18
server.httpPort=8080
19
server.httpSSLPort=8443
20 20

  
21 21
############### Application Values ############
22 22

  
......
24 24
application.metacatVersion=@metacatVersion@
25 25
application.metacatReleaseInfo=@metacatReleaseInfo@
26 26

  
27
application.deployDir=
27
application.deployDir=/Users/berkley/tools/tomcat/webapps
28 28
## This is autodiscovered and populated by the config utility
29 29
application.context=
30 30
application.default-style=default
31 31
application.knbSiteURL=http://knb.ecoinformatics.org
32
application.backupDir=
33
application.datafilepath=/var/metacat/data
34
application.inlinedatafilepath=/var/metacat/inline-data
35
application.documentfilepath=/var/metacat/documents
32
application.backupDir=/Users/berkley/metacat/.knb
33
application.datafilepath=/Users/berkley/tools/metacat/data
34
application.inlinedatafilepath=/Users/berkley/tools/metacat/inline-data
35
application.documentfilepath=/Users/berkley/tools/metacat/documents
36 36
application.expandedArchivePath=/var/metacat/expanded-archives
37
application.tempDir=/var/metacat/temporary
37
application.tempDir=/Users/berkley/tools/metacat/temporary
38 38
# the location of cgi scripts relative to the metacat context directory
39 39
application.cgiDir=/cgi-bin
40 40
#used for writing debug info into a anouther out file
......
48 48
############### Database Values ###############
49 49

  
50 50
database.connectionURI=jdbc:postgresql://localhost/metacat
51
database.user=
52
database.password=
53
database.type=
54
database.driver=
55
database.adapter=
51
database.user=berkley
52
database.password=1008N16st
53
database.type=postgres
54
database.driver=org.postgresql.Driver
55
database.adapter=edu.ucsb.nceas.dbadapter.PostgresqlAdapter
56 56
database.scriptsuffix.postgres=postgres.sql
57 57
database.scriptsuffix.oracle=oracle.sql
58 58
database.scriptsuffix.sqlserver=sqlserver.sql
......
123 123
######## Datamanager section              #######################################
124 124
datamanager.adapter=PostgresAdapter
125 125
datamanager.implementation=edu.ucsb.nceas.metacat.dataquery.PostgresDatabaseConnectionPool
126
datamanager.server=localhost
126
datamanager.server=slickrock.local
127 127
datamanager.database=datamanager
128 128
datamanager.user=datamanager
129 129
datamanager.password=datamanager
......
142 142

  
143 143
######## Authentication and LDAP ##############################################
144 144

  
145
auth.class=edu.ucsb.nceas.metacat.AuthLdap
145
auth.class=edu.ucsb.nceas.metacat.AuthStub
146 146
# Use AuthStub to test and guarantee authentication
147 147
## auth.class=edu.ucsb.nceas.metacat.AuthStub
148 148
auth.timeoutMinutes=180
149 149
# auth.administrators=uid=jones,o=NCEAS,dc=ecoinformatics,dc=org
150
auth.administrators=
150
auth.administrators=uid=berkley,o=NCEAS,dc=ecoinformatics,dc=org
151 151
auth.url=ldap://ldap.ecoinformatics.org:389/
152 152
auth.surl=ldap://ldap.ecoinformatics.org:389/
153 153
auth.base=dc=ecoinformatics,dc=org
......
301 301

  
302 302
######## Replication properties  #########################################
303 303

  
304
replication.logdir=
304
replication.logdir=/Users/berkley/tools/metacat/logs
305 305
## deltaT=60
306 306
## debuglevel=55
307 307
replication.datafileflag=datafile
......
432 432
######## junit test section  ################
433 433

  
434 434
test.printdebug=true
435
test.metacatUrl=http://indus.msi.ucsb.edu/knb/metacat
436
test.contextUrl=http://indus.msi.ucsb.edu/knb
437
test.workflowSchedulerUrl=http://indus.msi.ucsb.edu/workflowscheduler/scheduler
435
test.metacatUrl=http://localhost:8080/knb/metacat
436
test.contextUrl=http://localhost:8080/knb
437
test.workflowSchedulerUrl=http://localhost:8080/workflowscheduler/scheduler
438 438
test.metacatDeployDir=/usr/local/tomcat/webapps/knb
439 439
test.mcUser=uid=kepler,o=unaffiliated,dc=ecoinformatics,dc=org
440 440
test.mcPassword=kepler
......
453 453
# Instead,  the system will use backed up configuration values.  If you 
454 454
# haven't ever configured the app (no backup files) the system will take 
455 455
# you through the configuration.
456
dev.runConfiguration=true
456
dev.runConfiguration=false
457 457

  
458

  
459
############# DataONE Section #######################################
460
dataone.scienceMetadataSchema1=eml://ecoinformatics.org/eml-2.0.0
461
dataone.scienceMetadataSchema2=eml://ecoinformatics.org/eml-2.0.1
462
dataone.scienceMetadataSchema3=eml://ecoinformatics.org/eml-2.1.0
463
dataone.scienceMetadataSchema4=FGDC-STD-001.1-1999
464
dataone.scienceMetadataSchema5=FGDC-STD-001-1998
465
dataone.scienceMetadataSchema6=INCITS 453-2009
466
dataone.scienceMetadataSchema7=http://www.unidata.ucar.edu/namespaces/netcdf/ncml-2.2
467
dataone.scienceMetadataSchema8=CF-1.0
468
dataone.scienceMetadataSchema9=CF-1.1
469
dataone.scienceMetadataSchema10=CF-1.2
470
dataone.scienceMetadataSchema11=CF-1.3
471
dataone.scienceMetadataSchema12=CF-1.4
472
dataone.scienceMetadataSchema13=http://www.cuahsi.org/waterML/1.0/
473
dataone.scienceMetadataSchema14=http://www.cuahsi.org/waterML/1.1/
474
dataone.scienceMetadataSchema15=DSPACE METS SIP Profile 1.0
475
dataone.scienceMetadataSchema16=netCDF-3
476
dataone.scienceMetadataSchema17=netCDF-4
477
dataone.scienceMetadataSchema18=http://rs.tdwg.org/dwc/xsd/simpledarwincore/
478
dataone.scienceMetadataSchema19=http://digir.net/schema/conceptual/darwin/2003/1.0/darwin2.xsd
479

  
src/edu/ucsb/nceas/metacat/dataone/MetadataTypeRegister.java
1
/**
2
 *  '$RCSfile$'
3
 *  Copyright: 2000 Regents of the University of California and the
4
 *              National Center for Ecological Analysis and Synthesis
5
 *
6
 *   '$Author: $'
7
 *     '$Date: 2009-06-13 15:28:13 +0300  $'
8
 *
9
 * This program is free software; you can redistribute it and/or modify
10
 * it under the terms of the GNU General Public License as published by
11
 * the Free Software Foundation; either version 2 of the License, or
12
 * (at your option) any later version.
13
 *
14
 * This program is distributed in the hope that it will be useful,
15
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
16
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
17
 * GNU General Public License for more details.
18
 *
19
 * You should have received a copy of the GNU General Public License
20
 * along with this program; if not, write to the Free Software
21
 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
22
 */
23
package edu.ucsb.nceas.metacat.dataone;
24

  
25
import java.io.*;
26
import java.util.*;
27

  
28
import edu.ucsb.nceas.metacat.properties.*;
29

  
30
import org.apache.log4j.Logger;
31
import org.dataone.service.types.*;
32

  
33
import edu.ucsb.nceas.metacat.properties.PropertyService;
34
import edu.ucsb.nceas.utilities.PropertyNotFoundException;
35

  
36
/**
37
 * @author berkley
38
 * A class to determine data types for metadata documents
39
 */
40
public class MetadataTypeRegister
41
{
42
    private static Logger log = null;
43
    
44
    public static boolean isMetadataType(ObjectFormat format)
45
    {
46
        log = Logger.getLogger(MetadataTypeRegister.class);
47
        if(format == null)
48
        {
49
            return false;
50
        }
51
        
52
        try
53
        {
54
            Map<String, String> types = PropertyService.getPropertiesByGroup("dataone");
55
            //System.out.println("types: " + types.toString());
56
            Iterator<String> vals = types.values().iterator();
57
            //System.out.println("MetadataTypeRegister: looking through dataone types for type " + format.toString());
58
            while(vals.hasNext())
59
            {
60
                String val = vals.next();
61
                String ofVal = format.toString();
62
                System.out.println("val: " + val);
63
                if(val.trim().equals(ofVal.trim()))
64
                {
65
                    //System.out.println("returning true");
66
                    log.info("type " + val + " IS a dataone metadata type");
67
                    return true;
68
                }
69
            }
70
        }
71
        catch(PropertyNotFoundException pnfe)
72
        {
73
            log.error("Could not find the property 'dataone': " + pnfe.getMessage());
74
        }
75
        
76
        if(format != null)
77
        {
78
            log.info("type " + format.toString() + " is NOT a dataone metadata type");
79
        }
80
        else
81
        {
82
            log.info("A null format is not a dataone metadata type");
83
        }
84
        
85
        return false;
86
    }
87
}
src/edu/ucsb/nceas/metacat/dataone/CrudService.java
1315 1315
     * @return true if the object should be treated as science metadata
1316 1316
     */
1317 1317
    private boolean isScienceMetadata(SystemMetadata sysmeta) {
1318
        boolean scimeta = false;
1318
        /*boolean scimeta = false;
1319 1319
        //TODO: this should be read from a .properties file instead of being hard coded
1320 1320
        switch (sysmeta.getObjectFormat()) {
1321 1321
            case EML_2_1_0: scimeta = true; break;
......
1327 1327
            case DSPACE_METS_SIP_1_0: scimeta = true; break;
1328 1328
        }
1329 1329
        
1330
        return scimeta;
1330
        return scimeta;*/
1331
        
1332
        return MetadataTypeRegister.isMetadataType(sysmeta.getObjectFormat());
1331 1333
    }
1332 1334

  
1333 1335
    /**

Also available in: Unified diff