package org.xbib.io.webdav.client;

import static org.xbib.io.webdav.api.DavConstants.PROPERTY_DISPLAYNAME;
import static org.xbib.io.webdav.api.DavConstants.PROPERTY_RESOURCETYPE;
import static org.xbib.io.webdav.api.DavConstants.PROPERTY_SOURCE;
import org.xbib.io.webdav.common.DavPropertySet;

public interface WebDavElement {

    DavPropertySet getDavPropertySet();

    default String getName() {
        return getDavPropertySet().get(PROPERTY_DISPLAYNAME).getValue().toString();
    }

    default String getResourceType() {
        return getDavPropertySet().get(PROPERTY_RESOURCETYPE).getValue().toString();
    }

    default String getSource() {
        return getDavPropertySet().get(PROPERTY_SOURCE).getValue().toString();
    }
}
