Examples of fromXML()


Examples of org.apache.wookie.w3c.IAccessEntity.fromXML()

      }
     
      // ACCESS IS OPTIONAL  can be many
      if(tag.equals(IW3CXMLConfiguration.ACCESS_ELEMENT)) {                     
        IAccessEntity access = new AccessEntity();
        access.fromXML(child);
        if (access.getOrigin()!=null){
          if (access.getOrigin().equals("*")) {
            fAccessList.add(0, access);
          } else {
            fAccessList.add(access);
View Full Code Here

Examples of org.apache.wookie.w3c.IContentEntity.fromXML()

      // 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
View Full Code Here

Examples of org.apache.wookie.w3c.IDescriptionEntity.fromXML()

      }
     
      // DESCRIPTION IS OPTIONAL multiple on xml:lang
      if(tag.equals(IW3CXMLConfiguration.DESCRIPTION_ELEMENT)) {       
        IDescriptionEntity aDescription = new DescriptionEntity();
        aDescription.fromXML(child);
        // add it to our list only if its not a repetition of an
        // existing description for the locale and the language tag is valid
        if (isFirstLocalizedEntity(fDescriptionsList,aDescription) && aDescription.isValid()) fDescriptionsList.add(aDescription);
      }
     
View Full Code Here

Examples of org.apache.wookie.w3c.IFeatureEntity.fromXML()

      }
     
      // FEATURE IS OPTIONAL - can be many
      if(tag.equals(IW3CXMLConfiguration.FEATURE_ELEMENT)) {
        IFeatureEntity feature = new FeatureEntity(this.features);
        feature.fromXML(child);
        if (feature.getName()!=null) fFeaturesList.add(feature);
      }
     
      // PREFERENCE IS OPTIONAL - can be many
      if(tag.equals(IW3CXMLConfiguration.PREFERENCE_ELEMENT)) {
View Full Code Here

Examples of org.apache.wookie.w3c.IIconEntity.fromXML()

      }
     
      // ICON IS OPTIONAL - can be many
      if(tag.equals(IW3CXMLConfiguration.ICON_ELEMENT)) {           
        IIconEntity anIcon = new IconEntity();
        anIcon.fromXML(child,locales,zip);
        if (anIcon.getSrc()!=null) fIconsList.add(anIcon);
      }
     
      // ACCESS IS OPTIONAL  can be many
      if(tag.equals(IW3CXMLConfiguration.ACCESS_ELEMENT)) {                     
View Full Code Here

Examples of org.apache.wookie.w3c.ILicenseEntity.fromXML()

     
   
      // LICENSE IS OPTIONAL - can be many
      if(tag.equals(IW3CXMLConfiguration.LICENSE_ELEMENT)) {       
        ILicenseEntity aLicense = new LicenseEntity();
        aLicense.fromXML(child);
        // add it to our list only if its not a repetition of an
        // existing entry for the locale and the language tag is valid
        if (isFirstLocalizedEntity(fLicensesList,aLicense) && aLicense.isValid()) fLicensesList.add(aLicense);
      }
     
View Full Code Here

Examples of org.apache.wookie.w3c.INameEntity.fromXML()

      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.IParamEntity.fromXML()

      String tag = child.getName();     

      // PARAM optional, can be 0 or many
      if(tag.equals(IW3CXMLConfiguration.PARAM_ELEMENT)) { 
        IParamEntity aParam = new ParamEntity();
        aParam.fromXML(child);
        if (aParam.getName()!=null && aParam.getValue()!=null) fParams.add(aParam);
      }
    }
   
  }
View Full Code Here

Examples of org.apache.wookie.w3c.IPreferenceEntity.fromXML()

      }
     
      // PREFERENCE IS OPTIONAL - can be many
      if(tag.equals(IW3CXMLConfiguration.PREFERENCE_ELEMENT)) {
        IPreferenceEntity preference = new PreferenceEntity();
        preference.fromXML(child);
        // Skip preferences without names
        if (preference.getName() != null){
          // Skip preferences already defined
          boolean found = false;
          for (IPreferenceEntity pref:getPrefences()){
View Full Code Here

Examples of org.apache.wookie.w3c.impl.AccessEntity.fromXML()

 
  @Test
  public void noOrigin(){
    Element element = new Element("access");
    AccessEntity accessEntity = new AccessEntity();
    accessEntity.fromXML(element);
    assertEquals(null,accessEntity.getOrigin());
  }

  @Test
  public void okOrigin(){
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.