src/main/java/br/ufpa/labes/spm/service/impl/ProjectServicesImpl.java
private Collection buildAttributeCollectionForElement(Element element) {

    Element item = (Element) element.getChildren().get(0);
    String className = item.getAttributeValue("Class");

    // Auxiliary collection for set operation
    Collection aux = new HashSet();

    Class collectionGenerics = null;

    if (this.isPrimitive(className)) {

      try {
        collectionGenerics = Class.forName("java.lang." + className);
      } catch (ClassNotFoundException e1) {
        e1.printStackTrace();
        return null;
      }
    } else if (className.equals(Date.class.getSimpleName())) {
      collectionGenerics = Date.class;
    } else {
      return null;
    }

    // Adding values in the auxiliary collection
    for (int j = 0; j < element.getChildren().size(); j++) {
      item = (Element) element.getChildren().get(j);

      Object att = this.buildAttribute(collectionGenerics, item.getValue());
      if (att != null) {
        aux.add(att);
      }
    }
    return aux;
  }
/** Create the collection with the elements (it must be primitive/Java type) */
Create the collection with the elements (it must be primitive/Java type)
Create the collection with the elements ( it must be primitive / Java type )
private Collection buildAttributeCollectionForElement(Element element) {
    Element item = (Element) element.getChildren().get(0);
    String className = item.getAttributeValue("Class");
    Collection aux = new HashSet();
    Class collectionGenerics = null;
    if (this.isPrimitive(className)) {
      try {
        collectionGenerics = Class.forName("java.lang." + className);
      } catch (ClassNotFoundException e1) {
        e1.printStackTrace();
        return null;
      }
    } else if (className.equals(Date.class.getSimpleName())) {
      collectionGenerics = Date.class;
    } else {
      return null;
    }
    for (int j = 0; j < element.getChildren().size(); j++) {
      item = (Element) element.getChildren().get(j);
      Object att = this.buildAttribute(collectionGenerics, item.getValue());
      if (att != null) {
        aux.add(att);
      }
    }
    return aux;
  }
private Collection buildAttributeCollectionForElement ( Element element ) { Element item = ( Element ) element . getChildren ( ) . get ( 0 ) ; String className = item . getAttributeValue ( "Class" ) ; Collection aux = new HashSet ( ) ; Class collectionGenerics = null ; if ( this . isPrimitive ( className ) ) { try { collectionGenerics = Class . forName ( "java.lang." + className ) ; } catch ( ClassNotFoundException e1 ) { e1 . printStackTrace ( ) ; return null ; } } else if ( className . equals ( Date . class . getSimpleName ( ) ) ) { collectionGenerics = Date . class ; } else { return null ; } for ( int j = 0 ; j < element . getChildren ( ) . size ( ) ; j ++ ) { item = ( Element ) element . getChildren ( ) . get ( j ) ; Object att = this . buildAttribute ( collectionGenerics , item . getValue ( ) ) ; if ( att != null ) { aux . add ( att ) ; } } return aux ; }
Create the collection with the elements (it must be primitive/Java type)
Create the collection with the elements ( it must be primitive / Java type )
// Auxiliary collection for set operation // Adding values in the auxiliary collection