Package com.m11n.android.model

Examples of com.m11n.android.model.Archive


    for(int k=0; k<children.getLength(); k++)
    {
      Node archiveNode = children.item(k);
      NodeList archiveNodeChildren = archiveNode.getChildNodes();
     
      Archive archive = new Archive();
      boolean propertySet = false;
     
      NamedNodeMap attributes = archiveNode.getAttributes();
     
      if(attributes!=null)
      {
        for(int j=0; j<attributes.getLength(); j++)
        {
          Node attribute = attributes.item(j);
         
          if(Archive.OS.equals(attribute.getNodeName()))
          {
            archive.setOs(attribute.getTextContent());
            propertySet = true;
          }
          else if(Archive.ARCH.equals(attribute.getNodeName()))
          {
            archive.setArchitecture(attribute.getTextContent());
            propertySet = true;
          }
        }
      }
     
      for(int i=0; i<archiveNodeChildren.getLength(); i++)
      {
        Node node = archiveNodeChildren.item(i);
       
        if(Archive.CHECKSUM.equals(node.getNodeName()))
        {
          archive.setChecksum(node.getTextContent());
         
          archive.setChecksumType(node.getAttributes().getNamedItem(Archive.TYPE).getTextContent());
          propertySet = true;
        }
        else if(Archive.SIZE.equals(node.getNodeName()))
        {
          String value = node.getTextContent();
         
          if(value!=null)
          {
            archive.setSize(Integer.valueOf(value));
            propertySet = true;
          }
        }
        if(Archive.URL.equals(node.getNodeName()))
        {
          archive.setUrl(node.getTextContent());
          propertySet = true;
        }
      }

      if(propertySet)
View Full Code Here

TOP

Related Classes of com.m11n.android.model.Archive

Copyright © 2018 www.massapicom. 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.