Examples of TagElement


Examples of com.crawljax.core.TagElement

        TagAttribute tag =
                new TagAttribute(crawlAttribute.getName(), crawlAttribute.getValue());
        attributes.add(tag);
      }

      TagElement tagElement = new TagElement(attributes, crawlElement.getTagName());

      tagElement.setId(crawlElement.getId());

      tagElements.add(tagElement);
    }

    return tagElements;
View Full Code Here

Examples of etch.util.core.xml.XmlParser.TagElement

  public Message startMessage() throws IOException
  {
    stack.clear();
   
    TagElement te = new XmlParser().parseOne( rdr, null, MESSAGE_TAG );
    stack.push( te );
    elementList.push( te.getChildren() );
   
    Integer id = te.getIntAttr( null, STRUCT_TYPE_ATTR );
    Type type = vf.getType( id );
    return new Message( type, vf );
  }
View Full Code Here

Examples of etch.util.core.xml.XmlParser.TagElement

     
  }

  public StructValue startStruct()
  {
    TagElement te = stack.peek();
    elementList.push( te.getChildren() );
   
    Integer id = te.getIntAttr( null, STRUCT_TYPE_ATTR );
    Type type = vf.getType( id );
    return new StructValue( type, vf );
  }
View Full Code Here

Examples of etch.util.core.xml.XmlParser.TagElement

    return new StructValue( type, vf );
  }

  public boolean readStructElement( StructElement se ) throws IOException
  {
    TagElement te = readNextTagElement();
    if (te == null)
      return false;
   
    Type t = null; // TODO this needs to come from somewhere.
    Integer id = te.getIntAttr( null, KEY_ATTR );
    se.key = t.getField( id );
   
    stack.push( te );
    se.value = intReadValue();
    stack.pop();
View Full Code Here

Examples of etch.util.core.xml.XmlParser.TagElement

    elementList.pop();
  }

  public ArrayValue startArray()
  {
    TagElement te = stack.peek();
    elementList.push( te.getChildren() );
    return new ArrayValue( null );
  }
View Full Code Here

Examples of etch.util.core.xml.XmlParser.TagElement

    public Object value;
  }

  public boolean readArrayElement( ArrayElement ae ) throws IOException
  {
    TagElement te = readNextTagElement();
    if (te == null)
      return false;
   
    stack.push( te );
    ae.value = intReadValue();
View Full Code Here

Examples of etch.util.core.xml.XmlParser.TagElement

    return (TagElement) e;
  }
 
  private Object intReadValue() throws IOException
  {
    TagElement te = stack.peek();
    System.out.printf( "readValue: %s\n", te );
    String type = te.getAttr( null, ELEMENT_TYPE_ATTR );
   
    if (type.equals( NULL_TYPE ))
      return null;
   
    if (type.equals( BOOLEAN_TYPE ))
      return new Boolean( te.getCdataValue() );
   
    if (type.equals( INTEGER_TYPE ))
      return new Integer( te.getCdataValue() );
   
    if (type.equals( LONG_TYPE ))
      return new Long( te.getCdataValue() );
   
    if (type.equals( FLOAT_TYPE ))
      return new Float( te.getCdataValue() );
   
    if (type.equals( DOUBLE_TYPE ))
      return new Double( te.getCdataValue() );

    if (type.equals( BYTES_TYPE ))
      return string2bytes( te.getCdataValue() );
   
    if (type.equals( STRING_TYPE ))
      return te.getCdataValue();
   
    if (type.equals( ARRAY_TYPE ))
      return readArray(null);
   
    if (type.equals( STRUCT_TYPE ))
View Full Code Here

Examples of etch.util.core.xml.XmlParser.TagElement

  private final Stack<TagElement> stack = new Stack<TagElement>();

  public void startMessage( Message msg )
  {
    stack.clear();
    TagElement te = new DefaultTagElement( MESSAGE_TAG );
    te.setAttr( null, STRUCT_TYPE_ATTR, msg.type().getId() );
    stack.push( te );
  }
View Full Code Here

Examples of etch.util.core.xml.XmlParser.TagElement

    stack.push( te );
  }

  public void endMessage( Message msg ) throws IOException
  {
    TagElement te = stack.pop();
    if (!stack.isEmpty())
      throw new IOException( "stack sequence error: "+stack );
    te.toString( wtr );
  }
View Full Code Here

Examples of etch.util.core.xml.XmlParser.TagElement

  }

  public void startStruct( StructValue struct )
  {
    // the caller has already created an element tag for us.
    TagElement te = stack.peek();
    te.setAttr( null, STRUCT_TYPE_ATTR, struct.type().getId() );
  }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.