mirror of
https://github.com/Alfresco/alfresco-community-repo.git
synced 2025-08-07 17:49:17 +00:00
Merge from SEAMIST3
git-svn-id: https://svn.alfresco.com/repos/alfresco-enterprise/alfresco/HEAD/root@10729 c4b6b30b-aa2e-2d43-bbcb-ca4b014f7261
This commit is contained in:
@@ -55,14 +55,40 @@ public class CMISProperties extends ElementWrapper
|
||||
|
||||
public String getObjectId()
|
||||
{
|
||||
Element child = getInternal().getFirstChild(CMISConstants.OBJECTID);
|
||||
return (child == null) ? null : child.getText();
|
||||
return findPropertyID(CMISConstants.PROP_OBJECTID);
|
||||
}
|
||||
|
||||
public String getBaseType()
|
||||
{
|
||||
Element child = getInternal().getFirstChild(CMISConstants.BASETYPE);
|
||||
return (child == null) ? null : child.getText();
|
||||
return findPropertyString(CMISConstants.PROP_BASETYPE);
|
||||
}
|
||||
|
||||
private String findPropertyString(String name)
|
||||
{
|
||||
Element child = getFirstChild(CMISConstants.PROPERTY_STRING);
|
||||
while(child != null)
|
||||
{
|
||||
if (name.equals(child.getAttributeValue(CMISConstants.PROPERTY_NAME)))
|
||||
{
|
||||
return child.getText();
|
||||
}
|
||||
child = child.getNextSibling(CMISConstants.PROPERTY_STRING);
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
private String findPropertyID(String name)
|
||||
{
|
||||
Element child = getFirstChild(CMISConstants.PROPERTY_ID);
|
||||
while(child != null)
|
||||
{
|
||||
if (name.equals(child.getAttributeValue(CMISConstants.PROPERTY_NAME)))
|
||||
{
|
||||
return child.getText();
|
||||
}
|
||||
child = child.getNextSibling(CMISConstants.PROPERTY_ID);
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
}
|
||||
|
Reference in New Issue
Block a user