DAVProperties props = (DAVProperties) propsMap.get(path); info.isDirectory = props != null && props.isCollection();
if (!propsMap.isEmpty()) { DAVProperties props = (DAVProperties) propsMap.values().iterator().next(); info.isDirectory = props != null && props.isCollection(); }
    public static DAVBaselineInfo getBaselineInfo(DAVConnection connection, DAVRepository repos, String path, long revision,                                                  boolean includeType, boolean includeRevision, DAVBaselineInfo info) throws SVNException {        DAVElement[] properties = includeRevision ? DAVElement.BASELINE_PROPERTIES : new DAVElement[] {DAVElement.BASELINE_COLLECTION};        DAVProperties baselineProperties = getBaselineProperties(connection, repos, path, revision, properties);        info = info == null ? new DAVBaselineInfo() : info;        info.baselinePath = baselineProperties.getURL();        info.baselineBase = baselineProperties.getPropertyValue(DAVElement.BASELINE_COLLECTION);        info.baseline = baselineProperties.getOriginalURL();        if (info.baselineBase == null) {            SVNErrorMessage err = SVNErrorMessage.create(SVNErrorCode.RA_DAV_REQUEST_FAILED, "'DAV:baseline-collection' not present on the baseline resource");            SVNErrorManager.error(err);        }        info.baselineBase = SVNEncodingUtil.uriEncode(info.baselineBase);        if (includeRevision) {            String version = baselineProperties.getPropertyValue(DAVElement.VERSION_NAME);            if (version == null) {                SVNErrorMessage err = SVNErrorMessage.create(SVNErrorCode.RA_DAV_REQUEST_FAILED, "'DAV:version-name' not present on the baseline resource");                SVNErrorManager.error(err);            }            info.revision = Long.parseLong(version);        }        if (includeType) {            Map propsMap = new HashMap();            path = SVNPathUtil.append(info.baselineBase, info.baselinePath);            HTTPStatus status = getProperties(connection, path, 0, null, new DAVElement[] {DAVElement.RESOURCE_TYPE}, propsMap);            if (status.getError() != null) {                SVNErrorManager.error(status.getError());            }            DAVProperties props = (DAVProperties) propsMap.get(path);            info.isDirectory = props != null && props.isCollection();        }        return info;    }