예제 #1
0
  public void setEstructuraAv(String estructura) throws Exception {
    try {

      String estructuraProp = null;

      estructuraProp =
          "lomes-esv1.0"; // AgregaPropertiesImpl.getInstance().getProperty("esquemaDeMetadatos");
      if (estructura != null) {
        Structure structure = new Structure();
        GroupStructureStructure gss = new GroupStructureStructure();
        ComplexTypeStructureVocabValue ctsvv = new ComplexTypeStructureVocabValue();
        ComplexTypeStructureVocabSource ctsvs = new ComplexTypeStructureVocabSource();
        ctsvv.setContent(estructura);
        ctsvs.setContent(estructuraProp);
        gss.setComplexTypeStructureVocabSource(ctsvs);
        gss.setComplexTypeStructureVocabValue(ctsvv);
        structure.setGroupStructureStructure(gss);
        general.getGroupGeneralGeneral().setStructure(structure);
      } else {
        general.getGroupGeneralGeneral().setStructure(null);
      }
    } catch (Exception e) {
      String mensaje = "Error: No es posible insertar la estructura";
      logger.error(mensaje);
      throw e;
    }
  }
예제 #2
0
  public java.lang.String getEstructuraAv() throws java.lang.Exception {

    java.lang.String lString = null;

    try {
      Structure structura = general.getGroupGeneralGeneral().getStructure();
      if (structura != null)
        lString =
            structura.getGroupStructureStructure().getComplexTypeStructureVocabValue().getContent();
    } catch (Exception e) {
      String mensaje = "Warning: No es posible recoger la estructura";
      logger.warn(mensaje);

      lString = null;
      return lString;
      // throw e;
    }

    return lString;
  }