You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@juddi.apache.org by al...@apache.org on 2014/01/10 12:59:18 UTC
svn commit: r1557099 -
/juddi/trunk/juddi-client.net/juddi-client.net/org.apache.juddi.v3.client.mapping/Common2UDDI.cs
Author: alexoree
Date: Fri Jan 10 11:59:18 2014
New Revision: 1557099
URL: http://svn.apache.org/r1557099
Log:
JUDDI-776 fixed for .net, tests added
Added:
juddi/trunk/juddi-client.net/juddi-client.net/org.apache.juddi.v3.client.mapping/Common2UDDI.cs
Added: juddi/trunk/juddi-client.net/juddi-client.net/org.apache.juddi.v3.client.mapping/Common2UDDI.cs
URL: http://svn.apache.org/viewvc/juddi/trunk/juddi-client.net/juddi-client.net/org.apache.juddi.v3.client.mapping/Common2UDDI.cs?rev=1557099&view=auto
==============================================================================
--- juddi/trunk/juddi-client.net/juddi-client.net/org.apache.juddi.v3.client.mapping/Common2UDDI.cs (added)
+++ juddi/trunk/juddi-client.net/juddi-client.net/org.apache.juddi.v3.client.mapping/Common2UDDI.cs Fri Jan 10 11:59:18 2014
@@ -0,0 +1,48 @@
+using org.apache.juddi.v3.client;
+using org.apache.juddi.v3.client.log;
+using org.uddi.apiv3;
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Text;
+
+namespace org.apache.juddi.client.org.apache.juddi.v3.client.mapping
+{
+ public static class Common2UDDI
+ {
+ public static List<description> mapdescription(String content, String lang)
+ {
+
+ List<description> ret = new List<description>();
+ if (String.IsNullOrEmpty(content))
+ {
+ return ret;
+ }
+ if (content.Length > UDDIConstants.MAX_description_length)
+ {
+ int offset = 0;
+ while (offset < content.Length)
+ {
+ description description = new description();
+ description.lang = (lang);
+ int len = UDDIConstants.MAX_description_length;
+ if (len > content.Length-offset)
+ {
+ len = content.Length -offset;
+ }
+
+ description.Value = (content.Substring(offset, len));
+ offset = offset + UDDIConstants.MAX_description_length;
+ ret.Add(description);
+
+ }
+ }
+ else
+ {
+ ret.Add(new description(content, lang));
+ }
+ return ret;
+
+ }
+ }
+}
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@juddi.apache.org
For additional commands, e-mail: commits-help@juddi.apache.org