chemistry-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From f...@apache.org
Subject svn commit: r1741428 [1/3] - in /chemistry/portcmis/trunk: ./ PortCMIS/binding/ PortCMIS/binding/atompub/ PortCMIS/binding/browser/ PortCMIS/binding/browser/json/ PortCMIS/client/ PortCMIS/data/
Date Thu, 28 Apr 2016 14:10:08 GMT
Author: fmui
Date: Thu Apr 28 14:10:08 2016
New Revision: 1741428

URL: http://svn.apache.org/viewvc?rev=1741428&view=rev
Log:
PortCMIS: more documentation

Modified:
    chemistry/portcmis/trunk/PortCMIS/binding/BindingIntf.cs
    chemistry/portcmis/trunk/PortCMIS/binding/HttpPortable.cs
    chemistry/portcmis/trunk/PortCMIS/binding/Services.cs
    chemistry/portcmis/trunk/PortCMIS/binding/Url.cs
    chemistry/portcmis/trunk/PortCMIS/binding/atompub/AtomPubUtils.cs
    chemistry/portcmis/trunk/PortCMIS/binding/atompub/XmlConstants.cs
    chemistry/portcmis/trunk/PortCMIS/binding/atompub/XmlConverter.cs
    chemistry/portcmis/trunk/PortCMIS/binding/atompub/XmlWalker.cs
    chemistry/portcmis/trunk/PortCMIS/binding/browser/BrowserBinding.cs
    chemistry/portcmis/trunk/PortCMIS/binding/browser/json/Json.cs
    chemistry/portcmis/trunk/PortCMIS/client/ClientCaches.cs
    chemistry/portcmis/trunk/PortCMIS/client/ClientImpl.cs
    chemistry/portcmis/trunk/PortCMIS/client/ClientIntf.cs
    chemistry/portcmis/trunk/PortCMIS/client/ClientObjectFactory.cs
    chemistry/portcmis/trunk/PortCMIS/data/DataIntf.cs
    chemistry/portcmis/trunk/PortCMIS/data/Extensions.cs
    chemistry/portcmis/trunk/README

Modified: chemistry/portcmis/trunk/PortCMIS/binding/BindingIntf.cs
URL: http://svn.apache.org/viewvc/chemistry/portcmis/trunk/PortCMIS/binding/BindingIntf.cs?rev=1741428&r1=1741427&r2=1741428&view=diff
==============================================================================
--- chemistry/portcmis/trunk/PortCMIS/binding/BindingIntf.cs (original)
+++ chemistry/portcmis/trunk/PortCMIS/binding/BindingIntf.cs Thu Apr 28 14:10:08 2016
@@ -426,45 +426,74 @@ namespace PortCMIS.Binding
         }
     }
 
+    /// <summary>
+    /// A factory that created low-level binding objects.
+    /// </summary>
     public class CmisBindingFactory
     {
-        // Default CMIS AtomPub binding SPI implementation
+        /// <summary>
+        /// Default CMIS AtomPub binding SPI implementation class name.
+        /// </summary>
         public const string BindingSpiAtomPub = "PortCMIS.Binding.AtomPub.CmisAtomPubSpi";
-        // Default CMIS Browser binding SPI implementation
+        /// <summary>
+        /// Default CMIS Browser binding SPI implementation class name.
+        /// </summary>
         public const string BindingSpiBrowser = "PortCMIS.Binding.Browser.CmisBrowserSpi";
 
+        /// <summary>
+        /// Standard authentication provider class name.
+        /// </summary>
         public const string StandardAuthenticationProviderClass = "PortCMIS.Binding.StandardAuthenticationProvider";
+
+        /// <summary>
+        /// Default HTTP invoker class name.
+        /// </summary>
         public const string DefaultHttpInvokerClass = "PortCMIS.Binding.Http.DefaultHttpInvoker";
 
         private IDictionary<string, string> defaults;
 
+        /// <summary>
+        /// This is a factory.
+        /// </summary>
         private CmisBindingFactory()
         {
             defaults = CreateNewDefaultParameters();
         }
 
+        /// <summary>
+        /// Creates a new instance of this factory.
+        /// </summary>
+        /// <returns>a factory object</returns>
         public static CmisBindingFactory NewInstance()
         {
             return new CmisBindingFactory();
         }
 
-        public IDictionary<string, string> GetDefaultSessionParameters()
+        /// <value>
+        /// Gets and sets default session parameters.
+        /// </value>
+        public IDictionary<string, string> DefaultSessionParameters
         {
-            return defaults;
-        }
-
-        public void SetDefaultSessionParameters(IDictionary<string, string> sessionParameters)
-        {
-            if (sessionParameters == null)
-            {
-                defaults = CreateNewDefaultParameters();
-            }
-            else
+            get { return defaults; }
+            set
             {
-                defaults = sessionParameters;
+                if (value == null)
+                {
+                    defaults = CreateNewDefaultParameters();
+                }
+                else
+                {
+                    defaults = value;
+                }
             }
         }
 
+        /// <summary>
+        /// Creates a binding object for custom binding implementations.
+        /// </summary>
+        /// <param name="sessionParameters">the session parameters</param>
+        /// <param name="authenticationProvider">an authentication provider instance
or <c>null</c> to use the default implementation</param>
+        /// <returns>a low-level binding object</returns>
         public ICmisBinding CreateCmisBinding(IDictionary<string, string> sessionParameters,
IAuthenticationProvider authenticationProvider)
         {
             CheckSessionParameters(sessionParameters, true);
@@ -473,6 +502,12 @@ namespace PortCMIS.Binding
             return new CmisBinding(sessionParameters, authenticationProvider);
         }
 
+        /// <summary>
+        /// Creates an Browser binding object.
+        /// </summary>
+        /// <param name="sessionParameters">the session parameters</param>
+        /// <param name="authenticationProvider">an authentication provider instance
or <c>null</c> to use the default implementation</param>
+        /// <returns>a low-level binding object</returns>
         public ICmisBinding CreateCmisBrowserBinding(IDictionary<string, string> sessionParameters,
IAuthenticationProvider authenticationProvider)
         {
             CheckSessionParameters(sessionParameters, false);
@@ -500,6 +535,12 @@ namespace PortCMIS.Binding
             return new CmisBinding(sessionParameters, authenticationProvider);
         }
 
+        /// <summary>
+        /// Creates an AtomPub binding object.
+        /// </summary>
+        /// <param name="sessionParameters">the session parameters</param>
+        /// <param name="authenticationProvider">an authentication provider instance
or <c>null</c> to use the default implementation</param>
+        /// <returns>a low-level binding object</returns>
         public ICmisBinding CreateCmisAtomPubBinding(IDictionary<string, string> sessionParameters,
IAuthenticationProvider authenticationProvider)
         {
             CheckSessionParameters(sessionParameters, false);
@@ -523,6 +564,15 @@ namespace PortCMIS.Binding
             return new CmisBinding(sessionParameters, authenticationProvider);
         }
 
+        /// <summary>
+        /// Creates a Web Services binding object.
+        /// </summary>
+        /// <remarks>
+        /// PortCMIS doesn't support the Web Services binding. It may be implemented in the
future.
+        /// </remarks>
+        /// <param name="sessionParameters">the session parameters</param>
+        /// <param name="authenticationProvider">an authentication provider instance
or <c>null</c> to use the default implementation</param>
+        /// <returns>a low-level binding object</returns>
         public ICmisBinding CreateCmisWebServicesBinding(IDictionary<string, string>
sessionParameters, IAuthenticationProvider authenticationProvider)
         {
             throw new ArgumentException("The Web Services binding is not supported!");

Modified: chemistry/portcmis/trunk/PortCMIS/binding/HttpPortable.cs
URL: http://svn.apache.org/viewvc/chemistry/portcmis/trunk/PortCMIS/binding/HttpPortable.cs?rev=1741428&r1=1741427&r2=1741428&view=diff
==============================================================================
--- chemistry/portcmis/trunk/PortCMIS/binding/HttpPortable.cs (original)
+++ chemistry/portcmis/trunk/PortCMIS/binding/HttpPortable.cs Thu Apr 28 14:10:08 2016
@@ -31,6 +31,9 @@ using System.Threading.Tasks;
 
 namespace PortCMIS.Binding.Http
 {
+    /// <summary>
+    /// Default HTTP invoker implementation for portable environments. 
+    /// </summary>
     public class DefaultHttpInvoker : IHttpInvoker
     {
         private const string InvokerHttpClient = "org.apache.chemistry.portcmis.invoker.httpclient";

Modified: chemistry/portcmis/trunk/PortCMIS/binding/Services.cs
URL: http://svn.apache.org/viewvc/chemistry/portcmis/trunk/PortCMIS/binding/Services.cs?rev=1741428&r1=1741427&r2=1741428&view=diff
==============================================================================
--- chemistry/portcmis/trunk/PortCMIS/binding/Services.cs (original)
+++ chemistry/portcmis/trunk/PortCMIS/binding/Services.cs Thu Apr 28 14:10:08 2016
@@ -25,8 +25,17 @@ using System.Numerics;
 
 namespace PortCMIS.Binding.Services
 {
+    /// <summary>
+    /// Repository Service interface.
+    /// </summary>
     public interface IRepositoryService
     {
+        /// <summary>
+        /// Returns a list of CMIS repository information available from this CMIS service
endpoint.
+        /// </summary>
+        /// <remarks>
+        /// In contrast to the CMIS specification this method returns repository infos not
only repository IDs.
+        /// </remarks>
         IList<IRepositoryInfo> GetRepositoryInfos(IExtensionsData extension);
 
         IRepositoryInfo GetRepositoryInfo(string repositoryId, IExtensionsData extension);
@@ -46,6 +55,9 @@ namespace PortCMIS.Binding.Services
         void DeleteType(string repositoryId, string typeId, IExtensionsData extension);
     }
 
+    /// <summary>
+    /// Navigation Service interface.
+    /// </summary>
     public interface INavigationService
     {
         IObjectInFolderList GetChildren(string repositoryId, string folderId, string filter,
string orderBy,
@@ -71,6 +83,9 @@ namespace PortCMIS.Binding.Services
             BigInteger? maxItems, BigInteger? skipCount, IExtensionsData extension);
     }
 
+    /// <summary>
+    /// Object Service interface.
+    /// </summary>
     public interface IObjectService
     {
         string CreateDocument(string repositoryId, IProperties properties, string folderId,
IContentStream contentStream,
@@ -133,6 +148,9 @@ namespace PortCMIS.Binding.Services
             IContentStream contentStream, IExtensionsData extension);
     }
 
+    /// <summary>
+    /// Versioning Service interface.
+    /// </summary>
     public interface IVersioningService
     {
         void CheckOut(string repositoryId, ref string objectId, IExtensionsData extension,
out bool? contentCopied);
@@ -154,6 +172,9 @@ namespace PortCMIS.Binding.Services
             bool? includeAllowableActions, IExtensionsData extension);
     }
 
+    /// <summary>
+    /// Relationship Service interface.
+    /// </summary>
     public interface IRelationshipService
     {
         IObjectList GetObjectRelationships(string repositoryId, string objectId, bool? includeSubRelationshipTypes,
@@ -161,6 +182,9 @@ namespace PortCMIS.Binding.Services
             BigInteger? maxItems, BigInteger? skipCount, IExtensionsData extension);
     }
 
+    /// <summary>
+    /// Discovery Service interface.
+    /// </summary>
     public interface IDiscoveryService
     {
         IObjectList Query(string repositoryId, string statement, bool? searchAllVersions,
@@ -171,6 +195,9 @@ namespace PortCMIS.Binding.Services
            string filter, bool? includePolicyIds, bool? includeAcl, BigInteger? maxItems,
IExtensionsData extension);
     }
 
+    /// <summary>
+    /// MultiFiling Service interface.
+    /// </summary>
     public interface IMultiFilingService
     {
         void AddObjectToFolder(string repositoryId, string objectId, string folderId, bool?
allVersions, IExtensionsData extension);
@@ -178,6 +205,9 @@ namespace PortCMIS.Binding.Services
         void RemoveObjectFromFolder(string repositoryId, string objectId, string folderId,
IExtensionsData extension);
     }
 
+    /// <summary>
+    /// ACL Service interface.
+    /// </summary>
     public interface IAclService
     {
         IAcl GetAcl(string repositoryId, string objectId, bool? onlyBasicPermissions, IExtensionsData
extension);
@@ -186,6 +216,9 @@ namespace PortCMIS.Binding.Services
             IExtensionsData extension);
     }
 
+    /// <summary>
+    /// Policy Service interface.
+    /// </summary>
     public interface IPolicyService
     {
         void ApplyPolicy(string repositoryId, string policyId, string objectId, IExtensionsData
extension);

Modified: chemistry/portcmis/trunk/PortCMIS/binding/Url.cs
URL: http://svn.apache.org/viewvc/chemistry/portcmis/trunk/PortCMIS/binding/Url.cs?rev=1741428&r1=1741427&r2=1741428&view=diff
==============================================================================
--- chemistry/portcmis/trunk/PortCMIS/binding/Url.cs (original)
+++ chemistry/portcmis/trunk/PortCMIS/binding/Url.cs Thu Apr 28 14:10:08 2016
@@ -25,15 +25,25 @@ using System.Text;
 
 namespace PortCMIS.Binding
 {
+    /// <summary>
+    /// This class assembles URLs.
+    /// </summary>
     public class UrlBuilder
     {
         private UriBuilder uri;
 
+        /// <value>
+        /// The current URL.
+        /// </value>
         public Uri Url
         {
             get { return uri.Uri; }
         }
 
+        /// <summary>
+        /// Creates a new instance with a given URL.
+        /// </summary>
+        /// <param name="url">the URL</param>
         public UrlBuilder(string url)
         {
             if (url == null)
@@ -44,6 +54,12 @@ namespace PortCMIS.Binding
             uri = new UriBuilder(url);
         }
 
+        /// <summary>
+        /// Adds a parameter.
+        /// </summary>
+        /// <param name="name">the parameter name</param>
+        /// <param name="value">the parameter value</param>
+        /// <returns>this UrlBuilder object</returns>
         public UrlBuilder AddParameter(string name, object value)
         {
             if (name == null || value == null)
@@ -65,11 +81,22 @@ namespace PortCMIS.Binding
             return this;
         }
 
+        /// <summary>
+        /// Adds to the URL path.
+        /// </summary>
+        /// <param name="path">the path</param>
+        /// <returns>this UrlBuilder object</returns>
         public UrlBuilder AddPath(string path)
         {
             return AddPathPart(path, false);
         }
 
+        /// <summary>
+        /// Adds to the URL path.
+        /// </summary>
+        /// <param name="part">the path part</param>
+        /// <param name="quoteSlash">indicator whether slashes should be quoted or
not</param>
+        /// <returns>this UrlBuilder object</returns>
         protected UrlBuilder AddPathPart(string part, bool quoteSlash)
         {
             if (String.IsNullOrEmpty(part))
@@ -92,7 +119,7 @@ namespace PortCMIS.Binding
 
         private static readonly char[] RFC7232Reserved = ";?:@&=+$,[]".ToCharArray();
 
-        public string QuoteURIPathComponent(string s, bool quoteSlash)
+        private string QuoteURIPathComponent(string s, bool quoteSlash)
         {
             if (String.IsNullOrEmpty(s))
             {
@@ -114,6 +141,11 @@ namespace PortCMIS.Binding
             return result.ToString();
         }
 
+        /// <summary>
+        /// Normalizes a parameter value.
+        /// </summary>
+        /// <param name="value">the value</param>
+        /// <returns>the normalized value as string</returns>
         public static string NormalizeParameter(object value)
         {
             if (value == null)
@@ -136,6 +168,10 @@ namespace PortCMIS.Binding
             return value.ToString();
         }
 
+        /// <summary>
+        /// Returns the current URL.
+        /// </summary>
+        /// <returns>the current URL</returns>
         public override string ToString()
         {
             return Url.ToString();

Modified: chemistry/portcmis/trunk/PortCMIS/binding/atompub/AtomPubUtils.cs
URL: http://svn.apache.org/viewvc/chemistry/portcmis/trunk/PortCMIS/binding/atompub/AtomPubUtils.cs?rev=1741428&r1=1741427&r2=1741428&view=diff
==============================================================================
--- chemistry/portcmis/trunk/PortCMIS/binding/atompub/AtomPubUtils.cs (original)
+++ chemistry/portcmis/trunk/PortCMIS/binding/atompub/AtomPubUtils.cs Thu Apr 28 14:10:08
2016
@@ -73,7 +73,7 @@ namespace PortCMIS.Binding.AtomPub
                         string uri = parser.NamespaceURI;
                         string local = parser.LocalName;
 
-                        if (uri == XmlConstants.NAMESPACE_ATOM)
+                        if (uri == XmlConstants.NamespaceAtom)
                         {
                             if (local == XmlConstants.TAG_FEED)
                             {
@@ -86,7 +86,7 @@ namespace PortCMIS.Binding.AtomPub
                                 break;
                             }
                         }
-                        else if (uri == XmlConstants.NAMESPACE_CMIS)
+                        else if (uri == XmlConstants.NamespaceCmis)
                         {
                             if (local == XmlConstants.TAG_ALLOWABLEACTIONS)
                             {
@@ -99,7 +99,7 @@ namespace PortCMIS.Binding.AtomPub
                                 break;
                             }
                         }
-                        else if (uri == XmlConstants.NAMESPACE_APP)
+                        else if (uri == XmlConstants.NamespaceApp)
                         {
                             if (local == XmlConstants.TAG_SERVICE)
                             {
@@ -154,7 +154,7 @@ namespace PortCMIS.Binding.AtomPub
                     string uri = parser.NamespaceURI;
                     string local = parser.LocalName;
 
-                    if (uri == XmlConstants.NAMESPACE_APP)
+                    if (uri == XmlConstants.NamespaceApp)
                     {
                         if (local == XmlConstants.TAG_WORKSPACE)
                         {
@@ -246,7 +246,7 @@ namespace PortCMIS.Binding.AtomPub
                     string uri = parser.NamespaceURI;
                     string local = parser.LocalName;
 
-                    if (uri == XmlConstants.NAMESPACE_ATOM)
+                    if (uri == XmlConstants.NamespaceAtom)
                     {
                         if (local == XmlConstants.TAG_LINK)
                         {
@@ -261,7 +261,7 @@ namespace PortCMIS.Binding.AtomPub
                             XmlUtils.Skip(parser);
                         }
                     }
-                    else if (uri == XmlConstants.NAMESPACE_RESTATOM)
+                    else if (uri == XmlConstants.NamespaceRestAtom)
                     {
                         if (local == XmlConstants.TAG_NUM_ITEMS)
                         {
@@ -272,7 +272,7 @@ namespace PortCMIS.Binding.AtomPub
                             XmlUtils.Skip(parser);
                         }
                     }
-                    else if (uri == XmlConstants.NAMESPACE_APACHE_CHEMISTRY)
+                    else if (uri == XmlConstants.NamespaceApacheChemistry)
                     {
                         result.AddElement(ParseText(parser));
                     }
@@ -373,7 +373,7 @@ namespace PortCMIS.Binding.AtomPub
             string uri = parser.NamespaceURI;
             string local = parser.LocalName;
 
-            if (uri == XmlConstants.NAMESPACE_RESTATOM)
+            if (uri == XmlConstants.NamespaceRestAtom)
             {
                 if (local == XmlConstants.TAG_OBJECT)
                 {
@@ -393,7 +393,7 @@ namespace PortCMIS.Binding.AtomPub
                     return ParseChildren(parser);
                 }
             }
-            else if (uri == XmlConstants.NAMESPACE_ATOM)
+            else if (uri == XmlConstants.NamespaceAtom)
             {
                 if (local == XmlConstants.TAG_LINK)
                 {
@@ -431,7 +431,7 @@ namespace PortCMIS.Binding.AtomPub
                     string tagUri = parser.NamespaceURI;
                     string tagLocal = parser.LocalName;
 
-                    if (tagUri == XmlConstants.NAMESPACE_ATOM)
+                    if (tagUri == XmlConstants.NamespaceAtom)
                     {
                         if (tagLocal == XmlConstants.TAG_FEED)
                         {
@@ -473,7 +473,7 @@ namespace PortCMIS.Binding.AtomPub
             string uri = parser.NamespaceURI;
             string local = parser.LocalName;
 
-            if (uri == XmlConstants.NAMESPACE_RESTATOM)
+            if (uri == XmlConstants.NamespaceRestAtom)
             {
                 if (local == XmlConstants.TAG_REPOSITORY_INFO)
                 {
@@ -484,14 +484,14 @@ namespace PortCMIS.Binding.AtomPub
                     return ParseTemplate(parser);
                 }
             }
-            else if (uri == XmlConstants.NAMESPACE_ATOM)
+            else if (uri == XmlConstants.NamespaceAtom)
             {
                 if (local == XmlConstants.TAG_LINK)
                 {
                     return ParseLink(parser);
                 }
             }
-            else if (uri == XmlConstants.NAMESPACE_APP)
+            else if (uri == XmlConstants.NamespaceApp)
             {
                 if (local == XmlConstants.TAG_COLLECTION)
                 {
@@ -526,7 +526,7 @@ namespace PortCMIS.Binding.AtomPub
                     string tagUri = parser.NamespaceURI;
                     string tagLocal = parser.LocalName;
 
-                    if (tagUri == XmlConstants.NAMESPACE_RESTATOM
+                    if (tagUri == XmlConstants.NamespaceRestAtom
                             && tagLocal == XmlConstants.TAG_COLLECTION_TYPE)
                     {
                         result["collectionType"] = XmlUtils.ReadText(parser, XmlConstraints.MaxStringLength);
@@ -573,7 +573,7 @@ namespace PortCMIS.Binding.AtomPub
                     string tagUri = parser.NamespaceURI;
                     string tagLocal = parser.LocalName;
 
-                    if (tagUri == XmlConstants.NAMESPACE_RESTATOM)
+                    if (tagUri == XmlConstants.NamespaceRestAtom)
                     {
                         if (tagLocal == XmlConstants.TAG_TEMPLATE_TEMPLATE)
                         {
@@ -1263,41 +1263,41 @@ namespace PortCMIS.Binding.AtomPub
             {
                 XmlUtils.StartXmlDocument(writer);
 
-                writer.WriteStartElement(XmlConstants.PREFIX_ATOM, "entry", XmlConstants.NAMESPACE_ATOM);
-                writer.WriteAttributeString("xmlns", XmlConstants.PREFIX_ATOM, null, XmlConstants.NAMESPACE_ATOM);
-                writer.WriteAttributeString("xmlns", XmlConstants.PREFIX_CMIS, null, XmlConstants.NAMESPACE_CMIS);
-                writer.WriteAttributeString("xmlns", XmlConstants.PREFIX_RESTATOM, null,
XmlConstants.NAMESPACE_RESTATOM);
+                writer.WriteStartElement(XmlConstants.PrefixAtom, "entry", XmlConstants.NamespaceAtom);
+                writer.WriteAttributeString("xmlns", XmlConstants.PrefixAtom, null, XmlConstants.NamespaceAtom);
+                writer.WriteAttributeString("xmlns", XmlConstants.PrefixCmis, null, XmlConstants.NamespaceCmis);
+                writer.WriteAttributeString("xmlns", XmlConstants.PrefixRestAtom, null, XmlConstants.NamespaceRestAtom);
 
                 if (contentStream != null && contentStream.FileName != null)
                 {
-                    writer.WriteAttributeString("xmlns", XmlConstants.PREFIX_APACHE_CHEMISTY,
null, XmlConstants.NAMESPACE_APACHE_CHEMISTRY);
+                    writer.WriteAttributeString("xmlns", XmlConstants.PrefixApacheChemistry,
null, XmlConstants.NamespaceApacheChemistry);
                 }
 
                 // atom:id
-                XmlUtils.Write(writer, XmlConstants.PREFIX_ATOM, XmlConstants.NAMESPACE_ATOM,
XmlConstants.TAG_ATOM_ID,
+                XmlUtils.Write(writer, XmlConstants.PrefixAtom, XmlConstants.NamespaceAtom,
XmlConstants.TAG_ATOM_ID,
                         "urn:uuid:00000000-0000-0000-0000-00000000000");
 
                 // atom:title
-                XmlUtils.Write(writer, XmlConstants.PREFIX_ATOM, XmlConstants.NAMESPACE_ATOM,
XmlConstants.TAG_ATOM_TITLE, GetTitle());
+                XmlUtils.Write(writer, XmlConstants.PrefixAtom, XmlConstants.NamespaceAtom,
XmlConstants.TAG_ATOM_TITLE, GetTitle());
 
                 // atom:updated
-                XmlUtils.Write(writer, XmlConstants.PREFIX_ATOM, XmlConstants.NAMESPACE_ATOM,
XmlConstants.TAG_ATOM_UPDATED, DateTime.UtcNow);
+                XmlUtils.Write(writer, XmlConstants.PrefixAtom, XmlConstants.NamespaceAtom,
XmlConstants.TAG_ATOM_UPDATED, DateTime.UtcNow);
 
                 // content
                 if (stream != null)
                 {
-                    writer.WriteStartElement(XmlConstants.PREFIX_RESTATOM, XmlConstants.TAG_CONTENT,
XmlConstants.NAMESPACE_RESTATOM);
+                    writer.WriteStartElement(XmlConstants.PrefixRestAtom, XmlConstants.TAG_CONTENT,
XmlConstants.NamespaceRestAtom);
 
-                    XmlUtils.Write(writer, XmlConstants.PREFIX_RESTATOM, XmlConstants.NAMESPACE_RESTATOM,
+                    XmlUtils.Write(writer, XmlConstants.PrefixRestAtom, XmlConstants.NamespaceRestAtom,
                             XmlConstants.TAG_CONTENT_MEDIATYPE, contentStream.MimeType);
 
                     if (contentStream.FileName != null)
                     {
-                        XmlUtils.Write(writer, XmlConstants.PREFIX_APACHE_CHEMISTY, XmlConstants.NAMESPACE_APACHE_CHEMISTRY,
+                        XmlUtils.Write(writer, XmlConstants.PrefixApacheChemistry, XmlConstants.NamespaceApacheChemistry,
                                 XmlConstants.TAG_CONTENT_FILENAME, contentStream.FileName);
                     }
 
-                    writer.WriteStartElement(XmlConstants.PREFIX_RESTATOM, XmlConstants.TAG_CONTENT_BASE64,
XmlConstants.NAMESPACE_RESTATOM);
+                    writer.WriteStartElement(XmlConstants.PrefixRestAtom, XmlConstants.TAG_CONTENT_BASE64,
XmlConstants.NamespaceRestAtom);
                     WriteContent(writer);
                     writer.WriteEndElement();
 
@@ -1307,19 +1307,19 @@ namespace PortCMIS.Binding.AtomPub
                 // object
                 if (objectData != null)
                 {
-                    XmlConverter.WriteObject(writer, cmisVersion, XmlConstants.NAMESPACE_RESTATOM,
objectData);
+                    XmlConverter.WriteObject(writer, cmisVersion, XmlConstants.NamespaceRestAtom,
objectData);
                 }
 
                 // type
                 if (typeDef != null)
                 {
-                    XmlConverter.WriteTypeDefinition(writer, cmisVersion, XmlConstants.NAMESPACE_RESTATOM,
typeDef);
+                    XmlConverter.WriteTypeDefinition(writer, cmisVersion, XmlConstants.NamespaceRestAtom,
typeDef);
                 }
 
                 // bulk update
                 if (bulkUpdate != null)
                 {
-                    XmlConverter.WriteBulkUpdate(writer, XmlConstants.NAMESPACE_RESTATOM,
bulkUpdate);
+                    XmlConverter.WriteBulkUpdate(writer, XmlConstants.NamespaceRestAtom,
bulkUpdate);
                 }
 
                 // end entry

Modified: chemistry/portcmis/trunk/PortCMIS/binding/atompub/XmlConstants.cs
URL: http://svn.apache.org/viewvc/chemistry/portcmis/trunk/PortCMIS/binding/atompub/XmlConstants.cs?rev=1741428&r1=1741427&r2=1741428&view=diff
==============================================================================
--- chemistry/portcmis/trunk/PortCMIS/binding/atompub/XmlConstants.cs (original)
+++ chemistry/portcmis/trunk/PortCMIS/binding/atompub/XmlConstants.cs Thu Apr 28 14:10:08
2016
@@ -28,20 +28,20 @@ namespace PortCMIS.Binding.AtomPub
     class XmlConstants
     {
         // namespaces
-        public const string NAMESPACE_CMIS = "http://docs.oasis-open.org/ns/cmis/core/200908/";
-        public const string NAMESPACE_ATOM = "http://www.w3.org/2005/Atom";
-        public const string NAMESPACE_APP = "http://www.w3.org/2007/app";
-        public const string NAMESPACE_RESTATOM = "http://docs.oasis-open.org/ns/cmis/restatom/200908/";
-        public const string NAMESPACE_XSI = "http://www.w3.org/2001/XMLSchema-instance";
-        public const string NAMESPACE_APACHE_CHEMISTRY = "http://chemistry.apache.org/";
+        public const string NamespaceCmis = "http://docs.oasis-open.org/ns/cmis/core/200908/";
+        public const string NamespaceAtom = "http://www.w3.org/2005/Atom";
+        public const string NamespaceApp = "http://www.w3.org/2007/app";
+        public const string NamespaceRestAtom = "http://docs.oasis-open.org/ns/cmis/restatom/200908/";
+        public const string NamespaceXsi = "http://www.w3.org/2001/XMLSchema-instance";
+        public const string NamespaceApacheChemistry = "http://chemistry.apache.org/";
 
         // prefixes
-        public const string PREFIX_XSI = "xsi";
-        public const string PREFIX_ATOM = "atom";
-        public const string PREFIX_APP = "app";
-        public const string PREFIX_CMIS = "cmis";
-        public const string PREFIX_RESTATOM = "cmisra";
-        public const string PREFIX_APACHE_CHEMISTY = "chemistry";
+        public const string PrefixXsi = "xsi";
+        public const string PrefixAtom = "atom";
+        public const string PrefixApp = "app";
+        public const string PrefixCmis = "cmis";
+        public const string PrefixRestAtom = "cmisra";
+        public const string PrefixApacheChemistry = "chemistry";
 
         // service doc
         public const string TAG_SERVICE = "service";



Mime
View raw message