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

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

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

Node.getValue介绍

暂无

代码示例

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

  1. Text text(Node n) {
  2. if (n.getValue() instanceof Text) {
  3. return (Text) n.getValue();
  4. }
  5. return null;
  6. }
  7. }

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

  1. public Object getValue() {
  2. // jsut return the root of the parse tree's value
  3. if (tree != null) {
  4. return tree.getValue();
  5. }
  6. // //just return the root handler value
  7. // if (handler != null) {
  8. // return handler.getValue();
  9. // }
  10. return null;
  11. }

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

  1. public Object getAttributeValue(String name) {
  2. Node node = getAttribute(name);
  3. if (node != null) {
  4. return node.getValue();
  5. }
  6. return null;
  7. }

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

  1. public Object getChildValue(Class clazz) {
  2. Node node = getChild(clazz);
  3. if (node != null) {
  4. return node.getValue();
  5. }
  6. return null;
  7. }

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

  1. public Object getChildValue(String name) {
  2. Node node = getChild(name);
  3. if (node != null) {
  4. return node.getValue();
  5. }
  6. return null;
  7. }

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

  1. public Object getValue() {
  2. if (documentHandler != null) {
  3. return documentHandler.getParseNode().getValue();
  4. }
  5. // grab handler on top of stack
  6. if (!handlers.isEmpty()) {
  7. Handler h = (Handler) handlers.peek();
  8. return h.getParseNode().getValue();
  9. }
  10. return null;
  11. }

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

  1. @Override
  2. protected boolean stop(ElementHandler handler) {
  3. return type.isInstance(handler.getParseNode().getValue());
  4. }
  5. }

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

  1. protected boolean stream(ElementHandler handler) {
  2. return (handler.getParseNode().getValue() != null)
  3. && type.isAssignableFrom(handler.getParseNode().getValue().getClass());
  4. }
  5. }

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

  1. public List getChildValues(String name) {
  2. ArrayList matches = new ArrayList();
  3. if (name == null) {
  4. return matches;
  5. }
  6. for (Iterator itr = children.iterator(); itr.hasNext(); ) {
  7. Node child = (Node) itr.next();
  8. if (name.equals(child.getComponent().getName())) {
  9. matches.add(child.getValue());
  10. }
  11. }
  12. return matches;
  13. }

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

  1. @SuppressWarnings("unchecked")
  2. private void addDCPTypes(Node node, OperationType operationType) {
  3. List<Node> dcpNodes = node.getChildren(DCPType.class);
  4. for (Node dcpNode : dcpNodes) {
  5. DCPType dcp = (DCPType) dcpNode.getValue();
  6. operationType.getDCP().add(dcp);
  7. }
  8. }

代码示例来源: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. Instant begining = new DefaultInstant((Position) node.getChild("beginPosition").getValue());
  10. Instant ending = new DefaultInstant((Position) node.getChild("endPosition").getValue());
  11. Period timePeriod = new DefaultPeriod(begining, ending);
  12. return timePeriod;
  13. }

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

  1. @Override
  2. public Object parse(ElementInstance instance, Node node, Object value) throws Exception {
  3. for (Node n : ((List<Node>) node.getChildren())) {
  4. if (n.getValue() instanceof Text) {
  5. sb.append(((Text) n.getValue()).getValue());
  6. } else {
  7. sb.append("'").append(n.getValue()).append("'");
  8. }
  9. }
  10. return value;
  11. }
  12. }

代码示例来源: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. Instant begining = new DefaultInstant((Position) node.getChild("BeginPosition").getValue());
  10. Instant ending = new DefaultInstant((Position) node.getChild("EndPosition").getValue());
  11. Period timePeriod = new DefaultPeriod(begining, ending);
  12. return timePeriod;
  13. }

代码示例来源: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. ArrayList list = new ArrayList();
  10. List children = node.getChildren();
  11. for (int i = 0; i < children.size(); i++) {
  12. list.add(((Node) children.get(i)).getValue());
  13. }
  14. return list;
  15. }

代码示例来源: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 Object parse(ElementInstance instance, Node node, Object value) throws Exception {
  2. ElementSetNameType result = (ElementSetNameType) createEObject(value);
  3. result.setValue(ElementSetType.get((String) value));
  4. Node typeNames = node.getAttribute("typeNames");
  5. if (typeNames != null) {
  6. result.setTypeNames((List<QName>) typeNames.getValue());
  7. }
  8. return result;
  9. }
  10. }

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

  1. @Override
  2. public Object parse(ElementInstance instance, Node node, Object value) throws Exception {
  3. SimpleLiteral sl = Csw20Factory.eINSTANCE.createSimpleLiteral();
  4. sl.setName(instance.getName());
  5. sl.setValue(value);
  6. Node scheme = node.getAttribute("scheme");
  7. if (scheme != null) {
  8. sl.setScheme((URI) scheme.getValue());
  9. }
  10. return sl;
  11. }

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

  1. @Override
  2. protected void endElementInternal(ElementHandler handler) {
  3. object = null;
  4. if (stop(handler)) {
  5. object = handler.getParseNode().getValue();
  6. // remove this node from parse tree
  7. if (handler.getParentHandler() instanceof ElementHandler) {
  8. ElementHandler parent = (ElementHandler) handler.getParentHandler();
  9. ((NodeImpl) parent.getParseNode()).removeChild(handler.getParseNode());
  10. }
  11. }
  12. }

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

  1. protected void endElementInternal(ElementHandler handler) {
  2. super.endElementInternal(handler);
  3. if (stream(handler)) {
  4. // throw value into buffer
  5. buffer.put(handler.getParseNode().getValue());
  6. // remove this node from parse tree
  7. if (handler.getParentHandler() instanceof ElementHandler) {
  8. ElementHandler parent = (ElementHandler) handler.getParentHandler();
  9. ((NodeImpl) parent.getParseNode()).removeChild(handler.getParseNode());
  10. // parent.endChildHandler(handler);
  11. }
  12. }
  13. }

相关文章