Commits

Anonymous committed e7c64af

Bug Fixes:
• If there ISN’T a <dataset><contact> element, then insert the <contact> with a surname value duplicated from <creator><surName>:
• If there IS a <project> element but no <project><title> element, then add the <title>:
• If there IS a <dataTable> element AND a <dataTable><attributeList> but NO <dataTable><entityName>, then add <entityName>:
• If there is a <dataTable> element AND a <dataTable><entityName> but NO <dataTable><attributeList>, then add <attributeList>:
• If there is a <geographicDescription> element and ANY of <westBoundingCoordinate>, <eastBoundingCoordinate>, <northBoundingCoordinate>, or <southBoundingCoordinate> are empty, insert the value “0.0”.for the missing coordinate(s).
• If there ISN’T a <temporalCoverage> element but there IS a <additionalMetadata><describes> element, delete the <describes> element (but KEEP any other non-empty children of <additionalMetadata>).

  • Participants
  • Parent commits d9010bf

Comments (0)

Files changed (17)

+syntax: glob
+Source/WebService/Web.Admin/obj/Release/DesignTimeResolveAssemblyReferencesInput.cache
+Source/Excel/Excel.Common/obj/Release/DesignTimeResolveAssemblyReferencesInput.cache
+Source/WebClient/Web.Client.sln.docstates.suo
+Source/WebService/Web.Service.sln.docstates.suo
+Source/WebService/Web.Service.Model/obj/Release/DesignTimeResolveAssemblyReferencesInput.cache
+Source/WebService/Web.Service.Model/obj/Debug/DesignTimeResolveAssemblyReferencesInput.cache
+Source/WebService/Web.Common/obj/Release/DesignTimeResolveAssemblyReferencesInput.cache
+Source/WebService/Web.Admin.DataLayer/obj/Release/TempPE/AdminEntities.Designer.cs.dll
+Source/WebService/Web.Admin.DataLayer/obj/Release/DesignTimeResolveAssemblyReferencesInput.cache
+Source/WebClient/Web.DataLayer/obj/Debug/DesignTimeResolveAssemblyReferencesInput.cache
+Source/WebClient/Web.Common/obj/Debug/DesignTimeResolveAssemblyReferencesInput.cache
+Source/WebClient/Web.Client/obj/Debug/DesignTimeResolveAssemblyReferencesInput.cache
+Source/WebClient/Web.Client/Views/Demo/AddIn.cshtml
+Source/WebClient/Web.Client.suo
+Source/WebClient/Web.BizLogic/obj/Debug/DesignTimeResolveAssemblyReferencesInput.cache
+Source/Excel/Excel.Common/obj/Release/TempPE/Properties.Resources.Designer.cs.dll

File Source/WebClient/Web.Azure/ServiceConfiguration.Cloud.cscfg

       <Setting name="Reg2" value="[&lt;&gt;\⌂\\Ç\\ü\\é\\Æ\\£\\¥\\ó\\ú\\Ñ\\¿\\⌐\\½\\¼\\«\\»\\│\\ß\\µ\\±\\°\\∙\\€\\†\\‡\\Š\\™\\œ\\Ÿ\\©\\®\\Ã\\Î\\Ô\\×\\÷\\ø\\þ\/\|]+" />
       <Setting name="Profile_Identifier" value="oneshare_ark_only" />
       <Setting name="Profile_Post" value="oneshare_dataup_content" />
-      <Setting name="DemoVideoUrl" value="https://datatupstorage.blob.core.windows.net/demo/dataup-web.wmv" />
+      <Setting name="DemoWebClientVideoUrl" value="http://player.vimeo.com/video/51179513" />
+      <Setting name="DemoAddInVideoUrl" value="http://player.vimeo.com/video/51179512" />
       <Setting name="Microsoft.WindowsAzure.Plugins.Diagnostics.ConnectionString" value="DefaultEndpointsProtocol=https;AccountName=datatupstorage;AccountKey=JNP40XUjm6C+0pXYmtTMx7MSKg2+bbjUUjj8usDi8rEE9Z6VGy9iQ5kGwcpmmXcLkw8VsROwzPFRt97lafs9+A==" />
     </ConfigurationSettings>
     <Certificates>

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

     <ConfigurationSettings>
       <Setting name="UploadToAzure" value="true" />
       <Setting name="PrimaryContainer" value="dcxlcontainer" />
-      <Setting name="DataUpStorage" value="DefaultEndpointsProtocol=https;AccountName=dcxldevelopment;AccountKey=GyoG7buqRTJ3qmbGv5hAVqqTjlne8G0vDVuDrokj41oouqnTvdxuCcGjNCwW4KykdPWmkx55XU8GHy13EZlMmg==" />
-      <Setting name="DataUpEntities" value="metadata=res://*/Entities.csdl|res://*/Entities.ssdl|res://*/Entities.msl;provider=System.Data.SqlClient;provider connection string=&quot;data source=tcp:uakxp9zd12.database.windows.net;initial catalog=datauptest;persist security info=True;user id=datacuration;password=dcxl2012!;multipleactiveresultsets=True;App=EntityFramework&quot;" />
+      <Setting name="DataUpStorage" value="DefaultEndpointsProtocol=https;AccountName=dataupdev;AccountKey=nUB3FYLvNhC13qduCFbnDxq5KS6iWniDYPI8jxzTcsz/IVLCCnA4SBk94Bu+IiIn6+n3eTJGgQSj8vMdkhyBGw==" />
+      <Setting name="DataUpEntities" value="metadata=res://*/Entities.csdl|res://*/Entities.ssdl|res://*/Entities.msl;provider=System.Data.SqlClient;provider connection string=&quot;data source=tcp:v12h47zv64.database.windows.net;initial catalog=webclientdev;persist security info=True;user id=dataup;password=LakeMerritt!;multipleactiveresultsets=True;App=EntityFramework&quot;" />
       <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="https://adminservicedev.cloudapp.net/RepositoryService" />
+      <Setting name="FederationMetadataLocation" value="https://dataup.accesscontrol.windows.net/FederationMetadata/2007-06/FederationMetadata.xml" />
+      <Setting name="DataUpWebServiceLink" value="https://dataupadmindev.cloudapp.net/RepositoryService" />
       <Setting name="Reg" value="[&lt;&gt;\?\@\\''\\;\\$\\!\\#\\(\\)\\^\\&amp;\\{\\}\\+\\-\\.\\~\\/\\%\\*\\\&quot;/\|]+" />
       <Setting name="Reg2" value="[&lt;&gt;\⌂\\Ç\\ü\\é\\Æ\\£\\¥\\ó\\ú\\Ñ\\¿\\⌐\\½\\¼\\«\\»\\│\\ß\\µ\\±\\°\\∙\\€\\†\\‡\\Š\\™\\œ\\Ÿ\\©\\®\\Ã\\Î\\Ô\\×\\÷\\ø\\þ\/\|]+" />
       <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==" />
+      <Setting name="DemoWebClientVideoUrl" value="http://player.vimeo.com/video/51179513" />
+      <Setting name="DemoAddInVideoUrl" value="http://player.vimeo.com/video/51179512" />
+      <Setting name="Microsoft.WindowsAzure.Plugins.Diagnostics.ConnectionString" value="DefaultEndpointsProtocol=https;AccountName=dataupdev;AccountKey=nUB3FYLvNhC13qduCFbnDxq5KS6iWniDYPI8jxzTcsz/IVLCCnA4SBk94Bu+IiIn6+n3eTJGgQSj8vMdkhyBGw==" />
     </ConfigurationSettings>
     <Certificates>
       <Certificate name="DataUpCertificate" thumbprint="D6B81E34474C185D9490329D37C9A917A10B95B7" thumbprintAlgorithm="sha1" />

File Source/WebClient/Web.Azure/ServiceDefinition.build.csdef

       <Setting name="Reg2" />
       <Setting name="Profile_Identifier" />
       <Setting name="Profile_Post" />
-      <Setting name="DemoVideoUrl" />
+      <Setting name="DemoWebClientVideoUrl" />
+      <Setting name="DemoAddInVideoUrl" />
     </ConfigurationSettings>
     <LocalResources></LocalResources>
     <Certificates>

File Source/WebClient/Web.Azure/ServiceDefinition.csdef

       <Setting name="Reg2" />
       <Setting name="Profile_Identifier" />
       <Setting name="Profile_Post" />
-      <Setting name="DemoVideoUrl" />
+      <Setting name="DemoWebClientVideoUrl" />
+      <Setting name="DemoAddInVideoUrl" />
     </ConfigurationSettings>
     <LocalResources>
     </LocalResources>

File Source/WebClient/Web.Client/Controllers/DemoController.cs

             return View();
         }
 
+        public ActionResult AddIn()
+        {
+            return View();
+        }
     }
 }

File Source/WebClient/Web.Client/Views/Demo/Index.cshtml

 @using DataUp.Web.Common;
 @{
-    ViewBag.Title = "Demo";
-    string strVideoUrl = ConfigReader<string>.GetSetting("DemoVideoUrl");
+    ViewBag.Title = "Web Client Demo";
+    string strWebClientVideoUrl = ConfigReader<string>.GetSetting("DemoWebClientVideoUrl");
+    string strAddinVideoUrl = ConfigReader<string>.GetSetting("DemoAddInVideoUrl");
 }
 
 <div id="demoVideo" style="margin-top:100px; margin-left:375px"> 
-@*<video id="videoController"  poster="movie.jpg" controls autoplay="autoplay" type="video/wmv"> 
-<source src="@strVideoUrl" type="video/x-ms.wmv"></source>
-</video> *@
-
-<object id="MediaPlayer" width=500 height=500 classid="CLSID:22D6f312-B0F6-11D0-94AB-0080C74C7E95" standby="Loading Windows Media Player components..." type="application/x-oleobject" codebase="http://activex.microsoft.com/activex/controls/mplayer/en/nsmp2inf.cab#Version=6,4,7,1112"> 
-<param name="filename" value="@strVideoUrl">
-<param name="Showcontrols" value="True">
-<param name="autoStart" value="True">
-<embed type="application/x-mplayer2" src="@strVideoUrl" name="MediaPlayer" width=320 height=240></embed>
-</object>
+<iframe src="@strWebClientVideoUrl" width="500" height="281" frameborder="0" webkitAllowFullScreen mozallowfullscreen allowFullScreen></iframe>
 </div>

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

     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 
+<div class="PostError">
+<img src="../../Images/ClsBtn.png" alt="error" /> An application error occurred. We have logged the error and will make necessary changes as soon as possible. If you have any concerns or questions you can contact us at <a href="mailto:uc3@ucop.edu">uc3@ucop.edu</a>
 <br />
 </div>
-}
-else
-{
-      <h3>Exception object is null</h3>
-}
 </section>

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

     <Content Include="Views\Demo\Index.cshtml" />
     <Content Include="Views\Document\_ParameterMetadata.cshtml" />
     <Content Include="Views\Error\Index.cshtml" />
+    <Content Include="Views\Demo\AddIn.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" />

File Source/WebClient/Web.Client/Web.config

     <add key="Profile_Post" value="oneshare_dataup_content" />
     <add key="FederationMetadataLocation" value="https://dataup.accesscontrol.windows.net/FederationMetadata/2007-06/FederationMetadata.xml" />
     <add key="UploadToAzure" value="true" />
-    <add key="DataUpWebServiceLink" value="https://dataupadminservice.cloudapp.net/RepositoryService" />
+    <add key="DataUpWebServiceLink" value="https://dataupadmindev.cloudapp.net/RepositoryService" />
     <add key="Reg" value="[&lt;&gt;\?\@\\''\\;\\$\\!\\#\\(\\)\\^\\&amp;\\{\\}\\+\\-\\.\\~\\/\\%\\*\\\&quot;/\|]+" />
     <add key="Reg2" value="[&lt;&gt;\⌂\\Ç\\ü\\é\\Æ\\£\\¥\\ó\\ú\\Ñ\\¿\\⌐\\½\\¼\\«\\»\\│\\ß\\µ\\±\\°\\∙\\€\\†\\‡\\Š\\™\\œ\\Ÿ\\©\\®\\Ã\\Î\\Ô\\×\\÷\\ø\\þ\/\|]+" />
     <add key="PrimaryContainer" value="dataupfiles" />
-    <add key="DataUpEntities" value="metadata=res://*/Entities.csdl|res://*/Entities.ssdl|res://*/Entities.msl;provider=System.Data.SqlClient;provider connection string=&quot;data source=tcp:v12h47zv64.database.windows.net;initial catalog=dataupclient;persist security info=True;user id=dataup;password=LakeMerritt!;multipleactiveresultsets=True;App=EntityFramework&quot;" />
-    <add key="DataUpStorage" value="DefaultEndpointsProtocol=https;AccountName=datatupstorage;AccountKey=JNP40XUjm6C+0pXYmtTMx7MSKg2+bbjUUjj8usDi8rEE9Z6VGy9iQ5kGwcpmmXcLkw8VsROwzPFRt97lafs9+A==" />
-    <add key="DemoVideoUrl" value="https://datatupstorage.blob.core.windows.net/demo/dataup-web.wmv" />
+    <add key="DataUpEntities" value="metadata=res://*/Entities.csdl|res://*/Entities.ssdl|res://*/Entities.msl;provider=System.Data.SqlClient;provider connection string=&quot;data source=tcp:v12h47zv64.database.windows.net;initial catalog=webclientdev;persist security info=True;user id=dataup;password=LakeMerritt!;multipleactiveresultsets=True;App=EntityFramework&quot;" />
+    <add key="DataUpStorage" value="DefaultEndpointsProtocol=https;AccountName=dataupdev;AccountKey=nUB3FYLvNhC13qduCFbnDxq5KS6iWniDYPI8jxzTcsz/IVLCCnA4SBk94Bu+IiIn6+n3eTJGgQSj8vMdkhyBGw==" />
+    <add key="DemoWebClientVideoUrl" value="http://player.vimeo.com/video/51179513" />
+    <add key="DemoAddInVideoUrl" value="http://player.vimeo.com/video/51179512" />
   </appSettings>
   <connectionStrings>
-    <add name="DataUpEntities" connectionString="metadata=res://*/Entities.csdl|res://*/Entities.ssdl|res://*/Entities.msl;provider=System.Data.SqlClient;provider connection string=&quot;data source=tcp:v12h47zv64.database.windows.net;initial catalog=dataupclient;persist security info=True;user id=dataup;password=LakeMerritt!;multipleactiveresultsets=True;App=EntityFramework&quot;" providerName="System.Data.EntityClient" />
+    <add name="DataUpEntities" connectionString="metadata=res://*/Entities.csdl|res://*/Entities.ssdl|res://*/Entities.msl;provider=System.Data.SqlClient;provider connection string=&quot;data source=tcp:v12h47zv64.database.windows.net;initial catalog=webclientdev;persist security info=True;user id=dataup;password=LakeMerritt!;multipleactiveresultsets=True;App=EntityFramework&quot;" providerName="System.Data.EntityClient" />
   </connectionStrings>
   <location path="FederationMetadata">
     <system.web>
   <microsoft.identityModel>
     <service>
       <audienceUris>
-        <add value="https://redirect.dataup.org/" />
+        <add value="https://dataupclientdev.cloudapp.net/" />
       </audienceUris>
       <applicationService>
         <claimTypeRequired>
       </applicationService>
       <certificateValidation certificateValidationMode="None" />
       <federatedAuthentication>
-        <wsFederation passiveRedirectEnabled="true" issuer="https://dataup.accesscontrol.windows.net/v2/wsfederation" realm="https://redirect.dataup.org/" requireHttps="true" />
+        <wsFederation passiveRedirectEnabled="true" issuer="https://dataup.accesscontrol.windows.net/v2/wsfederation" realm="https://dataupclientdev.cloudapp.net/" requireHttps="true" />
         <cookieHandler requireSsl="true" persistentSessionLifetime="0.00:30:00.00" />
       </federatedAuthentication>
       <issuerNameRegistry type="Microsoft.IdentityModel.Tokens.ConfigurationBasedIssuerNameRegistry, Microsoft.IdentityModel, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35">

File Source/WebService/Web.Admin/Common/Constants.cs

         internal static string AttributListNodeXPath = "./dataset/dataTable/attributeList";
         internal static string SheetTableXPath = "./dataset/dataTable";
 
+        internal static string XPathDatasetProject = "dataset/project";
+        internal static string XPathDatasetDataTable = "dataset/dataTable";
+        internal static string XPathDatasetContact = "dataset/contact";
+        internal static string XPathDataSetGeoDesc = "dataset/coverage/geographicCoverage/geographicDescription";
+        internal static string XPathDataSetGeoCoordinates = "dataset/coverage/geographicCoverage/boundingCoordinates";
+        internal static string XPathDataSetSurName = "dataset/creator/individualName/surName";
+        internal static string XPathDataSetTemporalCoverage = "dataset/coverage/temporalCoverage";
+
         internal const string MerrittRepositoryName = "merritt";
         internal const string MerrittIdentifierLink = "https://merritt-stage.cdlib.org/object/mint";
         internal const string MerrittPostFileLink = "https://merritt-stage.cdlib.org/object/ingest";
         internal const string MerrittRepositoryType = "DataONE";
 
+        //default text values
+        internal static string MissingRequiredElement = "Missing required element";
+        internal static string DefaultCoordinateValue = "0.0";
         /// <summary>
         /// The application registry path.
         /// </summary>

File Source/WebService/Web.Admin/DataUpMetadata.xml

-<eml:eml packageId="UC3/CDL" system="DataUp" xmlns:eml="eml://ecoinformatics.org/eml-2.1.1" xsi:schemaLocation="eml://ecoinformatics.org/eml-2.1.1 eml-2.1.1/eml.xsd" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
-    <dataset>
-        <title>
-          <!-- non-empty string type -->
-        </title>
-        <creator>
-            <!-- http://knb.ecoinformatics.org/software/eml/eml-2.1.0/eml-resource.html#creator -->
-            <!-- multiple creators allowed -->
-            <individualName>
-                <givenName></givenName>
-                <surName></surName>
-            </individualName>
-            <organizationName></organizationName>
-            <address>
-                <deliveryPoint></deliveryPoint>
-                <city></city>
-                <administrativeArea></administrativeArea>
-                <postalCode></postalCode>
-                <country></country>
-            </address>
-            <phone></phone>
-            <electronicMailAddress></electronicMailAddress>
-        </creator>
-        <pubDate>
-            <!-- in yearDate format, e.g. YYYY or YYYY-MM-DD -->
-        </pubDate>
-        <abstract>
-            <para>
-                <!-- text --></para>
-        </abstract>
-        <keywordSet>
-          <keyword>
-            <!-- non-empty string -->
-          </keyword>
-          <!-- unlimited number of keyword fields possible -->
-          <keywordThesaurus>
-            <!-- non-empty string -->
-          </keywordThesaurus>
-        </keywordSet>
-        <intellectualRights>
-          <para></para>
-        </intellectualRights>
-        <distribution>
-          <online>
-            <url></url>
-          </online>
-        </distribution>
-        <coverage>
-        <!-- http://knb.ecoinformatics.org/software/eml/eml-2.1.0/eml-resource.html#coverage -->
-          <geographicCoverage>
-            <geographicDescription> </geographicDescription>
-            <boundingCoordinates>
-              <westBoundingCoordinate></westBoundingCoordinate>
-              <eastBoundingCoordinate></eastBoundingCoordinate>
-              <northBoundingCoordinate></northBoundingCoordinate>
-              <southBoundingCoordinate></southBoundingCoordinate>
-            </boundingCoordinates>
-          </geographicCoverage>
-          <temporalCoverage id="tempcov">
-            <rangeOfDates>
-              <beginDate>
-                <calendarDate></calendarDate>
-              </beginDate>
-              <endDate>
-                <calendarDate></calendarDate>
-              </endDate>
-            </rangeOfDates>
-          </temporalCoverage>
-        </coverage>
-        <contact>
-            <individualName>
-                <givenName></givenName>
-                <surName></surName>
-            </individualName>
-            <organizationName></organizationName>
-            <address>
-                <deliveryPoint></deliveryPoint>
-                <city></city>
-                <administrativeArea></administrativeArea>
-                <postalCode></postalCode>
-                <country></country>
-            </address>
-            <phone></phone>
-            <electronicMailAddress></electronicMailAddress>
-        </contact>
-        <publisher>
-          <organizationName></organizationName>
-        </publisher>
-        <project>
-            <!-- http://knb.ecoinformatics.org/software/eml/eml-2.1.0/eml-dataset.html#project -->
-            <title></title>
-          <personnel>
-            <individualName>
-              <surName></surName>
-            </individualName>
-            <role></role>
-          </personnel>
-            <abstract>
-                <para></para>
-            </abstract>
-            <funding>
-                <para></para>
-            </funding>
-        </project>
-        <dataTable>
-            <!-- http://knb.ecoinformatics.org/software/eml/eml-2.1.0/eml-dataTable.html#dataTable -->
-            <!-- dataTable is equivalent to a single tab in the excel spreadsheet.
-         One can have multiple data tables within the document. -->
-            <entityName></entityName>
-            <entityDescription></entityDescription>
-            <attributeList>
-                <!-- http://knb.ecoinformatics.org/software/eml/eml-2.1.0/eml-dataTable.html#attributeList -->
-                <!-- attribute list is equivalent to the parameter table from the requirements document.
-         One can have many attributes in a single table. -->
-                <attribute>
-                    <attributeName>
-                        <!-- non-empty string --></attributeName>
-                    <attributeDefinition>
-                        <!-- non-empty string --></attributeDefinition>
-                </attribute>
-            </attributeList>
-        </dataTable>
-    </dataset>
-    <additionalMetadata>
-        <describes>tempcov</describes>
-        <metadata>
-            <description>
-                <!-- non-empty string describing temporal coverage -->
-            </description>
-        </metadata>
-    </additionalMetadata>
-    <additionalMetadata>
-        <metadata>
-            <formattedCitation>
-                <!-- non-empty string -->
-            </formattedCitation>
-        </metadata>
-    </additionalMetadata>
-</eml:eml>
+<eml:eml
+ packageId="UC3/CDL" system="DataUp"
+ xmlns:eml="eml://ecoinformatics.org/eml-2.1.1"
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xsi:schemaLocation="eml://ecoinformatics.org/eml-2.1.1 eml.xsd">
+
+  <dataset>
+    <title>No title provided</title>
+    <creator>
+      <individualName>
+        <givenName>No given name for creator provided</givenName>
+        <surName>No surname for creator provided</surName>
+      </individualName>
+      <organizationName>No organization name for creator provided</organizationName>
+      <address>
+        <deliveryPoint>No street address for creator provided</deliveryPoint>
+        <city>No city for creator provided</city>
+        <administrativeArea>No state for creator provided</administrativeArea>
+        <postalCode>No postal code for creator provided</postalCode>
+        <country>No country for creator provided</country>
+      </address>
+      <phone>+0 (000) 000-0000</phone>
+      <electronicMailAddress>noemail@noemail.com</electronicMailAddress>
+    </creator>
+    <pubDate>0001-01-01</pubDate>
+    <abstract>
+      <para>No abstract provided</para>
+    </abstract>
+    <keywordSet>
+      <keyword>No keyword provided</keyword>
+      <keywordThesaurus>No keyword thesaurus designated</keywordThesaurus>
+    </keywordSet>
+    <intellectualRights>
+      <para>No statement of intellectual rights provided</para>
+    </intellectualRights>
+    <distribution>
+      <online>
+        <url>No url for data provided</url>
+      </online>
+    </distribution>
+    <coverage>
+      <geographicCoverage>
+        <geographicDescription>No description of geographic coverage provided</geographicDescription>
+        <boundingCoordinates>
+          <westBoundingCoordinate>0</westBoundingCoordinate>
+          <eastBoundingCoordinate>0</eastBoundingCoordinate>
+          <northBoundingCoordinate>0</northBoundingCoordinate>
+          <southBoundingCoordinate>0</southBoundingCoordinate>
+        </boundingCoordinates>
+      </geographicCoverage>
+      <temporalCoverage id="tempcov">
+        <rangeOfDates>
+          <beginDate>
+            <calendarDate>0001-01-01</calendarDate>
+          </beginDate>
+          <endDate>
+            <calendarDate>0001-01-01</calendarDate>
+          </endDate>
+        </rangeOfDates>
+      </temporalCoverage>
+    </coverage>
+    <contact>
+      <individualName>
+        <givenName>No given name for contact provided</givenName>
+        <surName>No surname for contact provided</surName>
+      </individualName>
+      <organizationName>No organization name for contact provided</organizationName>
+      <address>
+        <deliveryPoint>No street address for contact provided</deliveryPoint>
+        <city>No city for contact provided</city>
+        <administrativeArea>No state for contact provided</administrativeArea>
+        <postalCode>No postal code for contact provided</postalCode>
+        <country>No country for contact provided</country>
+      </address>
+      <phone>+0 (000) 000-0000</phone>
+      <electronicMailAddress>noemail@noemail.com</electronicMailAddress>
+    </contact>
+    <publisher>
+      <organizationName>No publisher name provided</organizationName>
+    </publisher>
+    <project>
+      <title>No project title provided</title>
+      <personnel>
+        <individualName>
+          <surName>No project personnel surname provided</surName>
+        </individualName>
+        <organizationName>No project organization name provided</organizationName>
+        <role>No project personnel role provided</role>
+      </personnel>
+      <abstract>
+        <para>No project abstract provided</para>
+      </abstract>
+      <funding>
+        <para>No project funding described</para>
+      </funding>
+    </project>
+
+    <dataTable>
+      <entityName>No spreadsheet name given</entityName>
+      <entityDescription>No description of spreadsheet given</entityDescription>
+      <attributeList>
+        <attribute>
+          <!-- this is a text attribute example -->
+          <attributeName>No text column title given</attributeName>
+          <attributeDefinition>The column contains text. No other description provided by user.</attributeDefinition>
+          <measurementScale>
+            <nominal>
+              <nonNumericDomain>
+                <textDomain>
+                  <definition>The column contains text data. No other description provided by user.</definition>
+                </textDomain>
+              </nonNumericDomain>
+            </nominal>
+          </measurementScale>
+        </attribute>
+      </attributeList>
+    </dataTable>
+  </dataset>
+
+  <additionalMetadata>
+    <describes>tempcov</describes>
+    <metadata>
+      <description>No description of temporal coverage provided</description>
+    </metadata>
+  </additionalMetadata>
+  <additionalMetadata>
+    <metadata>
+      <formattedCitation>No data citation generated</formattedCitation>
+    </metadata>
+  </additionalMetadata>
+</eml:eml>

File Source/WebService/Web.Admin/Repositories/MerritRepository.cs

                             }
                         }
                     }
+                    else if (string.Compare(nodeField, "keyword thesaurus used", true) == 0 && string.IsNullOrWhiteSpace(value))
+                    {
+                        var keywordset = oldNode.ParentNode;
+                        keywordset.RemoveChild(oldNode);
+                    }
                     else
                     {
-                        oldNode.InnerText = value;
+                        if (!string.IsNullOrWhiteSpace(value))
+                        {
+                            oldNode.InnerText = value;
+                        }
                     }
                 }
             }
 
+            // Write Parameter Metadata properties.
             if (request.ParameterMetadata != null && request.ParameterMetadata.Length > 0)
             {
                 WriteParamMetadata(request, emlDocument);
             }
 
+            //Added this following conditions outside the above for loop to avoid the following conditions not to repeat every time
+  
+            //If contact element is not there, then insert the value from creator/surname
+            ManageContactElement(emlDocument);
+
+            //If no project title element ,then add the project title element value
+            ManageProjectTitleElement(emlDocument);
+
+            //If datatable has no entityname ,then add the entity name
+            ManageEntityNameElement(emlDocument);
+
+            //If datatable has no attributeList, then add attributeList node
+            ManageAttributeListElement(emlDocument);
+
+            //set the coordinate value for geographical location 
+            ManageGeographicLocationCoordinates(emlDocument);
+            
+            //check the temporal coverage conidtions
+            ManageTemporalCoverage(emlDocument);
+
             emlDocument.Save(filePath);
         }
 
+        private static void ManageGeographicLocationCoordinates(XmlDocument emlDocument)
+        {
+            var rootElement = emlDocument.DocumentElement;
+            var geographicDescElement = rootElement.SelectSingleNode(Constants.XPathDataSetGeoDesc);
+            var boundingCoordinatesElement = rootElement.SelectSingleNode(Constants.XPathDataSetGeoCoordinates);
+
+            if (geographicDescElement != null && boundingCoordinatesElement != null)
+            {
+                var westBoundingCoordinateElement = boundingCoordinatesElement.SelectSingleNode("westBoundingCoordinate");
+                var eastBoundingCoordinateElement = boundingCoordinatesElement.SelectSingleNode("eastBoundingCoordinate");
+                var northBoundingCoordinateElement = boundingCoordinatesElement.SelectSingleNode("northBoundingCoordinate");
+                var southBoundingCoordinateElement = boundingCoordinatesElement.SelectSingleNode("southBoundingCoordinate");
+                if (westBoundingCoordinateElement != null && string.IsNullOrWhiteSpace(westBoundingCoordinateElement.InnerText))
+                {   
+                    westBoundingCoordinateElement.InnerText = Constants.DefaultCoordinateValue;
+                }
+                if (eastBoundingCoordinateElement != null && string.IsNullOrWhiteSpace(eastBoundingCoordinateElement.InnerText))
+                {
+                    eastBoundingCoordinateElement.InnerText = Constants.DefaultCoordinateValue;
+                }
+                if (northBoundingCoordinateElement != null && string.IsNullOrWhiteSpace(northBoundingCoordinateElement.InnerText))
+                {
+                    northBoundingCoordinateElement.InnerText = Constants.DefaultCoordinateValue;
+                }
+                if (southBoundingCoordinateElement != null && string.IsNullOrWhiteSpace(southBoundingCoordinateElement.InnerText))
+                {
+                    southBoundingCoordinateElement.InnerText = Constants.DefaultCoordinateValue;
+                }
+            }
+        }
+
+        private static void ManageAttributeListElement(XmlDocument emlDocument)
+        {
+            var rootElement = emlDocument.DocumentElement;
+            var dataTableElement = rootElement.SelectSingleNode(Constants.XPathDatasetDataTable);
+
+            if (dataTableElement != null)
+            {
+                var attributeListElement = dataTableElement.SelectSingleNode("attributeList");
+                if (attributeListElement == null)
+                {
+                    //create elements
+                    attributeListElement = emlDocument.CreateElement("attributeList");
+
+                    //set the attribute name node
+                    var attributeNameElement = emlDocument.CreateElement("attributeName");
+                    attributeNameElement.InnerText = Constants.MissingRequiredElement;
+
+                    //set the attribute definition node
+                    var attributeDefinitionElement = emlDocument.CreateElement("attributeDefinition");
+                    attributeDefinitionElement.InnerText = Constants.MissingRequiredElement;
+
+                    //set the measurement scale node
+                    var measurementScaleElement = emlDocument.CreateElement("measurementScale");
+                    var nominalElement = emlDocument.CreateElement("nominal");
+                    var nonNumericDomainElement = emlDocument.CreateElement("nonNumericDomain");
+                    var textDomainElement = emlDocument.CreateElement("textDomain");
+                    var definitionElement = emlDocument.CreateElement("definition");
+                    definitionElement.InnerText = Constants.MissingRequiredElement;
+
+                    //add the measurement scale nodes
+                    textDomainElement.AppendChild(definitionElement);
+                    nonNumericDomainElement.AppendChild(textDomainElement);
+                    nominalElement.AppendChild(nonNumericDomainElement);
+                    measurementScaleElement.AppendChild(nominalElement);
+
+                    //append the nodes to attribute list node
+                    attributeListElement.AppendChild(attributeNameElement);
+                    attributeListElement.AppendChild(attributeDefinitionElement);
+                    attributeListElement.AppendChild(measurementScaleElement);
+
+                    //add to the datatable node
+                    dataTableElement.AppendChild(attributeListElement);
+                }
+            }
+        }
+
+        private static void ManageEntityNameElement(XmlDocument emlDocument)
+        {
+            var rootElement = emlDocument.DocumentElement;
+            var dataTableElement = rootElement.SelectSingleNode(Constants.XPathDatasetDataTable);
+
+            if (dataTableElement != null)
+            {
+                var entityNameElement = dataTableElement.SelectSingleNode("entityName");
+                if (entityNameElement == null)
+                {
+                    entityNameElement = emlDocument.CreateElement("entityName");
+                    entityNameElement.InnerText = Constants.MissingRequiredElement;
+                    dataTableElement.AppendChild(entityNameElement);
+                }
+                else if (string.IsNullOrWhiteSpace(entityNameElement.InnerText))
+                {
+                    entityNameElement.InnerText = Constants.MissingRequiredElement;
+                }
+            }
+        }
+
+        private static void ManageProjectTitleElement(XmlDocument emlDocument)
+        {
+            var rootElement = emlDocument.DocumentElement;
+            var projectElement = rootElement.SelectSingleNode(Constants.XPathDatasetProject);
+
+            if (projectElement != null)
+            {
+                var titleElement = projectElement.SelectSingleNode("title");
+                if (titleElement == null)
+                {
+                    titleElement = emlDocument.CreateElement("title");
+                    titleElement.InnerText = Constants.MissingRequiredElement;
+                    projectElement.AppendChild(titleElement);
+                }
+                else if (string.IsNullOrWhiteSpace(titleElement.InnerText))
+                {
+                    titleElement.InnerText = Constants.MissingRequiredElement;
+                }
+            }
+        }
+
+        private static void ManageContactElement(XmlDocument emlDocument)
+        {
+            var rootElement = emlDocument.DocumentElement;
+            var datasetContactElement = rootElement.SelectSingleNode(Constants.XPathDatasetContact);
+
+            if (datasetContactElement == null)//If contact element is not there as part of the dataset/contact add the dataset/contact/surname
+            {
+                var surNameValue = rootElement.SelectSingleNode(Constants.XPathDataSetSurName).InnerText;
+                if (string.IsNullOrWhiteSpace(surNameValue))
+                    surNameValue = "Create surname";
+
+                var datasetElement = rootElement.SelectSingleNode("dataset");
+                //create new xml elements
+                var contactElement = emlDocument.CreateElement("contact");
+                var individualElement = emlDocument.CreateElement("individualName");
+                var surNameElement = emlDocument.CreateElement("surName");
+
+                surNameElement.InnerText = surNameValue;
+
+                individualElement.AppendChild(surNameElement);
+                contactElement.AppendChild(individualElement);
+                datasetElement.AppendChild(contactElement);
+            }
+        }
+
+        private static void ManageTemporalCoverage(XmlDocument emlDocument)
+        {
+            var rootElement = emlDocument.DocumentElement;
+            var temporalCoverageElement = rootElement.SelectSingleNode(Constants.XPathDataSetTemporalCoverage);
+            var additionalMetadataElement = rootElement.SelectSingleNode("additionalMetadata");
+
+            //If temp coverage element is not there and Additional meta data elemenet exists ,delete the describes node from AdditionalMetaData element
+            if (temporalCoverageElement == null && additionalMetadataElement != null)
+            {
+                var describesElement = additionalMetadataElement.SelectSingleNode("describes");
+                if (describesElement != null)
+                {
+                    additionalMetadataElement.RemoveChild(describesElement);
+                }
+            }
+        }
+
+        private static void RemoveEmptyElements(XmlDocument emlDocument)
+        {
+            var rootElement = emlDocument.DocumentElement;
+            //rootElement.
+        }
+
         private static void WriteParamMetadata(DQueryData request, XmlDocument emlDocument)
         {
             XmlNamespaceManager emlNamespaceMgr = new XmlNamespaceManager(emlDocument.NameTable);

File Source/WebService/Web.Admin/Web.config

   <connectionStrings>
     <add name="ApplicationServices" connectionString="data source=.\SQLEXPRESS;Integrated Security=SSPI;AttachDBFilename=|DataDirectory|aspnetdb.mdf;User Instance=true" providerName="System.Data.SqlClient" />
     <add name="DefaultConnection" connectionString="Data Source=.\SQLEXPRESS;Initial Catalog=aspnet_d77259fe74264d27834ce01b09513540;Integrated Security=True;MultipleActiveResultSets=True" providerName="System.Data.SqlClient" />
-    <!--<add name="DCXLAdminEntities" connectionString="metadata=res://*/AdminEntities.csdl|res://*/AdminEntities.ssdl|res://*/AdminEntities.msl;provider=System.Data.SqlClient;provider connection string=&quot;data source=v12h47zv64.database.windows.net;initial catalog=adminservice;user id=dataup;password=LakeMerritt!;multipleactiveresultsets=True;App=EntityFramework&quot;" providerName="System.Data.EntityClient" />-->
-    <add name="DCXLAdminEntities" connectionString="metadata=res://*/AdminEntities.csdl|res://*/AdminEntities.ssdl|res://*/AdminEntities.msl;provider=System.Data.SqlClient;provider connection string=&quot;data source=uakxp9zd12.database.windows.net;initial catalog=adminservicedev6aug;user id=datacuration;password=dcxl2012!;multipleactiveresultsets=True;App=EntityFramework&quot;" providerName="System.Data.EntityClient" />
+    <add name="DCXLAdminEntities" connectionString="metadata=res://*/AdminEntities.csdl|res://*/AdminEntities.ssdl|res://*/AdminEntities.msl;provider=System.Data.SqlClient;provider connection string=&quot;data source=v12h47zv64.database.windows.net;initial catalog=webadmindev;user id=dataup;password=LakeMerritt!;multipleactiveresultsets=True;App=EntityFramework&quot;" providerName="System.Data.EntityClient" />
   </connectionStrings>
   <appSettings>
     <add key="enableSimpleMembership" value="false"/>
     <add key="EMLMetadata" value=".\DataUpMetadata.xml" />
     <add key="StandardUnitsPath" value=".\StandardUnits.txt" />
     <add key="PostFileTimeOutMinutes" value="100" />
-    <add key="DCXLAdminEntities" value="metadata=res://*/AdminEntities.csdl|res://*/AdminEntities.ssdl|res://*/AdminEntities.msl;provider=System.Data.SqlClient;provider connection string=&quot;data source=uakxp9zd12.database.windows.net;initial catalog=adminservicedev6aug;user id=datacuration;password=dcxl2012!;multipleactiveresultsets=True;App=EntityFramework&quot;" />
+    <add key="DCXLAdminEntities" value="metadata=res://*/AdminEntities.csdl|res://*/AdminEntities.ssdl|res://*/AdminEntities.msl;provider=System.Data.SqlClient;provider connection string=&quot;data source=v12h47zv64.database.windows.net;initial catalog=webadmindev;user id=dataup;password=LakeMerritt!;multipleactiveresultsets=True;App=EntityFramework&quot;" />
   </appSettings>
   <system.web>
     <customErrors mode="Off" />

File Source/WebService/Web.Azure/ServiceConfiguration.Cloud.cscfg

     <Instances count="1" />
     <ConfigurationSettings>
       <Setting name="Microsoft.WindowsAzure.Plugins.Diagnostics.ConnectionString" value="DefaultEndpointsProtocol=https;AccountName=datatupstorage;AccountKey=JNP40XUjm6C+0pXYmtTMx7MSKg2+bbjUUjj8usDi8rEE9Z6VGy9iQ5kGwcpmmXcLkw8VsROwzPFRt97lafs9+A==" />
-      <!--<Setting name="Microsoft.WindowsAzure.Plugins.Diagnostics.ConnectionString" value="DefaultEndpointsProtocol=https;AccountName=dcxldevelopment;AccountKey=GyoG7buqRTJ3qmbGv5hAVqqTjlne8G0vDVuDrokj41oouqnTvdxuCcGjNCwW4KykdPWmkx55XU8GHy13EZlMmg==" />-->
       <Setting name="ClientValidationEnabled" value="true" />
       <Setting name="UnobtrusiveJavaScriptEnabled" value="true" />
       <Setting name="AdminEmail" value="test@test.com" />
       <Setting name="EMLMetadata" value=".\DCXLMetadata.xml" />
       <Setting name="PostFileTimeOutMinutes" value="100" />
       <Setting name="DCXLAdminEntities" value="metadata=res://*/AdminEntities.csdl|res://*/AdminEntities.ssdl|res://*/AdminEntities.msl;provider=System.Data.SqlClient;provider connection string=&quot;data source=v12h47zv64.database.windows.net;initial catalog=adminservice;user id=dataup;password=LakeMerritt!;multipleactiveresultsets=True;App=EntityFramework&quot;" />
-      <!--<Setting name="DCXLAdminEntities" value="metadata=res://*/Entities.csdl|res://*/Entities.ssdl|res://*/Entities.msl;provider=System.Data.SqlClient;provider connection string=&quot;data source=tcp:uakxp9zd12.database.windows.net;initial catalog=datauptest;persist security info=True;user id=datacuration;password=dcxl2012!;multipleactiveresultsets=True;App=EntityFramework&quot;" />-->
     </ConfigurationSettings>
     <Certificates>
       <Certificate name="DataUpCertificate" thumbprint="D6B81E34474C185D9490329D37C9A917A10B95B7" thumbprintAlgorithm="sha1" />

File Source/WebService/Web.Azure/ServiceConfiguration.Local.cscfg

   <Role name="Web.Admin">
     <Instances count="1" />
     <ConfigurationSettings>
-      <Setting name="Microsoft.WindowsAzure.Plugins.Diagnostics.ConnectionString" value="DefaultEndpointsProtocol=https;AccountName=adminservicedev;AccountKey=wf7l7Lb8VOct8d8WLZ1csq9kHNTP010bZi7Eq1CLfqBxjWSbw2p9+9pdQWfI+tC4evlc0eim7Q9I19wT5u2gHQ==" />
+      <Setting name="Microsoft.WindowsAzure.Plugins.Diagnostics.ConnectionString" value="DefaultEndpointsProtocol=https;AccountName=dataupdev;AccountKey=nUB3FYLvNhC13qduCFbnDxq5KS6iWniDYPI8jxzTcsz/IVLCCnA4SBk94Bu+IiIn6+n3eTJGgQSj8vMdkhyBGw==" />
       <Setting name="ClientValidationEnabled" value="true" />
       <Setting name="UnobtrusiveJavaScriptEnabled" value="true" />
       <Setting name="AdminEmail" value="test@test.com" />
       <Setting name="NewscientificMetadata" value=".\NewScientificMetadata.xml" />
       <Setting name="EMLMetadata" value=".\DCXLMetadata.xml" />
       <Setting name="PostFileTimeOutMinutes" value="100" />
-      <Setting name="DCXLAdminEntities" value="metadata=res://*/AdminEntities.csdl|res://*/AdminEntities.ssdl|res://*/AdminEntities.msl;provider=System.Data.SqlClient;provider connection string=&quot;data source=uakxp9zd12.database.windows.net;initial catalog=adminservicetest;user id=datacuration;password=dcxl2012!;multipleactiveresultsets=True;App=EntityFramework&quot;" />
+      <Setting name="DCXLAdminEntities" value="metadata=res://*/AdminEntities.csdl|res://*/AdminEntities.ssdl|res://*/AdminEntities.msl;provider=System.Data.SqlClient;provider connection string=&quot;data source=v12h47zv64.database.windows.net;initial catalog=webadmindev;user id=dataup;password=LakeMerritt!;multipleactiveresultsets=True;App=EntityFramework&quot;" />
     </ConfigurationSettings>
     <Certificates>
       <Certificate name="DataUpCertificate" thumbprint="D6B81E34474C185D9490329D37C9A917A10B95B7" thumbprintAlgorithm="sha1" />

File Source/WebService/Web.Service.suo

Binary file modified.