热门标签 | HotTags
当前位置:  开发笔记 > 编程语言 > 正文

org.apache.woden.XMLElement.getSource()方法的使用及代码示例

本文整理了Java中org.apache.woden.XMLElement.getSource()方法的一些代码示例,展示了XMLElement.getSo

本文整理了Java中org.apache.woden.XMLElement.getSource()方法的一些代码示例,展示了XMLElement.getSource()的具体用法。这些代码示例主要来源于Github/Stackoverflow/Maven等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。XMLElement.getSource()方法的具体详情如下:
包路径:org.apache.woden.XMLElement
类名称:XMLElement
方法名:getSource

XMLElement.getSource介绍

[英]Returns an Object representing an XML element, which the caller must cast to the expected type. For example, for DOM implementation we might cast it to an org.w3c.dom.Element whereas an AXIOM implementation might cast it to an org.apache.axiom.om.OMElement.
[中]返回一个表示XML元素的对象,调用方必须将其转换为预期类型。例如,对于DOM实现,我们可以将其转换为一个组织。w3c。多姆。元素,而AXIOM实现可能会将其强制转换为组织。阿帕奇。公理嗯。OMElement。

代码示例

代码示例来源:origin: org.apache.woden/woden-impl-dom

public boolean testElementShorthand(XMLElement element, String shorthand) {
//Simple http://www.w3.org/TR/xml-id/ support for now until we support full scheme based ID's.
Element domElement = (Element)element.getSource();
String attr = domElement.getAttributeNS("http://www.w3.org/XML/1998/namespace", "id");
return attr != null && attr.equals(shorthand);
}

代码示例来源:origin: org.apache.woden/woden-core

public boolean testElementShorthand(XMLElement element, String shorthand) {
//Simple http://www.w3.org/TR/xml-id/ support for now until we support full scheme based ID's.
Element domElement = (Element)element.getSource();
String attr = domElement.getAttributeNS("http://www.w3.org/XML/1998/namespace", "id");
return attr != null && attr.equals(shorthand);
}

代码示例来源:origin: org.apache.woden/woden-core

private String getAttributeNS (XMLElement xmlElement,
String namespaceURI,
String localPart) {
String sRet = null;
if (xmlElement.getSource() instanceof Element){
Element el = (Element)xmlElement.getSource();
Attr attr = el.getAttributeNodeNS (namespaceURI, localPart);
if (attr != null) {
sRet = attr.getValue ();
}
}
return sRet;
}

代码示例来源:origin: org.apache.woden/woden-api

private String getAttributeNS (XMLElement xmlElement,
String namespaceURI,
String localPart) {
String sRet = null;
if (xmlElement.getSource() instanceof Element){
Element el = (Element)xmlElement.getSource();
Attr attr = el.getAttributeNodeNS (namespaceURI, localPart);
if (attr != null) {
sRet = attr.getValue ();
}
}
return sRet;
}

代码示例来源:origin: org.apache.woden/woden-impl-om

public boolean testElementShorthand(XMLElement element, String shorthand) {
// Simple http://www.w3.org/TR/xml-id/ support for now until we support full scheme based ID's.
OMElement omElement = (OMElement)element.getSource();
String attr = omElement.getAttributeValue(new QName("http://www.w3.org/XML/1998/namespace", "id"));
return attr != null && attr.equals(shorthand);
}

代码示例来源:origin: org.apache.woden/woden-impl-om

/**
* Evaluates the XPointer on the root Element and returns the resulting
* Element or null.
*
* @return an Element from the resultant evaluation of the root Element or
* null if evaluation fails.
*/
public OMElement evaluateElement() {
XMLElement element = evaluate();
if (element != null) return (OMElement) element.getSource();
return null;
}

代码示例来源:origin: org.apache.woden/woden-impl-dom

/**
* Evaluates the XPointer on the root Element and returns the resulting Element or null.
*
* @return an Element from the resultant evaluation of the root Element or null if evaluation fails.
*/
public Element evaluateElement(){
XMLElement element = evaluate();
if (element != null) return (Element)element.getSource();
return null;
}

代码示例来源:origin: org.apache.woden/woden-core

/**
* Evaluates the XPointer on the root Element and returns the resulting Element or null.
*
* @return an Element from the resultant evaluation of the root Element or null if evaluation fails.
*/
public Element evaluateElement(){
XMLElement element = evaluate();
if (element != null) return (Element)element.getSource();
return null;
}

代码示例来源:origin: org.apache.woden/woden-core

throws WSDLException
Element domEl = (Element)extEl.getSource();
NamedNodeMap nodeMap = domEl.getAttributes();
int length = nodeMap.getLength();

代码示例来源:origin: org.apache.woden/woden-impl-dom

protected void parseNamespaceDeclarations(XMLElement xmlElem, WSDLElement wsdlElem)
throws WSDLException {
Element elem = (Element)xmlElem.getSource();

NamedNodeMap attrs = elem.getAttributes();
int size = attrs.getLength();
for (int i = 0; i {
Attr attr = (Attr)attrs.item(i);
String namespaceURI = attr.getNamespaceURI();
String localPart = attr.getLocalName();
String value = attr.getValue();
if ((Constants.NS_STRING_XMLNS).equals(namespaceURI))
{
if (!(Constants.ATTR_XMLNS).equals(localPart))
{
wsdlElem.addNamespace(localPart, getURI(value)); //a prefixed namespace
}
else
{
wsdlElem.addNamespace(null, getURI(value)); //the default namespace
}
}
}
}

代码示例来源:origin: org.apache.woden/woden-core

protected void parseNamespaceDeclarations(XMLElement xmlElem, WSDLElement wsdlElem)
throws WSDLException {
Element elem = (Element)xmlElem.getSource();

NamedNodeMap attrs = elem.getAttributes();
int size = attrs.getLength();
for (int i = 0; i {
Attr attr = (Attr)attrs.item(i);
String namespaceURI = attr.getNamespaceURI();
String localPart = attr.getLocalName();
String value = attr.getValue();
if ((Constants.NS_STRING_XMLNS).equals(namespaceURI))
{
if (!(Constants.ATTR_XMLNS).equals(localPart))
{
wsdlElem.addNamespace(localPart, getURI(value)); //a prefixed namespace
}
else
{
wsdlElem.addNamespace(null, getURI(value)); //the default namespace
}
}
}
}

代码示例来源:origin: org.apache.woden/woden-core

Object o = docEle.getContent().getSource();
org.w3c.dom.Element domEl = (org.w3c.dom.Element)o;

代码示例来源:origin: org.apache.woden/woden-core

/**
* Serialize the InlinedSchemas of the WSDL element model.
*
* @param inlinedSchema an array of InlinedSchemas.
* @param des corresponding DescriptionElement.
* @param pw the Writer to write the xml to.
*/
protected void printInlinedSchemas(InlinedSchema[] inlinedSchema,
DescriptionElement des,
PrintWriter pw)
throws WSDLException
{
/* previous method
*
* XmlSchema xs=null;
// TODO used XmlSchema serialiser.Cause extra info like
// attributeFormDefault="unqualified" elementFormDefault="unqualified" ..etc
for(int i=0;i xs=inlinedSchema[i].getSchemaDefinition();
xs.write(pw);
}*/
for(int i=0;i InlinedSchema schema=inlinedSchema[i];
XMLElement ele=schema.getXMLElement();
DOM2Writer.serializeAsXML(((Node)ele.getSource()), pw);
}
}

代码示例来源:origin: org.apache.woden/woden-impl-om

OMElement cOntextEl= (OMElement)fContextElement.getSource();
OMElement typesEl = (OMElement)contextEl.getParent();
Iterator inlineSchemas = typesEl.

代码示例来源:origin: org.apache.woden/woden-impl-om

pw.print(" <" + tagName);
pw.println('>');
Object o = docEle.getContent().getSource();
OMElement omEl = (OMElement)o;
pw.println(((OMText)omEl.getFirstOMChild()).getText());

代码示例来源:origin: org.apache.woden/woden-impl-om

/**
* Serialize the InlinedSchemas of the WSDL element model.
*
* @param inlinedSchema an array of InlinedSchemas.
* @param des corresponding DescriptionElement.
* @param pw the Writer to write the xml to.
*/
protected void printInlinedSchemas(InlinedSchema[] inlinedSchema,
DescriptionElement des,
PrintWriter pw)
throws WSDLException
{
/*
* previous method
*
* XmlSchema xs=null;
* like // attributeFormDefault="unqualified"
* elementFormDefault="unqualified" ..etc for(int i=0;i * xs=inlinedSchema[i].getSchemaDefinition(); xs.write(pw); }
*/
for (int i = 0; i InlinedSchema schema = inlinedSchema[i];
XMLElement ele = schema.getXMLElement();
OMWriter.serializeAsXML((OMNode)ele.getSource(), pw);
}
}

代码示例来源:origin: org.apache.woden/woden-impl-dom

/**
* Serialize the InlinedSchemas of the WSDL element model.
*
* @param inlinedSchema an array of InlinedSchemas.
* @param des corresponding DescriptionElement.
* @param pw the Writer to write the xml to.
*/
protected void printInlinedSchemas(InlinedSchema[] inlinedSchema,
DescriptionElement des,
PrintWriter pw)
throws WSDLException
{
/* previous method
*
* XmlSchema xs=null;
// TODO used XmlSchema serialiser.Cause extra info like
// attributeFormDefault="unqualified" elementFormDefault="unqualified" ..etc
for(int i=0;i xs=inlinedSchema[i].getSchemaDefinition();
xs.write(pw);
}*/
for(int i=0;i InlinedSchema schema=inlinedSchema[i];
XMLElement ele=schema.getXMLElement();
DOM2Writer.serializeAsXML(((Node)ele.getSource()), pw);
}
}

代码示例来源:origin: apache/axis2-java

/**
* Adds documentation details to a given AxisDescription.
* The documentation details is extracted from the WSDL element given.
* @param axisDescription - The documentation will be added to this
* @param element - The element that the documentation is extracted from.
*/
private void addDocumentation(AxisDescription axisDescription, DocumentableElement element) {
DocumentationElement[] documentatiOnElements= element.getDocumentationElements();
String documentation = "";
for (int i = 0; i DocumentationElement documentatiOnElement= documentationElements[i];
XMLElement cOntentElement= documentationElement.getContent();
Element cOntent= (Element)contentElement.getSource();
if (content != null) {
documentation = documentation + DOM2Writer.nodeToString(content.getFirstChild());
}
}
if (!"".equals(documentation)) {
axisDescription.setDocumentation(documentation);
}
}

代码示例来源:origin: org.apache.axis2/axis2-kernel

/**
* Adds documentation details to a given AxisDescription.
* The documentation details is extracted from the WSDL element given.
* @param axisDescription - The documentation will be added to this
* @param element - The element that the documentation is extracted from.
*/
private void addDocumentation(AxisDescription axisDescription, DocumentableElement element) {
DocumentationElement[] documentatiOnElements= element.getDocumentationElements();
String documentation = "";
for (int i = 0; i DocumentationElement documentatiOnElement= documentationElements[i];
XMLElement cOntentElement= documentationElement.getContent();
Element cOntent= (Element)contentElement.getSource();
if (content != null) {
documentation = documentation + DOM2Writer.nodeToString(content.getFirstChild());
}
}
if (!"".equals(documentation)) {
axisDescription.setDocumentation(documentation);
}
}

代码示例来源:origin: org.apache.woden/woden-impl-om

protected void parseNamespaceDeclarations(
XMLElement xmlElem,
WSDLElement wsdlElem)
throws WSDLException {
OMElement omDescription = (OMElement)xmlElem.getSource();

Iterator namespaces = omDescription.getAllDeclaredNamespaces();
while(namespaces.hasNext()){
OMNamespace namespace = (OMNamespace)namespaces.next();
String localPart = namespace.getPrefix();
String value = namespace.getNamespaceURI();
if (!(Constants.ATTR_XMLNS).equals(localPart)){
wsdlElem.addNamespace(localPart, getURI(value)); //a prefixed namespace
}
else{
wsdlElem.addNamespace(null, getURI(value)); //the default namespace
}
}
}

推荐阅读
  • 本文介绍了Python爬虫技术基础篇面向对象高级编程(中)中的多重继承概念。通过继承,子类可以扩展父类的功能。文章以动物类层次的设计为例,讨论了按照不同分类方式设计类层次的复杂性和多重继承的优势。最后给出了哺乳动物和鸟类的设计示例,以及能跑、能飞、宠物类和非宠物类的增加对类数量的影响。 ... [详细]
  • Nginx使用(server参数配置)
    本文介绍了Nginx的使用,重点讲解了server参数配置,包括端口号、主机名、根目录等内容。同时,还介绍了Nginx的反向代理功能。 ... [详细]
  • 本文分享了一个关于在C#中使用异步代码的问题,作者在控制台中运行时代码正常工作,但在Windows窗体中却无法正常工作。作者尝试搜索局域网上的主机,但在窗体中计数器没有减少。文章提供了相关的代码和解决思路。 ... [详细]
  • 如何使用Java获取服务器硬件信息和磁盘负载率
    本文介绍了使用Java编程语言获取服务器硬件信息和磁盘负载率的方法。首先在远程服务器上搭建一个支持服务端语言的HTTP服务,并获取服务器的磁盘信息,并将结果输出。然后在本地使用JS编写一个AJAX脚本,远程请求服务端的程序,得到结果并展示给用户。其中还介绍了如何提取硬盘序列号的方法。 ... [详细]
  • 本文由编程笔记小编整理,主要介绍了使用Junit和黄瓜进行自动化测试中步骤缺失的问题。文章首先介绍了使用cucumber和Junit创建Runner类的代码,然后详细说明了黄瓜功能中的步骤和Steps类的实现。本文对于需要使用Junit和黄瓜进行自动化测试的开发者具有一定的参考价值。摘要长度:187字。 ... [详细]
  • 重入锁(ReentrantLock)学习及实现原理
    本文介绍了重入锁(ReentrantLock)的学习及实现原理。在学习synchronized的基础上,重入锁提供了更多的灵活性和功能。文章详细介绍了重入锁的特性、使用方法和实现原理,并提供了类图和测试代码供读者参考。重入锁支持重入和公平与非公平两种实现方式,通过对比和分析,读者可以更好地理解和应用重入锁。 ... [详细]
  • NotSupportedException无法将类型“System.DateTime”强制转换为类型“System.Object”
    本文介绍了在使用LINQ to Entities时出现的NotSupportedException异常,该异常是由于无法将类型“System.DateTime”强制转换为类型“System.Object”所导致的。同时还介绍了相关的错误信息和解决方法。 ... [详细]
  • 本文介绍了RxJava在Android开发中的广泛应用以及其在事件总线(Event Bus)实现中的使用方法。RxJava是一种基于观察者模式的异步java库,可以提高开发效率、降低维护成本。通过RxJava,开发者可以实现事件的异步处理和链式操作。对于已经具备RxJava基础的开发者来说,本文将详细介绍如何利用RxJava实现事件总线,并提供了使用建议。 ... [详细]
  • 本文介绍了Java集合库的使用方法,包括如何方便地重复使用集合以及下溯造型的应用。通过使用集合库,可以方便地取用各种集合,并将其插入到自己的程序中。为了使集合能够重复使用,Java提供了一种通用类型,即Object类型。通过添加指向集合的对象句柄,可以实现对集合的重复使用。然而,由于集合只能容纳Object类型,当向集合中添加对象句柄时,会丢失其身份或标识信息。为了恢复其本来面貌,可以使用下溯造型。本文还介绍了Java 1.2集合库的特点和优势。 ... [详细]
  • Centos7搭建ELK(Elasticsearch、Logstash、Kibana)教程及注意事项
    本文介绍了在Centos7上搭建ELK(Elasticsearch、Logstash、Kibana)的详细步骤,包括下载安装包、安装Elasticsearch、创建用户、修改配置文件等。同时提供了使用华为镜像站下载安装包的方法,并强调了保证版本一致的重要性。 ... [详细]
  • 本文分析了Wince程序内存和存储内存的分布及作用。Wince内存包括系统内存、对象存储和程序内存,其中系统内存占用了一部分SDRAM,而剩下的30M为程序内存和存储内存。对象存储是嵌入式wince操作系统中的一个新概念,常用于消费电子设备中。此外,文章还介绍了主电源和后备电池在操作系统中的作用。 ... [详细]
  • Netty源代码分析服务器端启动ServerBootstrap初始化
    本文主要分析了Netty源代码中服务器端启动的过程,包括ServerBootstrap的初始化和相关参数的设置。通过分析NioEventLoopGroup、NioServerSocketChannel、ChannelOption.SO_BACKLOG等关键组件和选项的作用,深入理解Netty服务器端的启动过程。同时,还介绍了LoggingHandler的作用和使用方法,帮助读者更好地理解Netty源代码。 ... [详细]
  • 本文介绍了如何使用MATLAB调用摄像头进行人脸检测和识别。首先需要安装扩展工具,并下载安装OS Generic Video Interface。然后使用MATLAB的机器视觉工具箱中的VJ算法进行人脸检测,可以直接调用CascadeObjectDetector函数进行检测。同时还介绍了如何调用摄像头进行人脸识别,并对每一帧图像进行识别。最后,给出了一些相关的参考资料和实例。 ... [详细]
  • Spring特性实现接口多类的动态调用详解
    本文详细介绍了如何使用Spring特性实现接口多类的动态调用。通过对Spring IoC容器的基础类BeanFactory和ApplicationContext的介绍,以及getBeansOfType方法的应用,解决了在实际工作中遇到的接口及多个实现类的问题。同时,文章还提到了SPI使用的不便之处,并介绍了借助ApplicationContext实现需求的方法。阅读本文,你将了解到Spring特性的实现原理和实际应用方式。 ... [详细]
  • Java学习笔记之面向对象编程(OOP)
    本文介绍了Java学习笔记中的面向对象编程(OOP)内容,包括OOP的三大特性(封装、继承、多态)和五大原则(单一职责原则、开放封闭原则、里式替换原则、依赖倒置原则)。通过学习OOP,可以提高代码复用性、拓展性和安全性。 ... [详细]
author-avatar
此恨缠绵_793
这个家伙很懒,什么也没留下!
PHP1.CN | 中国最专业的PHP中文社区 | DevBox开发工具箱 | json解析格式化 |PHP资讯 | PHP教程 | 数据库技术 | 服务器技术 | 前端开发技术 | PHP框架 | 开发工具 | 在线工具
Copyright © 1998 - 2020 PHP1.CN. All Rights Reserved | 京公网安备 11010802041100号 | 京ICP备19059560号-4 | PHP1.CN 第一PHP社区 版权所有