Examples of INameEntity


Examples of org.apache.wookie.w3c.INameEntity

      fLogger.error("WidgetManifestModel.fromXML() called with no locales and Bad Manifest",e);
    }
  }

  public String getLocalName(String locale){
    INameEntity name = (INameEntity)LocalizationUtils.getLocalizedElement(fNamesList.toArray(new INameEntity[fNamesList.size()]), new String[]{locale}, defaultLocale);
    if (name != null) return name.getName();
    return IW3CXMLConfiguration.UNKNOWN;
  }
View Full Code Here

Examples of org.apache.wookie.w3c.INameEntity

      Element child = (Element)o;
      String tag = child.getName();     

      // NAME IS OPTIONAL - get the name elements (multiple based on xml:lang)
      if(tag.equals(IW3CXMLConfiguration.NAME_ELEMENT)) {       
        INameEntity aName = new NameEntity();
        aName.fromXML(child);       
        // add it to our list only if its not a repetition of an
        // existing name for the locale
        if (isFirstLocalizedEntity(fNamesList,aName)) fNamesList.add(aName);
      }
     
View Full Code Here

Examples of org.apache.wookie.w3c.INameEntity

  public String getXMLTagName() {
    return null;
  }

  public String getLocalName(String locale) {
    INameEntity name = (INameEntity)LocalizationUtils.getLocalizedElement(fNamesList.toArray(new INameEntity[fNamesList.size()]), new String[]{locale}, null);
    if (name != null) return name.getName();
    return IW3CXMLConfiguration.UNKNOWN;
  }
View Full Code Here

Examples of org.apache.wookie.w3c.INameEntity

 
  @Test
  public void loadModifySave() throws Exception{
    File testWidget = new File("build/widgets/bubbles.wgt");
    W3CWidget widget = load(testWidget);
    INameEntity name = widget.getNames().get(0);
    name.setName("Modified Widget");
    WidgetOutputter outputter = new WidgetOutputter();
    outputter.setWidgetFolder("/widgets");
    String manifest = outputter.outputXMLString(widget);
    assertTrue(manifest.contains("Modified Widget"));
    assertTrue(manifest.contains("<content src=\"index.html\""));
View Full Code Here

Examples of org.apache.wookie.w3c.INameEntity

    if (output.exists()) output.delete();
    output.mkdir();
    fac.setOutputDirectory(output.getAbsolutePath());
    W3CWidget widget = fac.parse(new URL("http://dev.w3.org/2006/waf/widgets/test-suite/test-cases/ta-RRZxvvTFHx/001/b6.wgt"));
   
    INameEntity name = widget.getNames().get(0);
    name.setName("Re-Modified Widget");
    WidgetOutputter outputter = new WidgetOutputter();
    outputter.setWidgetFolder("/widgets");
   
    // Save the config.xml
    File widgetFolder = new File(output.getPath()+"/b6");
View Full Code Here

Examples of org.apache.wookie.w3c.INameEntity

  public String getXMLTagName() {
    return null;
  }

  public String getLocalName(String locale) {
    INameEntity name = (INameEntity)LocalizationUtils.getLocalizedElement(fNamesList.toArray(new INameEntity[fNamesList.size()]), new String[]{locale}, null);
    if (name != null) return name.getName();
    return IW3CXMLConfiguration.UNKNOWN;
  }
View Full Code Here

Examples of org.apache.wookie.w3c.INameEntity

  public String getXMLTagName() {
    return null;
  }

  public String getLocalName(String locale) {
    INameEntity name = (INameEntity)LocalizationUtils.getLocalizedElement(fNamesList.toArray(new INameEntity[fNamesList.size()]), new String[]{locale});
    if (name != null) return name.getName();
    return IW3CXMLConfiguration.UNKNOWN;
  }
View Full Code Here

Examples of org.apache.wookie.w3c.INameEntity

 
  // ta-AYLMhryBnD
  @Test
  public void nameLro(){
    W3CWidget widget;
    INameEntity name;

    widget = getWidget("001","lro");
    name = widget.getNames().get(0);
    addResult("i18nlro01", FormattingUtils.getFormattedWidgetName(name), "םפללחק");
    widget = getWidget("002","lro");
View Full Code Here

Examples of org.apache.wookie.w3c.INameEntity

  @Test
  public void nameLtr(){
      String dir ="ltr";
      W3CWidget widget;
      INameEntity name;

      widget = getWidget("001",dir);
      name = widget.getNames().get(0);
      addResult("i18n"+dir+"01", FormattingUtils.getFormattedWidgetName(name), "The arrow should point right -->");
      widget = getWidget("002",dir);
View Full Code Here

Examples of org.apache.wookie.w3c.INameEntity

 
  @Test
  public void nameRlo(){
    String dir ="rlo";
    W3CWidget widget;
    INameEntity name;

    widget = getWidget("001",dir);
    name = widget.getNames().get(0);
    addResult("i18n"+dir+"01", FormattingUtils.getFormattedWidgetName(name), "PASSED");
    widget = getWidget("002",dir);
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.