juddi-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From alexo...@apache.org
Subject svn commit: r1545913 - in /juddi/trunk/juddi-client.net: juddi-client.net.test/ juddi-client.net.test/org.apache.juddi.client.test/ juddi-client.net/ juddi-client.net/org.apache.juddi.v3.client.ext.wsdm/ juddi-client.net/org.apache.juddi.v3.client.util/
Date Wed, 27 Nov 2013 02:38:27 GMT
Author: alexoree
Date: Wed Nov 27 02:38:26 2013
New Revision: 1545913

URL: http://svn.apache.org/r1545913
Log:
JUDDI-633 adding tmodel comparison class which supports numbers, dates, and durations for
.NET

Added:
    juddi/trunk/juddi-client.net/juddi-client.net.test/org.apache.juddi.client.test/TModelInstanceDetailsComparatorTest.cs
    juddi/trunk/juddi-client.net/juddi-client.net/org.apache.juddi.v3.client.ext.wsdm/
    juddi/trunk/juddi-client.net/juddi-client.net/org.apache.juddi.v3.client.ext.wsdm/WSDMQosConstants.cs
    juddi/trunk/juddi-client.net/juddi-client.net/org.apache.juddi.v3.client.util/
    juddi/trunk/juddi-client.net/juddi-client.net/org.apache.juddi.v3.client.util/TModelInstanceDetailsComparator.cs
Modified:
    juddi/trunk/juddi-client.net/juddi-client.net.test/juddi-client.net.test-mono.csproj
    juddi/trunk/juddi-client.net/juddi-client.net.test/juddi-client.net.test.csproj
    juddi/trunk/juddi-client.net/juddi-client.net.test/org.apache.juddi.client.test/CryptoTests.cs
    juddi/trunk/juddi-client.net/juddi-client.net.test/org.apache.juddi.client.test/DigitalSignatureTests.cs
    juddi/trunk/juddi-client.net/juddi-client.net.test/org.apache.juddi.client.test/LogFactoryTests.cs
    juddi/trunk/juddi-client.net/juddi-client.net.test/org.apache.juddi.client.test/WSDL2UDDITest.cs
    juddi/trunk/juddi-client.net/juddi-client.net/juddi-client.net-mono.csproj
    juddi/trunk/juddi-client.net/juddi-client.net/juddi-client.net.csproj

Modified: juddi/trunk/juddi-client.net/juddi-client.net.test/juddi-client.net.test-mono.csproj
URL: http://svn.apache.org/viewvc/juddi/trunk/juddi-client.net/juddi-client.net.test/juddi-client.net.test-mono.csproj?rev=1545913&r1=1545912&r2=1545913&view=diff
==============================================================================
--- juddi/trunk/juddi-client.net/juddi-client.net.test/juddi-client.net.test-mono.csproj (original)
+++ juddi/trunk/juddi-client.net/juddi-client.net.test/juddi-client.net.test-mono.csproj Wed
Nov 27 02:38:26 2013
@@ -43,6 +43,8 @@
   <ItemGroup>
     <Compile Include="org.apache.juddi.client.test\CryptoTests.cs" />
     <Compile Include="org.apache.juddi.client.test\DigitalSignatureTests.cs" />
+    <Compile Include="org.apache.juddi.client.test\LogFactoryTests.cs" />
+    <Compile Include="org.apache.juddi.client.test\TModelInstanceDetailsComparatorTest.cs"
/>
     <Compile Include="Properties\AssemblyInfo.cs" />
     <Compile Include="org.apache.juddi.client.test\SerializationTests.cs" />
     <Compile Include="org.apache.juddi.client.test\WADL2UDDITests.cs" />

Modified: juddi/trunk/juddi-client.net/juddi-client.net.test/juddi-client.net.test.csproj
URL: http://svn.apache.org/viewvc/juddi/trunk/juddi-client.net/juddi-client.net.test/juddi-client.net.test.csproj?rev=1545913&r1=1545912&r2=1545913&view=diff
==============================================================================
--- juddi/trunk/juddi-client.net/juddi-client.net.test/juddi-client.net.test.csproj (original)
+++ juddi/trunk/juddi-client.net/juddi-client.net.test/juddi-client.net.test.csproj Wed Nov
27 02:38:26 2013
@@ -44,6 +44,7 @@
     <Compile Include="org.apache.juddi.client.test\CryptoTests.cs" />
     <Compile Include="org.apache.juddi.client.test\DigitalSignatureTests.cs" />
     <Compile Include="org.apache.juddi.client.test\LogFactoryTests.cs" />
+    <Compile Include="org.apache.juddi.client.test\TModelInstanceDetailsComparatorTest.cs"
/>
     <Compile Include="Properties\AssemblyInfo.cs" />
     <Compile Include="org.apache.juddi.client.test\SerializationTests.cs" />
     <Compile Include="org.apache.juddi.client.test\WADL2UDDITests.cs" />

Modified: juddi/trunk/juddi-client.net/juddi-client.net.test/org.apache.juddi.client.test/CryptoTests.cs
URL: http://svn.apache.org/viewvc/juddi/trunk/juddi-client.net/juddi-client.net.test/org.apache.juddi.client.test/CryptoTests.cs?rev=1545913&r1=1545912&r2=1545913&view=diff
==============================================================================
--- juddi/trunk/juddi-client.net/juddi-client.net.test/org.apache.juddi.client.test/CryptoTests.cs
(original)
+++ juddi/trunk/juddi-client.net/juddi-client.net.test/org.apache.juddi.client.test/CryptoTests.cs
Wed Nov 27 02:38:26 2013
@@ -14,7 +14,7 @@ namespace juddi_client.net.test
         public void AES128()
         {
             Console.Out.WriteLine("Cryptor AES128");
-            Cryptor c = org.apache.juddi.v3.client.cryptor.CryptorFactory.getCryptor(CryptorFactory.AES128);
+            Cryptor c = CryptorFactory.getCryptor(CryptorFactory.AES128);
             TestCryptor(c);
         }
 
@@ -33,7 +33,7 @@ namespace juddi_client.net.test
         public void AES256()
         {
             Console.Out.WriteLine("Cryptor AES256");
-            Cryptor c = org.apache.juddi.v3.client.cryptor.CryptorFactory.getCryptor(CryptorFactory.AES256);
+            Cryptor c = CryptorFactory.getCryptor(CryptorFactory.AES256);
             TestCryptor(c);
         }
 
@@ -41,7 +41,7 @@ namespace juddi_client.net.test
         public void TripleDES()
         {
             Console.Out.WriteLine("Cryptor TripleDES");
-            Cryptor c = org.apache.juddi.v3.client.cryptor.CryptorFactory.getCryptor(CryptorFactory.TripleDES);
+            Cryptor c = CryptorFactory.getCryptor(CryptorFactory.TripleDES);
             TestCryptor(c);
         }
     }

Modified: juddi/trunk/juddi-client.net/juddi-client.net.test/org.apache.juddi.client.test/DigitalSignatureTests.cs
URL: http://svn.apache.org/viewvc/juddi/trunk/juddi-client.net/juddi-client.net.test/org.apache.juddi.client.test/DigitalSignatureTests.cs?rev=1545913&r1=1545912&r2=1545913&view=diff
==============================================================================
--- juddi/trunk/juddi-client.net/juddi-client.net.test/org.apache.juddi.client.test/DigitalSignatureTests.cs
(original)
+++ juddi/trunk/juddi-client.net/juddi-client.net.test/org.apache.juddi.client.test/DigitalSignatureTests.cs
Wed Nov 27 02:38:26 2013
@@ -16,7 +16,7 @@ namespace juddi_client.net.test
     [TestFixture]
     public class DigitalSignatureTests
     {
-        org.apache.juddi.v3.client.cryptor.DigSigUtil ds = null;
+        DigSigUtil ds = null;
         string path = "";
         bool serialize = false;
         public DigitalSignatureTests()

Modified: juddi/trunk/juddi-client.net/juddi-client.net.test/org.apache.juddi.client.test/LogFactoryTests.cs
URL: http://svn.apache.org/viewvc/juddi/trunk/juddi-client.net/juddi-client.net.test/org.apache.juddi.client.test/LogFactoryTests.cs?rev=1545913&r1=1545912&r2=1545913&view=diff
==============================================================================
--- juddi/trunk/juddi-client.net/juddi-client.net.test/org.apache.juddi.client.test/LogFactoryTests.cs
(original)
+++ juddi/trunk/juddi-client.net/juddi-client.net.test/org.apache.juddi.client.test/LogFactoryTests.cs
Wed Nov 27 02:38:26 2013
@@ -1,11 +1,12 @@
 using NUnit.Framework;
-using org.apache.juddi.v3.client.log;
+using org.apache.juddi.v3.client;
 using System;
 using System.Collections.Generic;
 using System.Diagnostics;
 using System.IO;
 using System.Linq;
 using System.Text;
+using org.apache.juddi.v3.client.log;
 
 namespace juddi_client.net.test
 {
@@ -15,7 +16,7 @@ namespace juddi_client.net.test
         [Test]
         public void testLogFactory()
         {
-            Log log = LogFactory.getLog("testLogFactory", "CONSOLE", org.apache.juddi.v3.client.LogLevel.INFO,
null);
+            Log log = LogFactory.getLog("testLogFactory", "CONSOLE", LogLevel.INFO, null);
             Assert.NotNull(log);
             log.info("test");
             log.info("test", new Exception("hi"));
@@ -24,7 +25,7 @@ namespace juddi_client.net.test
         [Test]
         public void testLogFactory2()
         {
-            Log log = LogFactory.getLog("testLogFactory", "CONSOLE,EVENTLOG", org.apache.juddi.v3.client.LogLevel.INFO,
null);
+            Log log = LogFactory.getLog("testLogFactory", "CONSOLE,EVENTLOG", LogLevel.INFO,
null);
             Assert.NotNull(log);
             log.info("test");
             log.info("test", new Exception("hi"));
@@ -35,7 +36,7 @@ namespace juddi_client.net.test
         {
             if (File.Exists("./testlog.log"))
                 File.Delete("./testlog.log");
-            Log log = LogFactory.getLog("testLogFactory", "CONSOLE,EVENTLOG,FILE", org.apache.juddi.v3.client.LogLevel.INFO,
"./testlog.log");
+            Log log = LogFactory.getLog("testLogFactory", "CONSOLE,EVENTLOG,FILE", LogLevel.INFO,
"./testlog.log");
             Assert.NotNull(log);
             log.info("test");
             log.info("test", new Exception("hi"));
@@ -56,7 +57,7 @@ namespace juddi_client.net.test
         {
             if (File.Exists("./testlog.log"))
                 File.Delete("./testlog.log");
-            Log log = LogFactory.getLog("testLogFactory", "FILE", org.apache.juddi.v3.client.LogLevel.INFO,
"./testlog.log");
+            Log log = LogFactory.getLog("testLogFactory", "FILE", LogLevel.INFO, "./testlog.log");
             Assert.NotNull(log);
             log.info("test");
             log.info("test", new Exception("hi"));
@@ -68,7 +69,7 @@ namespace juddi_client.net.test
         public void testLogFactory5()
         {
 
-            Log log = LogFactory.getLog("testLogFactory", "EVENTLOG", org.apache.juddi.v3.client.LogLevel.INFO,
null);
+            Log log = LogFactory.getLog("testLogFactory", "EVENTLOG", LogLevel.INFO, null);
             Assert.NotNull(log);
             log.info("test");
             log.info("test", new Exception("hi"));

Added: juddi/trunk/juddi-client.net/juddi-client.net.test/org.apache.juddi.client.test/TModelInstanceDetailsComparatorTest.cs
URL: http://svn.apache.org/viewvc/juddi/trunk/juddi-client.net/juddi-client.net.test/org.apache.juddi.client.test/TModelInstanceDetailsComparatorTest.cs?rev=1545913&view=auto
==============================================================================
--- juddi/trunk/juddi-client.net/juddi-client.net.test/org.apache.juddi.client.test/TModelInstanceDetailsComparatorTest.cs
(added)
+++ juddi/trunk/juddi-client.net/juddi-client.net.test/org.apache.juddi.client.test/TModelInstanceDetailsComparatorTest.cs
Wed Nov 27 02:38:26 2013
@@ -0,0 +1,457 @@
+using NUnit.Framework;
+using org.apache.juddi.v3.client.util;
+using org.uddi.apiv3;
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Text;
+
+namespace juddi_client.net.test.org.apache.juddi.client.test
+{
+    [TestFixture]
+    public class TModelInstanceDetailsComparatorTest
+    {
+
+        /**
+ * Test of compare method, of class TModelInstanceDetailsComparator.
+ */
+        [Test]
+        [ExpectedException(typeof(ArgumentNullException))]
+        public void testCompareToNulls()
+        {
+            System.Console.Out.WriteLine("TModelInstanceDetailsComparator.compare nulls");
+            tModelInstanceInfo[] lhs = null;
+            tModelInstanceInfo[] rhs = null;
+            TModelInstanceDetailsComparator instance = new TModelInstanceDetailsComparator(null,
true, false, false);
+            int expResult = 0;
+            int result = instance.compare(lhs, rhs);
+        }
+
+        [Test]
+        [ExpectedException(typeof(ArgumentOutOfRangeException))]
+        public void testCompareToNulls2()
+        {
+            System.Console.Out.WriteLine("TModelInstanceDetailsComparator.compare nulls2");
+            tModelInstanceInfo[] lhs = null;
+            tModelInstanceInfo[] rhs = null;
+            TModelInstanceDetailsComparator instance = new TModelInstanceDetailsComparator("hi",
true, true, false);
+            int expResult = 0;
+            int result = instance.compare(lhs, rhs);
+        }
+
+        [Test]
+        [ExpectedException(typeof(ArgumentOutOfRangeException))]
+        public void testCompareToNulls3()
+        {
+            System.Console.Out.WriteLine("TModelInstanceDetailsComparator.compare nulls3");
+            tModelInstanceInfo[] lhs = null;
+            tModelInstanceInfo[] rhs = null;
+            TModelInstanceDetailsComparator instance = new TModelInstanceDetailsComparator("hi",
true, false, true);
+            int expResult = 0;
+            int result = instance.compare(lhs, rhs);
+        }
+
+        [Test]
+        [ExpectedException(typeof(ArgumentOutOfRangeException))]
+        public void testCompareToNulls4()
+        {
+            System.Console.Out.WriteLine("TModelInstanceDetailsComparator.compare nulls4");
+            tModelInstanceInfo[] lhs = null;
+            tModelInstanceInfo[] rhs = null;
+            TModelInstanceDetailsComparator instance = new TModelInstanceDetailsComparator("hi",
false, true, true);
+            int expResult = 0;
+            int result = instance.compare(lhs, rhs);
+        }
+
+        [Test]
+        [ExpectedException(typeof(ArgumentOutOfRangeException))]
+        public void testCompareToNulls5()
+        {
+            System.Console.Out.WriteLine("TModelInstanceDetailsComparator.compare nulls5");
+            tModelInstanceInfo[] lhs = new tModelInstanceInfo[1] { new tModelInstanceInfo()
};
+            tModelInstanceInfo[] rhs = new tModelInstanceInfo[1] { new tModelInstanceInfo()
};
+            TModelInstanceDetailsComparator instance = new TModelInstanceDetailsComparator("hi",
true, false, false);
+            int expResult = 0;
+            int result = instance.compare(lhs, rhs);
+        }
+
+        [Test]
+        [ExpectedException(typeof(ArgumentOutOfRangeException))]
+        public void testCompareToNulls6()
+        {
+            System.Console.Out.WriteLine("TModelInstanceDetailsComparator.compare nulls6");
+            tModelInstanceInfo[] lhs = new tModelInstanceInfo[1] { new tModelInstanceInfo()
};
+            tModelInstanceInfo[] rhs = new tModelInstanceInfo[1] { new tModelInstanceInfo()
};
+            TModelInstanceDetailsComparator instance = new TModelInstanceDetailsComparator("hi",
true, false, false);
+            int expResult = 0;
+            int result = instance.compare(lhs, rhs);
+        }
+
+        [Test]
+        [ExpectedException(typeof(ArgumentOutOfRangeException))]
+        public void testCompareToNulls7()
+        {
+            System.Console.Out.WriteLine("TModelInstanceDetailsComparator.compare nulls7");
+            tModelInstanceInfo[] lhs = new tModelInstanceInfo[1] { new tModelInstanceInfo()
};
+
+            tModelInstanceInfo[] rhs = new tModelInstanceInfo[1] { new tModelInstanceInfo()
};
+
+            TModelInstanceDetailsComparator instance = new TModelInstanceDetailsComparator("hi",
true, false, false);
+            int expResult = 0;
+            int result = instance.compare(lhs, rhs);
+        }
+
+        [Test]
+        [ExpectedException(typeof(ArgumentNullException))]
+        public void testCompareToNulls8()
+        {
+            System.Console.Out.WriteLine("TModelInstanceDetailsComparator.compare nulls8");
+            tModelInstanceInfo[] lhs = null;
+            tModelInstanceInfo[] rhs = null;
+            TModelInstanceDetailsComparator instance = new TModelInstanceDetailsComparator("hi",
true, false, false);
+            int expResult = 0;
+            int result = instance.compare(lhs, rhs);
+        }
+
+        [Test]
+        [ExpectedException(typeof(ArgumentOutOfRangeException))]
+        public void testCompareToNotFound()
+        {
+            System.Console.Out.WriteLine("TModelInstanceDetailsComparator.compare notfound");
+            tModelInstanceInfo[] lhs = new tModelInstanceInfo[1] { new tModelInstanceInfo()
};
+            lhs[0].tModelKey = ("asd");
+            tModelInstanceInfo[] rhs = new tModelInstanceInfo[1] { new tModelInstanceInfo()
};
+            rhs[0].tModelKey = ("asd");
+            rhs[0].instanceDetails = new instanceDetails();
+            TModelInstanceDetailsComparator instance = new TModelInstanceDetailsComparator("hi",
true, false, false);
+            int expResult = 0;
+            int result = instance.compare(lhs, rhs);
+        }
+
+        [Test]
+        [ExpectedException(typeof(ArgumentOutOfRangeException))]
+        public void testCompareToNoData()
+        {
+            System.Console.Out.WriteLine("TModelInstanceDetailsComparator.compare testCompareToNoData");
+            tModelInstanceInfo[] lhs = new tModelInstanceInfo[1] { new tModelInstanceInfo()
};
+
+            lhs[0].tModelKey = ("hi");
+            lhs[0].instanceDetails = new instanceDetails();
+            tModelInstanceInfo[] rhs = new tModelInstanceInfo[1] { new tModelInstanceInfo()
};
+
+
+            rhs[0].tModelKey = ("hi");
+            rhs[0].instanceDetails = new instanceDetails();
+            TModelInstanceDetailsComparator instance = new TModelInstanceDetailsComparator("hi",
true, false, false);
+            int expResult = 0;
+            int result = instance.compare(lhs, rhs);
+        }
+
+        [Test]
+        [ExpectedException(typeof(ArgumentOutOfRangeException))]
+        public void testCompareToLHSNull()
+        {
+            System.Console.Out.WriteLine("TModelInstanceDetailsComparator.compare testCompareToLHSNull");
+            tModelInstanceInfo[] lhs = new tModelInstanceInfo[1] { new tModelInstanceInfo()
};
+
+            lhs[0].tModelKey = ("hi");
+            lhs[0].instanceDetails = new instanceDetails();
+            tModelInstanceInfo[] rhs = new tModelInstanceInfo[1] { new tModelInstanceInfo()
};
+
+            rhs[0].tModelKey = ("hi");
+            rhs[0].instanceDetails = new instanceDetails();
+
+            rhs[0].instanceDetails.instanceParms = ("xyz");
+            TModelInstanceDetailsComparator instance = new TModelInstanceDetailsComparator("hi",
true, false, false);
+            int expResult = 0;
+            int result = instance.compare(lhs, rhs);
+        }
+
+        [Test]
+        [ExpectedException(typeof(System.ArgumentOutOfRangeException))]
+
+        public void testCompareToRHSNull()
+        {
+            System.Console.Out.WriteLine("TModelInstanceDetailsComparator.compare testCompareToRHSNull");
+            tModelInstanceInfo[] lhs = new tModelInstanceInfo[1] { new tModelInstanceInfo()
};
+
+            lhs[0].tModelKey = ("hi");
+            lhs[0].instanceDetails = new instanceDetails();
+            lhs[0].instanceDetails.instanceParms = ("xyz");
+            tModelInstanceInfo[] rhs = new tModelInstanceInfo[1] { new tModelInstanceInfo()
};
+
+
+            rhs[0].tModelKey = ("hi");
+            rhs[0].instanceDetails = new instanceDetails();
+            //rhs[0].instanceDetails.instanceParms=("xyz");
+            TModelInstanceDetailsComparator instance = new TModelInstanceDetailsComparator("hi",
true, false, false);
+            int expResult = 0;
+            int result = instance.compare(lhs, rhs);
+        }
+
+        [Test]
+        [ExpectedException(typeof(FormatException))]
+        public void testCompareToNotNumberData()
+        {
+            System.Console.Out.WriteLine("TModelInstanceDetailsComparator.compare testCompareToNotNumberData");
+            tModelInstanceInfo[] lhs = new tModelInstanceInfo[1] { new tModelInstanceInfo()
};
+
+            lhs[0].tModelKey = ("hi");
+            lhs[0].instanceDetails = new instanceDetails();
+            lhs[0].instanceDetails.instanceParms = ("xyz");
+            tModelInstanceInfo[] rhs = new tModelInstanceInfo[1] { new tModelInstanceInfo()
};
+
+
+            rhs[0].tModelKey = ("hi");
+            rhs[0].instanceDetails = new instanceDetails();
+            rhs[0].instanceDetails.instanceParms = ("xyz");
+            TModelInstanceDetailsComparator instance = new TModelInstanceDetailsComparator("hi",
true, false, false);
+            int expResult = 0;
+            int result = instance.compare(lhs, rhs);
+        }
+
+        [Test]
+        public void testCompareToNumberDataEquals()
+        {
+            System.Console.Out.WriteLine("TModelInstanceDetailsComparator.compare testCompareToNumberDataEquals");
+            tModelInstanceInfo[] lhs = new tModelInstanceInfo[1] { new tModelInstanceInfo()
};
+
+            lhs[0].tModelKey = ("hi");
+            lhs[0].instanceDetails = new instanceDetails();
+            lhs[0].instanceDetails.instanceParms = ("3.14");
+            tModelInstanceInfo[] rhs = new tModelInstanceInfo[1] { new tModelInstanceInfo()
};
+
+
+            rhs[0].tModelKey = ("hi");
+            rhs[0].instanceDetails = new instanceDetails();
+            rhs[0].instanceDetails.instanceParms = ("3.14");
+            TModelInstanceDetailsComparator instance = new TModelInstanceDetailsComparator("hi",
true, false, false);
+            int expResult = 0;
+            int result = instance.compare(lhs, rhs);
+            Assert.AreEqual(expResult, result, "result " + result);
+        }
+
+        [Test]
+        public void testCompareToNumberDataGT()
+        {
+            System.Console.Out.WriteLine("TModelInstanceDetailsComparator.compare testCompareToNumberDataGT");
+            tModelInstanceInfo[] lhs = new tModelInstanceInfo[1] { new tModelInstanceInfo()
};
+
+            lhs[0].tModelKey = ("hi");
+            lhs[0].instanceDetails = new instanceDetails();
+            lhs[0].instanceDetails.instanceParms = ("3.15");
+            tModelInstanceInfo[] rhs = new tModelInstanceInfo[1] { new tModelInstanceInfo()
};
+
+
+            rhs[0].tModelKey = ("hi");
+            rhs[0].instanceDetails = new instanceDetails();
+            rhs[0].instanceDetails.instanceParms = ("3.14");
+            TModelInstanceDetailsComparator instance = new TModelInstanceDetailsComparator("hi",
true, false, false);
+
+            int result = instance.compare(lhs, rhs);
+            Assert.True(result > 0, "result " + result);
+        }
+
+        [Test]
+        public void testCompareToNumberDataLT()
+        {
+            System.Console.Out.WriteLine("TModelInstanceDetailsComparator.compare testCompareToNumberDataLT");
+            tModelInstanceInfo[] lhs = new tModelInstanceInfo[1] { new tModelInstanceInfo()
};
+
+            lhs[0].tModelKey = ("hi");
+            lhs[0].instanceDetails = new instanceDetails();
+            lhs[0].instanceDetails.instanceParms = ("3.10");
+            tModelInstanceInfo[] rhs = new tModelInstanceInfo[1] { new tModelInstanceInfo()
};
+
+
+            rhs[0].tModelKey = ("hi");
+            rhs[0].instanceDetails = new instanceDetails();
+            rhs[0].instanceDetails.instanceParms = ("3.14");
+            TModelInstanceDetailsComparator instance = new TModelInstanceDetailsComparator("hi",
true, false, false);
+
+            int result = instance.compare(lhs, rhs);
+            Assert.True(result < 0, "result " + result);
+        }
+
+        [Test]
+        [ExpectedException(typeof(System.FormatException))]
+        public void testCompareToDate()
+        {
+            System.Console.Out.WriteLine("TModelInstanceDetailsComparator.compare testCompareToDate");
+            tModelInstanceInfo[] lhs = new tModelInstanceInfo[1] { new tModelInstanceInfo()
};
+
+            lhs[0].tModelKey = ("hi");
+            lhs[0].instanceDetails = new instanceDetails();
+            lhs[0].instanceDetails.instanceParms = ("asdasd");
+            tModelInstanceInfo[] rhs = new tModelInstanceInfo[1] { new tModelInstanceInfo()
};
+
+
+            rhs[0].tModelKey = ("hi");
+            rhs[0].instanceDetails = new instanceDetails();
+            rhs[0].instanceDetails.instanceParms = ("asdasdasd");
+            TModelInstanceDetailsComparator instance = new TModelInstanceDetailsComparator("hi",
false, true, false);
+
+            int result = instance.compare(lhs, rhs);
+            //Assert.assertTrue("result " + result,result < 0);
+
+        }
+
+        [Test]
+        public void testCompareToDateGT()
+        {
+            System.Console.Out.WriteLine("TModelInstanceDetailsComparator.compare testCompareToDateGT");
+            tModelInstanceInfo[] lhs = new tModelInstanceInfo[1] { new tModelInstanceInfo()
};
+
+            lhs[0].tModelKey = ("hi");
+            lhs[0].instanceDetails = new instanceDetails();
+            lhs[0].instanceDetails.instanceParms = ("2006-05-30T09:30:10-06:00");
+            tModelInstanceInfo[] rhs = new tModelInstanceInfo[1] { new tModelInstanceInfo()
};
+
+
+            rhs[0].tModelKey = ("hi");
+            rhs[0].instanceDetails = new instanceDetails();
+            rhs[0].instanceDetails.instanceParms = ("2004-05-30T09:30:10-06:00");
+            TModelInstanceDetailsComparator instance = new TModelInstanceDetailsComparator("hi",
false, true, false);
+
+            int result = instance.compare(lhs, rhs);
+            Assert.True(result > 0, "result " + lhs[0].instanceDetails.instanceParms +
" compare to " +
+                    rhs[0].instanceDetails.instanceParms + " " +
+                    result);
+
+        }
+
+        [Test]
+        public void testCompareToDateLT()
+        {
+            System.Console.Out.WriteLine("TModelInstanceDetailsComparator.compare testCompareToDateLT");
+            tModelInstanceInfo[] lhs = new tModelInstanceInfo[1] { new tModelInstanceInfo()
};
+
+            lhs[0].tModelKey = ("hi");
+            lhs[0].instanceDetails = new instanceDetails();
+            lhs[0].instanceDetails.instanceParms = ("2002-05-30T09:30:10-06:00");
+            tModelInstanceInfo[] rhs = new tModelInstanceInfo[1] { new tModelInstanceInfo()
};
+
+
+            rhs[0].tModelKey = ("hi");
+            rhs[0].instanceDetails = new instanceDetails();
+            rhs[0].instanceDetails.instanceParms = ("2005-05-30T09:30:10-06:00");
+            TModelInstanceDetailsComparator instance = new TModelInstanceDetailsComparator("hi",
false, true, false);
+
+            int result = instance.compare(lhs, rhs);
+            Assert.True(result < 0, "result " + lhs[0].instanceDetails.instanceParms +
" compare to " +
+                    rhs[0].instanceDetails.instanceParms + " " + result);
+
+        }
+
+        [Test]
+        public void testCompareToDateEQ()
+        {
+            System.Console.Out.WriteLine("TModelInstanceDetailsComparator.compare testCompareToDateEQ");
+            tModelInstanceInfo[] lhs = new tModelInstanceInfo[1] { new tModelInstanceInfo()
};
+
+            lhs[0].tModelKey = ("hi");
+            lhs[0].instanceDetails = new instanceDetails();
+            lhs[0].instanceDetails.instanceParms = ("2002-05-30T09:30:10-06:00");
+            tModelInstanceInfo[] rhs = new tModelInstanceInfo[1] { new tModelInstanceInfo()
};
+
+
+            rhs[0].tModelKey = ("hi");
+            rhs[0].instanceDetails = new instanceDetails();
+            rhs[0].instanceDetails.instanceParms = ("2002-05-30T09:30:10-06:00");
+            TModelInstanceDetailsComparator instance = new TModelInstanceDetailsComparator("hi",
false, true, false);
+
+            int result = instance.compare(lhs, rhs);
+            Assert.True(result == 0, "result " + lhs[0].instanceDetails.instanceParms + "
compare to " +
+                    rhs[0].instanceDetails.instanceParms + " " +
+                    result);
+
+        }
+
+        [Test]
+        [ExpectedException(typeof(System.FormatException))]
+        public void testCompareToDurationInvalid()
+        {
+            System.Console.Out.WriteLine("TModelInstanceDetailsComparator.compare testCompareToDurationInvalid");
+            tModelInstanceInfo[] lhs = new tModelInstanceInfo[1] { new tModelInstanceInfo()
};
+
+            lhs[0].tModelKey = ("hi");
+            lhs[0].instanceDetails = new instanceDetails();
+            lhs[0].instanceDetails.instanceParms = ("asdasd");
+            tModelInstanceInfo[] rhs = new tModelInstanceInfo[1] { new tModelInstanceInfo()
};
+
+
+            rhs[0].tModelKey = ("hi");
+            rhs[0].instanceDetails = new instanceDetails();
+            rhs[0].instanceDetails.instanceParms = ("asdasd");
+            TModelInstanceDetailsComparator instance = new TModelInstanceDetailsComparator("hi",
false, false, true);
+            int result = instance.compare(lhs, rhs);
+            Assert.True(result == 0, "result " + result);
+        }
+
+        [Test]
+        public void testCompareToDurationLT()
+        {
+            System.Console.Out.WriteLine("TModelInstanceDetailsComparator.compare testCompareToDurationLT");
+            tModelInstanceInfo[] lhs = new tModelInstanceInfo[1] { new tModelInstanceInfo()
};
+
+            lhs[0].tModelKey = ("hi");
+            lhs[0].instanceDetails = new instanceDetails();
+            lhs[0].instanceDetails.instanceParms = ("P1Y");
+            tModelInstanceInfo[] rhs = new tModelInstanceInfo[1] { new tModelInstanceInfo()
};
+
+
+            rhs[0].tModelKey = ("hi");
+            rhs[0].instanceDetails = new instanceDetails();
+            rhs[0].instanceDetails.instanceParms = ("P3Y");
+            TModelInstanceDetailsComparator instance = new TModelInstanceDetailsComparator("hi",
false, false, true);
+            int result = instance.compare(lhs, rhs);
+            Assert.True(result < 0, "result " + lhs[0].instanceDetails.instanceParms +
" compare to " +
+                    rhs[0].instanceDetails.instanceParms + " " +
+                    result);
+        }
+
+        [Test]
+        public void testCompareToDurationGT()
+        {
+            System.Console.Out.WriteLine("TModelInstanceDetailsComparator.compare testCompareToDurationGT");
+            tModelInstanceInfo[] lhs = new tModelInstanceInfo[1] { new tModelInstanceInfo()
};
+
+            lhs[0].tModelKey = ("hi");
+            lhs[0].instanceDetails = new instanceDetails();
+            lhs[0].instanceDetails.instanceParms = ("P5Y");
+            tModelInstanceInfo[] rhs = new tModelInstanceInfo[1] { new tModelInstanceInfo()
};
+
+
+            rhs[0].tModelKey = ("hi");
+            rhs[0].instanceDetails = new instanceDetails();
+            rhs[0].instanceDetails.instanceParms = ("P2Y");
+            TModelInstanceDetailsComparator instance = new TModelInstanceDetailsComparator("hi",
false, false, true);
+            int result = instance.compare(lhs, rhs);
+            Assert.True(result > 0, "result " + lhs[0].instanceDetails.instanceParms +
" compare to " +
+                    rhs[0].instanceDetails.instanceParms + " " +
+                    result);
+        }
+
+        [Test]
+        public void testCompareToDurationEQ()
+        {
+            System.Console.Out.WriteLine("TModelInstanceDetailsComparator.compare testCompareToDurationEQ");
+            tModelInstanceInfo[] lhs = new tModelInstanceInfo[1] { new tModelInstanceInfo()
};
+
+            lhs[0].tModelKey = ("hi");
+            lhs[0].instanceDetails = new instanceDetails();
+            lhs[0].instanceDetails.instanceParms = ("P5Y");
+            tModelInstanceInfo[] rhs = new tModelInstanceInfo[1] { new tModelInstanceInfo()
};
+
+
+            rhs[0].tModelKey = ("hi");
+            rhs[0].instanceDetails = new instanceDetails();
+            rhs[0].instanceDetails.instanceParms = ("P5Y");
+            TModelInstanceDetailsComparator instance = new TModelInstanceDetailsComparator("hi",
false, false, true);
+            int result = instance.compare(lhs, rhs);
+            Assert.True(result == 0, "result " + lhs[0].instanceDetails.instanceParms + "
compare to " +
+                     lhs[0].instanceDetails.instanceParms + " " +
+                    result);
+        }
+    }
+}

Modified: juddi/trunk/juddi-client.net/juddi-client.net.test/org.apache.juddi.client.test/WSDL2UDDITest.cs
URL: http://svn.apache.org/viewvc/juddi/trunk/juddi-client.net/juddi-client.net.test/org.apache.juddi.client.test/WSDL2UDDITest.cs?rev=1545913&r1=1545912&r2=1545913&view=diff
==============================================================================
--- juddi/trunk/juddi-client.net/juddi-client.net.test/org.apache.juddi.client.test/WSDL2UDDITest.cs
(original)
+++ juddi/trunk/juddi-client.net/juddi-client.net.test/org.apache.juddi.client.test/WSDL2UDDITest.cs
Wed Nov 27 02:38:26 2013
@@ -52,7 +52,7 @@ namespace juddi_client.net.test
             ReadWSDL wsi = new ReadWSDL();
             try
             {
-                org.xmlsoap.schemas.easyWsdl.tDefinitions wsdlDefinition = wsi.readWSDL(null);
+                tDefinitions wsdlDefinition = wsi.readWSDL(null);
             }
             catch (ArgumentNullException)
             {
@@ -80,7 +80,7 @@ namespace juddi_client.net.test
 
            
             ReadWSDL wsi = new ReadWSDL();
-            org.xmlsoap.schemas.easyWsdl.tDefinitions wsdlDefinition = wsi.readWSDL(
+            tDefinitions wsdlDefinition = wsi.readWSDL(
                pathAndFile
                 );
             Properties properties1 = new Properties();

Modified: juddi/trunk/juddi-client.net/juddi-client.net/juddi-client.net-mono.csproj
URL: http://svn.apache.org/viewvc/juddi/trunk/juddi-client.net/juddi-client.net/juddi-client.net-mono.csproj?rev=1545913&r1=1545912&r2=1545913&view=diff
==============================================================================
--- juddi/trunk/juddi-client.net/juddi-client.net/juddi-client.net-mono.csproj (original)
+++ juddi/trunk/juddi-client.net/juddi-client.net/juddi-client.net-mono.csproj Wed Nov 27
02:38:26 2013
@@ -72,6 +72,7 @@
     <Compile Include="org.apache.juddi.v3.client.cryptor\CryptorFactory.cs" />
     <Compile Include="org.apache.juddi.v3.client.cryptor\DigSigUtil.cs" />
     <Compile Include="org.apache.juddi.v3.client.cryptor\TripleDESCryptor.cs" />
+    <Compile Include="org.apache.juddi.v3.client.ext.wsdm\WSDMQosConstants.cs" />
     <Compile Include="org.apache.juddi.v3.client.mapping\easyWsdl.cs" />
     <Compile Include="org.apache.juddi.v3.client.mapping\ServiceRegistrationResponse.cs"
/>
     <Compile Include="org.apache.juddi.v3.client.mapping\URLLocalizer.cs" />
@@ -88,6 +89,7 @@
     <Compile Include="org.apache.juddi.v3.client.subscription\UnableToSignException.cs"
/>
     <Compile Include="org.apache.juddi.v3.client.subscription\UnexpectedResponseException.cs"
/>
     <Compile Include="org.apache.juddi.v3.client.transport\AspNetTransport.cs" />
+    <Compile Include="org.apache.juddi.v3.client.util\TModelInstanceDetailsComparator.cs"
/>
     <Compile Include="org.apache.juddi.v3.client\ConsoleLogger.cs" />
     <Compile Include="org.apache.juddi.v3.client\EventLogger.cs" />
     <Compile Include="org.apache.juddi.v3.client\FileLogger.cs" />

Modified: juddi/trunk/juddi-client.net/juddi-client.net/juddi-client.net.csproj
URL: http://svn.apache.org/viewvc/juddi/trunk/juddi-client.net/juddi-client.net/juddi-client.net.csproj?rev=1545913&r1=1545912&r2=1545913&view=diff
==============================================================================
--- juddi/trunk/juddi-client.net/juddi-client.net/juddi-client.net.csproj (original)
+++ juddi/trunk/juddi-client.net/juddi-client.net/juddi-client.net.csproj Wed Nov 27 02:38:26
2013
@@ -72,6 +72,7 @@
     <Compile Include="org.apache.juddi.v3.client.cryptor\CryptorFactory.cs" />
     <Compile Include="org.apache.juddi.v3.client.cryptor\DigSigUtil.cs" />
     <Compile Include="org.apache.juddi.v3.client.cryptor\TripleDESCryptor.cs" />
+    <Compile Include="org.apache.juddi.v3.client.ext.wsdm\WSDMQosConstants.cs" />
     <Compile Include="org.apache.juddi.v3.client.mapping\easyWsdl.cs" />
     <Compile Include="org.apache.juddi.v3.client.mapping\ServiceRegistrationResponse.cs"
/>
     <Compile Include="org.apache.juddi.v3.client.mapping\URLLocalizer.cs" />
@@ -88,6 +89,7 @@
     <Compile Include="org.apache.juddi.v3.client.subscription\UnableToSignException.cs"
/>
     <Compile Include="org.apache.juddi.v3.client.subscription\UnexpectedResponseException.cs"
/>
     <Compile Include="org.apache.juddi.v3.client.transport\AspNetTransport.cs" />
+    <Compile Include="org.apache.juddi.v3.client.util\TModelInstanceDetailsComparator.cs"
/>
     <Compile Include="org.apache.juddi.v3.client\ConsoleLogger.cs" />
     <Compile Include="org.apache.juddi.v3.client\EventLogger.cs" />
     <Compile Include="org.apache.juddi.v3.client\FileLogger.cs" />

Added: juddi/trunk/juddi-client.net/juddi-client.net/org.apache.juddi.v3.client.ext.wsdm/WSDMQosConstants.cs
URL: http://svn.apache.org/viewvc/juddi/trunk/juddi-client.net/juddi-client.net/org.apache.juddi.v3.client.ext.wsdm/WSDMQosConstants.cs?rev=1545913&view=auto
==============================================================================
--- juddi/trunk/juddi-client.net/juddi-client.net/org.apache.juddi.v3.client.ext.wsdm/WSDMQosConstants.cs
(added)
+++ juddi/trunk/juddi-client.net/juddi-client.net/org.apache.juddi.v3.client.ext.wsdm/WSDMQosConstants.cs
Wed Nov 27 02:38:26 2013
@@ -0,0 +1,104 @@
+/**
+ * Copyright 2013 The Apache Software Foundation.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+using System;
+using System.Collections.Generic;
+using System.Text;
+
+namespace org.apache.juddi.v3.client.ext.wsdm
+{
+    /// <summary>
+    /// Defines constants for OASIS's WSDM specification. Specifically tModels for use in
UDDI
+    /// https://www.oasis-open.org/committees/download.php/6227/uddi-spec-tc-tn-QoS-metrics-20040224.doc
+    /// @author Alex O'Ree 
+    /// </summary>
+    public static class WSDMQosConstants
+    {
+        
+    /**
+     * This is the 'for more information' url for WSDM + UDDI
+     */
+    public static readonly string moreInfoUrl = "https://www.oasis-open.org/committees/download.php/6227/uddi-spec-tc-tn-QoS-metrics-20040224.doc";
+    public static readonly string WSDM_KEYGEN = "urn:wsdm.org:keygenerator";
+    public static readonly string WSDM_METRIC_KEYGEN = "urn:wsdm.org:metric:keygenerator";
+    public static readonly string WSDM_IDENTITY_KEYGEN = "urn:wsdm.org:identity:keygenerator";
+    public static readonly string WSDM_QOS_KEYGEN = "urn:wsdm.org:qos:keygenerator";
+    /**
+     * The number of requests to a given service. (number of requests)
+     */
+    public static readonly string METRIC_REQUEST_COUNT_KEY = "urn:wsdm.org:metric:requestcount";
+    public static readonly string METRIC_RequestCount = "RequestCount";
+    /**
+     * The number of replies from a given service. (number of replies)
+     */
+    public static readonly string METRIC_REPLY_COUNT_KEY = "urn:wsdm.org:metric:replycount";
+    public static readonly string METRIC_ReplyCount = "ReplyCount";
+    /**
+     * The number of faults from a given service. (number of faults)
+     */
+    public static readonly string METRIC_FAULT_COUNT_KEY = "urn:wsdm.org:metric:faultcount";
+    public static readonly string METRIC_FaultCount = "FaultCount";
+    /**
+     * This is the unique identity by which the resource (service) is known to
+     * the management system. It is useful for further queries. (resource
+     * identification in URI format)
+     */
+    public static readonly string IDENTITY_RESOURCE_ID_KEY = "urn:wsdm.org:identity:resourceId";
+    public static readonly string IDENTITY_ResourceId = "ResourceId";
+    /**
+     * Represents the last time this metric was updated. (time value)
+     */
+    public static readonly string METRIC_LAST_UPDATE_TIME_KEY = "urn:wsdm.org:metric:lastupdatetime";
+    public static readonly string METRIC_LastUpdateTime = "LastUpdateTime";
+    /**
+     * Average response time of the service. (numeric value or symbolic rating)
+     */
+    public static readonly string QOS_RESPONSE_TIME_AVG_KEY = "urn:wsdm.org:qos:responsetime_average";
+    public static readonly string QOS_ResponseTime_Average = "ResponseTime_Average";
+    /**
+     * Throughput count. (numeric value or symbolic rating)
+     */
+    public static readonly string QOS_THROUGHPUT_COUNT_KEY = "urn:wsdm.org:qos:throughput_count";
+    public static readonly string QOS_Throughput_count = "Throughput_count";
+    /**
+     * Throughput bytes. (numeric value or symbolic rating)
+     */
+    public static readonly string QOS_THROUGHPUT_BYTES_KEY = "urn:wsdm.org:qos:throughput_bytes";
+    public static readonly string QOS_Throughput_bytes = "Throughput_bytes";
+    /**
+     * Reliability or the measure of. (numeric value or symbolic rating)
+     */
+    public static readonly string QOS_RELIABILITY_KEY = "urn:wsdm.org:qos:reliability";
+    public static readonly string QOS_Reliability = "Reliability";
+    /**
+     * The beginning on the reporting time period used for the information
+     * above. (dateTime)
+     */
+    public static readonly string QOS_REPORTING_PERIOD_START_KEY = "urn:wsdm.org:qos:reportingperiodstart";
+    public static readonly string QOS_ReportingPeriodStart = "ReportingPeriodStart";
+    /**
+     * The end of the reporting time period used for the information above.
+     * (dateTime)
+     */
+    public static readonly string QOS_REPORTING_PERIOD_END_KEY = "urn:wsdm.org:qos:reportingperiodend";
+    public static readonly string QOS_ReportingPeriodEnd = "ReportingPeriodEnd";
+    /**
+     * How often is this information updated in UDDI (it is not assumed to be
+     * realtime). (duration)
+     */
+    public static readonly string QOS_UPDATE_INTERVAL_KEY = "urn:wsdm.org:qos:updateinterval";
+    public static readonly string QOS_UpdateInterval = "UpdateInterval";
+    }
+}

Added: juddi/trunk/juddi-client.net/juddi-client.net/org.apache.juddi.v3.client.util/TModelInstanceDetailsComparator.cs
URL: http://svn.apache.org/viewvc/juddi/trunk/juddi-client.net/juddi-client.net/org.apache.juddi.v3.client.util/TModelInstanceDetailsComparator.cs?rev=1545913&view=auto
==============================================================================
--- juddi/trunk/juddi-client.net/juddi-client.net/org.apache.juddi.v3.client.util/TModelInstanceDetailsComparator.cs
(added)
+++ juddi/trunk/juddi-client.net/juddi-client.net/org.apache.juddi.v3.client.util/TModelInstanceDetailsComparator.cs
Wed Nov 27 02:38:26 2013
@@ -0,0 +1,160 @@
+using org.uddi.apiv3;
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Text;
+using System.Xml;
+
+namespace org.apache.juddi.v3.client.util
+{
+    /// <summary>
+    /// Compares two UDDI TModelInstanceDetails, searching for a specific tModel key, then
parsing to the selected data type, then comparing.
+    /// @author Alex O'Ree
+    /// </summary>
+    public class TModelInstanceDetailsComparator
+    {
+
+        /**
+         *
+         * @param TModelKey for TModelInstanceInfo to use for comparison
+         * @param number if true, the InstanceDetails.InstanceParms will be treated
+         * like a number
+         * @param XMLdate if true, the InstanceDetails.InstanceParms will be treated
+         * like a XML Date
+         * @param XMLduration if true, the InstanceDetails.InstanceParms will be
+         * treated like a XML Gregorian Calendar
+         * @see Duration
+         * @see XMLGregorianCalendar
+         * @throws DatatypeConfigurationException, ArgumentOutOfRangeException, ArgumentNullException
+         * FormatException
+         */
+        public TModelInstanceDetailsComparator(String TModelKey, bool number, bool XMLdate,
bool XMLduration)
+        {
+            if (TModelKey == null || TModelKey.Length == 0)
+            {
+                throw new ArgumentNullException();
+            }
+            compareField = TModelKey;
+            if (!number && !XMLdate && !XMLduration)
+            {
+                throw new ArgumentOutOfRangeException("only one data type can be selected");
+            }
+            if (number && XMLdate && !XMLduration)
+            {
+                throw new ArgumentOutOfRangeException("only one data type can be selected");
+            }
+            if (number && !XMLdate && XMLduration)
+            {
+                throw new ArgumentOutOfRangeException("only one data type can be selected");
+            }
+            if (!number && XMLdate && XMLduration)
+            {
+                throw new ArgumentOutOfRangeException("only one data type can be selected");
+            }
+            if (number && XMLdate && XMLduration)
+            {
+                throw new ArgumentOutOfRangeException("only one data type can be selected");
+            }
+            isNumber = number;
+            isDate = XMLdate;
+            isDuration = XMLduration;
+        }
+
+        String compareField = null;
+        bool isNumber = false;
+        bool isDate = false;
+        bool isDuration = false;
+
+        /**
+         * Compares two non-null instances of TModelInstanceDetails by only
+         * comparing the field designated from the constructor. It will also cast or
+         * parse TModelInstanceDetails[i].InstanceDetails[k].InstanceParms to the
+         * selected data type double, XMLGregorgian or Duration, using that as a
+         * basis for comparison. If a parsing error occurs, an exception will be
+         * thrown.
+         *
+         * @param lhs
+         * @param rhs
+         * @return less than 0 if lhs &lt; rhs, greater than 0 if lhs &gt; rhs.
+         * @throws IllegalArgumentException if the tModel key to search for is
+         * missing, if either sides are null
+         * @throws ArrayIndexOutOfBoundsException if the values were found but could
+         * not be compared
+         *  throws IllegalArgumentException, NumberFormatException, NullPointerException,
ArrayIndexOutOfBoundsException
+         */
+        public int compare(tModelInstanceInfo[] lhs, tModelInstanceInfo[] rhs)
+        {
+            if (lhs == null)
+            {
+                throw new ArgumentNullException("lhs");
+            }
+            if (rhs == null)
+            {
+                throw new ArgumentNullException("rhs");
+            }
+            if (lhs.Length == 0 || rhs.Length == 0)
+            {
+                throw new ArgumentOutOfRangeException("no data to compare");
+            }
+            instanceDetails lhsc = null;
+            instanceDetails rhsc = null;
+            for (int i = 0; i < lhs.Length; i++)
+            {
+                if (lhs[i].tModelKey!=null && lhs[i].tModelKey.Equals(compareField,
StringComparison.CurrentCultureIgnoreCase))
+                {
+                    lhsc = lhs[i].instanceDetails;
+                }
+            }
+            for (int i = 0; i < rhs.Length; i++)
+            {
+                if (rhs[i].tModelKey!=null && rhs[i].tModelKey.Equals(compareField,
StringComparison.CurrentCultureIgnoreCase))
+                {
+                    rhsc = rhs[i].instanceDetails;
+                }
+            }
+
+            if (lhsc == null)
+            {
+                throw new ArgumentOutOfRangeException(compareField + " not found for lhs");
+            }
+            if (rhsc == null)
+            {
+                throw new ArgumentOutOfRangeException(compareField + " not found for rhs");
+            }
+            if (lhsc.instanceParms == null)
+            {
+                throw new ArgumentOutOfRangeException(compareField + " found lhs, but no
data");
+            }
+            if (rhsc.instanceParms == null)
+            {
+                throw new ArgumentOutOfRangeException(compareField + " found rhs, but no
data");
+            }
+            if (isNumber)
+            {
+                Double l = Double.Parse(lhsc.instanceParms);
+                Double r = Double.Parse(rhsc.instanceParms);
+                return l.CompareTo(r);
+            }
+
+            if (isDate)
+            {
+
+                DateTime l = XmlConvert.ToDateTime(lhsc.instanceParms);
+                DateTime r = XmlConvert.ToDateTime(rhsc.instanceParms);
+                int x = l.CompareTo(r);
+
+                return x;
+            }
+
+            if (isDuration)
+            {
+                TimeSpan l = XmlConvert.ToTimeSpan(lhsc.instanceParms);
+                TimeSpan r = XmlConvert.ToTimeSpan(rhsc.instanceParms);
+                int x = l.CompareTo(r);
+                return x;
+            }
+
+            return 0;
+        }
+    }
+}



---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@juddi.apache.org
For additional commands, e-mail: commits-help@juddi.apache.org


Mime
View raw message