コード例 #1
0
  /**
   *
   * <!-- begin-user-doc -->
   * <!-- end-user-doc -->
   *
   * @generated modifiable
   */
  public Object parse(ElementInstance instance, Node node, Object value) throws Exception {
    Mark mark = (Mark) super.parse(instance, node, value);

    if (mark.getWellKnownName() == null) {
      String format = (String) node.getChildValue("Format");
      int markIndex = -1;

      if (node.hasChild("MarkIndex")) {
        markIndex = (Integer) node.getChildValue("MarkIndex");
      }

      ExternalMark emark = null;

      if (node.hasChild("OnlineResource")) {
        emark =
            styleFactory.externalMark(
                new OnLineResourceImpl((URI) node.getChildValue("OnlineResource")),
                format,
                markIndex);
      } else if (node.hasChild("InlineContent")) {
        // TODO: implement this
        if (true) throw new UnsupportedOperationException("");
        InlineContent ic = (InlineContent) node.getChildValue("InlineContent");
        // emark = styleFactory.externalMark(inline);
      }

      mark.setExternalMark(emark);
    }

    return mark;
  }
コード例 #2
0
ファイル: GraphicBinding.java プロジェクト: Geodan/geotools
 @Override
 public Object parse(ElementInstance instance, Node node, Object value) throws Exception {
   Graphic g = (Graphic) super.parse(instance, node, value);
   if (node.hasChild(AnchorPoint.class)) {
     g.setAnchorPoint((AnchorPoint) node.getChildValue(AnchorPoint.class));
   }
   if (node.hasChild(Displacement.class)) {
     g.setDisplacement((Displacement) node.getChildValue(Displacement.class));
   }
   return g;
 }
コード例 #3
0
 @Override
 public boolean hasNext() {
   return actual.hasChild();
 }