Anonymous avatar Anonymous committed be91616

Changes Completed:
1. Validation changes:
a. Element: westBoundingCoordinate
Possible values: -180.0000 to 180.0000
Help text: Longitude of western-most point of bounding box (-180 to 180 degrees)
Error message: Must be between -180 and 180 degrees
b. Element: eastBoundingCoordinate
Possible values: -180.0000 to 180.0000
Help text: Longitude of eastern-most point of bounding box (-180 to 180 degrees)
Error message: Must be between -180 and 180 degrees
c. Element: northBoundingCoordinate
Possible values: -90.0000 to 90.0000
Help text: Latitude of northern-most point of bounding box (-90 to 90 degrees)
Error message: Must be between -90 and 90 degrees
d. Element: southBoundingCoordinate
Possible values: -90.0000 to 90.0000
Help text: Latitude of southern-most point of bounding box (-90 to 90 degrees)
Error message: Must be between -90 and 90 degrees
2. Column Description :
a. make all fields mandatory (Except units if the user chooses dateTime or text)
b. replace "float" with "real" in generated XML
c. there is a required element missing from the EML: if the user chooses <dateTime> in the UI, the EML generated should have the element <formatString> populated with a non-empty string. Rather than ask the user for this, please automatically populate the element with the phrase below.
<dateTime>
<formatString>
The user has designated this column as some form of date and/or time. No standard is specified due to DataUp coding constraints.
</formatString>
</dateTime>
3. there is a required element missing from the EML: if the user chooses text (i.e. <nominal>), there should be non-empty string for <definition>. Rather than have the user define this (since it's not part of the UI right now), auto-fill this element with the value that what the user entered for
<attributeDefinition>
<nominal>
<textDomain>
<definition>
auto-fill this with the value of the "attributeDefinition" element
</definition>
</textDomain>
</nominal>

Comments (0)

Files changed (32)

Source/Excel/Excel.AddIn/Excel.AddIn/Controller/Controller.cs

                     if (Target != null)
                     {
                         Microsoft.Office.Interop.Excel.Range activeCell = (Microsoft.Office.Interop.Excel.Range)Target;
-                        if (activeCell != null && activeCell.Column == 6)
+                        if (activeCell != null && activeCell.Column == 8)
                         {
                             string cellValue = activeCell.Value == null ? string.Empty : Convert.ToString(activeCell.Value);
 

Source/Excel/Excel.AddIn/Excel.AddIn/Extensions/MetadataViewModelExtensions.cs

             thisObject.Value = metadata.Value;
             thisObject.FieldType = metadata.FieldType;
 
+            thisObject.MaximumAllowedValue = metadata.MaximumAllowedValue;
+            thisObject.MinimumAllowedValue = metadata.MinimumAllowedValue;
+
             return thisObject;
         }
 

Source/Excel/Excel.AddIn/Excel.AddIn/NewScientificMetadata.xml

         Geographic coverage: West bounding coordinate
       </field>
       <description>
-        Provide lattitudinal and longitudinal boundaries for your dataset.
+        Longitude of western-most point of bounding box (-180 to 180 degrees).
       </description>
       <mapping>
         eml.dataset.coverage.geographicCoverage.boundingCoordinates.westBoundingCoordinate
       </mapping>
+      <type>
+        Range
+      </type>
+      <valueRange>
+        <minimumValue>-180.00</minimumValue>
+        <maximumValue>180.00</maximumValue>
+      </valueRange>
     </metadata>
 
     <metadata>
         Geographic coverage: East bounding coordinate
       </field>
       <description>
-        Provide lattitudinal and longitudinal boundaries for your dataset.
+        Longitude of eastern-most point of bounding box (-180 to 180 degrees).
       </description>
       <mapping>
         eml.dataset.coverage.geographicCoverage.boundingCoordinates.eastBoundingCoordinate
       </mapping>
+      <type>
+        Range
+      </type>
+      <valueRange>
+        <minimumValue>-180.00</minimumValue>
+        <maximumValue>180.00</maximumValue>
+      </valueRange>
     </metadata>
 
     <metadata>
         Geographic coverage: North bounding coordinate
       </field>
       <description>
-        Provide lattitudinal and longitudinal boundaries for your dataset.
+        Latitude of northern-most point of bounding box (-90 to 90 degrees).
       </description>
       <mapping>
         eml.dataset.coverage.geographicCoverage.boundingCoordinates.northBoundingCoordinate
       </mapping>
+      <type>
+        Range
+      </type>
+      <valueRange>
+        <minimumValue>-90.00</minimumValue>
+        <maximumValue>90.00</maximumValue>
+      </valueRange>
     </metadata>
 
     <metadata>
         Geographic coverage: South bounding coordinate
       </field>
       <description>
-        Provide lattitudinal and longitudinal boundaries for your dataset.
+        Latitude of southern-most point of bounding box (-90 to 90 degrees).
       </description>
       <mapping>
         eml.dataset.coverage.geographicCoverage.boundingCoordinates.southBoundingCoordinate
       </mapping>
+      <type>
+        Range
+      </type>
+      <valueRange>
+        <minimumValue>-90.00</minimumValue>
+        <maximumValue>90.00</maximumValue>
+      </valueRange>
     </metadata>
 
     <metadata>
       <mapping>
         eml.dataset.contact.phone
       </mapping>
+      <type>
+        Phone
+      </type>
     </metadata>
 
     <metadata>
 
     <metadata>
       <field>
-        Identifier
-      </field>
-      <description>
-        This identifier is used to identify the object in repository.
-      </description>
-      <mapping>
-        eml.dataset.dataTable.Identifier
-      </mapping>
-    </metadata>
-
-    <metadata>
-      <field>
         Formatted citation
       </field>
       <description>
         eml.additionalMetadata.metadata.formattedCitation
       </mapping>
     </metadata>
-
+    
+    <metadata>
+      <field> 
+        Identifier 
+      </field>
+      <description> 
+        This identifier is used to identify the object in repository. 
+      </description>
+      <mapping> 
+        eml.dataset.dataTable.Identifier 
+      </mapping>
+    </metadata>
+    
   </metadatagroup>
 </metadatalist>

Source/Excel/Excel.AddIn/Excel.AddIn/View/Usercontrols/Metadata.xaml

                             <DataGridTemplateColumn Width="100" Header="Entity Name *">
                                 <DataGridTemplateColumn.CellTemplate>
                                     <DataTemplate>
-                                        <ComboBox SelectedItem="{Binding EntityName, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}"
+                                        <ComboBox SelectedItem="{Binding EntityName, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged, ValidatesOnDataErrors=True, NotifyOnValidationError=true}"
                                                   ItemsSource="{Binding DataContext.EntityNameList, RelativeSource={RelativeSource AncestorType={x:Type DataGrid}}}"/>
                                     </DataTemplate>
                                 </DataGridTemplateColumn.CellTemplate>
                             </DataGridTemplateColumn>
-                            <DataGridTemplateColumn Width="200" Header="Entity Description">
+                            <DataGridTemplateColumn Width="200" Header="Entity Description *">
                                 <DataGridTemplateColumn.CellTemplate>
                                     <DataTemplate>
-                                        <TextBox Text="{Binding EntityDescription, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}" ToolTip="{Binding EntityDescription}"/>  
+                                        <TextBox Text="{Binding EntityDescription, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged, ValidatesOnDataErrors=True, NotifyOnValidationError=true}" ToolTip="{Binding EntityDescription}"/>  
                                     </DataTemplate>
                                 </DataGridTemplateColumn.CellTemplate>
                             </DataGridTemplateColumn>
                                 </DataGridTemplateColumn.CellTemplate>
                             </DataGridTemplateColumn>
 
-                            <DataGridTemplateColumn Width="200" Header="Description">
+                            <DataGridTemplateColumn Width="200" Header="Description *">
                                 <DataGridTemplateColumn.CellTemplate>
                                     <DataTemplate>
-                                        <TextBox Text="{Binding Description, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}" ToolTip="{Binding Description}" />
+                                        <TextBox Text="{Binding Description, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged, ValidatesOnDataErrors=True, NotifyOnValidationError=true}" ToolTip="{Binding Description}" />
                                     </DataTemplate>
                                 </DataGridTemplateColumn.CellTemplate>
                             </DataGridTemplateColumn>
 
-                            <DataGridTemplateColumn Width="100" Header="Type">
+                            <DataGridTemplateColumn Width="100" Header="Type *">
                                 <DataGridTemplateColumn.CellTemplate>
                                     <DataTemplate>
-                                        <ComboBox SelectedItem="{Binding Type, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}"
+                                        <ComboBox SelectedItem="{Binding Type, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged, ValidatesOnDataErrors=True, NotifyOnValidationError=true}"
                                                   ItemsSource="{Binding DataContext.TypeList, RelativeSource={RelativeSource AncestorType={x:Type DataGrid}}}"/>
                                     </DataTemplate>
                                 </DataGridTemplateColumn.CellTemplate>
                             <DataGridTemplateColumn Width="100" Header="Units">
                                 <DataGridTemplateColumn.CellTemplate>
                                     <DataTemplate>
-                                        <ComboBox IsEditable="True" Text="{Binding Units, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}" IsEnabled="{Binding EnableUnits}"
+                                        <ComboBox IsEditable="True" Text="{Binding Units, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged, ValidatesOnDataErrors=True, NotifyOnValidationError=true}" 
+                                                  IsEnabled="{Binding EnableUnits}"
                                                   ItemsSource="{Binding DataContext.StandardUnitsList, RelativeSource={RelativeSource AncestorType={x:Type DataGrid}}}" />
                                     </DataTemplate>
                                 </DataGridTemplateColumn.CellTemplate>

Source/Excel/Excel.AddIn/Excel.AddIn/ViewModels/MetadataViewModel.cs

 
         public FieldType FieldType { get; set; }
 
+        public float? MinimumAllowedValue { get; set; }
+
+        public float? MaximumAllowedValue { get; set; }
+
         #region IDataErrorInfo Members
 
         public string Error
                             result = string.Format("{0} should be a valid phone number.", this.Name);
                         }
                         break;
+                    case FieldType.Range:
+                        float intermediateFloat;
+                        if (float.TryParse(this.Value, out intermediateFloat))
+                        {
+                            if ((this.MinimumAllowedValue.HasValue && this.MaximumAllowedValue.HasValue) && (intermediateFloat < this.MinimumAllowedValue.Value || intermediateFloat > this.MaximumAllowedValue.Value))
+                            {
+                                result = string.Format("Must be between{0} and {1} degrees", this.MinimumAllowedValue, this.MaximumAllowedValue);
+                            }
+                        }
+                        else
+                        {
+                            result = string.Format("Must be between{0} and {1} degrees", this.MinimumAllowedValue, this.MaximumAllowedValue);
+                        }
+                        break;
                     case FieldType.String:
                     default:
                         break;

Source/Excel/Excel.AddIn/Excel.AddIn/ViewModels/ParameterMetadataViewModel.cs

             }
             set
             {
-                this.type = value;
-                OnNotifyPropertyChanged("Type");
-                this.EnableUnits = string.Compare(this.type, "Numeric", true) == 0;
-                if (!this.EnableUnits)
+                if (this.type != value)
                 {
+                    this.type = value;
+                    OnNotifyPropertyChanged("Type");
+                    this.EnableUnits = string.Compare(this.type, "Numeric", true) == 0;
                     this.Units = string.Empty;
                 }
             }
 
         public bool Validate()
         {
-            if (String.IsNullOrEmpty(this.Name))
+            if (string.IsNullOrWhiteSpace(this.Name) || string.IsNullOrWhiteSpace(this.Description) || string.IsNullOrWhiteSpace(this.EntityDescription) || string.IsNullOrWhiteSpace(this.EntityName) || string.IsNullOrWhiteSpace(this.Type))
+            {
+                return false;
+            }
+
+            if (EnableUnits && string.IsNullOrWhiteSpace(Units))
             {
                 return false;
             }
                 switch(columnName)
                 {
                     case "Name":
-                        if (String.IsNullOrEmpty(Name))
+                        if (string.IsNullOrWhiteSpace(Name))
                         {
                             errorMsg = "Name is required.";
                         }
                         break;
+                    case "Description":
+                        if (string.IsNullOrWhiteSpace(Description))
+                        {
+                            errorMsg = "Description is required.";
+                        }
+                        break;
+                    case "EntityDescription":
+                        if (string.IsNullOrWhiteSpace(EntityDescription))
+                        {
+                            errorMsg = "EntityDescription is required.";
+                        }
+                        break;
+                    case "EntityName":
+                        if (string.IsNullOrWhiteSpace(EntityName))
+                        {
+                            errorMsg = "EntityName is required.";
+                        }
+                        break;
+                    case "Type":
+                        if (string.IsNullOrWhiteSpace(Type))
+                        {
+                            errorMsg = "Type is required.";
+                        }
+                        break;
+                    case "Units":
+                        if (EnableUnits && string.IsNullOrWhiteSpace(Units))
+                        {
+                            errorMsg = "Units is required.";
+                        }
+                        break;
                 }
                 return errorMsg;
             }

Source/Excel/Excel.BizLogic/Managers/MetadataManager.cs

                                 Description = item.description.Trim(),
                                 Type = !string.IsNullOrWhiteSpace(item.type) ? item.type.Trim() : string.Empty,
                                 IsRequired = item.isrequired,
-                                FieldType = !string.IsNullOrWhiteSpace(item.type) ? item.type.Trim().ToEnum<string, FieldType>(FieldType.String) : FieldType.String
+                                FieldType = !string.IsNullOrWhiteSpace(item.type) ? item.type.Trim().ToEnum<string, FieldType>(FieldType.String) : FieldType.String,
+                                MinimumAllowedValue = item.valueRange != null ? item.valueRange.minimumValue : null,
+                                MaximumAllowedValue = item.valueRange != null ? item.valueRange.maximumValue : null
                             });
                         }
                     }

Source/Excel/Excel.BizLogic/MetadataSchema.cs

 //------------------------------------------------------------------------------
 // <auto-generated>
 //     This code was generated by a tool.
-//     Runtime Version:4.0.30319.544
+//     Runtime Version:4.0.30319.269
 //
 //     Changes to this file may cause incorrect behavior and will be lost if
 //     the code is regenerated.
 // </auto-generated>
 //------------------------------------------------------------------------------
 
+using System.Xml.Serialization;
+
 // 
 // This source code was auto-generated by xsd, Version=4.0.30319.1.
 // 
-namespace DataUp.Excel.BizLogic
-{
-    using System.Xml.Serialization;
+
+
+/// <remarks/>
+[System.CodeDom.Compiler.GeneratedCodeAttribute("xsd", "4.0.30319.1")]
+[System.SerializableAttribute()]
+[System.Diagnostics.DebuggerStepThroughAttribute()]
+[System.ComponentModel.DesignerCategoryAttribute("code")]
+[System.Xml.Serialization.XmlTypeAttribute(AnonymousType=true)]
+[System.Xml.Serialization.XmlRootAttribute(Namespace="", IsNullable=false)]
+public partial class metadatalist {
     
+    private metadatalistMetadatagroup[] metadatagroupField;
     
     /// <remarks/>
-    [System.CodeDom.Compiler.GeneratedCodeAttribute("xsd", "4.0.30319.1")]
-    [System.SerializableAttribute()]
-    [System.Diagnostics.DebuggerStepThroughAttribute()]
-    [System.ComponentModel.DesignerCategoryAttribute("code")]
-    [System.Xml.Serialization.XmlTypeAttribute(AnonymousType=true)]
-    [System.Xml.Serialization.XmlRootAttribute(Namespace="", IsNullable=false)]
-    public partial class metadatalist {
-        
-        private metadatalistMetadatagroup[] metadatagroupField;
-        
-        /// <remarks/>
-        [System.Xml.Serialization.XmlElementAttribute("metadatagroup")]
-        public metadatalistMetadatagroup[] metadatagroup {
-            get {
-                return this.metadatagroupField;
-            }
-            set {
-                this.metadatagroupField = value;
-            }
+    [System.Xml.Serialization.XmlElementAttribute("metadatagroup")]
+    public metadatalistMetadatagroup[] metadatagroup {
+        get {
+            return this.metadatagroupField;
+        }
+        set {
+            this.metadatagroupField = value;
+        }
+    }
+}
+
+/// <remarks/>
+[System.CodeDom.Compiler.GeneratedCodeAttribute("xsd", "4.0.30319.1")]
+[System.SerializableAttribute()]
+[System.Diagnostics.DebuggerStepThroughAttribute()]
+[System.ComponentModel.DesignerCategoryAttribute("code")]
+[System.Xml.Serialization.XmlTypeAttribute(AnonymousType=true)]
+public partial class metadatalistMetadatagroup {
+    
+    private string prefixField;
+    
+    private metadatalistMetadatagroupMetadata[] metadataField;
+    
+    /// <remarks/>
+    public string prefix {
+        get {
+            return this.prefixField;
+        }
+        set {
+            this.prefixField = value;
         }
     }
     
     /// <remarks/>
-    [System.CodeDom.Compiler.GeneratedCodeAttribute("xsd", "4.0.30319.1")]
-    [System.SerializableAttribute()]
-    [System.Diagnostics.DebuggerStepThroughAttribute()]
-    [System.ComponentModel.DesignerCategoryAttribute("code")]
-    [System.Xml.Serialization.XmlTypeAttribute(AnonymousType=true)]
-    public partial class metadatalistMetadatagroup {
-        
-        private string prefixField;
-        
-        private metadatalistMetadatagroupMetadata[] metadataField;
-        
-        /// <remarks/>
-        public string prefix {
-            get {
-                return this.prefixField;
-            }
-            set {
-                this.prefixField = value;
-            }
+    [System.Xml.Serialization.XmlElementAttribute("metadata")]
+    public metadatalistMetadatagroupMetadata[] metadata {
+        get {
+            return this.metadataField;
         }
-        
-        /// <remarks/>
-        [System.Xml.Serialization.XmlElementAttribute("metadata")]
-        public metadatalistMetadatagroupMetadata[] metadata {
-            get {
-                return this.metadataField;
-            }
-            set {
-                this.metadataField = value;
-            }
+        set {
+            this.metadataField = value;
+        }
+    }
+}
+
+/// <remarks/>
+[System.CodeDom.Compiler.GeneratedCodeAttribute("xsd", "4.0.30319.1")]
+[System.SerializableAttribute()]
+[System.Diagnostics.DebuggerStepThroughAttribute()]
+[System.ComponentModel.DesignerCategoryAttribute("code")]
+[System.Xml.Serialization.XmlTypeAttribute(AnonymousType=true)]
+public partial class metadatalistMetadatagroupMetadata {
+    
+    private string fieldField;
+    
+    private string typeField;
+    
+    private bool isrequiredField;
+    
+    private string descriptionField;
+    
+    private string mappingField;
+    
+    private metadatalistMetadatagroupMetadataValueRange valueRangeField;
+    
+    public metadatalistMetadatagroupMetadata() {
+        this.fieldField = "xs:string";
+        this.isrequiredField = false;
+        this.mappingField = "xs:string";
+    }
+    
+    /// <remarks/>
+    public string field {
+        get {
+            return this.fieldField;
+        }
+        set {
+            this.fieldField = value;
         }
     }
     
     /// <remarks/>
-    [System.CodeDom.Compiler.GeneratedCodeAttribute("xsd", "4.0.30319.1")]
-    [System.SerializableAttribute()]
-    [System.Diagnostics.DebuggerStepThroughAttribute()]
-    [System.ComponentModel.DesignerCategoryAttribute("code")]
-    [System.Xml.Serialization.XmlTypeAttribute(AnonymousType=true)]
-    public partial class metadatalistMetadatagroupMetadata {
-        
-        private string fieldField;
-        
-        private string typeField;
-        
-        private bool isrequiredField;
-        
-        private string descriptionField;
-        
-        private string mappingField;
-        
-        public metadatalistMetadatagroupMetadata() {
-            this.fieldField = "xs:string";
-            this.isrequiredField = false;
-            this.mappingField = "xs:string";
+    public string type {
+        get {
+            return this.typeField;
         }
-        
-        /// <remarks/>
-        public string field {
-            get {
-                return this.fieldField;
-            }
-            set {
-                this.fieldField = value;
-            }
+        set {
+            this.typeField = value;
         }
-        
-        /// <remarks/>
-        public string type {
-            get {
-                return this.typeField;
-            }
-            set {
-                this.typeField = value;
-            }
+    }
+    
+    /// <remarks/>
+    [System.Xml.Serialization.XmlElementAttribute("is-required")]
+    [System.ComponentModel.DefaultValueAttribute(false)]
+    public bool isrequired {
+        get {
+            return this.isrequiredField;
         }
-        
-        /// <remarks/>
-        [System.Xml.Serialization.XmlElementAttribute("is-required")]
-        [System.ComponentModel.DefaultValueAttribute(false)]
-        public bool isrequired {
-            get {
-                return this.isrequiredField;
-            }
-            set {
-                this.isrequiredField = value;
-            }
+        set {
+            this.isrequiredField = value;
         }
-        
-        /// <remarks/>
-        public string description {
-            get {
-                return this.descriptionField;
-            }
-            set {
-                this.descriptionField = value;
-            }
+    }
+    
+    /// <remarks/>
+    public string description {
+        get {
+            return this.descriptionField;
         }
-        
-        /// <remarks/>
-        public string mapping {
-            get {
-                return this.mappingField;
-            }
-            set {
-                this.mappingField = value;
-            }
+        set {
+            this.descriptionField = value;
+        }
+    }
+    
+    /// <remarks/>
+    public string mapping {
+        get {
+            return this.mappingField;
+        }
+        set {
+            this.mappingField = value;
+        }
+    }
+    
+    /// <remarks/>
+    public metadatalistMetadatagroupMetadataValueRange valueRange {
+        get {
+            return this.valueRangeField;
+        }
+        set {
+            this.valueRangeField = value;
         }
     }
 }
+
+/// <remarks/>
+[System.CodeDom.Compiler.GeneratedCodeAttribute("xsd", "4.0.30319.1")]
+[System.SerializableAttribute()]
+[System.Diagnostics.DebuggerStepThroughAttribute()]
+[System.ComponentModel.DesignerCategoryAttribute("code")]
+[System.Xml.Serialization.XmlTypeAttribute(AnonymousType=true)]
+public partial class metadatalistMetadatagroupMetadataValueRange {
+    
+    private System.Nullable<float> minimumValueField;
+    
+    private bool minimumValueFieldSpecified;
+    
+    private System.Nullable<float> maximumValueField;
+    
+    private bool maximumValueFieldSpecified;
+    
+    /// <remarks/>
+    [System.Xml.Serialization.XmlElementAttribute(IsNullable=true)]
+    public System.Nullable<float> minimumValue {
+        get {
+            return this.minimumValueField;
+        }
+        set {
+            this.minimumValueField = value;
+        }
+    }
+    
+    /// <remarks/>
+    [System.Xml.Serialization.XmlIgnoreAttribute()]
+    public bool minimumValueSpecified {
+        get {
+            return this.minimumValueFieldSpecified;
+        }
+        set {
+            this.minimumValueFieldSpecified = value;
+        }
+    }
+    
+    /// <remarks/>
+    [System.Xml.Serialization.XmlElementAttribute(IsNullable=true)]
+    public System.Nullable<float> maximumValue {
+        get {
+            return this.maximumValueField;
+        }
+        set {
+            this.maximumValueField = value;
+        }
+    }
+    
+    /// <remarks/>
+    [System.Xml.Serialization.XmlIgnoreAttribute()]
+    public bool maximumValueSpecified {
+        get {
+            return this.maximumValueFieldSpecified;
+        }
+        set {
+            this.maximumValueFieldSpecified = value;
+        }
+    }
+}

Source/Excel/Excel.BizLogic/MetadataSchema.xsd

                                         <xs:element minOccurs="0" maxOccurs="1" name="is-required" type="xs:boolean" default="false" />
                                         <xs:element minOccurs="0" maxOccurs="1" name="description" type="xs:string" />
                                         <xs:element minOccurs="1" maxOccurs="1" name="mapping" type="xs:string" default="xs:string" />
+                                        <xs:element name="valueRange" minOccurs="0" maxOccurs="1">
+                                          <xs:complexType>
+                                            <xs:sequence>
+                                              <xs:element minOccurs="0" maxOccurs="1" name="minimumValue" type="xs:float" nillable="true" />
+                                              <xs:element minOccurs="0" maxOccurs="1" name="maximumValue" type="xs:float" nillable="true" />
+                                            </xs:sequence>
+                                          </xs:complexType>
+                                        </xs:element>
                                     </xs:sequence>
                                 </xs:complexType>
-                            </xs:element>
+                              </xs:element>
                         </xs:sequence>
                     </xs:complexType>
                 </xs:element>

Source/Excel/Excel.BizLogic/Models/Enum.cs

         DateTime = 1,
         Email = 2,
         Phone = 3,
+        Range = 4,
     }
 }

Source/Excel/Excel.BizLogic/Models/MetadataDetail.cs

         /// Gets or sets the field type of metadata.
         /// </summary>
         public FieldType FieldType { get; set; }
+
+        public float? MinimumAllowedValue { get; set; }
+
+        public float? MaximumAllowedValue { get; set; }
     }
 
     public class KeyValue

Source/WebClient/Web.Azure/ServiceConfiguration.Local.cscfg

       <Setting name="ClientValidationEnabled" value="true" />
       <Setting name="UnobtrusiveJavaScriptEnabled" value="true" />
       <Setting name="FederationMetadataLocation" value="https://dcxlstaging.accesscontrol.windows.net/FederationMetadata/2007-06/FederationMetadata.xml" />
-      <Setting name="DataUpWebServiceLink" value="http://adminservicedev.cloudapp.net/" />
+      <Setting name="DataUpWebServiceLink" value="https://adminservicedev.cloudapp.net/RepositoryService" />
       <Setting name="Reg" value="[&lt;&gt;\?\@\\''\\;\\$\\!\\#\\(\\)\\^\\&amp;\\{\\}\\+\\-\\.\\~\\/\\%\\*\\\&quot;/\|]+" />
       <Setting name="Reg2" value="[&lt;&gt;\⌂\\Ç\\ü\\é\\Æ\\£\\¥\\ó\\ú\\Ñ\\¿\\⌐\\½\\¼\\«\\»\\│\\ß\\µ\\±\\°\\∙\\€\\†\\‡\\Š\\™\\œ\\Ÿ\\©\\®\\Ã\\Î\\Ô\\×\\÷\\ø\\þ\/\|]+" />
-      <Setting name="Profile_Identifier" value="dcxl_ark_only" />
-      <Setting name="Profile_Post" value="dcxl_dataup_content" />
+      <Setting name="Profile_Identifier" value="oneshare_ark_only" />
+      <Setting name="Profile_Post" value="oneshare_dataup_content" />
       <Setting name="DemoVideoUrl" value="https://adminservicedev.blob.core.windows.net/demo/dataup-web.wmv" />
       <Setting name="Microsoft.WindowsAzure.Plugins.Diagnostics.ConnectionString" value="DefaultEndpointsProtocol=https;AccountName=datatupstorage;AccountKey=JNP40XUjm6C+0pXYmtTMx7MSKg2+bbjUUjj8usDi8rEE9Z6VGy9iQ5kGwcpmmXcLkw8VsROwzPFRt97lafs9+A==" />
     </ConfigurationSettings>

Source/WebClient/Web.BizLogic/Helper/MetadataHelper.cs

                                 Name = item.field.Trim(),
                                 Description = item.description.Trim(),
                                 IsRequired = item.isrequired,
-                                Type = (item.type == null)? item.type: item.type.Trim()
+                                Type = (item.type == null)? item.type: item.type.Trim(),
+                                MinimumAllowedValue = item.valueRange != null ? item.valueRange.minimumValue : null,
+                                MaximumAllowedValue = item.valueRange != null ? item.valueRange.maximumValue : null
                             });
                         }
                     }

Source/WebClient/Web.BizLogic/MetadataSchema.cs

 //------------------------------------------------------------------------------
 // <auto-generated>
 //     This code was generated by a tool.
-//     Runtime Version:4.0.30319.544
+//     Runtime Version:4.0.30319.269
 //
 //     Changes to this file may cause incorrect behavior and will be lost if
 //     the code is regenerated.
 // </auto-generated>
 //------------------------------------------------------------------------------
 
+using System.Xml.Serialization;
+
 // 
 // This source code was auto-generated by xsd, Version=4.0.30319.1.
 // 
-namespace DataUp.Web.BizLogic {
-    using System.Xml.Serialization;
+
+
+/// <remarks/>
+[System.CodeDom.Compiler.GeneratedCodeAttribute("xsd", "4.0.30319.1")]
+[System.SerializableAttribute()]
+[System.Diagnostics.DebuggerStepThroughAttribute()]
+[System.ComponentModel.DesignerCategoryAttribute("code")]
+[System.Xml.Serialization.XmlTypeAttribute(AnonymousType=true)]
+[System.Xml.Serialization.XmlRootAttribute(Namespace="", IsNullable=false)]
+public partial class metadatalist {
     
+    private metadatalistMetadatagroup[] metadatagroupField;
     
     /// <remarks/>
-    [System.CodeDom.Compiler.GeneratedCodeAttribute("xsd", "4.0.30319.1")]
-    [System.SerializableAttribute()]
-    [System.Diagnostics.DebuggerStepThroughAttribute()]
-    [System.ComponentModel.DesignerCategoryAttribute("code")]
-    [System.Xml.Serialization.XmlTypeAttribute(AnonymousType=true)]
-    [System.Xml.Serialization.XmlRootAttribute(Namespace="", IsNullable=false)]
-    public partial class metadatalist {
-        
-        private metadatalistMetadatagroup[] metadatagroupField;
-        
-        /// <remarks/>
-        [System.Xml.Serialization.XmlElementAttribute("metadatagroup")]
-        public metadatalistMetadatagroup[] metadatagroup {
-            get {
-                return this.metadatagroupField;
-            }
-            set {
-                this.metadatagroupField = value;
-            }
+    [System.Xml.Serialization.XmlElementAttribute("metadatagroup")]
+    public metadatalistMetadatagroup[] metadatagroup {
+        get {
+            return this.metadatagroupField;
+        }
+        set {
+            this.metadatagroupField = value;
+        }
+    }
+}
+
+/// <remarks/>
+[System.CodeDom.Compiler.GeneratedCodeAttribute("xsd", "4.0.30319.1")]
+[System.SerializableAttribute()]
+[System.Diagnostics.DebuggerStepThroughAttribute()]
+[System.ComponentModel.DesignerCategoryAttribute("code")]
+[System.Xml.Serialization.XmlTypeAttribute(AnonymousType=true)]
+public partial class metadatalistMetadatagroup {
+    
+    private string prefixField;
+    
+    private metadatalistMetadatagroupMetadata[] metadataField;
+    
+    /// <remarks/>
+    public string prefix {
+        get {
+            return this.prefixField;
+        }
+        set {
+            this.prefixField = value;
         }
     }
     
     /// <remarks/>
-    [System.CodeDom.Compiler.GeneratedCodeAttribute("xsd", "4.0.30319.1")]
-    [System.SerializableAttribute()]
-    [System.Diagnostics.DebuggerStepThroughAttribute()]
-    [System.ComponentModel.DesignerCategoryAttribute("code")]
-    [System.Xml.Serialization.XmlTypeAttribute(AnonymousType=true)]
-    public partial class metadatalistMetadatagroup {
-        
-        private string prefixField;
-        
-        private metadatalistMetadatagroupMetadata[] metadataField;
-        
-        /// <remarks/>
-        public string prefix {
-            get {
-                return this.prefixField;
-            }
-            set {
-                this.prefixField = value;
-            }
+    [System.Xml.Serialization.XmlElementAttribute("metadata")]
+    public metadatalistMetadatagroupMetadata[] metadata {
+        get {
+            return this.metadataField;
         }
-        
-        /// <remarks/>
-        [System.Xml.Serialization.XmlElementAttribute("metadata")]
-        public metadatalistMetadatagroupMetadata[] metadata {
-            get {
-                return this.metadataField;
-            }
-            set {
-                this.metadataField = value;
-            }
+        set {
+            this.metadataField = value;
+        }
+    }
+}
+
+/// <remarks/>
+[System.CodeDom.Compiler.GeneratedCodeAttribute("xsd", "4.0.30319.1")]
+[System.SerializableAttribute()]
+[System.Diagnostics.DebuggerStepThroughAttribute()]
+[System.ComponentModel.DesignerCategoryAttribute("code")]
+[System.Xml.Serialization.XmlTypeAttribute(AnonymousType=true)]
+public partial class metadatalistMetadatagroupMetadata {
+    
+    private string fieldField;
+    
+    private string typeField;
+    
+    private bool isrequiredField;
+    
+    private string descriptionField;
+    
+    private string mappingField;
+    
+    private metadatalistMetadatagroupMetadataValueRange valueRangeField;
+    
+    public metadatalistMetadatagroupMetadata() {
+        this.fieldField = "xs:string";
+        this.isrequiredField = false;
+        this.mappingField = "xs:string";
+    }
+    
+    /// <remarks/>
+    public string field {
+        get {
+            return this.fieldField;
+        }
+        set {
+            this.fieldField = value;
         }
     }
     
     /// <remarks/>
-    [System.CodeDom.Compiler.GeneratedCodeAttribute("xsd", "4.0.30319.1")]
-    [System.SerializableAttribute()]
-    [System.Diagnostics.DebuggerStepThroughAttribute()]
-    [System.ComponentModel.DesignerCategoryAttribute("code")]
-    [System.Xml.Serialization.XmlTypeAttribute(AnonymousType=true)]
-    public partial class metadatalistMetadatagroupMetadata {
-        
-        private string fieldField;
-        
-        private string typeField;
-        
-        private bool isrequiredField;
-        
-        private string descriptionField;
-        
-        private string mappingField;
-        
-        public metadatalistMetadatagroupMetadata() {
-            this.fieldField = "xs:string";
-            this.isrequiredField = false;
-            this.mappingField = "xs:string";
+    public string type {
+        get {
+            return this.typeField;
         }
-        
-        /// <remarks/>
-        public string field {
-            get {
-                return this.fieldField;
-            }
-            set {
-                this.fieldField = value;
-            }
+        set {
+            this.typeField = value;
         }
-        
-        /// <remarks/>
-        public string type {
-            get {
-                return this.typeField;
-            }
-            set {
-                this.typeField = value;
-            }
+    }
+    
+    /// <remarks/>
+    [System.Xml.Serialization.XmlElementAttribute("is-required")]
+    [System.ComponentModel.DefaultValueAttribute(false)]
+    public bool isrequired {
+        get {
+            return this.isrequiredField;
         }
-        
-        /// <remarks/>
-        [System.Xml.Serialization.XmlElementAttribute("is-required")]
-        [System.ComponentModel.DefaultValueAttribute(false)]
-        public bool isrequired {
-            get {
-                return this.isrequiredField;
-            }
-            set {
-                this.isrequiredField = value;
-            }
+        set {
+            this.isrequiredField = value;
         }
-        
-        /// <remarks/>
-        public string description {
-            get {
-                return this.descriptionField;
-            }
-            set {
-                this.descriptionField = value;
-            }
+    }
+    
+    /// <remarks/>
+    public string description {
+        get {
+            return this.descriptionField;
         }
-        
-        /// <remarks/>
-        public string mapping {
-            get {
-                return this.mappingField;
-            }
-            set {
-                this.mappingField = value;
-            }
+        set {
+            this.descriptionField = value;
+        }
+    }
+    
+    /// <remarks/>
+    public string mapping {
+        get {
+            return this.mappingField;
+        }
+        set {
+            this.mappingField = value;
+        }
+    }
+    
+    /// <remarks/>
+    public metadatalistMetadatagroupMetadataValueRange valueRange {
+        get {
+            return this.valueRangeField;
+        }
+        set {
+            this.valueRangeField = value;
         }
     }
 }
+
+/// <remarks/>
+[System.CodeDom.Compiler.GeneratedCodeAttribute("xsd", "4.0.30319.1")]
+[System.SerializableAttribute()]
+[System.Diagnostics.DebuggerStepThroughAttribute()]
+[System.ComponentModel.DesignerCategoryAttribute("code")]
+[System.Xml.Serialization.XmlTypeAttribute(AnonymousType=true)]
+public partial class metadatalistMetadatagroupMetadataValueRange {
+    
+    private System.Nullable<float> minimumValueField;
+    
+    private bool minimumValueFieldSpecified;
+    
+    private System.Nullable<float> maximumValueField;
+    
+    private bool maximumValueFieldSpecified;
+    
+    /// <remarks/>
+    [System.Xml.Serialization.XmlElementAttribute(IsNullable=true)]
+    public System.Nullable<float> minimumValue {
+        get {
+            return this.minimumValueField;
+        }
+        set {
+            this.minimumValueField = value;
+        }
+    }
+    
+    /// <remarks/>
+    [System.Xml.Serialization.XmlIgnoreAttribute()]
+    public bool minimumValueSpecified {
+        get {
+            return this.minimumValueFieldSpecified;
+        }
+        set {
+            this.minimumValueFieldSpecified = value;
+        }
+    }
+    
+    /// <remarks/>
+    [System.Xml.Serialization.XmlElementAttribute(IsNullable=true)]
+    public System.Nullable<float> maximumValue {
+        get {
+            return this.maximumValueField;
+        }
+        set {
+            this.maximumValueField = value;
+        }
+    }
+    
+    /// <remarks/>
+    [System.Xml.Serialization.XmlIgnoreAttribute()]
+    public bool maximumValueSpecified {
+        get {
+            return this.maximumValueFieldSpecified;
+        }
+        set {
+            this.maximumValueFieldSpecified = value;
+        }
+    }
+}

Source/WebClient/Web.BizLogic/MetadataSchema.xsd

                                         <xs:element minOccurs="0" maxOccurs="1" name="is-required" type="xs:boolean" default="false" />
                                         <xs:element minOccurs="0" maxOccurs="1" name="description" type="xs:string" />
                                         <xs:element minOccurs="1" maxOccurs="1" name="mapping" type="xs:string" default="xs:string" />
+                                        <xs:element name="valueRange" minOccurs="0" maxOccurs="1">
+                                          <xs:complexType>
+                                            <xs:sequence>
+                                              <xs:element minOccurs="0" maxOccurs="1" name="minimumValue" type="xs:float" nillable="true" />
+                                              <xs:element minOccurs="0" maxOccurs="1" name="maximumValue" type="xs:float" nillable="true" />
+                                            </xs:sequence>
+                                          </xs:complexType>
+                                        </xs:element>
                                     </xs:sequence>
                                 </xs:complexType>
-                            </xs:element>
+                              </xs:element>
                         </xs:sequence>
                     </xs:complexType>
                 </xs:element>

Source/WebClient/Web.BizLogic/Model/MetadataDetail.cs

         public string Description { get; set; }
 
         public string Value { get; set; }
+
+        public float? MinimumAllowedValue { get; set; }
+
+        public float? MaximumAllowedValue { get; set; }
     }
 
     /// <summary>

Source/WebClient/Web.Client/Controllers/ErrorController.cs

             return View(errorMessage);
         }
 
+        /// <summary>
+        /// Action handling on the run time errors
+        /// </summary>
+        /// <returns>view</returns>
+        public ActionResult Index()
+        {
+            return View();
+        }
     }
 }

Source/WebClient/Web.Client/Controllers/HomeController.cs

 using System.Web.Mvc;
 using System.Diagnostics;
+using System;
 
 namespace DataUp.Web.Client.Controllers
 {
     {
         public ActionResult Index()
         {
-            Trace.TraceInformation("Home.Index called");
+            //Trace.TraceInformation("Home.Index called");
             return View();
         }
 

Source/WebClient/Web.Client/Extensions/DocumentDetailViewModelExtension.cs

                     metadata.Description = item.Description;
                     metadata.IsCompulsory = item.IsRequired;
                     metadata.Validationtype = item.Type;
-
+                    metadata.MinimumAllowedValue = item.MinimumAllowedValue;
+                    metadata.MaximumAllowedValue = item.MaximumAllowedValue;
                     viewmodel.MetadataList.Add(metadata);
                 }
             }

Source/WebClient/Web.Client/Global.asax.cs

-using System.Web.Mvc;
+using System;
+using System.Collections.Generic;
+using System.Diagnostics;
+using System.IO;
+using System.Linq;
+using System.Web;
+using System.Web.Mvc;
 using System.Web.Routing;
-using Microsoft.Practices.Unity;
+using DataUp.Web.BizLogic;
+using DataUp.Web.Client.Controllers;
 using DataUp.Web.Common;
 using DataUp.Web.DataLayer;
-using DataUp.Web.BizLogic;
-using System;
-using System.Linq;
-using System.Collections.Generic;
+using Microsoft.Practices.Unity;
 using Microsoft.WindowsAzure;
+using Microsoft.WindowsAzure.ServiceRuntime;
 
 namespace DataUp.Web.Client
 {
             });
 
             AreaRegistration.RegisterAllAreas();
-
             RegisterGlobalFilters(GlobalFilters.Filters);
             RegisterRoutes(RouteTable.Routes);
             RegisterUnityContainer();
         }
 
+        protected void Application_Error(object sender, EventArgs e)
+        {
+            var httpContext = ((MvcApplication)sender).Context;
+            var currentController = " ";
+            var currentAction = " ";
+            var currentRouteData = RouteTable.Routes.GetRouteData(new HttpContextWrapper(httpContext));
+            if (currentRouteData != null)
+            {
+                if (currentRouteData.Values["controller"] != null && !String.IsNullOrEmpty(currentRouteData.Values["controller"].ToString()))
+                {
+                    currentController = currentRouteData.Values["controller"].ToString();
+                }
+                if (currentRouteData.Values["action"] != null && !String.IsNullOrEmpty(currentRouteData.Values["action"].ToString()))
+                {
+                    currentAction = currentRouteData.Values["action"].ToString();
+                }
+            }
+            var ex = Server.GetLastError();
+            if (RoleEnvironment.IsAvailable)
+            {
+                Trace.TraceInformation(string.Format("Error details : Controller Name : {0}, Action :{1}, Exception Message {2} and Stack Tracke {3}", currentController, currentAction, ex.Message, ex.StackTrace));
+            }
+            else
+            {
+                LogErrorToFile(ex);
+            }
+            var controller = new ErrorController();
+            var routeData = new RouteData();
+            httpContext.ClearError();
+            httpContext.Response.Clear();
+            httpContext.Response.StatusCode = ex is HttpException ? ((HttpException)ex).GetHttpCode() : 500;
+            httpContext.Response.TrySkipIisCustomErrors = true;
+            routeData.Values["controller"] = "Error";
+            routeData.Values["action"] = "Index";
+            controller.ViewData.Model = new HandleErrorInfo(ex, currentController, currentAction);
+            ((IController)controller).Execute(new RequestContext(new HttpContextWrapper(httpContext), routeData));
+        }
+
         /// <summary>
         /// Application Initialize 
         /// </summary>
                 "{controller}/{action}/{id}", // URL with parameters
                 new { controller = "Home", action = "Index", id = UrlParameter.Optional } // Parameter defaults
             );
+
+            routes.IgnoreRoute("{resource}.axd/{*pathInfo}");
+
         }
 
         /// <summary>
                 manager.Dispose();
             }
         }
+
+        /// <summary>
+        /// Method to write the log file to the base directory
+        /// </summary>
+        /// <param name="objException">exception object</param>
+        private void LogErrorToFile(Exception objException)
+        {
+            string strException = string.Empty;
+            try
+            {
+                StreamWriter sw = new StreamWriter(GetLogFilePath(), true);
+                sw.WriteLine("Source        : " + objException.Source.ToString().Trim());
+                sw.WriteLine("Method        : " + objException.TargetSite.Name.ToString());
+                sw.WriteLine("Date        : " + DateTime.Now.ToShortDateString());
+                sw.WriteLine("Time        : " + DateTime.Now.ToShortTimeString());                
+                sw.WriteLine("Error        : " + objException.Message.ToString().Trim());
+                sw.WriteLine("Stack Trace    : " + objException.StackTrace.ToString().Trim());
+                sw.WriteLine("^^-------------------------------------------------------------------^^");
+                sw.Flush();
+                sw.Close();
+            }
+            catch (Exception ex)
+            {
+             EventLog.WriteEntry("Error in writting Error Log file,details is "+ ex.Message,"DataUp", EventLogEntryType.Error);   
+            }
+        }
+
+        /// <summary>
+        /// Method to get the log file path
+        /// </summary>
+        /// <returns></returns>
+        private static string GetLogFilePath()
+        {
+            try
+            {
+                // get the base directory
+                string baseDir = AppDomain.CurrentDomain.BaseDirectory + "Logs";
+                                
+                //create a text file
+                
+                if (!Directory.Exists(baseDir))
+                       Directory.CreateDirectory(baseDir);
+
+                // search the file below the current directory
+                string retFilePath = baseDir + "//" + "Error_" + DateTime.Today.Date.ToShortDateString().Replace("/","_") + ".txt";
+
+                // if exists, return the path
+                if (File.Exists(retFilePath) == true)
+                    return retFilePath;
+                    FileStream fs = new FileStream(retFilePath,
+                          FileMode.OpenOrCreate, FileAccess.ReadWrite);
+                    fs.Close();
+                
+                return retFilePath;
+            }
+            catch (Exception)
+            {
+                return string.Empty;
+            }
+        }
     }
 }

Source/WebClient/Web.Client/Model/DocumentMetadata.cs

         public string Validationtype { get; set; } // Phone, Email, DateTime
 
         public string Description { get; set; }
+
+        public float? MinimumAllowedValue { get; set; }
+        public float? MaximumAllowedValue { get; set; }
     }
 }

Source/WebClient/Web.Client/NewScientificMetadata.xml

         Geographic coverage: West bounding coordinate
       </field>
       <description>
-        Provide lattitudinal and longitudinal boundaries for your dataset.
+        Longitude of western-most point of bounding box (-180 to 180 degrees).
       </description>
       <mapping>
         eml.dataset.coverage.geographicCoverage.boundingCoordinates.westBoundingCoordinate
       </mapping>
+      <type>
+        Range
+      </type>
+      <valueRange>
+        <minimumValue>-180.00</minimumValue>
+        <maximumValue>180.00</maximumValue>
+      </valueRange>
     </metadata>
 
     <metadata>
         Geographic coverage: East bounding coordinate
       </field>
       <description>
-        Provide lattitudinal and longitudinal boundaries for your dataset.
+        Longitude of eastern-most point of bounding box (-180 to 180 degrees).
       </description>
       <mapping>
         eml.dataset.coverage.geographicCoverage.boundingCoordinates.eastBoundingCoordinate
       </mapping>
+      <type>
+        Range
+      </type>
+      <valueRange>
+        <minimumValue>-180.00</minimumValue>
+        <maximumValue>180.00</maximumValue>
+      </valueRange>
     </metadata>
 
     <metadata>
         Geographic coverage: North bounding coordinate
       </field>
       <description>
-        Provide lattitudinal and longitudinal boundaries for your dataset.
+        Latitude of northern-most point of bounding box (-90 to 90 degrees).
       </description>
       <mapping>
         eml.dataset.coverage.geographicCoverage.boundingCoordinates.northBoundingCoordinate
       </mapping>
+      <type>
+        Range
+      </type>
+      <valueRange>
+        <minimumValue>-90.00</minimumValue>
+        <maximumValue>90.00</maximumValue>
+      </valueRange>
     </metadata>
 
     <metadata>
         Geographic coverage: South bounding coordinate
       </field>
       <description>
-        Provide lattitudinal and longitudinal boundaries for your dataset.
+        Latitude of southern-most point of bounding box (-90 to 90 degrees).
       </description>
       <mapping>
         eml.dataset.coverage.geographicCoverage.boundingCoordinates.southBoundingCoordinate
       </mapping>
+      <type>
+        Range
+      </type>
+      <valueRange>
+        <minimumValue>-90.00</minimumValue>
+        <maximumValue>90.00</maximumValue>
+      </valueRange>
     </metadata>
 
     <metadata>
         eml.dataset.contact.individualName.surName
       </mapping>
     </metadata>
-    
+
     <metadata>
       <field>
         Data Contact Person: Organization
         eml.dataset.contact.organizationName
       </mapping>
     </metadata>
-    
+
     <metadata>
       <field>
         Data Contact Person: Address
       <mapping>
         eml.dataset.contact.phone
       </mapping>
+      <type>
+        Phone
+      </type>
     </metadata>
 
     <metadata>
       </mapping>
     </metadata>
 
+    <metadata>
+      <field>
+        Identifier
+      </field>
+      <description>
+        This identifier is used to identify the object in repository.
+      </description>
+      <mapping>
+        eml.dataset.dataTable.Identifier
+      </mapping>
+    </metadata>
+
   </metadatagroup>
 </metadatalist>

Source/WebClient/Web.Client/Scripts/DataUpv3.js

         } 
     });
 
+    $(".rangeTextbox").blur( function () {
+        var element = $(this).siblings("span");
+
+        if($(this).val() !== "" && $(element).is(":visible"))
+        {
+            var inputValue = parseFloat($(this).val());
+            var minAllowedValue = parseFloat($(this).attr("minAllowedValue"));
+            var maxAllowedValue = parseFloat($(this).attr("maxAllowedValue"));
+            if(isNaN(inputValue) || (inputValue < minAllowedValue || inputValue > maxAllowedValue))
+            {
+                $(element).text($(this).attr("rangeErrorMessage")).removeClass("field-validation-valid").addClass("field-validation-error");
+                isValid = false;
+            }
+            else
+            {
+                $(element).text("").addClass("field-validation-valid").removeClass("field-validation-error");
+            }
+        }
+        else
+        {
+            $(element).text("").addClass("field-validation-valid").removeClass("field-validation-error");
+        }
+    });
 });
 
  function showMetadataRequired(isParameterMetaData)
 
     validateMetadata: function () {
         var isValid = true;
-        $(".metadataScroll span[data-valmsg-for]").each(function (index, element) {
+//        $(".metadataScroll span[data-valmsg-for]").each(function (index, element) {
+        $(".metadataScroll span.reqFld").each(function (index, element) {
             var input = $(element).siblings("input[type='text']");
             if($(input).length == 0)
             {
                     $(element).text("").addClass("field-validation-valid").removeClass("field-validation-error");
                 }
             }else{
-                if ($.trim($(input).val()) === "") {
+                if($(input).hasClass("rangeTextbox")) {
+                    if($(input).val() !== "")
+                    {
+                        if(!isNaN($(input).val()))
+                        {
+                            var inputValue = parseFloat($(input).val());
+                            var minAllowedValue = parseFloat($(input).attr("minAllowedValue"));
+                            var maxAllowedValue = parseFloat($(input).attr("maxAllowedValue"));
+                            if(isNaN(inputValue) || (inputValue < minAllowedValue || inputValue > maxAllowedValue))
+                            {
+                                $(element).text($(input).attr("rangeErrorMessage")).removeClass("field-validation-valid").addClass("field-validation-error");
+                                isValid = false;
+                            }
+                            else
+                            {
+                                $(element).text("").addClass("field-validation-valid").removeClass("field-validation-error");
+                            }
+                        }
+                        else
+                        {
+                            $(element).text($(input).attr("rangeErrorMessage")).removeClass("field-validation-valid").addClass("field-validation-error");
+                            isValid = false;
+                        }
+                    }
+                }
+                else if ($.trim($(input).val()) === "") {
                     $(element).text($(input).attr("data-val-required")).removeClass("field-validation-valid").addClass("field-validation-error");
                     isValid = false;
                 }
             showMetadataRequired(false);
             return isValid;
         }
+
         var list = $(".paramtrTableContainer span[data-valmsg-for]");
         if(list.length == 1 && $(".paramtrTableContainer .parameterRows").css("display")==="none")
         {
         }
         else{
             list.each(function (index, element) {
-                if ($.trim($(element).siblings("input[type='text']").val()) === "") {
-                    $(element).text($(element).siblings("input[type='text']").attr("data-val-required")).removeClass("field-validation-valid").addClass("mandtrField");
-                    isValid = false;
+                var elem = $(element).siblings("input[type='text']");
+                if($(elem).length == 0)
+                {
+                    elem = $(element).siblings(".dropdownElementsHolder").find("input[type='text']");
+                    if ($.trim($(elem).val()) === ""){
+                        $(element).text($(elem).attr("data-val-required")).removeClass("field-validation-valid").addClass("mandtrField");
+                        isValid = false;
+                    }
+                    else {
+                        $(element).text("").addClass("field-validation-valid").removeClass("mandtrField");
+
+                        var unitsCell = $(elem).parents("td").next();
+                        var unitValue = $(unitsCell).find(".unitsText").val();
+
+                        if($(elem).hasClass("typeText") && $.trim($(elem).val()) === "Numeric")
+                        {
+                            if($.trim(unitValue) === "")
+                            {
+                                $(unitsCell).children("span.gridName").text("*").removeClass("field-validation-valid").addClass("mandtrField");
+                                isValid = false;
+                            }
+                            else
+                            {
+                                $(unitsCell).children("span.gridName").text("").addClass("field-validation-valid").removeClass("mandtrField");
+                            }
+                        }
+                        else
+                        {
+                            $(unitsCell).children("span.gridName").text("").addClass("field-validation-valid").removeClass("mandtrField");
+                        }
+                    }
                 }
-                else {
-                    $(element).text("").addClass("field-validation-valid").removeClass("mandtrField");
+                else
+                {
+                    if ($.trim($(elem).val()) === "") {
+                        $(element).text($(elem).attr("data-val-required")).removeClass("field-validation-valid").addClass("mandtrField");
+                        isValid = false;
+                    }
+                    else {
+                        $(element).text("").addClass("field-validation-valid").removeClass("mandtrField");
+                    }
                 }
             });
         }

Source/WebClient/Web.Client/Styles/Stylev3.css

     font: normal 12px/19px "Segoe UI";
     color: #fff;
     padding: 1px 10px 1px 15px;
+    background-color:RGB(225,87,87);
 }
 .reqFld > Div
 {

Source/WebClient/Web.Client/ViewModel/DocumentDetailViewModel.cs

     {
         [Required(AllowEmptyStrings = false, ErrorMessage = "*")]
         public string Name { get; set; }
+        [Required(AllowEmptyStrings = false, ErrorMessage = "*")]
         public string Description { get; set; }
+        [Required(AllowEmptyStrings = false, ErrorMessage = "*")]
         public string Type { get; set; }
+        [Required(AllowEmptyStrings = false, ErrorMessage = "*")]
+        public string EntityName { get; set; }
+        [Required(AllowEmptyStrings = false, ErrorMessage = "*")]
+        public string EntityDescription { get; set; }
+
         public string Units { get; set; }
-        public string EntityName { get; set; }
         public string SelectedEntityNameId { get; set; }
-        public string EntityDescription { get; set; }
         public bool IsBlankRow { get; set; }
     }
 }

Source/WebClient/Web.Client/Views/Document/MetadataTab.cshtml

                 }
                 
                 @Html.ValidationMessageFor(m => m.MetadataList[index].Value, "", new { @class = "reqFld" })
-              
             </div>
             }
             else
                 </label>
                 <a class="tTipQ" title="@metadata.Description"></a>
                 @Html.HiddenFor(m => m.MetadataList[index].Label)
-                @Html.TextBoxFor(m => m.MetadataList[index].Value, new { @maxlength = 200, @class = "metadataText" })
+                @if(metadata.MinimumAllowedValue != null && metadata.MaximumAllowedValue != null)
+                {
+                    var str = "MetadataList[" + index +"].Value";
+                    @Html.TextBoxFor(m => m.MetadataList[index].Value, new { @maxlength = 200, @class = "metadataText numericOnly rangeTextbox", minAllowedValue=@metadata.MinimumAllowedValue.Value, maxAllowedValue = metadata.MaximumAllowedValue.Value, rangeErrorMessage = "Must be between " + metadata.MinimumAllowedValue.Value + " to " + metadata.MaximumAllowedValue.Value + " degrees."})
+                    <span class="reqFld field-validation-valid"></span>
+                    @*@Html.ValidationMessageFor(m => m.MetadataList[index].Value, "", new { @class = "reqFld" })*@
+                }
+                else
+                {
+                    @Html.TextBoxFor(m => m.MetadataList[index].Value, new { @maxlength = 200, @class = "metadataText" })
+                }
             </div>
             }
         }
                 Entity Name <span style="color:Red">*</span>
             </td>
                <td class="paramtrHdrDes">
-                Entity Description
+                Entity Description <span style="color:Red">*</span>
             </td>
             <td class="paramtrHdrName">
                 Name <span style="color:Red">*</span>
             </td>
             <td class="paramtrHdrDes">
-                Description
+                Description <span style="color:Red">*</span>
             </td>
             <td class="paramtrHdrType">
-                Type
+                Type <span style="color:Red">*</span>
             </td>
             <td class="paramtrHdrUnit">
                 Units

Source/WebClient/Web.Client/Views/Document/_ParameterMetadata.cshtml

             else {
                 $(control).attr('disabled', false);
                 $(arrowControl).attr('disabled', false);
+                $(arrowControl).find("option:first").attr("selected", true);
+                $(control).val($(arrowControl).find("option:first").text());
                 //$(arrowControl).find("option:first").attr("disabled", true);
             }
         });
         </td>
         <td class="paramtrContDes">
             @Html.TextBoxFor(m => m.ParameterMetadataList[index].EntityDescription, new { @class = "paramtrContDes entityDescription", @style = "width:208px;" })
+            @Html.ValidationMessageFor(m => m.ParameterMetadataList[index].EntityDescription, "", new { @class = "gridName" })
         </td>
         <td class="paramtrContName">@Html.TextBoxFor(m => m.ParameterMetadataList[index].Name, new { @class = "paramtrContName paramName" })
             @Html.ValidationMessageFor(m => m.ParameterMetadataList[index].Name, "", new { @class = "gridName" })
         </td>
         <td class="paramtrContDes">
             @Html.TextBoxFor(m => m.ParameterMetadataList[index].Description, new { @class = "paramtrContDes paramDescription" })
+            @Html.ValidationMessageFor(m => m.ParameterMetadataList[index].Description, "", new { @class = "gridName" })
         </td>
         <td class="paramtrContType paddingTop8">
             <div class="dropdownCont">
                     @Html.TextBoxFor(m => m.ParameterMetadataList[index].Type, new { id = "ParameterMetadataList_" + @index + "__Type", @class = "visibleInputbox typeText", @readonly = "true" })
                 </div>
                 @Html.DropDownListFor(m => m.ParameterMetadataList[index].Type, Model.ParameterTypeList, string.Empty, new { id = "ParameterMetadataList_" + @index + "__Types", @class = "paramtrContType typeSelectList" })
+                @Html.ValidationMessageFor(m => m.ParameterMetadataList[index].Type, "", new { @class = "gridName" })
             </div>
         </td>
         <td class="paramtrHdrUnit">
                 </div>
                 @if (unitCell.Equals(string.Empty))
                 {
-                    @Html.DropDownListFor(m => m.ParameterMetadataList[index].Units, Model.ParameterUnitList, string.Empty, new { id = "ParameterMetadataList_" + @index + "__Unit", @class = "hiddenDropdown unitSelectList" })
+                    @Html.DropDownListFor(m => m.ParameterMetadataList[index].Units, Model.ParameterUnitList, new { id = "ParameterMetadataList_" + @index + "__Unit", @class = "hiddenDropdown unitSelectList" })
                 }
                 else
                 {
-                    @Html.DropDownListFor(m => m.ParameterMetadataList[index].Units, Model.ParameterUnitList, string.Empty, new { id = "ParameterMetadataList_" + @index + "__Unit", @class = "hiddenDropdown unitSelectList", disabled = @unitCell })
+                    @Html.DropDownListFor(m => m.ParameterMetadataList[index].Units, Model.ParameterUnitList, new { id = "ParameterMetadataList_" + @index + "__Unit", @class = "hiddenDropdown unitSelectList", disabled = @unitCell })
                 }
             </div>
+            <span class="gridName" data-valmsg-replace="true" style="margin-right:-7px;float:right;"></span>
         </td>
         <td class="paramtrContBtn">
             <input type="button" class="closeSquareGrayBtn rFloat" />

Source/WebClient/Web.Client/Views/Error/Index.cshtml

+@model System.Web.Mvc.HandleErrorInfo
+@{
+    ViewBag.Title = "Error page";
+}
+
+<h2>Error</h2>
+<section class="mainContainer homePage">
+<div><br /></div>
+<img src="../../Images/warningicon.png" alt="Warning" /> 
+@if (@Model != null && @Model.Exception != null)
+{
+<label>@Model</label>
+<div>
+    <h3>An application error occurred while processing the current request</h3>
+    <h4>Exception was : @Model.Exception.Message;</h4>
+    Please go to <a href="../Home">Home</a> page 
+<br />
+</div>
+}
+else
+{
+      <h3>Exception object is null</h3>
+}
+</section>

Source/WebClient/Web.Client/Web.Client.csproj

     <Content Include="Views\Shared\About.cshtml" />
     <Content Include="Views\Demo\Index.cshtml" />
     <Content Include="Views\Document\_ParameterMetadata.cshtml" />
+    <Content Include="Views\Error\Index.cshtml" />
     <None Include="_bin_deployableAssemblies\Microsoft.Web.Infrastructure.dll" />
     <None Include="_bin_deployableAssemblies\System.Web.WebPages.Razor.dll" />
     <None Include="_bin_deployableAssemblies\System.Web.WebPages.dll" />

Source/WebClient/Web.Client/Web.config

     <!--<authorization>
       <deny users="?" />
     </authorization>-->
+    <customErrors mode="Off" />
     <authentication mode="None" />
     <sessionState mode="InProc" timeout="30" />
     <compilation debug="true" targetFramework="4.0">

Source/WebService/Web.Admin/NewScientificMetadata.xml

         Geographic coverage: West bounding coordinate
       </field>
       <description>
-        Provide lattitudinal and longitudinal boundaries for your dataset.
+        Longitude of western-most point of bounding box (-180 to 180 degrees).
       </description>
       <mapping>
         eml.dataset.coverage.geographicCoverage.boundingCoordinates.westBoundingCoordinate
       </mapping>
+      <type>
+        Range
+      </type>
+      <valueRange>
+        <minimumValue>-180.00</minimumValue>
+        <maximumValue>180.00</maximumValue>
+      </valueRange>
     </metadata>
 
     <metadata>
         Geographic coverage: East bounding coordinate
       </field>
       <description>
-        Provide lattitudinal and longitudinal boundaries for your dataset.
+        Longitude of eastern-most point of bounding box (-180 to 180 degrees).
       </description>
       <mapping>
         eml.dataset.coverage.geographicCoverage.boundingCoordinates.eastBoundingCoordinate
       </mapping>
+      <type>
+        Range
+      </type>
+      <valueRange>
+        <minimumValue>-180.00</minimumValue>
+        <maximumValue>180.00</maximumValue>
+      </valueRange>
     </metadata>
 
     <metadata>
         Geographic coverage: North bounding coordinate
       </field>
       <description>
-        Provide lattitudinal and longitudinal boundaries for your dataset.
+        Latitude of northern-most point of bounding box (-90 to 90 degrees).
       </description>
       <mapping>
         eml.dataset.coverage.geographicCoverage.boundingCoordinates.northBoundingCoordinate
       </mapping>
+      <type>
+        Range
+      </type>
+      <valueRange>
+        <minimumValue>-90.00</minimumValue>
+        <maximumValue>90.00</maximumValue>
+      </valueRange>
     </metadata>
 
     <metadata>
         Geographic coverage: South bounding coordinate
       </field>
       <description>
-        Provide lattitudinal and longitudinal boundaries for your dataset.
+        Latitude of southern-most point of bounding box (-90 to 90 degrees).
       </description>
       <mapping>
         eml.dataset.coverage.geographicCoverage.boundingCoordinates.southBoundingCoordinate
       </mapping>
+      <type>
+        Range
+      </type>
+      <valueRange>
+        <minimumValue>-90.00</minimumValue>
+        <maximumValue>90.00</maximumValue>
+      </valueRange>