[jira] Updated: (CMIS-159) Ordered queries are not ordered

2010-03-16 Thread Stefane Fermigier (JIRA)

 [ 
https://issues.apache.org/jira/browse/CMIS-159?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Stefane Fermigier updated CMIS-159:
---

Description: 
When running an ordered SELECT query, the results are not ordered.

I believe the following patch is needed:

{noformat}
SFs-macbook% svn diff
Index: cmislib/model.py
===
--- cmislib/model.py(revision 923892)
+++ cmislib/model.py(working copy)
@@ -1337,11 +1337,11 @@
 
 def __iter__(self):
 ''' Iterator for the result set '''
-return self.getResults().itervalues()
+return iter(self.getResults())
 
 def __getitem__(self, index):
 ''' Getter for the result set '''
-return self.getResults().values()[index]
+return self.getResults()[index]
 
 def __len__(self):
 ''' Len method for the result set '''
@@ -1411,16 +1411,23 @@
 
 if self._xmlDoc:
 entryElements = self._xmlDoc.getElementsByTagNameNS(ATOM_NS, 
'entry')
-entries = {}
+entries = []
 for entryElement in entryElements:
 cmisObject = getSpecializedObject(CmisObject(self._cmisClient,
  self._repository,
  
xmlDoc=entryElement))
-entries[cmisObject.getObjectId()] = cmisObject
+entries.append(cmisObject)
 
 self._results = entries
 
 return self._results
+
+def hasObject(self, objectId):
+for obj in self.getResults():
+if obj.id == objectId:
+return True
+return False
 
 def getFirst(self):
 
Index: tests/cmislibtest.py
===
--- tests/cmislibtest.py(revision 923892)
+++ tests/cmislibtest.py(working copy)
@@ -1159,7 +1159,7 @@
 
 done = False
 while not done:
-if resultSet.getResults().has_key(targetDoc.getObjectId()):
+if resultSet.hasObject(targetDoc.getObjectId()):
 return True
 if resultSet.hasNext():
 resultSet.getNext(){noformat}

  was:
When running an ordered SELECT query, the results are not ordered.

I believe the following patch is needed:

{noformat}
Index: model.py
===
--- model.py(revision 923205)
+++ model.py(working copy)
@@ -1337,11 +1337,11 @@
 
 def __iter__(self):
 ''' Iterator for the result set '''
-return self.getResults().itervalues()
+return iter(self.getResults())
 
 def __getitem__(self, index):
 ''' Getter for the result set '''
-return self.getResults().values()[index]
+return self.getResults()[index]
 
 def __len__(self):
 ''' Len method for the result set '''
@@ -1411,12 +1411,13 @@
 
 if self._xmlDoc:
 entryElements = self._xmlDoc.getElementsByTagNameNS(ATOM_NS, 
'entry')
-entries = {}
+entries = []
 for entryElement in entryElements:
 cmisObject = getSpecializedObject(CmisObject(self._cmisClient,
  self._repository,
  
xmlDoc=entryElement))
-entries[cmisObject.getObjectId()] = cmisObject
+entries.append(cmisObject)
 
 self._results = entries
{noformat}


 Ordered queries are not ordered
 ---

 Key: CMIS-159
 URL: https://issues.apache.org/jira/browse/CMIS-159
 Project: Chemistry
  Issue Type: Bug
  Components: cmislib
Reporter: Stefane Fermigier
Assignee: Jeff Potts

 When running an ordered SELECT query, the results are not ordered.
 I believe the following patch is needed:
 {noformat}
 SFs-macbook% svn diff
 Index: cmislib/model.py
 ===
 --- cmislib/model.py(revision 923892)
 +++ cmislib/model.py(working copy)
 @@ -1337,11 +1337,11 @@
  
  def __iter__(self):
  ''' Iterator for the result set '''
 -return self.getResults().itervalues()
 +return iter(self.getResults())
  
  def __getitem__(self, index):
  ''' Getter for the result set '''
 -return self.getResults().values()[index]
 +return self.getResults()[index]
  
  def __len__(self):
  ''' Len method for the result set '''
 @@ -1411,16 +1411,23 @@
  
  if self._xmlDoc:
  entryElements = self._xmlDoc.getElementsByTagNameNS(ATOM_NS, 
 'entry')
 -entries = {}
 +entries = []
  for entryElement in entryElements:

[jira] Created: (CMIS-158) cmislib chokes on non-ascii properties

2010-03-15 Thread Stefane Fermigier (JIRA)
cmislib chokes on non-ascii properties
--

 Key: CMIS-158
 URL: https://issues.apache.org/jira/browse/CMIS-158
 Project: Chemistry
  Issue Type: Bug
  Components: cmislib
Reporter: Stefane Fermigier


I believe this patch is needed on model.py:

@@ -3765,7 +3766,7 @@
 if nodeName == 'propertyId':
 return CmisId(value)
 elif nodeName == 'propertyString':
-return str(value)
+return value
 elif nodeName == 'propertyBoolean':
 bDict = {'false': False, 'true': True}
 return bDict[value.lower()]

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.



[jira] Assigned: (CMIS-158) cmislib chokes on non-ascii properties

2010-03-15 Thread Stefane Fermigier (JIRA)

 [ 
https://issues.apache.org/jira/browse/CMIS-158?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Stefane Fermigier reassigned CMIS-158:
--

Assignee: Jeff Potts

 cmislib chokes on non-ascii properties
 --

 Key: CMIS-158
 URL: https://issues.apache.org/jira/browse/CMIS-158
 Project: Chemistry
  Issue Type: Bug
  Components: cmislib
Reporter: Stefane Fermigier
Assignee: Jeff Potts

 I believe this patch is needed on model.py:
 {noformat}
 @@ -3765,7 +3766,7 @@
  if nodeName == 'propertyId':
  return CmisId(value)
  elif nodeName == 'propertyString':
 -return str(value)
 +return value
  elif nodeName == 'propertyBoolean':
  bDict = {'false': False, 'true': True}
  return bDict[value.lower()]
 {noformat}

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.



[jira] Created: (CMIS-159) Ordered queries are not ordered

2010-03-15 Thread Stefane Fermigier (JIRA)
Ordered queries are not ordered
---

 Key: CMIS-159
 URL: https://issues.apache.org/jira/browse/CMIS-159
 Project: Chemistry
  Issue Type: Bug
  Components: cmislib
Reporter: Stefane Fermigier
Assignee: Jeff Potts


When running an ordered SELECT query, the results are not ordered.

I believe the following patch is needed:

{noformat}
Index: model.py
===
--- model.py(revision 923205)
+++ model.py(working copy)
@@ -1337,11 +1337,11 @@
 
 def __iter__(self):
 ''' Iterator for the result set '''
-return self.getResults().itervalues()
+return iter(self.getResults())
 
 def __getitem__(self, index):
 ''' Getter for the result set '''
-return self.getResults().values()[index]
+return self.getResults()[index]
 
 def __len__(self):
 ''' Len method for the result set '''
@@ -1411,12 +1411,13 @@
 
 if self._xmlDoc:
 entryElements = self._xmlDoc.getElementsByTagNameNS(ATOM_NS, 
'entry')
-entries = {}
+entries = []
 for entryElement in entryElements:
 cmisObject = getSpecializedObject(CmisObject(self._cmisClient,
  self._repository,
  
xmlDoc=entryElement))
-entries[cmisObject.getObjectId()] = cmisObject
+entries.append(cmisObject)
 
 self._results = entries
{noformat}

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.



[jira] Reopened: (CMIS-112) Documents missing cmis:path property

2010-02-06 Thread Stefane Fermigier (JIRA)

 [ 
https://issues.apache.org/jira/browse/CMIS-112?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Stefane Fermigier reopened CMIS-112:


  Assignee: Stefane Fermigier

 Documents missing cmis:path property
 

 Key: CMIS-112
 URL: https://issues.apache.org/jira/browse/CMIS-112
 Project: Chemistry
  Issue Type: Bug
Reporter: Stefane Fermigier
Assignee: Stefane Fermigier

 When running getChildren, getDescendants, etc. returned cmis:folders have a 
 cmis:path property, but not cmis:documents.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.



[jira] Resolved: (CMIS-112) Documents missing cmis:path property

2010-02-06 Thread Stefane Fermigier (JIRA)

 [ 
https://issues.apache.org/jira/browse/CMIS-112?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Stefane Fermigier resolved CMIS-112.


Resolution: Not A Problem

 Documents missing cmis:path property
 

 Key: CMIS-112
 URL: https://issues.apache.org/jira/browse/CMIS-112
 Project: Chemistry
  Issue Type: Bug
Reporter: Stefane Fermigier
Assignee: Stefane Fermigier

 When running getChildren, getDescendants, etc. returned cmis:folders have a 
 cmis:path property, but not cmis:documents.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.



[jira] Commented: (CMIS-111) Content streams not correctly served

2010-02-03 Thread Stefane Fermigier (JIRA)

[ 
https://issues.apache.org/jira/browse/CMIS-111?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=12829046#action_12829046
 ] 

Stefane Fermigier commented on CMIS-111:


I can not reproduce (uploading then downloading binary files using cmissh 
against the test server).



 Content streams not correctly served
 

 Key: CMIS-111
 URL: https://issues.apache.org/jira/browse/CMIS-111
 Project: Chemistry
  Issue Type: Bug
  Components: server
Reporter: Hinse ter Schuur
 Attachments: media-binary.txt


 When downloading (binary) content from the server the contents are not 
 correct. This seems to be because a SizedMediaResponseContext is  treated as 
 non-binary, resulting in written out to the request context´ s writer instead 
 of outputstream.
 A simple reproduction case is: run the org.apache.chemistry.test.MainServlet 
 from the chemistry-test module upload a zip file and try to download it 
 again. The resulting download does not have the same size as the original and 
 the archive is corrupted.
 A simple fix will be to make the SizedMediaResponseContext binary. I'll 
 attach a patch file for this.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.



[jira] Commented: (CMIS-37) Merge Alfresco Abdera CMIS extension with existing Chemistry extension

2010-01-16 Thread Stefane Fermigier (JIRA)

[ 
https://issues.apache.org/jira/browse/CMIS-37?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=12801126#action_12801126
 ] 

Stefane Fermigier commented on CMIS-37:
---

+1 to D. Caruana's proposal.

 Merge Alfresco Abdera CMIS extension with existing Chemistry extension
 --

 Key: CMIS-37
 URL: https://issues.apache.org/jira/browse/CMIS-37
 Project: Chemistry
  Issue Type: Sub-task
  Components: tck
Reporter: Gabriele Columbro
Assignee: Gabriele Columbro

 Commit and merge functionalities of the existing Alfresco extension and the 
 Chemistry one

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.