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
 @Override
 public void setFormName(String name) {
   super.setFormName(name);
   titleObj.setFormName(name + ".title[1].characterstring[1]");
   specificationObj.setFormName(name + ".title[1].characterstring[1]");
   alternateTitleObj.setFormName(name + ".alternatetitle[1].characterstring[1]");
   identifierObj.setFormName(name + ".identifier[1].rs_identifier[1]");
   identifierContainerObj.setFormName(name + ".identifier[1]");
   dateObj.setFormName(name + ".date[1].ci_date[1]");
   dateContainerObj.setFormName(name + ".date[1]");
 }
Exemplo n.º 3
0
 /** Set the IDs of the contained objects */
 public void setFormName() {
   keywordsObj.setFormName(
       "md_metadata[1].identificationinfo[1]."
           + MainPanel.identificationInfoSubType
           + "[1].descriptivekeywords[1].md_keywords[1]");
   keywordsContainerObj.setFormName(
       "md_metadata[1].identificationinfo[1]."
           + MainPanel.identificationInfoSubType
           + "[1].descriptivekeywords[1]");
 }
Exemplo n.º 4
0
 public void addKeyword(
     String myString,
     String mySource,
     String myDate,
     String myDateType,
     String myUri,
     String nodeName,
     String parent) { // MG 28.04.2015
   keywordsObj.setFormName(nodeName);
   keywordsContainerObj.setFormName(parent);
   keywordsObj.addNew(myString, mySource, myDate, myDateType, myUri, nodeName);
 }
Exemplo n.º 5
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();
   }
 }