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.aswebdata.data.PagexXMLHelper Maven / Gradle / Ivy
/**
********************************************************************************
*** PagexXMLHelper.java ***
*** generated by AnoSiteGenerator (ASG), Version: 1.3.3 ***
*** Copyright (C) 2005 - 2010 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.aswebdata.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;
import java.util.List;
public class PagexXMLHelper{
public static final String[] LANGUAGES = new String[]{"EN","DE"};
private static XMLNode _toXML(Pagex object, String[] languages){
XMLNode ret = new XMLNode("Pagex");
ret.addAttribute(new XMLAttribute("id", object.getId()));
ret.addChildNode(XMLHelper.createXMLNodeForStringValue("name", null, object.getName() ));
ret.addChildNode(XMLHelper.createXMLNodeForStringValue("title", languages , object.getTitleEN(), object.getTitleDE() ));
ret.addChildNode(XMLHelper.createXMLNodeForStringValue("keywords", languages , object.getKeywordsEN(), object.getKeywordsDE() ));
ret.addChildNode(XMLHelper.createXMLNodeForStringValue("description", languages , object.getDescriptionEN(), object.getDescriptionDE() ));
ret.addChildNode(XMLHelper.createXMLNodeForListValue("mediaLinks", "string", object.getMediaLinks()));
ret.addChildNode(XMLHelper.createXMLNodeForListValue("scripts", "string", object.getScripts()));
ret.addChildNode(XMLHelper.createXMLNodeForListValue("attributes", "string", object.getAttributes()));
ret.addChildNode(XMLHelper.createXMLNodeForListValue("c1", "string", object.getC1()));
ret.addChildNode(XMLHelper.createXMLNodeForListValue("c2", "string", object.getC2()));
ret.addChildNode(XMLHelper.createXMLNodeForListValue("c3", "string", object.getC3()));
ret.addChildNode(XMLHelper.createXMLNodeForListValue("header", "string", object.getHeader()));
ret.addChildNode(XMLHelper.createXMLNodeForListValue("footer", "string", object.getFooter()));
ret.addChildNode(XMLHelper.createXMLNodeForListValue("localizations", "string", object.getLocalizations()));
ret.addChildNode(XMLHelper.createXMLNodeForBooleanValue("httpsonly", null, object.getHttpsonly() ));
ret.addChildNode(XMLHelper.createXMLNodeForStringValue("template", null, object.getTemplate() ));
ret.addChildNode(XMLHelper.createXMLNodeForStringValue("accessOperation", null, object.getAccessOperation() ));
if(object instanceof MultilingualObject){
MultilingualObject multilangDoc = (MultilingualObject) object;
ret.addChildNode(XMLHelper.createXMLNodeForBooleanValue("multilingualDisabled", null, multilangDoc.isMultilingualDisabledInstance()));
}
return ret;
}
public static XMLNode toXML(Pagex object){
return _toXML(object, LANGUAGES);
}
public static XMLNode toXML(Pagex object, String... languages){
if (languages==null || languages.length==0)
return toXML(object);
return _toXML(object, languages);
}
public static Pagex fromXML(XMLNode node){
return null;
}
}