org.springframework.util.xml.DomUtils#nodeNameEquals ( )源码实例Demo

下面列出了org.springframework.util.xml.DomUtils#nodeNameEquals ( ) 实例代码,或者点击链接到github查看源代码,也可以在右侧发表评论。

源代码1 项目: citrus-admin   文件: GetSpringBeansFilter.java
/**
 * {@inheritDoc}
 */
public short accept(Element element) {
    if (DomUtils.nodeNameEquals(element, elementName) &&
            isEqualByNamespace(element, elementNamespace) &&
            isEqualByBeanAttributes(element, attributes)) {
        beanDefinitions.add(element);
    }
    
    return NodeFilter.FILTER_ACCEPT;
}
 
源代码2 项目: citrus-admin   文件: GetSpringBeanFilter.java
/**
 * {@inheritDoc}
 */
public short accept(Element element) {
    if (DomUtils.nodeNameEquals(element, elementName) &&
        isEqualByNamespace(element, elementNamespace) &&
        (isEqualById(element, id) || isEqualByBeanName(element, id))) {
        beanDefinition = element;
    }
    
    return NodeFilter.FILTER_ACCEPT;
}
 
源代码3 项目: citrus-admin   文件: AddSpringBeanFilter.java
/**
 * {@inheritDoc}
 */
public short accept(Element element) {
    if (DomUtils.nodeNameEquals(element, "beans")) {
        element.appendChild(element.getOwnerDocument().createTextNode("\n    ")); //TODO make indentation configurable
        element.appendChild(element.getOwnerDocument().importNode(beanDefinition, true));
    }
    
    return NodeFilter.FILTER_ACCEPT;
}
 
源代码4 项目: citrus-admin   文件: GetSpringImportsFilter.java
@Override
public short startElement(Element element) {
    if (DomUtils.nodeNameEquals(element, "import")) {
        String resourceLocation = element.getAttribute("resource");

        if (StringUtils.hasText(resourceLocation)) {
            if (resourceLocation.startsWith("classpath:")) {
                resourceLocation = resourceLocation.substring("classpath:".length());
            } else if (resourceLocation.startsWith("file:")) {
                resourceLocation = resourceLocation.substring("file:".length());
            }

            try {
                File importedFile = new FileSystemResource(parentConfigFile.getParentFile().getCanonicalPath() +
                        File.separator + resourceLocation).getFile();

                if (importedFile.exists()) {
                    importedFiles.add(importedFile);
                }
            } catch (IOException e) {
                log.warn("Unable to resolve imported file resource location", e);
            }
        }
    }

    return NodeFilter.FILTER_ACCEPT;
}