Package org.apache.wookie.w3c.updates

Examples of org.apache.wookie.w3c.updates.UpdateDescription.fromXML()


     
     
      // UDPATE DESCRIPTION IS OPTONAL - can only be one, ignore subsequent repetitions
      if(tag.equals(IW3CXMLConfiguration.UPDATE_ELEMENT) && fUpdate == null && child.getNamespace().getURI().equals(IW3CXMLConfiguration.MANIFEST_NAMESPACE)) {
        UpdateDescription update = new UpdateDescription();
        update.fromXML(child);
        // It must have a valid HREF attribute, or it is ignored
        if (update.getHref() != null) fUpdate = update.getHref();
     
   
      // LICENSE IS OPTIONAL - can be many
View Full Code Here


  public void create(){
    UpdateDescription desc = new UpdateDescription();
    Element update = new Element("update-description", Namespace.getNamespace(IW3CXMLConfiguration.MANIFEST_NAMESPACE));
    update.setAttribute("href", "http://localhost");
    try {
      desc.fromXML(update);
    } catch (BadManifestException e) {
      fail();
    }
    assertEquals("http://localhost", desc.getHref());
  }
View Full Code Here

  public void createInvalidURL(){
    UpdateDescription desc = new UpdateDescription();
    Element update = new Element("update-description", Namespace.getNamespace(IW3CXMLConfiguration.MANIFEST_NAMESPACE));
    update.setAttribute("href", "notavalidurl!");
    try {
      desc.fromXML(update);
    } catch (BadManifestException e) {
      fail();
    }
    assertNull(desc.getHref());
  }
View Full Code Here

     
     
      // UDPATE DESCRIPTION IS OPTONAL - can only be one, ignore subsequent repetitions
      if(tag.equals(IW3CXMLConfiguration.UPDATE_ELEMENT) && fUpdate == null && child.getNamespace().getURI().equals(IW3CXMLConfiguration.MANIFEST_NAMESPACE)) {
        UpdateDescription update = new UpdateDescription();
        update.fromXML(child);
        // It must have a valid HREF attribute, or it is ignored
        if (update.getHref() != null) fUpdate = update.getHref();
     
   
      // LICENSE IS OPTIONAL - can be many
View Full Code Here

  public void create(){
    UpdateDescription desc = new UpdateDescription();
    Element update = new Element(IW3CXMLConfiguration.UPDATE_ELEMENT, Namespace.getNamespace(IW3CXMLConfiguration.MANIFEST_NAMESPACE));
    update.setAttribute(IW3CXMLConfiguration.HREF_ATTRIBUTE, "http://localhost");
    try {
      desc.fromXML(update);
    } catch (BadManifestException e) {
      fail();
    }
    assertEquals("http://localhost", desc.getHref());
  }
View Full Code Here

  public void createInvalidURL(){
    UpdateDescription desc = new UpdateDescription();
    Element update = new Element(IW3CXMLConfiguration.UPDATE_ELEMENT, Namespace.getNamespace(IW3CXMLConfiguration.MANIFEST_NAMESPACE));
    update.setAttribute(IW3CXMLConfiguration.HREF_ATTRIBUTE, "notavalidurl!");
    try {
      desc.fromXML(update);
    } catch (BadManifestException e) {
      fail();
    }
    assertNull(desc.getHref());
  }
View Full Code Here

     
     
      // UDPATE DESCRIPTION IS OPTONAL - can only be one, ignore subsequent repetitions
      if(tag.equals(IW3CXMLConfiguration.UPDATE_ELEMENT) && fUpdate == null) {
        UpdateDescription update = new UpdateDescription();
        update.fromXML(child);
        // It must have a valid HREF attribute, or it is ignored
        if (update.getHref() != null) fUpdate = update.getHref();
     
   
      // LICENSE IS OPTIONAL - can be many
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.