org.databene.model.data.FeatureDescriptor Maven / Gradle / Ivy
Go to download
benerator is a framework for creating realistic and valid high-volume test data, used for
testing (unit/integration/load) and showcase setup.
Metadata constraints are imported from systems and/or configuration files. Data can imported from
and exported to files and systems, anonymized or generated from scratch. Domain packages provide
reusable generators for creating domain-specific data as names and addresses internationalizable
in language and region. It is strongly customizable with plugins and configuration options.
package org.databene.model.data;
import org.databene.commons.Named;
import org.databene.commons.NullSafeComparator;
import org.databene.commons.Operation;
import org.databene.commons.StringUtil;
import org.databene.commons.collection.OrderedNameMap;
import org.databene.commons.converter.AnyConverter;
import org.databene.commons.converter.ConverterManager;
import org.databene.commons.converter.String2ConverterConverter;
import org.databene.commons.converter.ToStringConverter;
import java.util.List;
/**
* Common parent class of all descriptors.
* Created: 17.07.2006 21:30:45
* @since 0.1
* @author Volker Bergmann
*/
public class FeatureDescriptor implements Named {
public static final String NAME = "name";
static {
ConverterManager.getInstance().registerConverterClass(String2ConverterConverter.class);
}
protected OrderedNameMap> details;
// constructor -----------------------------------------------------------------------------------------------------
public FeatureDescriptor(String name) {
this.details = new OrderedNameMap>();
addConstraint(NAME, String.class, null);
setName(name);
}
// typed interface -------------------------------------------------------------------------------------------------
/*
public void setParent(FeatureDescriptor parent) {
this.parent = parent;
}
*/
public String getName() {
return (String) getDetailValue(NAME);
}
public void setName(String name) {
setDetailValue(NAME, name);
}
// generic detail access -------------------------------------------------------------------------------------------
public boolean supportsDetail(String name) {
return details.containsKey(name);
}
public Object getDeclaredDetailValue(String name) {
return getConfiguredDetail(name).getValue();
}
public Object getDetailValue(String name) {
FeatureDetail
© 2015 - 2025 Weber Informatics LLC | Privacy Policy