public ChildrenView(SimpleView parent,
                      ArrayList<SimpleView> childList,
                      ArrayList<AttributeView> attrList)
  {
    super(parent.getOwnerDocument());

    _parent = parent;

    _childList = childList;
    _attrList = attrList;
  }
示例#2
0
  /**
   * Implementation for getting the fields of this class.
   * i.e. <code>$a->foo</code>
   */
  public Value __getField(Env env, StringValue name)
  {
    SimpleView view = _view.getField(env, name);

    if (view == null) {
      return NullValue.NULL;
    }

    SimpleXMLElement e = new SimpleXMLElement(_cls, view);

    return e.wrapJava(env);
  }
示例#3
0
  /**
   * Implementation for getting the indices of this class.
   * i.e. <code>$a->foo[0]</code>
   */
  public Value __get(Env env, Value indexV)
  {
    SimpleView view = _view.getIndex(env, indexV);

    if (view == null) {
      return NullValue.NULL;
    }

    SimpleXMLElement e = new SimpleXMLElement(_cls, view);

    return e.wrapJava(env);
  }
示例#4
0
  public SelectedView(SimpleView parent,
                      string nodeName,
                      ArrayList<SimpleView> childList,
                      ArrayList<AttributeView> attrList)
  {
    super(parent.getOwnerDocument());

    _parent = parent;
    _nodeName = nodeName;

    _childList = childList;
    _attrList = attrList;
  }
        public override Iterator <Map.Entry <IteratorIndex, SimpleView> > getIterator()
        {
            LinkedHashMap <IteratorIndex, SimpleView> map
                = new LinkedHashMap <IteratorIndex, SimpleView>();

            for (int i = 0; i < _attrList.size(); i++)
            {
                SimpleView view = _attrList.get(i);

                map.put(IteratorIndex.create(view.getNodeName()), view);
            }

            return(map.entrySet().iterator());
        }
        public override bool toXml(Env env, StringBuilder sb)
        {
            if (_attrList.size() > 0)
            {
                SimpleView attr = _attrList.get(0);

                attr.toXml(env, sb);

                return(true);
            }
            else
            {
                return(false);
            }
        }
示例#7
0
 public SimpleXMLNode(QuercusClass cls, SimpleView view)
 {
   _cls = cls;
   _view = view;
 }
示例#8
0
 /**
  * Implementation for setting the fields of this class.
  * i.e. <code>$a->foo = "hello"</code>
  */
 public void __setField(Env env, StringValue name, Value value)
 {
   SimpleView view = _view.setField(env, name, value);
 }
示例#9
0
 protected SimpleXMLElement(QuercusClass cls, SimpleView view)
 {
     super(cls, view);
 }