Download - Introduction to WQX XML Schema
Introduction to WQX XML SchemaIntroduction to WQX XML SchemaIntroduction to WQX XML SchemaIntroduction to WQX XML Schema
Doug Timms, enfoTechDoug Timms, enfoTech
November 28, 2007November 28, 2007
11/28/2007
TopicsTopics
Getting StartedGetting Started
Schema StructureSchema Structure
Handling of AttachmentsHandling of Attachments
Other things to look out forOther things to look out for
11/28/2007
Helpful ResourcesHelpful Resources
1.1. Data Exchange Template Data Exchange Template (WQX_DET_v1.0.xls)(WQX_DET_v1.0.xls) 2.2. XML Schema XML Schema (WQX_Schema_v1.0.zip)(WQX_Schema_v1.0.zip)
3.3. Flow Configuration Document Flow Configuration Document (WQX_FCD_v1.0.zip)(WQX_FCD_v1.0.zip)
4.4. Domain Value Database Domain Value Database (WQX_ODS_MS_Access.zip)(WQX_ODS_MS_Access.zip)
1,2,3 found at: 1,2,3 found at: http://www.exchangenetwork.net/exchanges/water/wqx.htmhttp://www.exchangenetwork.net/exchanges/water/wqx.htm
4 found at: 4 found at: http://www.epa.gov/storet/wqx_downloads.htmlhttp://www.epa.gov/storet/wqx_downloads.html
11/28/2007
Data Exchange TemplateData Exchange Template
11/28/2007
WQX XML Schema File StructureWQX XML Schema File Structure
36 files
11/28/2007
Simplified Data StructureSimplified Data Structure
Organization
Project
MonitoringLocation
Activity
ActivityGroup
Result∞
∞
∞
∞
∞ LabSamplePreparation∞
11/28/2007
Monitoring LocationMonitoring Location
Consists of Following Groups:Consists of Following Groups:Monitoring Location IdentityMonitoring Location Identity
Monitoring Location GeospatialMonitoring Location Geospatial
Attachments (i.e. Binary Object)Attachments (i.e. Binary Object)
11/28/2007
ActivityActivity
Consists of Following Groups:Consists of Following Groups:Activity DescriptionActivity Description
Activity LocationActivity Location
Sample DescriptionSample Description
Attachments (i.e. Binary Object)Attachments (i.e. Binary Object)
Children ResultsChildren Results
Used to report expanded list of Activity Types Used to report expanded list of Activity Types (Field Measurement, Quality Control Samples, Dups, Blanks, (Field Measurement, Quality Control Samples, Dups, Blanks, Vertical Profile, Data Logger, etc…)Vertical Profile, Data Logger, etc…)
11/28/2007
Activity GroupActivity Group
Used as a generic method to group related Used as a generic method to group related Activities:Activities:
Field Set:Field Set: Used to group field activitiesUsed to group field activitiesQC Sample:QC Sample: Used to group activities/samples with Used to group activities/samples with related quality control samplesrelated quality control samplesReplicate:Replicate: Used to group samples/measurements Used to group samples/measurements of the same type, medium, etcof the same type, medium, etcSubsample:Subsample: Used to group samples with Used to group samples with subsamplessubsamples
Completely optional and up to data provider Completely optional and up to data provider on what level of detail to provideon what level of detail to provide
11/28/2007
Domain ValuesDomain Values
For any fields that are marked as “Domain List = For any fields that are marked as “Domain List = Yes”, you will need to either:Yes”, you will need to either:
use EPA/WQX’s values in your databaseuse EPA/WQX’s values in your database
Create a mapping table (or procedure) that converts your Create a mapping table (or procedure) that converts your codes to EPA’scodes to EPA’s
Special Case: ResultAnalyticalMethodSpecial Case: ResultAnalyticalMethodAllows either using EPA’s domain values or your ownAllows either using EPA’s domain values or your own
AnalyticalMethodContext:AnalyticalMethodContext:If = EPA predefined value (NIOSH, USEPA, AOAC, etc)If = EPA predefined value (NIOSH, USEPA, AOAC, etc)
Otherwise set =- to your Organization IDOtherwise set =- to your Organization ID
Otherwise it will be rejectedOtherwise it will be rejected
11/28/2007
Transaction HandlingTransaction Handling
Submit data either as “Insert/Updates” or “Deletes”Submit data either as “Insert/Updates” or “Deletes”Insert/Update:Insert/Update:
Use WQX_WQX_v1.0.xsdUse WQX_WQX_v1.0.xsdDon’t need to specify insert or update: system will recognize thisDon’t need to specify insert or update: system will recognize thisIn order to update a result, must resupply all information for that In order to update a result, must resupply all information for that activityactivity
Delete:Delete:Use WQX_WQX_Delete_v1.0.xsdUse WQX_WQX_Delete_v1.0.xsdJust need to supply Primary Key for the Project, Monitoring Just need to supply Primary Key for the Project, Monitoring Location, Activity, or Activity Group you would like to deleteLocation, Activity, or Activity Group you would like to deleteWhen a component is deleted, all children information is deleted as When a component is deleted, all children information is deleted as wellwell
Your system should have some capability to understand which Your system should have some capability to understand which data has been updated since your last submissiondata has been updated since your last submission
11/28/2007
Including AttachmentsIncluding Attachments
Attachments can be tracked at: Attachments can be tracked at: ProjectProject
Monitoring LocationMonitoring Location
ActivityActivity
ResultResult
Store the attachment’s filename (including extension) Store the attachment’s filename (including extension) in XMLin XML
Therefore each attachment must have a unique filenameTherefore each attachment must have a unique filename
Include attachments outside of XML, in ZIP fileInclude attachments outside of XML, in ZIP file
11/28/2007
QuestionsQuestions