org.geotools.xsd.Node.setValue()方法的使用及代码示例

x33g5p2x  于2022-01-25 转载在 其他  
字(2.2k)|赞(0)|评价(0)|浏览(179)

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

Node.setValue介绍

[英]Sets the value of the node.
[中]设置节点的值。

代码示例

代码示例来源:origin: geotools/geotools

  1. /**
  2. *
  3. * <!-- begin-user-doc -->
  4. * <!-- end-user-doc -->
  5. *
  6. * @generated modifiable
  7. */
  8. public Object parse(ElementInstance instance, Node node, Object value) throws Exception {
  9. List sections = node.getChildren("Section");
  10. if (null != sections) {
  11. for (Iterator iterator = sections.iterator(); iterator.hasNext(); ) {
  12. Node child = (Node) iterator.next();
  13. child.setValue(Section.get((String) child.getValue()));
  14. }
  15. }
  16. return super.parse(instance, node, value);
  17. }

代码示例来源:origin: geotools/geotools

  1. @Override
  2. public Object parse(ElementInstance instance, Node node, Object value) throws Exception {
  3. Node attr = node.getAttribute("method");
  4. if (null != attr) {
  5. attr.setValue(MethodType.get((String) attr.getValue()));
  6. }
  7. return super.parse(instance, node, value);
  8. }
  9. }

代码示例来源:origin: geotools/geotools

  1. /**
  2. *
  3. * <!-- begin-user-doc -->
  4. * <!-- end-user-doc -->
  5. *
  6. * @generated modifiable
  7. */
  8. public Object parse(ElementInstance instance, Node node, Object value) throws Exception {
  9. Node attr = node.getChild("containment");
  10. if (null != attr) {
  11. attr.setValue(ContainmentType.get((String) attr.getValue()));
  12. }
  13. return super.parse(instance, node, value);
  14. }

代码示例来源:origin: geotools/geotools

  1. public void endElement(String uri, String localName, String qName) throws SAXException {
  2. // pop the last handler off of the stack
  3. ElementHandler handler = (ElementHandler) handlers.pop();
  4. // create a qName object from the string
  5. String prefix = namespaces.getPrefix(uri);
  6. QName qualifiedName =
  7. prefix != null ? new QName(uri, localName, prefix) : new QName(uri, localName);
  8. handler.endElement(qualifiedName);
  9. endElementInternal(handler);
  10. // if the upper most delegating handler, then end the document
  11. if (handler instanceof DelegatingHandler
  12. && !handlers.isEmpty()
  13. && !(handlers.peek() instanceof DelegatingHandler)) {
  14. DelegatingHandler dh = (DelegatingHandler) handler;
  15. dh.endDocument();
  16. // grabbed the parsed value
  17. dh.getParseNode().setValue(dh.delegate.getParsedObject());
  18. }
  19. // pop namespace context
  20. namespaces.popContext();
  21. if (isCDATAEnding()) {
  22. setCDATA(false);
  23. }
  24. }

相关文章