chemistry-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From j...@apache.org
Subject svn commit: r1514619 [4/4] - in /chemistry/opencmis/trunk/chemistry-opencmis-server/chemistry-opencmis-server-inmemory/src/main/java/org/apache/chemistry/opencmis/inmemory: ./ query/ server/ storedobj/api/ storedobj/impl/ types/
Date Fri, 16 Aug 2013 08:47:51 GMT
Modified: chemistry/opencmis/trunk/chemistry-opencmis-server/chemistry-opencmis-server-inmemory/src/main/java/org/apache/chemistry/opencmis/inmemory/types/TypeUtil.java
URL: http://svn.apache.org/viewvc/chemistry/opencmis/trunk/chemistry-opencmis-server/chemistry-opencmis-server-inmemory/src/main/java/org/apache/chemistry/opencmis/inmemory/types/TypeUtil.java?rev=1514619&r1=1514618&r2=1514619&view=diff
==============================================================================
--- chemistry/opencmis/trunk/chemistry-opencmis-server/chemistry-opencmis-server-inmemory/src/main/java/org/apache/chemistry/opencmis/inmemory/types/TypeUtil.java
(original)
+++ chemistry/opencmis/trunk/chemistry-opencmis-server/chemistry-opencmis-server-inmemory/src/main/java/org/apache/chemistry/opencmis/inmemory/types/TypeUtil.java
Fri Aug 16 08:47:50 2013
@@ -51,10 +51,10 @@ import org.apache.chemistry.opencmis.com
 import org.apache.chemistry.opencmis.commons.impl.dataobjects.SecondaryTypeDefinitionImpl;
 
 public final class TypeUtil {
-    
-    private TypeUtil() {        
+
+    private TypeUtil() {
     }
-    
+
     public static TypeDefinition cloneType(TypeDefinition type) {
         if (type instanceof DocumentTypeDefinition) {
             return cloneTypeDoc((DocumentTypeDefinition) type);
@@ -70,7 +70,7 @@ public final class TypeUtil {
             return cloneTypeSecondary((SecondaryTypeDefinition) type);
         } else {
             return null;
-        }        
+        }
     }
 
     public static AbstractPropertyDefinition<?> clonePropertyDefinition(PropertyDefinition<?>
pd) {
@@ -167,36 +167,36 @@ public final class TypeUtil {
     public static ItemTypeDefinitionImpl cloneTypeItem(ItemTypeDefinition type) {
         ItemTypeDefinitionImpl td = new ItemTypeDefinitionImpl();
         td.initialize(type);
-        return td;        
+        return td;
     }
-    
+
     public static SecondaryTypeDefinitionImpl cloneTypeSecondary(SecondaryTypeDefinition
type) {
         SecondaryTypeDefinitionImpl td = new SecondaryTypeDefinitionImpl();
         td.initialize(type);
-        return td;        
+        return td;
     }
-    
+
     public static PolicyTypeDefinitionImpl cloneTypePolicy(PolicyTypeDefinition type) {
         PolicyTypeDefinitionImpl td = new PolicyTypeDefinitionImpl();
         td.initialize(td);
         return null;
     }
-    
-	public static String getQueryNameFromId(String id) {
-		StringBuffer sb = new StringBuffer(id.length());
-		for (int i = 0; i < id.length(); i++) {
-			char c = id.charAt(i);
-			if (c == '.' || c == ' ' || c == ',' || c == '\'' || c == '"'
-					|| c == '\\' || c == '(' || c == ')') {
-				sb.append('_');
-			} else {
-				sb.append(c);
-			}
-		}
-		return sb.toString();
-	}
 
-    private static void initializeAbstractPropertyDefinition(PropertyDefinition<?>
pdSrc, AbstractPropertyDefinition<?> pdTarget) {
+    public static String getQueryNameFromId(String id) {
+        StringBuffer sb = new StringBuffer(id.length());
+        for (int i = 0; i < id.length(); i++) {
+            char c = id.charAt(i);
+            if (c == '.' || c == ' ' || c == ',' || c == '\'' || c == '"' || c == '\\' ||
c == '(' || c == ')') {
+                sb.append('_');
+            } else {
+                sb.append(c);
+            }
+        }
+        return sb.toString();
+    }
+
+    private static void initializeAbstractPropertyDefinition(PropertyDefinition<?>
pdSrc,
+            AbstractPropertyDefinition<?> pdTarget) {
         pdTarget.setCardinality(pdSrc.getCardinality());
         pdTarget.setDescription(pdSrc.getDescription());
         pdTarget.setDisplayName(pdSrc.getDisplayName());
@@ -214,5 +214,4 @@ public final class TypeUtil {
         pdTarget.setUpdatability(pdSrc.getUpdatability());
     }
 
-
 }



Mime
View raw message