Examples of DAVElement


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

        myParent.push(ROOT);
    }

    public void startElement(String uri, String localName, String qName, Attributes attributes) throws SAXException {
        setNamespace(uri);
        DAVElement element = getDAVElement(qName);
        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

        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().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.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

            Map namespacesToPrefixes = new HashMap();
            propsProvider.defineNamespaces(namespacesToPrefixes);
            Collection propNames = propsProvider.getPropertyNames();
            int ind = 0;
            for (Iterator propNamesIter = propNames.iterator(); propNamesIter.hasNext();) {
                DAVElement propNameElement = (DAVElement) propNamesIter.next();
                if (DAVElement.DAV_NAMESPACE.equals(propNameElement.getNamespace())) {
                    if (DAVElement.GET_CONTENT_TYPE.getName().equals(propNameElement.getName())) {
                        foundContentType = true;
                    } else if (DAVElement.GET_CONTENT_LANGUAGE.getName().equals(propNameElement.getName())) {
                        foundContentLang = true;
                    }
                }
                if (action == DAVInsertPropAction.INSERT_VALUE) {
                    try {
View Full Code Here

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

        if (!resource.exists()) {
            return;
        }
       
        for (Iterator livePropsIter = OUR_LIVE_PROPS.keySet().iterator(); livePropsIter.hasNext();) {
            DAVElement propElement = (DAVElement) livePropsIter.next();
            if (propElement == DAVElement.COMMENT || propElement == DAVElement.DISPLAY_NAME || propElement == DAVElement.SOURCE) {
                //only RESOURCETYPE core prop should be inserted
                continue;
            }
            LivePropertySpecification lps = (LivePropertySpecification) OUR_LIVE_PROPS.get(propElement);
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.