示例#1
0
  // método que introduce en la categoría General el nivel de agregación del ODE.
  public void setNivelDeAgregacion(java.lang.String agregacion) throws java.lang.Exception {

    String lomes = AgregaPropertiesImpl.getInstance().getProperty("esquemaDeMetadatos");

    AggregationLevel al = new AggregationLevel();
    GroupAggregationLevelAggregationLevel gal = new GroupAggregationLevelAggregationLevel();
    ComplexTypeAggregationLevelVocabSource ctalvs = new ComplexTypeAggregationLevelVocabSource();
    ComplexTypeAggregationLevelVocabValue ctalvv = new ComplexTypeAggregationLevelVocabValue();

    ctalvs.setContent(lomes);
    ctalvv.setContent(agregacion);
    gal.setComplexTypeAggregationLevelVocabSource(ctalvs);
    gal.setComplexTypeAggregationLevelVocabValue(ctalvv);
    al.setGroupAggregationLevelAggregationLevel(gal);

    if (general == null) {
      general = new General();
    }

    if (general.getGroupGeneralGeneral() == null) {
      GroupGeneralGeneral gggAux = new GroupGeneralGeneral();
      general.setGroupGeneralGeneral(gggAux);
    }

    general.getGroupGeneralGeneral().setAggregationLevel(al);
  }
示例#2
0
  public void setNivelDeAgregacionAv(String agregacion) throws Exception {
    //	   setNivelDeAgregacion(agregacion);

    try {

      String lomes = null;

      lomes =
          "lomes-esv1.0"; // AgregaPropertiesImpl.getInstance().getProperty("esquemaDeMetadatos");
      if (agregacion != null) {
        AggregationLevel al = new AggregationLevel();
        GroupAggregationLevelAggregationLevel gal = new GroupAggregationLevelAggregationLevel();
        ComplexTypeAggregationLevelVocabSource ctalvs =
            new ComplexTypeAggregationLevelVocabSource();
        ComplexTypeAggregationLevelVocabValue ctalvv = new ComplexTypeAggregationLevelVocabValue();

        ctalvs.setContent(lomes);
        ctalvv.setContent(agregacion);
        gal.setComplexTypeAggregationLevelVocabSource(ctalvs);
        gal.setComplexTypeAggregationLevelVocabValue(ctalvv);
        al.setGroupAggregationLevelAggregationLevel(gal);

        general.getGroupGeneralGeneral().setAggregationLevel(al);
      } else {
        general.getGroupGeneralGeneral().setAggregationLevel(null);
      }
    } catch (Exception e) {
      String mensaje = "Error: No es posible insertar la estructura";
      logger.error(mensaje);
      throw e;
    }
  }