- 使用 Spring Initializr 创建 Spring Boot 应用程序
- 在Spring Boot中配置Cassandra
- 在 Spring Boot 上配置 Tomcat 连接池
- 将Camel消息路由到嵌入WildFly的Artemis上
本文整理了Java中com.google.gdata.util.common.xml.XmlNamespace.getAlias()
方法的一些代码示例,展示了XmlNamespace.getAlias()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。XmlNamespace.getAlias()
方法的具体详情如下:
包路径:com.google.gdata.util.common.xml.XmlNamespace
类名称:XmlNamespace
方法名:getAlias
[英]Returns the prefix alias for the namespace or null if undefined.
[中]返回命名空间的前缀别名,如果未定义,则返回null。
代码示例来源:origin: com.google.gdata/gdata-core-1.0
/**
* Returns the namespace URI associated with a given namespace alias.
*
* @param nsAlias namespace alias, or {@code null} for default namespace.
* @return namespace URI, or {@code null} if not found.
*/
protected String getNamespaceUri(String nsAlias) {
if (nsAlias == null) {
return defaultNamespace;
}
// Walk the stack from the top to find an element with this ns alias.
for (int i = elementStack.size() - 1; i >= 0; --i) {
Element element = elementStack.get(i);
for (XmlNamespace ns : element.nsDecls) {
if (ns.getAlias().equals(nsAlias)) {
return ns.getUri();
}
}
}
return null;
}
代码示例来源:origin: com.mulesoft.google/google-api-gdata
/**
* Returns the namespace URI associated with a given namespace alias.
*
* @param nsAlias namespace alias, or {@code null} for default namespace.
* @return namespace URI, or {@code null} if not found.
*/
protected String getNamespaceUri(String nsAlias) {
if (nsAlias == null) {
return defaultNamespace;
}
// Walk the stack from the top to find an element with this ns alias.
for (int i = elementStack.size() - 1; i >= 0; --i) {
Element element = elementStack.get(i);
for (XmlNamespace ns : element.nsDecls) {
if (ns.getAlias().equals(nsAlias)) {
return ns.getUri();
}
}
}
return null;
}
代码示例来源:origin: com.google.gdata/gdata-java-client
/**
* Returns the namespace URI associated with a given namespace alias.
*
* @param nsAlias namespace alias, or {@code null} for default namespace.
* @return namespace URI, or {@code null} if not found.
*/
protected String getNamespaceUri(String nsAlias) {
if (nsAlias == null) {
return defaultNamespace;
}
// Walk the stack from the top to find an element with this ns alias.
for (int i = elementStack.size() - 1; i >= 0; --i) {
Element element = elementStack.get(i);
for (XmlNamespace ns : element.nsDecls) {
if (ns.getAlias().equals(nsAlias)) {
return ns.getUri();
}
}
}
return null;
}
代码示例来源:origin: com.google.gdata/gdata-core-1.0
@Override
public String toString() {
if (getNs() == null || "".equals(getNs().getAlias())) {
return getLocalName();
}
return getNs().getAlias() + ":" + getLocalName();
}
代码示例来源:origin: com.mulesoft.google/google-api-gdata
@Override
public String toString() {
if (getNs() == null || "".equals(getNs().getAlias())) {
return getLocalName();
}
return getNs().getAlias() + ":" + getLocalName();
}
代码示例来源:origin: com.google.gdata/gdata-java-client
@Override
public String toString() {
if (getNs() == null || "".equals(getNs().getAlias())) {
return getLocalName();
}
return getNs().getAlias() + ":" + getLocalName();
}
代码示例来源:origin: com.mulesoft.google/google-api-gdata
/**
* Add a qualified name to the map by URI. Only the first namespace with a
* given URI is added to the map.
*/
private static void addNamespace(Map<String, XmlNamespace> namespaces,
QName name) {
if (name == null) {
return;
}
XmlNamespace ns = name.getNs();
if (ns == null) {
return;
}
String alias = ns.getAlias();
if (alias == null) {
return;
}
String uri = ns.getUri();
if (namespaces.containsKey(uri)) {
return;
}
namespaces.put(uri, ns);
}
}
代码示例来源:origin: com.google.gdata/gdata-core-1.0
/**
* Add a qualified name to the map by URI. Only the first namespace with a
* given URI is added to the map.
*/
private static void addNamespace(Map<String, XmlNamespace> namespaces,
QName name) {
if (name == null) {
return;
}
XmlNamespace ns = name.getNs();
if (ns == null) {
return;
}
String alias = ns.getAlias();
if (alias == null) {
return;
}
String uri = ns.getUri();
if (namespaces.containsKey(uri)) {
return;
}
namespaces.put(uri, ns);
}
}
代码示例来源:origin: com.google.gdata/gdata-java-client
/**
* Add a qualified name to the map by URI. Only the first namespace with a
* given URI is added to the map.
*/
private static void addNamespace(Map<String, XmlNamespace> namespaces,
QName name) {
if (name == null) {
return;
}
XmlNamespace ns = name.getNs();
if (ns == null) {
return;
}
String alias = ns.getAlias();
if (alias == null) {
return;
}
String uri = ns.getUri();
if (namespaces.containsKey(uri)) {
return;
}
namespaces.put(uri, ns);
}
}
代码示例来源:origin: com.mulesoft.google/google-api-gdata
namespaces.add(new XmlNamespace(blobNs.getAlias(),
blobNs.getUri()));
代码示例来源:origin: com.google.gdata/gdata-core-1.0
namespaces.add(new XmlNamespace(blobNs.getAlias(),
blobNs.getUri()));
代码示例来源:origin: com.google.gdata/gdata-java-client
namespaces.add(new XmlNamespace(blobNs.getAlias(),
blobNs.getUri()));
代码示例来源:origin: com.google.gdata/gdata-core-1.0
nsAttrs.add(new Attribute("alias", namespace.getAlias()));
nsAttrs.add(new Attribute("uri", namespace.getUri()));
w.simpleElement(Namespaces.gdataConfigNs, "namespaceDescription",
代码示例来源:origin: com.google.gdata/gdata-java-client
/**
* Get a list of attributes for the given element.
*/
protected List<XmlWriter.Attribute> getAttributes(Element e,
ElementMetadata<?, ?> metadata) {
List<XmlWriter.Attribute> attrs = null;
Iterator<Attribute> attributeIterator = e.getAttributeIterator(metadata);
if (attributeIterator.hasNext()) {
ElementKey<?, ?> key = e.getElementKey();
attrs = new ArrayList<XmlWriter.Attribute>();
while (attributeIterator.hasNext()) {
Attribute attribute = attributeIterator.next();
AttributeKey<?> attKey = attribute.getAttributeKey();
AttributeMetadata<?> attMeta = (metadata == null) ? null
: metadata.bindAttribute(attKey);
QName qName = attMeta != null ? attMeta.getName() : attKey.getId();
String alias = (qName.getNs() != null) ?
qName.getNs().getAlias() : null;
attrs.add(new XmlWriter.Attribute(alias, qName.getLocalName(),
attribute.getValue().toString()));
}
}
return attrs;
}
代码示例来源:origin: com.google.gdata/gdata-core-1.0
/**
* Get a list of attributes for the given element.
*/
protected List<XmlWriter.Attribute> getAttributes(Element e,
ElementMetadata<?, ?> metadata) {
List<XmlWriter.Attribute> attrs = null;
Iterator<Attribute> attributeIterator = e.getAttributeIterator(metadata);
if (attributeIterator.hasNext()) {
ElementKey<?, ?> key = e.getElementKey();
attrs = new ArrayList<XmlWriter.Attribute>();
while (attributeIterator.hasNext()) {
Attribute attribute = attributeIterator.next();
AttributeKey<?> attKey = attribute.getAttributeKey();
AttributeMetadata<?> attMeta = (metadata == null) ? null
: metadata.bindAttribute(attKey);
QName qName = attMeta != null ? attMeta.getName() : attKey.getId();
String alias = (qName.getNs() != null) ?
qName.getNs().getAlias() : null;
attrs.add(new XmlWriter.Attribute(alias, qName.getLocalName(),
attribute.getValue().toString()));
}
}
return attrs;
}
代码示例来源:origin: com.mulesoft.google/google-api-gdata
/**
* Get a list of attributes for the given element.
*/
protected List<XmlWriter.Attribute> getAttributes(Element e,
ElementMetadata<?, ?> metadata) {
List<XmlWriter.Attribute> attrs = null;
Iterator<Attribute> attributeIterator = e.getAttributeIterator(metadata);
if (attributeIterator.hasNext()) {
ElementKey<?, ?> key = e.getElementKey();
attrs = new ArrayList<XmlWriter.Attribute>();
while (attributeIterator.hasNext()) {
Attribute attribute = attributeIterator.next();
AttributeKey<?> attKey = attribute.getAttributeKey();
AttributeMetadata<?> attMeta = (metadata == null) ? null
: metadata.bindAttribute(attKey);
QName qName = attMeta != null ? attMeta.getName() : attKey.getId();
String alias = (qName.getNs() != null) ?
qName.getNs().getAlias() : null;
attrs.add(new XmlWriter.Attribute(alias, qName.getLocalName(),
attribute.getValue().toString()));
}
}
return attrs;
}
代码示例来源:origin: com.google.gdata/gdata-core-1.0
if (declaredNs.getAlias().equals(nsValue) ||
declaredNs.getUri().equals(nsValue)) {
namespace = declaredNs;
代码示例来源:origin: com.mulesoft.google/google-api-gdata
XmlNamespace newNs = new XmlNamespace(ns.getAlias(), ns.getUri());
if (!namespaces.contains(newNs)) {
namespaces.add(newNs);
代码示例来源:origin: com.google.gdata/gdata-java-client
XmlNamespace newNs = new XmlNamespace(ns.getAlias(), ns.getUri());
if (!namespaces.contains(newNs)) {
namespaces.add(newNs);
代码示例来源:origin: com.google.gdata/gdata-core-1.0
XmlNamespace newNs = new XmlNamespace(ns.getAlias(), ns.getUri());
if (!namespaces.contains(newNs)) {
namespaces.add(newNs);
本文整理了Java中com.google.gdata.util.common.xml.XmlNamespace.getAlias()方法的一些代码示例,展示了XmlNamespace.getAlias
我正在按照 AWS CodeStar 文档中的无服务器项目教程,使用通过 Python 3.7 Lambda 模板创建的基本项目来探索 CodeStar: https://docs.aws.amazo
Laravel 版本:5.6.16 PHP 版本:7.2.3 数据库驱动程序和版本:不适用 描述: laravel\framework\src\Illuminate\Container\Contain
我是一名优秀的程序员,十分优秀!