repo stringlengths 7 58 | path stringlengths 12 218 | func_name stringlengths 3 140 | original_string stringlengths 73 34.1k | language stringclasses 1
value | code stringlengths 73 34.1k | code_tokens list | docstring stringlengths 3 16k | docstring_tokens list | sha stringlengths 40 40 | url stringlengths 105 339 | partition stringclasses 1
value |
|---|---|---|---|---|---|---|---|---|---|---|---|
intive-FDV/DynamicJasper | src/main/java/ar/com/fdvs/dj/domain/builders/ReflectiveReportBuilder.java | ReflectiveReportBuilder.getColumnTitle | private static String getColumnTitle(final PropertyDescriptor _property) {
final StringBuilder buffer = new StringBuilder();
final String name = _property.getName();
buffer.append(Character.toUpperCase(name.charAt(0)));
for (int i = 1; i < name.length(); i++) {
final char c =... | java | private static String getColumnTitle(final PropertyDescriptor _property) {
final StringBuilder buffer = new StringBuilder();
final String name = _property.getName();
buffer.append(Character.toUpperCase(name.charAt(0)));
for (int i = 1; i < name.length(); i++) {
final char c =... | [
"private",
"static",
"String",
"getColumnTitle",
"(",
"final",
"PropertyDescriptor",
"_property",
")",
"{",
"final",
"StringBuilder",
"buffer",
"=",
"new",
"StringBuilder",
"(",
")",
";",
"final",
"String",
"name",
"=",
"_property",
".",
"getName",
"(",
")",
"... | Calculates a column title using camel humps to separate words.
@param _property the property descriptor.
@return the column title for the given property. | [
"Calculates",
"a",
"column",
"title",
"using",
"camel",
"humps",
"to",
"separate",
"words",
"."
] | 63919574cc401ae40574d13129f628e66d1682a3 | https://github.com/intive-FDV/DynamicJasper/blob/63919574cc401ae40574d13129f628e66d1682a3/src/main/java/ar/com/fdvs/dj/domain/builders/ReflectiveReportBuilder.java#L117-L129 | train |
intive-FDV/DynamicJasper | src/main/java/ar/com/fdvs/dj/domain/builders/ReflectiveReportBuilder.java | ReflectiveReportBuilder.isValidPropertyClass | private static boolean isValidPropertyClass(final PropertyDescriptor _property) {
final Class type = _property.getPropertyType();
return Number.class.isAssignableFrom(type) || type == String.class || Date.class.isAssignableFrom(type) || type == Boolean.class;
} | java | private static boolean isValidPropertyClass(final PropertyDescriptor _property) {
final Class type = _property.getPropertyType();
return Number.class.isAssignableFrom(type) || type == String.class || Date.class.isAssignableFrom(type) || type == Boolean.class;
} | [
"private",
"static",
"boolean",
"isValidPropertyClass",
"(",
"final",
"PropertyDescriptor",
"_property",
")",
"{",
"final",
"Class",
"type",
"=",
"_property",
".",
"getPropertyType",
"(",
")",
";",
"return",
"Number",
".",
"class",
".",
"isAssignableFrom",
"(",
... | Checks if a property's type is valid to be included in the report.
@param _property the property.
@return true if the property is is of a valid type. | [
"Checks",
"if",
"a",
"property",
"s",
"type",
"is",
"valid",
"to",
"be",
"included",
"in",
"the",
"report",
"."
] | 63919574cc401ae40574d13129f628e66d1682a3 | https://github.com/intive-FDV/DynamicJasper/blob/63919574cc401ae40574d13129f628e66d1682a3/src/main/java/ar/com/fdvs/dj/domain/builders/ReflectiveReportBuilder.java#L145-L148 | train |
intive-FDV/DynamicJasper | src/main/java/ar/com/fdvs/dj/domain/builders/ReflectiveReportBuilder.java | ReflectiveReportBuilder.getColumnWidth | private static int getColumnWidth(final PropertyDescriptor _property) {
final Class type = _property.getPropertyType();
if (Float.class.isAssignableFrom(type) || Double.class.isAssignableFrom(type)) {
return 70;
} else if (type == Boolean.class) {
return 10;
} els... | java | private static int getColumnWidth(final PropertyDescriptor _property) {
final Class type = _property.getPropertyType();
if (Float.class.isAssignableFrom(type) || Double.class.isAssignableFrom(type)) {
return 70;
} else if (type == Boolean.class) {
return 10;
} els... | [
"private",
"static",
"int",
"getColumnWidth",
"(",
"final",
"PropertyDescriptor",
"_property",
")",
"{",
"final",
"Class",
"type",
"=",
"_property",
".",
"getPropertyType",
"(",
")",
";",
"if",
"(",
"Float",
".",
"class",
".",
"isAssignableFrom",
"(",
"type",
... | Calculates the column width according to its type.
@param _property the property.
@return the column width. | [
"Calculates",
"the",
"column",
"width",
"according",
"to",
"its",
"type",
"."
] | 63919574cc401ae40574d13129f628e66d1682a3 | https://github.com/intive-FDV/DynamicJasper/blob/63919574cc401ae40574d13129f628e66d1682a3/src/main/java/ar/com/fdvs/dj/domain/builders/ReflectiveReportBuilder.java#L155-L170 | train |
intive-FDV/DynamicJasper | src/main/java/ar/com/fdvs/dj/domain/chart/dataset/XYDataset.java | XYDataset.addSerie | public void addSerie(AbstractColumn column, StringExpression labelExpression) {
series.add(column);
seriesLabels.put(column, labelExpression);
} | java | public void addSerie(AbstractColumn column, StringExpression labelExpression) {
series.add(column);
seriesLabels.put(column, labelExpression);
} | [
"public",
"void",
"addSerie",
"(",
"AbstractColumn",
"column",
",",
"StringExpression",
"labelExpression",
")",
"{",
"series",
".",
"add",
"(",
"column",
")",
";",
"seriesLabels",
".",
"put",
"(",
"column",
",",
"labelExpression",
")",
";",
"}"
] | Adds the specified serie column to the dataset with custom label expression.
@param column the serie column
@param labelExpression column the custom label expression | [
"Adds",
"the",
"specified",
"serie",
"column",
"to",
"the",
"dataset",
"with",
"custom",
"label",
"expression",
"."
] | 63919574cc401ae40574d13129f628e66d1682a3 | https://github.com/intive-FDV/DynamicJasper/blob/63919574cc401ae40574d13129f628e66d1682a3/src/main/java/ar/com/fdvs/dj/domain/chart/dataset/XYDataset.java#L99-L102 | train |
intive-FDV/DynamicJasper | src/main/java/ar/com/fdvs/dj/domain/builders/DynamicReportBuilder.java | DynamicReportBuilder.build | public DynamicReport build() {
if (built) {
throw new DJBuilderException("DynamicReport already built. Cannot use more than once.");
} else {
built = true;
}
report.setOptions(options);
if (!globalVariablesGroup.getFooterVariables().isEmpty() || !globalV... | java | public DynamicReport build() {
if (built) {
throw new DJBuilderException("DynamicReport already built. Cannot use more than once.");
} else {
built = true;
}
report.setOptions(options);
if (!globalVariablesGroup.getFooterVariables().isEmpty() || !globalV... | [
"public",
"DynamicReport",
"build",
"(",
")",
"{",
"if",
"(",
"built",
")",
"{",
"throw",
"new",
"DJBuilderException",
"(",
"\"DynamicReport already built. Cannot use more than once.\"",
")",
";",
"}",
"else",
"{",
"built",
"=",
"true",
";",
"}",
"report",
".",
... | Builds the DynamicReport object. Cannot be used twice since this produced
undesired results on the generated DynamicReport object
@return | [
"Builds",
"the",
"DynamicReport",
"object",
".",
"Cannot",
"be",
"used",
"twice",
"since",
"this",
"produced",
"undesired",
"results",
"on",
"the",
"generated",
"DynamicReport",
"object"
] | 63919574cc401ae40574d13129f628e66d1682a3 | https://github.com/intive-FDV/DynamicJasper/blob/63919574cc401ae40574d13129f628e66d1682a3/src/main/java/ar/com/fdvs/dj/domain/builders/DynamicReportBuilder.java#L312-L335 | train |
intive-FDV/DynamicJasper | src/main/java/ar/com/fdvs/dj/domain/builders/DynamicReportBuilder.java | DynamicReportBuilder.concatenateReports | protected void concatenateReports() {
if (!concatenatedReports.isEmpty()) { // dummy group for page break if needed
DJGroup globalGroup = createDummyGroup();
report.getColumnsGroups().add(0, globalGroup);
}
for (Subreport subreport : concatenatedReports) {
D... | java | protected void concatenateReports() {
if (!concatenatedReports.isEmpty()) { // dummy group for page break if needed
DJGroup globalGroup = createDummyGroup();
report.getColumnsGroups().add(0, globalGroup);
}
for (Subreport subreport : concatenatedReports) {
D... | [
"protected",
"void",
"concatenateReports",
"(",
")",
"{",
"if",
"(",
"!",
"concatenatedReports",
".",
"isEmpty",
"(",
")",
")",
"{",
"// dummy group for page break if needed",
"DJGroup",
"globalGroup",
"=",
"createDummyGroup",
"(",
")",
";",
"report",
".",
"getCol... | Create dummy groups for each concatenated report, and in the footer of
each group adds the subreport. | [
"Create",
"dummy",
"groups",
"for",
"each",
"concatenated",
"report",
"and",
"in",
"the",
"footer",
"of",
"each",
"group",
"adds",
"the",
"subreport",
"."
] | 63919574cc401ae40574d13129f628e66d1682a3 | https://github.com/intive-FDV/DynamicJasper/blob/63919574cc401ae40574d13129f628e66d1682a3/src/main/java/ar/com/fdvs/dj/domain/builders/DynamicReportBuilder.java#L387-L399 | train |
intive-FDV/DynamicJasper | src/main/java/ar/com/fdvs/dj/domain/builders/DynamicReportBuilder.java | DynamicReportBuilder.setTemplateFile | public DynamicReportBuilder setTemplateFile(String path, boolean importFields, boolean importVariables, boolean importParameters, boolean importDatasets) {
report.setTemplateFileName(path);
report.setTemplateImportFields(importFields);
report.setTemplateImportParameters(importParameters);
... | java | public DynamicReportBuilder setTemplateFile(String path, boolean importFields, boolean importVariables, boolean importParameters, boolean importDatasets) {
report.setTemplateFileName(path);
report.setTemplateImportFields(importFields);
report.setTemplateImportParameters(importParameters);
... | [
"public",
"DynamicReportBuilder",
"setTemplateFile",
"(",
"String",
"path",
",",
"boolean",
"importFields",
",",
"boolean",
"importVariables",
",",
"boolean",
"importParameters",
",",
"boolean",
"importDatasets",
")",
"{",
"report",
".",
"setTemplateFileName",
"(",
"p... | The full path of a jrxml file, or the path in the classpath of a jrxml
resource.
@param path
@return | [
"The",
"full",
"path",
"of",
"a",
"jrxml",
"file",
"or",
"the",
"path",
"in",
"the",
"classpath",
"of",
"a",
"jrxml",
"resource",
"."
] | 63919574cc401ae40574d13129f628e66d1682a3 | https://github.com/intive-FDV/DynamicJasper/blob/63919574cc401ae40574d13129f628e66d1682a3/src/main/java/ar/com/fdvs/dj/domain/builders/DynamicReportBuilder.java#L1003-L1010 | train |
intive-FDV/DynamicJasper | src/main/java/ar/com/fdvs/dj/domain/builders/DynamicReportBuilder.java | DynamicReportBuilder.addStyle | public DynamicReportBuilder addStyle(Style style) throws DJBuilderException {
if (style.getName() == null) {
throw new DJBuilderException("Invalid style. The style must have a name");
}
report.addStyle(style);
return this;
} | java | public DynamicReportBuilder addStyle(Style style) throws DJBuilderException {
if (style.getName() == null) {
throw new DJBuilderException("Invalid style. The style must have a name");
}
report.addStyle(style);
return this;
} | [
"public",
"DynamicReportBuilder",
"addStyle",
"(",
"Style",
"style",
")",
"throws",
"DJBuilderException",
"{",
"if",
"(",
"style",
".",
"getName",
"(",
")",
"==",
"null",
")",
"{",
"throw",
"new",
"DJBuilderException",
"(",
"\"Invalid style. The style must have a na... | You can register styles object for later reference them directly. Parent
styles should be registered this way
@param style
@return
@throws DJBuilderException | [
"You",
"can",
"register",
"styles",
"object",
"for",
"later",
"reference",
"them",
"directly",
".",
"Parent",
"styles",
"should",
"be",
"registered",
"this",
"way"
] | 63919574cc401ae40574d13129f628e66d1682a3 | https://github.com/intive-FDV/DynamicJasper/blob/63919574cc401ae40574d13129f628e66d1682a3/src/main/java/ar/com/fdvs/dj/domain/builders/DynamicReportBuilder.java#L1366-L1374 | train |
intive-FDV/DynamicJasper | src/main/java/ar/com/fdvs/dj/domain/builders/DynamicReportBuilder.java | DynamicReportBuilder.setQuery | public DynamicReportBuilder setQuery(String text, String language) {
this.report.setQuery(new DJQuery(text, language));
return this;
} | java | public DynamicReportBuilder setQuery(String text, String language) {
this.report.setQuery(new DJQuery(text, language));
return this;
} | [
"public",
"DynamicReportBuilder",
"setQuery",
"(",
"String",
"text",
",",
"String",
"language",
")",
"{",
"this",
".",
"report",
".",
"setQuery",
"(",
"new",
"DJQuery",
"(",
"text",
",",
"language",
")",
")",
";",
"return",
"this",
";",
"}"
] | Adds main report query.
@param text
@param language use constants from {@link DJConstants}
@return | [
"Adds",
"main",
"report",
"query",
"."
] | 63919574cc401ae40574d13129f628e66d1682a3 | https://github.com/intive-FDV/DynamicJasper/blob/63919574cc401ae40574d13129f628e66d1682a3/src/main/java/ar/com/fdvs/dj/domain/builders/DynamicReportBuilder.java#L1424-L1427 | train |
intive-FDV/DynamicJasper | src/main/java/ar/com/fdvs/dj/domain/builders/DynamicReportBuilder.java | DynamicReportBuilder.setProperty | public DynamicReportBuilder setProperty(String name, String value) {
this.report.setProperty(name, value);
return this;
} | java | public DynamicReportBuilder setProperty(String name, String value) {
this.report.setProperty(name, value);
return this;
} | [
"public",
"DynamicReportBuilder",
"setProperty",
"(",
"String",
"name",
",",
"String",
"value",
")",
"{",
"this",
".",
"report",
".",
"setProperty",
"(",
"name",
",",
"value",
")",
";",
"return",
"this",
";",
"}"
] | Adds a property to report design, this properties are mostly used by
exporters to know if any specific configuration is needed
@param name
@param value
@return A Dynamic Report Builder | [
"Adds",
"a",
"property",
"to",
"report",
"design",
"this",
"properties",
"are",
"mostly",
"used",
"by",
"exporters",
"to",
"know",
"if",
"any",
"specific",
"configuration",
"is",
"needed"
] | 63919574cc401ae40574d13129f628e66d1682a3 | https://github.com/intive-FDV/DynamicJasper/blob/63919574cc401ae40574d13129f628e66d1682a3/src/main/java/ar/com/fdvs/dj/domain/builders/DynamicReportBuilder.java#L1581-L1584 | train |
intive-FDV/DynamicJasper | src/main/java/ar/com/fdvs/dj/domain/builders/DynamicReportBuilder.java | DynamicReportBuilder.setColspan | public DynamicReportBuilder setColspan(int colNumber, int colQuantity, String colspanTitle) {
this.setColspan(colNumber, colQuantity, colspanTitle, null);
return this;
} | java | public DynamicReportBuilder setColspan(int colNumber, int colQuantity, String colspanTitle) {
this.setColspan(colNumber, colQuantity, colspanTitle, null);
return this;
} | [
"public",
"DynamicReportBuilder",
"setColspan",
"(",
"int",
"colNumber",
",",
"int",
"colQuantity",
",",
"String",
"colspanTitle",
")",
"{",
"this",
".",
"setColspan",
"(",
"colNumber",
",",
"colQuantity",
",",
"colspanTitle",
",",
"null",
")",
";",
"return",
... | Set a colspan in a group of columns. First add the cols to the report
@param colNumber the index of the col
@param colQuantity the number of cols how i will take
@param colspanTitle colspan title
@return a Dynamic Report Builder
@throws ColumnBuilderException When the index of the cols is out of
bounds. | [
"Set",
"a",
"colspan",
"in",
"a",
"group",
"of",
"columns",
".",
"First",
"add",
"the",
"cols",
"to",
"the",
"report"
] | 63919574cc401ae40574d13129f628e66d1682a3 | https://github.com/intive-FDV/DynamicJasper/blob/63919574cc401ae40574d13129f628e66d1682a3/src/main/java/ar/com/fdvs/dj/domain/builders/DynamicReportBuilder.java#L1645-L1650 | train |
intive-FDV/DynamicJasper | src/main/java/ar/com/fdvs/dj/core/layout/CrossTabColorShema.java | CrossTabColorShema.setTotalColorForColumn | public void setTotalColorForColumn(int column, Color color){
int map = (colors.length-1) - column;
colors[map][colors[0].length-1]=color;
} | java | public void setTotalColorForColumn(int column, Color color){
int map = (colors.length-1) - column;
colors[map][colors[0].length-1]=color;
} | [
"public",
"void",
"setTotalColorForColumn",
"(",
"int",
"column",
",",
"Color",
"color",
")",
"{",
"int",
"map",
"=",
"(",
"colors",
".",
"length",
"-",
"1",
")",
"-",
"column",
";",
"colors",
"[",
"map",
"]",
"[",
"colors",
"[",
"0",
"]",
".",
"le... | Set the color for each total for the column
@param column the number of the column (starting from 1)
@param color | [
"Set",
"the",
"color",
"for",
"each",
"total",
"for",
"the",
"column"
] | 63919574cc401ae40574d13129f628e66d1682a3 | https://github.com/intive-FDV/DynamicJasper/blob/63919574cc401ae40574d13129f628e66d1682a3/src/main/java/ar/com/fdvs/dj/core/layout/CrossTabColorShema.java#L82-L85 | train |
intive-FDV/DynamicJasper | src/main/java/ar/com/fdvs/dj/core/layout/CrossTabColorShema.java | CrossTabColorShema.setColorForTotal | public void setColorForTotal(int row, int column, Color color){
int mapC = (colors.length-1) - column;
int mapR = (colors[0].length-1) - row;
colors[mapC][mapR]=color;
} | java | public void setColorForTotal(int row, int column, Color color){
int mapC = (colors.length-1) - column;
int mapR = (colors[0].length-1) - row;
colors[mapC][mapR]=color;
} | [
"public",
"void",
"setColorForTotal",
"(",
"int",
"row",
",",
"int",
"column",
",",
"Color",
"color",
")",
"{",
"int",
"mapC",
"=",
"(",
"colors",
".",
"length",
"-",
"1",
")",
"-",
"column",
";",
"int",
"mapR",
"=",
"(",
"colors",
"[",
"0",
"]",
... | Sets the color for the big total between the column and row
@param row row index (starting from 1)
@param column column index (starting from 1)
@param color | [
"Sets",
"the",
"color",
"for",
"the",
"big",
"total",
"between",
"the",
"column",
"and",
"row"
] | 63919574cc401ae40574d13129f628e66d1682a3 | https://github.com/intive-FDV/DynamicJasper/blob/63919574cc401ae40574d13129f628e66d1682a3/src/main/java/ar/com/fdvs/dj/core/layout/CrossTabColorShema.java#L103-L107 | train |
intive-FDV/DynamicJasper | src/main/java/ar/com/fdvs/dj/util/StreamUtils.java | StreamUtils.copyThenClose | public static void copyThenClose(InputStream input, OutputStream output)
throws IOException {
copy(input, output);
input.close();
output.close();
} | java | public static void copyThenClose(InputStream input, OutputStream output)
throws IOException {
copy(input, output);
input.close();
output.close();
} | [
"public",
"static",
"void",
"copyThenClose",
"(",
"InputStream",
"input",
",",
"OutputStream",
"output",
")",
"throws",
"IOException",
"{",
"copy",
"(",
"input",
",",
"output",
")",
";",
"input",
".",
"close",
"(",
")",
";",
"output",
".",
"close",
"(",
... | Copies information between specified streams and then closes
both of the streams.
@throws java.io.IOException | [
"Copies",
"information",
"between",
"specified",
"streams",
"and",
"then",
"closes",
"both",
"of",
"the",
"streams",
"."
] | 63919574cc401ae40574d13129f628e66d1682a3 | https://github.com/intive-FDV/DynamicJasper/blob/63919574cc401ae40574d13129f628e66d1682a3/src/main/java/ar/com/fdvs/dj/util/StreamUtils.java#L61-L66 | train |
intive-FDV/DynamicJasper | src/main/java/ar/com/fdvs/dj/domain/builders/SubReportBuilder.java | SubReportBuilder.setParameterMapPath | public SubReportBuilder setParameterMapPath(String path) {
subreport.setParametersExpression(path);
subreport.setParametersMapOrigin(DJConstants.SUBREPORT_PARAMETER_MAP_ORIGIN_PARAMETER);
return this;
} | java | public SubReportBuilder setParameterMapPath(String path) {
subreport.setParametersExpression(path);
subreport.setParametersMapOrigin(DJConstants.SUBREPORT_PARAMETER_MAP_ORIGIN_PARAMETER);
return this;
} | [
"public",
"SubReportBuilder",
"setParameterMapPath",
"(",
"String",
"path",
")",
"{",
"subreport",
".",
"setParametersExpression",
"(",
"path",
")",
";",
"subreport",
".",
"setParametersMapOrigin",
"(",
"DJConstants",
".",
"SUBREPORT_PARAMETER_MAP_ORIGIN_PARAMETER",
")",
... | defines the KEY in the parent report parameters map where to get the subreport parameters map.
@param path where to get the parameter map for the subrerpot.
@return | [
"defines",
"the",
"KEY",
"in",
"the",
"parent",
"report",
"parameters",
"map",
"where",
"to",
"get",
"the",
"subreport",
"parameters",
"map",
"."
] | 63919574cc401ae40574d13129f628e66d1682a3 | https://github.com/intive-FDV/DynamicJasper/blob/63919574cc401ae40574d13129f628e66d1682a3/src/main/java/ar/com/fdvs/dj/domain/builders/SubReportBuilder.java#L194-L198 | train |
intive-FDV/DynamicJasper | src/main/java/ar/com/fdvs/dj/domain/DynamicReport.java | DynamicReport.getAllFields | public List<ColumnProperty> getAllFields(){
ArrayList<ColumnProperty> l = new ArrayList<ColumnProperty>();
for (AbstractColumn abstractColumn : this.getColumns()) {
if (abstractColumn instanceof SimpleColumn && !(abstractColumn instanceof ExpressionColumn)) {
l.add(((SimpleColumn)abstractColumn).getColumnPro... | java | public List<ColumnProperty> getAllFields(){
ArrayList<ColumnProperty> l = new ArrayList<ColumnProperty>();
for (AbstractColumn abstractColumn : this.getColumns()) {
if (abstractColumn instanceof SimpleColumn && !(abstractColumn instanceof ExpressionColumn)) {
l.add(((SimpleColumn)abstractColumn).getColumnPro... | [
"public",
"List",
"<",
"ColumnProperty",
">",
"getAllFields",
"(",
")",
"{",
"ArrayList",
"<",
"ColumnProperty",
">",
"l",
"=",
"new",
"ArrayList",
"<",
"ColumnProperty",
">",
"(",
")",
";",
"for",
"(",
"AbstractColumn",
"abstractColumn",
":",
"this",
".",
... | Collects all the fields from columns and also the fields not bounds to columns
@return List<ColumnProperty> | [
"Collects",
"all",
"the",
"fields",
"from",
"columns",
"and",
"also",
"the",
"fields",
"not",
"bounds",
"to",
"columns"
] | 63919574cc401ae40574d13129f628e66d1682a3 | https://github.com/intive-FDV/DynamicJasper/blob/63919574cc401ae40574d13129f628e66d1682a3/src/main/java/ar/com/fdvs/dj/domain/DynamicReport.java#L433-L444 | train |
intive-FDV/DynamicJasper | src/main/java/ar/com/fdvs/dj/core/registration/ColumnsGroupVariablesRegistrationManager.java | ColumnsGroupVariablesRegistrationManager.registerValueFormatter | protected void registerValueFormatter(DJGroupVariable djVariable, String variableName) {
if ( djVariable.getValueFormatter() == null){
return;
}
JRDesignParameter dparam = new JRDesignParameter();
dparam.setName(variableName + "_vf"); //value formater suffix
dparam.setValueClassName(DJValueFormatter.cla... | java | protected void registerValueFormatter(DJGroupVariable djVariable, String variableName) {
if ( djVariable.getValueFormatter() == null){
return;
}
JRDesignParameter dparam = new JRDesignParameter();
dparam.setName(variableName + "_vf"); //value formater suffix
dparam.setValueClassName(DJValueFormatter.cla... | [
"protected",
"void",
"registerValueFormatter",
"(",
"DJGroupVariable",
"djVariable",
",",
"String",
"variableName",
")",
"{",
"if",
"(",
"djVariable",
".",
"getValueFormatter",
"(",
")",
"==",
"null",
")",
"{",
"return",
";",
"}",
"JRDesignParameter",
"dparam",
... | Registers the parameter for the value formatter for the given variable and puts
it's implementation in the parameters map.
@param djVariable
@param variableName | [
"Registers",
"the",
"parameter",
"for",
"the",
"value",
"formatter",
"for",
"the",
"given",
"variable",
"and",
"puts",
"it",
"s",
"implementation",
"in",
"the",
"parameters",
"map",
"."
] | 63919574cc401ae40574d13129f628e66d1682a3 | https://github.com/intive-FDV/DynamicJasper/blob/63919574cc401ae40574d13129f628e66d1682a3/src/main/java/ar/com/fdvs/dj/core/registration/ColumnsGroupVariablesRegistrationManager.java#L114-L130 | train |
intive-FDV/DynamicJasper | src/main/java/ar/com/fdvs/dj/core/layout/AbstractLayoutManager.java | AbstractLayoutManager.setWhenNoDataBand | protected void setWhenNoDataBand() {
log.debug("setting up WHEN NO DATA band");
String whenNoDataText = getReport().getWhenNoDataText();
Style style = getReport().getWhenNoDataStyle();
if (whenNoDataText == null || "".equals(whenNoDataText))
return;
JRDesignBand band ... | java | protected void setWhenNoDataBand() {
log.debug("setting up WHEN NO DATA band");
String whenNoDataText = getReport().getWhenNoDataText();
Style style = getReport().getWhenNoDataStyle();
if (whenNoDataText == null || "".equals(whenNoDataText))
return;
JRDesignBand band ... | [
"protected",
"void",
"setWhenNoDataBand",
"(",
")",
"{",
"log",
".",
"debug",
"(",
"\"setting up WHEN NO DATA band\"",
")",
";",
"String",
"whenNoDataText",
"=",
"getReport",
"(",
")",
".",
"getWhenNoDataText",
"(",
")",
";",
"Style",
"style",
"=",
"getReport",
... | Creates the graphic element to be shown when the datasource is empty | [
"Creates",
"the",
"graphic",
"element",
"to",
"be",
"shown",
"when",
"the",
"datasource",
"is",
"empty"
] | 63919574cc401ae40574d13129f628e66d1682a3 | https://github.com/intive-FDV/DynamicJasper/blob/63919574cc401ae40574d13129f628e66d1682a3/src/main/java/ar/com/fdvs/dj/core/layout/AbstractLayoutManager.java#L220-L252 | train |
intive-FDV/DynamicJasper | src/main/java/ar/com/fdvs/dj/core/layout/AbstractLayoutManager.java | AbstractLayoutManager.ensureDJStyles | protected void ensureDJStyles() {
//first of all, register all parent styles if any
for (Style style : getReport().getStyles().values()) {
addStyleToDesign(style);
}
Style defaultDetailStyle = getReport().getOptions().getDefaultDetailStyle();
Style defaultHeaderStyl... | java | protected void ensureDJStyles() {
//first of all, register all parent styles if any
for (Style style : getReport().getStyles().values()) {
addStyleToDesign(style);
}
Style defaultDetailStyle = getReport().getOptions().getDefaultDetailStyle();
Style defaultHeaderStyl... | [
"protected",
"void",
"ensureDJStyles",
"(",
")",
"{",
"//first of all, register all parent styles if any",
"for",
"(",
"Style",
"style",
":",
"getReport",
"(",
")",
".",
"getStyles",
"(",
")",
".",
"values",
"(",
")",
")",
"{",
"addStyleToDesign",
"(",
"style",
... | Sets a default style for every element that doesn't have one
@throws JRException | [
"Sets",
"a",
"default",
"style",
"for",
"every",
"element",
"that",
"doesn",
"t",
"have",
"one"
] | 63919574cc401ae40574d13129f628e66d1682a3 | https://github.com/intive-FDV/DynamicJasper/blob/63919574cc401ae40574d13129f628e66d1682a3/src/main/java/ar/com/fdvs/dj/core/layout/AbstractLayoutManager.java#L274-L289 | train |
intive-FDV/DynamicJasper | src/main/java/ar/com/fdvs/dj/core/layout/AbstractLayoutManager.java | AbstractLayoutManager.setColumnsFinalWidth | protected void setColumnsFinalWidth() {
log.debug("Setting columns final width.");
float factor;
int printableArea = report.getOptions().getColumnWidth();
//Create a list with only the visible columns.
List visibleColums = getVisibleColumns();
if (report.getOptions().i... | java | protected void setColumnsFinalWidth() {
log.debug("Setting columns final width.");
float factor;
int printableArea = report.getOptions().getColumnWidth();
//Create a list with only the visible columns.
List visibleColums = getVisibleColumns();
if (report.getOptions().i... | [
"protected",
"void",
"setColumnsFinalWidth",
"(",
")",
"{",
"log",
".",
"debug",
"(",
"\"Setting columns final width.\"",
")",
";",
"float",
"factor",
";",
"int",
"printableArea",
"=",
"report",
".",
"getOptions",
"(",
")",
".",
"getColumnWidth",
"(",
")",
";"... | Sets the columns width by reading some report options like the
printableArea and useFullPageWidth.
columns with fixedWidth property set in TRUE will not be modified | [
"Sets",
"the",
"columns",
"width",
"by",
"reading",
"some",
"report",
"options",
"like",
"the",
"printableArea",
"and",
"useFullPageWidth",
".",
"columns",
"with",
"fixedWidth",
"property",
"set",
"in",
"TRUE",
"will",
"not",
"be",
"modified"
] | 63919574cc401ae40574d13129f628e66d1682a3 | https://github.com/intive-FDV/DynamicJasper/blob/63919574cc401ae40574d13129f628e66d1682a3/src/main/java/ar/com/fdvs/dj/core/layout/AbstractLayoutManager.java#L619-L681 | train |
intive-FDV/DynamicJasper | src/main/java/ar/com/fdvs/dj/core/layout/AbstractLayoutManager.java | AbstractLayoutManager.setBandsFinalHeight | protected void setBandsFinalHeight() {
log.debug("Setting bands final height...");
List<JRBand> bands = new ArrayList<JRBand>();
Utils.addNotNull(bands, design.getPageHeader());
Utils.addNotNull(bands, design.getPageFooter());
Utils.addNotNull(bands, design.getColumnHeader());
... | java | protected void setBandsFinalHeight() {
log.debug("Setting bands final height...");
List<JRBand> bands = new ArrayList<JRBand>();
Utils.addNotNull(bands, design.getPageHeader());
Utils.addNotNull(bands, design.getPageFooter());
Utils.addNotNull(bands, design.getColumnHeader());
... | [
"protected",
"void",
"setBandsFinalHeight",
"(",
")",
"{",
"log",
".",
"debug",
"(",
"\"Setting bands final height...\"",
")",
";",
"List",
"<",
"JRBand",
">",
"bands",
"=",
"new",
"ArrayList",
"<",
"JRBand",
">",
"(",
")",
";",
"Utils",
".",
"addNotNull",
... | Sets the necessary height for all bands in the report, to hold their children | [
"Sets",
"the",
"necessary",
"height",
"for",
"all",
"bands",
"in",
"the",
"report",
"to",
"hold",
"their",
"children"
] | 63919574cc401ae40574d13129f628e66d1682a3 | https://github.com/intive-FDV/DynamicJasper/blob/63919574cc401ae40574d13129f628e66d1682a3/src/main/java/ar/com/fdvs/dj/core/layout/AbstractLayoutManager.java#L693-L732 | train |
intive-FDV/DynamicJasper | src/main/java/ar/com/fdvs/dj/core/layout/AbstractLayoutManager.java | AbstractLayoutManager.setBandFinalHeight | private void setBandFinalHeight(JRDesignBand band, int currHeigth, boolean fitToContent) {
if (band != null) {
int finalHeight = LayoutUtils.findVerticalOffset(band);
//noinspection StatementWithEmptyBody
if (finalHeight < currHeigth && !fitToContent) {
//noth... | java | private void setBandFinalHeight(JRDesignBand band, int currHeigth, boolean fitToContent) {
if (band != null) {
int finalHeight = LayoutUtils.findVerticalOffset(band);
//noinspection StatementWithEmptyBody
if (finalHeight < currHeigth && !fitToContent) {
//noth... | [
"private",
"void",
"setBandFinalHeight",
"(",
"JRDesignBand",
"band",
",",
"int",
"currHeigth",
",",
"boolean",
"fitToContent",
")",
"{",
"if",
"(",
"band",
"!=",
"null",
")",
"{",
"int",
"finalHeight",
"=",
"LayoutUtils",
".",
"findVerticalOffset",
"(",
"band... | Removes empty space when "fitToContent" is true and real height of object is
taller than current bands height, otherwise, it is not modified
@param band
@param currHeigth
@param fitToContent | [
"Removes",
"empty",
"space",
"when",
"fitToContent",
"is",
"true",
"and",
"real",
"height",
"of",
"object",
"is",
"taller",
"than",
"current",
"bands",
"height",
"otherwise",
"it",
"is",
"not",
"modified"
] | 63919574cc401ae40574d13129f628e66d1682a3 | https://github.com/intive-FDV/DynamicJasper/blob/63919574cc401ae40574d13129f628e66d1682a3/src/main/java/ar/com/fdvs/dj/core/layout/AbstractLayoutManager.java#L742-L753 | train |
intive-FDV/DynamicJasper | src/main/java/ar/com/fdvs/dj/core/layout/AbstractLayoutManager.java | AbstractLayoutManager.getParent | protected JRDesignGroup getParent(JRDesignGroup group) {
int index = realGroups.indexOf(group);
return (index > 0) ? (JRDesignGroup) realGroups.get(index - 1) : group;
} | java | protected JRDesignGroup getParent(JRDesignGroup group) {
int index = realGroups.indexOf(group);
return (index > 0) ? (JRDesignGroup) realGroups.get(index - 1) : group;
} | [
"protected",
"JRDesignGroup",
"getParent",
"(",
"JRDesignGroup",
"group",
")",
"{",
"int",
"index",
"=",
"realGroups",
".",
"indexOf",
"(",
"group",
")",
";",
"return",
"(",
"index",
">",
"0",
")",
"?",
"(",
"JRDesignGroup",
")",
"realGroups",
".",
"get",
... | Finds the parent group of the given one and returns it
@param group Group for which the parent is needed
@return The parent group of the given one. If the given one is the first one, it returns the same group | [
"Finds",
"the",
"parent",
"group",
"of",
"the",
"given",
"one",
"and",
"returns",
"it"
] | 63919574cc401ae40574d13129f628e66d1682a3 | https://github.com/intive-FDV/DynamicJasper/blob/63919574cc401ae40574d13129f628e66d1682a3/src/main/java/ar/com/fdvs/dj/core/layout/AbstractLayoutManager.java#L1325-L1328 | train |
intive-FDV/DynamicJasper | src/main/java/ar/com/fdvs/dj/util/LayoutUtils.java | LayoutUtils.findVerticalOffset | public static int findVerticalOffset(JRDesignBand band) {
int finalHeight = 0;
if (band != null) {
for (JRChild jrChild : band.getChildren()) {
JRDesignElement element = (JRDesignElement) jrChild;
int currentHeight = element.getY() + element.getHeight();
if (currentHeight > finalHeight) finalHeight =... | java | public static int findVerticalOffset(JRDesignBand band) {
int finalHeight = 0;
if (band != null) {
for (JRChild jrChild : band.getChildren()) {
JRDesignElement element = (JRDesignElement) jrChild;
int currentHeight = element.getY() + element.getHeight();
if (currentHeight > finalHeight) finalHeight =... | [
"public",
"static",
"int",
"findVerticalOffset",
"(",
"JRDesignBand",
"band",
")",
"{",
"int",
"finalHeight",
"=",
"0",
";",
"if",
"(",
"band",
"!=",
"null",
")",
"{",
"for",
"(",
"JRChild",
"jrChild",
":",
"band",
".",
"getChildren",
"(",
")",
")",
"{... | Finds "Y" coordinate value in which more elements could be added in the band
@param band
@return | [
"Finds",
"Y",
"coordinate",
"value",
"in",
"which",
"more",
"elements",
"could",
"be",
"added",
"in",
"the",
"band"
] | 63919574cc401ae40574d13129f628e66d1682a3 | https://github.com/intive-FDV/DynamicJasper/blob/63919574cc401ae40574d13129f628e66d1682a3/src/main/java/ar/com/fdvs/dj/util/LayoutUtils.java#L35-L46 | train |
intive-FDV/DynamicJasper | src/main/java/ar/com/fdvs/dj/util/LayoutUtils.java | LayoutUtils.moveBandsElemnts | public static void moveBandsElemnts(int yOffset, JRDesignBand band) {
if (band == null)
return;
for (JRChild jrChild : band.getChildren()) {
JRDesignElement elem = (JRDesignElement) jrChild;
elem.setY(elem.getY() + yOffset);
}
} | java | public static void moveBandsElemnts(int yOffset, JRDesignBand band) {
if (band == null)
return;
for (JRChild jrChild : band.getChildren()) {
JRDesignElement elem = (JRDesignElement) jrChild;
elem.setY(elem.getY() + yOffset);
}
} | [
"public",
"static",
"void",
"moveBandsElemnts",
"(",
"int",
"yOffset",
",",
"JRDesignBand",
"band",
")",
"{",
"if",
"(",
"band",
"==",
"null",
")",
"return",
";",
"for",
"(",
"JRChild",
"jrChild",
":",
"band",
".",
"getChildren",
"(",
")",
")",
"{",
"J... | Moves the elements contained in "band" in the Y axis "yOffset"
@param yOffset
@param band | [
"Moves",
"the",
"elements",
"contained",
"in",
"band",
"in",
"the",
"Y",
"axis",
"yOffset"
] | 63919574cc401ae40574d13129f628e66d1682a3 | https://github.com/intive-FDV/DynamicJasper/blob/63919574cc401ae40574d13129f628e66d1682a3/src/main/java/ar/com/fdvs/dj/util/LayoutUtils.java#L89-L97 | train |
intive-FDV/DynamicJasper | src/main/java/ar/com/fdvs/dj/util/LayoutUtils.java | LayoutUtils.getJRDesignGroup | public static JRDesignGroup getJRDesignGroup(DynamicJasperDesign jd, LayoutManager layoutManager, DJGroup group) {
Map references = layoutManager.getReferencesMap();
for (Object o : references.keySet()) {
String groupName = (String) o;
DJGroup djGroup = (DJGroup) references.get(groupName);
if (group == djG... | java | public static JRDesignGroup getJRDesignGroup(DynamicJasperDesign jd, LayoutManager layoutManager, DJGroup group) {
Map references = layoutManager.getReferencesMap();
for (Object o : references.keySet()) {
String groupName = (String) o;
DJGroup djGroup = (DJGroup) references.get(groupName);
if (group == djG... | [
"public",
"static",
"JRDesignGroup",
"getJRDesignGroup",
"(",
"DynamicJasperDesign",
"jd",
",",
"LayoutManager",
"layoutManager",
",",
"DJGroup",
"group",
")",
"{",
"Map",
"references",
"=",
"layoutManager",
".",
"getReferencesMap",
"(",
")",
";",
"for",
"(",
"Obj... | Returns the JRDesignGroup for the DJGroup passed
@param jd
@param layoutManager
@param group
@return | [
"Returns",
"the",
"JRDesignGroup",
"for",
"the",
"DJGroup",
"passed"
] | 63919574cc401ae40574d13129f628e66d1682a3 | https://github.com/intive-FDV/DynamicJasper/blob/63919574cc401ae40574d13129f628e66d1682a3/src/main/java/ar/com/fdvs/dj/util/LayoutUtils.java#L122-L132 | train |
intive-FDV/DynamicJasper | src/main/java/ar/com/fdvs/dj/core/layout/ClassicLayoutManager.java | ClassicLayoutManager.applyBanners | protected void applyBanners() {
DynamicReportOptions options = getReport().getOptions();
if (options.getFirstPageImageBanners().isEmpty() && options.getImageBanners().isEmpty()){
return;
}
/*
First create image banners for the first page only
*/
JRDesignBand title = (JRDe... | java | protected void applyBanners() {
DynamicReportOptions options = getReport().getOptions();
if (options.getFirstPageImageBanners().isEmpty() && options.getImageBanners().isEmpty()){
return;
}
/*
First create image banners for the first page only
*/
JRDesignBand title = (JRDe... | [
"protected",
"void",
"applyBanners",
"(",
")",
"{",
"DynamicReportOptions",
"options",
"=",
"getReport",
"(",
")",
".",
"getOptions",
"(",
")",
";",
"if",
"(",
"options",
".",
"getFirstPageImageBanners",
"(",
")",
".",
"isEmpty",
"(",
")",
"&&",
"options",
... | Create the image elements for the banners tha goes into the
title and header bands depending on the case | [
"Create",
"the",
"image",
"elements",
"for",
"the",
"banners",
"tha",
"goes",
"into",
"the",
"title",
"and",
"header",
"bands",
"depending",
"on",
"the",
"case"
] | 63919574cc401ae40574d13129f628e66d1682a3 | https://github.com/intive-FDV/DynamicJasper/blob/63919574cc401ae40574d13129f628e66d1682a3/src/main/java/ar/com/fdvs/dj/core/layout/ClassicLayoutManager.java#L246-L282 | train |
intive-FDV/DynamicJasper | src/main/java/ar/com/fdvs/dj/core/layout/ClassicLayoutManager.java | ClassicLayoutManager.generateTitleBand | protected void generateTitleBand() {
log.debug("Generating title band...");
JRDesignBand band = (JRDesignBand) getDesign().getPageHeader();
int yOffset = 0;
//If title is not present then subtitle will be ignored
if (getReport().getTitle() == null)
return;
if (band != null && !getDesign().isTitleNewPag... | java | protected void generateTitleBand() {
log.debug("Generating title band...");
JRDesignBand band = (JRDesignBand) getDesign().getPageHeader();
int yOffset = 0;
//If title is not present then subtitle will be ignored
if (getReport().getTitle() == null)
return;
if (band != null && !getDesign().isTitleNewPag... | [
"protected",
"void",
"generateTitleBand",
"(",
")",
"{",
"log",
".",
"debug",
"(",
"\"Generating title band...\"",
")",
";",
"JRDesignBand",
"band",
"=",
"(",
"JRDesignBand",
")",
"getDesign",
"(",
")",
".",
"getPageHeader",
"(",
")",
";",
"int",
"yOffset",
... | Adds title and subtitle to the TitleBand when it applies.
If title is not present then subtitle will be ignored | [
"Adds",
"title",
"and",
"subtitle",
"to",
"the",
"TitleBand",
"when",
"it",
"applies",
".",
"If",
"title",
"is",
"not",
"present",
"then",
"subtitle",
"will",
"be",
"ignored"
] | 63919574cc401ae40574d13129f628e66d1682a3 | https://github.com/intive-FDV/DynamicJasper/blob/63919574cc401ae40574d13129f628e66d1682a3/src/main/java/ar/com/fdvs/dj/core/layout/ClassicLayoutManager.java#L370-L430 | train |
intive-FDV/DynamicJasper | src/main/java/ar/com/fdvs/dj/core/layout/ClassicLayoutManager.java | ClassicLayoutManager.layoutGroupFooterLabels | protected void layoutGroupFooterLabels(DJGroup djgroup, JRDesignGroup jgroup, int x, int y, int width, int height) {
//List footerVariables = djgroup.getFooterVariables();
DJGroupLabel label = djgroup.getFooterLabel();
//if (label == null || footerVariables.isEmpty())
//return;
//PropertyColumn col = djgro... | java | protected void layoutGroupFooterLabels(DJGroup djgroup, JRDesignGroup jgroup, int x, int y, int width, int height) {
//List footerVariables = djgroup.getFooterVariables();
DJGroupLabel label = djgroup.getFooterLabel();
//if (label == null || footerVariables.isEmpty())
//return;
//PropertyColumn col = djgro... | [
"protected",
"void",
"layoutGroupFooterLabels",
"(",
"DJGroup",
"djgroup",
",",
"JRDesignGroup",
"jgroup",
",",
"int",
"x",
",",
"int",
"y",
",",
"int",
"width",
",",
"int",
"height",
")",
"{",
"//List footerVariables = djgroup.getFooterVariables();",
"DJGroupLabel",
... | Creates needed textfields for general label in footer groups.
@param djgroup
@param jgroup | [
"Creates",
"needed",
"textfields",
"for",
"general",
"label",
"in",
"footer",
"groups",
"."
] | 63919574cc401ae40574d13129f628e66d1682a3 | https://github.com/intive-FDV/DynamicJasper/blob/63919574cc401ae40574d13129f628e66d1682a3/src/main/java/ar/com/fdvs/dj/core/layout/ClassicLayoutManager.java#L554-L590 | train |
intive-FDV/DynamicJasper | src/main/java/ar/com/fdvs/dj/core/layout/ClassicLayoutManager.java | ClassicLayoutManager.findYOffsetForGroupLabel | private int findYOffsetForGroupLabel(JRDesignBand band) {
int offset = 0;
for (JRChild jrChild : band.getChildren()) {
JRDesignElement elem = (JRDesignElement) jrChild;
if (elem.getKey() != null && elem.getKey().startsWith("variable_for_column_")) {
offset = elem.getY();
break;
}
}
return offse... | java | private int findYOffsetForGroupLabel(JRDesignBand band) {
int offset = 0;
for (JRChild jrChild : band.getChildren()) {
JRDesignElement elem = (JRDesignElement) jrChild;
if (elem.getKey() != null && elem.getKey().startsWith("variable_for_column_")) {
offset = elem.getY();
break;
}
}
return offse... | [
"private",
"int",
"findYOffsetForGroupLabel",
"(",
"JRDesignBand",
"band",
")",
"{",
"int",
"offset",
"=",
"0",
";",
"for",
"(",
"JRChild",
"jrChild",
":",
"band",
".",
"getChildren",
"(",
")",
")",
"{",
"JRDesignElement",
"elem",
"=",
"(",
"JRDesignElement"... | Used to ensure that the general footer label will be at the same Y position as the variables in the band.
@param band
@return | [
"Used",
"to",
"ensure",
"that",
"the",
"general",
"footer",
"label",
"will",
"be",
"at",
"the",
"same",
"Y",
"position",
"as",
"the",
"variables",
"in",
"the",
"band",
"."
] | 63919574cc401ae40574d13129f628e66d1682a3 | https://github.com/intive-FDV/DynamicJasper/blob/63919574cc401ae40574d13129f628e66d1682a3/src/main/java/ar/com/fdvs/dj/core/layout/ClassicLayoutManager.java#L597-L607 | train |
intive-FDV/DynamicJasper | src/main/java/ar/com/fdvs/dj/core/layout/ClassicLayoutManager.java | ClassicLayoutManager.layoutGroupSubreports | protected void layoutGroupSubreports(DJGroup columnsGroup, JRDesignGroup jgroup) {
log.debug("Starting subreport layout...");
JRDesignBand footerBand = (JRDesignBand) ((JRDesignSection)jgroup.getGroupFooterSection()).getBandsList().get(0);
JRDesignBand headerBand = (JRDesignBand) ((JRDesignSection)jgroup.getGroup... | java | protected void layoutGroupSubreports(DJGroup columnsGroup, JRDesignGroup jgroup) {
log.debug("Starting subreport layout...");
JRDesignBand footerBand = (JRDesignBand) ((JRDesignSection)jgroup.getGroupFooterSection()).getBandsList().get(0);
JRDesignBand headerBand = (JRDesignBand) ((JRDesignSection)jgroup.getGroup... | [
"protected",
"void",
"layoutGroupSubreports",
"(",
"DJGroup",
"columnsGroup",
",",
"JRDesignGroup",
"jgroup",
")",
"{",
"log",
".",
"debug",
"(",
"\"Starting subreport layout...\"",
")",
";",
"JRDesignBand",
"footerBand",
"=",
"(",
"JRDesignBand",
")",
"(",
"(",
"... | If there is a SubReport on a Group, we do the layout here
@param columnsGroup
@param jgroup | [
"If",
"there",
"is",
"a",
"SubReport",
"on",
"a",
"Group",
"we",
"do",
"the",
"layout",
"here"
] | 63919574cc401ae40574d13129f628e66d1682a3 | https://github.com/intive-FDV/DynamicJasper/blob/63919574cc401ae40574d13129f628e66d1682a3/src/main/java/ar/com/fdvs/dj/core/layout/ClassicLayoutManager.java#L734-L742 | train |
intive-FDV/DynamicJasper | src/main/java/ar/com/fdvs/dj/core/layout/ClassicLayoutManager.java | ClassicLayoutManager.sendPageBreakToBottom | protected void sendPageBreakToBottom(JRDesignBand band) {
JRElement[] elems = band.getElements();
JRElement aux = null;
for (JRElement elem : elems) {
if (("" + elem.getKey()).startsWith(PAGE_BREAK_FOR_)) {
aux = elem;
break;
}
}
if (aux != null)
((JRDesignElement)aux).setY(band.getHeight());... | java | protected void sendPageBreakToBottom(JRDesignBand band) {
JRElement[] elems = band.getElements();
JRElement aux = null;
for (JRElement elem : elems) {
if (("" + elem.getKey()).startsWith(PAGE_BREAK_FOR_)) {
aux = elem;
break;
}
}
if (aux != null)
((JRDesignElement)aux).setY(band.getHeight());... | [
"protected",
"void",
"sendPageBreakToBottom",
"(",
"JRDesignBand",
"band",
")",
"{",
"JRElement",
"[",
"]",
"elems",
"=",
"band",
".",
"getElements",
"(",
")",
";",
"JRElement",
"aux",
"=",
"null",
";",
"for",
"(",
"JRElement",
"elem",
":",
"elems",
")",
... | page breaks should be near the bottom of the band, this method used while adding subreports
which has the "start on new page" option.
@param band | [
"page",
"breaks",
"should",
"be",
"near",
"the",
"bottom",
"of",
"the",
"band",
"this",
"method",
"used",
"while",
"adding",
"subreports",
"which",
"has",
"the",
"start",
"on",
"new",
"page",
"option",
"."
] | 63919574cc401ae40574d13129f628e66d1682a3 | https://github.com/intive-FDV/DynamicJasper/blob/63919574cc401ae40574d13129f628e66d1682a3/src/main/java/ar/com/fdvs/dj/core/layout/ClassicLayoutManager.java#L864-L875 | train |
intive-FDV/DynamicJasper | src/main/java/ar/com/fdvs/dj/domain/builders/CrosstabBuilder.java | CrosstabBuilder.build | public DJCrosstab build(){
if (crosstab.getMeasures().isEmpty()){
throw new LayoutException("Crosstabs must have at least one measure");
}
if (crosstab.getColumns().isEmpty()){
throw new LayoutException("Crosstabs must have at least one column");
}
if (crosstab.getRows().isEmpty()){
throw new... | java | public DJCrosstab build(){
if (crosstab.getMeasures().isEmpty()){
throw new LayoutException("Crosstabs must have at least one measure");
}
if (crosstab.getColumns().isEmpty()){
throw new LayoutException("Crosstabs must have at least one column");
}
if (crosstab.getRows().isEmpty()){
throw new... | [
"public",
"DJCrosstab",
"build",
"(",
")",
"{",
"if",
"(",
"crosstab",
".",
"getMeasures",
"(",
")",
".",
"isEmpty",
"(",
")",
")",
"{",
"throw",
"new",
"LayoutException",
"(",
"\"Crosstabs must have at least one measure\"",
")",
";",
"}",
"if",
"(",
"crosst... | Build the crosstab. Throws LayoutException if anything is wrong
@return | [
"Build",
"the",
"crosstab",
".",
"Throws",
"LayoutException",
"if",
"anything",
"is",
"wrong"
] | 63919574cc401ae40574d13129f628e66d1682a3 | https://github.com/intive-FDV/DynamicJasper/blob/63919574cc401ae40574d13129f628e66d1682a3/src/main/java/ar/com/fdvs/dj/domain/builders/CrosstabBuilder.java#L65-L107 | train |
intive-FDV/DynamicJasper | src/main/java/ar/com/fdvs/dj/domain/builders/CrosstabBuilder.java | CrosstabBuilder.useMainReportDatasource | public CrosstabBuilder useMainReportDatasource(boolean preSorted) {
DJDataSource datasource = new DJDataSource("ds",DJConstants.DATA_SOURCE_ORIGIN_REPORT_DATASOURCE,DJConstants.DATA_SOURCE_TYPE_JRDATASOURCE);
datasource.setPreSorted(preSorted);
crosstab.setDatasource(datasource);
return this;
} | java | public CrosstabBuilder useMainReportDatasource(boolean preSorted) {
DJDataSource datasource = new DJDataSource("ds",DJConstants.DATA_SOURCE_ORIGIN_REPORT_DATASOURCE,DJConstants.DATA_SOURCE_TYPE_JRDATASOURCE);
datasource.setPreSorted(preSorted);
crosstab.setDatasource(datasource);
return this;
} | [
"public",
"CrosstabBuilder",
"useMainReportDatasource",
"(",
"boolean",
"preSorted",
")",
"{",
"DJDataSource",
"datasource",
"=",
"new",
"DJDataSource",
"(",
"\"ds\"",
",",
"DJConstants",
".",
"DATA_SOURCE_ORIGIN_REPORT_DATASOURCE",
",",
"DJConstants",
".",
"DATA_SOURCE_T... | To use main report datasource. There should be nothing else in the detail band
@param preSorted
@return | [
"To",
"use",
"main",
"report",
"datasource",
".",
"There",
"should",
"be",
"nothing",
"else",
"in",
"the",
"detail",
"band"
] | 63919574cc401ae40574d13129f628e66d1682a3 | https://github.com/intive-FDV/DynamicJasper/blob/63919574cc401ae40574d13129f628e66d1682a3/src/main/java/ar/com/fdvs/dj/domain/builders/CrosstabBuilder.java#L148-L153 | train |
intive-FDV/DynamicJasper | src/main/java/ar/com/fdvs/dj/domain/builders/CrosstabBuilder.java | CrosstabBuilder.addInvisibleMeasure | public CrosstabBuilder addInvisibleMeasure(String property, String className, String title) {
DJCrosstabMeasure measure = new DJCrosstabMeasure(property, className, DJCalculation.NOTHING, title);
measure.setVisible(false);
crosstab.getMeasures().add(measure);
return this;
} | java | public CrosstabBuilder addInvisibleMeasure(String property, String className, String title) {
DJCrosstabMeasure measure = new DJCrosstabMeasure(property, className, DJCalculation.NOTHING, title);
measure.setVisible(false);
crosstab.getMeasures().add(measure);
return this;
} | [
"public",
"CrosstabBuilder",
"addInvisibleMeasure",
"(",
"String",
"property",
",",
"String",
"className",
",",
"String",
"title",
")",
"{",
"DJCrosstabMeasure",
"measure",
"=",
"new",
"DJCrosstabMeasure",
"(",
"property",
",",
"className",
",",
"DJCalculation",
"."... | Adds a measure to the crosstab. A crosstab can have many measures. DJ will lay out one measure above
the other.
A measure is what is shown on each intersection of a column and a row. A calculation is performed to
all occurrences in the datasource where the column and row values matches (between elements)
The only dif... | [
"Adds",
"a",
"measure",
"to",
"the",
"crosstab",
".",
"A",
"crosstab",
"can",
"have",
"many",
"measures",
".",
"DJ",
"will",
"lay",
"out",
"one",
"measure",
"above",
"the",
"other",
"."
] | 63919574cc401ae40574d13129f628e66d1682a3 | https://github.com/intive-FDV/DynamicJasper/blob/63919574cc401ae40574d13129f628e66d1682a3/src/main/java/ar/com/fdvs/dj/domain/builders/CrosstabBuilder.java#L216-L221 | train |
intive-FDV/DynamicJasper | src/main/java/ar/com/fdvs/dj/domain/builders/CrosstabBuilder.java | CrosstabBuilder.setRowStyles | public CrosstabBuilder setRowStyles(Style headerStyle, Style totalStyle, Style totalHeaderStyle) {
crosstab.setRowHeaderStyle(headerStyle);
crosstab.setRowTotalheaderStyle(totalHeaderStyle);
crosstab.setRowTotalStyle(totalStyle);
return this;
} | java | public CrosstabBuilder setRowStyles(Style headerStyle, Style totalStyle, Style totalHeaderStyle) {
crosstab.setRowHeaderStyle(headerStyle);
crosstab.setRowTotalheaderStyle(totalHeaderStyle);
crosstab.setRowTotalStyle(totalStyle);
return this;
} | [
"public",
"CrosstabBuilder",
"setRowStyles",
"(",
"Style",
"headerStyle",
",",
"Style",
"totalStyle",
",",
"Style",
"totalHeaderStyle",
")",
"{",
"crosstab",
".",
"setRowHeaderStyle",
"(",
"headerStyle",
")",
";",
"crosstab",
".",
"setRowTotalheaderStyle",
"(",
"tot... | Should be called after all rows have been created
@param headerStyle
@param totalStyle
@param totalHeaderStyle
@return | [
"Should",
"be",
"called",
"after",
"all",
"rows",
"have",
"been",
"created"
] | 63919574cc401ae40574d13129f628e66d1682a3 | https://github.com/intive-FDV/DynamicJasper/blob/63919574cc401ae40574d13129f628e66d1682a3/src/main/java/ar/com/fdvs/dj/domain/builders/CrosstabBuilder.java#L385-L390 | train |
intive-FDV/DynamicJasper | src/main/java/ar/com/fdvs/dj/domain/builders/CrosstabBuilder.java | CrosstabBuilder.setColumnStyles | public CrosstabBuilder setColumnStyles(Style headerStyle, Style totalStyle, Style totalHeaderStyle) {
crosstab.setColumnHeaderStyle(headerStyle);
crosstab.setColumnTotalheaderStyle(totalHeaderStyle);
crosstab.setColumnTotalStyle(totalStyle);
return this;
} | java | public CrosstabBuilder setColumnStyles(Style headerStyle, Style totalStyle, Style totalHeaderStyle) {
crosstab.setColumnHeaderStyle(headerStyle);
crosstab.setColumnTotalheaderStyle(totalHeaderStyle);
crosstab.setColumnTotalStyle(totalStyle);
return this;
} | [
"public",
"CrosstabBuilder",
"setColumnStyles",
"(",
"Style",
"headerStyle",
",",
"Style",
"totalStyle",
",",
"Style",
"totalHeaderStyle",
")",
"{",
"crosstab",
".",
"setColumnHeaderStyle",
"(",
"headerStyle",
")",
";",
"crosstab",
".",
"setColumnTotalheaderStyle",
"(... | Should be called after all columns have been created
@param headerStyle
@param totalStyle
@param totalHeaderStyle
@return | [
"Should",
"be",
"called",
"after",
"all",
"columns",
"have",
"been",
"created"
] | 63919574cc401ae40574d13129f628e66d1682a3 | https://github.com/intive-FDV/DynamicJasper/blob/63919574cc401ae40574d13129f628e66d1682a3/src/main/java/ar/com/fdvs/dj/domain/builders/CrosstabBuilder.java#L399-L404 | train |
intive-FDV/DynamicJasper | src/main/java/ar/com/fdvs/dj/domain/builders/FastReportBuilder.java | FastReportBuilder.addBarcodeColumn | public FastReportBuilder addBarcodeColumn(String title, String property,String className, int barcodeType,boolean showText, int width, boolean fixedWidth,ImageScaleMode imageScaleMode, Style style) throws ColumnBuilderException, ClassNotFoundException {
AbstractColumn column = ColumnBuilder.getNew()
.setColumnProp... | java | public FastReportBuilder addBarcodeColumn(String title, String property,String className, int barcodeType,boolean showText, int width, boolean fixedWidth,ImageScaleMode imageScaleMode, Style style) throws ColumnBuilderException, ClassNotFoundException {
AbstractColumn column = ColumnBuilder.getNew()
.setColumnProp... | [
"public",
"FastReportBuilder",
"addBarcodeColumn",
"(",
"String",
"title",
",",
"String",
"property",
",",
"String",
"className",
",",
"int",
"barcodeType",
",",
"boolean",
"showText",
",",
"int",
"width",
",",
"boolean",
"fixedWidth",
",",
"ImageScaleMode",
"imag... | By default uses InputStream as the type of the image
@param title
@param property
@param width
@param fixedWidth
@param imageScaleMode
@param style
@return
@throws ColumnBuilderException
@throws ClassNotFoundException | [
"By",
"default",
"uses",
"InputStream",
"as",
"the",
"type",
"of",
"the",
"image"
] | 63919574cc401ae40574d13129f628e66d1682a3 | https://github.com/intive-FDV/DynamicJasper/blob/63919574cc401ae40574d13129f628e66d1682a3/src/main/java/ar/com/fdvs/dj/domain/builders/FastReportBuilder.java#L343-L361 | train |
intive-FDV/DynamicJasper | src/main/java/ar/com/fdvs/dj/domain/builders/FastReportBuilder.java | FastReportBuilder.addGroups | public FastReportBuilder addGroups(int numgroups) {
groupCount = numgroups;
for (int i = 0; i < groupCount; i++) {
GroupBuilder gb = new GroupBuilder();
PropertyColumn col = (PropertyColumn) report.getColumns().get(i);
gb.setCriteriaColumn(col);
report.getColumnsGroups().add(gb.build());
}
return th... | java | public FastReportBuilder addGroups(int numgroups) {
groupCount = numgroups;
for (int i = 0; i < groupCount; i++) {
GroupBuilder gb = new GroupBuilder();
PropertyColumn col = (PropertyColumn) report.getColumns().get(i);
gb.setCriteriaColumn(col);
report.getColumnsGroups().add(gb.build());
}
return th... | [
"public",
"FastReportBuilder",
"addGroups",
"(",
"int",
"numgroups",
")",
"{",
"groupCount",
"=",
"numgroups",
";",
"for",
"(",
"int",
"i",
"=",
"0",
";",
"i",
"<",
"groupCount",
";",
"i",
"++",
")",
"{",
"GroupBuilder",
"gb",
"=",
"new",
"GroupBuilder",... | This method should be called after all column have been added to the report.
@param numgroups
@return | [
"This",
"method",
"should",
"be",
"called",
"after",
"all",
"column",
"have",
"been",
"added",
"to",
"the",
"report",
"."
] | 63919574cc401ae40574d13129f628e66d1682a3 | https://github.com/intive-FDV/DynamicJasper/blob/63919574cc401ae40574d13129f628e66d1682a3/src/main/java/ar/com/fdvs/dj/domain/builders/FastReportBuilder.java#L519-L528 | train |
intive-FDV/DynamicJasper | src/main/java/ar/com/fdvs/dj/core/registration/ColumnRegistrationManager.java | ColumnRegistrationManager.transformEntity | protected Object transformEntity(Entity entity) {
PropertyColumn propertyColumn = (PropertyColumn) entity;
JRDesignField field = new JRDesignField();
ColumnProperty columnProperty = propertyColumn.getColumnProperty();
field.setName(columnProperty.getProperty());
field.setValueClassName(columnProperty.getValue... | java | protected Object transformEntity(Entity entity) {
PropertyColumn propertyColumn = (PropertyColumn) entity;
JRDesignField field = new JRDesignField();
ColumnProperty columnProperty = propertyColumn.getColumnProperty();
field.setName(columnProperty.getProperty());
field.setValueClassName(columnProperty.getValue... | [
"protected",
"Object",
"transformEntity",
"(",
"Entity",
"entity",
")",
"{",
"PropertyColumn",
"propertyColumn",
"=",
"(",
"PropertyColumn",
")",
"entity",
";",
"JRDesignField",
"field",
"=",
"new",
"JRDesignField",
"(",
")",
";",
"ColumnProperty",
"columnProperty",... | Receives a PropertyColumn and returns a JRDesignField | [
"Receives",
"a",
"PropertyColumn",
"and",
"returns",
"a",
"JRDesignField"
] | 63919574cc401ae40574d13129f628e66d1682a3 | https://github.com/intive-FDV/DynamicJasper/blob/63919574cc401ae40574d13129f628e66d1682a3/src/main/java/ar/com/fdvs/dj/core/registration/ColumnRegistrationManager.java#L136-L150 | train |
intive-FDV/DynamicJasper | src/main/java/ar/com/fdvs/dj/domain/entities/columns/PercentageColumn.java | PercentageColumn.getTextForExpression | public String getTextForExpression(DJGroup group, DJGroup childGroup, String type) {
return "new Double( $V{" + getReportName() + "_" + getGroupVariableName(childGroup) + "}.doubleValue() / $V{" + getReportName() + "_" + getGroupVariableName(type,group.getColumnToGroupBy().getColumnProperty().getProperty()) + "}.dou... | java | public String getTextForExpression(DJGroup group, DJGroup childGroup, String type) {
return "new Double( $V{" + getReportName() + "_" + getGroupVariableName(childGroup) + "}.doubleValue() / $V{" + getReportName() + "_" + getGroupVariableName(type,group.getColumnToGroupBy().getColumnProperty().getProperty()) + "}.dou... | [
"public",
"String",
"getTextForExpression",
"(",
"DJGroup",
"group",
",",
"DJGroup",
"childGroup",
",",
"String",
"type",
")",
"{",
"return",
"\"new Double( $V{\"",
"+",
"getReportName",
"(",
")",
"+",
"\"_\"",
"+",
"getGroupVariableName",
"(",
"childGroup",
")",
... | Returns the formula for the percentage
@param group
@param type
@return | [
"Returns",
"the",
"formula",
"for",
"the",
"percentage"
] | 63919574cc401ae40574d13129f628e66d1682a3 | https://github.com/intive-FDV/DynamicJasper/blob/63919574cc401ae40574d13129f628e66d1682a3/src/main/java/ar/com/fdvs/dj/domain/entities/columns/PercentageColumn.java#L32-L34 | train |
intive-FDV/DynamicJasper | src/main/java/ar/com/fdvs/dj/output/ReportWriterFactory.java | ReportWriterFactory.getReportWriter | public ReportWriter getReportWriter(final JasperPrint _jasperPrint, final String _format, final Map<JRExporterParameter,Object> _parameters) {
final JRExporter exporter = FormatInfoRegistry.getInstance().getExporter(_format);
exporter.setParameters(_parameters);
if (_jasperPrint.getPages().size... | java | public ReportWriter getReportWriter(final JasperPrint _jasperPrint, final String _format, final Map<JRExporterParameter,Object> _parameters) {
final JRExporter exporter = FormatInfoRegistry.getInstance().getExporter(_format);
exporter.setParameters(_parameters);
if (_jasperPrint.getPages().size... | [
"public",
"ReportWriter",
"getReportWriter",
"(",
"final",
"JasperPrint",
"_jasperPrint",
",",
"final",
"String",
"_format",
",",
"final",
"Map",
"<",
"JRExporterParameter",
",",
"Object",
">",
"_parameters",
")",
"{",
"final",
"JRExporter",
"exporter",
"=",
"Form... | Returns a ReportWriter that which will use memory or a file depending on the parameter PAGES_THRESHOLD
@param _jasperPrint
@param _format
@param _parameters
@return | [
"Returns",
"a",
"ReportWriter",
"that",
"which",
"will",
"use",
"memory",
"or",
"a",
"file",
"depending",
"on",
"the",
"parameter",
"PAGES_THRESHOLD"
] | 63919574cc401ae40574d13129f628e66d1682a3 | https://github.com/intive-FDV/DynamicJasper/blob/63919574cc401ae40574d13129f628e66d1682a3/src/main/java/ar/com/fdvs/dj/output/ReportWriterFactory.java#L64-L73 | train |
intive-FDV/DynamicJasper | src/main/java/ar/com/fdvs/dj/core/layout/HorizontalBandAlignment.java | HorizontalBandAlignment.buildAligment | public static HorizontalBandAlignment buildAligment(byte aligment){
if (aligment == RIGHT.getAlignment())
return RIGHT;
else if (aligment == LEFT.getAlignment())
return LEFT;
else if (aligment == CENTER.getAlignment())
return CENTER;
return LEFT;
} | java | public static HorizontalBandAlignment buildAligment(byte aligment){
if (aligment == RIGHT.getAlignment())
return RIGHT;
else if (aligment == LEFT.getAlignment())
return LEFT;
else if (aligment == CENTER.getAlignment())
return CENTER;
return LEFT;
} | [
"public",
"static",
"HorizontalBandAlignment",
"buildAligment",
"(",
"byte",
"aligment",
")",
"{",
"if",
"(",
"aligment",
"==",
"RIGHT",
".",
"getAlignment",
"(",
")",
")",
"return",
"RIGHT",
";",
"else",
"if",
"(",
"aligment",
"==",
"LEFT",
".",
"getAlignme... | To be used with AutoText class constants ALIGMENT_LEFT, ALIGMENT_CENTER and ALIGMENT_RIGHT
@param aligment
@return | [
"To",
"be",
"used",
"with",
"AutoText",
"class",
"constants",
"ALIGMENT_LEFT",
"ALIGMENT_CENTER",
"and",
"ALIGMENT_RIGHT"
] | 63919574cc401ae40574d13129f628e66d1682a3 | https://github.com/intive-FDV/DynamicJasper/blob/63919574cc401ae40574d13129f628e66d1682a3/src/main/java/ar/com/fdvs/dj/core/layout/HorizontalBandAlignment.java#L47-L56 | train |
intive-FDV/DynamicJasper | src/main/java/ar/com/fdvs/dj/webwork/DJResult.java | DJResult.getParametersMap | protected Map getParametersMap(ActionInvocation _invocation) {
Map map = (Map) _invocation.getStack().findValue(this.parameters);
if (map == null)
map = new HashMap();
return map;
} | java | protected Map getParametersMap(ActionInvocation _invocation) {
Map map = (Map) _invocation.getStack().findValue(this.parameters);
if (map == null)
map = new HashMap();
return map;
} | [
"protected",
"Map",
"getParametersMap",
"(",
"ActionInvocation",
"_invocation",
")",
"{",
"Map",
"map",
"=",
"(",
"Map",
")",
"_invocation",
".",
"getStack",
"(",
")",
".",
"findValue",
"(",
"this",
".",
"parameters",
")",
";",
"if",
"(",
"map",
"==",
"n... | Returns the object pointed by the result-type parameter "parameters"
@param _invocation
@return | [
"Returns",
"the",
"object",
"pointed",
"by",
"the",
"result",
"-",
"type",
"parameter",
"parameters"
] | 63919574cc401ae40574d13129f628e66d1682a3 | https://github.com/intive-FDV/DynamicJasper/blob/63919574cc401ae40574d13129f628e66d1682a3/src/main/java/ar/com/fdvs/dj/webwork/DJResult.java#L146-L151 | train |
intive-FDV/DynamicJasper | src/main/java/ar/com/fdvs/dj/webwork/DJResult.java | DJResult.getLayOutManagerObj | protected LayoutManager getLayOutManagerObj(ActionInvocation _invocation) {
if (layoutManager == null || "".equals(layoutManager)){
LOG.warn("No valid LayoutManager, using ClassicLayoutManager");
return new ClassicLayoutManager();
}
Object los = conditionalParse(layoutManager, _invocation);
if (los inst... | java | protected LayoutManager getLayOutManagerObj(ActionInvocation _invocation) {
if (layoutManager == null || "".equals(layoutManager)){
LOG.warn("No valid LayoutManager, using ClassicLayoutManager");
return new ClassicLayoutManager();
}
Object los = conditionalParse(layoutManager, _invocation);
if (los inst... | [
"protected",
"LayoutManager",
"getLayOutManagerObj",
"(",
"ActionInvocation",
"_invocation",
")",
"{",
"if",
"(",
"layoutManager",
"==",
"null",
"||",
"\"\"",
".",
"equals",
"(",
"layoutManager",
")",
")",
"{",
"LOG",
".",
"warn",
"(",
"\"No valid LayoutManager, u... | Returns the export format indicated in the result-type parameter "layoutManager"
@param _invocation
@return | [
"Returns",
"the",
"export",
"format",
"indicated",
"in",
"the",
"result",
"-",
"type",
"parameter",
"layoutManager"
] | 63919574cc401ae40574d13129f628e66d1682a3 | https://github.com/intive-FDV/DynamicJasper/blob/63919574cc401ae40574d13129f628e66d1682a3/src/main/java/ar/com/fdvs/dj/webwork/DJResult.java#L185-L213 | train |
intive-FDV/DynamicJasper | src/main/java/ar/com/fdvs/dj/domain/builders/ColumnBuilder.java | ColumnBuilder.buildSimpleBarcodeColumn | protected AbstractColumn buildSimpleBarcodeColumn() {
BarCodeColumn column = new BarCodeColumn();
populateCommonAttributes(column);
column.setColumnProperty(columnProperty);
column.setExpressionToGroupBy(customExpressionToGroupBy);
column.setScaleMode(imageScaleMode);
column.setApplicationIdentifier(applica... | java | protected AbstractColumn buildSimpleBarcodeColumn() {
BarCodeColumn column = new BarCodeColumn();
populateCommonAttributes(column);
column.setColumnProperty(columnProperty);
column.setExpressionToGroupBy(customExpressionToGroupBy);
column.setScaleMode(imageScaleMode);
column.setApplicationIdentifier(applica... | [
"protected",
"AbstractColumn",
"buildSimpleBarcodeColumn",
"(",
")",
"{",
"BarCodeColumn",
"column",
"=",
"new",
"BarCodeColumn",
"(",
")",
";",
"populateCommonAttributes",
"(",
"column",
")",
";",
"column",
".",
"setColumnProperty",
"(",
"columnProperty",
")",
";",... | When creating barcode columns
@return | [
"When",
"creating",
"barcode",
"columns"
] | 63919574cc401ae40574d13129f628e66d1682a3 | https://github.com/intive-FDV/DynamicJasper/blob/63919574cc401ae40574d13129f628e66d1682a3/src/main/java/ar/com/fdvs/dj/domain/builders/ColumnBuilder.java#L161-L172 | train |
intive-FDV/DynamicJasper | src/main/java/ar/com/fdvs/dj/domain/builders/ColumnBuilder.java | ColumnBuilder.buildSimpleImageColumn | protected AbstractColumn buildSimpleImageColumn() {
ImageColumn column = new ImageColumn();
populateCommonAttributes(column);
populateExpressionAttributes(column);
column.setExpression(customExpression);
column.setExpressionToGroupBy(customExpressionToGroupBy);
column.setExpressionForCalculation(customEx... | java | protected AbstractColumn buildSimpleImageColumn() {
ImageColumn column = new ImageColumn();
populateCommonAttributes(column);
populateExpressionAttributes(column);
column.setExpression(customExpression);
column.setExpressionToGroupBy(customExpressionToGroupBy);
column.setExpressionForCalculation(customEx... | [
"protected",
"AbstractColumn",
"buildSimpleImageColumn",
"(",
")",
"{",
"ImageColumn",
"column",
"=",
"new",
"ImageColumn",
"(",
")",
";",
"populateCommonAttributes",
"(",
"column",
")",
";",
"populateExpressionAttributes",
"(",
"column",
")",
";",
"column",
".",
... | When creating image columns
@return | [
"When",
"creating",
"image",
"columns"
] | 63919574cc401ae40574d13129f628e66d1682a3 | https://github.com/intive-FDV/DynamicJasper/blob/63919574cc401ae40574d13129f628e66d1682a3/src/main/java/ar/com/fdvs/dj/domain/builders/ColumnBuilder.java#L178-L189 | train |
intive-FDV/DynamicJasper | src/main/java/ar/com/fdvs/dj/domain/builders/ColumnBuilder.java | ColumnBuilder.buildExpressionColumn | protected AbstractColumn buildExpressionColumn() {
ExpressionColumn column = new ExpressionColumn();
populateCommonAttributes(column);
populateExpressionAttributes(column);
column.setExpression(customExpression);
column.setExpressionToGroupBy(customExpressionToGroupBy);
column.setExpressionForCalculat... | java | protected AbstractColumn buildExpressionColumn() {
ExpressionColumn column = new ExpressionColumn();
populateCommonAttributes(column);
populateExpressionAttributes(column);
column.setExpression(customExpression);
column.setExpressionToGroupBy(customExpressionToGroupBy);
column.setExpressionForCalculat... | [
"protected",
"AbstractColumn",
"buildExpressionColumn",
"(",
")",
"{",
"ExpressionColumn",
"column",
"=",
"new",
"ExpressionColumn",
"(",
")",
";",
"populateCommonAttributes",
"(",
"column",
")",
";",
"populateExpressionAttributes",
"(",
"column",
")",
";",
"column",
... | For creating expression columns
@return | [
"For",
"creating",
"expression",
"columns"
] | 63919574cc401ae40574d13129f628e66d1682a3 | https://github.com/intive-FDV/DynamicJasper/blob/63919574cc401ae40574d13129f628e66d1682a3/src/main/java/ar/com/fdvs/dj/domain/builders/ColumnBuilder.java#L195-L206 | train |
intive-FDV/DynamicJasper | src/main/java/ar/com/fdvs/dj/domain/builders/ColumnBuilder.java | ColumnBuilder.buildSimpleColumn | protected AbstractColumn buildSimpleColumn() {
SimpleColumn column = new SimpleColumn();
populateCommonAttributes(column);
columnProperty.getFieldProperties().putAll(fieldProperties);
column.setColumnProperty(columnProperty);
column.setExpressionToGroupBy(customExpressionToGroupBy);
column.setFieldDescripti... | java | protected AbstractColumn buildSimpleColumn() {
SimpleColumn column = new SimpleColumn();
populateCommonAttributes(column);
columnProperty.getFieldProperties().putAll(fieldProperties);
column.setColumnProperty(columnProperty);
column.setExpressionToGroupBy(customExpressionToGroupBy);
column.setFieldDescripti... | [
"protected",
"AbstractColumn",
"buildSimpleColumn",
"(",
")",
"{",
"SimpleColumn",
"column",
"=",
"new",
"SimpleColumn",
"(",
")",
";",
"populateCommonAttributes",
"(",
"column",
")",
";",
"columnProperty",
".",
"getFieldProperties",
"(",
")",
".",
"putAll",
"(",
... | For creating regular columns
@return | [
"For",
"creating",
"regular",
"columns"
] | 63919574cc401ae40574d13129f628e66d1682a3 | https://github.com/intive-FDV/DynamicJasper/blob/63919574cc401ae40574d13129f628e66d1682a3/src/main/java/ar/com/fdvs/dj/domain/builders/ColumnBuilder.java#L234-L242 | train |
intive-FDV/DynamicJasper | src/main/java/ar/com/fdvs/dj/domain/builders/ColumnBuilder.java | ColumnBuilder.addFieldProperty | public ColumnBuilder addFieldProperty(String propertyName, String value) {
fieldProperties.put(propertyName, value);
return this;
} | java | public ColumnBuilder addFieldProperty(String propertyName, String value) {
fieldProperties.put(propertyName, value);
return this;
} | [
"public",
"ColumnBuilder",
"addFieldProperty",
"(",
"String",
"propertyName",
",",
"String",
"value",
")",
"{",
"fieldProperties",
".",
"put",
"(",
"propertyName",
",",
"value",
")",
";",
"return",
"this",
";",
"}"
] | When the JRField needs properties, use this method.
@param propertyName
@param value
@return | [
"When",
"the",
"JRField",
"needs",
"properties",
"use",
"this",
"method",
"."
] | 63919574cc401ae40574d13129f628e66d1682a3 | https://github.com/intive-FDV/DynamicJasper/blob/63919574cc401ae40574d13129f628e66d1682a3/src/main/java/ar/com/fdvs/dj/domain/builders/ColumnBuilder.java#L342-L345 | train |
intive-FDV/DynamicJasper | src/main/java/ar/com/fdvs/dj/util/Utils.java | Utils.copyProperties | public static void copyProperties(Object dest, Object orig){
try {
if (orig != null && dest != null){
BeanUtils.copyProperties(dest, orig);
PropertyUtils putils = new PropertyUtils();
PropertyDescriptor origDescriptors[] = putils.getPropertyDescriptors(orig);
for (PropertyDescriptor orig... | java | public static void copyProperties(Object dest, Object orig){
try {
if (orig != null && dest != null){
BeanUtils.copyProperties(dest, orig);
PropertyUtils putils = new PropertyUtils();
PropertyDescriptor origDescriptors[] = putils.getPropertyDescriptors(orig);
for (PropertyDescriptor orig... | [
"public",
"static",
"void",
"copyProperties",
"(",
"Object",
"dest",
",",
"Object",
"orig",
")",
"{",
"try",
"{",
"if",
"(",
"orig",
"!=",
"null",
"&&",
"dest",
"!=",
"null",
")",
"{",
"BeanUtils",
".",
"copyProperties",
"(",
"dest",
",",
"orig",
")",
... | This takes into account objects that breaks the JavaBean convention
and have as getter for Boolean objects an "isXXX" method.
@param dest
@param orig | [
"This",
"takes",
"into",
"account",
"objects",
"that",
"breaks",
"the",
"JavaBean",
"convention",
"and",
"have",
"as",
"getter",
"for",
"Boolean",
"objects",
"an",
"isXXX",
"method",
"."
] | 63919574cc401ae40574d13129f628e66d1682a3 | https://github.com/intive-FDV/DynamicJasper/blob/63919574cc401ae40574d13129f628e66d1682a3/src/main/java/ar/com/fdvs/dj/util/Utils.java#L45-L77 | train |
TNG/JGiven | jgiven-core/src/main/java/com/tngtech/jgiven/report/config/ConfigOptionParser.java | ConfigOptionParser.printSuggestion | private void printSuggestion( String arg, List<ConfigOption> co ) {
List<ConfigOption> sortedList = new ArrayList<ConfigOption>( co );
Collections.sort( sortedList, new ConfigOptionLevenshteinDistance( arg ) );
System.err.println( "Parse error for argument \"" + arg + "\", did you mean " + sorte... | java | private void printSuggestion( String arg, List<ConfigOption> co ) {
List<ConfigOption> sortedList = new ArrayList<ConfigOption>( co );
Collections.sort( sortedList, new ConfigOptionLevenshteinDistance( arg ) );
System.err.println( "Parse error for argument \"" + arg + "\", did you mean " + sorte... | [
"private",
"void",
"printSuggestion",
"(",
"String",
"arg",
",",
"List",
"<",
"ConfigOption",
">",
"co",
")",
"{",
"List",
"<",
"ConfigOption",
">",
"sortedList",
"=",
"new",
"ArrayList",
"<",
"ConfigOption",
">",
"(",
"co",
")",
";",
"Collections",
".",
... | Prints a suggestion to stderr for the argument based on the levenshtein distance metric
@param arg the argument which could not be assigned to a flag
@param co the {@link ConfigOption} List where every flag is stored | [
"Prints",
"a",
"suggestion",
"to",
"stderr",
"for",
"the",
"argument",
"based",
"on",
"the",
"levenshtein",
"distance",
"metric"
] | 1a69248fc6d7eb380cdc4542e3be273842889748 | https://github.com/TNG/JGiven/blob/1a69248fc6d7eb380cdc4542e3be273842889748/jgiven-core/src/main/java/com/tngtech/jgiven/report/config/ConfigOptionParser.java#L149-L155 | train |
TNG/JGiven | jgiven-core/src/main/java/com/tngtech/jgiven/report/config/ConfigOptionParser.java | ConfigOptionParser.getFormat | public static ReportGenerator.Format getFormat( String... args ) {
ConfigOptionParser configParser = new ConfigOptionParser();
List<ConfigOption> configOptions = Arrays.asList( format, help );
for( ConfigOption co : configOptions ) {
if( co.hasDefault() ) {
configPar... | java | public static ReportGenerator.Format getFormat( String... args ) {
ConfigOptionParser configParser = new ConfigOptionParser();
List<ConfigOption> configOptions = Arrays.asList( format, help );
for( ConfigOption co : configOptions ) {
if( co.hasDefault() ) {
configPar... | [
"public",
"static",
"ReportGenerator",
".",
"Format",
"getFormat",
"(",
"String",
"...",
"args",
")",
"{",
"ConfigOptionParser",
"configParser",
"=",
"new",
"ConfigOptionParser",
"(",
")",
";",
"List",
"<",
"ConfigOption",
">",
"configOptions",
"=",
"Arrays",
".... | Terminates with a help message if the parse is not successful
@param args command line arguments to
@return the format in a correct state | [
"Terminates",
"with",
"a",
"help",
"message",
"if",
"the",
"parse",
"is",
"not",
"successful"
] | 1a69248fc6d7eb380cdc4542e3be273842889748 | https://github.com/TNG/JGiven/blob/1a69248fc6d7eb380cdc4542e3be273842889748/jgiven-core/src/main/java/com/tngtech/jgiven/report/config/ConfigOptionParser.java#L227-L248 | train |
TNG/JGiven | jgiven-core/src/main/java/com/tngtech/jgiven/report/text/PlainTextTableWriter.java | PlainTextTableWriter.handleNewLines | static List<List<String>> handleNewLines( List<List<String>> tableModel ) {
List<List<String>> result = Lists.newArrayListWithExpectedSize( tableModel.size() );
for( List<String> row : tableModel ) {
if( hasNewline( row ) ) {
result.addAll( splitRow( row ) );
} e... | java | static List<List<String>> handleNewLines( List<List<String>> tableModel ) {
List<List<String>> result = Lists.newArrayListWithExpectedSize( tableModel.size() );
for( List<String> row : tableModel ) {
if( hasNewline( row ) ) {
result.addAll( splitRow( row ) );
} e... | [
"static",
"List",
"<",
"List",
"<",
"String",
">",
">",
"handleNewLines",
"(",
"List",
"<",
"List",
"<",
"String",
">",
">",
"tableModel",
")",
"{",
"List",
"<",
"List",
"<",
"String",
">>",
"result",
"=",
"Lists",
".",
"newArrayListWithExpectedSize",
"(... | Handles newlines by removing them and add new rows instead | [
"Handles",
"newlines",
"by",
"removing",
"them",
"and",
"add",
"new",
"rows",
"instead"
] | 1a69248fc6d7eb380cdc4542e3be273842889748 | https://github.com/TNG/JGiven/blob/1a69248fc6d7eb380cdc4542e3be273842889748/jgiven-core/src/main/java/com/tngtech/jgiven/report/text/PlainTextTableWriter.java#L64-L76 | train |
TNG/JGiven | jgiven-core/src/main/java/com/tngtech/jgiven/report/ReportGenerator.java | ReportGenerator.generateHtml5Report | public static AbstractReportGenerator generateHtml5Report() {
AbstractReportGenerator report;
try {
Class<?> aClass = new ReportGenerator().getClass().getClassLoader()
.loadClass( "com.tngtech.jgiven.report.html5.Html5ReportGenerator" );
report = (AbstractRepo... | java | public static AbstractReportGenerator generateHtml5Report() {
AbstractReportGenerator report;
try {
Class<?> aClass = new ReportGenerator().getClass().getClassLoader()
.loadClass( "com.tngtech.jgiven.report.html5.Html5ReportGenerator" );
report = (AbstractRepo... | [
"public",
"static",
"AbstractReportGenerator",
"generateHtml5Report",
"(",
")",
"{",
"AbstractReportGenerator",
"report",
";",
"try",
"{",
"Class",
"<",
"?",
">",
"aClass",
"=",
"new",
"ReportGenerator",
"(",
")",
".",
"getClass",
"(",
")",
".",
"getClassLoader"... | Searches the Html5ReportGenerator in Java path and instantiates the report | [
"Searches",
"the",
"Html5ReportGenerator",
"in",
"Java",
"path",
"and",
"instantiates",
"the",
"report"
] | 1a69248fc6d7eb380cdc4542e3be273842889748 | https://github.com/TNG/JGiven/blob/1a69248fc6d7eb380cdc4542e3be273842889748/jgiven-core/src/main/java/com/tngtech/jgiven/report/ReportGenerator.java#L67-L80 | train |
TNG/JGiven | jgiven-core/src/main/java/com/tngtech/jgiven/report/model/StepFormatter.java | StepFormatter.flushCurrentWord | private static void flushCurrentWord( StringBuilder currentWords, List<Word> formattedWords, boolean cutWhitespace ) {
if( currentWords.length() > 0 ) {
if( cutWhitespace && currentWords.charAt( currentWords.length() - 1 ) == ' ' ) {
currentWords.setLength( currentWords.length() - 1 ... | java | private static void flushCurrentWord( StringBuilder currentWords, List<Word> formattedWords, boolean cutWhitespace ) {
if( currentWords.length() > 0 ) {
if( cutWhitespace && currentWords.charAt( currentWords.length() - 1 ) == ' ' ) {
currentWords.setLength( currentWords.length() - 1 ... | [
"private",
"static",
"void",
"flushCurrentWord",
"(",
"StringBuilder",
"currentWords",
",",
"List",
"<",
"Word",
">",
"formattedWords",
",",
"boolean",
"cutWhitespace",
")",
"{",
"if",
"(",
"currentWords",
".",
"length",
"(",
")",
">",
"0",
")",
"{",
"if",
... | Appends the accumulated words to the resulting words. Trailing whitespace is removed because of the
postprocessing that inserts custom whitespace
@param currentWords is the {@link StringBuilder} of the accumulated words
@param formattedWords is the list that is being appended to | [
"Appends",
"the",
"accumulated",
"words",
"to",
"the",
"resulting",
"words",
".",
"Trailing",
"whitespace",
"is",
"removed",
"because",
"of",
"the",
"postprocessing",
"that",
"inserts",
"custom",
"whitespace"
] | 1a69248fc6d7eb380cdc4542e3be273842889748 | https://github.com/TNG/JGiven/blob/1a69248fc6d7eb380cdc4542e3be273842889748/jgiven-core/src/main/java/com/tngtech/jgiven/report/model/StepFormatter.java#L302-L310 | train |
TNG/JGiven | jgiven-core/src/main/java/com/tngtech/jgiven/report/model/StepFormatter.java | StepFormatter.nextIndex | private static int nextIndex( String description, int defaultIndex ) {
Pattern startsWithNumber = Pattern.compile( "(\\d+).*" );
Matcher matcher = startsWithNumber.matcher( description );
if( matcher.matches() ) {
return Integer.parseInt( matcher.group( 1 ) ) - 1;
}
... | java | private static int nextIndex( String description, int defaultIndex ) {
Pattern startsWithNumber = Pattern.compile( "(\\d+).*" );
Matcher matcher = startsWithNumber.matcher( description );
if( matcher.matches() ) {
return Integer.parseInt( matcher.group( 1 ) ) - 1;
}
... | [
"private",
"static",
"int",
"nextIndex",
"(",
"String",
"description",
",",
"int",
"defaultIndex",
")",
"{",
"Pattern",
"startsWithNumber",
"=",
"Pattern",
".",
"compile",
"(",
"\"(\\\\d+).*\"",
")",
";",
"Matcher",
"matcher",
"=",
"startsWithNumber",
".",
"matc... | Returns the next index of the argument by decrementing 1 from the possibly parsed number
@param description this String will be searched from the start for a number
@param defaultIndex this will be returned if the match does not succeed
@return the parsed index or the defaultIndex | [
"Returns",
"the",
"next",
"index",
"of",
"the",
"argument",
"by",
"decrementing",
"1",
"from",
"the",
"possibly",
"parsed",
"number"
] | 1a69248fc6d7eb380cdc4542e3be273842889748 | https://github.com/TNG/JGiven/blob/1a69248fc6d7eb380cdc4542e3be273842889748/jgiven-core/src/main/java/com/tngtech/jgiven/report/model/StepFormatter.java#L319-L328 | train |
TNG/JGiven | jgiven-core/src/main/java/com/tngtech/jgiven/impl/util/WordUtil.java | WordUtil.capitalize | public static String capitalize( String text ) {
if( text == null || text.isEmpty() ) {
return text;
}
return text.substring( 0, 1 ).toUpperCase().concat( text.substring( 1, text.length() ) );
} | java | public static String capitalize( String text ) {
if( text == null || text.isEmpty() ) {
return text;
}
return text.substring( 0, 1 ).toUpperCase().concat( text.substring( 1, text.length() ) );
} | [
"public",
"static",
"String",
"capitalize",
"(",
"String",
"text",
")",
"{",
"if",
"(",
"text",
"==",
"null",
"||",
"text",
".",
"isEmpty",
"(",
")",
")",
"{",
"return",
"text",
";",
"}",
"return",
"text",
".",
"substring",
"(",
"0",
",",
"1",
")",... | Returns the given text with the first letter in upper case.
<h2>Examples:</h2>
<pre>
capitalize("hi") == "Hi"
capitalize("Hi") == "Hi"
capitalize("hi there") == "hi there"
capitalize("") == ""
capitalize(null) == null
</pre>
@param text the text to capitalize
@return text with the first letter in upper case | [
"Returns",
"the",
"given",
"text",
"with",
"the",
"first",
"letter",
"in",
"upper",
"case",
"."
] | 1a69248fc6d7eb380cdc4542e3be273842889748 | https://github.com/TNG/JGiven/blob/1a69248fc6d7eb380cdc4542e3be273842889748/jgiven-core/src/main/java/com/tngtech/jgiven/impl/util/WordUtil.java#L24-L29 | train |
TNG/JGiven | jgiven-html5-report/src/main/java/com/tngtech/jgiven/report/html5/Html5ReportGenerator.java | Html5ReportGenerator.deleteUnusedCaseSteps | private void deleteUnusedCaseSteps( ReportModel model ) {
for( ScenarioModel scenarioModel : model.getScenarios() ) {
if( scenarioModel.isCasesAsTable() && !hasAttachment( scenarioModel ) ) {
List<ScenarioCaseModel> cases = scenarioModel.getScenarioCases();
for( int ... | java | private void deleteUnusedCaseSteps( ReportModel model ) {
for( ScenarioModel scenarioModel : model.getScenarios() ) {
if( scenarioModel.isCasesAsTable() && !hasAttachment( scenarioModel ) ) {
List<ScenarioCaseModel> cases = scenarioModel.getScenarioCases();
for( int ... | [
"private",
"void",
"deleteUnusedCaseSteps",
"(",
"ReportModel",
"model",
")",
"{",
"for",
"(",
"ScenarioModel",
"scenarioModel",
":",
"model",
".",
"getScenarios",
"(",
")",
")",
"{",
"if",
"(",
"scenarioModel",
".",
"isCasesAsTable",
"(",
")",
"&&",
"!",
"h... | Deletes all steps of scenario cases where a data table
is generated to reduce the size of the data file.
In this case only the steps of the first scenario case are actually needed. | [
"Deletes",
"all",
"steps",
"of",
"scenario",
"cases",
"where",
"a",
"data",
"table",
"is",
"generated",
"to",
"reduce",
"the",
"size",
"of",
"the",
"data",
"file",
".",
"In",
"this",
"case",
"only",
"the",
"steps",
"of",
"the",
"first",
"scenario",
"case... | 1a69248fc6d7eb380cdc4542e3be273842889748 | https://github.com/TNG/JGiven/blob/1a69248fc6d7eb380cdc4542e3be273842889748/jgiven-html5-report/src/main/java/com/tngtech/jgiven/report/html5/Html5ReportGenerator.java#L124-L135 | train |
TNG/JGiven | jgiven-core/src/main/java/com/tngtech/jgiven/report/analysis/CaseArgumentAnalyser.java | CaseArgumentAnalyser.attachmentsAreStructurallyDifferent | boolean attachmentsAreStructurallyDifferent( List<AttachmentModel> firstAttachments, List<AttachmentModel> otherAttachments ) {
if( firstAttachments.size() != otherAttachments.size() ) {
return true;
}
for( int i = 0; i < firstAttachments.size(); i++ ) {
if( attachmentIs... | java | boolean attachmentsAreStructurallyDifferent( List<AttachmentModel> firstAttachments, List<AttachmentModel> otherAttachments ) {
if( firstAttachments.size() != otherAttachments.size() ) {
return true;
}
for( int i = 0; i < firstAttachments.size(); i++ ) {
if( attachmentIs... | [
"boolean",
"attachmentsAreStructurallyDifferent",
"(",
"List",
"<",
"AttachmentModel",
">",
"firstAttachments",
",",
"List",
"<",
"AttachmentModel",
">",
"otherAttachments",
")",
"{",
"if",
"(",
"firstAttachments",
".",
"size",
"(",
")",
"!=",
"otherAttachments",
".... | Attachments are only structurally different if one step has an inline attachment
and the other step either has no inline attachment or the inline attachment is
different. | [
"Attachments",
"are",
"only",
"structurally",
"different",
"if",
"one",
"step",
"has",
"an",
"inline",
"attachment",
"and",
"the",
"other",
"step",
"either",
"has",
"no",
"inline",
"attachment",
"or",
"the",
"inline",
"attachment",
"is",
"different",
"."
] | 1a69248fc6d7eb380cdc4542e3be273842889748 | https://github.com/TNG/JGiven/blob/1a69248fc6d7eb380cdc4542e3be273842889748/jgiven-core/src/main/java/com/tngtech/jgiven/report/analysis/CaseArgumentAnalyser.java#L281-L292 | train |
TNG/JGiven | jgiven-core/src/main/java/com/tngtech/jgiven/report/analysis/CaseArgumentAnalyser.java | CaseArgumentAnalyser.getDifferentArguments | List<List<Word>> getDifferentArguments( List<List<Word>> argumentWords ) {
List<List<Word>> result = Lists.newArrayList();
for( int i = 0; i < argumentWords.size(); i++ ) {
result.add( Lists.<Word>newArrayList() );
}
int nWords = argumentWords.get( 0 ).size();
for( ... | java | List<List<Word>> getDifferentArguments( List<List<Word>> argumentWords ) {
List<List<Word>> result = Lists.newArrayList();
for( int i = 0; i < argumentWords.size(); i++ ) {
result.add( Lists.<Word>newArrayList() );
}
int nWords = argumentWords.get( 0 ).size();
for( ... | [
"List",
"<",
"List",
"<",
"Word",
">",
">",
"getDifferentArguments",
"(",
"List",
"<",
"List",
"<",
"Word",
">",
">",
"argumentWords",
")",
"{",
"List",
"<",
"List",
"<",
"Word",
">>",
"result",
"=",
"Lists",
".",
"newArrayList",
"(",
")",
";",
"for"... | Returns a list with argument words that are not equal in all cases | [
"Returns",
"a",
"list",
"with",
"argument",
"words",
"that",
"are",
"not",
"equal",
"in",
"all",
"cases"
] | 1a69248fc6d7eb380cdc4542e3be273842889748 | https://github.com/TNG/JGiven/blob/1a69248fc6d7eb380cdc4542e3be273842889748/jgiven-core/src/main/java/com/tngtech/jgiven/report/analysis/CaseArgumentAnalyser.java#L355-L389 | train |
TNG/JGiven | jgiven-core/src/main/java/com/tngtech/jgiven/config/AbstractJGivenConfiguration.java | AbstractJGivenConfiguration.configureTag | public final TagConfiguration.Builder configureTag( Class<? extends Annotation> tagAnnotation ) {
TagConfiguration configuration = new TagConfiguration( tagAnnotation );
tagConfigurations.put( tagAnnotation, configuration );
return new TagConfiguration.Builder( configuration );
} | java | public final TagConfiguration.Builder configureTag( Class<? extends Annotation> tagAnnotation ) {
TagConfiguration configuration = new TagConfiguration( tagAnnotation );
tagConfigurations.put( tagAnnotation, configuration );
return new TagConfiguration.Builder( configuration );
} | [
"public",
"final",
"TagConfiguration",
".",
"Builder",
"configureTag",
"(",
"Class",
"<",
"?",
"extends",
"Annotation",
">",
"tagAnnotation",
")",
"{",
"TagConfiguration",
"configuration",
"=",
"new",
"TagConfiguration",
"(",
"tagAnnotation",
")",
";",
"tagConfigura... | Configures the given annotation as a tag.
This is useful if you want to treat annotations as tags in JGiven that you cannot or want not
to be annotated with the {@link com.tngtech.jgiven.annotation.IsTag} annotation.
@param tagAnnotation the tag to be configured
@return a configuration builder for configuring the tag | [
"Configures",
"the",
"given",
"annotation",
"as",
"a",
"tag",
"."
] | 1a69248fc6d7eb380cdc4542e3be273842889748 | https://github.com/TNG/JGiven/blob/1a69248fc6d7eb380cdc4542e3be273842889748/jgiven-core/src/main/java/com/tngtech/jgiven/config/AbstractJGivenConfiguration.java#L24-L28 | train |
TNG/JGiven | jgiven-core/src/main/java/com/tngtech/jgiven/impl/format/ParameterFormattingUtil.java | ParameterFormattingUtil.getFormatting | private StepFormatter.Formatting<?, ?> getFormatting( Annotation[] annotations, Set<Class<?>> visitedTypes,
Annotation originalAnnotation, String parameterName ) {
List<StepFormatter.Formatting<?, ?>> foundFormatting = Lists.newArrayList();
Table tableAnnotation = null;
for( Annotati... | java | private StepFormatter.Formatting<?, ?> getFormatting( Annotation[] annotations, Set<Class<?>> visitedTypes,
Annotation originalAnnotation, String parameterName ) {
List<StepFormatter.Formatting<?, ?>> foundFormatting = Lists.newArrayList();
Table tableAnnotation = null;
for( Annotati... | [
"private",
"StepFormatter",
".",
"Formatting",
"<",
"?",
",",
"?",
">",
"getFormatting",
"(",
"Annotation",
"[",
"]",
"annotations",
",",
"Set",
"<",
"Class",
"<",
"?",
">",
">",
"visitedTypes",
",",
"Annotation",
"originalAnnotation",
",",
"String",
"parame... | Recursively searches for formatting annotations.
@param visitedTypes used to prevent an endless loop
@param parameterName | [
"Recursively",
"searches",
"for",
"formatting",
"annotations",
"."
] | 1a69248fc6d7eb380cdc4542e3be273842889748 | https://github.com/TNG/JGiven/blob/1a69248fc6d7eb380cdc4542e3be273842889748/jgiven-core/src/main/java/com/tngtech/jgiven/impl/format/ParameterFormattingUtil.java#L59-L115 | train |
TNG/JGiven | jgiven-core/src/main/java/com/tngtech/jgiven/impl/Scenario.java | Scenario.create | public static <GIVEN, WHEN, THEN> Scenario<GIVEN, WHEN, THEN> create( Class<GIVEN> givenClass, Class<WHEN> whenClass,
Class<THEN> thenClass ) {
return new Scenario<GIVEN, WHEN, THEN>( givenClass, whenClass, thenClass );
} | java | public static <GIVEN, WHEN, THEN> Scenario<GIVEN, WHEN, THEN> create( Class<GIVEN> givenClass, Class<WHEN> whenClass,
Class<THEN> thenClass ) {
return new Scenario<GIVEN, WHEN, THEN>( givenClass, whenClass, thenClass );
} | [
"public",
"static",
"<",
"GIVEN",
",",
"WHEN",
",",
"THEN",
">",
"Scenario",
"<",
"GIVEN",
",",
"WHEN",
",",
"THEN",
">",
"create",
"(",
"Class",
"<",
"GIVEN",
">",
"givenClass",
",",
"Class",
"<",
"WHEN",
">",
"whenClass",
",",
"Class",
"<",
"THEN",... | Creates a scenario with 3 different steps classes.
To share state between the different steps instances use the
{@link com.tngtech.jgiven.annotation.ScenarioState} annotation
@param givenClass the Given steps class
@param whenClass the When steps class
@param thenClass the Then steps class
@return the new scenario | [
"Creates",
"a",
"scenario",
"with",
"3",
"different",
"steps",
"classes",
"."
] | 1a69248fc6d7eb380cdc4542e3be273842889748 | https://github.com/TNG/JGiven/blob/1a69248fc6d7eb380cdc4542e3be273842889748/jgiven-core/src/main/java/com/tngtech/jgiven/impl/Scenario.java#L59-L62 | train |
TNG/JGiven | jgiven-core/src/main/java/com/tngtech/jgiven/impl/Scenario.java | Scenario.startScenario | @Override
public Scenario<GIVEN, WHEN, THEN> startScenario( String description ) {
super.startScenario( description );
return this;
} | java | @Override
public Scenario<GIVEN, WHEN, THEN> startScenario( String description ) {
super.startScenario( description );
return this;
} | [
"@",
"Override",
"public",
"Scenario",
"<",
"GIVEN",
",",
"WHEN",
",",
"THEN",
">",
"startScenario",
"(",
"String",
"description",
")",
"{",
"super",
".",
"startScenario",
"(",
"description",
")",
";",
"return",
"this",
";",
"}"
] | Describes the scenario. Must be called before any step invocation.
@param description the description
@return this for a fluent interface | [
"Describes",
"the",
"scenario",
".",
"Must",
"be",
"called",
"before",
"any",
"step",
"invocation",
"."
] | 1a69248fc6d7eb380cdc4542e3be273842889748 | https://github.com/TNG/JGiven/blob/1a69248fc6d7eb380cdc4542e3be273842889748/jgiven-core/src/main/java/com/tngtech/jgiven/impl/Scenario.java#L82-L87 | train |
TNG/JGiven | jgiven-core/src/main/java/com/tngtech/jgiven/impl/ScenarioExecutor.java | ScenarioExecutor.wireSteps | public void wireSteps( CanWire canWire ) {
for( StageState steps : stages.values() ) {
canWire.wire( steps.instance );
}
} | java | public void wireSteps( CanWire canWire ) {
for( StageState steps : stages.values() ) {
canWire.wire( steps.instance );
}
} | [
"public",
"void",
"wireSteps",
"(",
"CanWire",
"canWire",
")",
"{",
"for",
"(",
"StageState",
"steps",
":",
"stages",
".",
"values",
"(",
")",
")",
"{",
"canWire",
".",
"wire",
"(",
"steps",
".",
"instance",
")",
";",
"}",
"}"
] | Used for DI frameworks to inject values into stages. | [
"Used",
"for",
"DI",
"frameworks",
"to",
"inject",
"values",
"into",
"stages",
"."
] | 1a69248fc6d7eb380cdc4542e3be273842889748 | https://github.com/TNG/JGiven/blob/1a69248fc6d7eb380cdc4542e3be273842889748/jgiven-core/src/main/java/com/tngtech/jgiven/impl/ScenarioExecutor.java#L338-L342 | train |
TNG/JGiven | jgiven-core/src/main/java/com/tngtech/jgiven/impl/ScenarioExecutor.java | ScenarioExecutor.finished | public void finished() throws Throwable {
if( state == FINISHED ) {
return;
}
State previousState = state;
state = FINISHED;
methodInterceptor.enableMethodInterception( false );
try {
if( previousState == STARTED ) {
callFinishLi... | java | public void finished() throws Throwable {
if( state == FINISHED ) {
return;
}
State previousState = state;
state = FINISHED;
methodInterceptor.enableMethodInterception( false );
try {
if( previousState == STARTED ) {
callFinishLi... | [
"public",
"void",
"finished",
"(",
")",
"throws",
"Throwable",
"{",
"if",
"(",
"state",
"==",
"FINISHED",
")",
"{",
"return",
";",
"}",
"State",
"previousState",
"=",
"state",
";",
"state",
"=",
"FINISHED",
";",
"methodInterceptor",
".",
"enableMethodInterce... | Has to be called when the scenario is finished in order to execute after methods. | [
"Has",
"to",
"be",
"called",
"when",
"the",
"scenario",
"is",
"finished",
"in",
"order",
"to",
"execute",
"after",
"methods",
"."
] | 1a69248fc6d7eb380cdc4542e3be273842889748 | https://github.com/TNG/JGiven/blob/1a69248fc6d7eb380cdc4542e3be273842889748/jgiven-core/src/main/java/com/tngtech/jgiven/impl/ScenarioExecutor.java#L347-L364 | train |
TNG/JGiven | jgiven-core/src/main/java/com/tngtech/jgiven/impl/ScenarioExecutor.java | ScenarioExecutor.startScenario | public void startScenario( Class<?> testClass, Method method, List<NamedArgument> arguments ) {
listener.scenarioStarted( testClass, method, arguments );
if( method.isAnnotationPresent( Pending.class ) ) {
Pending annotation = method.getAnnotation( Pending.class );
if( annotati... | java | public void startScenario( Class<?> testClass, Method method, List<NamedArgument> arguments ) {
listener.scenarioStarted( testClass, method, arguments );
if( method.isAnnotationPresent( Pending.class ) ) {
Pending annotation = method.getAnnotation( Pending.class );
if( annotati... | [
"public",
"void",
"startScenario",
"(",
"Class",
"<",
"?",
">",
"testClass",
",",
"Method",
"method",
",",
"List",
"<",
"NamedArgument",
">",
"arguments",
")",
"{",
"listener",
".",
"scenarioStarted",
"(",
"testClass",
",",
"method",
",",
"arguments",
")",
... | Starts the scenario with the given method and arguments.
Derives the description from the method name.
@param method the method that started the scenario
@param arguments the test arguments with their parameter names | [
"Starts",
"the",
"scenario",
"with",
"the",
"given",
"method",
"and",
"arguments",
".",
"Derives",
"the",
"description",
"from",
"the",
"method",
"name",
"."
] | 1a69248fc6d7eb380cdc4542e3be273842889748 | https://github.com/TNG/JGiven/blob/1a69248fc6d7eb380cdc4542e3be273842889748/jgiven-core/src/main/java/com/tngtech/jgiven/impl/ScenarioExecutor.java#L461-L486 | train |
TNG/JGiven | jgiven-core/src/main/java/com/tngtech/jgiven/report/config/ConfigOptionBuilder.java | ConfigOptionBuilder.setCommandLineOptionWithArgument | public ConfigOptionBuilder setCommandLineOptionWithArgument( CommandLineOption commandLineOption, StringConverter converter ) {
co.setCommandLineOption( commandLineOption );
return setStringConverter( converter );
} | java | public ConfigOptionBuilder setCommandLineOptionWithArgument( CommandLineOption commandLineOption, StringConverter converter ) {
co.setCommandLineOption( commandLineOption );
return setStringConverter( converter );
} | [
"public",
"ConfigOptionBuilder",
"setCommandLineOptionWithArgument",
"(",
"CommandLineOption",
"commandLineOption",
",",
"StringConverter",
"converter",
")",
"{",
"co",
".",
"setCommandLineOption",
"(",
"commandLineOption",
")",
";",
"return",
"setStringConverter",
"(",
"co... | if you want to parse an argument, you need a converter from String to Object
@param commandLineOption specification of the command line options
@param converter how to convert your String value to a castable Object | [
"if",
"you",
"want",
"to",
"parse",
"an",
"argument",
"you",
"need",
"a",
"converter",
"from",
"String",
"to",
"Object"
] | 1a69248fc6d7eb380cdc4542e3be273842889748 | https://github.com/TNG/JGiven/blob/1a69248fc6d7eb380cdc4542e3be273842889748/jgiven-core/src/main/java/com/tngtech/jgiven/report/config/ConfigOptionBuilder.java#L30-L33 | train |
TNG/JGiven | jgiven-core/src/main/java/com/tngtech/jgiven/report/config/ConfigOptionBuilder.java | ConfigOptionBuilder.setCommandLineOptionWithoutArgument | public ConfigOptionBuilder setCommandLineOptionWithoutArgument( CommandLineOption commandLineOption, Object value ) {
co.setCommandLineOption( commandLineOption );
co.setValue( value );
return this;
} | java | public ConfigOptionBuilder setCommandLineOptionWithoutArgument( CommandLineOption commandLineOption, Object value ) {
co.setCommandLineOption( commandLineOption );
co.setValue( value );
return this;
} | [
"public",
"ConfigOptionBuilder",
"setCommandLineOptionWithoutArgument",
"(",
"CommandLineOption",
"commandLineOption",
",",
"Object",
"value",
")",
"{",
"co",
".",
"setCommandLineOption",
"(",
"commandLineOption",
")",
";",
"co",
".",
"setValue",
"(",
"value",
")",
";... | if you don't have an argument, choose the value that is going to be inserted into the map instead
@param commandLineOption specification of the command line options
@param value the value that is going to be inserted into the map instead of the argument | [
"if",
"you",
"don",
"t",
"have",
"an",
"argument",
"choose",
"the",
"value",
"that",
"is",
"going",
"to",
"be",
"inserted",
"into",
"the",
"map",
"instead"
] | 1a69248fc6d7eb380cdc4542e3be273842889748 | https://github.com/TNG/JGiven/blob/1a69248fc6d7eb380cdc4542e3be273842889748/jgiven-core/src/main/java/com/tngtech/jgiven/report/config/ConfigOptionBuilder.java#L41-L45 | train |
TNG/JGiven | jgiven-core/src/main/java/com/tngtech/jgiven/report/config/ConfigOptionBuilder.java | ConfigOptionBuilder.setDefaultWith | public ConfigOptionBuilder setDefaultWith( Object defaultValue ) {
co.setHasDefault( true );
co.setValue( defaultValue );
return setOptional();
} | java | public ConfigOptionBuilder setDefaultWith( Object defaultValue ) {
co.setHasDefault( true );
co.setValue( defaultValue );
return setOptional();
} | [
"public",
"ConfigOptionBuilder",
"setDefaultWith",
"(",
"Object",
"defaultValue",
")",
"{",
"co",
".",
"setHasDefault",
"(",
"true",
")",
";",
"co",
".",
"setValue",
"(",
"defaultValue",
")",
";",
"return",
"setOptional",
"(",
")",
";",
"}"
] | if you have a default, it's automatically optional | [
"if",
"you",
"have",
"a",
"default",
"it",
"s",
"automatically",
"optional"
] | 1a69248fc6d7eb380cdc4542e3be273842889748 | https://github.com/TNG/JGiven/blob/1a69248fc6d7eb380cdc4542e3be273842889748/jgiven-core/src/main/java/com/tngtech/jgiven/report/config/ConfigOptionBuilder.java#L77-L81 | train |
TNG/JGiven | jgiven-core/src/main/java/com/tngtech/jgiven/report/config/ConfigOptionBuilder.java | ConfigOptionBuilder.setStringConverter | public ConfigOptionBuilder setStringConverter( StringConverter converter ) {
co.setConverter( converter );
co.setHasArgument( true );
return this;
} | java | public ConfigOptionBuilder setStringConverter( StringConverter converter ) {
co.setConverter( converter );
co.setHasArgument( true );
return this;
} | [
"public",
"ConfigOptionBuilder",
"setStringConverter",
"(",
"StringConverter",
"converter",
")",
"{",
"co",
".",
"setConverter",
"(",
"converter",
")",
";",
"co",
".",
"setHasArgument",
"(",
"true",
")",
";",
"return",
"this",
";",
"}"
] | if you want to convert some string to an object, you have an argument to parse | [
"if",
"you",
"want",
"to",
"convert",
"some",
"string",
"to",
"an",
"object",
"you",
"have",
"an",
"argument",
"to",
"parse"
] | 1a69248fc6d7eb380cdc4542e3be273842889748 | https://github.com/TNG/JGiven/blob/1a69248fc6d7eb380cdc4542e3be273842889748/jgiven-core/src/main/java/com/tngtech/jgiven/report/config/ConfigOptionBuilder.java#L86-L90 | train |
TNG/JGiven | jgiven-junit5/src/main/java/com/tngtech/jgiven/junit5/ArgumentReflectionUtil.java | ArgumentReflectionUtil.getNamedArgs | static List<NamedArgument> getNamedArgs( ExtensionContext context ) {
List<NamedArgument> namedArgs = new ArrayList<>();
if( context.getTestMethod().get().getParameterCount() > 0 ) {
try {
if( context.getClass().getCanonicalName().equals( METHOD_EXTENSION_CONTEXT ) ) {
... | java | static List<NamedArgument> getNamedArgs( ExtensionContext context ) {
List<NamedArgument> namedArgs = new ArrayList<>();
if( context.getTestMethod().get().getParameterCount() > 0 ) {
try {
if( context.getClass().getCanonicalName().equals( METHOD_EXTENSION_CONTEXT ) ) {
... | [
"static",
"List",
"<",
"NamedArgument",
">",
"getNamedArgs",
"(",
"ExtensionContext",
"context",
")",
"{",
"List",
"<",
"NamedArgument",
">",
"namedArgs",
"=",
"new",
"ArrayList",
"<>",
"(",
")",
";",
"if",
"(",
"context",
".",
"getTestMethod",
"(",
")",
"... | This is a very ugly workaround to get the method arguments from the JUnit 5 context via reflection. | [
"This",
"is",
"a",
"very",
"ugly",
"workaround",
"to",
"get",
"the",
"method",
"arguments",
"from",
"the",
"JUnit",
"5",
"context",
"via",
"reflection",
"."
] | 1a69248fc6d7eb380cdc4542e3be273842889748 | https://github.com/TNG/JGiven/blob/1a69248fc6d7eb380cdc4542e3be273842889748/jgiven-junit5/src/main/java/com/tngtech/jgiven/junit5/ArgumentReflectionUtil.java#L29-L54 | train |
TNG/JGiven | jgiven-core/src/main/java/com/tngtech/jgiven/attachment/Attachment.java | Attachment.fromBinaryBytes | public static Attachment fromBinaryBytes( byte[] bytes, MediaType mediaType ) {
if( !mediaType.isBinary() ) {
throw new IllegalArgumentException( "MediaType must be binary" );
}
return new Attachment(BaseEncoding.base64().encode( bytes ), mediaType, null );
} | java | public static Attachment fromBinaryBytes( byte[] bytes, MediaType mediaType ) {
if( !mediaType.isBinary() ) {
throw new IllegalArgumentException( "MediaType must be binary" );
}
return new Attachment(BaseEncoding.base64().encode( bytes ), mediaType, null );
} | [
"public",
"static",
"Attachment",
"fromBinaryBytes",
"(",
"byte",
"[",
"]",
"bytes",
",",
"MediaType",
"mediaType",
")",
"{",
"if",
"(",
"!",
"mediaType",
".",
"isBinary",
"(",
")",
")",
"{",
"throw",
"new",
"IllegalArgumentException",
"(",
"\"MediaType must b... | Creates an attachment from a given array of bytes.
The bytes will be Base64 encoded.
@throws java.lang.IllegalArgumentException if mediaType is not binary | [
"Creates",
"an",
"attachment",
"from",
"a",
"given",
"array",
"of",
"bytes",
".",
"The",
"bytes",
"will",
"be",
"Base64",
"encoded",
"."
] | 1a69248fc6d7eb380cdc4542e3be273842889748 | https://github.com/TNG/JGiven/blob/1a69248fc6d7eb380cdc4542e3be273842889748/jgiven-core/src/main/java/com/tngtech/jgiven/attachment/Attachment.java#L163-L168 | train |
TNG/JGiven | jgiven-core/src/main/java/com/tngtech/jgiven/attachment/Attachment.java | Attachment.fromBinaryInputStream | public static Attachment fromBinaryInputStream( InputStream inputStream, MediaType mediaType ) throws IOException {
return fromBinaryBytes( ByteStreams.toByteArray( inputStream ), mediaType );
} | java | public static Attachment fromBinaryInputStream( InputStream inputStream, MediaType mediaType ) throws IOException {
return fromBinaryBytes( ByteStreams.toByteArray( inputStream ), mediaType );
} | [
"public",
"static",
"Attachment",
"fromBinaryInputStream",
"(",
"InputStream",
"inputStream",
",",
"MediaType",
"mediaType",
")",
"throws",
"IOException",
"{",
"return",
"fromBinaryBytes",
"(",
"ByteStreams",
".",
"toByteArray",
"(",
"inputStream",
")",
",",
"mediaTyp... | Creates an attachment from a binary input stream.
The content of the stream will be transformed into a Base64 encoded string
@throws IOException if an I/O error occurs
@throws java.lang.IllegalArgumentException if mediaType is not binary | [
"Creates",
"an",
"attachment",
"from",
"a",
"binary",
"input",
"stream",
".",
"The",
"content",
"of",
"the",
"stream",
"will",
"be",
"transformed",
"into",
"a",
"Base64",
"encoded",
"string"
] | 1a69248fc6d7eb380cdc4542e3be273842889748 | https://github.com/TNG/JGiven/blob/1a69248fc6d7eb380cdc4542e3be273842889748/jgiven-core/src/main/java/com/tngtech/jgiven/attachment/Attachment.java#L176-L178 | train |
TNG/JGiven | jgiven-core/src/main/java/com/tngtech/jgiven/attachment/MediaType.java | MediaType.binary | public static MediaType binary( MediaType.Type type, String subType ) {
return new MediaType( type, subType, true );
} | java | public static MediaType binary( MediaType.Type type, String subType ) {
return new MediaType( type, subType, true );
} | [
"public",
"static",
"MediaType",
"binary",
"(",
"MediaType",
".",
"Type",
"type",
",",
"String",
"subType",
")",
"{",
"return",
"new",
"MediaType",
"(",
"type",
",",
"subType",
",",
"true",
")",
";",
"}"
] | Creates a binary media type with the given type and subtype
@throws com.tngtech.jgiven.exception.JGivenWrongUsageException if any of the given arguments is {@code null} | [
"Creates",
"a",
"binary",
"media",
"type",
"with",
"the",
"given",
"type",
"and",
"subtype"
] | 1a69248fc6d7eb380cdc4542e3be273842889748 | https://github.com/TNG/JGiven/blob/1a69248fc6d7eb380cdc4542e3be273842889748/jgiven-core/src/main/java/com/tngtech/jgiven/attachment/MediaType.java#L177-L179 | train |
TNG/JGiven | jgiven-core/src/main/java/com/tngtech/jgiven/attachment/MediaType.java | MediaType.nonBinary | public static MediaType nonBinary( MediaType.Type type, String subType, Charset charSet ) {
ApiUtil.notNull( charSet, "charset must not be null" );
return new MediaType( type, subType, charSet );
} | java | public static MediaType nonBinary( MediaType.Type type, String subType, Charset charSet ) {
ApiUtil.notNull( charSet, "charset must not be null" );
return new MediaType( type, subType, charSet );
} | [
"public",
"static",
"MediaType",
"nonBinary",
"(",
"MediaType",
".",
"Type",
"type",
",",
"String",
"subType",
",",
"Charset",
"charSet",
")",
"{",
"ApiUtil",
".",
"notNull",
"(",
"charSet",
",",
"\"charset must not be null\"",
")",
";",
"return",
"new",
"Medi... | Creates a non-binary media type with the given type, subtype, and charSet
@throws com.tngtech.jgiven.exception.JGivenWrongUsageException if any of the given arguments is {@code null} | [
"Creates",
"a",
"non",
"-",
"binary",
"media",
"type",
"with",
"the",
"given",
"type",
"subtype",
"and",
"charSet"
] | 1a69248fc6d7eb380cdc4542e3be273842889748 | https://github.com/TNG/JGiven/blob/1a69248fc6d7eb380cdc4542e3be273842889748/jgiven-core/src/main/java/com/tngtech/jgiven/attachment/MediaType.java#L185-L188 | train |
TNG/JGiven | jgiven-core/src/main/java/com/tngtech/jgiven/attachment/MediaType.java | MediaType.nonBinaryUtf8 | public static MediaType nonBinaryUtf8( MediaType.Type type, String subType ) {
return new MediaType( type, subType, UTF_8 );
} | java | public static MediaType nonBinaryUtf8( MediaType.Type type, String subType ) {
return new MediaType( type, subType, UTF_8 );
} | [
"public",
"static",
"MediaType",
"nonBinaryUtf8",
"(",
"MediaType",
".",
"Type",
"type",
",",
"String",
"subType",
")",
"{",
"return",
"new",
"MediaType",
"(",
"type",
",",
"subType",
",",
"UTF_8",
")",
";",
"}"
] | Creates a non-binary media type with the given type, subtype, and UTF-8 encoding
@throws com.tngtech.jgiven.exception.JGivenWrongUsageException if any of the given arguments is {@code null} | [
"Creates",
"a",
"non",
"-",
"binary",
"media",
"type",
"with",
"the",
"given",
"type",
"subtype",
"and",
"UTF",
"-",
"8",
"encoding"
] | 1a69248fc6d7eb380cdc4542e3be273842889748 | https://github.com/TNG/JGiven/blob/1a69248fc6d7eb380cdc4542e3be273842889748/jgiven-core/src/main/java/com/tngtech/jgiven/attachment/MediaType.java#L194-L196 | train |
TNG/JGiven | jgiven-core/src/main/java/com/tngtech/jgiven/attachment/MediaType.java | MediaType.text | public static MediaType text( String subType, Charset charset ) {
return nonBinary( TEXT, subType, charset );
} | java | public static MediaType text( String subType, Charset charset ) {
return nonBinary( TEXT, subType, charset );
} | [
"public",
"static",
"MediaType",
"text",
"(",
"String",
"subType",
",",
"Charset",
"charset",
")",
"{",
"return",
"nonBinary",
"(",
"TEXT",
",",
"subType",
",",
"charset",
")",
";",
"}"
] | Creates a non-binary text media type with the given subtype and a specified encoding | [
"Creates",
"a",
"non",
"-",
"binary",
"text",
"media",
"type",
"with",
"the",
"given",
"subtype",
"and",
"a",
"specified",
"encoding"
] | 1a69248fc6d7eb380cdc4542e3be273842889748 | https://github.com/TNG/JGiven/blob/1a69248fc6d7eb380cdc4542e3be273842889748/jgiven-core/src/main/java/com/tngtech/jgiven/attachment/MediaType.java#L252-L254 | train |
mojohaus/build-helper-maven-plugin | src/main/java/org/codehaus/mojo/buildhelper/ParseVersionMojo.java | ParseVersionMojo.parseVersion | public void parseVersion( String version )
{
DefaultVersioning artifactVersion = new DefaultVersioning( version );
getLog().debug( "Parsed Version" );
getLog().debug( " major: " + artifactVersion.getMajor() );
getLog().debug( " minor: " + artifactVersion.getMinor() )... | java | public void parseVersion( String version )
{
DefaultVersioning artifactVersion = new DefaultVersioning( version );
getLog().debug( "Parsed Version" );
getLog().debug( " major: " + artifactVersion.getMajor() );
getLog().debug( " minor: " + artifactVersion.getMinor() )... | [
"public",
"void",
"parseVersion",
"(",
"String",
"version",
")",
"{",
"DefaultVersioning",
"artifactVersion",
"=",
"new",
"DefaultVersioning",
"(",
"version",
")",
";",
"getLog",
"(",
")",
".",
"debug",
"(",
"\"Parsed Version\"",
")",
";",
"getLog",
"(",
")",
... | Parse a version String and add the components to a properties object.
@param version the version to parse | [
"Parse",
"a",
"version",
"String",
"and",
"add",
"the",
"components",
"to",
"a",
"properties",
"object",
"."
] | 9b5f82fb04c9824917f8b29d8e12d804e3c36cf0 | https://github.com/mojohaus/build-helper-maven-plugin/blob/9b5f82fb04c9824917f8b29d8e12d804e3c36cf0/src/main/java/org/codehaus/mojo/buildhelper/ParseVersionMojo.java#L188-L234 | train |
mojohaus/build-helper-maven-plugin | src/main/java/org/codehaus/mojo/buildhelper/ReserveListenerPortMojo.java | ReserveListenerPortMojo.findAvailablePortNumber | private int findAvailablePortNumber( Integer portNumberStartingPoint, List<Integer> reservedPorts )
{
assert portNumberStartingPoint != null;
int candidate = portNumberStartingPoint;
while ( reservedPorts.contains( candidate ) )
{
candidate++;
}
return can... | java | private int findAvailablePortNumber( Integer portNumberStartingPoint, List<Integer> reservedPorts )
{
assert portNumberStartingPoint != null;
int candidate = portNumberStartingPoint;
while ( reservedPorts.contains( candidate ) )
{
candidate++;
}
return can... | [
"private",
"int",
"findAvailablePortNumber",
"(",
"Integer",
"portNumberStartingPoint",
",",
"List",
"<",
"Integer",
">",
"reservedPorts",
")",
"{",
"assert",
"portNumberStartingPoint",
"!=",
"null",
";",
"int",
"candidate",
"=",
"portNumberStartingPoint",
";",
"while... | Returns the first number available, starting at portNumberStartingPoint that's not already in the reservedPorts
list.
@param portNumberStartingPoint first port number to start from.
@param reservedPorts the ports already reserved.
@return first number available not in the given list, starting at the given parameter. | [
"Returns",
"the",
"first",
"number",
"available",
"starting",
"at",
"portNumberStartingPoint",
"that",
"s",
"not",
"already",
"in",
"the",
"reservedPorts",
"list",
"."
] | 9b5f82fb04c9824917f8b29d8e12d804e3c36cf0 | https://github.com/mojohaus/build-helper-maven-plugin/blob/9b5f82fb04c9824917f8b29d8e12d804e3c36cf0/src/main/java/org/codehaus/mojo/buildhelper/ReserveListenerPortMojo.java#L366-L375 | train |
mapfish/mapfish-print | core/src/main/java/org/mapfish/print/output/Values.java | Values.populateFromAttributes | public void populateFromAttributes(
@Nonnull final Template template,
@Nonnull final Map<String, Attribute> attributes,
@Nonnull final PObject requestJsonAttributes) {
if (requestJsonAttributes.has(JSON_REQUEST_HEADERS) &&
requestJsonAttributes.getObject(JSON_... | java | public void populateFromAttributes(
@Nonnull final Template template,
@Nonnull final Map<String, Attribute> attributes,
@Nonnull final PObject requestJsonAttributes) {
if (requestJsonAttributes.has(JSON_REQUEST_HEADERS) &&
requestJsonAttributes.getObject(JSON_... | [
"public",
"void",
"populateFromAttributes",
"(",
"@",
"Nonnull",
"final",
"Template",
"template",
",",
"@",
"Nonnull",
"final",
"Map",
"<",
"String",
",",
"Attribute",
">",
"attributes",
",",
"@",
"Nonnull",
"final",
"PObject",
"requestJsonAttributes",
")",
"{",... | Process the requestJsonAttributes using the attributes and the MapfishParser and add all resulting
values to this values object.
@param template the template of the current request.
@param attributes the attributes that will be used to add values to this values object
@param requestJsonAttributes the json data for pop... | [
"Process",
"the",
"requestJsonAttributes",
"using",
"the",
"attributes",
"and",
"the",
"MapfishParser",
"and",
"add",
"all",
"resulting",
"values",
"to",
"this",
"values",
"object",
"."
] | 25a452cb39f592bd8a53b20db1037703898e1e22 | https://github.com/mapfish/mapfish-print/blob/25a452cb39f592bd8a53b20db1037703898e1e22/core/src/main/java/org/mapfish/print/output/Values.java#L191-L247 | train |
mapfish/mapfish-print | core/src/main/java/org/mapfish/print/output/Values.java | Values.addRequiredValues | public void addRequiredValues(@Nonnull final Values sourceValues) {
Object taskDirectory = sourceValues.getObject(TASK_DIRECTORY_KEY, Object.class);
MfClientHttpRequestFactoryProvider requestFactoryProvider =
sourceValues.getObject(CLIENT_HTTP_REQUEST_FACTORY_KEY,
... | java | public void addRequiredValues(@Nonnull final Values sourceValues) {
Object taskDirectory = sourceValues.getObject(TASK_DIRECTORY_KEY, Object.class);
MfClientHttpRequestFactoryProvider requestFactoryProvider =
sourceValues.getObject(CLIENT_HTTP_REQUEST_FACTORY_KEY,
... | [
"public",
"void",
"addRequiredValues",
"(",
"@",
"Nonnull",
"final",
"Values",
"sourceValues",
")",
"{",
"Object",
"taskDirectory",
"=",
"sourceValues",
".",
"getObject",
"(",
"TASK_DIRECTORY_KEY",
",",
"Object",
".",
"class",
")",
";",
"MfClientHttpRequestFactoryPr... | Add the elements that all values objects require from the provided values object.
@param sourceValues the values object containing the required elements | [
"Add",
"the",
"elements",
"that",
"all",
"values",
"objects",
"require",
"from",
"the",
"provided",
"values",
"object",
"."
] | 25a452cb39f592bd8a53b20db1037703898e1e22 | https://github.com/mapfish/mapfish-print/blob/25a452cb39f592bd8a53b20db1037703898e1e22/core/src/main/java/org/mapfish/print/output/Values.java#L254-L271 | train |
mapfish/mapfish-print | core/src/main/java/org/mapfish/print/output/Values.java | Values.put | public void put(final String key, final Object value) {
if (TASK_DIRECTORY_KEY.equals(key) && this.values.keySet().contains(TASK_DIRECTORY_KEY)) {
// ensure that no one overwrites the task directory
throw new IllegalArgumentException("Invalid key: " + key);
}
if (value =... | java | public void put(final String key, final Object value) {
if (TASK_DIRECTORY_KEY.equals(key) && this.values.keySet().contains(TASK_DIRECTORY_KEY)) {
// ensure that no one overwrites the task directory
throw new IllegalArgumentException("Invalid key: " + key);
}
if (value =... | [
"public",
"void",
"put",
"(",
"final",
"String",
"key",
",",
"final",
"Object",
"value",
")",
"{",
"if",
"(",
"TASK_DIRECTORY_KEY",
".",
"equals",
"(",
"key",
")",
"&&",
"this",
".",
"values",
".",
"keySet",
"(",
")",
".",
"contains",
"(",
"TASK_DIRECT... | Put a new value in map.
@param key id of the value for looking up.
@param value the value. | [
"Put",
"a",
"new",
"value",
"in",
"map",
"."
] | 25a452cb39f592bd8a53b20db1037703898e1e22 | https://github.com/mapfish/mapfish-print/blob/25a452cb39f592bd8a53b20db1037703898e1e22/core/src/main/java/org/mapfish/print/output/Values.java#L279-L290 | train |
mapfish/mapfish-print | core/src/main/java/org/mapfish/print/output/Values.java | Values.getObject | public <V> V getObject(final String key, final Class<V> type) {
final Object obj = this.values.get(key);
return type.cast(obj);
} | java | public <V> V getObject(final String key, final Class<V> type) {
final Object obj = this.values.get(key);
return type.cast(obj);
} | [
"public",
"<",
"V",
">",
"V",
"getObject",
"(",
"final",
"String",
"key",
",",
"final",
"Class",
"<",
"V",
">",
"type",
")",
"{",
"final",
"Object",
"obj",
"=",
"this",
".",
"values",
".",
"get",
"(",
"key",
")",
";",
"return",
"type",
".",
"cast... | Get a value as a string.
@param key the key for looking up the value.
@param type the type of the object
@param <V> the type | [
"Get",
"a",
"value",
"as",
"a",
"string",
"."
] | 25a452cb39f592bd8a53b20db1037703898e1e22 | https://github.com/mapfish/mapfish-print/blob/25a452cb39f592bd8a53b20db1037703898e1e22/core/src/main/java/org/mapfish/print/output/Values.java#L333-L336 | train |
mapfish/mapfish-print | core/src/main/java/org/mapfish/print/output/Values.java | Values.getBoolean | @Nullable
public Boolean getBoolean(@Nonnull final String key) {
return (Boolean) this.values.get(key);
} | java | @Nullable
public Boolean getBoolean(@Nonnull final String key) {
return (Boolean) this.values.get(key);
} | [
"@",
"Nullable",
"public",
"Boolean",
"getBoolean",
"(",
"@",
"Nonnull",
"final",
"String",
"key",
")",
"{",
"return",
"(",
"Boolean",
")",
"this",
".",
"values",
".",
"get",
"(",
"key",
")",
";",
"}"
] | Get a boolean value from the values or null.
@param key the look up key of the value | [
"Get",
"a",
"boolean",
"value",
"from",
"the",
"values",
"or",
"null",
"."
] | 25a452cb39f592bd8a53b20db1037703898e1e22 | https://github.com/mapfish/mapfish-print/blob/25a452cb39f592bd8a53b20db1037703898e1e22/core/src/main/java/org/mapfish/print/output/Values.java#L352-L355 | train |
mapfish/mapfish-print | core/src/main/java/org/mapfish/print/output/Values.java | Values.find | @SuppressWarnings("unchecked")
public <T> Map<String, T> find(final Class<T> valueTypeToFind) {
return (Map<String, T>) this.values.entrySet().stream()
.filter(input -> valueTypeToFind.isInstance(input.getValue()))
.collect(
Collectors.toMap(Map.Entry:... | java | @SuppressWarnings("unchecked")
public <T> Map<String, T> find(final Class<T> valueTypeToFind) {
return (Map<String, T>) this.values.entrySet().stream()
.filter(input -> valueTypeToFind.isInstance(input.getValue()))
.collect(
Collectors.toMap(Map.Entry:... | [
"@",
"SuppressWarnings",
"(",
"\"unchecked\"",
")",
"public",
"<",
"T",
">",
"Map",
"<",
"String",
",",
"T",
">",
"find",
"(",
"final",
"Class",
"<",
"T",
">",
"valueTypeToFind",
")",
"{",
"return",
"(",
"Map",
"<",
"String",
",",
"T",
">",
")",
"t... | Find all the values of the requested type.
@param valueTypeToFind the type of the value to return.
@param <T> the type of the value to find.
@return the key, value pairs found. | [
"Find",
"all",
"the",
"values",
"of",
"the",
"requested",
"type",
"."
] | 25a452cb39f592bd8a53b20db1037703898e1e22 | https://github.com/mapfish/mapfish-print/blob/25a452cb39f592bd8a53b20db1037703898e1e22/core/src/main/java/org/mapfish/print/output/Values.java#L373-L379 | train |
mapfish/mapfish-print | core/src/main/java/org/mapfish/print/http/MfClientHttpRequestFactoryImpl.java | MfClientHttpRequestFactoryImpl.createRequest | @Override
public ConfigurableRequest createRequest(
@Nonnull final URI uri,
@Nonnull final HttpMethod httpMethod) throws IOException {
HttpRequestBase httpRequest = (HttpRequestBase) createHttpUriRequest(httpMethod, uri);
return new Request(getHttpClient(), httpRequest, creat... | java | @Override
public ConfigurableRequest createRequest(
@Nonnull final URI uri,
@Nonnull final HttpMethod httpMethod) throws IOException {
HttpRequestBase httpRequest = (HttpRequestBase) createHttpUriRequest(httpMethod, uri);
return new Request(getHttpClient(), httpRequest, creat... | [
"@",
"Override",
"public",
"ConfigurableRequest",
"createRequest",
"(",
"@",
"Nonnull",
"final",
"URI",
"uri",
",",
"@",
"Nonnull",
"final",
"HttpMethod",
"httpMethod",
")",
"throws",
"IOException",
"{",
"HttpRequestBase",
"httpRequest",
"=",
"(",
"HttpRequestBase",... | allow extension only for testing | [
"allow",
"extension",
"only",
"for",
"testing"
] | 25a452cb39f592bd8a53b20db1037703898e1e22 | https://github.com/mapfish/mapfish-print/blob/25a452cb39f592bd8a53b20db1037703898e1e22/core/src/main/java/org/mapfish/print/http/MfClientHttpRequestFactoryImpl.java#L93-L99 | train |
mapfish/mapfish-print | core/src/main/java/org/mapfish/print/wrapper/yaml/PYamlObject.java | PYamlObject.toJSON | public final PJsonObject toJSON() {
try {
JSONObject json = new JSONObject();
for (String key: this.obj.keySet()) {
Object opt = opt(key);
if (opt instanceof PYamlObject) {
opt = ((PYamlObject) opt).toJSON().getInternalObj();
... | java | public final PJsonObject toJSON() {
try {
JSONObject json = new JSONObject();
for (String key: this.obj.keySet()) {
Object opt = opt(key);
if (opt instanceof PYamlObject) {
opt = ((PYamlObject) opt).toJSON().getInternalObj();
... | [
"public",
"final",
"PJsonObject",
"toJSON",
"(",
")",
"{",
"try",
"{",
"JSONObject",
"json",
"=",
"new",
"JSONObject",
"(",
")",
";",
"for",
"(",
"String",
"key",
":",
"this",
".",
"obj",
".",
"keySet",
"(",
")",
")",
"{",
"Object",
"opt",
"=",
"op... | Convert this object to a json object. | [
"Convert",
"this",
"object",
"to",
"a",
"json",
"object",
"."
] | 25a452cb39f592bd8a53b20db1037703898e1e22 | https://github.com/mapfish/mapfish-print/blob/25a452cb39f592bd8a53b20db1037703898e1e22/core/src/main/java/org/mapfish/print/wrapper/yaml/PYamlObject.java#L150-L166 | train |
mapfish/mapfish-print | core/src/main/java/org/mapfish/print/processor/http/matcher/MatchInfo.java | MatchInfo.fromUri | public static MatchInfo fromUri(final URI uri, final HttpMethod method) {
int newPort = uri.getPort();
if (newPort < 0) {
try {
newPort = uri.toURL().getDefaultPort();
} catch (MalformedURLException | IllegalArgumentException e) {
newPort = ANY_POR... | java | public static MatchInfo fromUri(final URI uri, final HttpMethod method) {
int newPort = uri.getPort();
if (newPort < 0) {
try {
newPort = uri.toURL().getDefaultPort();
} catch (MalformedURLException | IllegalArgumentException e) {
newPort = ANY_POR... | [
"public",
"static",
"MatchInfo",
"fromUri",
"(",
"final",
"URI",
"uri",
",",
"final",
"HttpMethod",
"method",
")",
"{",
"int",
"newPort",
"=",
"uri",
".",
"getPort",
"(",
")",
";",
"if",
"(",
"newPort",
"<",
"0",
")",
"{",
"try",
"{",
"newPort",
"=",... | Create an info object from a uri and the http method object.
@param uri the uri
@param method the method | [
"Create",
"an",
"info",
"object",
"from",
"a",
"uri",
"and",
"the",
"http",
"method",
"object",
"."
] | 25a452cb39f592bd8a53b20db1037703898e1e22 | https://github.com/mapfish/mapfish-print/blob/25a452cb39f592bd8a53b20db1037703898e1e22/core/src/main/java/org/mapfish/print/processor/http/matcher/MatchInfo.java#L95-L107 | train |
mapfish/mapfish-print | core/src/main/java/org/mapfish/print/processor/http/matcher/MatchInfo.java | MatchInfo.fromAuthScope | @SuppressWarnings("StringEquality")
public static MatchInfo fromAuthScope(final AuthScope authscope) {
String newScheme = StringUtils.equals(authscope.getScheme(), AuthScope.ANY_SCHEME) ? ANY_SCHEME :
authscope.getScheme();
String newHost = StringUtils.equals(authscope.getHost(), Aut... | java | @SuppressWarnings("StringEquality")
public static MatchInfo fromAuthScope(final AuthScope authscope) {
String newScheme = StringUtils.equals(authscope.getScheme(), AuthScope.ANY_SCHEME) ? ANY_SCHEME :
authscope.getScheme();
String newHost = StringUtils.equals(authscope.getHost(), Aut... | [
"@",
"SuppressWarnings",
"(",
"\"StringEquality\"",
")",
"public",
"static",
"MatchInfo",
"fromAuthScope",
"(",
"final",
"AuthScope",
"authscope",
")",
"{",
"String",
"newScheme",
"=",
"StringUtils",
".",
"equals",
"(",
"authscope",
".",
"getScheme",
"(",
")",
"... | Create an info object from an authscope object.
@param authscope the authscope | [
"Create",
"an",
"info",
"object",
"from",
"an",
"authscope",
"object",
"."
] | 25a452cb39f592bd8a53b20db1037703898e1e22 | https://github.com/mapfish/mapfish-print/blob/25a452cb39f592bd8a53b20db1037703898e1e22/core/src/main/java/org/mapfish/print/processor/http/matcher/MatchInfo.java#L114-L126 | train |
mapfish/mapfish-print | core/src/main/java/org/mapfish/print/map/style/json/JsonStyleParserHelper.java | JsonStyleParserHelper.createStyle | public Style createStyle(final List<Rule> styleRules) {
final Rule[] rulesArray = styleRules.toArray(new Rule[0]);
final FeatureTypeStyle featureTypeStyle = this.styleBuilder.createFeatureTypeStyle(null, rulesArray);
final Style style = this.styleBuilder.createStyle();
style.featureTypeS... | java | public Style createStyle(final List<Rule> styleRules) {
final Rule[] rulesArray = styleRules.toArray(new Rule[0]);
final FeatureTypeStyle featureTypeStyle = this.styleBuilder.createFeatureTypeStyle(null, rulesArray);
final Style style = this.styleBuilder.createStyle();
style.featureTypeS... | [
"public",
"Style",
"createStyle",
"(",
"final",
"List",
"<",
"Rule",
">",
"styleRules",
")",
"{",
"final",
"Rule",
"[",
"]",
"rulesArray",
"=",
"styleRules",
".",
"toArray",
"(",
"new",
"Rule",
"[",
"0",
"]",
")",
";",
"final",
"FeatureTypeStyle",
"featu... | Create a style from a list of rules.
@param styleRules the rules | [
"Create",
"a",
"style",
"from",
"a",
"list",
"of",
"rules",
"."
] | 25a452cb39f592bd8a53b20db1037703898e1e22 | https://github.com/mapfish/mapfish-print/blob/25a452cb39f592bd8a53b20db1037703898e1e22/core/src/main/java/org/mapfish/print/map/style/json/JsonStyleParserHelper.java#L165-L171 | train |
mapfish/mapfish-print | core/src/main/java/org/mapfish/print/map/style/json/JsonStyleParserHelper.java | JsonStyleParserHelper.createLineSymbolizer | @VisibleForTesting
@Nullable
protected LineSymbolizer createLineSymbolizer(final PJsonObject styleJson) {
final Stroke stroke = createStroke(styleJson, true);
if (stroke == null) {
return null;
} else {
return this.styleBuilder.createLineSymbolizer(stroke);
... | java | @VisibleForTesting
@Nullable
protected LineSymbolizer createLineSymbolizer(final PJsonObject styleJson) {
final Stroke stroke = createStroke(styleJson, true);
if (stroke == null) {
return null;
} else {
return this.styleBuilder.createLineSymbolizer(stroke);
... | [
"@",
"VisibleForTesting",
"@",
"Nullable",
"protected",
"LineSymbolizer",
"createLineSymbolizer",
"(",
"final",
"PJsonObject",
"styleJson",
")",
"{",
"final",
"Stroke",
"stroke",
"=",
"createStroke",
"(",
"styleJson",
",",
"true",
")",
";",
"if",
"(",
"stroke",
... | Add a line symbolizer definition to the rule.
@param styleJson The old style. | [
"Add",
"a",
"line",
"symbolizer",
"definition",
"to",
"the",
"rule",
"."
] | 25a452cb39f592bd8a53b20db1037703898e1e22 | https://github.com/mapfish/mapfish-print/blob/25a452cb39f592bd8a53b20db1037703898e1e22/core/src/main/java/org/mapfish/print/map/style/json/JsonStyleParserHelper.java#L298-L307 | train |
mapfish/mapfish-print | core/src/main/java/org/mapfish/print/map/style/json/JsonStyleParserHelper.java | JsonStyleParserHelper.createPolygonSymbolizer | @Nullable
@VisibleForTesting
protected PolygonSymbolizer createPolygonSymbolizer(final PJsonObject styleJson) {
if (this.allowNullSymbolizer && !styleJson.has(JSON_FILL_COLOR)) {
return null;
}
final PolygonSymbolizer symbolizer = this.styleBuilder.createPolygonSymbolizer();... | java | @Nullable
@VisibleForTesting
protected PolygonSymbolizer createPolygonSymbolizer(final PJsonObject styleJson) {
if (this.allowNullSymbolizer && !styleJson.has(JSON_FILL_COLOR)) {
return null;
}
final PolygonSymbolizer symbolizer = this.styleBuilder.createPolygonSymbolizer();... | [
"@",
"Nullable",
"@",
"VisibleForTesting",
"protected",
"PolygonSymbolizer",
"createPolygonSymbolizer",
"(",
"final",
"PJsonObject",
"styleJson",
")",
"{",
"if",
"(",
"this",
".",
"allowNullSymbolizer",
"&&",
"!",
"styleJson",
".",
"has",
"(",
"JSON_FILL_COLOR",
")"... | Add a polygon symbolizer definition to the rule.
@param styleJson The old style. | [
"Add",
"a",
"polygon",
"symbolizer",
"definition",
"to",
"the",
"rule",
"."
] | 25a452cb39f592bd8a53b20db1037703898e1e22 | https://github.com/mapfish/mapfish-print/blob/25a452cb39f592bd8a53b20db1037703898e1e22/core/src/main/java/org/mapfish/print/map/style/json/JsonStyleParserHelper.java#L314-L327 | train |
mapfish/mapfish-print | core/src/main/java/org/mapfish/print/map/style/json/JsonStyleParserHelper.java | JsonStyleParserHelper.createTextSymbolizer | @VisibleForTesting
protected TextSymbolizer createTextSymbolizer(final PJsonObject styleJson) {
final TextSymbolizer textSymbolizer = this.styleBuilder.createTextSymbolizer();
// make sure that labels are also rendered if a part of the text would be outside
// the view context, see http://d... | java | @VisibleForTesting
protected TextSymbolizer createTextSymbolizer(final PJsonObject styleJson) {
final TextSymbolizer textSymbolizer = this.styleBuilder.createTextSymbolizer();
// make sure that labels are also rendered if a part of the text would be outside
// the view context, see http://d... | [
"@",
"VisibleForTesting",
"protected",
"TextSymbolizer",
"createTextSymbolizer",
"(",
"final",
"PJsonObject",
"styleJson",
")",
"{",
"final",
"TextSymbolizer",
"textSymbolizer",
"=",
"this",
".",
"styleBuilder",
".",
"createTextSymbolizer",
"(",
")",
";",
"// make sure ... | Add a text symbolizer definition to the rule.
@param styleJson The old style. | [
"Add",
"a",
"text",
"symbolizer",
"definition",
"to",
"the",
"rule",
"."
] | 25a452cb39f592bd8a53b20db1037703898e1e22 | https://github.com/mapfish/mapfish-print/blob/25a452cb39f592bd8a53b20db1037703898e1e22/core/src/main/java/org/mapfish/print/map/style/json/JsonStyleParserHelper.java#L334-L391 | train |
mapfish/mapfish-print | core/src/main/java/org/mapfish/print/url/data/Handler.java | Handler.configureProtocolHandler | public static void configureProtocolHandler() {
final String pkgs = System.getProperty("java.protocol.handler.pkgs");
String newValue = "org.mapfish.print.url";
if (pkgs != null && !pkgs.contains(newValue)) {
newValue = newValue + "|" + pkgs;
} else if (pkgs != null) {
... | java | public static void configureProtocolHandler() {
final String pkgs = System.getProperty("java.protocol.handler.pkgs");
String newValue = "org.mapfish.print.url";
if (pkgs != null && !pkgs.contains(newValue)) {
newValue = newValue + "|" + pkgs;
} else if (pkgs != null) {
... | [
"public",
"static",
"void",
"configureProtocolHandler",
"(",
")",
"{",
"final",
"String",
"pkgs",
"=",
"System",
".",
"getProperty",
"(",
"\"java.protocol.handler.pkgs\"",
")",
";",
"String",
"newValue",
"=",
"\"org.mapfish.print.url\"",
";",
"if",
"(",
"pkgs",
"!... | Adds the parent package to the java.protocol.handler.pkgs system property. | [
"Adds",
"the",
"parent",
"package",
"to",
"the",
"java",
".",
"protocol",
".",
"handler",
".",
"pkgs",
"system",
"property",
"."
] | 25a452cb39f592bd8a53b20db1037703898e1e22 | https://github.com/mapfish/mapfish-print/blob/25a452cb39f592bd8a53b20db1037703898e1e22/core/src/main/java/org/mapfish/print/url/data/Handler.java#L16-L25 | train |
mapfish/mapfish-print | core/src/main/java/org/mapfish/print/map/geotools/AbstractFeatureSourceLayerPlugin.java | AbstractFeatureSourceLayerPlugin.createStyleFunction | protected final StyleSupplier<FeatureSource> createStyleFunction(
final Template template,
final String styleString) {
return new StyleSupplier<FeatureSource>() {
@Override
public Style load(
final MfClientHttpRequestFactory requestFactory,
... | java | protected final StyleSupplier<FeatureSource> createStyleFunction(
final Template template,
final String styleString) {
return new StyleSupplier<FeatureSource>() {
@Override
public Style load(
final MfClientHttpRequestFactory requestFactory,
... | [
"protected",
"final",
"StyleSupplier",
"<",
"FeatureSource",
">",
"createStyleFunction",
"(",
"final",
"Template",
"template",
",",
"final",
"String",
"styleString",
")",
"{",
"return",
"new",
"StyleSupplier",
"<",
"FeatureSource",
">",
"(",
")",
"{",
"@",
"Over... | Create a function that will create the style on demand. This is called later in a separate thread so
any blocking calls will not block the parsing of the layer attributes.
@param template the template for this map
@param styleString a string that identifies a style. | [
"Create",
"a",
"function",
"that",
"will",
"create",
"the",
"style",
"on",
"demand",
".",
"This",
"is",
"called",
"later",
"in",
"a",
"separate",
"thread",
"so",
"any",
"blocking",
"calls",
"will",
"not",
"block",
"the",
"parsing",
"of",
"the",
"layer",
... | 25a452cb39f592bd8a53b20db1037703898e1e22 | https://github.com/mapfish/mapfish-print/blob/25a452cb39f592bd8a53b20db1037703898e1e22/core/src/main/java/org/mapfish/print/map/geotools/AbstractFeatureSourceLayerPlugin.java#L60-L85 | train |
mapfish/mapfish-print | core/src/main/java/org/mapfish/print/map/image/wms/WmsUtilities.java | WmsUtilities.makeWmsGetLayerRequest | public static URI makeWmsGetLayerRequest(
final WmsLayerParam wmsLayerParam,
final URI commonURI,
final Dimension imageSize,
final double dpi,
final double angle,
final ReferencedEnvelope bounds) throws FactoryException, URISyntaxException, IOExcep... | java | public static URI makeWmsGetLayerRequest(
final WmsLayerParam wmsLayerParam,
final URI commonURI,
final Dimension imageSize,
final double dpi,
final double angle,
final ReferencedEnvelope bounds) throws FactoryException, URISyntaxException, IOExcep... | [
"public",
"static",
"URI",
"makeWmsGetLayerRequest",
"(",
"final",
"WmsLayerParam",
"wmsLayerParam",
",",
"final",
"URI",
"commonURI",
",",
"final",
"Dimension",
"imageSize",
",",
"final",
"double",
"dpi",
",",
"final",
"double",
"angle",
",",
"final",
"Referenced... | Make a WMS getLayer request and return the image read from the server.
@param wmsLayerParam the wms request parameters
@param commonURI the uri to use for the requests (excepting parameters of course.)
@param imageSize the size of the image to request
@param dpi the dpi of the image to request
@param angle the angle o... | [
"Make",
"a",
"WMS",
"getLayer",
"request",
"and",
"return",
"the",
"image",
"read",
"from",
"the",
"server",
"."
] | 25a452cb39f592bd8a53b20db1037703898e1e22 | https://github.com/mapfish/mapfish-print/blob/25a452cb39f592bd8a53b20db1037703898e1e22/core/src/main/java/org/mapfish/print/map/image/wms/WmsUtilities.java#L48-L108 | train |
mapfish/mapfish-print | core/src/main/java/org/mapfish/print/map/image/wms/WmsUtilities.java | WmsUtilities.isDpiSet | private static boolean isDpiSet(final Multimap<String, String> extraParams) {
String searchKey = "FORMAT_OPTIONS";
for (String key: extraParams.keys()) {
if (key.equalsIgnoreCase(searchKey)) {
for (String value: extraParams.get(key)) {
if (value.toLowerCas... | java | private static boolean isDpiSet(final Multimap<String, String> extraParams) {
String searchKey = "FORMAT_OPTIONS";
for (String key: extraParams.keys()) {
if (key.equalsIgnoreCase(searchKey)) {
for (String value: extraParams.get(key)) {
if (value.toLowerCas... | [
"private",
"static",
"boolean",
"isDpiSet",
"(",
"final",
"Multimap",
"<",
"String",
",",
"String",
">",
"extraParams",
")",
"{",
"String",
"searchKey",
"=",
"\"FORMAT_OPTIONS\"",
";",
"for",
"(",
"String",
"key",
":",
"extraParams",
".",
"keys",
"(",
")",
... | Checks if the DPI value is already set for GeoServer. | [
"Checks",
"if",
"the",
"DPI",
"value",
"is",
"already",
"set",
"for",
"GeoServer",
"."
] | 25a452cb39f592bd8a53b20db1037703898e1e22 | https://github.com/mapfish/mapfish-print/blob/25a452cb39f592bd8a53b20db1037703898e1e22/core/src/main/java/org/mapfish/print/map/image/wms/WmsUtilities.java#L171-L183 | train |
mapfish/mapfish-print | core/src/main/java/org/mapfish/print/map/image/wms/WmsUtilities.java | WmsUtilities.setDpiValue | private static void setDpiValue(final Multimap<String, String> extraParams, final int dpi) {
String searchKey = "FORMAT_OPTIONS";
for (String key: extraParams.keys()) {
if (key.equalsIgnoreCase(searchKey)) {
Collection<String> values = extraParams.removeAll(key);
... | java | private static void setDpiValue(final Multimap<String, String> extraParams, final int dpi) {
String searchKey = "FORMAT_OPTIONS";
for (String key: extraParams.keys()) {
if (key.equalsIgnoreCase(searchKey)) {
Collection<String> values = extraParams.removeAll(key);
... | [
"private",
"static",
"void",
"setDpiValue",
"(",
"final",
"Multimap",
"<",
"String",
",",
"String",
">",
"extraParams",
",",
"final",
"int",
"dpi",
")",
"{",
"String",
"searchKey",
"=",
"\"FORMAT_OPTIONS\"",
";",
"for",
"(",
"String",
"key",
":",
"extraParam... | Set the DPI value for GeoServer if there are already FORMAT_OPTIONS. | [
"Set",
"the",
"DPI",
"value",
"for",
"GeoServer",
"if",
"there",
"are",
"already",
"FORMAT_OPTIONS",
"."
] | 25a452cb39f592bd8a53b20db1037703898e1e22 | https://github.com/mapfish/mapfish-print/blob/25a452cb39f592bd8a53b20db1037703898e1e22/core/src/main/java/org/mapfish/print/map/image/wms/WmsUtilities.java#L188-L204 | train |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.