Examples of DAVElement


Examples of org.tmatesoft.svn.core.internal.io.dav.DAVElement

        myParent.push(ROOT);
    }

    public void startElement(String uri, String localName, String qName, Attributes attributes) throws SAXException {
        setNamespace(uri);
        DAVElement element = getDAVElement(qName, myNamespace);
        try {
            startElement(getParent(), element, attributes);
        } catch (SVNException e) {
            SVNDebugLog.getDefaultLog().logFine(SVNLogType.NETWORK, e);
            throw new SAXException(e);
View Full Code Here

Examples of org.tmatesoft.svn.core.internal.io.dav.DAVElement

    }

    public void endElement(String uri, String localName, String qName) throws SAXException {
        myParent.pop();
        String namespace = uri != null && !"".equals(uri) ? uri : myNamespace;
        DAVElement element = getDAVElement(qName, namespace);
        try {
            endElement(getParent(), element, myCDATA);
        } catch (SVNException e) {
            SVNDebugLog.getDefaultLog().logFine(SVNLogType.NETWORK, e);
            throw new SAXException(e);
View Full Code Here

Examples of org.tmatesoft.svn.core.internal.io.dav.DAVElement

    }
   
    private void addProps(DAVProperties props, boolean isDir) throws SVNException {
        Map propsMap = props.getProperties();
        for (Iterator propsIter = propsMap.keySet().iterator(); propsIter.hasNext();) {
            DAVElement element = (DAVElement) propsIter.next();
            SVNPropertyValue propValue = (SVNPropertyValue) propsMap.get(element);
            String elementNamespace = element.getNamespace();
            if (elementNamespace.equals(DAVElement.SVN_CUSTOM_PROPERTY_NAMESPACE)) {
                String propName = element.getName();
                if (isDir) {
                    myEditor.changeDirProperty(propName, propValue);
                } else {
                    myEditor.changeFileProperty(myPath, propName, propValue);
                }
                continue;
            }
           
            if (elementNamespace.equals(DAVElement.SVN_SVN_PROPERTY_NAMESPACE)) {
                String propName = SVNProperty.SVN_PREFIX + element.getName();
                if (isDir) {
                    myEditor.changeDirProperty(propName, propValue);
                } else {
                    myEditor.changeFileProperty(myPath, propName, propValue);
                }
View Full Code Here

Examples of org.tmatesoft.svn.core.internal.io.dav.DAVElement

            myEncoding = attrs.getValue(DAVElement.SVN_DAV_PROPERTY_NAMESPACE, "encoding");
        }
    }

    protected void endElement(DAVElement parent, DAVElement element, StringBuffer cdata) throws SVNException {
        DAVElement name = null;
        SVNPropertyValue value = null;
        if (myCurrentProperties == null) {
            invalidXML();
        }
        if (element == DAVElement.RESPONSE) {
            if (myCurrentResource.getURL() == null) {
                invalidXML();
            }
            myResources.put(myCurrentResource.getURL(), myCurrentResource);
            myCurrentResource = null;
            return;
        } else if (element == DAVElement.PROPSTAT) {
            if (myStatusCode != 0) {
                for (Iterator entries = myCurrentProperties.entrySet().iterator(); entries.hasNext();) {
                    Map.Entry entry = (Map.Entry) entries.next();
                    DAVElement propName = (DAVElement) entry.getKey();
                    SVNPropertyValue propValue = (SVNPropertyValue) entry.getValue();
                    if (myStatusCode == 200) {
                        myCurrentResource.setProperty(propName, propValue);
                    }
                }
View Full Code Here

Examples of org.tmatesoft.svn.core.internal.io.dav.DAVElement

            Collection usedNamespaces = new ArrayList();
            for (Iterator iterator = namespaces.iterator(); iterator.hasNext();) {
                Object item = iterator.next();
                String currentNamespace = null;
                if (item instanceof DAVElement) {
                    DAVElement currentElement = (DAVElement) item;
                    currentNamespace = currentElement.getNamespace();
                } else if (item instanceof String) {
                    currentNamespace = (String) item;
                }
                if (currentNamespace != null && currentNamespace.length() > 0 && !usedNamespaces.contains(currentNamespace)) {
                    usedNamespaces.add(currentNamespace);
View Full Code Here

Examples of org.tmatesoft.svn.core.internal.io.dav.DAVElement

        myParent.clear();
        myParent.push(ROOT);
    }
   
    public void startElement(String uri, String localName, String qName, Attributes attributes) throws SAXException {
        DAVElement element = getDAVElement(qName);
        try {
            startElement(getParent(), element, attributes);
        } catch(SVNException e) {
            SVNDebugLog.getDefaultLog().info(e);
            throw new SAXException(e);
View Full Code Here

Examples of org.tmatesoft.svn.core.internal.io.dav.DAVElement

        myCDATA = new StringBuffer();
    }
   
    public void endElement(String uri, String localName, String qName) throws SAXException {
        myParent.pop();
        DAVElement element = getDAVElement(qName);
        try {
            endElement(getParent(), element, myCDATA);
        } catch(SVNException e) {           
            SVNDebugLog.getDefaultLog().info(e);
            throw new SAXException(e);
View Full Code Here

Examples of org.tmatesoft.svn.core.internal.io.dav.DAVElement

            myEncoding = attrs.getValue("encoding");
        }
  }

  protected void endElement(DAVElement parent, DAVElement element, StringBuffer cdata) throws SVNException {
        DAVElement name = null;
        String value = null;
        if (element == DAVElement.RESPONSE) {
            if (myCurrentResource.getURL() == null) {
                invalidXML();
            }
            myResources.put(myCurrentResource.getURL(), myCurrentResource);
            myCurrentResource = null;           
            return;
        } else if (element == DAVElement.PROPSTAT) {
            if (myStatusCode != 0) {
                for (Iterator names = myCurrentProperties.keySet().iterator(); names.hasNext();) {
                    DAVElement propName = (DAVElement) names.next();
                    String propValue = (String) myCurrentProperties.get(propName);
                    if (myStatusCode == 200) {
                        myCurrentResource.setProperty(propName, propValue);
                    }
                }
View Full Code Here

Examples of org.tmatesoft.svn.core.internal.io.dav.DAVElement

            Collection usedNamespaces = new ArrayList();
            for (Iterator iterator = namespaces.iterator(); iterator.hasNext();) {
                Object item = iterator.next();
                String currentNamespace = null;
                if (item instanceof DAVElement) {
                    DAVElement currentElement = (DAVElement) item;
                    currentNamespace = currentElement.getNamespace();
                } else if (item instanceof String) {
                    currentNamespace = (String) item;
                }
                if (currentNamespace != null && currentNamespace.length() > 0 && !usedNamespaces.contains(currentNamespace)) {
                    usedNamespaces.add(currentNamespace);
View Full Code Here

Examples of org.tmatesoft.svn.core.internal.io.dav.DAVElement

    }
   
    private void addProps(DAVProperties props, boolean isDir) throws SVNException {
        Map propsMap = props.getProperties();
        for (Iterator propsIter = propsMap.keySet().iterator(); propsIter.hasNext();) {
            DAVElement element = (DAVElement) propsIter.next();
            SVNPropertyValue propValue = (SVNPropertyValue) propsMap.get(element);
            String elementNamespace = element.getNamespace();
            if (elementNamespace.equals(DAVElement.SVN_CUSTOM_PROPERTY_NAMESPACE)) {
                String propName = element.getName();
                if (isDir) {
                    myEditor.changeDirProperty(propName, propValue);
                } else {
                    myEditor.changeFileProperty(myPath, propName, propValue);
                }
                continue;
            }
           
            if (elementNamespace.equals(DAVElement.SVN_SVN_PROPERTY_NAMESPACE)) {
                String propName = SVNProperty.SVN_PREFIX + element.getName();
                if (isDir) {
                    myEditor.changeDirProperty(propName, propValue);
                } else {
                    myEditor.changeFileProperty(myPath, propName, propValue);
                }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.