public static AttributeMetaData generateAttributeMetaData(ExampleSetMetaData emd,String name,ExpressionType expressionType){
  AttributeMetaData newAttribute=null;
  AttributeMetaData existingAtt=emd.getAttributeByName(name);
  int ontology=expressionType.getAttributeType();
  if (ontology == Ontology.BINOMINAL) {
    newAttribute=new AttributeMetaData(name,Ontology.BINOMINAL);
    HashSet<String> values=new HashSet<>();
    values.add("false");
    values.add("true");
    newAttribute.setValueSet(values,SetRelation.EQUAL);
  }
 else {
    newAttribute=new AttributeMetaData(name,ontology);
  }
  if (existingAtt != null) {
    newAttribute.setRole(existingAtt.getRole());
  }
  return newAttribute;
}

public static AttributeMetaData generateAttributeMetaData ( ExampleSetMetaData emd , String name , ExpressionType expressionType ) { AttributeMetaData newAttribute = null ; AttributeMetaData existingAtt = emd . getAttributeByName ( name ) ; int ontology = expressionType . getAttributeType ( ) ; if ( ontology == Ontology . BINOMINAL ) { newAttribute = new AttributeMetaData ( name , Ontology . BINOMINAL ) ; HashSet < String > values = new HashSet < > ( ) ; values . add ( "false" ) ; values . add ( "true" ) ; newAttribute . setValueSet ( values , SetRelation . EQUAL ) ; } else { newAttribute = new AttributeMetaData ( name , ontology ) ; } if ( existingAtt != null ) { newAttribute . setRole ( existingAtt . getRole ( ) ) ; } return newAttribute ; }
creates attribute meta data that represents the attribute that will be generated for the provided arguments .
