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:
David Caruana
2008-09-04 11:06:42 +00:00
parent bf504cba8c
commit a6e263078e
46 changed files with 629 additions and 542 deletions

View File

@@ -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;
}
}