public String generate(Object argument) {
    final StringBuffer stringBuffer = new StringBuffer();
    Property curProperty = (Property) argument;
    Package uml2Package = curProperty.getNearestPackage();
    // String curPropertyGetAccessor=ModelHelper.getGetAccessor(curProperty);
    Class ownerClass = (Class) curProperty.getOwner();
    // Property ownerClassIdProperty=EntityHelper.getIDProperty(ownerClass);
    // String ownerClassIdPropertyGetter=ClassHelper.getGetAccessor(ownerClassIdProperty);
    UmlClassByPropertyWrap named = new UmlClassByPropertyWrap(curProperty);
    Class uml2Class = ownerClass;
    stringBuffer.append(TEXT_1);
    List<Property> tabsList = ViewInputHelper.getTabsProperty(uml2Class);
    List<Property> contentTabPropertyList = ViewInputHelper.getViewInputContentTab(uml2Class);
    if (!tabsList.isEmpty() || !contentTabPropertyList.isEmpty()) {
      stringBuffer.append(TEXT_2);
    }
    stringBuffer.append(TEXT_3);

    Property idProperty = EntityHelper.getIDProperty(uml2Class);
    String idPropertyUncapSafeName = NameHelper.uncapSafeName(idProperty);
    List<Property> propertyList = new ArrayList<Property>();
    List<Property> inputValidateList = ViewInputHelper.getInputPropertyForValidate(uml2Class);
    propertyList.addAll(inputValidateList);
    // List<Property> M2OSelectList=ViewInputHelper.getApplyM2OSelect(uml2Class);
    // List<Property> O2OSelectList=ViewInputHelper.getApplyO2OSelect(uml2Class);
    // List<Property> O2OSelectPageList=ViewInputHelper.getApplyO2OSelectPage(uml2Class);
    // List<Property> M2OSelectPageList=ViewInputHelper.getApplyM2OSelectPage(uml2Class);
    // propertyList.addAll(M2OSelectList);
    // propertyList.addAll(O2OSelectList);
    // propertyList.addAll(O2OSelectPageList);
    // propertyList.addAll(M2OSelectPageList);

    int count = 0;
    for (int i = 0; i < propertyList.size(); i++) {
      Property property = propertyList.get(i);
      if (ViewInputHelper.isViewInput_readonly(property)) {
        continue;
      }
      if (property.getName().equals(curProperty.getName())) {
        continue;
      }
      String jqueryValidate = PageHelper.getJqueryValidate(property);
      if (null != jqueryValidate) {
        String propertyCommentName = TypeHelper.getDocumentationOrName(property);
        if (!ClassHelper.isSimple(property)
            && null != jqueryValidate
            && !jqueryValidate.trim().equals("")) {
          // String propertySelectListKey=ViewInputHelper.getRelForListKey(property);
          Class propertyType = (Class) property.getType();
          // String propertyTypeComment = TypeHelper.getDocumentationOrName(propertyType);
          Property propertyTypeIdProperty = EntityHelper.getIDProperty(propertyType);
          String propertyTypeIdPropertyUncapSafeName =
              NameHelper.uncapSafeName(propertyTypeIdProperty);
          stringBuffer.append(TEXT_4);
          if (count != 0) {
            stringBuffer.append(TEXT_5);
          }
          stringBuffer.append(TEXT_6);
          stringBuffer.append(NameHelper.getUncapName(property));
          stringBuffer.append(TEXT_7);
          stringBuffer.append(propertyTypeIdPropertyUncapSafeName);
          stringBuffer.append(TEXT_8);
          stringBuffer.append(jqueryValidate);
          stringBuffer.append(TEXT_9);
          stringBuffer.append(++count);
          stringBuffer.append(TEXT_10);
          stringBuffer.append(propertyCommentName);
          stringBuffer.append(TEXT_11);
        } else {
          stringBuffer.append(TEXT_12);
          if (i != 0) {
            stringBuffer.append(TEXT_13);
          }
          stringBuffer.append(NameHelper.getUncapName(property));
          stringBuffer.append(TEXT_14);
          stringBuffer.append(jqueryValidate);
          stringBuffer.append(TEXT_15);
          stringBuffer.append(++count);
          stringBuffer.append(TEXT_16);
          stringBuffer.append(propertyCommentName);
        }
      }
      stringBuffer.append(TEXT_17);
    }
    stringBuffer.append(TEXT_18);
    stringBuffer.append(named.getUrl(WebUrlName.saveOutJson));
    stringBuffer.append(TEXT_19);
    List<Property> fileSimpleInputPropertyList =
        ViewInputHelper.getFileSimpleInputProperty(uml2Class);
    boolean firstLine = true;
    for (Iterator<Property> it = fileSimpleInputPropertyList.iterator();
        it.hasNext(); ) { // process simpleProperty
      Property property = it.next();
      // String propertyCommentName=TypeHelper.getDocumentationOrName(property);
      String propertyUncapSafeName = NameHelper.uncapSafeName(property);
      if (ClassHelper.isSimple(property)) {
        stringBuffer.append(TEXT_20);
        if (firstLine) {
          firstLine = false;
        } else {
          stringBuffer.append(TEXT_21);
        }
        stringBuffer.append(TEXT_22);
        stringBuffer.append(propertyUncapSafeName);
        stringBuffer.append(TEXT_23);
        stringBuffer.append(propertyUncapSafeName);
        stringBuffer.append(TEXT_24);
      } else if (ClassHelper.isOneToOne(property) || ClassHelper.isManyToOne(property)) {
        Type propertyType = property.getType();
        Class propertyTypeClass = (Class) propertyType;
        // String relTargetClassCapName=NameHelper.getCapName(relTargetClass);
        // String relTargetClassUncapName=NameHelper.getUncapName(relTargetClass);
        // String relTargetClassCommentName=TypeHelper.getDocumentationOrName(propertyTypeClass);
        // String
        // relM2OAndO2OSelectPage=NamedUtil.getPropertyNamedUncap(propertyTypeClass,PropertyNamedRuleKind.relM2OAndO2OSelectPage);
        Property propertyTypeIdProperty = EntityHelper.getIDProperty(propertyTypeClass);
        String propertyTypeIdPropertyUncapSafeName =
            NameHelper.uncapSafeName(propertyTypeIdProperty);
        stringBuffer.append(TEXT_25);
        if (firstLine) {
          firstLine = false;
        } else {
          stringBuffer.append(TEXT_26);
        }
        stringBuffer.append(TEXT_27);
        stringBuffer.append(propertyUncapSafeName);
        stringBuffer.append(TEXT_28);
        stringBuffer.append(propertyTypeIdPropertyUncapSafeName);
        stringBuffer.append(TEXT_29);
        stringBuffer.append(propertyUncapSafeName);
        stringBuffer.append(TEXT_30);
        stringBuffer.append(propertyTypeIdPropertyUncapSafeName);
        stringBuffer.append(TEXT_31);
      }
    }
    stringBuffer.append(TEXT_32);
    stringBuffer.append(named.getUrl(WebUrlName.updateOutJson));
    stringBuffer.append(TEXT_33);

    /**
     * *************************************************************** rel O2OSelectPage
     * M2OSelectPage /****************************************************************
     */
    List<Property> resultPropertyList = ViewInputHelper.getApplyM2OSelectPage(uml2Class);
    List<Property> m2oPropertyList = ViewListHelper.getViewListPropertiesFromM2o(uml2Class);
    List<Property> o2oPropertyList = ViewListHelper.getViewListPropertiesFromO2o(uml2Class);
    resultPropertyList.addAll(m2oPropertyList);
    resultPropertyList.addAll(o2oPropertyList);
    if (null != resultPropertyList && !resultPropertyList.isEmpty()) {
      for (Iterator<Property> iter = resultPropertyList.iterator(); iter.hasNext(); ) {
        Property property = iter.next();
        if (property.getName().equals(curProperty.getName())) {
          continue;
        }
        String propertyUncapSafeName = NameHelper.uncapSafeName(property);
        Type propertyType = property.getType();
        Class relTargetClass = (Class) propertyType;
        // String relTargetClassCapName=NameHelper.getCapName(relTargetClass);
        // String relTargetClassUncapName=NameHelper.getUncapName(relTargetClass);
        String relTargetClassCommentName = TypeHelper.getDocumentationOrName(relTargetClass);
        String relM2OAndO2OSelectPage =
            NamedUtil.getPropertyNamedUncap(
                relTargetClass, PropertyNamedRuleKind.relM2OAndO2OSelectPage);
        Property propertyTypeIdProperty = EntityHelper.getIDProperty(relTargetClass);
        String propertyTypeIdPropertyUncapSafeName =
            NameHelper.uncapSafeName(propertyTypeIdProperty);
        String listLabelPropertyUncapSafeName =
            ViewListHelper.getViewListLabelRelPropertyName(property);
        // String
        // listLabelPropertyComment=ViewListHelper.getViewListLabelRelPropertyComment(property);
        stringBuffer.append(TEXT_34);
        stringBuffer.append(relM2OAndO2OSelectPage);
        stringBuffer.append(TEXT_35);
        stringBuffer.append(relM2OAndO2OSelectPage);
        stringBuffer.append(TEXT_36);
        stringBuffer.append(relM2OAndO2OSelectPage);
        stringBuffer.append(TEXT_37);
        stringBuffer.append(relM2OAndO2OSelectPage);
        stringBuffer.append(TEXT_38);
        stringBuffer.append(relM2OAndO2OSelectPage);
        stringBuffer.append(TEXT_39);
        stringBuffer.append(relM2OAndO2OSelectPage);
        stringBuffer.append(TEXT_40);
        stringBuffer.append(relM2OAndO2OSelectPage);
        stringBuffer.append(TEXT_41);
        stringBuffer.append(relM2OAndO2OSelectPage);
        stringBuffer.append(TEXT_42);
        stringBuffer.append(relM2OAndO2OSelectPage);
        stringBuffer.append(TEXT_43);
        stringBuffer.append(relM2OAndO2OSelectPage);
        stringBuffer.append(TEXT_44);
        stringBuffer.append(relTargetClassCommentName);
        stringBuffer.append(TEXT_45);
        stringBuffer.append(
            MdaHelper.getModelUrlByRel(
                uml2Class, relTargetClass, WebUrlName.relM2OAndO2OSelectPage));
        stringBuffer.append(TEXT_46);
        stringBuffer.append(relM2OAndO2OSelectPage);
        stringBuffer.append(TEXT_47);
        stringBuffer.append(relM2OAndO2OSelectPage);
        stringBuffer.append(TEXT_48);
        stringBuffer.append(propertyUncapSafeName);
        stringBuffer.append(TEXT_49);
        stringBuffer.append(propertyTypeIdPropertyUncapSafeName);
        stringBuffer.append(TEXT_50);
        stringBuffer.append(propertyUncapSafeName);
        stringBuffer.append(TEXT_51);
        stringBuffer.append(listLabelPropertyUncapSafeName);
        stringBuffer.append(TEXT_52);
        stringBuffer.append(relM2OAndO2OSelectPage);
        stringBuffer.append(TEXT_53);
      }
    }
    return stringBuffer.toString();
  }
  public String generate(Object argument) {
    final StringBuffer stringBuffer = new StringBuffer();
    Property curProperty = (Property) argument;
    Package uml2Package = curProperty.getNearestPackage();
    // String curPropertyGetAccessor=ModelHelper.getGetAccessor(curProperty);
    Class ownerClass = (Class) curProperty.getOwner();
    // Property ownerClassIdProperty=EntityHelper.getIDProperty(ownerClass);
    // String ownerClassIdPropertyGetter=ClassHelper.getGetAccessor(ownerClassIdProperty);
    UmlClassByPropertyWrap named = new UmlClassByPropertyWrap(curProperty);
    Class uml2Class = ownerClass;

    List<Property> contentPropertyList = ViewInputHelper.getViewInputContentOrContentTab(uml2Class);

    stringBuffer.append(TEXT_1);
    List<Property> tabsList = ViewInputHelper.getTabsProperty(uml2Class);
    List<Property> contentTabPropertyList = ViewInputHelper.getViewInputContentTab(uml2Class);
    if (!tabsList.isEmpty() || !contentTabPropertyList.isEmpty()) {
      stringBuffer.append(TEXT_2);
    }
    stringBuffer.append(TEXT_3);

    List<Property> propertyList = new ArrayList<Property>();
    List<Property> inputValidateList = ViewInputHelper.getInputPropertyForValidate(uml2Class);
    propertyList.addAll(inputValidateList);
    // List<Property> simpleList=ViewInputHelper.getSimpleInputProperty(relClass);
    // List<Property> M2OSelectList=ViewInputHelper.getApplyM2OSelect(relClass);
    // List<Property> O2OSelectList=ViewInputHelper.getApplyO2OSelect(relClass);
    // List<Property> O2OSelectPageList=ViewInputHelper.getApplyO2OSelectPage(relClass);
    // List<Property> M2OSelectPageList=ViewInputHelper.getApplyM2OSelectPage(relClass);
    // propertyList.addAll(simpleList);
    // propertyList.addAll(M2OSelectList);
    // propertyList.addAll(O2OSelectList);
    // propertyList.addAll(O2OSelectPageList);
    // propertyList.addAll(M2OSelectPageList);

    int count = 0;
    for (int i = 0; i < propertyList.size(); i++) {
      Property property = propertyList.get(i);
      if (ViewInputHelper.isViewInput_readonly(property)) {
        continue;
      }
      if (property.getName().equals(curProperty.getName())) {
        continue;
      }
      String jqueryValidate = PageHelper.getJqueryValidate(property);
      if (null != jqueryValidate) {
        String propertyCommentName = TypeHelper.getDocumentationOrName(property);
        if (!ClassHelper.isSimple(property)
            && null != jqueryValidate
            && !jqueryValidate.trim().equals("")) {
          // String propertySelectListKey=ViewInputHelper.getRelForListKey(property);
          Class propertyType = (Class) property.getType();
          // String propertyTypeComment = TypeHelper.getDocumentationOrName(propertyType);
          Property propertyTypeIdProperty = EntityHelper.getIDProperty(propertyType);
          String propertyTypeIdPropertyUncapSafeName =
              NameHelper.uncapSafeName(propertyTypeIdProperty);
          stringBuffer.append(TEXT_4);
          if (count != 0) {
            stringBuffer.append(TEXT_5);
          }
          stringBuffer.append(TEXT_6);
          stringBuffer.append(NameHelper.getUncapName(property));
          stringBuffer.append(TEXT_7);
          stringBuffer.append(propertyTypeIdPropertyUncapSafeName);
          stringBuffer.append(TEXT_8);
          stringBuffer.append(jqueryValidate);
          stringBuffer.append(TEXT_9);
          stringBuffer.append(++count);
          stringBuffer.append(TEXT_10);
          stringBuffer.append(propertyCommentName);
          stringBuffer.append(TEXT_11);
        } else {
          stringBuffer.append(TEXT_12);
          if (i != 0) {
            stringBuffer.append(TEXT_13);
          }
          stringBuffer.append(NameHelper.getUncapName(property));
          stringBuffer.append(TEXT_14);
          stringBuffer.append(jqueryValidate);
          stringBuffer.append(TEXT_15);
          stringBuffer.append(++count);
          stringBuffer.append(TEXT_16);
          stringBuffer.append(propertyCommentName);
        }
      }
      stringBuffer.append(TEXT_17);
    }
    stringBuffer.append(TEXT_18);
    List<Property> m2oAndO2OProperty = ViewInputHelper.getApplyM2OAndO2OSelect(uml2Class);
    if (null != m2oAndO2OProperty && !m2oAndO2OProperty.isEmpty()) {
      for (Iterator<Property> iter = m2oAndO2OProperty.iterator(); iter.hasNext(); ) {
        stringBuffer.append(TEXT_19);
        Property property = iter.next();
        String propertyUncapSafeName = NameHelper.uncapSafeName(property);
        Class propertyType = (Class) property.getType();
        String propertyTypeComment = TypeHelper.getDocumentationOrName(propertyType);
        Property propertyTypeIdProperty = EntityHelper.getIDProperty(propertyType);
        String propertyTypeIdPropertyUncapSafeName =
            NameHelper.uncapSafeName(propertyTypeIdProperty);
        String listLabelPropertyUncapSafeName =
            ViewListHelper.getViewListLabelRelPropertyName(property);
        if (ModelStereoTypeHelper.isApplyModel_Tree(propertyType)) { // 应用了tree
          stringBuffer.append(TEXT_20);
          stringBuffer.append(propertyTypeComment);
          stringBuffer.append(TEXT_21);
          stringBuffer.append(propertyUncapSafeName);
          stringBuffer.append(TEXT_22);
          stringBuffer.append(listLabelPropertyUncapSafeName);
          stringBuffer.append(TEXT_23);
          stringBuffer.append(MdaHelper.getModelUrl(propertyType, WebUrlName.listTreeOutJson));
          stringBuffer.append(TEXT_24);
          stringBuffer.append(propertyUncapSafeName);
          stringBuffer.append(TEXT_25);
          stringBuffer.append(propertyTypeIdPropertyUncapSafeName);
          stringBuffer.append(TEXT_26);
          stringBuffer.append(propertyUncapSafeName);
          stringBuffer.append(TEXT_27);
          stringBuffer.append(propertyTypeIdPropertyUncapSafeName);
          stringBuffer.append(TEXT_28);
        } else {
          stringBuffer.append(TEXT_29);
          stringBuffer.append(propertyUncapSafeName);
          stringBuffer.append(TEXT_30);
          stringBuffer.append(listLabelPropertyUncapSafeName);
          stringBuffer.append(TEXT_31);
          stringBuffer.append(listLabelPropertyUncapSafeName);
          stringBuffer.append(TEXT_32);
          stringBuffer.append(propertyTypeIdPropertyUncapSafeName);
          stringBuffer.append(TEXT_33);
          stringBuffer.append(propertyUncapSafeName);
          stringBuffer.append(TEXT_34);
          stringBuffer.append(propertyTypeIdPropertyUncapSafeName);
          stringBuffer.append(TEXT_35);
          stringBuffer.append(MdaHelper.getModelUrl(propertyType, WebUrlName.listForSelectOutJson));
          stringBuffer.append(TEXT_36);
          Iterator<Property> simplePropertyList =
              ViewListHelper.getViewListPropertiesFromSimple(propertyType).iterator();
          Iterator<Property> m2oPropertyList =
              ViewListHelper.getViewListPropertiesFromM2o(propertyType).iterator();
          Iterator<Property> o2oPropertyList =
              ViewListHelper.getViewListPropertiesFromO2o(propertyType).iterator();
          boolean firstLine = true;
          for (; simplePropertyList.hasNext(); ) { // process simpleProperty
            Property relClassProperty = simplePropertyList.next();
            String relClassPropertyCommentName =
                TypeHelper.getDocumentationOrName(relClassProperty);
            String relClassPropertyUncapSafeName = NameHelper.uncapSafeName(relClassProperty);
            int width = ViewListHelper.getViewListWidth(relClassProperty);
            boolean sortable = ViewListHelper.isSortable(relClassProperty);
            // process apply enumeration
            Enumeration enumeration =
                EnumKindHelper.getAppliedEnumKindEnumeration(relClassProperty);
            if (null != enumeration) {
              String modelEnumName =
                  MdaHelper.getModelClassName(enumeration, ModelNameSuffix.enumeration);
              stringBuffer.append(TEXT_37);
              if (firstLine) {
                firstLine = false;
              } else {
                stringBuffer.append(TEXT_38);
              }
              stringBuffer.append(TEXT_39);
              stringBuffer.append(relClassPropertyCommentName);
              stringBuffer.append(TEXT_40);
              stringBuffer.append(relClassPropertyUncapSafeName);
              stringBuffer.append(TEXT_41);
              stringBuffer.append(width);
              stringBuffer.append(TEXT_42);
              stringBuffer.append(sortable);
              stringBuffer.append(TEXT_43);
              stringBuffer.append(modelEnumName);
              stringBuffer.append(TEXT_44);
            } else {
              stringBuffer.append(TEXT_45);
              if (firstLine) {
                firstLine = false;
              } else {
                stringBuffer.append(TEXT_46);
              }
              stringBuffer.append(TEXT_47);
              stringBuffer.append(relClassPropertyCommentName);
              stringBuffer.append(TEXT_48);
              stringBuffer.append(relClassPropertyUncapSafeName);
              stringBuffer.append(TEXT_49);
              stringBuffer.append(width);
              stringBuffer.append(TEXT_50);
              stringBuffer.append(sortable);
              stringBuffer.append(TEXT_51);
            }
          }
          for (; m2oPropertyList.hasNext(); ) { // process m2oPropertyList
            Property relClassProperty = m2oPropertyList.next();
            Class relClassPropertyType = (Class) relClassProperty.getType();
            String relClassPropertyTypeCommentName =
                TypeHelper.getDocumentationOrName(relClassPropertyType);
            String relClassPropertyUncapSafeName = NameHelper.uncapSafeName(relClassProperty);
            int width = ViewListHelper.getViewListWidth(relClassProperty);
            boolean sortable = ViewListHelper.isSortable(relClassProperty);
            // rel list label
            String relClassPropertyListLabelUncapSafeName =
                ViewListHelper.getViewListLabelRelPropertyName(relClassProperty);
            String relClassPropertyListLabelComment =
                ViewListHelper.getViewListLabelRelPropertyComment(relClassProperty);
            stringBuffer.append(TEXT_52);
            if (firstLine) {
              firstLine = false;
            } else {
              stringBuffer.append(TEXT_53);
            }
            stringBuffer.append(TEXT_54);
            stringBuffer.append(relClassPropertyTypeCommentName);
            stringBuffer.append(relClassPropertyListLabelComment);
            stringBuffer.append(TEXT_55);
            stringBuffer.append(relClassPropertyUncapSafeName);
            stringBuffer.append(TEXT_56);
            stringBuffer.append(relClassPropertyListLabelUncapSafeName);
            stringBuffer.append(TEXT_57);
            stringBuffer.append(width);
            stringBuffer.append(TEXT_58);
            stringBuffer.append(sortable);
            stringBuffer.append(TEXT_59);
          }
          for (; o2oPropertyList.hasNext(); ) { // process o2oPropertyList
            Property relClassProperty = o2oPropertyList.next();
            Class relClassPropertyType = (Class) relClassProperty.getType();
            String relClassPropertyTypeCommentName =
                TypeHelper.getDocumentationOrName(relClassPropertyType);
            String relClassPropertyUncapSafeName = NameHelper.uncapSafeName(relClassProperty);
            int width = ViewListHelper.getViewListWidth(relClassProperty);
            boolean sortable = ViewListHelper.isSortable(relClassProperty);
            // rel list label
            String relClassPropertyListLabelUncapSafeName =
                ViewListHelper.getViewListLabelRelPropertyName(relClassProperty);
            String relClassPropertyListLabelComment =
                ViewListHelper.getViewListLabelRelPropertyComment(relClassProperty);
            stringBuffer.append(TEXT_60);
            if (firstLine) {
              firstLine = false;
            } else {
              stringBuffer.append(TEXT_61);
            }
            stringBuffer.append(TEXT_62);
            stringBuffer.append(relClassPropertyTypeCommentName);
            stringBuffer.append(relClassPropertyListLabelComment);
            stringBuffer.append(TEXT_63);
            stringBuffer.append(relClassPropertyUncapSafeName);
            stringBuffer.append(TEXT_64);
            stringBuffer.append(relClassPropertyListLabelUncapSafeName);
            stringBuffer.append(TEXT_65);
            stringBuffer.append(width);
            stringBuffer.append(TEXT_66);
            stringBuffer.append(sortable);
            stringBuffer.append(TEXT_67);
          }
          stringBuffer.append(TEXT_68);
          stringBuffer.append(NameHelper.uncapSafeName(propertyTypeIdProperty));
          stringBuffer.append(TEXT_69);
        }
      }
    }
    stringBuffer.append(TEXT_70);
    stringBuffer.append(named.getUrl(WebUrlName.saveOutJson));
    stringBuffer.append(TEXT_71);
    List<String> postDataList = new ArrayList<String>();
    stringBuffer.append(TEXT_72);
    if (!contentPropertyList.isEmpty()) {
      for (Iterator<Property> iter = contentPropertyList.iterator(); iter.hasNext(); ) {
        Property property = iter.next();
        String propertyUncapSafeName = NameHelper.uncapSafeName(property);
        stringBuffer.append(TEXT_73);
        stringBuffer.append(propertyUncapSafeName);
        stringBuffer.append(TEXT_74);
        stringBuffer.append(propertyUncapSafeName);
        stringBuffer.append(TEXT_75);
        postDataList.add(propertyUncapSafeName + ":" + propertyUncapSafeName);
        stringBuffer.append(TEXT_76);
      }
    }
    stringBuffer.append(TEXT_77);
    if (!postDataList.isEmpty()) {
      stringBuffer.append(TEXT_78);
      stringBuffer.append(GenHelper.constructPostDataJsObject(postDataList));
      stringBuffer.append(TEXT_79);
    }
    stringBuffer.append(TEXT_80);
    stringBuffer.append(named.getUrl(WebUrlName.updateOutJson));
    stringBuffer.append(TEXT_81);
    if (!contentPropertyList.isEmpty()) {
      for (Iterator<Property> iter = contentPropertyList.iterator(); iter.hasNext(); ) {
        Property property = iter.next();
        String propertyUncapSafeName = NameHelper.uncapSafeName(property);
        stringBuffer.append(TEXT_82);
        stringBuffer.append(propertyUncapSafeName);
        stringBuffer.append(TEXT_83);
        stringBuffer.append(propertyUncapSafeName);
        stringBuffer.append(TEXT_84);
      }
    }
    stringBuffer.append(TEXT_85);
    if (!postDataList.isEmpty()) {
      stringBuffer.append(TEXT_86);
      stringBuffer.append(GenHelper.constructPostDataJsObject(postDataList));
      stringBuffer.append(TEXT_87);
    }
    stringBuffer.append(TEXT_88);
    /*It's no need, so comment it
    stringBuffer.append(TEXT_89);
    stringBuffer.append(MdaHelper.getModelUrlByRel(ownerClass,relClass,WebUrlName.saveOutJson));
    stringBuffer.append(TEXT_90);
    stringBuffer.append(idPropertyUncapSafeName);
    stringBuffer.append(TEXT_91);
    */
    stringBuffer.append(TEXT_92);

    /**
     * *************************************************************** process image property
     * /****************************************************************
     */
    if (FileStereotypeHelper.hasProperty_Image(uml2Class)) { // image
      Property property = FileStereotypeHelper.getProperty_Image(uml2Class);
      String propertyUncapSafeName = NameHelper.uncapSafeName(property);
      stringBuffer.append(TEXT_93);
      stringBuffer.append(propertyUncapSafeName);
      stringBuffer.append(TEXT_94);
      stringBuffer.append(propertyUncapSafeName);
      stringBuffer.append(TEXT_95);
      stringBuffer.append(propertyUncapSafeName);
      stringBuffer.append(TEXT_96);
      stringBuffer.append(propertyUncapSafeName);
      stringBuffer.append(TEXT_97);
      stringBuffer.append(propertyUncapSafeName);
      stringBuffer.append(TEXT_98);
      stringBuffer.append(propertyUncapSafeName);
      stringBuffer.append(TEXT_99);
      stringBuffer.append(propertyUncapSafeName);
      stringBuffer.append(TEXT_100);
      stringBuffer.append(propertyUncapSafeName);
      stringBuffer.append(TEXT_101);
      stringBuffer.append(propertyUncapSafeName);
      stringBuffer.append(TEXT_102);
      stringBuffer.append(propertyUncapSafeName);
      stringBuffer.append(TEXT_103);
      stringBuffer.append(MdaHelper.getModelUrl(uml2Class, WebUrlName.deleteImageOutJson));
      stringBuffer.append(TEXT_104);
      stringBuffer.append(propertyUncapSafeName);
      stringBuffer.append(TEXT_105);
      stringBuffer.append(propertyUncapSafeName);
      stringBuffer.append(TEXT_106);
      stringBuffer.append(propertyUncapSafeName);
      stringBuffer.append(TEXT_107);
      stringBuffer.append(propertyUncapSafeName);
      stringBuffer.append(TEXT_108);
      stringBuffer.append(propertyUncapSafeName);
      stringBuffer.append(TEXT_109);
      stringBuffer.append(propertyUncapSafeName);
      stringBuffer.append(TEXT_110);
      stringBuffer.append(propertyUncapSafeName);
      stringBuffer.append(TEXT_111);
      stringBuffer.append(propertyUncapSafeName);
      stringBuffer.append(TEXT_112);
    }

    /**
     * *************************************************************** process file property
     * /****************************************************************
     */
    if (FileStereotypeHelper.hasProperty_File(uml2Class)) { // file
      Property property = FileStereotypeHelper.getProperty_File(uml2Class);
      String propertyUncapSafeName = NameHelper.uncapSafeName(property);
      stringBuffer.append(TEXT_113);
      stringBuffer.append(propertyUncapSafeName);
      stringBuffer.append(TEXT_114);
      stringBuffer.append(propertyUncapSafeName);
      stringBuffer.append(TEXT_115);
      stringBuffer.append(MdaHelper.getModelUrl(uml2Class, WebUrlName.deleteImageOutJson));
      stringBuffer.append(TEXT_116);
      stringBuffer.append(propertyUncapSafeName);
      stringBuffer.append(TEXT_117);
    }

    /**
     * *************************************************************** rel O2OSelectPage
     * M2OSelectPage /****************************************************************
     */
    List<Property> resultPropertyList = ViewInputHelper.getApplyM2OSelectPage(uml2Class);
    // List<Property> m2oPropertyList=ViewListHelper.getViewListPropertiesFromM2o(uml2Class);
    // List<Property> o2oPropertyList=ViewListHelper.getViewListPropertiesFromO2o(uml2Class);
    // resultPropertyList.addAll(m2oPropertyList);
    // resultPropertyList.addAll(o2oPropertyList);
    if (null != resultPropertyList && !resultPropertyList.isEmpty()) {
      for (Iterator<Property> iter = resultPropertyList.iterator(); iter.hasNext(); ) {
        Property property = iter.next();
        if (property.getName().equals(curProperty.getName())) {
          continue;
        }
        String propertyUncapSafeName = NameHelper.uncapSafeName(property);
        Type propertyType = property.getType();
        Class propertyTypeClass = (Class) propertyType;
        // String relTargetClassCapName=NameHelper.getCapName(relTargetClass);
        // String relTargetClassUncapName=NameHelper.getUncapName(relTargetClass);
        String relTargetClassCommentName = TypeHelper.getDocumentationOrName(propertyTypeClass);
        String relM2OAndO2OSelectPage =
            NamedUtil.getPropertyNamedUncap(
                propertyTypeClass, PropertyNamedRuleKind.relM2OAndO2OSelectPage);
        Property propertyTypeIdProperty = EntityHelper.getIDProperty(propertyTypeClass);
        String propertyTypeIdPropertyUncapSafeName =
            NameHelper.uncapSafeName(propertyTypeIdProperty);
        String listLabelPropertyUncapSafeName =
            ViewListHelper.getViewListLabelRelPropertyName(property);
        // String
        // listLabelPropertyComment=ViewListHelper.getViewListLabelRelPropertyComment(property);
        stringBuffer.append(TEXT_118);
        stringBuffer.append(relTargetClassCommentName);
        stringBuffer.append(TEXT_119);
        stringBuffer.append(relM2OAndO2OSelectPage);
        stringBuffer.append(TEXT_120);
        stringBuffer.append(relM2OAndO2OSelectPage);
        stringBuffer.append(TEXT_121);
        stringBuffer.append(relM2OAndO2OSelectPage);
        stringBuffer.append(TEXT_122);
        stringBuffer.append(relM2OAndO2OSelectPage);
        stringBuffer.append(TEXT_123);
        stringBuffer.append(relM2OAndO2OSelectPage);
        stringBuffer.append(TEXT_124);
        stringBuffer.append(relM2OAndO2OSelectPage);
        stringBuffer.append(TEXT_125);
        stringBuffer.append(relM2OAndO2OSelectPage);
        stringBuffer.append(TEXT_126);
        stringBuffer.append(relM2OAndO2OSelectPage);
        stringBuffer.append(TEXT_127);
        stringBuffer.append(relM2OAndO2OSelectPage);
        stringBuffer.append(TEXT_128);
        stringBuffer.append(relM2OAndO2OSelectPage);
        stringBuffer.append(TEXT_129);
        stringBuffer.append(relTargetClassCommentName);
        stringBuffer.append(TEXT_130);
        stringBuffer.append(MdaHelper.getModelUrl(propertyTypeClass, WebUrlName.listForSelect));
        stringBuffer.append(TEXT_131);
        stringBuffer.append(relM2OAndO2OSelectPage);
        stringBuffer.append(TEXT_132);
        stringBuffer.append(relM2OAndO2OSelectPage);
        stringBuffer.append(TEXT_133);
        stringBuffer.append(propertyUncapSafeName);
        stringBuffer.append(TEXT_134);
        stringBuffer.append(propertyTypeIdPropertyUncapSafeName);
        stringBuffer.append(TEXT_135);
        stringBuffer.append(propertyUncapSafeName);
        stringBuffer.append(TEXT_136);
        stringBuffer.append(listLabelPropertyUncapSafeName);
        stringBuffer.append(TEXT_137);
        stringBuffer.append(relM2OAndO2OSelectPage);
        stringBuffer.append(TEXT_138);
        stringBuffer.append(propertyUncapSafeName);
        stringBuffer.append(TEXT_139);
        stringBuffer.append(propertyTypeIdPropertyUncapSafeName);
        stringBuffer.append(TEXT_140);
        stringBuffer.append(propertyUncapSafeName);
        stringBuffer.append(TEXT_141);
        stringBuffer.append(listLabelPropertyUncapSafeName);
        stringBuffer.append(TEXT_142);
      }
    }
    return stringBuffer.toString();
  }
Exemplo n.º 3
0
  public static void main(String args[]) {
    XComponent xDrawDoc = null;
    try {
      // get the remote office context of a running office (a new office
      // instance is started if necessary)
      com.sun.star.uno.XComponentContext xOfficeContext = Helper.connect();

      // suppress Presentation Autopilot when opening the document
      // properties are the same as described for
      // com.sun.star.document.MediaDescriptor
      PropertyValue[] pPropValues = new PropertyValue[1];
      pPropValues[0] = new PropertyValue();
      pPropValues[0].Name = "Silent";
      pPropValues[0].Value = Boolean.TRUE;

      xDrawDoc =
          Helper.createDocument(
              xOfficeContext, "private:factory/simpress", "_blank", 0, pPropValues);

      XDrawPage xPage = PageHelper.getDrawPageByIndex(xDrawDoc, 0);
      XPropertySet xPagePropSet = UnoRuntime.queryInterface(XPropertySet.class, xPage);

      XShapes xShapes = UnoRuntime.queryInterface(XShapes.class, xPage);

      XShape xShape =
          ShapeHelper.createShape(
              xDrawDoc,
              new Point(0, 0),
              new Size(10000, 2500),
              "com.sun.star.drawing.RectangleShape");
      xShapes.add(xShape);

      XPropertySet xPropSet = UnoRuntime.queryInterface(XPropertySet.class, xShape);

      HomogenMatrix3 aHomogenMatrix3 = (HomogenMatrix3) xPropSet.getPropertyValue("Transformation");

      java.awt.geom.AffineTransform aOriginalMatrix =
          new java.awt.geom.AffineTransform(
              aHomogenMatrix3.Line1.Column1, aHomogenMatrix3.Line2.Column1,
              aHomogenMatrix3.Line1.Column2, aHomogenMatrix3.Line2.Column2,
              aHomogenMatrix3.Line1.Column3, aHomogenMatrix3.Line2.Column3);

      AffineTransform aNewMatrix1 = new AffineTransform();
      aNewMatrix1.setToRotation(Math.PI / 180 * 15);
      aNewMatrix1.concatenate(aOriginalMatrix);

      AffineTransform aNewMatrix2 = new AffineTransform();
      aNewMatrix2.setToTranslation(2000, 2000);
      aNewMatrix2.concatenate(aNewMatrix1);

      double aFlatMatrix[] = new double[6];
      aNewMatrix2.getMatrix(aFlatMatrix);
      aHomogenMatrix3.Line1.Column1 = aFlatMatrix[0];
      aHomogenMatrix3.Line2.Column1 = aFlatMatrix[1];
      aHomogenMatrix3.Line1.Column2 = aFlatMatrix[2];
      aHomogenMatrix3.Line2.Column2 = aFlatMatrix[3];
      aHomogenMatrix3.Line1.Column3 = aFlatMatrix[4];
      aHomogenMatrix3.Line2.Column3 = aFlatMatrix[5];
      xPropSet.setPropertyValue("Transformation", aHomogenMatrix3);

    } catch (Exception ex) {
      System.out.println(ex);
    }
    System.exit(0);
  }
  /** Draw the background layer for the GuiContainer (everything behind the items) */
  protected void drawGuiContainerBackgroundLayer(float par1, int par2, int par3) {
    //    	System.out.println("RAWR " + DustManager.isEmpty() + " " + InscriptionManager.isEmpty());
    int i = mc.renderEngine.getTexture(DustMod.path + "/tomeGui.png");
    GL11.glColor4f(1.0F, 1.0F, 1.0F, 1.0F);
    mc.renderEngine.bindTexture(i);
    //
    // mc.renderEngine.bindTexture(mc.renderEngine.getTexture(RenderDustTable.getPagePath(page)));
    int j = (width - xSize) / 2 - offX;
    int k = (height - ySize) / 2;
    xStart = j;
    yStart = k;
    int pageWidth = 70;
    int pageHeight = 56;
    int ox = 4;
    int oy = 4;
    float scalex = (float) (xSize - ox * 2) / 256F;
    float scaley = (float) (ySize - oy * 2) / 256F;
    float res = xSize / ySize;
    drawTexturedModalRect(j, k, 24, 0, xSize, ySize);
    GL11.glPushMatrix();
    GL11.glScalef(1 / res, res, 1);
    GL11.glTranslatef(j + ox, k + oy, 0);
    GL11.glScalef(scalex, scaley, 1f);
    //        System.out.println("Scale " + scalex + " " + scaley);
    if (isRunes()) {
      if (getRunePage() == 0) {
        if (DustManager.isEmpty()) {
          mc.renderEngine.bindTexture(
              mc.renderEngine.getTexture(DustMod.path + "/pages" + "/no_runes.png"));
        } else {
          mc.renderEngine.bindTexture(mc.renderEngine.getTexture(DustMod.path + "/pages/info.png"));
        }
      } else
        PageHelper.bindExternalTexture(
            PageHelper.runeFolder + RenderDustTable.getRunePageName(getRunePage()) + ".png");
    } else {
      if (getInsPage() == 0) {
        if (InscriptionManager.isEmpty()) {
          mc.renderEngine.bindTexture(
              mc.renderEngine.getTexture(DustMod.path + "/pages" + "/no_inscriptions.png"));
        } else {
          mc.renderEngine.bindTexture(
              mc.renderEngine.getTexture(DustMod.path + "/pages" + "/info.png"));
        }
      } else
        PageHelper.bindExternalTexture(
            PageHelper.insFolder
                + InscriptionManager.getEventInOrder(getInsPage() - 1).getIDName()
                + ".png");
    }
    drawTexturedModalRect(0, 0, 0, 0, 256, 256);

    GL11.glPopMatrix();

    if (isRunes()) {
      mc.renderEngine.bindTexture(i);
      drawTexturedModalRect(j - 6, k, 12, 0, 12, ySize);
    } else {
      mc.renderEngine.bindTexture(i);
      drawTexturedModalRect(j - 6, k, 0, 0, 12, ySize);
    }
  }