1 17 package org.alfresco.repo.webdav; 18 19 24 public class WebDAVProperty 25 { 26 private String m_strName = null; 27 private String m_strNamespaceUri = WebDAV.DEFAULT_NAMESPACE_URI; 28 private String m_strNamespaceName = null; 29 private String m_strValue = null; 30 31 39 public WebDAVProperty(String strName, String strNamespaceUri, String strNamespaceName, String strValue) 40 { 41 this(strName, strNamespaceUri, strNamespaceName); 42 m_strValue = strValue; 43 } 44 45 53 public WebDAVProperty(String strName, String strNamespaceUri, String strNamespaceName) 54 { 55 this(strName); 56 57 m_strNamespaceUri = strNamespaceUri; 58 m_strNamespaceName = strNamespaceName; 59 } 60 61 66 public WebDAVProperty(String strName) 67 { 68 m_strName = strName; 69 } 70 71 76 public String getName() 77 { 78 return m_strName; 79 } 80 81 86 public String getNamespaceUri() 87 { 88 return m_strNamespaceUri; 89 } 90 91 96 public final boolean hasNamespaceName() 97 { 98 return m_strNamespaceName != null ? true : false; 99 } 100 101 106 public String getNamespaceName() 107 { 108 return m_strNamespaceName; 109 } 110 111 116 public String getValue() 117 { 118 return m_strValue; 119 } 120 121 126 public void setValue(String strValue) 127 { 128 m_strValue = strValue; 129 } 130 131 136 public String toString() 137 { 138 StringBuilder str = new StringBuilder (); 139 140 str.append("["); 141 142 str.append(getName()); 143 str.append("="); 144 str.append(getValue()); 145 str.append(",URI="); 146 str.append(getNamespaceUri()); 147 148 if ( hasNamespaceName()) 149 { 150 str.append(","); 151 str.append(getNamespaceName()); 152 } 153 154 return str.toString(); 155 } 156 } 157 | Popular Tags |