Package org.apache.webdav.lib

Examples of org.apache.webdav.lib.Property


    if ( property == null ) return null;
        return new StringValue(property.getPropertyAsString());
    }

    public XMLValue getPropertyAsXMLValue(URI uri, String namespace, String name, Credentials credentials) throws IOException {
    Property property = getProperty(uri, namespace, name, credentials);
    if ( property == null ) return null;
    DOMBuilder builder = new DOMBuilder();
        Element element = builder.build(property.getElement());
    return new ElementValue(element);
    }
View Full Code Here


            throw new IOException("Received status code "+state+" when doing PROPFIND on URI="+url);
        }
        List arrayList = new ArrayList();
        for ( Enumeration propertyEnumeration = propfindMethod.getResponseProperties(url); propertyEnumeration.hasMoreElements(); ) {
            Map properties = new HashMap();
            Property property = (Property)propertyEnumeration.nextElement();
            properties.put("name", new StringValue(property.getLocalName()));
            properties.put("value", new StringValue(property.getPropertyAsString()));
            arrayList.add(new MapValue(properties));
        }
        Value[] resource = new Value[arrayList.size()];
        return new ArrayValue((Value[])arrayList.toArray(resource));
    }
View Full Code Here

     * <code>org.apache.webdav.lib.properties</code> package.
     */
    protected static Property convertElementToProperty(
        Response response, Element element) {

        Property property = null;
        String namespace = DOMUtils.getElementNamespaceURI(element);

        // handle DAV properties specially
        if (namespace != null && namespace.equals("DAV:")) {

View Full Code Here

     * <code>org.apache.webdav.lib.properties</code> package.
     */
    protected static Property convertElementToProperty(
        Response response, Element element) {

        Property property = null;
        String namespace = DOMUtils.getElementNamespaceURI(element);

        // handle DAV properties specially
        if (namespace != null && namespace.equals("DAV:")) {

View Full Code Here

                out.println();
            }
            ResponseEntity response = (ResponseEntity) responses.nextElement();
            Enumeration properties = response.getProperties();
            while (properties.hasMoreElements()){
                Property property = (Property)properties.nextElement();
                out.println("   " + property.getName() + " : " + property.getPropertyAsString());
            }
        }
        catch (Exception ex) {
            handleException(ex);
        }
View Full Code Here

     * <code>org.apache.webdav.lib.properties</code> package.
     */
    protected static Property convertElementToProperty(
        Response response, Element element) {

        Property property = null;
        String namespace = DOMUtils.getElementNamespaceURI(element);

        // handle DAV properties specially
        if (namespace != null && namespace.equals("DAV:")) {

View Full Code Here

     * <code>org.apache.webdav.lib.properties</code> package.
     */
    protected static Property convertElementToProperty(
        Response response, Element element) {

        Property property = null;
        String namespace = DOMUtils.getElementNamespaceURI(element);

        // handle DAV properties specially
        if (namespace != null && namespace.equals("DAV:")) {

View Full Code Here

     * <code>org.apache.webdav.lib.properties</code> package.
     */
    protected static Property convertElementToProperty(
        Response response, Element element) {

        Property property = null;
        String namespace = DOMUtils.getElementNamespaceURI(element);

        // handle DAV properties specially
        if (namespace != null && namespace.equals("DAV:")) {

View Full Code Here

     * <code>org.apache.webdav.lib.properties</code> package.
     */
    protected static Property convertElementToProperty(
        Response response, Element element) {

        Property property = null;
        String namespace = DOMUtils.getElementNamespaceURI(element);

        // handle DAV properties specially
        if (namespace != null && namespace.equals("DAV:")) {

View Full Code Here

    throws HttpException, IOException {

        Vector propNames = new Vector(1);
        propNames.add(new PropertyName(namespace,name));
        Enumeration props= null;
        Property prop = null;
        WebdavResource resource = WebDAVUtil.getWebdavResource(uri);
        Enumeration responses = resource.propfindMethod(0, propNames);
        while (responses.hasMoreElements()) {
            ResponseEntity response = (ResponseEntity)responses.nextElement();
            props = response.getProperties();
            if (props.hasMoreElements()) {
                prop = (Property) props.nextElement();
                return new SourceProperty(prop.getElement());
            }
        }
        return null;
    }
View Full Code Here

TOP

Related Classes of org.apache.webdav.lib.Property

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.