Example #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;
  }
Example #2
0
 public void addAttribute(Attribute attribute) {
   this.attributeList.add(attribute);
   this.setProperty(XMLElements.ATTRIBUTES, McUtils.listToStr(this.attributeList, ","));
 }
Example #3
0
 public void addFilter(Filter filter) {
   this.filterList.add(filter);
   this.setProperty(XMLElements.FILTERS, McUtils.listToStr(this.filterList, ","));
 }