Package pt.webdetails.cdf.dd.model.core

Examples of pt.webdetails.cdf.dd.model.core.Attribute


   
    Element compElem = parent.addElement("DesignerComponent");

    writeHeader(comp, compElem);

    Attribute cdeModelIgnoreAttr = comp.tryGetAttribute("cdeModelIgnore");
    Attribute cdeModelPrefixAttr = comp.tryGetAttribute("cdeModelPrefix");
    int ignoreCount = 0;
    if(cdeModelIgnoreAttr != null) { ignoreCount++; }
    if(cdeModelPrefixAttr != null) { ignoreCount++; }
   
    if(comp.getAttributeCount() > ignoreCount)
    {
      writeMetadata(comp, compElem);
    }
   
    // ----------------
    // CONTENTS
    Element contentsElem = compElem.addElement("Contents");

    Element modelElem = contentsElem.addElement("Model");
    if(cdeModelIgnoreAttr != null)
    {
      modelElem.addAttribute("ignore", cdeModelIgnoreAttr.getValue());
    }
   
    if(cdeModelPrefixAttr != null)
    {
      modelElem.addAttribute("prefix", cdeModelPrefixAttr.getValue());
    }
   
    // Property Usages
    for(String defName : comp.getDefinitionNames())
    {
View Full Code Here


{
  private CdeRunJsHelper() {}
 
  public static String getComponentTypeModelPrefix(ComponentType comp)
  {
    Attribute cdeModelPrefixAttr = comp.tryGetAttribute("cdeModelPrefix");
    String modelPrefix = cdeModelPrefixAttr != null ? cdeModelPrefixAttr.getValue() : null;
    return StringUtils.defaultIfEmpty(modelPrefix, "Components");
  }
View Full Code Here

  public void write(Object output, IThingWriteContext context, Thing t) throws ThingWriteException
  {
    ComponentType comp = (ComponentType)t;
    StringBuilder out  = (StringBuilder)output;
 
    Attribute cdeModelIgnoreAttr = comp.tryGetAttribute("cdeModelIgnore");
   
    if(cdeModelIgnoreAttr != null && "true".equals(cdeModelIgnoreAttr.getValue())) { return; }
   
    String name = comp.getName();
   
    // the name in cdefdejs/components/rows/type
    String modelPrefix  = CdeRunJsHelper.getComponentTypeModelPrefix(comp);
View Full Code Here

TOP

Related Classes of pt.webdetails.cdf.dd.model.core.Attribute

Copyright © 2018 www.massapicom. 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.