本文整理了Java中nu.xom.Attribute.getLocalName()
方法的一些代码示例,展示了Attribute.getLocalName()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Attribute.getLocalName()
方法的具体详情如下:
包路径:nu.xom.Attribute
类名称:Attribute
方法名:getLocalName
[英]Returns the local name of this attribute, not including the prefix.
[中]返回此属性的本地名称,不包括前缀。
代码示例来源:origin: org.xml-cml/cmlxom
/**
* from DOM.
*
* @param att
*/
public StringArraySTAttribute(Attribute att) {
this(att.getLocalName());
this.setCMLValue(att.getValue());
}
代码示例来源:origin: org.xml-cml/cmlxom
/**
* from DOM.
*
* @param att
*/
public BooleanSTAttribute(Attribute att) {
this(att.getLocalName());
String v = att.getValue();
if (v != null && !v.trim().equals(S_EMPTY)) {
this.setCMLValue(v);
}
}
代码示例来源:origin: org.xml-cml/cmlxom
/**
* from DOM.
*
* @param att
*/
public StringSTAttribute(Attribute att) {
this(att.getLocalName());
this.setCMLValue(att.getValue());
}
代码示例来源:origin: org.xml-cml/cmlxom
/**
* from DOM.
*
* @param att
*/
public IntArraySTAttribute(Attribute att) {
this(att.getLocalName());
this.setCMLValue(att.getValue());
}
代码示例来源:origin: org.xml-cml/cmlxom
/**
* from DOM.
*
* @param att
*/
public DoubleSTAttribute(Attribute att) {
this(att.getLocalName());
String v = att.getValue();
if (v != null && !v.trim().equals(S_EMPTY)) {
this.setCMLValue(v);
}
}
代码示例来源:origin: org.xml-cml/cmlxom
/**
* from DOM.
*
* @param att
*/
public BooleanArraySTAttribute(Attribute att) {
this(att.getLocalName());
this.setCMLValue(att.getValue());
}
代码示例来源:origin: org.xml-cml/cmlxom
/**
* construct from existing attribute.
*
* @param att
*/
public DoubleArraySTAttribute(Attribute att) {
this(att.getLocalName());
this.setCMLValue(att.getValue());
}
代码示例来源:origin: org.xml-cml/cmlxom
/**
* from DOM.
*
* @param att
*/
public IntSTAttribute(Attribute att) {
this(att.getLocalName());
String v = att.getValue();
if (v != null && !v.trim().equals(S_EMPTY)) {
this.setCMLValue(v);
}
}
代码示例来源:origin: org.xml-cml/cmlxom
public NamespaceRefAttribute(Attribute att) {
this(att.getLocalName());
this.setCMLValue(att.getValue());
}
代码示例来源:origin: org.xml-cml/cmlxom
/** overrides addAttribute(Attribute)
* reroutes calls to setFoo()
* @param att attribute
*/
public void addAttribute(Attribute att) {
String name = att.getLocalName();
String value = att.getValue();
if (name == null) {
} else if (name.equals("type")) {
setType(value);
} else if (name.equals("href")) {
setHref(value);
} else {
super.addAttribute(att);
}
}
}
代码示例来源:origin: org.xml-cml/cmlxom
/**
* override name and metadataType attributes. this is because attributeGroup
* and attribute have different names
*
* @param att
*/
public void addAttribute(Attribute att) {
super.addAttribute(att);
String name = att.getLocalName();
String value = att.getValue();
if (name.equals("metadataType")) {
super.removeAttribute(att);
setName(value);
}
}
代码示例来源:origin: org.xml-cml/cmlxom
/** overrides addAttribute(Attribute)
* reroutes calls to setFoo()
* @param att attribute
*/
public void addAttribute(Attribute att) {
String name = att.getLocalName();
String value = att.getValue();
if (name == null) {
} else if (name.equals("id")) {
setId(value);
} else if (name.equals("convention")) {
setConvention(value);
} else if (name.equals("dictRef")) {
setDictRef(value);
} else {
super.addAttribute(att);
}
}
}
代码示例来源:origin: org.xml-cml/cmlxom
/** overrides addAttribute(Attribute)
* reroutes calls to setFoo()
* @param att attribute
*/
public void addAttribute(Attribute att) {
String name = att.getLocalName();
String value = att.getValue();
if (name == null) {
} else if (name.equals("title")) {
setTitle(value);
} else if (name.equals("id")) {
setId(value);
} else if (name.equals("convention")) {
setConvention(value);
} else if (name.equals("dictRef")) {
setDictRef(value);
} else {
super.addAttribute(att);
}
}
}
代码示例来源:origin: org.xml-cml/cmlxom
/** overrides addAttribute(Attribute)
* reroutes calls to setFoo()
* @param att attribute
*/
public void addAttribute(Attribute att) {
String name = att.getLocalName();
String value = att.getValue();
if (name == null) {
} else if (name.equals("title")) {
setTitle(value);
} else if (name.equals("id")) {
setId(value);
} else if (name.equals("convention")) {
setConvention(value);
} else if (name.equals("dictRef")) {
setDictRef(value);
} else {
super.addAttribute(att);
}
}
}
代码示例来源:origin: org.xml-cml/cmlxom
/** overrides addAttribute(Attribute)
* reroutes calls to setFoo()
* @param att attribute
*/
public void addAttribute(Attribute att) {
String name = att.getLocalName();
String value = att.getValue();
if (name == null) {
} else if (name.equals("title")) {
setTitle(value);
} else if (name.equals("id")) {
setId(value);
} else if (name.equals("convention")) {
setConvention(value);
} else if (name.equals("dictRef")) {
setDictRef(value);
} else {
super.addAttribute(att);
}
}
}
代码示例来源:origin: org.xml-cml/cmlxom
/** overrides addAttribute(Attribute)
* reroutes calls to setFoo()
* @param att attribute
*/
public void addAttribute(Attribute att) {
String name = att.getLocalName();
String value = att.getValue();
if (name == null) {
} else if (name.equals("title")) {
setTitle(value);
} else if (name.equals("id")) {
setId(value);
} else if (name.equals("convention")) {
setConvention(value);
} else if (name.equals("dictRef")) {
setDictRef(value);
} else {
super.addAttribute(att);
}
}
}
代码示例来源:origin: org.xml-cml/cmlxom
/** overrides addAttribute(Attribute)
* reroutes calls to setFoo()
* @param att attribute
*/
public void addAttribute(Attribute att) {
String name = att.getLocalName();
String value = att.getValue();
if (name == null) {
} else if (name.equals("title")) {
setTitle(value);
} else if (name.equals("id")) {
setId(value);
} else if (name.equals("convention")) {
setConvention(value);
} else if (name.equals("dictRef")) {
setDictRef(value);
} else {
super.addAttribute(att);
}
}
}
代码示例来源:origin: org.xml-cml/cmlxom
/** overrides addAttribute(Attribute)
* reroutes calls to setFoo()
* @param att attribute
*/
public void addAttribute(Attribute att) {
String name = att.getLocalName();
String value = att.getValue();
if (name == null) {
} else if (name.equals("title")) {
setTitle(value);
} else if (name.equals("id")) {
setId(value);
} else if (name.equals("convention")) {
setConvention(value);
} else if (name.equals("dictRef")) {
setDictRef(value);
} else {
super.addAttribute(att);
}
}
}
代码示例来源:origin: org.xml-cml/cmlxom
/** overrides addAttribute(Attribute)
* reroutes calls to setFoo()
* @param att attribute
*/
public void addAttribute(Attribute att) {
String name = att.getLocalName();
String value = att.getValue();
if (name == null) {
} else if (name.equals("id")) {
setId(value);
} else if (name.equals("dictRef")) {
setDictRef(value);
} else if (name.equals("value")) {
setCMLValue(value);
} else if (name.equals("objectClass")) {
setObjectClass(value);
} else {
super.addAttribute(att);
}
}
}
代码示例来源:origin: zanata/zanata-platform
private static Map<String, Object> buildMetadata(Element fromElem) {
Map<String, Object> metadata = Maps.newHashMap();
for (int i = 0; i < fromElem.getAttributeCount(); i++) {
Attribute attr = fromElem.getAttribute(i);
String uri = attr.getNamespaceURI();
String name = attr.getLocalName();
if (inTmxNamespace(uri)) {
String value = attr.getValue();
metadata.put(name, value);
} else if (attr.getQualifiedName().equals(XML_LANG)) {
String value = attr.getValue();
metadata.put(attr.getQualifiedName(), value);
}
}
List<String> childrenXml = getChildrenAsXml(fromElem);
metadata.put(TMX_ELEMENT_CHILDREN, childrenXml);
return metadata;
}
内容来源于网络,如有侵权,请联系作者删除!