Changeset 7762 for mauRepo/xml2owl
- Timestamp:
- 02/12/10 14:50:28 (10 years ago)
- Location:
- mauRepo/xml2owl/trunk
- Files:
-
- 7 edited
Legend:
- Unmodified
- Added
- Removed
-
mauRepo/xml2owl/trunk/protege.properties
r7757 r7762 1 1 #Protege Properties 2 #Wed Dec 01 09:36:12 GMT 2010 2 #Thu Dec 02 13:45:26 GMT 2010 3 history.projects.reopen=file\:/home/users/mnagni/workspace/ESGGateway/metafor/examples/newspaper/newspaper.pprj,file\:/home/users/mnagni/workspace/ESGGateway/metafor/examples/pizza/pizza.owl.pprj 3 4 SwitchableClassDefinitionType=edu.stanford.smi.protegex.owl.ui.cls.LogicClassDefinitionWidgetType 4 history.projects.reopen=file\:/home/users/mnagni/workspace/ESGGateway/metafor/examples/newspaper/newspaper.pprj,file\:/home/users/mnagni/workspace/ESGGateway/metafor/examples/pizza/pizza.owl.pprj -
mauRepo/xml2owl/trunk/src/main/java/ndg/ontology/OntIngester.java
r7757 r7762 141 141 } 142 142 143 private <T> void ingest(final Iterator<T> ops, XQExpression xqe) throws XPathExpressionException, XQException {143 private <T> void ingest(final Iterator<T> ops, final XQExpression xqe) throws XPathExpressionException { 144 144 while (ops.hasNext()) { 145 145 T obj = ops.next(); … … 151 151 } else if (obj instanceof AddTripleLiteral) { 152 152 process((AddTripleLiteral) obj, xqe); 153 } 154 } catch (StatementSupportException e) { 155 if (LOGGER.isErrorEnabled()) { 156 LOGGER.error("Error! But continuing to loop. Detailed error follows ", e); 153 157 } 154 155 } catch (StatementSupportException e) { 156 LOGGER.error("Error! But continuing to loop. Detailed error follows ", e); 158 } catch (XQException e) { 159 if (LOGGER.isErrorEnabled()) { 160 LOGGER.error("Error! But continuing to loop. Detailed error follows ", e); 161 } 162 } catch (Exception e) { 163 if (LOGGER.isErrorEnabled()) { 164 LOGGER.error("Error! But continuing to loop. Detailed error follows ", e); 165 } 157 166 } 158 167 } … … 172 181 } 173 182 174 statementSupport.addLabel(sbjClass, values[0] , values[1]);183 statementSupport.addLabel(sbjClass, values[0].trim(), values[1].trim()); 175 184 } 176 185 … … 190 199 continue; 191 200 } 192 statementSupport.addLabel(sbjClass, values[0] , values[1]);201 statementSupport.addLabel(sbjClass, values[0].trim(), values[1].trim()); 193 202 } 194 203 … … 229 238 continue; 230 239 } 231 sbjURI = values[0] ;232 objURI = values[1] ;240 sbjURI = values[0].trim(); 241 objURI = values[1].trim(); 233 242 predURI = ontPredicate; 234 243 } … … 255 264 } 256 265 257 statementSupport.addProperty(sbjClass, values[0] , ontPredicate, objClass, values[1]);266 statementSupport.addProperty(sbjClass, values[0].trim(), ontPredicate, objClass, values[1].trim()); 258 267 } 259 268 -
mauRepo/xml2owl/trunk/src/main/java/ndg/ontology/parser/support/ProtegeeOntSupport.java
r7757 r7762 36 36 if (individualURI == null) { 37 37 throw new IndividualException("individualURI null"); 38 } 38 } 39 40 String indURI = individualURI.replaceAll("\\s", "_"); 39 41 40 42 OWLNamedClass clazz = getClass(classURI); … … 42 44 throw new IndividualException("Class(" + classURI + ") does not exists!"); 43 45 } 44 OWLIndividual individual = model.getOWLIndividual(ind ividualURI);45 if (individual == null ) {46 individual = clazz.createOWLIndividual(ind ividualURI);46 OWLIndividual individual = model.getOWLIndividual(indURI); 47 if (individual == null || !individual.hasRDFType(clazz)) { 48 individual = clazz.createOWLIndividual(indURI); 47 49 } 48 50 49 51 if (individual == null) { 50 throw new IndividualException("Cannot create Individual(" + classURI + ":" + ind ividualURI + ")");52 throw new IndividualException("Cannot create Individual(" + classURI + ":" + indURI + ")"); 51 53 } 52 54 53 55 if (LOGGER.isDebugEnabled()) { 54 LOGGER.debug("Created Individual(" + classURI + ":" + ind ividualURI + ")");56 LOGGER.debug("Created Individual(" + classURI + ":" + indURI + ")"); 55 57 } 56 58 return individual; -
mauRepo/xml2owl/trunk/src/test/resources/2.1E.FutureTimeSlice_Ensemble.xml
r7757 r7762 8 8 --> 9 9 10 <rationale> To explore the degree to which future climate states depend on the initial climate state (from 'A Summary of the CMIP5 Experiment Design' by Karl Taylor et al. 2008)</rationale> 11 <why></why> 10 <rationale>2030 time-slice ensemble. Explore the degree to which future climate states depend on the initial climate state. </rationale> 11 <description>Additional expt. 2.1 runs but with different initial conditions imposed on the atmosphere, sea-ice and ocean and possibly also the land). Yield an ensemble of size â¥3. 12 The changes in climatological SSTs and sea-ice used in prescribing the SST and sea-ice in these extended time-slice runs should, 13 when available, be taken from more than one pair of coupled atmosphere/ocean model runs.</description> 14 12 15 13 16 <!-- Initial Conditions --> 17 <numericalRequirement xsi:type="InitialCondition"> 18 <id xsi:type="Identifier">ic.001</id> 19 <name xsi:type="Identifier">2.1.ic</name> 20 <description>A description of initial condition for the control run </description> 21 </numericalRequirement> 22 14 23 <numericalRequirement xsi:type="InitialCondition" > 24 <id xsi:type="Identifier">ic.017</id> 25 <name xsi:type="Identifier">2.1E.ic.atmos</name> 15 26 <description>Different Initial Conditions imposed on atmosphere to that of experiment 2.1</description> 16 <id xsi:type="Identifier">2.1E.ic.atmos</id>17 27 </numericalRequirement> 18 28 <numericalRequirement xsi:type="InitialCondition" > 29 <id xsi:type="Identifier">ic.018</id> 30 <name xsi:type="Identifier">2.1E.ic.ocean</name> 19 31 <description>Different Initial Conditions imposed on ocean to that of experiment 2.1</description> 20 <id xsi:type="Identifier">2.1E.ic.ocean</id>21 32 </numericalRequirement> 22 33 <numericalRequirement xsi:type="InitialCondition" > 34 <id xsi:type="Identifier">ic.019</id> 35 <name xsi:type="Identifier">2.1E.ic.seaice</name> 23 36 <description>Different Initial Conditions imposed on sea-ice to that of experiment 2.1</description> 24 <id xsi:type="Identifier">2.1E.ic.seaice</id>25 37 </numericalRequirement> 26 38 <numericalRequirement xsi:type="InitialCondition" > 39 <id xsi:type="Identifier">ic.020</id> 40 <name xsi:type="Identifier">2.1E.ic.land</name> 27 41 <description>Different Initial Conditions imposed on land surface to that of experiment 2.1</description> 28 <id xsi:type="Identifier">2.1E.ic.land</id>29 42 </numericalRequirement> 30 43 31 44 <!-- Boundary/Forcing Conditions --> 32 45 <numericalRequirement xsi:type="BoundaryCondition"> 33 <description>Prescribed SST anomolies (relative to exp 3.3) based on either (a) climatology difference between years 2026-2035 (from expt 4.1) and years 1979-2008 (from expt 3.2), OR (b) climatology difference between years 2026-2035 (from expt 1.2) and years 1979-2008 (from expt 1.1)</description> 34 <id xsi:type="Identifier">2.1.bc.sst</id> 35 </numericalRequirement> 36 <numericalRequirement xsi:type="BoundaryCondition"> 37 <description>Prescribed Sea Ice concentration anomolies (relative to exp 3.3) based on either (a) climatology difference between years 2026-2035 (from expt 4.1) and years 1979-2008 (from expt 3.2), OR (b) climatology difference between years 2026-2035 (from expt 1.2) and years 1979-2008 (from expt 1.1)</description> 38 <id xsi:type="Identifier">2.1.bc.seaice</id> 39 </numericalRequirement> 40 <numericalRequirement xsi:type="BoundaryCondition"> 41 <description> For future dates, the RCP4.5 scenario should be used</description> 42 <id xsi:type="Identifier">2.1E.bc.rcp4.5</id> 46 <id xsi:type="Identifier">bc.062</id> 47 <name xsi:type="Identifier">2.1E.bc.sst</name> 48 <description>Prescribed SST anomolies (relative to exp 3.3) based on either (a) climatology difference between years 2026-2035 (from expt 4.1) and years 1979-2008 (from expt 3.2), OR (b) climatology difference between years 2026-2035 (from expt 1.2) and years 1979-2008 (from expt 1.1)</description> 43 49 </numericalRequirement> 44 50 51 <numericalRequirement xsi:type="BoundaryCondition"> 52 <id xsi:type="Identifier">bc.063</id> 53 <name xsi:type="Identifier">2.1E.bc.sst</name> 54 <description>Prescribed Sea Ice concentration anomolies (relative to exp 3.3) based on either (a) climatology difference between years 2026-2035 (from expt 4.1) and years 1979-2008 (from expt 3.2), OR (b) climatology difference between years 2026-2035 (from expt 1.2) and years 1979-2008 (from expt 1.1)</description> 55 </numericalRequirement> 56 57 <numericalRequirement xsi:type="BoundaryCondition"> 58 <name xsi:type="Identifier">2.1E.bc.rcp45_wmg</name> 59 <description>Imposed changing concentrations or emissions of RCP4.5 well mixed gases including CO2</description> 60 <requirementOption> 61 <id xsi:type="Identifier">bc.025</id> 62 <name xsi:type="Identifier">2.1E.bc.rcp45_wmg_conc</name> 63 <description>Concentrations</description> 64 </requirementOption> 65 <requirementOption> 66 <id xsi:type="Identifier">bc.029</id> 67 <name xsi:type="Identifier">2.1E.bc.rcp45_wmg_em</name> 68 <description>Emissions</description> 69 </requirementOption> 70 </numericalRequirement> 71 72 <numericalRequirement xsi:type="BoundaryCondition"> 73 <name xsi:type="Identifier">2.1E.bc.rcp45_sls</name> 74 <description>Imposed changing concentrations or emissions of RCP4.5 short lived gas species </description> 75 <requirementOption> 76 <id xsi:type="Identifier">bc.026</id> 77 <name xsi:type="Identifier">2.1E.bc.rcp45_sls_conc</name> 78 <description>Concentrations</description> 79 </requirementOption> 80 <requirementOption> 81 <id xsi:type="Identifier">bc.030</id> 82 <name xsi:type="Identifier">2.1E.bc.rcp45_sls_em</name> 83 <description>Emissions</description> 84 </requirementOption> 85 </numericalRequirement> 86 87 <numericalRequirement xsi:type="BoundaryCondition"> 88 <name xsi:type="Identifier">2.1E.bc.rcp45_aer</name> 89 <description>Imposed changing concentrations or emissions of RCP4.5 aerosols</description> 90 <requirementOption> 91 <id xsi:type="Identifier">bc.027</id> 92 <name xsi:type="Identifier">2.1E.bc.rcp45_aer_conc</name> 93 <description>Concentrations</description> 94 </requirementOption> 95 <requirementOption> 96 <id xsi:type="Identifier">bc.031</id> 97 <name xsi:type="Identifier">2.1E.bc.rcp45_aer_em</name> 98 <description>Emissions</description> 99 </requirementOption> 100 </numericalRequirement> 101 102 <numericalRequirement xsi:type="BoundaryCondition"> 103 <name xsi:type="Identifier">2.1E.bc.rcp45_aer_pre</name> 104 <description>Imposed changing concentrations or emissions of RCP4.5 aerosol precursors</description> 105 <requirementOption> 106 <id xsi:type="Identifier">bc.028</id> 107 <name xsi:type="Identifier">2.1E.bc.rcp45_aer_pre_conc</name> 108 <description>Concentrations</description> 109 </requirementOption> 110 <requirementOption> 111 <id xsi:type="Identifier">bc.032</id> 112 <name xsi:type="Identifier">2.1E.bc.rcp45_aer_pre_em</name> 113 <description>Emissions</description> 114 </requirementOption> 115 </numericalRequirement> 116 117 <numericalRequirement xsi:type="BoundaryCondition"> 118 <id xsi:type="Identifier">bc.033</id> 119 <name xsi:type="Identifier">2.1E.bc.rcp45_LU</name> 120 <description>Imposed changing RCP4.5 land use</description> 121 </numericalRequirement> 122 123 45 124 <shortName> 46 CMIP5_NumReq_2.1E125 2.1E SST-2030 47 126 </shortName> 48 127 <longName> 49 CMIP5 Tier 2 Time-slice experiment 2.1E - Future "time-slice" experiment ensemble128 2030 time-slice - Ensemble 50 129 </longName> 51 130 52 131 <calendar> 53 <daily-360> 54 <range> 55 <closedDateRange></closedDateRange> 56 </range> 57 </daily-360> 132 <realCalendar></realCalendar> 58 133 </calendar> 59 < requiredDuration xsi:type="ClosedDateRange">134 <numericalRequirement xsi:type="SpatioTemporalConstraint"><name xsi:type="Identifier">2.1E.stc.2026_10yr</name><id xsi:type="Identifier">stc.023</id><description>Begin in 2026 and run for 10 years </description><requiredDuration xsi:type="ClosedDateRange"> 60 135 <startDate> 2026-01-01T00:00:00Z</startDate> 61 136 <endDate> 2036-01-01T00:00:00Z </endDate> 62 </requiredDuration> 137 <length units="years">10</length> 138 </requiredDuration></numericalRequirement> 63 139 <author> 64 140 <gmd:CI_ResponsibleParty> … … 92 168 </author> 93 169 <documentID xsi:type="Identifier"> 94 3.1_pi-control95 170 </documentID> 96 171 <creationDate> -
mauRepo/xml2owl/trunk/src/test/resources/experimentIngestConfig.xml
r7757 r7762 148 148 </ndg:addTripleLiteral> 149 149 150 <ndg:addTripleLiteral> 151 <ndg:ontSubject> 152 http://www.earthsystemgrid.org/esg.owl#Experiment 153 </ndg:ontSubject> 154 <ndg:ontPredicate uri="http://www.earthsystemgrid.org/esg.owl#hasExperimentNumber"/> 155 <ndg:xquery> 156 <![CDATA[ 157 declare default element namespace "http://www.metaforclimate.eu/cim/1.1"; 158 declare namespace xsi="http://www.w3.org/2001/XMLSchema-instance"; 159 for $sn in //numericalExperiment 160 return 161 concat(substring-before($sn/documentID, '_'), ";;", substring-before($sn/documentID, '_')) 162 ]]> 163 </ndg:xquery> 164 </ndg:addTripleLiteral> 165 150 166 <!-- NUMERICAL_EXPERIMENT.triple --> 151 167 <ndg:addTriple> -
mauRepo/xml2owl/trunk/src/test/resources/ingesterConfig.xml
r7732 r7762 211 211 <![CDATA[ 212 212 declare default element namespace "http://www.metaforclimate.eu/schema/cim/1.5"; 213 for $sn in //CIMRecord/simulationRun/ conformance/reference/name213 for $sn in //CIMRecord/simulationRun//conformance/requirement/reference/name 214 214 return 215 215 concat($sn, ";;", $sn) -
mauRepo/xml2owl/trunk/src/test/resources/sample_cmip5qn_100930_mark.xml
r7732 r7762 14676 14676 <longName>Machine IBM Power 6 and compiler Other</longName> 14677 14677 <machine> 14678 <machineName>IBM Power6</machineName>14678 <machineName>IBM_Power_6</machineName> 14679 14679 <machineSystem>Parallel</machineSystem> 14680 14680 <machineOperatingSystem value="AIX"/>
Note: See TracChangeset
for help on using the changeset viewer.