protected boolean propertyHasChild ( QualifiedName propertyName , QualifiedName childName ) throws DAVException { // If the property is not found, then the answer is 'no'. PropertyStatus propertyStat = getProperty ( propertyName ) ; if ( propertyStat . getStatusCode ( ) == IResponse . SC_NOT_FOUND ) return false ; // If there was a problem getting the property, throw an exception. examineStatusCode ( propertyStat . getStatusCode ( ) , propertyStat . getStatusMessage ( ) ) ; // Check to see if the named child is in the retrieved property. try { return ElementEditor . hasChild ( propertyStat . getProperty ( ) , childName ) ; } catch ( MalformedElementException exception ) { throw new SystemException ( exception ) ; } }
This is a helper method to check to see if the resource has a property with the given name that in turn has a child with a given name .