本文整理匯總了Java中org.datacleaner.api.Description類的典型用法代碼示例。如果您正苦於以下問題:Java Description類的具體用法?Java Description怎麽用?Java Description使用的例子?那麽, 這裏精選的類代碼示例或許可以為您提供幫助。
Description類屬於org.datacleaner.api包,在下文中一共展示了Description類的14個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Java代碼示例。
示例1: getDisplayName
import org.datacleaner.api.Description; //導入依賴的package包/類
@Override
public String getDisplayName() {
// this is the 'descriptor' name, e.g. will be used for CSS styling
final Description desc = ReflectionUtils.getAnnotation(_componentClass, Description.class);
if (desc == null || StringUtils.isNullOrEmpty(desc.value())) {
return _componentClass.getSimpleName();
}
return desc.value();
}
示例2: getDescription
import org.datacleaner.api.Description; //導入依賴的package包/類
@Override
public final String getDescription() {
final Description description = getAnnotation(Description.class);
if (description == null) {
return null;
}
return description.value();
}
示例3: getDescription
import org.datacleaner.api.Description; //導入依賴的package包/類
@Override
public String getDescription() {
final Description desc = getAnnotation(Description.class);
if (desc == null) {
return null;
}
return desc.value();
}
示例4: getDescription
import org.datacleaner.api.Description; //導入依賴的package包/類
@Override
public final String getDescription() {
final Description desc = getAnnotation(Description.class);
if (desc == null) {
return null;
}
return desc.value();
}
示例5: getDescription
import org.datacleaner.api.Description; //導入依賴的package包/類
public String getDescription() {
final Description annotation = ReflectionUtils.getAnnotation(_outcome, Description.class);
if (annotation == null) {
return "";
}
final String description = annotation.value();
return DocumentationUtils.createHtmlParagraphs(description);
}
示例6: render
import org.datacleaner.api.Description; //導入依賴的package包/類
@Override
public HtmlFragment render(final AnnotatedRowsResult result) {
final SimpleHtmlFragment htmlFragment = new SimpleHtmlFragment();
final InputColumn<?>[] highlightedColumns = result.getHighlightedColumns();
final int[] highlightedIndexes = new int[highlightedColumns.length];
for (int i = 0; i < highlightedColumns.length; i++) {
highlightedIndexes[i] = result.getColumnIndex(highlightedColumns[i]);
}
final TableModel tableModel = result.toTableModel(MAX_ROWS);
final Description description = ReflectionUtils.getAnnotation(result.getClass(), Description.class);
final String descriptionText;
if (description != null) {
descriptionText = description.value();
} else {
descriptionText = "Records";
}
final int rowCount = result.getAnnotatedRowCount();
htmlFragment.addBodyElement(new SectionHeaderBodyElement(descriptionText + " (" + rowCount + ")"));
if (rowCount == 0) {
htmlFragment.addBodyElement("<p>No records to display.</p>");
} else {
htmlFragment.addBodyElement(new TableBodyElement(tableModel, "annotatedRowsTable", highlightedIndexes));
}
return htmlFragment;
}
示例7: render
import org.datacleaner.api.Description; //導入依賴的package包/類
@Override
public HtmlFragment render(final ListResult<?> result) {
final SimpleHtmlFragment htmlFragment = new SimpleHtmlFragment();
final List<?> values = result.getValues();
final int rowCount = values.size();
final TableModel tableModel = new DefaultTableModel(rowCount, 1);
for (int i = 0; i < rowCount; i++) {
tableModel.setValueAt(values.get(i), i, 0);
}
final Description description = ReflectionUtils.getAnnotation(result.getClass(), Description.class);
final String descriptionText;
if (description != null) {
descriptionText = description.value();
} else {
descriptionText = "Values";
}
htmlFragment.addBodyElement(new SectionHeaderBodyElement(descriptionText + " (" + rowCount + ")"));
if (rowCount == 0) {
htmlFragment.addBodyElement("<p>No records to display.</p>");
} else {
htmlFragment.addBodyElement(new TableBodyElement(tableModel, "annotatedRowsTable", new int[0]));
}
return htmlFragment;
}
示例8: getHighestDate
import org.datacleaner.api.Description; //導入依賴的package包/類
@Metric(order = 3, value = DateAndTimeAnalyzer.MEASURE_HIGHEST_DATE)
@Description(
"The highest date value for the given column. The value is measured in number of days since 1970-01-01.")
public Number getHighestDate(final InputColumn<?> col) {
final String s = (String) getCrosstab().where(DateAndTimeAnalyzer.DIMENSION_COLUMN, col.getName())
.where(DateAndTimeAnalyzer.DIMENSION_MEASURE, DateAndTimeAnalyzer.MEASURE_HIGHEST_DATE).safeGet(null);
return convertToDaysSinceEpoch(s);
}
示例9: getLowestDate
import org.datacleaner.api.Description; //導入依賴的package包/類
@Metric(order = 3, value = DateAndTimeAnalyzer.MEASURE_LOWEST_DATE)
@Description(
"The lowest date value for the given column. The value is measured in number of days since 1970-01-01.")
public Number getLowestDate(final InputColumn<?> col) {
final String s = (String) getCrosstab().where(DateAndTimeAnalyzer.DIMENSION_COLUMN, col.getName())
.where(DateAndTimeAnalyzer.DIMENSION_MEASURE, DateAndTimeAnalyzer.MEASURE_LOWEST_DATE).safeGet(null);
return convertToDaysSinceEpoch(s);
}
示例10: getMean
import org.datacleaner.api.Description; //導入依賴的package包/類
@Metric(order = 4, value = DateAndTimeAnalyzer.MEASURE_MEAN)
@Description("The mean value for the given column. The value is measured in number of days since 1970-01-01.")
public Number getMean(final InputColumn<?> col) {
final String s = (String) getCrosstab().where(DateAndTimeAnalyzer.DIMENSION_COLUMN, col.getName())
.where(DateAndTimeAnalyzer.DIMENSION_MEASURE, DateAndTimeAnalyzer.MEASURE_MEAN).safeGet(null);
return convertToDaysSinceEpoch(s);
}
示例11: getMedian
import org.datacleaner.api.Description; //導入依賴的package包/類
@Metric(order = 5, value = DateAndTimeAnalyzer.MEASURE_MEDIAN)
@Description("The median value for the given column. The value is measured in number of days since 1970-01-01.")
public Number getMedian(final InputColumn<?> col) {
final String s = (String) getCrosstab().where(DateAndTimeAnalyzer.DIMENSION_COLUMN, col.getName())
.where(DateAndTimeAnalyzer.DIMENSION_MEASURE, DateAndTimeAnalyzer.MEASURE_MEDIAN).safeGet(null);
return convertToDaysSinceEpoch(s);
}
示例12: getPercentile25
import org.datacleaner.api.Description; //導入依賴的package包/類
@Metric(order = 6, value = DateAndTimeAnalyzer.MEASURE_PERCENTILE25)
@Description(
"The 25th percentile value for the given column. The value is measured in number of days since 1970-01-01.")
public Number getPercentile25(final InputColumn<?> col) {
final String s = (String) getCrosstab().where(DateAndTimeAnalyzer.DIMENSION_COLUMN, col.getName())
.where(DateAndTimeAnalyzer.DIMENSION_MEASURE, DateAndTimeAnalyzer.MEASURE_PERCENTILE25).safeGet(null);
return convertToDaysSinceEpoch(s);
}
示例13: getPercentile75
import org.datacleaner.api.Description; //導入依賴的package包/類
@Metric(order = 7, value = DateAndTimeAnalyzer.MEASURE_PERCENTILE75)
@Description(
"The 75th percentile value for the given column. The value is measured in number of days since 1970-01-01.")
public Number getPercentile75(final InputColumn<?> col) {
final String s = (String) getCrosstab().where(DateAndTimeAnalyzer.DIMENSION_COLUMN, col.getName())
.where(DateAndTimeAnalyzer.DIMENSION_MEASURE, DateAndTimeAnalyzer.MEASURE_PERCENTILE75).safeGet(null);
return convertToDaysSinceEpoch(s);
}
示例14: AnnotatedRowResultPanel
import org.datacleaner.api.Description; //導入依賴的package包/類
public AnnotatedRowResultPanel(final AnnotatedRowsResult result, final UserPreferences userPreferences,
final DatastoreCatalog datastoreCatalog) {
super();
_result = result;
_userPreferences = userPreferences;
_datastoreCatalog = datastoreCatalog;
setLayout(new VerticalLayout(4));
_table = new DCTable();
_table.setColumnControlVisible(false);
final InputColumn<?>[] highlightedColumns = result.getHighlightedColumns();
final List<InputColumn<?>> inputColumns = result.getInputColumns();
final JToolBar buttonToolBar = WidgetFactory.createToolBar();
buttonToolBar.setBorder(new EmptyBorder(0, 4, 0, 4));
final Description description = ReflectionUtils.getAnnotation(result.getClass(), Description.class);
final String descriptionText;
if (description != null) {
descriptionText = description.value();
} else {
descriptionText = "Records";
}
final int annotatedRowCount = result.getAnnotation().getRowCount();
final DCLabel label = DCLabel.dark(descriptionText + " (" + result.getAnnotatedRowCount() + ")");
label.setFont(WidgetUtils.FONT_HEADER1);
buttonToolBar.add(label);
buttonToolBar.add(WidgetFactory.createToolBarSeparator());
if (highlightedColumns.length == 1 && inputColumns.size() > 1) {
final DCComboBox<String> comboBox = new DCComboBox<>(VIEWS);
comboBox.addListener(item -> {
if (item == VIEWS[0]) {
applyDetailedView();
} else {
applyDistinctValuesView();
}
});
comboBox.setSelectedItem(VIEWS[0]);
comboBox.notifyListeners();
buttonToolBar.add(comboBox);
} else {
applyDetailedView();
}
final PopupButton saveToFileButton = createSaveToFileButton(inputColumns);
buttonToolBar.add(saveToFileButton);
add(buttonToolBar);
if (annotatedRowCount == 0) {
final DCLabel noRecordsLabel = DCLabel.dark("No records to display.");
noRecordsLabel.setBorder(new EmptyBorder(0, 4, 0, 0));
add(noRecordsLabel);
} else {
final DCPanel tablePanel = _table.toPanel();
add(WidgetUtils.decorateWithShadow(tablePanel));
}
}