Exemplo n.º 1
0
  @Override
  public void setInterface(int i) {
    if (EUOSMEGWT.appMode.equalsIgnoreCase(AppModes.EENVPLUS.toString())
        || EUOSMEGWT.appMode.equalsIgnoreCase(AppModes.GEOSS.toString())
        || EUOSMEGWT.appMode.equalsIgnoreCase(AppModes.GEOPORTAL.toString())
        || EUOSMEGWT.appMode.equalsIgnoreCase(AppModes.RDSI.toString())) {
      identifierObj.setRequired(true);
      identifierContainerObj.setRequired(true);
      if (EUOSMEGWT.metadataType.equals(DataTypes.DATA_SERVICE.toString())) {
        identifierObj.setRequired(false);
        identifierContainerObj.setRequired(false);

        identifierContainerObj.setVisible(false);
        identifierObj.setVisible(false);
      }
      if (i == 0) { // TAB Identification
        alternateTitleObj.setVisible(false);
        titleObj.setLabel(constants.resourceTitle());
        titleObj.setHelpAnchor("resourcetitle");
        // remove dates because are in conflict with tab temporal (publication date has the same
        // xpath)
        dateObj.setVisible(false);
        dateContainerObj.setVisible(false);
        dateContainerObj.removeFromParent();
        dateObj.removeFromParent();
      }
      if (i == 1) { // TAB keyword			
        alternateTitleObj.setVisible(false);
        identifierObj.setVisible(false);
        identifierContainerObj.setVisible(false);
        dateObj.removeDisclosure();
        dateObj.dateObj.setLabel(constants.referenceDate());
        dateObj.setMultiple(false);
        fieldsGroup.add(dateObj);
        dateContainerObj.setVisible(false);
        // do not autoupdate the free keyword field to the tree
        titleObj.setAutoupdate(false);
      }
      if (i == 2) { // TAB conformity
        fieldsGroup.clear();
        fieldsGroup.add(specificationObj);
        fieldsGroup.add(alternateTitleObj);
        fieldsGroup.add(identifierContainerObj);
        fieldsGroup.add(dateContainerObj);
        alternateTitleObj.setVisible(false);
        identifierObj.setVisible(false);
        identifierContainerObj.setVisible(false);
        dateContainerObj.setVisible(false);
        dateObj.setMultiple(false);
        dateObj.removeDisclosure();
        fieldsGroup.add(dateObj);
      }
    } // TAB Identification
    else if (i == 0) {
      titleObj.setLabel(constants.resourceTitle());
      alternateTitleObj.setLabel(constants.resourceAlternateTitle());
      identifierContainerObj.setLabel(constants.resourceIdentifier());
      identifierObj.setLabel(constants.resourceIdentifier());
    }
  }
Exemplo n.º 2
0
 /** Show or hide elements according to the selected {@link AppModes} */
 public void setInterface() {
   if (EUOSMEGWT.appMode.equalsIgnoreCase(AppModes.EENVPLUS.toString())
       || (EUOSMEGWT.appMode.equalsIgnoreCase(AppModes.GEOSS.toString())
           || EUOSMEGWT.appMode.equalsIgnoreCase(AppModes.GEOPORTAL.toString())
           || EUOSMEGWT.appMode.equalsIgnoreCase(AppModes.RDSI.toString()))) {
     keywordsObj.setRequired(true);
     keywordsObj.removeDisclosure();
     keywordsObj.setMultiple(false);
     keywordsContainerObj.addButton.setVisible(false);
     keywordsContainerObj.removeDisclosure();
   }
 }