All Downloads are FREE. Search and download functionalities are using the official Maven repository.
Please wait. This can take some minutes ...
Many resources are needed to download a project. Please understand that we have to compensate our server costs. Thank you in advance.
Project price only 1 $
You can buy this project and download/modify it how often you want.
net.anotheria.anosite.gen.asexperiment.data.ExperimentXMLHelper Maven / Gradle / Ivy
/**
********************************************************************************
*** ExperimentXMLHelper.java ***
*** generated by AnoSiteGenerator (ASG), Version: 3.2.2 ***
*** Copyright (C) 2005 - 2023 Anotheria.net, www.anotheria.net ***
*** All Rights Reserved. ***
********************************************************************************
*** Don't edit this code, if you aren't sure ***
*** that you do exactly know what you are doing! ***
*** It's better to invest time in the generator, as into the generated code. ***
********************************************************************************
*/
package net.anotheria.anosite.gen.asexperiment.data;
import net.anotheria.util.xml.XMLNode;
import net.anotheria.util.xml.XMLAttribute;
import net.anotheria.asg.data.XMLHelper;
import net.anotheria.asg.data.MultilingualObject;
public class ExperimentXMLHelper{
public static final String[] LANGUAGES = new String[]{"EN","DE"};
private static XMLNode _toXML(Experiment object, String[] languages){
XMLNode ret = new XMLNode("Experiment");
ret.addAttribute(new XMLAttribute("id", object.getId()));
ret.addChildNode(XMLHelper.createXMLNodeForStringValue("name", null, object.getName() ));
ret.addChildNode(XMLHelper.createXMLNodeForBooleanValue("active", null, object.getActive() ));
ret.addChildNode(XMLHelper.createXMLNodeForIntValue("distribution", null, object.getDistribution() ));
ret.addChildNode(XMLHelper.createXMLNodeForTextValue("description", null, object.getDescription() ));
ret.addChildNode(XMLHelper.createXMLNodeForStringValue("variant1", null, object.getVariant1() ));
ret.addChildNode(XMLHelper.createXMLNodeForStringValue("variant2", null, object.getVariant2() ));
ret.addChildNode(XMLHelper.createXMLNodeForStringValue("variant3", null, object.getVariant3() ));
ret.addChildNode(XMLHelper.createXMLNodeForStringValue("variant4", null, object.getVariant4() ));
ret.addChildNode(XMLHelper.createXMLNodeForStringValue("variant5", null, object.getVariant5() ));
ret.addChildNode(XMLHelper.createXMLNodeForStringValue("variant6", null, object.getVariant6() ));
ret.addChildNode(XMLHelper.createXMLNodeForStringValue("variant7", null, object.getVariant7() ));
ret.addChildNode(XMLHelper.createXMLNodeForStringValue("variant8", null, object.getVariant8() ));
ret.addChildNode(XMLHelper.createXMLNodeForStringValue("variant9", null, object.getVariant9() ));
ret.addChildNode(XMLHelper.createXMLNodeForStringValue("variant10", null, object.getVariant10() ));
if(object instanceof MultilingualObject){
MultilingualObject multilangDoc = (MultilingualObject) object;
ret.addChildNode(XMLHelper.createXMLNodeForBooleanValue("multilingualDisabled", null, multilangDoc.isMultilingualDisabledInstance()));
}
return ret;
}
public static XMLNode toXML(Experiment object){
return _toXML(object, LANGUAGES);
}
public static XMLNode toXML(Experiment object, String... languages){
if (languages==null || languages.length==0)
return toXML(object);
return _toXML(object, languages);
}
public static Experiment fromXML(XMLNode node){
return null;
}
}