Example #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());
    }
  }
Example #2
0
 /**
  * constructor TabKeyword
  *
  * @return the widget composed by the Keywords Tab
  */
 public TabKeyword() {
   // initialize widget
   initWidget(uiBinder.createAndBindUi(this));
   // set style
   titleLabel.removeStyleName("gwt-Label");
   // set form names
   setFormName();
   // set interface
   setInterface();
   // change summary if the data type is data service
   if (EUOSMEGWT.metadataType.equalsIgnoreCase(DataTypes.DATA_SERVICE.toString()))
     summaryHTML.setHTML(constants.selectKeywordInfoDataService());
 }