Package org.apache.wookie.w3c

Examples of org.apache.wookie.w3c.IContentEntity


     
      // CONTENT IS OPTIONAL - can be 0 or 1
      if(tag.equals(IW3CXMLConfiguration.CONTENT_ELEMENT)) { 
        if (!foundContent){
          foundContent = true;
          IContentEntity aContent = new ContentEntity()
          aContent.fromXML(child,locales,supportedEncodings,zip);
          if (aContent.getSrc()!=null) fContentList.add(aContent);
        }
      }
     
      // FEATURE IS OPTIONAL - can be many
      if(tag.equals(IW3CXMLConfiguration.FEATURE_ELEMENT)) {
View Full Code Here


    INameEntity[] names = widget.getNames().toArray(new INameEntity[widget.getNames().size()]);
    return (INameEntity) LocalizationUtils.getLocalizedElement(names, null, widget.getDefaultLocale());
  }
 
  private String getSrc(W3CWidget widget){
    IContentEntity startFile = getDefaultStartFile(widget);
    String start = startFile.getSrc();
    return getLocalUrl(start);
  }
View Full Code Here

    String pass_value="pass.htm";
    String id="026";
    String[] tests = {"lro","rlo","rtl","ltr"};
    for (String dir: tests){
      W3CWidget widget = getWidget(id,dir);
      IContentEntity start = (IContentEntity)widget.getContentList().get(0);
      assertEquals(pass_value, getLocalUrl(start.getSrc()));
   
  }
View Full Code Here

  @Test
  public void encoding(){
    String id="028";
   
    W3CWidget widget;
    IContentEntity start;
   
    widget = getWidget(id, "lro");
    start = (IContentEntity)widget.getContentList().get(0);
    assertEquals("UTF-8", start.getCharSet());
   
    widget = getWidget(id, "rlo");
    start = (IContentEntity)widget.getContentList().get(0);
    assertEquals("ISO-8859-1", start.getCharSet());
   
    widget = getWidget(id, "rtl");
    start = (IContentEntity)widget.getContentList().get(0);
    assertEquals("UTF-8", start.getCharSet());
   
    widget = getWidget(id, "ltr");
    start = (IContentEntity)widget.getContentList().get(0);
    assertEquals("UTF-8", start.getCharSet());
   
  }
View Full Code Here

    String pass_value="text/html";
    String id="027";
    String[] tests = {"lro","rlo","rtl","ltr"};
    for (String dir: tests){
      W3CWidget widget = getWidget(id,dir);
      IContentEntity start = (IContentEntity)widget.getContentList().get(0);
      assertEquals(pass_value, start.getType());
   
  }
View Full Code Here

    String pass_value="pass.htm";
    String id="026";
    String[] tests = {"lro","rlo","rtl","ltr"};
    for (String dir: tests){
      W3CWidget widget = getWidget(id,dir);
      IContentEntity start = (IContentEntity)widget.getContentList().get(0);
      assertEquals(pass_value, getLocalUrl(start.getSrc()));
   
  }
View Full Code Here

  @Test
  public void encoding(){
    String id="028";
   
    W3CWidget widget;
    IContentEntity start;
   
    widget = getWidget(id, "lro");
    start = (IContentEntity)widget.getContentList().get(0);
    assertEquals("UTF-8", start.getCharSet());
   
    widget = getWidget(id, "rlo");
    start = (IContentEntity)widget.getContentList().get(0);
    assertEquals("ISO-8859-1", start.getCharSet());
   
    widget = getWidget(id, "rtl");
    start = (IContentEntity)widget.getContentList().get(0);
    assertEquals("UTF-8", start.getCharSet());
   
    widget = getWidget(id, "ltr");
    start = (IContentEntity)widget.getContentList().get(0);
    assertEquals("UTF-8", start.getCharSet());
   
  }
View Full Code Here

    String pass_value="text/html";
    String id="027";
    String[] tests = {"lro","rlo","rtl","ltr"};
    for (String dir: tests){
      W3CWidget widget = getWidget(id,dir);
      IContentEntity start = (IContentEntity)widget.getContentList().get(0);
      assertEquals(pass_value, start.getType());
   
  }
View Full Code Here

    INameEntity[] names = widget.getNames().toArray(new INameEntity[widget.getNames().size()]);
    return (INameEntity) LocalizationUtils.getLocalizedElement(names, null);
  }
 
  private String getSrc(W3CWidget widget){
    IContentEntity startFile = getDefaultStartFile(widget);
    String start = startFile.getSrc();
    return getLocalUrl(start);
  }
View Full Code Here

    INameEntity[] names = widget.getNames().toArray(new INameEntity[widget.getNames().size()]);
    return (INameEntity) LocalizationUtils.getLocalizedElement(names, null, widget.getDefaultLocale());
  }
 
  private String getSrc(W3CWidget widget){
    IContentEntity startFile = getDefaultStartFile(widget);
    String start = startFile.getSrc();
    return getLocalUrl(start);
  }
View Full Code Here

TOP

Related Classes of org.apache.wookie.w3c.IContentEntity

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.