Changeset 711 for TI01-discovery
- Timestamp:
- 27/03/06 17:25:14 (15 years ago)
- Location:
- TI01-discovery/trunk/schema/numsim
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
TI01-discovery/trunk/schema/numsim/NumSim.xsd
r695 r711 1 1 <?xml version="1.0" encoding="UTF-8"?> 2 <xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema"> 2 <xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns:xlink="http://www.w3.org/1999/xlink" 3 xmlns:gco="http://www.isotc211.org/2005/gco" xmlns:gmd="http://www.isotc211.org/2005/gmd" 4 version="0071"> 5 <xs:annotation> 6 <xs:documentation> Author: Bryan Lawrence Version date: March 27th, 2006 </xs:documentation> 7 </xs:annotation> 8 <xs:annotation> 9 <xs:documentation>The expectation is that this schema will be used initially by import into 10 DIF discovery records and eventually into ISO19115 based discovery records. While such 11 discovery records already include adequate possibilities to include free text 12 information and/or URI references which would allow such discrimination for a human 13 reader, they do not allow the construction of sensible automatic discriminants, which 14 would allow a software agent to identify, for example, all simulation datasets based on 15 the IPCC SRESA1 forcing specification by the HADCM3 model. Such a software agent is 16 necessary to provide meaningful discovery services on an archive holding multiple 17 simulation datasets, and thus, there is a requirement to build information structures to 18 support such software agents. The NumSim schema provides a minimum set of such metadata 19 structures aimed at supporting the widest possible set of simulation codes. It is 20 expected that more detailed discipline specific metadata schema will exist, such as the 21 Numerical Model Metadata Suite (hereafter the NMM). Where such schema and instances 22 exist, it is desirable that the NumSim instances are automatically generated from the 23 more detailed metadata. </xs:documentation> 24 <xs:documentation>The NumSim schema exists in a context where NumSim compliant xml metadata 25 is to included in a document conforming to an (extensible) parent schema. That parent 26 schema is assumed to have adequate tags to fully describe the data produced by the 27 simulation, the point of the NumSim metadata is to discriminate between such datasets, 28 as a consequence all dataset description is offloaded to the parent schema, but there 29 are some tags which might appear in both the parent and the NumSim schema. In such a 30 case, the scope of the tag in the NumSim schema is simply the scope of the parent 31 element, while the scope of the tag in the parent document should be assumed to be 32 either that of the parent element, or in regard to the data, not the simulation. (For 33 example, reference lists may appear in multiple places in a discovery document, but 34 their scope and applicability is related to where they appear. By doing this it is 35 possible to search for datasets created by simulations with a particular model component 36 which was described in a particular </xs:documentation> 37 <xs:documentation>The simulated element is intended to appear as part of a dataset 38 description, and is used to discriminate between differing simulations of the same 39 phenomena. There are essentially three different cases where it is expected be used, and 40 for which it has been designed: (1) Where the dataset consists of one realization of the 41 simulated phenomena (a single integration of a numerical code). (2) Where the dataset 42 consists of multiple realizations of the phenomena (an ensemble), and (3) Where the 43 dataset consists of a single realization of the simulated phenomena, but where that 44 realization has been generated from an ensemble average (an ensemble âclimatologyâ). </xs:documentation> 45 <xs:documentation>There are a number of schema which are imported here, copies of which are 46 loaded into a directory of schema. These include xlinks.xsd and a number of draft 47 ISO19139 schema components. </xs:documentation> 48 </xs:annotation> 49 <xs:import namespace="http://www.w3.org/1999/xlink" 50 schemaLocation="../schemas.opengis.net/xlink/1.0.0/xlinks.xsd"/> 51 <xs:import namespace="http://www.isotc211.org/2005/gco" 52 schemaLocation="../iso19139/gml3.1.1version/gco/gco.xsd"/> 53 <xs:import namespace="http://www.isotc211.org/2005/gmd" 54 schemaLocation="../iso19139/gml3.1.1version/gmd/citation.xsd"/> 55 <xs:attributeGroup name="NS_link"> 56 <xs:annotation> 57 <xs:documentation> The attributes are those of a hyperlink, with the addition of a role 58 which we might later want to control in a vocabulary</xs:documentation> 59 </xs:annotation> 60 <xs:attribute ref="xlink:href" use="required"/> 61 <xs:attribute ref="xlink:title" use="required"/> 62 <xs:attribute ref="xlink:role" use="optional"/> 63 <xs:attribute name="dateOfCitation" type="gco:Date_Type" use="optional"/> 64 </xs:attributeGroup> 3 65 <xs:complexType name="NS_RelatedTo"> 4 <xs:sequence> 5 <xs:element name="NS_URI" type="xs:anyURI"/> 66 <xs:annotation> 67 <xs:documentation> Used for any relationships.</xs:documentation> 68 </xs:annotation> 69 <xs:sequence> 6 70 <xs:element name="NS_Relationship" type="xs:string"/> 7 71 </xs:sequence> 72 <xs:attributeGroup ref="NS_link"/> 8 73 </xs:complexType> 9 74 <xs:complexType name="NS_Description" mixed="true"> … … 14 79 </xs:complexType> 15 80 <xs:complexType name="NS_ReferenceList"> 16 <xs: sequence>81 <xs:choice> 17 82 <xs:element name="NS_Reference" type="xs:string" minOccurs="1" maxOccurs="unbounded"/> 18 </xs:sequence> 83 <xs:element name="NS_Citation" type="gmd:CI_Citation_Type" minOccurs="1" 84 maxOccurs="unbounded"/> 85 </xs:choice> 19 86 </xs:complexType> 20 87 <xs:complexType name="NS_ControlledParameters"> … … 132 199 <xs:complexType name="NS_EnsembleDetails"> 133 200 <xs:annotation> 134 <xs:documentation>Should only appear if the simulated data is from an ensemble of 135 simulations. Statistics should be set true if the original individual simulations 136 are not available. </xs:documentation> 137 </xs:annotation> 138 <xs:sequence> 139 <xs:element name="NS_EnsembleDescription" type="NS_Description" minOccurs="0" maxOccurs="1"/> 201 <xs:documentation>If not present, the default assumption should be that the simulation 202 is a single realization. If present, the attribute can identify that the data 203 represents an ensemble climatology by setting the Boolean EnsembleStatistics to 204 True, otherwise the default is that the data are multiple realizations. This element 205 may include multiple EnsembleType elements, which are drawn from the EnsembleTypes 206 controlled vocabulary: o Initial Condition o Perturbed Physics o Arbitrary 207 Collection o Single Mode o Multiple Model o Multiple Forcing o GrandEnsemble (any 208 combination of the others, in which case the exact combination should be recorded in 209 the EnsembleDescription element - itself including both a textural component and an 210 optional related URI for more information). If only one integration is included, 211 just one model element should be used. Whether an ensemble or a single integration 212 is described by this element, multiple boundary and initial conditions elements are 213 allowed (in the case of single integrations to support multiple components of the 214 model having different initial and/or boundary conditions, and for ensembles to 215 potentially include multiple boundary conditions associated with multiple forcings). 216 (Note that more complex ensemble statistics, such as, for example probability 217 distribution functions, are likely to be more fully described by the data 218 attributes, this attribute is simply used to aid users in finding ensemble averages 219 and avoid them being mistaken for instances and used inappropriately). 220 </xs:documentation> 221 </xs:annotation> 222 <xs:sequence> 223 <xs:element name="NS_EnsembleDescription" type="NS_Description" minOccurs="0" 224 maxOccurs="1"/> 140 225 <xs:element name="NS_EnsembleType" type="NS_EnsembleTypes" minOccurs="1" 141 226 maxOccurs="unbounded"/> … … 144 229 </xs:complexType> 145 230 <xs:complexType name="NS_Model"> 231 <xs:annotation> 232 <xs:documentation> The NS_Model complex type is used to both as the type of the overall 233 model description (forming a compulsory element within the NumSIm element itself), 234 and as the type of any sub component of that model. </xs:documentation> 235 </xs:annotation> 146 236 <xs:sequence> 147 237 <xs:element name="NS_Name" type="xs:string" minOccurs="1" maxOccurs="1"/> … … 151 241 maxOccurs="unbounded"/> 152 242 <xs:element name="NS_Description" type="NS_Description" minOccurs="0" maxOccurs="1"/> 153 <xs:element name="NS_RelatedModel" type="NS_RelatedTo" minOccurs="0" maxOccurs="1"/> 243 <xs:element name="NS_Resolution" type="NS_Description" minOccurs="0" maxOccurs="1"/> 244 <xs:element name="NS_RelatedModel" type="NS_RelatedTo" minOccurs="0" 245 maxOccurs="unbounded"/> 154 246 <xs:element name="NS_References" type="NS_ReferenceList" minOccurs="0" maxOccurs="1"/> 155 247 <xs:element name="NS_Component" type="NS_Model" minOccurs="0" maxOccurs="unbounded"/> … … 159 251 <xs:sequence> 160 252 <xs:element name="NS_Description" type="NS_Description"/> 161 <xs:element name="NS_Model" type="NS_Model" minOccurs=" 0" maxOccurs="unbounded"/>253 <xs:element name="NS_Model" type="NS_Model" minOccurs="1" maxOccurs="unbounded"/> 162 254 <xs:element name="NS_BoundaryCondition" type="NS_BoundaryCondition" minOccurs="0" 163 255 maxOccurs="unbounded"/> -
TI01-discovery/trunk/schema/numsim/NumSim2Html.py
r704 r711 3 3 # Start with methods for handling the various types we've defined and what they should look like 4 4 # 5 # See useful ideas at http://effbot.org/zone/element-iterparse.htm#plist 6 7 class ElementWrapper: 8 '''Return the character text tab from any subelement (returns None for 9 missing attributes/subelements unless they begin with __).''' 10 #From http://online.effbot.org/2003_07_01_archive.htm#element-tricks 11 def __init__(self, element): 12 self._element = element 13 def __getattr__(self, tag): 14 if tag.startswith("__"): raise AttributeError(tag) 15 return self._element.findtext(tag) 16 5 17 def hyperlink(target,name): 6 18 return '<a href="%s">%s</a>'%(target,name) 19 20 unmarshallers = { 21 # simple HTML 22 "anyURI": lambda x: hyperlink(x) 23 24 25 7 26 8 27 def RelatedTo(element,linkName='hyperlink',title=False):
Note: See TracChangeset
for help on using the changeset viewer.