本文整理了Java中com.google.gwt.xml.client.Node.getAttributes()
方法的一些代码示例,展示了Node.getAttributes()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Node.getAttributes()
方法的具体详情如下:
包路径:com.google.gwt.xml.client.Node
类名称:Node
方法名:getAttributes
[英]This method retrieves the attributes.
[中]此方法检索属性。
代码示例来源:origin: org.geomajas.plugin/geomajas-plugin-wmsclient
private boolean isQueryable(Node layerNode) {
NamedNodeMap attributes = layerNode.getAttributes();
Node q = attributes.getNamedItem("queryable");
if (q != null) {
return "1".equals(q.getNodeValue());
}
return false;
}
代码示例来源:origin: org.geomajas.plugin/geomajas-plugin-wmsclient
private boolean isQueryable(Node layerNode) {
NamedNodeMap attributes = layerNode.getAttributes();
Node q = attributes.getNamedItem("queryable");
if (q != null) {
return "1".equals(q.getNodeValue());
}
return false;
}
代码示例来源:origin: org.apache.cxf/cxf-rt-management-web
private void setLink(@Nonnull final Node node) {
Node typeNode = node.getAttributes().getNamedItem(TYPE_ATTRIBUTE);
Node urlNode = node.getAttributes().getNamedItem(URL_ATTRIBUTE);
if (typeNode != null && urlNode != null) {
String typeValue = typeNode.getNodeValue();
String urlValue = urlNode.getNodeValue();
if (FIRST_LINK.equals(typeValue)) {
first = urlValue;
} else if (PREVIOUS_LINK.equals(typeValue)) {
previous = urlValue;
} else if (SELF_LINK.equals(typeValue)) {
self = urlValue;
} else if (NEXT_LINK.equals(typeValue)) {
next = urlValue;
} else if (LAST_LINK.equals(typeValue)) {
last = urlValue;
}
}
}
}
代码示例来源:origin: org.geomajas/geomajas-client-gwt2-impl
protected double getAttributeAsDouble(Node node, String name) {
Node attr = node.getAttributes().getNamedItem(name);
return getValueRecursiveAsDouble(attr);
}
代码示例来源:origin: org.geomajas/geomajas-client-gwt2-impl
protected boolean hasAttribute(Node node, String name) {
return node.hasAttributes() && node.getAttributes().getNamedItem(name) != null;
}
代码示例来源:origin: org.geomajas.plugin/geomajas-plugin-wmsclient
protected void parse(Node node) {
NamedNodeMap attributes = node.getAttributes();
type = getValueRecursive(attributes.getNamedItem("type"));
NodeList childNodes = node.getChildNodes();
for (int i = 0; i < childNodes.getLength(); i++) {
Node child = childNodes.item(i);
String nodeName = child.getNodeName();
if ("Format".equalsIgnoreCase(nodeName)) {
format = getValueRecursive(child);
} else if ("OnlineResource".equalsIgnoreCase(nodeName)) {
onlineResource = createOnlineResource(child);
}
}
}
代码示例来源:origin: org.geomajas/geomajas-client-gwt2-impl
protected Coordinate getCoordinate(Node node) {
NamedNodeMap attributes = node.getAttributes();
double x = getValueRecursiveAsDouble(attributes.getNamedItem("x"));
double y = getValueRecursiveAsDouble(attributes.getNamedItem("y"));
return new Coordinate(x, y);
}
}
代码示例来源:origin: org.geomajas.plugin/geomajas-plugin-wmsclient
protected void parse(Node node) {
NamedNodeMap attributes = node.getAttributes();
type = getValueRecursive(attributes.getNamedItem("xlink:type"));
xLink = getValueRecursive(attributes.getNamedItem("xmlns:xlink"));
href = getValueRecursive(attributes.getNamedItem("xlink:href"));
}
}
代码示例来源:origin: org.geomajas.plugin/geomajas-plugin-wmsclient
protected void parse(Node node) {
NamedNodeMap attributes = node.getAttributes();
width = getValueRecursiveAsInteger(attributes.getNamedItem("width"));
height = getValueRecursiveAsInteger(attributes.getNamedItem("height"));
NodeList childNodes = node.getChildNodes();
for (int i = 0; i < childNodes.getLength(); i++) {
Node child = childNodes.item(i);
String nodeName = child.getNodeName();
if ("Format".equalsIgnoreCase(nodeName)) {
format = getValueRecursive(child);
} else if ("OnlineResource".equalsIgnoreCase(nodeName)) {
onlineResource = createOnlineResource(child);
}
}
}
代码示例来源:origin: com.googlecode.gwtupload/gwtupload
String value = Utils.getXmlNodeValue(node);
if (value != null) {
Node attribute = node.getAttributes().getNamedItem(ATTR_BLOBSTORE_PARAM_NAME);
if (attribute != null) {
String paramName = attribute.getNodeValue();
代码示例来源:origin: org.geomajas/geomajas-client-gwt2-impl
protected Bbox getBoundingBox(Node node) {
NamedNodeMap attributes = node.getAttributes();
Node minx = attributes.getNamedItem("minx");
Node miny = attributes.getNamedItem("miny");
Node maxx = attributes.getNamedItem("maxx");
Node maxy = attributes.getNamedItem("maxy");
double x = getValueRecursiveAsDouble(minx);
double y = getValueRecursiveAsDouble(miny);
double width = getValueRecursiveAsDouble(maxx) - x;
double height = getValueRecursiveAsDouble(maxy) - y;
return new Bbox(x, y, width, height);
}
代码示例来源:origin: org.geomajas.plugin/geomajas-plugin-wmsclient
private void addLatLonBoundingBox(Node bboxNode) {
NamedNodeMap attributes = bboxNode.getAttributes();
Node minx = attributes.getNamedItem("minx");
Node miny = attributes.getNamedItem("miny");
Node maxx = attributes.getNamedItem("maxx");
Node maxy = attributes.getNamedItem("maxy");
double x = getValueRecursiveAsDouble(minx);
double y = getValueRecursiveAsDouble(miny);
double width = getValueRecursiveAsDouble(maxx) - x;
double height = getValueRecursiveAsDouble(maxy) - y;
latlonBoundingBox = new Bbox(x, y, width, height);
}
}
代码示例来源:origin: org.geomajas.plugin/geomajas-plugin-wmsclient
private void addBoundingBox(Node bboxNode) {
NamedNodeMap attributes = bboxNode.getAttributes();
Node crs = attributes.getNamedItem("CRS");
boundingBoxCrs = getValueRecursive(crs);
Node minx = attributes.getNamedItem("minx");
Node miny = attributes.getNamedItem("miny");
Node maxx = attributes.getNamedItem("maxx");
Node maxy = attributes.getNamedItem("maxy");
double x = getValueRecursiveAsDouble(minx);
double y = getValueRecursiveAsDouble(miny);
double width = getValueRecursiveAsDouble(maxx) - x;
double height = getValueRecursiveAsDouble(maxy) - y;
boundingBox = new Bbox(x, y, width, height);
}
代码示例来源:origin: org.geomajas.plugin/geomajas-client-gwt2-plugin-wfs
private void addLatLonBoundingBox(Node bboxNode) {
NamedNodeMap attributes = bboxNode.getAttributes();
double x = 0, y = 0, maxx = 0, maxy = 0;
Node n = attributes.getNamedItem("minx");
if (n != null) {
x = getValueRecursiveAsDouble(n);
}
n = attributes.getNamedItem("miny");
if (n != null) {
y = getValueRecursiveAsDouble(n);
}
n = attributes.getNamedItem("maxx");
if (n != null) {
maxx = getValueRecursiveAsDouble(n);
}
n = attributes.getNamedItem("maxy");
if (n != null) {
maxy = getValueRecursiveAsDouble(n);
}
wGS84BoundingBox = new Bbox(x, y, maxx - x, maxy - y);
}
代码示例来源:origin: org.geomajas.plugin/geomajas-plugin-wmsclient
private void addBoundingBox(Node bboxNode) {
NamedNodeMap attributes = bboxNode.getAttributes();
Node crs = attributes.getNamedItem("SRS");
boundingBoxCrs = getValueRecursive(crs);
Node minx = attributes.getNamedItem("minx");
Node miny = attributes.getNamedItem("miny");
Node maxx = attributes.getNamedItem("maxx");
Node maxy = attributes.getNamedItem("maxy");
double x = getValueRecursiveAsDouble(minx);
double y = getValueRecursiveAsDouble(miny);
double width = getValueRecursiveAsDouble(maxx) - x;
double height = getValueRecursiveAsDouble(maxy) - y;
boundingBox = new Bbox(x, y, width, height);
}
内容来源于网络,如有侵权,请联系作者删除!