Esempio n. 1
0
  public Element generateXml() {
    Element element = null;
    if (this.portableType.equals(PortableType.IMPORTABLE)) {
      element = new Element(XMLElements.IMPORTABLE.toString());
      element.setAttribute(XMLElements.FILTERS.toString(), McUtils.listToStr(this.filterList, ","));
    } else {
      element = new Element(XMLElements.EXPORTABLE.toString());
      element.setAttribute(
          XMLElements.ATTRIBUTES.toString(), McUtils.listToStr(this.attributeList, ","));
      element.setAttribute(
          XMLElements.DEFAULT.toString(), this.getPropertyValue(XMLElements.DEFAULT));
    }
    element.setAttribute(XMLElements.NAME.toString(), this.getPropertyValue(XMLElements.NAME));
    element.setAttribute(XMLElements.INTERNALNAME.toString(), this.getInternalName());
    element.setAttribute(XMLElements.DISPLAYNAME.toString(), this.getDisplayName());
    element.setAttribute(XMLElements.DESCRIPTION.toString(), this.getDescription());

    element.setAttribute(
        XMLElements.VERSION.toString(), this.getPropertyValue(XMLElements.VERSION));
    element.setAttribute(
        XMLElements.ORDERBY.toString(), this.getPropertyValue(XMLElements.ORDERBY));
    element.setAttribute(
        XMLElements.LINKVERSION.toString(), this.getPropertyValue(XMLElements.LINKVERSION));
    element.setAttribute(XMLElements.TYPE.toString(), this.getPropertyValue(XMLElements.TYPE));
    element.setAttribute(XMLElements.LINKVERSIONS.toString(), this.MapToStr(this.linkVersionMap));
    return element;
  }
Esempio n. 2
0
 public ElementList(org.jdom.Element element) {
   super(element);
   this.filterList = new ArrayList<Filter>();
   this.attributeList = new ArrayList<Attribute>();
   this.linkVersionMap = new HashMap<String, String>();
   if (element.getName().equals(PortableType.IMPORTABLE.toString())) {
     this.setNodeType(McNodeType.IMPORTABLE);
     this.portableType = PortableType.IMPORTABLE;
     this.setProperty(
         XMLElements.FILTERS, element.getAttributeValue(XMLElements.FILTERS.toString()));
   } else {
     this.setNodeType(McNodeType.EXPORTABLE);
     this.portableType = PortableType.EXPORTABLE;
     this.setProperty(
         XMLElements.ATTRIBUTES, element.getAttributeValue(XMLElements.ATTRIBUTES.toString()));
   }
 }