Package com.jbidwatcher.util.xml

Examples of com.jbidwatcher.util.xml.XMLInterface


   */
  public void fromXML(XMLInterface inXML) {
    Iterator<XMLInterface> serversStep = inXML.getChildren();

    while(serversStep.hasNext()) {
      XMLInterface perServer = serversStep.next();
      //  Only process the 'server' entries.
      if(perServer.getTagName().equals("server")) {
        AuctionServer newServer = null;
        String serverName = perServer.getProperty("NAME", null);
        if(serverName != null) {
          newServer = getServer();
          if(newServer == null) {
            try {
              Class<?> newClass = Class.forName(serverName + "Server");
View Full Code Here


  private void getServerAuctionEntries(AuctionServer newServer, XMLInterface perServer) {
    try {
      Iterator<XMLInterface> entryStep = perServer.getChildren();
      int count = 0;
      while (entryStep.hasNext()) {
        XMLInterface perEntry = entryStep.next();
        AuctionEntry ae = EntryFactory.getInstance().constructEntry();

        ae.setServer(newServer);
        ae.fromXML(perEntry);
        ae.saveDB();
View Full Code Here

    if(!ae.isComplete() || ae.isUpdateRequired()) {
      MQFactory.getConcrete("Swing").enqueue("Updating " + titleWithComment);
      MQFactory.getConcrete("redraw").enqueue(ae.getIdentifier());
      Thread.yield();
      XMLInterface before = ae.toXML(false);
      ae.update();
      XMLInterface after = ae.toXML(false);

      boolean changed = !(after.toString().equals(before.toString()));

      MQFactory.getConcrete("my").enqueue("UPDATE " + ae.getIdentifier() + "," + Boolean.toString(changed));
      if(changed) {
        //  Forget any cached info we have; the on-disk version has changed.
        String category = ae.getCategory();
View Full Code Here

  public StringBuffer showItem(String identifier) {
    JConfig.log().logDebug("Retrieving auction: " + identifier);
    XMLSerialize xmlable = EntryFactory.getInstance().constructEntry(identifier);
    if(xmlable != null) {
      XMLInterface xe = xmlable.toXML();
      return xe.toStringBuffer();
    }
    return null;
  }
View Full Code Here

    }

    public boolean delInput(String srchFor) {
      Iterator<XMLInterface> it = mAllInputs.iterator();
      while (it.hasNext()) {
        XMLInterface curInput = it.next();
        String name=curInput.getProperty("name");
        if(name != null) {
          if(srchFor.equalsIgnoreCase(name)) {
            it.remove();
            return true;
          }
View Full Code Here

    StringBuffer sb = getRawAccountXML(username, password);
    if(sb == null) return false;

    XMLElement xml = new XMLElement();
    xml.parseString(sb.toString());
    XMLInterface sync = xml.getChild("syncq");
    XMLInterface snipe = xml.getChild("snipeq");
    XMLInterface expires = xml.getChild("expiry");
    XMLInterface listingsRemaining = xml.getChild("listings");
    XMLInterface categoriesRemaining = xml.getChild("categories");
    XMLInterface reporting = xml.getChild("reportq");
    XMLInterface snipesListen = xml.getChild("snipes");
    XMLInterface ssl = xml.getChild("ssl");
    XMLInterface uploadHTML = xml.getChild("uploadhtml");
    XMLInterface serverParser = xml.getChild("parser");
    XMLInterface gixen = xml.getChild("gixen");

    checkExpiration(expires);

    JConfig.setConfiguration("my.jbidwatcher.allow.listings", listingsRemaining.getContents());
    JConfig.setConfiguration("my.jbidwatcher.allow.categories", categoriesRemaining.getContents());
View Full Code Here

TOP

Related Classes of com.jbidwatcher.util.xml.XMLInterface

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.