• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    公众号

Java ElementNSImpl类代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

本文整理汇总了Java中org.apache.xerces.dom.ElementNSImpl的典型用法代码示例。如果您正苦于以下问题:Java ElementNSImpl类的具体用法?Java ElementNSImpl怎么用?Java ElementNSImpl使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。



ElementNSImpl类属于org.apache.xerces.dom包,在下文中一共展示了ElementNSImpl类的16个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的Java代码示例。

示例1: removeDuplicateProcesses

import org.apache.xerces.dom.ElementNSImpl; //导入依赖的package包/类
@SuppressWarnings("unchecked") // TODO: switch to Apache Commons 4.0+
public void removeDuplicateProcesses() {
	ElementNSImpl mergedEnterpriseArchive = (ElementNSImpl) this.repository.getAny().get(0);
	ElementNSImpl mergedProcessArchive = getElement(mergedEnterpriseArchive, "processArchive");
	ElementNSImpl mergedProcessProperty = getElement(mergedProcessArchive, "processProperty");

	String content = mergedProcessProperty.getTextContent();
	if (content != null && !content.isEmpty()) {
		List<String> processes = SetUniqueList.decorate(new ArrayList<String>());
		processes.addAll(Arrays.asList(content.split(",")));
		String contentWithoutDuplicate = StringUtils.join(processes, ",");
		mergedProcessProperty.setTextContent(contentWithoutDuplicate);
	}

}
 
开发者ID:fastconnect,项目名称:tibco-bwmaven,代码行数:16,代码来源:ArchiveBuilder.java


示例2: endElement

import org.apache.xerces.dom.ElementNSImpl; //导入依赖的package包/类
public void endElement(QName element, Augmentations augs)
        throws XNIException {
    final Node currentElement = fDOMValidatorHelper.getCurrentElement();
    // Write type information to this element
    if (augs != null && fDocumentImpl != null) {
        ElementPSVI elementPSVI = (ElementPSVI)augs.getItem(Constants.ELEMENT_PSVI);
        if (elementPSVI != null) {
            if (fStorePSVI) {
                ((PSVIElementNSImpl) currentElement).setPSVI(elementPSVI);
            }
            XSTypeDefinition type = elementPSVI.getMemberTypeDefinition();
            if (type == null) {
                type = elementPSVI.getTypeDefinition();
            }
            ((ElementNSImpl) currentElement).setType(type);
        }
    }
}
 
开发者ID:AaronZhangL,项目名称:SplitCharater,代码行数:19,代码来源:DOMResultAugmentor.java


示例3: endElement

import org.apache.xerces.dom.ElementNSImpl; //导入依赖的package包/类
public void endElement(QName element, Augmentations augs)
        throws XNIException {
    // write type information to this element
    if (augs != null && fDocumentImpl != null) {
        ElementPSVI elementPSVI = (ElementPSVI)augs.getItem(Constants.ELEMENT_PSVI);
        if (elementPSVI != null) {
            if (fStorePSVI) {
                ((PSVIElementNSImpl)fCurrentNode).setPSVI(elementPSVI);
            }
            XSTypeDefinition type = elementPSVI.getMemberTypeDefinition();
            if (type == null) {
                type = elementPSVI.getTypeDefinition();
            }
            ((ElementNSImpl)fCurrentNode).setType(type);
        }
    }
    
    // adjust current node reference
    if (fCurrentNode == fFragmentRoot) {
        fCurrentNode = null;
        fFragmentRoot = null;
        return;
    }
    fCurrentNode = fCurrentNode.getParentNode();
}
 
开发者ID:AaronZhangL,项目名称:SplitCharater,代码行数:26,代码来源:DOMResultBuilder.java


示例4: toXacmlAttribute

import org.apache.xerces.dom.ElementNSImpl; //导入依赖的package包/类
/**
 * Create the subject for the HERAS Request out of the SAML Assertion's attributes
 * The data type is always the AnyURIDataType, except the attribute value is true or false, then we set it to BooleanDataType.
 * If other data types are used in the preference's target subjects, this will lead to deny. 
 * @param a - the attribute
 * @return a HERAS Subject
 */
private org.herasaf.xacml.core.context.impl.SubjectType toXacmlAttribute(AttributeType a) {
	SubjectType subjectDcId = ofHerasContext.createSubjectType();
	org.herasaf.xacml.core.context.impl.AttributeType attributeType = ofHerasContext.createAttributeType();
	AttributeValueType attributeValue = ofHerasContext.createAttributeValueType();
	attributeType.setAttributeId(a.getName());
	// issuer is optional
	attributeType.setIssuer(this.issuer.getValue());
	
	//FIXME maybe problem with the datatype, but there is no way to guess it
	attributeType.setDataType(new AnyURIDataTypeAttribute());
	ElementNSImpl attrValue = (ElementNSImpl) a.getAttributeValue().get(0);
	String value = attrValue.getFirstChild().getNodeValue();
	attributeValue.getContent().add(value);
	if(value.equalsIgnoreCase("true") || value.equalsIgnoreCase("false")) {
		attributeType.setDataType(new BooleanDataTypeAttribute());
	}

	attributeType.getAttributeValues().add(attributeValue);
	subjectDcId.getAttributes().add(attributeType);
	return subjectDcId;
}
 
开发者ID:fdicerbo,项目名称:fiware-ppl,代码行数:29,代码来源:PDPRequest.java


示例5: getEnterpriseArchive

import org.apache.xerces.dom.ElementNSImpl; //导入依赖的package包/类
public ElementNSImpl getEnterpriseArchive() {
	List<Object> any = this.repository.getAny();
	if (any != null && any.size() > 0) {
		ElementNSImpl e = (ElementNSImpl) any.get(0);
		if (e.getLocalName().equals("enterpriseArchive")) {
			return e;
		}
	}

	return null;
}
 
开发者ID:fastconnect,项目名称:tibco-bwmaven,代码行数:12,代码来源:ArchiveBuilder.java


示例6: getFirstProcessArchive

import org.apache.xerces.dom.ElementNSImpl; //导入依赖的package包/类
private ElementNSImpl getFirstProcessArchive() {
	ElementNSImpl enterpriseArchive = this.getEnterpriseArchive();

	if (enterpriseArchive != null) {
		NodeList processArchives = enterpriseArchive.getElementsByTagName("processArchive");
		if (processArchives != null && processArchives.getLength() > 0) {
			return (ElementNSImpl) enterpriseArchive.getElementsByTagName("processArchive").item(0); // first one
		}		
	}

	return null;
}
 
开发者ID:fastconnect,项目名称:tibco-bwmaven,代码行数:13,代码来源:ArchiveBuilder.java


示例7: getSharedArchive

import org.apache.xerces.dom.ElementNSImpl; //导入依赖的package包/类
public ElementNSImpl getSharedArchive() {
	ElementNSImpl enterpriseArchive = this.getEnterpriseArchive();

	if (enterpriseArchive != null) {
		NodeList sharedArchive = enterpriseArchive.getElementsByTagName("sharedArchive");
		if (sharedArchive != null && sharedArchive.getLength() > 0) {
			return (ElementNSImpl) enterpriseArchive.getElementsByTagName("sharedArchive").item(0); // only one sharedArchive is allowed
		}
	}

	return null;
}
 
开发者ID:fastconnect,项目名称:tibco-bwmaven,代码行数:13,代码来源:ArchiveBuilder.java


示例8: setAttribute

import org.apache.xerces.dom.ElementNSImpl; //导入依赖的package包/类
protected void setAttribute(ElementNSImpl element, String attributeName, String textContent) {
	if (element != null) {
		Attr attribute = element.getAttributeNode(attributeName);

		if (attribute != null) {
			attribute.setTextContent(textContent);
		}
	}
}
 
开发者ID:fastconnect,项目名称:tibco-bwmaven,代码行数:10,代码来源:ArchiveBuilder.java


示例9: importSource

import org.apache.xerces.dom.ElementNSImpl; //导入依赖的package包/类
private void importSource(ElementNSImpl source){
    NodeList children = (NodeList) source.getChildNodes();
    for (int i = 0; i < children.getLength(); i++){
        HashMap<String,String> map = new HashMap();
        for (int j = 0; j < children.item(i).getChildNodes().getLength(); j++){
            for(int k = 0; k < children.item(i).getChildNodes().item(j).getChildNodes().getLength(); k+=2){
                map.put(
                    (String)children.item(i).getChildNodes().item(j).getChildNodes().item(k).getTextContent(), //key
                    (String)children.item(i).getChildNodes().item(j).getChildNodes().item(k+1).getTextContent() //value
                );
            } 
        }
        this.items.add(map);
    }
}
 
开发者ID:mpi2,项目名称:exportlibrary,代码行数:16,代码来源:ArrayOfHashOfString.java


示例10: importSource

import org.apache.xerces.dom.ElementNSImpl; //导入依赖的package包/类
private void importSource(ElementNSImpl source) {
    NodeList children = (NodeList) source.getChildNodes();
    for (int i = 0; i < children.getLength(); i++) {
        for (int j = 0; j < children.item(i).getChildNodes().getLength(); j += 2) {
            items.put(
                    (String) children.item(i).getChildNodes().item(j).getTextContent(), //key
                    (String) children.item(i).getChildNodes().item(j + 1).getTextContent() //value
                    );
        }
    }
}
 
开发者ID:mpi2,项目名称:exportlibrary,代码行数:12,代码来源:HashOfString.java


示例11: merge

import org.apache.xerces.dom.ElementNSImpl; //导入依赖的package包/类
public void merge(ArchiveBuilder archiveBuilder) {
	ElementNSImpl mergedEnterpriseArchive = this.getEnterpriseArchive();
	ElementNSImpl enterpriseArchive = archiveBuilder.getEnterpriseArchive();
	
	if (mergedEnterpriseArchive == null) {
		this.repository.getAny().add(enterpriseArchive);
		return;
	}

	@SuppressWarnings("unchecked")
	List<ElementNSImpl> elements = (List<ElementNSImpl>)(Object) archiveBuilder.repository.getAny(); // dirty
	
	for (ElementNSImpl e : elements) {
		if (e.getLocalName().equals("enterpriseArchive")) {
			// merged elements
			ElementNSImpl mergedProcessArchive = getElement(mergedEnterpriseArchive, "processArchive");
			ElementNSImpl mergedProcessProperty = getElement(mergedProcessArchive, "processProperty");

			// look for processArchive elements to merge
			ElementNSImpl nodes = (ElementNSImpl) e.getChildNodes();
			for (int i = 0; i < nodes.getLength(); i++) {
				Node o = nodes.item(i);
				if (!o.getClass().getName().equals("org.apache.xerces.dom.ElementNSImpl")) continue;
				ElementNSImpl n = (ElementNSImpl) o;
			    if (n != null && "processArchive".equals(n.getLocalName())) {
			    	// current project elements
			    	ElementNSImpl processArchive = (ElementNSImpl) n;
			    	ElementNSImpl processProperty = (ElementNSImpl) processArchive.getElementsByTagName("processProperty").item(0);
					
					String newContent = processProperty.getTextContent();
					String oldContent = mergedProcessProperty.getTextContent();
					if (newContent != null && !newContent.isEmpty()) {
						if (oldContent != null && !oldContent.isEmpty()) {
							newContent = oldContent + "," + newContent;
						}
						mergedProcessProperty.setTextContent(newContent);
					}
			    }
			}
		}
	}		
}
 
开发者ID:fastconnect,项目名称:tibco-bwmaven,代码行数:43,代码来源:ArchiveBuilder.java


示例12: ArrayOfHashOfString

import org.apache.xerces.dom.ElementNSImpl; //导入依赖的package包/类
/**
 * constructor
 */
public ArrayOfHashOfString(ElementNSImpl source){
    setSource(source);
}
 
开发者ID:mpi2,项目名称:exportlibrary,代码行数:7,代码来源:ArrayOfHashOfString.java


示例13: setSource

import org.apache.xerces.dom.ElementNSImpl; //导入依赖的package包/类
public final void setSource(ElementNSImpl source){
    this.source = source;
    importSource(this.source);
}
 
开发者ID:mpi2,项目名称:exportlibrary,代码行数:5,代码来源:ArrayOfHashOfString.java


示例14: HashOfString

import org.apache.xerces.dom.ElementNSImpl; //导入依赖的package包/类
/**
 * constructor
 */
public HashOfString(ElementNSImpl source) {
    setSource(source);
}
 
开发者ID:mpi2,项目名称:exportlibrary,代码行数:7,代码来源:HashOfString.java


示例15: setSource

import org.apache.xerces.dom.ElementNSImpl; //导入依赖的package包/类
public final void setSource(ElementNSImpl source) {
    this.source = source;
    importSource(this.source);
}
 
开发者ID:mpi2,项目名称:exportlibrary,代码行数:5,代码来源:HashOfString.java


示例16: createElementNS

import org.apache.xerces.dom.ElementNSImpl; //导入依赖的package包/类
/**
 * Creates an <code>ElementNSImpl</code> object inside a
 * <code>Document</code> object. The namespace associated with the
 * object is specific to EPP.
 *
 * @param doc <code>Document</code> object in which the new element
 *            to be created.
 * @param ns  The namespace of the new element to be created.
 * @param tag The tag name of the new element to be created.
 *
 * @return an <code>ElementNSImpl</code> object
 */
public static ElementNSImpl createElementNS( Document doc, String ns, String tag )
{
	return createElementNS(doc, ns, tag, true);
}
 
开发者ID:neustar,项目名称:registrar_toolkit,代码行数:17,代码来源:EppUtil.java



注:本文中的org.apache.xerces.dom.ElementNSImpl类示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
Java EntityManager类代码示例发布时间:2022-05-22
下一篇:
Java StringCredentialsImpl类代码示例发布时间:2022-05-22
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap