private DAVElement getDAVElement(String qName) { String prefix = null; int index = qName.indexOf(':'); if (index >= 0) { prefix = qName.substring(0, index); Stack prefixes = (Stack) myPrefixesMap.get(prefix); if (prefixes != null && !prefixes.isEmpty()) { prefix = (String) prefixes.peek(); } qName = qName.substring(index + 1); } return DAVElement.getElement(prefix, qName); }
private String getReposPropName(DAVElement propName) { if (DAVElement.SVN_SVN_PROPERTY_NAMESPACE.equals(propName.getNamespace())) { return SVNProperty.SVN_PREFIX + propName.getName(); } else if (DAVElement.SVN_CUSTOM_PROPERTY_NAMESPACE.equals(propName.getNamespace())) { return propName.getName(); } return null; }
public static DAVElement getElement(String namespace, String name) { if (namespace == null) { namespace = ""; } Map properties = (Map) ourProperties.get(namespace); if (properties == null) { properties = new HashMap(); ourProperties.put(namespace, properties); } name = name.replace(XMLReader.COLON_REPLACEMENT, ':'); DAVElement property = (DAVElement) properties.get(name); if (property == null) { property = new DAVElement(namespace, name); properties.put(name, property); } return property; }
private static String computeWCPropertyName(DAVElement element) { if (element == DAVElement.HREF) { return SVNProperty.WC_URL; } return SVNProperty.SVN_ENTRY_PREFIX + element.getName(); } }
protected LivePropertySpecification findLiveProperty(DAVElement property) { String nameSpace = property.getNamespace(); if (!DAVElement.DAV_NAMESPACE.equals(nameSpace) && !DAVElement.SVN_DAV_PROPERTY_NAMESPACE.equals(nameSpace)) { return null; } LivePropertySpecification lps = (LivePropertySpecification) OUR_LIVE_PROPS.get(property); if (lps == null) { //search in core props lps = (LivePropertySpecification) OUR_CORE_LIVE_PROPS.get(property); } return lps; }
public static String getPropertyValue(DAVConnection connection, String path, String label, DAVElement property) throws SVNException { DAVProperties props = getResourceProperties(connection, path, label, new DAVElement[] {property}); Object value = props.getProperties().get(property); if (value == null) { SVNErrorMessage err = SVNErrorMessage.create(SVNErrorCode.RA_DAV_PROPS_NOT_FOUND, "''{0}'' was not present on the resource", property.toString()); SVNErrorManager.error(err); } return (String) value; }
private static String computeWCPropertyName(DAVElement element) { return SVNProperty.SVN_ENTRY_PREFIX + element.getName(); }
private boolean useStringProperty(DAVElement element, String propertyName) { String namespace = element == null ? null : element.getNamespace(); return SVNProperty.isSVNProperty(propertyName) || DAVElement.SVN_DAV_PROPERTY_NAMESPACE.equals(namespace) || DAVElement.SVN_SVN_PROPERTY_NAMESPACE.equals(namespace) || DAVElement.SVN_NAMESPACE.equals(namespace) || DAVElement.DAV_NAMESPACE.equals(namespace); }
public static String getPropertyValue(DAVConnection connection, String path, String label, DAVElement property) throws SVNException { DAVProperties props = getResourceProperties(connection, path, label, new DAVElement[] {property}); SVNPropertyValue value = props.getPropertyValue(property); if (value == null) { SVNErrorMessage err = SVNErrorMessage.create(SVNErrorCode.RA_DAV_PROPS_NOT_FOUND, "''{0}'' was not present on the resource", property.toString()); SVNErrorManager.error(err, SVNLogType.NETWORK); } return value.getString(); }
public String toString() { StringBuffer sb = new StringBuffer(); sb.append(getNamespace()); if (!getNamespace().endsWith(":")) { sb.append(":"); } sb.append(getName()); return sb.toString(); }
private static String computeWCPropertyName(DAVElement element) { return SVNProperty.SVN_ENTRY_PREFIX + element.getName(); }
if (item instanceof DAVElement) { DAVElement currentElement = (DAVElement) item; currentNamespace = currentElement.getNamespace(); } else if (item instanceof String) { currentNamespace = (String) item;
private DAVElement getDAVElement(String qName, String namespace) { String prefix = namespace; int index = qName.indexOf(':'); if (index >= 0) { prefix = qName.substring(0, index); Stack prefixes = (Stack) myPrefixesMap.get(prefix); if (prefixes != null && !prefixes.isEmpty()) { prefix = (String) prefixes.peek(); } qName = qName.substring(index + 1); } return DAVElement.getElement(prefix, qName); }
public static String getPropertyValue(DAVConnection connection, String path, String label, DAVElement property) throws SVNException { DAVProperties props = getResourceProperties(connection, path, label, new DAVElement[] {property}); SVNPropertyValue value = props.getPropertyValue(property); if (value == null) { SVNErrorMessage err = SVNErrorMessage.create(SVNErrorCode.RA_DAV_PROPS_NOT_FOUND, "''{0}'' was not present on the resource", property.toString()); SVNErrorManager.error(err, SVNLogType.NETWORK); } return value.getString(); }
public static DAVElement getElement(String namespace, String name) { if (namespace == null) { namespace = ""; } Map properties = (Map) ourProperties.get(namespace); if (properties == null) { properties = new SVNHashMap(); ourProperties.put(namespace, properties); } name = name.replace(XMLReader.COLON_REPLACEMENT, ':'); DAVElement property = (DAVElement) properties.get(name); if (property == null) { property = new DAVElement(namespace, name); properties.put(name, property); } return property; }
public String toString() { StringBuffer sb = new StringBuffer(); sb.append(getNamespace()); if (!getNamespace().endsWith(":")) { sb.append(":"); } sb.append(getName()); return sb.toString(); }
private static String computeWCPropertyName(DAVElement element) { return SVNProperty.SVN_ENTRY_PREFIX + element.getName(); }
if (item instanceof DAVElement) { DAVElement currentElement = (DAVElement) item; currentNamespace = currentElement.getNamespace(); } else if (item instanceof String) { currentNamespace = (String) item;
private DAVElement getDAVElement(String qName, String localName, String namespace) { if (qName == null || qName.trim().length() == 0) { qName = localName; } String prefix = namespace; int index = qName.indexOf(':'); if (index >= 0) { prefix = qName.substring(0, index); Stack prefixes = (Stack) myPrefixesMap.get(prefix); if (prefixes != null && !prefixes.isEmpty()) { prefix = (String) prefixes.peek(); } qName = qName.substring(index + 1); } return DAVElement.getElement(prefix, qName); }
public static String getPropertyValue(DAVConnection connection, String path, String label, DAVElement property) throws SVNException { DAVProperties props = getResourceProperties(connection, path, label, new DAVElement[] {property}); SVNPropertyValue value = props.getPropertyValue(property); if (value == null) { SVNErrorMessage err = SVNErrorMessage.create(SVNErrorCode.RA_DAV_PROPS_NOT_FOUND, "''{0}'' was not present on the resource", property.toString()); SVNErrorManager.error(err, SVNLogType.NETWORK); } return value.getString(); }