
prerna.masterdatabase.utility.MetamodelVertex Maven / Gradle / Ivy
The newest version!
package prerna.masterdatabase.utility;
import java.util.Hashtable;
import java.util.Map;
import java.util.Set;
import java.util.TreeSet;
/**
* class to simplify the implementation
* of combining alias names and properties
* on vertices
*
*/
public class MetamodelVertex {
// store the property conceptual names
private Set propSet = new TreeSet();
// the conceptual name for the concept
private String conceptualName;
public MetamodelVertex(String conceptualName) {
this.conceptualName = conceptualName;
}
/**
* Add to the properties for the vertex
* @param propertyConceptual
* @param propertyAlias
*/
public void addProperty(String propertyConceptual) {
if (propertyConceptual.equals("noprop")) {
return;
}
propSet.add(propertyConceptual);
}
public Map toMap() {
Map vertexMap = new Hashtable();
vertexMap.put("conceptualName", this.conceptualName);
vertexMap.put("propSet", this.propSet);
return vertexMap;
}
public String toString() {
return toMap().toString();
}
public String getConceptualName() {
return this.conceptualName;
}
public Set getPropSet() {
return this.propSet;
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy