id int32 0 165k | 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 |
|---|---|---|---|---|---|---|---|---|---|---|---|
159,400 | mapfish/mapfish-print | core/src/main/java/org/mapfish/print/attribute/map/AreaOfInterest.java | AreaOfInterest.copy | public AreaOfInterest copy() {
AreaOfInterest aoi = new AreaOfInterest();
aoi.display = this.display;
aoi.area = this.area;
aoi.polygon = this.polygon;
aoi.style = this.style;
aoi.renderAsSvg = this.renderAsSvg;
return aoi;
} | java | public AreaOfInterest copy() {
AreaOfInterest aoi = new AreaOfInterest();
aoi.display = this.display;
aoi.area = this.area;
aoi.polygon = this.polygon;
aoi.style = this.style;
aoi.renderAsSvg = this.renderAsSvg;
return aoi;
} | [
"public",
"AreaOfInterest",
"copy",
"(",
")",
"{",
"AreaOfInterest",
"aoi",
"=",
"new",
"AreaOfInterest",
"(",
")",
";",
"aoi",
".",
"display",
"=",
"this",
".",
"display",
";",
"aoi",
".",
"area",
"=",
"this",
".",
"area",
";",
"aoi",
".",
"polygon",
... | Make a copy of this Area of Interest. | [
"Make",
"a",
"copy",
"of",
"this",
"Area",
"of",
"Interest",
"."
] | 25a452cb39f592bd8a53b20db1037703898e1e22 | https://github.com/mapfish/mapfish-print/blob/25a452cb39f592bd8a53b20db1037703898e1e22/core/src/main/java/org/mapfish/print/attribute/map/AreaOfInterest.java#L118-L126 |
159,401 | mapfish/mapfish-print | core/src/main/java/org/mapfish/print/processor/ProcessorDependencyGraphFactory.java | ProcessorDependencyGraphFactory.fillProcessorAttributes | public static void fillProcessorAttributes(
final List<Processor> processors,
final Map<String, Attribute> initialAttributes) {
Map<String, Attribute> currentAttributes = new HashMap<>(initialAttributes);
for (Processor processor: processors) {
if (processor instanceo... | java | public static void fillProcessorAttributes(
final List<Processor> processors,
final Map<String, Attribute> initialAttributes) {
Map<String, Attribute> currentAttributes = new HashMap<>(initialAttributes);
for (Processor processor: processors) {
if (processor instanceo... | [
"public",
"static",
"void",
"fillProcessorAttributes",
"(",
"final",
"List",
"<",
"Processor",
">",
"processors",
",",
"final",
"Map",
"<",
"String",
",",
"Attribute",
">",
"initialAttributes",
")",
"{",
"Map",
"<",
"String",
",",
"Attribute",
">",
"currentAtt... | Fill the attributes in the processor.
@param processors The processors
@param initialAttributes The attributes
@see RequireAttributes
@see ProvideAttributes | [
"Fill",
"the",
"attributes",
"in",
"the",
"processor",
"."
] | 25a452cb39f592bd8a53b20db1037703898e1e22 | https://github.com/mapfish/mapfish-print/blob/25a452cb39f592bd8a53b20db1037703898e1e22/core/src/main/java/org/mapfish/print/processor/ProcessorDependencyGraphFactory.java#L91-L141 |
159,402 | mapfish/mapfish-print | core/src/main/java/org/mapfish/print/parser/OneOfTracker.java | OneOfTracker.checkAllGroupsSatisfied | public void checkAllGroupsSatisfied(final String currentPath) {
StringBuilder errors = new StringBuilder();
for (OneOfGroup group: this.mapping.values()) {
if (group.satisfiedBy.isEmpty()) {
errors.append("\n");
errors.append("\t* The OneOf choice: ").append... | java | public void checkAllGroupsSatisfied(final String currentPath) {
StringBuilder errors = new StringBuilder();
for (OneOfGroup group: this.mapping.values()) {
if (group.satisfiedBy.isEmpty()) {
errors.append("\n");
errors.append("\t* The OneOf choice: ").append... | [
"public",
"void",
"checkAllGroupsSatisfied",
"(",
"final",
"String",
"currentPath",
")",
"{",
"StringBuilder",
"errors",
"=",
"new",
"StringBuilder",
"(",
")",
";",
"for",
"(",
"OneOfGroup",
"group",
":",
"this",
".",
"mapping",
".",
"values",
"(",
")",
")",... | Check that each group is satisfied by one and only one field.
@param currentPath the json path to the element being checked | [
"Check",
"that",
"each",
"group",
"is",
"satisfied",
"by",
"one",
"and",
"only",
"one",
"field",
"."
] | 25a452cb39f592bd8a53b20db1037703898e1e22 | https://github.com/mapfish/mapfish-print/blob/25a452cb39f592bd8a53b20db1037703898e1e22/core/src/main/java/org/mapfish/print/parser/OneOfTracker.java#L74-L101 |
159,403 | mapfish/mapfish-print | core/src/main/java/org/mapfish/print/metrics/LoggingMetricsConfigurator.java | LoggingMetricsConfigurator.addMetricsAppenderToLogback | @PostConstruct
public final void addMetricsAppenderToLogback() {
final LoggerContext factory = (LoggerContext) LoggerFactory.getILoggerFactory();
final Logger root = factory.getLogger(Logger.ROOT_LOGGER_NAME);
final InstrumentedAppender metrics = new InstrumentedAppender(this.metricRegistry... | java | @PostConstruct
public final void addMetricsAppenderToLogback() {
final LoggerContext factory = (LoggerContext) LoggerFactory.getILoggerFactory();
final Logger root = factory.getLogger(Logger.ROOT_LOGGER_NAME);
final InstrumentedAppender metrics = new InstrumentedAppender(this.metricRegistry... | [
"@",
"PostConstruct",
"public",
"final",
"void",
"addMetricsAppenderToLogback",
"(",
")",
"{",
"final",
"LoggerContext",
"factory",
"=",
"(",
"LoggerContext",
")",
"LoggerFactory",
".",
"getILoggerFactory",
"(",
")",
";",
"final",
"Logger",
"root",
"=",
"factory",... | Add an appender to Logback logging framework that will track the types of log messages made. | [
"Add",
"an",
"appender",
"to",
"Logback",
"logging",
"framework",
"that",
"will",
"track",
"the",
"types",
"of",
"log",
"messages",
"made",
"."
] | 25a452cb39f592bd8a53b20db1037703898e1e22 | https://github.com/mapfish/mapfish-print/blob/25a452cb39f592bd8a53b20db1037703898e1e22/core/src/main/java/org/mapfish/print/metrics/LoggingMetricsConfigurator.java#L22-L31 |
159,404 | mapfish/mapfish-print | core/src/main/java/org/mapfish/print/parser/RequiresTracker.java | RequiresTracker.checkAllRequirementsSatisfied | public void checkAllRequirementsSatisfied(final String currentPath) {
StringBuilder errors = new StringBuilder();
for (Field field: this.dependantsInJson) {
final Collection<String> requirements = this.dependantToRequirementsMap.get(field);
if (!requirements.isEmpty()) {
... | java | public void checkAllRequirementsSatisfied(final String currentPath) {
StringBuilder errors = new StringBuilder();
for (Field field: this.dependantsInJson) {
final Collection<String> requirements = this.dependantToRequirementsMap.get(field);
if (!requirements.isEmpty()) {
... | [
"public",
"void",
"checkAllRequirementsSatisfied",
"(",
"final",
"String",
"currentPath",
")",
"{",
"StringBuilder",
"errors",
"=",
"new",
"StringBuilder",
"(",
")",
";",
"for",
"(",
"Field",
"field",
":",
"this",
".",
"dependantsInJson",
")",
"{",
"final",
"C... | Check that each requirement is satisfied.
@param currentPath the json path to the element being checked | [
"Check",
"that",
"each",
"requirement",
"is",
"satisfied",
"."
] | 25a452cb39f592bd8a53b20db1037703898e1e22 | https://github.com/mapfish/mapfish-print/blob/25a452cb39f592bd8a53b20db1037703898e1e22/core/src/main/java/org/mapfish/print/parser/RequiresTracker.java#L64-L82 |
159,405 | mapfish/mapfish-print | core/src/main/java/org/mapfish/print/config/Configuration.java | Configuration.printClientConfig | public final void printClientConfig(final JSONWriter json) throws JSONException {
json.key("layouts");
json.array();
final Map<String, Template> accessibleTemplates = getTemplates();
accessibleTemplates.entrySet().stream().sorted(Comparator.comparing(Map.Entry::getKey))
.... | java | public final void printClientConfig(final JSONWriter json) throws JSONException {
json.key("layouts");
json.array();
final Map<String, Template> accessibleTemplates = getTemplates();
accessibleTemplates.entrySet().stream().sorted(Comparator.comparing(Map.Entry::getKey))
.... | [
"public",
"final",
"void",
"printClientConfig",
"(",
"final",
"JSONWriter",
"json",
")",
"throws",
"JSONException",
"{",
"json",
".",
"key",
"(",
"\"layouts\"",
")",
";",
"json",
".",
"array",
"(",
")",
";",
"final",
"Map",
"<",
"String",
",",
"Template",
... | Print out the configuration that the client needs to make a request.
@param json the output writer.
@throws JSONException | [
"Print",
"out",
"the",
"configuration",
"that",
"the",
"client",
"needs",
"to",
"make",
"a",
"request",
"."
] | 25a452cb39f592bd8a53b20db1037703898e1e22 | https://github.com/mapfish/mapfish-print/blob/25a452cb39f592bd8a53b20db1037703898e1e22/core/src/main/java/org/mapfish/print/config/Configuration.java#L234-L254 |
159,406 | mapfish/mapfish-print | core/src/main/java/org/mapfish/print/config/Configuration.java | Configuration.getTemplate | public final Template getTemplate(final String name) {
final Template template = this.templates.get(name);
if (template != null) {
this.accessAssertion.assertAccess("Configuration", this);
template.assertAccessible(name);
} else {
throw new IllegalArgumentExce... | java | public final Template getTemplate(final String name) {
final Template template = this.templates.get(name);
if (template != null) {
this.accessAssertion.assertAccess("Configuration", this);
template.assertAccessible(name);
} else {
throw new IllegalArgumentExce... | [
"public",
"final",
"Template",
"getTemplate",
"(",
"final",
"String",
"name",
")",
"{",
"final",
"Template",
"template",
"=",
"this",
".",
"templates",
".",
"get",
"(",
"name",
")",
";",
"if",
"(",
"template",
"!=",
"null",
")",
"{",
"this",
".",
"acce... | Retrieve the configuration of the named template.
@param name the template name; | [
"Retrieve",
"the",
"configuration",
"of",
"the",
"named",
"template",
"."
] | 25a452cb39f592bd8a53b20db1037703898e1e22 | https://github.com/mapfish/mapfish-print/blob/25a452cb39f592bd8a53b20db1037703898e1e22/core/src/main/java/org/mapfish/print/config/Configuration.java#L312-L322 |
159,407 | mapfish/mapfish-print | core/src/main/java/org/mapfish/print/config/Configuration.java | Configuration.getDefaultStyle | @Nonnull
public final Style getDefaultStyle(@Nonnull final String geometryType) {
String normalizedGeomName = GEOMETRY_NAME_ALIASES.get(geometryType.toLowerCase());
if (normalizedGeomName == null) {
normalizedGeomName = geometryType.toLowerCase();
}
Style style = this.def... | java | @Nonnull
public final Style getDefaultStyle(@Nonnull final String geometryType) {
String normalizedGeomName = GEOMETRY_NAME_ALIASES.get(geometryType.toLowerCase());
if (normalizedGeomName == null) {
normalizedGeomName = geometryType.toLowerCase();
}
Style style = this.def... | [
"@",
"Nonnull",
"public",
"final",
"Style",
"getDefaultStyle",
"(",
"@",
"Nonnull",
"final",
"String",
"geometryType",
")",
"{",
"String",
"normalizedGeomName",
"=",
"GEOMETRY_NAME_ALIASES",
".",
"get",
"(",
"geometryType",
".",
"toLowerCase",
"(",
")",
")",
";"... | Get a default style. If null a simple black line style will be returned.
@param geometryType the name of the geometry type (point, line, polygon) | [
"Get",
"a",
"default",
"style",
".",
"If",
"null",
"a",
"simple",
"black",
"line",
"style",
"will",
"be",
"returned",
"."
] | 25a452cb39f592bd8a53b20db1037703898e1e22 | https://github.com/mapfish/mapfish-print/blob/25a452cb39f592bd8a53b20db1037703898e1e22/core/src/main/java/org/mapfish/print/config/Configuration.java#L362-L397 |
159,408 | mapfish/mapfish-print | core/src/main/java/org/mapfish/print/config/Configuration.java | Configuration.setDefaultStyle | public final void setDefaultStyle(final Map<String, Style> defaultStyle) {
this.defaultStyle = new HashMap<>(defaultStyle.size());
for (Map.Entry<String, Style> entry: defaultStyle.entrySet()) {
String normalizedName = GEOMETRY_NAME_ALIASES.get(entry.getKey().toLowerCase());
if ... | java | public final void setDefaultStyle(final Map<String, Style> defaultStyle) {
this.defaultStyle = new HashMap<>(defaultStyle.size());
for (Map.Entry<String, Style> entry: defaultStyle.entrySet()) {
String normalizedName = GEOMETRY_NAME_ALIASES.get(entry.getKey().toLowerCase());
if ... | [
"public",
"final",
"void",
"setDefaultStyle",
"(",
"final",
"Map",
"<",
"String",
",",
"Style",
">",
"defaultStyle",
")",
"{",
"this",
".",
"defaultStyle",
"=",
"new",
"HashMap",
"<>",
"(",
"defaultStyle",
".",
"size",
"(",
")",
")",
";",
"for",
"(",
"... | Set the default styles. the case of the keys are not important. The retrieval will be case
insensitive.
@param defaultStyle the mapping from geometry type name (point, polygon, etc...) to the style
to use for that type. | [
"Set",
"the",
"default",
"styles",
".",
"the",
"case",
"of",
"the",
"keys",
"are",
"not",
"important",
".",
"The",
"retrieval",
"will",
"be",
"case",
"insensitive",
"."
] | 25a452cb39f592bd8a53b20db1037703898e1e22 | https://github.com/mapfish/mapfish-print/blob/25a452cb39f592bd8a53b20db1037703898e1e22/core/src/main/java/org/mapfish/print/config/Configuration.java#L446-L457 |
159,409 | mapfish/mapfish-print | core/src/main/java/org/mapfish/print/config/Configuration.java | Configuration.validate | public final List<Throwable> validate() {
List<Throwable> validationErrors = new ArrayList<>();
this.accessAssertion.validate(validationErrors, this);
for (String jdbcDriver: this.jdbcDrivers) {
try {
Class.forName(jdbcDriver);
} catch (ClassNotFoundExcep... | java | public final List<Throwable> validate() {
List<Throwable> validationErrors = new ArrayList<>();
this.accessAssertion.validate(validationErrors, this);
for (String jdbcDriver: this.jdbcDrivers) {
try {
Class.forName(jdbcDriver);
} catch (ClassNotFoundExcep... | [
"public",
"final",
"List",
"<",
"Throwable",
">",
"validate",
"(",
")",
"{",
"List",
"<",
"Throwable",
">",
"validationErrors",
"=",
"new",
"ArrayList",
"<>",
"(",
")",
";",
"this",
".",
"accessAssertion",
".",
"validate",
"(",
"validationErrors",
",",
"th... | Validate that the configuration is valid.
@return any validation errors. | [
"Validate",
"that",
"the",
"configuration",
"is",
"valid",
"."
] | 25a452cb39f592bd8a53b20db1037703898e1e22 | https://github.com/mapfish/mapfish-print/blob/25a452cb39f592bd8a53b20db1037703898e1e22/core/src/main/java/org/mapfish/print/config/Configuration.java#L487-L537 |
159,410 | mapfish/mapfish-print | core/src/main/java/org/mapfish/print/processor/ProcessorGraphNode.java | ProcessorGraphNode.addDependency | public void addDependency(final ProcessorGraphNode node) {
Assert.isTrue(node != this, "A processor can't depends on himself");
this.dependencies.add(node);
node.addRequirement(this);
} | java | public void addDependency(final ProcessorGraphNode node) {
Assert.isTrue(node != this, "A processor can't depends on himself");
this.dependencies.add(node);
node.addRequirement(this);
} | [
"public",
"void",
"addDependency",
"(",
"final",
"ProcessorGraphNode",
"node",
")",
"{",
"Assert",
".",
"isTrue",
"(",
"node",
"!=",
"this",
",",
"\"A processor can't depends on himself\"",
")",
";",
"this",
".",
"dependencies",
".",
"add",
"(",
"node",
")",
"... | Add a dependency to this node.
@param node the dependency to add. | [
"Add",
"a",
"dependency",
"to",
"this",
"node",
"."
] | 25a452cb39f592bd8a53b20db1037703898e1e22 | https://github.com/mapfish/mapfish-print/blob/25a452cb39f592bd8a53b20db1037703898e1e22/core/src/main/java/org/mapfish/print/processor/ProcessorGraphNode.java#L66-L71 |
159,411 | mapfish/mapfish-print | core/src/main/java/org/mapfish/print/processor/ProcessorGraphNode.java | ProcessorGraphNode.getOutputMapper | @Nonnull
public BiMap<String, String> getOutputMapper() {
final BiMap<String, String> outputMapper = this.processor.getOutputMapperBiMap();
if (outputMapper == null) {
return HashBiMap.create();
}
return outputMapper;
} | java | @Nonnull
public BiMap<String, String> getOutputMapper() {
final BiMap<String, String> outputMapper = this.processor.getOutputMapperBiMap();
if (outputMapper == null) {
return HashBiMap.create();
}
return outputMapper;
} | [
"@",
"Nonnull",
"public",
"BiMap",
"<",
"String",
",",
"String",
">",
"getOutputMapper",
"(",
")",
"{",
"final",
"BiMap",
"<",
"String",
",",
"String",
">",
"outputMapper",
"=",
"this",
".",
"processor",
".",
"getOutputMapperBiMap",
"(",
")",
";",
"if",
... | Get the output mapper from processor. | [
"Get",
"the",
"output",
"mapper",
"from",
"processor",
"."
] | 25a452cb39f592bd8a53b20db1037703898e1e22 | https://github.com/mapfish/mapfish-print/blob/25a452cb39f592bd8a53b20db1037703898e1e22/core/src/main/java/org/mapfish/print/processor/ProcessorGraphNode.java#L110-L117 |
159,412 | mapfish/mapfish-print | core/src/main/java/org/mapfish/print/processor/ProcessorGraphNode.java | ProcessorGraphNode.getInputMapper | @Nonnull
public BiMap<String, String> getInputMapper() {
final BiMap<String, String> inputMapper = this.processor.getInputMapperBiMap();
if (inputMapper == null) {
return HashBiMap.create();
}
return inputMapper;
} | java | @Nonnull
public BiMap<String, String> getInputMapper() {
final BiMap<String, String> inputMapper = this.processor.getInputMapperBiMap();
if (inputMapper == null) {
return HashBiMap.create();
}
return inputMapper;
} | [
"@",
"Nonnull",
"public",
"BiMap",
"<",
"String",
",",
"String",
">",
"getInputMapper",
"(",
")",
"{",
"final",
"BiMap",
"<",
"String",
",",
"String",
">",
"inputMapper",
"=",
"this",
".",
"processor",
".",
"getInputMapperBiMap",
"(",
")",
";",
"if",
"("... | Return input mapper from processor. | [
"Return",
"input",
"mapper",
"from",
"processor",
"."
] | 25a452cb39f592bd8a53b20db1037703898e1e22 | https://github.com/mapfish/mapfish-print/blob/25a452cb39f592bd8a53b20db1037703898e1e22/core/src/main/java/org/mapfish/print/processor/ProcessorGraphNode.java#L122-L129 |
159,413 | mapfish/mapfish-print | core/src/main/java/org/mapfish/print/processor/ProcessorGraphNode.java | ProcessorGraphNode.getAllProcessors | public Set<? extends Processor<?, ?>> getAllProcessors() {
IdentityHashMap<Processor<?, ?>, Void> all = new IdentityHashMap<>();
all.put(this.getProcessor(), null);
for (ProcessorGraphNode<?, ?> dependency: this.dependencies) {
for (Processor<?, ?> p: dependency.getAllProcessors()) {... | java | public Set<? extends Processor<?, ?>> getAllProcessors() {
IdentityHashMap<Processor<?, ?>, Void> all = new IdentityHashMap<>();
all.put(this.getProcessor(), null);
for (ProcessorGraphNode<?, ?> dependency: this.dependencies) {
for (Processor<?, ?> p: dependency.getAllProcessors()) {... | [
"public",
"Set",
"<",
"?",
"extends",
"Processor",
"<",
"?",
",",
"?",
">",
">",
"getAllProcessors",
"(",
")",
"{",
"IdentityHashMap",
"<",
"Processor",
"<",
"?",
",",
"?",
">",
",",
"Void",
">",
"all",
"=",
"new",
"IdentityHashMap",
"<>",
"(",
")",
... | Create a set containing all the processor at the current node and the entire subgraph. | [
"Create",
"a",
"set",
"containing",
"all",
"the",
"processor",
"at",
"the",
"current",
"node",
"and",
"the",
"entire",
"subgraph",
"."
] | 25a452cb39f592bd8a53b20db1037703898e1e22 | https://github.com/mapfish/mapfish-print/blob/25a452cb39f592bd8a53b20db1037703898e1e22/core/src/main/java/org/mapfish/print/processor/ProcessorGraphNode.java#L159-L168 |
159,414 | mapfish/mapfish-print | core/src/main/java/org/mapfish/print/servlet/BaseMapServlet.java | BaseMapServlet.findReplacement | public static String findReplacement(final String variableName, final Date date) {
if (variableName.equalsIgnoreCase("date")) {
return cleanUpName(DateFormat.getDateInstance().format(date));
} else if (variableName.equalsIgnoreCase("datetime")) {
return cleanUpName(DateFormat.get... | java | public static String findReplacement(final String variableName, final Date date) {
if (variableName.equalsIgnoreCase("date")) {
return cleanUpName(DateFormat.getDateInstance().format(date));
} else if (variableName.equalsIgnoreCase("datetime")) {
return cleanUpName(DateFormat.get... | [
"public",
"static",
"String",
"findReplacement",
"(",
"final",
"String",
"variableName",
",",
"final",
"Date",
"date",
")",
"{",
"if",
"(",
"variableName",
".",
"equalsIgnoreCase",
"(",
"\"date\"",
")",
")",
"{",
"return",
"cleanUpName",
"(",
"DateFormat",
"."... | Update a variable name with a date if the variable is detected as being a date.
@param variableName the variable name.
@param date the date to replace the value with if the variable is a date variable. | [
"Update",
"a",
"variable",
"name",
"with",
"a",
"date",
"if",
"the",
"variable",
"is",
"detected",
"as",
"being",
"a",
"date",
"."
] | 25a452cb39f592bd8a53b20db1037703898e1e22 | https://github.com/mapfish/mapfish-print/blob/25a452cb39f592bd8a53b20db1037703898e1e22/core/src/main/java/org/mapfish/print/servlet/BaseMapServlet.java#L38-L53 |
159,415 | mapfish/mapfish-print | core/src/main/java/org/mapfish/print/servlet/BaseMapServlet.java | BaseMapServlet.error | protected static void error(
final HttpServletResponse httpServletResponse, final String message, final HttpStatus code) {
try {
httpServletResponse.setContentType("text/plain");
httpServletResponse.setStatus(code.value());
setNoCache(httpServletResponse);
... | java | protected static void error(
final HttpServletResponse httpServletResponse, final String message, final HttpStatus code) {
try {
httpServletResponse.setContentType("text/plain");
httpServletResponse.setStatus(code.value());
setNoCache(httpServletResponse);
... | [
"protected",
"static",
"void",
"error",
"(",
"final",
"HttpServletResponse",
"httpServletResponse",
",",
"final",
"String",
"message",
",",
"final",
"HttpStatus",
"code",
")",
"{",
"try",
"{",
"httpServletResponse",
".",
"setContentType",
"(",
"\"text/plain\"",
")",... | Send an error to the client with a message.
@param httpServletResponse the response to send the error to.
@param message the message to send
@param code the error code | [
"Send",
"an",
"error",
"to",
"the",
"client",
"with",
"a",
"message",
"."
] | 25a452cb39f592bd8a53b20db1037703898e1e22 | https://github.com/mapfish/mapfish-print/blob/25a452cb39f592bd8a53b20db1037703898e1e22/core/src/main/java/org/mapfish/print/servlet/BaseMapServlet.java#L62-L77 |
159,416 | mapfish/mapfish-print | core/src/main/java/org/mapfish/print/servlet/BaseMapServlet.java | BaseMapServlet.error | protected final void error(final HttpServletResponse httpServletResponse, final Throwable e) {
httpServletResponse.setContentType("text/plain");
httpServletResponse.setStatus(HttpStatus.INTERNAL_SERVER_ERROR.value());
try (PrintWriter out = httpServletResponse.getWriter()) {
out.prin... | java | protected final void error(final HttpServletResponse httpServletResponse, final Throwable e) {
httpServletResponse.setContentType("text/plain");
httpServletResponse.setStatus(HttpStatus.INTERNAL_SERVER_ERROR.value());
try (PrintWriter out = httpServletResponse.getWriter()) {
out.prin... | [
"protected",
"final",
"void",
"error",
"(",
"final",
"HttpServletResponse",
"httpServletResponse",
",",
"final",
"Throwable",
"e",
")",
"{",
"httpServletResponse",
".",
"setContentType",
"(",
"\"text/plain\"",
")",
";",
"httpServletResponse",
".",
"setStatus",
"(",
... | Send an error to the client with an exception.
@param httpServletResponse the http response to send the error to
@param e the error that occurred | [
"Send",
"an",
"error",
"to",
"the",
"client",
"with",
"an",
"exception",
"."
] | 25a452cb39f592bd8a53b20db1037703898e1e22 | https://github.com/mapfish/mapfish-print/blob/25a452cb39f592bd8a53b20db1037703898e1e22/core/src/main/java/org/mapfish/print/servlet/BaseMapServlet.java#L94-L103 |
159,417 | mapfish/mapfish-print | core/src/main/java/org/mapfish/print/servlet/BaseMapServlet.java | BaseMapServlet.getBaseUrl | protected final StringBuilder getBaseUrl(final HttpServletRequest httpServletRequest) {
StringBuilder baseURL = new StringBuilder();
if (httpServletRequest.getContextPath() != null && !httpServletRequest.getContextPath().isEmpty()) {
baseURL.append(httpServletRequest.getContextPath());
... | java | protected final StringBuilder getBaseUrl(final HttpServletRequest httpServletRequest) {
StringBuilder baseURL = new StringBuilder();
if (httpServletRequest.getContextPath() != null && !httpServletRequest.getContextPath().isEmpty()) {
baseURL.append(httpServletRequest.getContextPath());
... | [
"protected",
"final",
"StringBuilder",
"getBaseUrl",
"(",
"final",
"HttpServletRequest",
"httpServletRequest",
")",
"{",
"StringBuilder",
"baseURL",
"=",
"new",
"StringBuilder",
"(",
")",
";",
"if",
"(",
"httpServletRequest",
".",
"getContextPath",
"(",
")",
"!=",
... | Returns the base URL of the print servlet.
@param httpServletRequest the request | [
"Returns",
"the",
"base",
"URL",
"of",
"the",
"print",
"servlet",
"."
] | 25a452cb39f592bd8a53b20db1037703898e1e22 | https://github.com/mapfish/mapfish-print/blob/25a452cb39f592bd8a53b20db1037703898e1e22/core/src/main/java/org/mapfish/print/servlet/BaseMapServlet.java#L110-L119 |
159,418 | mapfish/mapfish-print | core/src/main/java/org/mapfish/print/processor/map/scalebar/ScalebarGraphic.java | ScalebarGraphic.getSize | @VisibleForTesting
protected static Dimension getSize(
final ScalebarAttributeValues scalebarParams,
final ScaleBarRenderSettings settings, final Dimension maxLabelSize) {
final float width;
final float height;
if (scalebarParams.getOrientation().isHorizontal()) {
... | java | @VisibleForTesting
protected static Dimension getSize(
final ScalebarAttributeValues scalebarParams,
final ScaleBarRenderSettings settings, final Dimension maxLabelSize) {
final float width;
final float height;
if (scalebarParams.getOrientation().isHorizontal()) {
... | [
"@",
"VisibleForTesting",
"protected",
"static",
"Dimension",
"getSize",
"(",
"final",
"ScalebarAttributeValues",
"scalebarParams",
",",
"final",
"ScaleBarRenderSettings",
"settings",
",",
"final",
"Dimension",
"maxLabelSize",
")",
"{",
"final",
"float",
"width",
";",
... | Get the size of the painting area required to draw the scalebar with labels.
@param scalebarParams Parameters for the scalebar.
@param settings Parameters for rendering the scalebar.
@param maxLabelSize The max. size of the labels. | [
"Get",
"the",
"size",
"of",
"the",
"painting",
"area",
"required",
"to",
"draw",
"the",
"scalebar",
"with",
"labels",
"."
] | 25a452cb39f592bd8a53b20db1037703898e1e22 | https://github.com/mapfish/mapfish-print/blob/25a452cb39f592bd8a53b20db1037703898e1e22/core/src/main/java/org/mapfish/print/processor/map/scalebar/ScalebarGraphic.java#L177-L200 |
159,419 | mapfish/mapfish-print | core/src/main/java/org/mapfish/print/processor/map/scalebar/ScalebarGraphic.java | ScalebarGraphic.getMaxLabelSize | @VisibleForTesting
protected static Dimension getMaxLabelSize(final ScaleBarRenderSettings settings) {
float maxLabelHeight = 0.0f;
float maxLabelWidth = 0.0f;
for (final Label label: settings.getLabels()) {
maxLabelHeight = Math.max(maxLabelHeight, label.getHeight());
... | java | @VisibleForTesting
protected static Dimension getMaxLabelSize(final ScaleBarRenderSettings settings) {
float maxLabelHeight = 0.0f;
float maxLabelWidth = 0.0f;
for (final Label label: settings.getLabels()) {
maxLabelHeight = Math.max(maxLabelHeight, label.getHeight());
... | [
"@",
"VisibleForTesting",
"protected",
"static",
"Dimension",
"getMaxLabelSize",
"(",
"final",
"ScaleBarRenderSettings",
"settings",
")",
"{",
"float",
"maxLabelHeight",
"=",
"0.0f",
";",
"float",
"maxLabelWidth",
"=",
"0.0f",
";",
"for",
"(",
"final",
"Label",
"l... | Get the maximum width and height of the labels.
@param settings Parameters for rendering the scalebar. | [
"Get",
"the",
"maximum",
"width",
"and",
"height",
"of",
"the",
"labels",
"."
] | 25a452cb39f592bd8a53b20db1037703898e1e22 | https://github.com/mapfish/mapfish-print/blob/25a452cb39f592bd8a53b20db1037703898e1e22/core/src/main/java/org/mapfish/print/processor/map/scalebar/ScalebarGraphic.java#L207-L216 |
159,420 | mapfish/mapfish-print | core/src/main/java/org/mapfish/print/processor/map/scalebar/ScalebarGraphic.java | ScalebarGraphic.createLabelText | @VisibleForTesting
protected static String createLabelText(
final DistanceUnit scaleUnit, final double value, final DistanceUnit intervalUnit) {
double scaledValue = scaleUnit.convertTo(value, intervalUnit);
// assume that there is no interval smaller then 0.0001
scaledValue = M... | java | @VisibleForTesting
protected static String createLabelText(
final DistanceUnit scaleUnit, final double value, final DistanceUnit intervalUnit) {
double scaledValue = scaleUnit.convertTo(value, intervalUnit);
// assume that there is no interval smaller then 0.0001
scaledValue = M... | [
"@",
"VisibleForTesting",
"protected",
"static",
"String",
"createLabelText",
"(",
"final",
"DistanceUnit",
"scaleUnit",
",",
"final",
"double",
"value",
",",
"final",
"DistanceUnit",
"intervalUnit",
")",
"{",
"double",
"scaledValue",
"=",
"scaleUnit",
".",
"convert... | Format the label text.
@param scaleUnit The unit used for the scalebar.
@param value The scale value.
@param intervalUnit The scaled unit for the intervals. | [
"Format",
"the",
"label",
"text",
"."
] | 25a452cb39f592bd8a53b20db1037703898e1e22 | https://github.com/mapfish/mapfish-print/blob/25a452cb39f592bd8a53b20db1037703898e1e22/core/src/main/java/org/mapfish/print/processor/map/scalebar/ScalebarGraphic.java#L225-L239 |
159,421 | mapfish/mapfish-print | core/src/main/java/org/mapfish/print/processor/map/scalebar/ScalebarGraphic.java | ScalebarGraphic.getNearestNiceValue | @VisibleForTesting
protected static double getNearestNiceValue(
final double value, final DistanceUnit scaleUnit, final boolean lockUnits) {
DistanceUnit bestUnit = bestUnit(scaleUnit, value, lockUnits);
double factor = scaleUnit.convertTo(1.0, bestUnit);
// nearest power of 10 ... | java | @VisibleForTesting
protected static double getNearestNiceValue(
final double value, final DistanceUnit scaleUnit, final boolean lockUnits) {
DistanceUnit bestUnit = bestUnit(scaleUnit, value, lockUnits);
double factor = scaleUnit.convertTo(1.0, bestUnit);
// nearest power of 10 ... | [
"@",
"VisibleForTesting",
"protected",
"static",
"double",
"getNearestNiceValue",
"(",
"final",
"double",
"value",
",",
"final",
"DistanceUnit",
"scaleUnit",
",",
"final",
"boolean",
"lockUnits",
")",
"{",
"DistanceUnit",
"bestUnit",
"=",
"bestUnit",
"(",
"scaleUnit... | Reduce the given value to the nearest smaller 1 significant digit number starting with 1, 2 or 5.
@param value the value to find a nice number for.
@param scaleUnit the unit of the value.
@param lockUnits if set, the values are not scaled to a "nicer" unit. | [
"Reduce",
"the",
"given",
"value",
"to",
"the",
"nearest",
"smaller",
"1",
"significant",
"digit",
"number",
"starting",
"with",
"1",
"2",
"or",
"5",
"."
] | 25a452cb39f592bd8a53b20db1037703898e1e22 | https://github.com/mapfish/mapfish-print/blob/25a452cb39f592bd8a53b20db1037703898e1e22/core/src/main/java/org/mapfish/print/processor/map/scalebar/ScalebarGraphic.java#L257-L284 |
159,422 | mapfish/mapfish-print | core/src/main/java/org/mapfish/print/processor/map/scalebar/ScalebarGraphic.java | ScalebarGraphic.getBarSize | @VisibleForTesting
protected static int getBarSize(final ScaleBarRenderSettings settings) {
if (settings.getParams().barSize != null) {
return settings.getParams().barSize;
} else {
if (settings.getParams().getOrientation().isHorizontal()) {
return settings.ge... | java | @VisibleForTesting
protected static int getBarSize(final ScaleBarRenderSettings settings) {
if (settings.getParams().barSize != null) {
return settings.getParams().barSize;
} else {
if (settings.getParams().getOrientation().isHorizontal()) {
return settings.ge... | [
"@",
"VisibleForTesting",
"protected",
"static",
"int",
"getBarSize",
"(",
"final",
"ScaleBarRenderSettings",
"settings",
")",
"{",
"if",
"(",
"settings",
".",
"getParams",
"(",
")",
".",
"barSize",
"!=",
"null",
")",
"{",
"return",
"settings",
".",
"getParams... | Get the bar size.
@param settings Parameters for rendering the scalebar. | [
"Get",
"the",
"bar",
"size",
"."
] | 25a452cb39f592bd8a53b20db1037703898e1e22 | https://github.com/mapfish/mapfish-print/blob/25a452cb39f592bd8a53b20db1037703898e1e22/core/src/main/java/org/mapfish/print/processor/map/scalebar/ScalebarGraphic.java#L333-L344 |
159,423 | mapfish/mapfish-print | core/src/main/java/org/mapfish/print/processor/map/scalebar/ScalebarGraphic.java | ScalebarGraphic.getLabelDistance | @VisibleForTesting
protected static int getLabelDistance(final ScaleBarRenderSettings settings) {
if (settings.getParams().labelDistance != null) {
return settings.getParams().labelDistance;
} else {
if (settings.getParams().getOrientation().isHorizontal()) {
... | java | @VisibleForTesting
protected static int getLabelDistance(final ScaleBarRenderSettings settings) {
if (settings.getParams().labelDistance != null) {
return settings.getParams().labelDistance;
} else {
if (settings.getParams().getOrientation().isHorizontal()) {
... | [
"@",
"VisibleForTesting",
"protected",
"static",
"int",
"getLabelDistance",
"(",
"final",
"ScaleBarRenderSettings",
"settings",
")",
"{",
"if",
"(",
"settings",
".",
"getParams",
"(",
")",
".",
"labelDistance",
"!=",
"null",
")",
"{",
"return",
"settings",
".",
... | Get the label distance..
@param settings Parameters for rendering the scalebar. | [
"Get",
"the",
"label",
"distance",
".."
] | 25a452cb39f592bd8a53b20db1037703898e1e22 | https://github.com/mapfish/mapfish-print/blob/25a452cb39f592bd8a53b20db1037703898e1e22/core/src/main/java/org/mapfish/print/processor/map/scalebar/ScalebarGraphic.java#L351-L362 |
159,424 | mapfish/mapfish-print | core/src/main/java/org/mapfish/print/processor/map/scalebar/ScalebarGraphic.java | ScalebarGraphic.render | public final URI render(
final MapfishMapContext mapContext,
final ScalebarAttributeValues scalebarParams,
final File tempFolder,
final Template template)
throws IOException, ParserConfigurationException {
final double dpi = mapContext.getDPI();
... | java | public final URI render(
final MapfishMapContext mapContext,
final ScalebarAttributeValues scalebarParams,
final File tempFolder,
final Template template)
throws IOException, ParserConfigurationException {
final double dpi = mapContext.getDPI();
... | [
"public",
"final",
"URI",
"render",
"(",
"final",
"MapfishMapContext",
"mapContext",
",",
"final",
"ScalebarAttributeValues",
"scalebarParams",
",",
"final",
"File",
"tempFolder",
",",
"final",
"Template",
"template",
")",
"throws",
"IOException",
",",
"ParserConfigur... | Render the scalebar.
@param mapContext The context of the map for which the scalebar is created.
@param scalebarParams The scalebar parameters.
@param tempFolder The directory in which the graphic file is created.
@param template The template that containts the scalebar processor | [
"Render",
"the",
"scalebar",
"."
] | 25a452cb39f592bd8a53b20db1037703898e1e22 | https://github.com/mapfish/mapfish-print/blob/25a452cb39f592bd8a53b20db1037703898e1e22/core/src/main/java/org/mapfish/print/processor/map/scalebar/ScalebarGraphic.java#L384-L461 |
159,425 | mapfish/mapfish-print | core/src/main/java/org/mapfish/print/MapPrinter.java | MapPrinter.parseSpec | public static PJsonObject parseSpec(final String spec) {
final JSONObject jsonSpec;
try {
jsonSpec = new JSONObject(spec);
} catch (JSONException e) {
throw new RuntimeException("Cannot parse the spec file: " + spec, e);
}
return new PJsonObject(jsonSpec, ... | java | public static PJsonObject parseSpec(final String spec) {
final JSONObject jsonSpec;
try {
jsonSpec = new JSONObject(spec);
} catch (JSONException e) {
throw new RuntimeException("Cannot parse the spec file: " + spec, e);
}
return new PJsonObject(jsonSpec, ... | [
"public",
"static",
"PJsonObject",
"parseSpec",
"(",
"final",
"String",
"spec",
")",
"{",
"final",
"JSONObject",
"jsonSpec",
";",
"try",
"{",
"jsonSpec",
"=",
"new",
"JSONObject",
"(",
"spec",
")",
";",
"}",
"catch",
"(",
"JSONException",
"e",
")",
"{",
... | Parse the JSON string and return the object. The string is expected to be the JSON print data from the
client.
@param spec the JSON formatted string.
@return The encapsulated JSON object | [
"Parse",
"the",
"JSON",
"string",
"and",
"return",
"the",
"object",
".",
"The",
"string",
"is",
"expected",
"to",
"be",
"the",
"JSON",
"print",
"data",
"from",
"the",
"client",
"."
] | 25a452cb39f592bd8a53b20db1037703898e1e22 | https://github.com/mapfish/mapfish-print/blob/25a452cb39f592bd8a53b20db1037703898e1e22/core/src/main/java/org/mapfish/print/MapPrinter.java#L54-L62 |
159,426 | mapfish/mapfish-print | core/src/main/java/org/mapfish/print/MapPrinter.java | MapPrinter.getOutputFormat | public final OutputFormat getOutputFormat(final PJsonObject specJson) {
final String format = specJson.getString(MapPrinterServlet.JSON_OUTPUT_FORMAT);
final boolean mapExport =
this.configuration.getTemplate(specJson.getString(Constants.JSON_LAYOUT_KEY)).isMapExport();
final Str... | java | public final OutputFormat getOutputFormat(final PJsonObject specJson) {
final String format = specJson.getString(MapPrinterServlet.JSON_OUTPUT_FORMAT);
final boolean mapExport =
this.configuration.getTemplate(specJson.getString(Constants.JSON_LAYOUT_KEY)).isMapExport();
final Str... | [
"public",
"final",
"OutputFormat",
"getOutputFormat",
"(",
"final",
"PJsonObject",
"specJson",
")",
"{",
"final",
"String",
"format",
"=",
"specJson",
".",
"getString",
"(",
"MapPrinterServlet",
".",
"JSON_OUTPUT_FORMAT",
")",
";",
"final",
"boolean",
"mapExport",
... | Get the object responsible for printing to the correct output format.
@param specJson the request json from the client | [
"Get",
"the",
"object",
"responsible",
"for",
"printing",
"to",
"the",
"correct",
"output",
"format",
"."
] | 25a452cb39f592bd8a53b20db1037703898e1e22 | https://github.com/mapfish/mapfish-print/blob/25a452cb39f592bd8a53b20db1037703898e1e22/core/src/main/java/org/mapfish/print/MapPrinter.java#L104-L117 |
159,427 | mapfish/mapfish-print | core/src/main/java/org/mapfish/print/MapPrinter.java | MapPrinter.print | public final Processor.ExecutionContext print(
final String jobId, final PJsonObject specJson, final OutputStream out)
throws Exception {
final OutputFormat format = getOutputFormat(specJson);
final File taskDirectory = this.workingDirectories.getTaskDirectory();
try {
... | java | public final Processor.ExecutionContext print(
final String jobId, final PJsonObject specJson, final OutputStream out)
throws Exception {
final OutputFormat format = getOutputFormat(specJson);
final File taskDirectory = this.workingDirectories.getTaskDirectory();
try {
... | [
"public",
"final",
"Processor",
".",
"ExecutionContext",
"print",
"(",
"final",
"String",
"jobId",
",",
"final",
"PJsonObject",
"specJson",
",",
"final",
"OutputStream",
"out",
")",
"throws",
"Exception",
"{",
"final",
"OutputFormat",
"format",
"=",
"getOutputForm... | Start a print.
@param jobId the job ID
@param specJson the client json request.
@param out the stream to write to. | [
"Start",
"a",
"print",
"."
] | 25a452cb39f592bd8a53b20db1037703898e1e22 | https://github.com/mapfish/mapfish-print/blob/25a452cb39f592bd8a53b20db1037703898e1e22/core/src/main/java/org/mapfish/print/MapPrinter.java#L126-L138 |
159,428 | mapfish/mapfish-print | core/src/main/java/org/mapfish/print/MapPrinter.java | MapPrinter.getOutputFormatsNames | public final Set<String> getOutputFormatsNames() {
SortedSet<String> formats = new TreeSet<>();
for (String formatBeanName: this.outputFormat.keySet()) {
int endingIndex = formatBeanName.indexOf(MAP_OUTPUT_FORMAT_BEAN_NAME_ENDING);
if (endingIndex < 0) {
endingInd... | java | public final Set<String> getOutputFormatsNames() {
SortedSet<String> formats = new TreeSet<>();
for (String formatBeanName: this.outputFormat.keySet()) {
int endingIndex = formatBeanName.indexOf(MAP_OUTPUT_FORMAT_BEAN_NAME_ENDING);
if (endingIndex < 0) {
endingInd... | [
"public",
"final",
"Set",
"<",
"String",
">",
"getOutputFormatsNames",
"(",
")",
"{",
"SortedSet",
"<",
"String",
">",
"formats",
"=",
"new",
"TreeSet",
"<>",
"(",
")",
";",
"for",
"(",
"String",
"formatBeanName",
":",
"this",
".",
"outputFormat",
".",
"... | Return the available format ids. | [
"Return",
"the",
"available",
"format",
"ids",
"."
] | 25a452cb39f592bd8a53b20db1037703898e1e22 | https://github.com/mapfish/mapfish-print/blob/25a452cb39f592bd8a53b20db1037703898e1e22/core/src/main/java/org/mapfish/print/MapPrinter.java#L143-L153 |
159,429 | mapfish/mapfish-print | core/src/main/java/org/mapfish/print/attribute/map/MapBounds.java | MapBounds.getNearestScale | public Scale getNearestScale(
final ZoomLevels zoomLevels,
final double tolerance,
final ZoomLevelSnapStrategy zoomLevelSnapStrategy,
final boolean geodetic,
final Rectangle paintArea,
final double dpi) {
final Scale scale = getScale(paint... | java | public Scale getNearestScale(
final ZoomLevels zoomLevels,
final double tolerance,
final ZoomLevelSnapStrategy zoomLevelSnapStrategy,
final boolean geodetic,
final Rectangle paintArea,
final double dpi) {
final Scale scale = getScale(paint... | [
"public",
"Scale",
"getNearestScale",
"(",
"final",
"ZoomLevels",
"zoomLevels",
",",
"final",
"double",
"tolerance",
",",
"final",
"ZoomLevelSnapStrategy",
"zoomLevelSnapStrategy",
",",
"final",
"boolean",
"geodetic",
",",
"final",
"Rectangle",
"paintArea",
",",
"fina... | Get the nearest scale.
@param zoomLevels the list of Zoom Levels.
@param tolerance the tolerance to use when considering if two values are equal. For example if
12.0 == 12.001. The tolerance is a percentage.
@param zoomLevelSnapStrategy the strategy to use for snapping to the nearest zoom level.
@param geodetic snap t... | [
"Get",
"the",
"nearest",
"scale",
"."
] | 25a452cb39f592bd8a53b20db1037703898e1e22 | https://github.com/mapfish/mapfish-print/blob/25a452cb39f592bd8a53b20db1037703898e1e22/core/src/main/java/org/mapfish/print/attribute/map/MapBounds.java#L87-L122 |
159,430 | mapfish/mapfish-print | core/src/main/java/org/mapfish/print/servlet/job/impl/hibernate/HibernateJobQueue.java | HibernateJobQueue.init | @PostConstruct
public final void init() {
this.cleanUpTimer = Executors.newScheduledThreadPool(1, timerTask -> {
final Thread thread = new Thread(timerTask, "Clean up old job records");
thread.setDaemon(true);
return thread;
});
this.cleanUpTimer.scheduleA... | java | @PostConstruct
public final void init() {
this.cleanUpTimer = Executors.newScheduledThreadPool(1, timerTask -> {
final Thread thread = new Thread(timerTask, "Clean up old job records");
thread.setDaemon(true);
return thread;
});
this.cleanUpTimer.scheduleA... | [
"@",
"PostConstruct",
"public",
"final",
"void",
"init",
"(",
")",
"{",
"this",
".",
"cleanUpTimer",
"=",
"Executors",
".",
"newScheduledThreadPool",
"(",
"1",
",",
"timerTask",
"->",
"{",
"final",
"Thread",
"thread",
"=",
"new",
"Thread",
"(",
"timerTask",
... | Called by spring on initialization. | [
"Called",
"by",
"spring",
"on",
"initialization",
"."
] | 25a452cb39f592bd8a53b20db1037703898e1e22 | https://github.com/mapfish/mapfish-print/blob/25a452cb39f592bd8a53b20db1037703898e1e22/core/src/main/java/org/mapfish/print/servlet/job/impl/hibernate/HibernateJobQueue.java#L200-L209 |
159,431 | mapfish/mapfish-print | core/src/main/java/org/mapfish/print/parser/ParserUtils.java | ParserUtils.getAllAttributes | public static Collection<Field> getAllAttributes(final Class<?> classToInspect) {
Set<Field> allFields = new HashSet<>();
getAllAttributes(classToInspect, allFields, Function.identity(), field -> true);
return allFields;
} | java | public static Collection<Field> getAllAttributes(final Class<?> classToInspect) {
Set<Field> allFields = new HashSet<>();
getAllAttributes(classToInspect, allFields, Function.identity(), field -> true);
return allFields;
} | [
"public",
"static",
"Collection",
"<",
"Field",
">",
"getAllAttributes",
"(",
"final",
"Class",
"<",
"?",
">",
"classToInspect",
")",
"{",
"Set",
"<",
"Field",
">",
"allFields",
"=",
"new",
"HashSet",
"<>",
"(",
")",
";",
"getAllAttributes",
"(",
"classToI... | Inspects the object and all superclasses for public, non-final, accessible methods and returns a
collection containing all the attributes found.
@param classToInspect the class under inspection. | [
"Inspects",
"the",
"object",
"and",
"all",
"superclasses",
"for",
"public",
"non",
"-",
"final",
"accessible",
"methods",
"and",
"returns",
"a",
"collection",
"containing",
"all",
"the",
"attributes",
"found",
"."
] | 25a452cb39f592bd8a53b20db1037703898e1e22 | https://github.com/mapfish/mapfish-print/blob/25a452cb39f592bd8a53b20db1037703898e1e22/core/src/main/java/org/mapfish/print/parser/ParserUtils.java#L56-L60 |
159,432 | mapfish/mapfish-print | core/src/main/java/org/mapfish/print/parser/ParserUtils.java | ParserUtils.getAttributes | public static Collection<Field> getAttributes(
final Class<?> classToInspect, final Predicate<Field> filter) {
Set<Field> allFields = new HashSet<>();
getAllAttributes(classToInspect, allFields, Function.identity(), filter);
return allFields;
} | java | public static Collection<Field> getAttributes(
final Class<?> classToInspect, final Predicate<Field> filter) {
Set<Field> allFields = new HashSet<>();
getAllAttributes(classToInspect, allFields, Function.identity(), filter);
return allFields;
} | [
"public",
"static",
"Collection",
"<",
"Field",
">",
"getAttributes",
"(",
"final",
"Class",
"<",
"?",
">",
"classToInspect",
",",
"final",
"Predicate",
"<",
"Field",
">",
"filter",
")",
"{",
"Set",
"<",
"Field",
">",
"allFields",
"=",
"new",
"HashSet",
... | Get a subset of the attributes of the provided class. An attribute is each public field in the class
or super class.
@param classToInspect the class to inspect
@param filter a predicate that returns true when a attribute should be kept in resulting
collection. | [
"Get",
"a",
"subset",
"of",
"the",
"attributes",
"of",
"the",
"provided",
"class",
".",
"An",
"attribute",
"is",
"each",
"public",
"field",
"in",
"the",
"class",
"or",
"super",
"class",
"."
] | 25a452cb39f592bd8a53b20db1037703898e1e22 | https://github.com/mapfish/mapfish-print/blob/25a452cb39f592bd8a53b20db1037703898e1e22/core/src/main/java/org/mapfish/print/parser/ParserUtils.java#L70-L75 |
159,433 | mapfish/mapfish-print | core/src/main/java/org/mapfish/print/processor/map/NorthArrowGraphic.java | NorthArrowGraphic.createRaster | private static URI createRaster(
final Dimension targetSize, final RasterReference rasterReference,
final Double rotation, final Color backgroundColor,
final File workingDir) throws IOException {
final File path = File.createTempFile("north-arrow-", ".png", workingDir);
... | java | private static URI createRaster(
final Dimension targetSize, final RasterReference rasterReference,
final Double rotation, final Color backgroundColor,
final File workingDir) throws IOException {
final File path = File.createTempFile("north-arrow-", ".png", workingDir);
... | [
"private",
"static",
"URI",
"createRaster",
"(",
"final",
"Dimension",
"targetSize",
",",
"final",
"RasterReference",
"rasterReference",
",",
"final",
"Double",
"rotation",
",",
"final",
"Color",
"backgroundColor",
",",
"final",
"File",
"workingDir",
")",
"throws",
... | Renders a given graphic into a new image, scaled to fit the new size and rotated. | [
"Renders",
"a",
"given",
"graphic",
"into",
"a",
"new",
"image",
"scaled",
"to",
"fit",
"the",
"new",
"size",
"and",
"rotated",
"."
] | 25a452cb39f592bd8a53b20db1037703898e1e22 | https://github.com/mapfish/mapfish-print/blob/25a452cb39f592bd8a53b20db1037703898e1e22/core/src/main/java/org/mapfish/print/processor/map/NorthArrowGraphic.java#L113-L171 |
159,434 | mapfish/mapfish-print | core/src/main/java/org/mapfish/print/processor/map/NorthArrowGraphic.java | NorthArrowGraphic.createSvg | private static URI createSvg(
final Dimension targetSize,
final RasterReference rasterReference, final Double rotation,
final Color backgroundColor, final File workingDir)
throws IOException {
// load SVG graphic
final SVGElement svgRoot = parseSvg(rasterR... | java | private static URI createSvg(
final Dimension targetSize,
final RasterReference rasterReference, final Double rotation,
final Color backgroundColor, final File workingDir)
throws IOException {
// load SVG graphic
final SVGElement svgRoot = parseSvg(rasterR... | [
"private",
"static",
"URI",
"createSvg",
"(",
"final",
"Dimension",
"targetSize",
",",
"final",
"RasterReference",
"rasterReference",
",",
"final",
"Double",
"rotation",
",",
"final",
"Color",
"backgroundColor",
",",
"final",
"File",
"workingDir",
")",
"throws",
"... | With the Batik SVG library it is only possible to create new SVG graphics, but you can not modify an
existing graphic. So, we are loading the SVG file as plain XML and doing the modifications by hand. | [
"With",
"the",
"Batik",
"SVG",
"library",
"it",
"is",
"only",
"possible",
"to",
"create",
"new",
"SVG",
"graphics",
"but",
"you",
"can",
"not",
"modify",
"an",
"existing",
"graphic",
".",
"So",
"we",
"are",
"loading",
"the",
"SVG",
"file",
"as",
"plain",... | 25a452cb39f592bd8a53b20db1037703898e1e22 | https://github.com/mapfish/mapfish-print/blob/25a452cb39f592bd8a53b20db1037703898e1e22/core/src/main/java/org/mapfish/print/processor/map/NorthArrowGraphic.java#L177-L197 |
159,435 | mapfish/mapfish-print | core/src/main/java/org/mapfish/print/processor/map/NorthArrowGraphic.java | NorthArrowGraphic.embedSvgGraphic | private static void embedSvgGraphic(
final SVGElement svgRoot,
final SVGElement newSvgRoot, final Document newDocument,
final Dimension targetSize, final Double rotation) {
final String originalWidth = svgRoot.getAttributeNS(null, "width");
final String originalHeight... | java | private static void embedSvgGraphic(
final SVGElement svgRoot,
final SVGElement newSvgRoot, final Document newDocument,
final Dimension targetSize, final Double rotation) {
final String originalWidth = svgRoot.getAttributeNS(null, "width");
final String originalHeight... | [
"private",
"static",
"void",
"embedSvgGraphic",
"(",
"final",
"SVGElement",
"svgRoot",
",",
"final",
"SVGElement",
"newSvgRoot",
",",
"final",
"Document",
"newDocument",
",",
"final",
"Dimension",
"targetSize",
",",
"final",
"Double",
"rotation",
")",
"{",
"final"... | Embeds the given SVG element into a new SVG element scaling the graphic to the given dimension and
applying the given rotation. | [
"Embeds",
"the",
"given",
"SVG",
"element",
"into",
"a",
"new",
"SVG",
"element",
"scaling",
"the",
"graphic",
"to",
"the",
"given",
"dimension",
"and",
"applying",
"the",
"given",
"rotation",
"."
] | 25a452cb39f592bd8a53b20db1037703898e1e22 | https://github.com/mapfish/mapfish-print/blob/25a452cb39f592bd8a53b20db1037703898e1e22/core/src/main/java/org/mapfish/print/processor/map/NorthArrowGraphic.java#L218-L297 |
159,436 | mapfish/mapfish-print | core/src/main/java/org/mapfish/print/processor/jasper/JasperReportBuilder.java | JasperReportBuilder.setDirectory | public void setDirectory(final String directory) {
this.directory = new File(this.configuration.getDirectory(), directory);
if (!this.directory.exists()) {
throw new IllegalArgumentException(String.format(
"Directory does not exist: %s.\n" +
"C... | java | public void setDirectory(final String directory) {
this.directory = new File(this.configuration.getDirectory(), directory);
if (!this.directory.exists()) {
throw new IllegalArgumentException(String.format(
"Directory does not exist: %s.\n" +
"C... | [
"public",
"void",
"setDirectory",
"(",
"final",
"String",
"directory",
")",
"{",
"this",
".",
"directory",
"=",
"new",
"File",
"(",
"this",
".",
"configuration",
".",
"getDirectory",
"(",
")",
",",
"directory",
")",
";",
"if",
"(",
"!",
"this",
".",
"d... | Set the directory and test that the directory exists and is contained within the Configuration
directory.
@param directory the new directory | [
"Set",
"the",
"directory",
"and",
"test",
"that",
"the",
"directory",
"exists",
"and",
"is",
"contained",
"within",
"the",
"Configuration",
"directory",
"."
] | 25a452cb39f592bd8a53b20db1037703898e1e22 | https://github.com/mapfish/mapfish-print/blob/25a452cb39f592bd8a53b20db1037703898e1e22/core/src/main/java/org/mapfish/print/processor/jasper/JasperReportBuilder.java#L149-L167 |
159,437 | mapfish/mapfish-print | core/src/main/java/org/mapfish/print/processor/map/CreateMapPagesProcessor.java | CreateMapPagesProcessor.setAttribute | public void setAttribute(final String name, final Attribute attribute) {
if (name.equals(MAP_KEY)) {
this.mapAttribute = (MapAttribute) attribute;
}
} | java | public void setAttribute(final String name, final Attribute attribute) {
if (name.equals(MAP_KEY)) {
this.mapAttribute = (MapAttribute) attribute;
}
} | [
"public",
"void",
"setAttribute",
"(",
"final",
"String",
"name",
",",
"final",
"Attribute",
"attribute",
")",
"{",
"if",
"(",
"name",
".",
"equals",
"(",
"MAP_KEY",
")",
")",
"{",
"this",
".",
"mapAttribute",
"=",
"(",
"MapAttribute",
")",
"attribute",
... | Set the map attribute.
@param name the attribute name
@param attribute the attribute | [
"Set",
"the",
"map",
"attribute",
"."
] | 25a452cb39f592bd8a53b20db1037703898e1e22 | https://github.com/mapfish/mapfish-print/blob/25a452cb39f592bd8a53b20db1037703898e1e22/core/src/main/java/org/mapfish/print/processor/map/CreateMapPagesProcessor.java#L214-L218 |
159,438 | mapfish/mapfish-print | core/src/main/java/org/mapfish/print/processor/map/CreateMapPagesProcessor.java | CreateMapPagesProcessor.getAttributes | public Map<String, Attribute> getAttributes() {
Map<String, Attribute> result = new HashMap<>();
DataSourceAttribute datasourceAttribute = new DataSourceAttribute();
Map<String, Attribute> dsResult = new HashMap<>();
dsResult.put(MAP_KEY, this.mapAttribute);
datasourceAttribute.s... | java | public Map<String, Attribute> getAttributes() {
Map<String, Attribute> result = new HashMap<>();
DataSourceAttribute datasourceAttribute = new DataSourceAttribute();
Map<String, Attribute> dsResult = new HashMap<>();
dsResult.put(MAP_KEY, this.mapAttribute);
datasourceAttribute.s... | [
"public",
"Map",
"<",
"String",
",",
"Attribute",
">",
"getAttributes",
"(",
")",
"{",
"Map",
"<",
"String",
",",
"Attribute",
">",
"result",
"=",
"new",
"HashMap",
"<>",
"(",
")",
";",
"DataSourceAttribute",
"datasourceAttribute",
"=",
"new",
"DataSourceAtt... | Gets the attributes provided by the processor.
@return the attributes | [
"Gets",
"the",
"attributes",
"provided",
"by",
"the",
"processor",
"."
] | 25a452cb39f592bd8a53b20db1037703898e1e22 | https://github.com/mapfish/mapfish-print/blob/25a452cb39f592bd8a53b20db1037703898e1e22/core/src/main/java/org/mapfish/print/processor/map/CreateMapPagesProcessor.java#L225-L233 |
159,439 | mapfish/mapfish-print | core/src/main/java/org/mapfish/print/config/Template.java | Template.printClientConfig | public final void printClientConfig(final JSONWriter json) throws JSONException {
json.key("attributes");
json.array();
for (Map.Entry<String, Attribute> entry: this.attributes.entrySet()) {
Attribute attribute = entry.getValue();
if (attribute.getClass().getAnnotation(In... | java | public final void printClientConfig(final JSONWriter json) throws JSONException {
json.key("attributes");
json.array();
for (Map.Entry<String, Attribute> entry: this.attributes.entrySet()) {
Attribute attribute = entry.getValue();
if (attribute.getClass().getAnnotation(In... | [
"public",
"final",
"void",
"printClientConfig",
"(",
"final",
"JSONWriter",
"json",
")",
"throws",
"JSONException",
"{",
"json",
".",
"key",
"(",
"\"attributes\"",
")",
";",
"json",
".",
"array",
"(",
")",
";",
"for",
"(",
"Map",
".",
"Entry",
"<",
"Stri... | Print out the template information that the client needs for performing a request.
@param json the writer to write the information to. | [
"Print",
"out",
"the",
"template",
"information",
"that",
"the",
"client",
"needs",
"for",
"performing",
"a",
"request",
"."
] | 25a452cb39f592bd8a53b20db1037703898e1e22 | https://github.com/mapfish/mapfish-print/blob/25a452cb39f592bd8a53b20db1037703898e1e22/core/src/main/java/org/mapfish/print/config/Template.java#L115-L127 |
159,440 | mapfish/mapfish-print | core/src/main/java/org/mapfish/print/config/Template.java | Template.setAttributes | public final void setAttributes(final Map<String, Attribute> attributes) {
for (Map.Entry<String, Attribute> entry: attributes.entrySet()) {
Object attribute = entry.getValue();
if (!(attribute instanceof Attribute)) {
final String msg =
"Attribute... | java | public final void setAttributes(final Map<String, Attribute> attributes) {
for (Map.Entry<String, Attribute> entry: attributes.entrySet()) {
Object attribute = entry.getValue();
if (!(attribute instanceof Attribute)) {
final String msg =
"Attribute... | [
"public",
"final",
"void",
"setAttributes",
"(",
"final",
"Map",
"<",
"String",
",",
"Attribute",
">",
"attributes",
")",
"{",
"for",
"(",
"Map",
".",
"Entry",
"<",
"String",
",",
"Attribute",
">",
"entry",
":",
"attributes",
".",
"entrySet",
"(",
")",
... | Set the attributes for this template.
@param attributes the attribute map | [
"Set",
"the",
"attributes",
"for",
"this",
"template",
"."
] | 25a452cb39f592bd8a53b20db1037703898e1e22 | https://github.com/mapfish/mapfish-print/blob/25a452cb39f592bd8a53b20db1037703898e1e22/core/src/main/java/org/mapfish/print/config/Template.java#L138-L151 |
159,441 | mapfish/mapfish-print | core/src/main/java/org/mapfish/print/config/Template.java | Template.getProcessorGraph | public final ProcessorDependencyGraph getProcessorGraph() {
if (this.processorGraph == null) {
synchronized (this) {
if (this.processorGraph == null) {
final Map<String, Class<?>> attcls = new HashMap<>();
for (Map.Entry<String, Attribute> attr... | java | public final ProcessorDependencyGraph getProcessorGraph() {
if (this.processorGraph == null) {
synchronized (this) {
if (this.processorGraph == null) {
final Map<String, Class<?>> attcls = new HashMap<>();
for (Map.Entry<String, Attribute> attr... | [
"public",
"final",
"ProcessorDependencyGraph",
"getProcessorGraph",
"(",
")",
"{",
"if",
"(",
"this",
".",
"processorGraph",
"==",
"null",
")",
"{",
"synchronized",
"(",
"this",
")",
"{",
"if",
"(",
"this",
".",
"processorGraph",
"==",
"null",
")",
"{",
"f... | Get the processor graph to use for executing all the processors for the template.
@return the processor graph. | [
"Get",
"the",
"processor",
"graph",
"to",
"use",
"for",
"executing",
"all",
"the",
"processors",
"for",
"the",
"template",
"."
] | 25a452cb39f592bd8a53b20db1037703898e1e22 | https://github.com/mapfish/mapfish-print/blob/25a452cb39f592bd8a53b20db1037703898e1e22/core/src/main/java/org/mapfish/print/config/Template.java#L228-L241 |
159,442 | mapfish/mapfish-print | core/src/main/java/org/mapfish/print/config/Template.java | Template.getStyle | @SuppressWarnings("unchecked")
@Nonnull
public final java.util.Optional<Style> getStyle(final String styleName) {
final String styleRef = this.styles.get(styleName);
Optional<Style> style;
if (styleRef != null) {
style = (Optional<Style>) this.styleParser
... | java | @SuppressWarnings("unchecked")
@Nonnull
public final java.util.Optional<Style> getStyle(final String styleName) {
final String styleRef = this.styles.get(styleName);
Optional<Style> style;
if (styleRef != null) {
style = (Optional<Style>) this.styleParser
... | [
"@",
"SuppressWarnings",
"(",
"\"unchecked\"",
")",
"@",
"Nonnull",
"public",
"final",
"java",
".",
"util",
".",
"Optional",
"<",
"Style",
">",
"getStyle",
"(",
"final",
"String",
"styleName",
")",
"{",
"final",
"String",
"styleRef",
"=",
"this",
".",
"sty... | Look for a style in the named styles provided in the configuration.
@param styleName the name of the style to look for. | [
"Look",
"for",
"a",
"style",
"in",
"the",
"named",
"styles",
"provided",
"in",
"the",
"configuration",
"."
] | 25a452cb39f592bd8a53b20db1037703898e1e22 | https://github.com/mapfish/mapfish-print/blob/25a452cb39f592bd8a53b20db1037703898e1e22/core/src/main/java/org/mapfish/print/config/Template.java#L257-L269 |
159,443 | mapfish/mapfish-print | core/src/main/java/org/mapfish/print/metrics/JvmMetricsConfigurator.java | JvmMetricsConfigurator.init | @PostConstruct
public void init() {
this.metricRegistry.register(name("gc"), new GarbageCollectorMetricSet());
this.metricRegistry.register(name("memory"), new MemoryUsageGaugeSet());
this.metricRegistry.register(name("thread-states"), new ThreadStatesGaugeSet());
this.metricRegistry... | java | @PostConstruct
public void init() {
this.metricRegistry.register(name("gc"), new GarbageCollectorMetricSet());
this.metricRegistry.register(name("memory"), new MemoryUsageGaugeSet());
this.metricRegistry.register(name("thread-states"), new ThreadStatesGaugeSet());
this.metricRegistry... | [
"@",
"PostConstruct",
"public",
"void",
"init",
"(",
")",
"{",
"this",
".",
"metricRegistry",
".",
"register",
"(",
"name",
"(",
"\"gc\"",
")",
",",
"new",
"GarbageCollectorMetricSet",
"(",
")",
")",
";",
"this",
".",
"metricRegistry",
".",
"register",
"("... | Add several jvm metrics. | [
"Add",
"several",
"jvm",
"metrics",
"."
] | 25a452cb39f592bd8a53b20db1037703898e1e22 | https://github.com/mapfish/mapfish-print/blob/25a452cb39f592bd8a53b20db1037703898e1e22/core/src/main/java/org/mapfish/print/metrics/JvmMetricsConfigurator.java#L23-L29 |
159,444 | mapfish/mapfish-print | core/src/main/java/org/mapfish/print/map/image/wms/WmsLayerParam.java | WmsLayerParam.postConstruct | public void postConstruct() throws URISyntaxException {
WmsVersion.lookup(this.version);
Assert.isTrue(validateBaseUrl(), "invalid baseURL");
Assert.isTrue(this.layers.length > 0, "There must be at least one layer defined for a WMS request" +
" to make sense");
// OpenL... | java | public void postConstruct() throws URISyntaxException {
WmsVersion.lookup(this.version);
Assert.isTrue(validateBaseUrl(), "invalid baseURL");
Assert.isTrue(this.layers.length > 0, "There must be at least one layer defined for a WMS request" +
" to make sense");
// OpenL... | [
"public",
"void",
"postConstruct",
"(",
")",
"throws",
"URISyntaxException",
"{",
"WmsVersion",
".",
"lookup",
"(",
"this",
".",
"version",
")",
";",
"Assert",
".",
"isTrue",
"(",
"validateBaseUrl",
"(",
")",
",",
"\"invalid baseURL\"",
")",
";",
"Assert",
"... | Validate some of the properties of this layer. | [
"Validate",
"some",
"of",
"the",
"properties",
"of",
"this",
"layer",
"."
] | 25a452cb39f592bd8a53b20db1037703898e1e22 | https://github.com/mapfish/mapfish-print/blob/25a452cb39f592bd8a53b20db1037703898e1e22/core/src/main/java/org/mapfish/print/map/image/wms/WmsLayerParam.java#L109-L136 |
159,445 | mapfish/mapfish-print | core/src/main/java/org/mapfish/print/map/tiled/TileCacheInformation.java | TileCacheInformation.createBufferedImage | @Nonnull
public BufferedImage createBufferedImage(final int imageWidth, final int imageHeight) {
return new BufferedImage(imageWidth, imageHeight, BufferedImage.TYPE_4BYTE_ABGR);
} | java | @Nonnull
public BufferedImage createBufferedImage(final int imageWidth, final int imageHeight) {
return new BufferedImage(imageWidth, imageHeight, BufferedImage.TYPE_4BYTE_ABGR);
} | [
"@",
"Nonnull",
"public",
"BufferedImage",
"createBufferedImage",
"(",
"final",
"int",
"imageWidth",
",",
"final",
"int",
"imageHeight",
")",
"{",
"return",
"new",
"BufferedImage",
"(",
"imageWidth",
",",
"imageHeight",
",",
"BufferedImage",
".",
"TYPE_4BYTE_ABGR",
... | Create a buffered image with the correct image bands etc... for the tiles being loaded.
@param imageWidth width of the image to create
@param imageHeight height of the image to create. | [
"Create",
"a",
"buffered",
"image",
"with",
"the",
"correct",
"image",
"bands",
"etc",
"...",
"for",
"the",
"tiles",
"being",
"loaded",
"."
] | 25a452cb39f592bd8a53b20db1037703898e1e22 | https://github.com/mapfish/mapfish-print/blob/25a452cb39f592bd8a53b20db1037703898e1e22/core/src/main/java/org/mapfish/print/map/tiled/TileCacheInformation.java#L134-L137 |
159,446 | mapfish/mapfish-print | core/src/main/java/org/mapfish/print/config/PDFConfig.java | PDFConfig.setKeywords | public void setKeywords(final List<String> keywords) {
StringBuilder builder = new StringBuilder();
for (String keyword: keywords) {
if (builder.length() > 0) {
builder.append(',');
}
builder.append(keyword.trim());
}
this.keywords = Op... | java | public void setKeywords(final List<String> keywords) {
StringBuilder builder = new StringBuilder();
for (String keyword: keywords) {
if (builder.length() > 0) {
builder.append(',');
}
builder.append(keyword.trim());
}
this.keywords = Op... | [
"public",
"void",
"setKeywords",
"(",
"final",
"List",
"<",
"String",
">",
"keywords",
")",
"{",
"StringBuilder",
"builder",
"=",
"new",
"StringBuilder",
"(",
")",
";",
"for",
"(",
"String",
"keyword",
":",
"keywords",
")",
"{",
"if",
"(",
"builder",
"."... | The keywords to include in the PDF metadata.
@param keywords the keywords of the PDF. | [
"The",
"keywords",
"to",
"include",
"in",
"the",
"PDF",
"metadata",
"."
] | 25a452cb39f592bd8a53b20db1037703898e1e22 | https://github.com/mapfish/mapfish-print/blob/25a452cb39f592bd8a53b20db1037703898e1e22/core/src/main/java/org/mapfish/print/config/PDFConfig.java#L103-L112 |
159,447 | mapfish/mapfish-print | core/src/main/java/org/mapfish/print/config/S3ReportStorage.java | S3ReportStorage.getKey | protected String getKey(final String ref, final String filename, final String extension) {
return prefix + ref + "/" + filename + "." + extension;
} | java | protected String getKey(final String ref, final String filename, final String extension) {
return prefix + ref + "/" + filename + "." + extension;
} | [
"protected",
"String",
"getKey",
"(",
"final",
"String",
"ref",
",",
"final",
"String",
"filename",
",",
"final",
"String",
"extension",
")",
"{",
"return",
"prefix",
"+",
"ref",
"+",
"\"/\"",
"+",
"filename",
"+",
"\".\"",
"+",
"extension",
";",
"}"
] | Compute the key to use.
@param ref The reference number.
@param filename The filename.
@param extension The file extension. | [
"Compute",
"the",
"key",
"to",
"use",
"."
] | 25a452cb39f592bd8a53b20db1037703898e1e22 | https://github.com/mapfish/mapfish-print/blob/25a452cb39f592bd8a53b20db1037703898e1e22/core/src/main/java/org/mapfish/print/config/S3ReportStorage.java#L125-L127 |
159,448 | mapfish/mapfish-print | core/src/main/java/org/mapfish/print/processor/jasper/TableProcessor.java | TableProcessor.tryConvert | private Object tryConvert(
final MfClientHttpRequestFactory clientHttpRequestFactory,
final Object rowValue) throws URISyntaxException, IOException {
if (this.converters.isEmpty()) {
return rowValue;
}
String value = String.valueOf(rowValue);
for (Tab... | java | private Object tryConvert(
final MfClientHttpRequestFactory clientHttpRequestFactory,
final Object rowValue) throws URISyntaxException, IOException {
if (this.converters.isEmpty()) {
return rowValue;
}
String value = String.valueOf(rowValue);
for (Tab... | [
"private",
"Object",
"tryConvert",
"(",
"final",
"MfClientHttpRequestFactory",
"clientHttpRequestFactory",
",",
"final",
"Object",
"rowValue",
")",
"throws",
"URISyntaxException",
",",
"IOException",
"{",
"if",
"(",
"this",
".",
"converters",
".",
"isEmpty",
"(",
")... | If converters are set on a table, this function tests if these can convert a cell value. The first
converter, which claims that it can convert, will be used to do the conversion. | [
"If",
"converters",
"are",
"set",
"on",
"a",
"table",
"this",
"function",
"tests",
"if",
"these",
"can",
"convert",
"a",
"cell",
"value",
".",
"The",
"first",
"converter",
"which",
"claims",
"that",
"it",
"can",
"convert",
"will",
"be",
"used",
"to",
"do... | 25a452cb39f592bd8a53b20db1037703898e1e22 | https://github.com/mapfish/mapfish-print/blob/25a452cb39f592bd8a53b20db1037703898e1e22/core/src/main/java/org/mapfish/print/processor/jasper/TableProcessor.java#L308-L323 |
159,449 | mapfish/mapfish-print | core/src/main/java/org/mapfish/print/wrapper/json/PJsonObject.java | PJsonObject.optInt | @Override
public final Integer optInt(final String key) {
final int result = this.obj.optInt(key, Integer.MIN_VALUE);
return result == Integer.MIN_VALUE ? null : result;
} | java | @Override
public final Integer optInt(final String key) {
final int result = this.obj.optInt(key, Integer.MIN_VALUE);
return result == Integer.MIN_VALUE ? null : result;
} | [
"@",
"Override",
"public",
"final",
"Integer",
"optInt",
"(",
"final",
"String",
"key",
")",
"{",
"final",
"int",
"result",
"=",
"this",
".",
"obj",
".",
"optInt",
"(",
"key",
",",
"Integer",
".",
"MIN_VALUE",
")",
";",
"return",
"result",
"==",
"Integ... | Get a property as a int or null.
@param key the property name | [
"Get",
"a",
"property",
"as",
"a",
"int",
"or",
"null",
"."
] | 25a452cb39f592bd8a53b20db1037703898e1e22 | https://github.com/mapfish/mapfish-print/blob/25a452cb39f592bd8a53b20db1037703898e1e22/core/src/main/java/org/mapfish/print/wrapper/json/PJsonObject.java#L61-L65 |
159,450 | mapfish/mapfish-print | core/src/main/java/org/mapfish/print/wrapper/json/PJsonObject.java | PJsonObject.optDouble | @Override
public final Double optDouble(final String key) {
double result = this.obj.optDouble(key, Double.NaN);
if (Double.isNaN(result)) {
return null;
}
return result;
} | java | @Override
public final Double optDouble(final String key) {
double result = this.obj.optDouble(key, Double.NaN);
if (Double.isNaN(result)) {
return null;
}
return result;
} | [
"@",
"Override",
"public",
"final",
"Double",
"optDouble",
"(",
"final",
"String",
"key",
")",
"{",
"double",
"result",
"=",
"this",
".",
"obj",
".",
"optDouble",
"(",
"key",
",",
"Double",
".",
"NaN",
")",
";",
"if",
"(",
"Double",
".",
"isNaN",
"("... | Get a property as a double or null.
@param key the property name | [
"Get",
"a",
"property",
"as",
"a",
"double",
"or",
"null",
"."
] | 25a452cb39f592bd8a53b20db1037703898e1e22 | https://github.com/mapfish/mapfish-print/blob/25a452cb39f592bd8a53b20db1037703898e1e22/core/src/main/java/org/mapfish/print/wrapper/json/PJsonObject.java#L78-L85 |
159,451 | mapfish/mapfish-print | core/src/main/java/org/mapfish/print/wrapper/json/PJsonObject.java | PJsonObject.optBool | @Override
public final Boolean optBool(final String key) {
if (this.obj.optString(key, null) == null) {
return null;
} else {
return this.obj.optBoolean(key);
}
} | java | @Override
public final Boolean optBool(final String key) {
if (this.obj.optString(key, null) == null) {
return null;
} else {
return this.obj.optBoolean(key);
}
} | [
"@",
"Override",
"public",
"final",
"Boolean",
"optBool",
"(",
"final",
"String",
"key",
")",
"{",
"if",
"(",
"this",
".",
"obj",
".",
"optString",
"(",
"key",
",",
"null",
")",
"==",
"null",
")",
"{",
"return",
"null",
";",
"}",
"else",
"{",
"retu... | Get a property as a boolean or null.
@param key the property name | [
"Get",
"a",
"property",
"as",
"a",
"boolean",
"or",
"null",
"."
] | 25a452cb39f592bd8a53b20db1037703898e1e22 | https://github.com/mapfish/mapfish-print/blob/25a452cb39f592bd8a53b20db1037703898e1e22/core/src/main/java/org/mapfish/print/wrapper/json/PJsonObject.java#L106-L113 |
159,452 | mapfish/mapfish-print | core/src/main/java/org/mapfish/print/wrapper/json/PJsonObject.java | PJsonObject.optJSONObject | public final PJsonObject optJSONObject(final String key) {
final JSONObject val = this.obj.optJSONObject(key);
return val != null ? new PJsonObject(this, val, key) : null;
} | java | public final PJsonObject optJSONObject(final String key) {
final JSONObject val = this.obj.optJSONObject(key);
return val != null ? new PJsonObject(this, val, key) : null;
} | [
"public",
"final",
"PJsonObject",
"optJSONObject",
"(",
"final",
"String",
"key",
")",
"{",
"final",
"JSONObject",
"val",
"=",
"this",
".",
"obj",
".",
"optJSONObject",
"(",
"key",
")",
";",
"return",
"val",
"!=",
"null",
"?",
"new",
"PJsonObject",
"(",
... | Get a property as a json object or null.
@param key the property name | [
"Get",
"a",
"property",
"as",
"a",
"json",
"object",
"or",
"null",
"."
] | 25a452cb39f592bd8a53b20db1037703898e1e22 | https://github.com/mapfish/mapfish-print/blob/25a452cb39f592bd8a53b20db1037703898e1e22/core/src/main/java/org/mapfish/print/wrapper/json/PJsonObject.java#L145-L148 |
159,453 | mapfish/mapfish-print | core/src/main/java/org/mapfish/print/wrapper/json/PJsonObject.java | PJsonObject.getJSONArray | public final PJsonArray getJSONArray(final String key) {
final JSONArray val = this.obj.optJSONArray(key);
if (val == null) {
throw new ObjectMissingException(this, key);
}
return new PJsonArray(this, val, key);
} | java | public final PJsonArray getJSONArray(final String key) {
final JSONArray val = this.obj.optJSONArray(key);
if (val == null) {
throw new ObjectMissingException(this, key);
}
return new PJsonArray(this, val, key);
} | [
"public",
"final",
"PJsonArray",
"getJSONArray",
"(",
"final",
"String",
"key",
")",
"{",
"final",
"JSONArray",
"val",
"=",
"this",
".",
"obj",
".",
"optJSONArray",
"(",
"key",
")",
";",
"if",
"(",
"val",
"==",
"null",
")",
"{",
"throw",
"new",
"Object... | Get a property as a json array or throw exception.
@param key the property name | [
"Get",
"a",
"property",
"as",
"a",
"json",
"array",
"or",
"throw",
"exception",
"."
] | 25a452cb39f592bd8a53b20db1037703898e1e22 | https://github.com/mapfish/mapfish-print/blob/25a452cb39f592bd8a53b20db1037703898e1e22/core/src/main/java/org/mapfish/print/wrapper/json/PJsonObject.java#L168-L174 |
159,454 | mapfish/mapfish-print | core/src/main/java/org/mapfish/print/wrapper/json/PJsonObject.java | PJsonObject.optJSONArray | public final PJsonArray optJSONArray(final String key, final PJsonArray defaultValue) {
PJsonArray result = optJSONArray(key);
return result != null ? result : defaultValue;
} | java | public final PJsonArray optJSONArray(final String key, final PJsonArray defaultValue) {
PJsonArray result = optJSONArray(key);
return result != null ? result : defaultValue;
} | [
"public",
"final",
"PJsonArray",
"optJSONArray",
"(",
"final",
"String",
"key",
",",
"final",
"PJsonArray",
"defaultValue",
")",
"{",
"PJsonArray",
"result",
"=",
"optJSONArray",
"(",
"key",
")",
";",
"return",
"result",
"!=",
"null",
"?",
"result",
":",
"de... | Get a property as a json array or default.
@param key the property name
@param defaultValue default | [
"Get",
"a",
"property",
"as",
"a",
"json",
"array",
"or",
"default",
"."
] | 25a452cb39f592bd8a53b20db1037703898e1e22 | https://github.com/mapfish/mapfish-print/blob/25a452cb39f592bd8a53b20db1037703898e1e22/core/src/main/java/org/mapfish/print/wrapper/json/PJsonObject.java#L195-L198 |
159,455 | mapfish/mapfish-print | core/src/main/java/org/mapfish/print/wrapper/json/PJsonObject.java | PJsonObject.has | @Override
public final boolean has(final String key) {
String result = this.obj.optString(key, null);
return result != null;
} | java | @Override
public final boolean has(final String key) {
String result = this.obj.optString(key, null);
return result != null;
} | [
"@",
"Override",
"public",
"final",
"boolean",
"has",
"(",
"final",
"String",
"key",
")",
"{",
"String",
"result",
"=",
"this",
".",
"obj",
".",
"optString",
"(",
"key",
",",
"null",
")",
";",
"return",
"result",
"!=",
"null",
";",
"}"
] | Check if the object has a property with the key.
@param key key to check for. | [
"Check",
"if",
"the",
"object",
"has",
"a",
"property",
"with",
"the",
"key",
"."
] | 25a452cb39f592bd8a53b20db1037703898e1e22 | https://github.com/mapfish/mapfish-print/blob/25a452cb39f592bd8a53b20db1037703898e1e22/core/src/main/java/org/mapfish/print/wrapper/json/PJsonObject.java#L266-L270 |
159,456 | mapfish/mapfish-print | core/src/main/java/org/mapfish/print/processor/jasper/DataSourceProcessor.java | DataSourceProcessor.setAttributes | public void setAttributes(final Map<String, Attribute> attributes) {
this.internalAttributes = attributes;
this.allAttributes.putAll(attributes);
} | java | public void setAttributes(final Map<String, Attribute> attributes) {
this.internalAttributes = attributes;
this.allAttributes.putAll(attributes);
} | [
"public",
"void",
"setAttributes",
"(",
"final",
"Map",
"<",
"String",
",",
"Attribute",
">",
"attributes",
")",
"{",
"this",
".",
"internalAttributes",
"=",
"attributes",
";",
"this",
".",
"allAttributes",
".",
"putAll",
"(",
"attributes",
")",
";",
"}"
] | All the attributes needed either by the processors for each datasource row or by the jasper template.
@param attributes the attributes. | [
"All",
"the",
"attributes",
"needed",
"either",
"by",
"the",
"processors",
"for",
"each",
"datasource",
"row",
"or",
"by",
"the",
"jasper",
"template",
"."
] | 25a452cb39f592bd8a53b20db1037703898e1e22 | https://github.com/mapfish/mapfish-print/blob/25a452cb39f592bd8a53b20db1037703898e1e22/core/src/main/java/org/mapfish/print/processor/jasper/DataSourceProcessor.java#L153-L156 |
159,457 | mapfish/mapfish-print | core/src/main/java/org/mapfish/print/processor/jasper/DataSourceProcessor.java | DataSourceProcessor.setAttribute | public void setAttribute(final String name, final Attribute attribute) {
if (name.equals("datasource")) {
this.allAttributes.putAll(((DataSourceAttribute) attribute).getAttributes());
} else if (this.copyAttributes.contains(name)) {
this.allAttributes.put(name, attribute);
... | java | public void setAttribute(final String name, final Attribute attribute) {
if (name.equals("datasource")) {
this.allAttributes.putAll(((DataSourceAttribute) attribute).getAttributes());
} else if (this.copyAttributes.contains(name)) {
this.allAttributes.put(name, attribute);
... | [
"public",
"void",
"setAttribute",
"(",
"final",
"String",
"name",
",",
"final",
"Attribute",
"attribute",
")",
"{",
"if",
"(",
"name",
".",
"equals",
"(",
"\"datasource\"",
")",
")",
"{",
"this",
".",
"allAttributes",
".",
"putAll",
"(",
"(",
"(",
"DataS... | All the sub-level attributes.
@param name the attribute name.
@param attribute the attribute. | [
"All",
"the",
"sub",
"-",
"level",
"attributes",
"."
] | 25a452cb39f592bd8a53b20db1037703898e1e22 | https://github.com/mapfish/mapfish-print/blob/25a452cb39f592bd8a53b20db1037703898e1e22/core/src/main/java/org/mapfish/print/processor/jasper/DataSourceProcessor.java#L188-L194 |
159,458 | mapfish/mapfish-print | core/src/main/java/org/mapfish/print/config/SmtpConfig.java | SmtpConfig.getBody | @Nonnull
public String getBody() {
if (body == null) {
return storage == null ? DEFAULT_BODY : DEFAULT_BODY_STORAGE;
} else {
return body;
}
} | java | @Nonnull
public String getBody() {
if (body == null) {
return storage == null ? DEFAULT_BODY : DEFAULT_BODY_STORAGE;
} else {
return body;
}
} | [
"@",
"Nonnull",
"public",
"String",
"getBody",
"(",
")",
"{",
"if",
"(",
"body",
"==",
"null",
")",
"{",
"return",
"storage",
"==",
"null",
"?",
"DEFAULT_BODY",
":",
"DEFAULT_BODY_STORAGE",
";",
"}",
"else",
"{",
"return",
"body",
";",
"}",
"}"
] | Returns the configured body or the default value. | [
"Returns",
"the",
"configured",
"body",
"or",
"the",
"default",
"value",
"."
] | 25a452cb39f592bd8a53b20db1037703898e1e22 | https://github.com/mapfish/mapfish-print/blob/25a452cb39f592bd8a53b20db1037703898e1e22/core/src/main/java/org/mapfish/print/config/SmtpConfig.java#L188-L195 |
159,459 | mapfish/mapfish-print | core/src/main/java/org/mapfish/print/map/tiled/TilePreparationTask.java | TilePreparationTask.isTileVisible | private boolean isTileVisible(final ReferencedEnvelope tileBounds) {
if (FloatingPointUtil.equals(this.transformer.getRotation(), 0.0)) {
return true;
}
final GeometryFactory gfac = new GeometryFactory();
final Optional<Geometry> rotatedMapBounds = getRotatedMapBounds(gfac);... | java | private boolean isTileVisible(final ReferencedEnvelope tileBounds) {
if (FloatingPointUtil.equals(this.transformer.getRotation(), 0.0)) {
return true;
}
final GeometryFactory gfac = new GeometryFactory();
final Optional<Geometry> rotatedMapBounds = getRotatedMapBounds(gfac);... | [
"private",
"boolean",
"isTileVisible",
"(",
"final",
"ReferencedEnvelope",
"tileBounds",
")",
"{",
"if",
"(",
"FloatingPointUtil",
".",
"equals",
"(",
"this",
".",
"transformer",
".",
"getRotation",
"(",
")",
",",
"0.0",
")",
")",
"{",
"return",
"true",
";",... | When using a map rotation, there might be tiles that are outside the rotated map area. To avoid to load
these tiles, this method checks if a tile is really required to draw the map. | [
"When",
"using",
"a",
"map",
"rotation",
"there",
"might",
"be",
"tiles",
"that",
"are",
"outside",
"the",
"rotated",
"map",
"area",
".",
"To",
"avoid",
"to",
"load",
"these",
"tiles",
"this",
"method",
"checks",
"if",
"a",
"tile",
"is",
"really",
"requi... | 25a452cb39f592bd8a53b20db1037703898e1e22 | https://github.com/mapfish/mapfish-print/blob/25a452cb39f592bd8a53b20db1037703898e1e22/core/src/main/java/org/mapfish/print/map/tiled/TilePreparationTask.java#L169-L183 |
159,460 | mapfish/mapfish-print | core/src/main/java/org/mapfish/print/map/style/json/MapfishJsonStyleVersion1.java | MapfishJsonStyleVersion1.getStyleRules | private List<Rule> getStyleRules(final String styleProperty) {
final List<Rule> styleRules = new ArrayList<>(this.json.size());
for (Iterator<String> iterator = this.json.keys(); iterator.hasNext(); ) {
String styleKey = iterator.next();
if (styleKey.equals(JSON_STYLE_PROPERTY) ... | java | private List<Rule> getStyleRules(final String styleProperty) {
final List<Rule> styleRules = new ArrayList<>(this.json.size());
for (Iterator<String> iterator = this.json.keys(); iterator.hasNext(); ) {
String styleKey = iterator.next();
if (styleKey.equals(JSON_STYLE_PROPERTY) ... | [
"private",
"List",
"<",
"Rule",
">",
"getStyleRules",
"(",
"final",
"String",
"styleProperty",
")",
"{",
"final",
"List",
"<",
"Rule",
">",
"styleRules",
"=",
"new",
"ArrayList",
"<>",
"(",
"this",
".",
"json",
".",
"size",
"(",
")",
")",
";",
"for",
... | Creates SLD rules for each old style. | [
"Creates",
"SLD",
"rules",
"for",
"each",
"old",
"style",
"."
] | 25a452cb39f592bd8a53b20db1037703898e1e22 | https://github.com/mapfish/mapfish-print/blob/25a452cb39f592bd8a53b20db1037703898e1e22/core/src/main/java/org/mapfish/print/map/style/json/MapfishJsonStyleVersion1.java#L74-L93 |
159,461 | mapfish/mapfish-print | core/src/main/java/org/mapfish/print/processor/http/ForwardHeadersProcessor.java | ForwardHeadersProcessor.setHeaders | public void setHeaders(final Set<String> names) {
// transform to lower-case because header names should be case-insensitive
Set<String> lowerCaseNames = new HashSet<>();
for (String name: names) {
lowerCaseNames.add(name.toLowerCase());
}
this.headerNames = lowerCase... | java | public void setHeaders(final Set<String> names) {
// transform to lower-case because header names should be case-insensitive
Set<String> lowerCaseNames = new HashSet<>();
for (String name: names) {
lowerCaseNames.add(name.toLowerCase());
}
this.headerNames = lowerCase... | [
"public",
"void",
"setHeaders",
"(",
"final",
"Set",
"<",
"String",
">",
"names",
")",
"{",
"// transform to lower-case because header names should be case-insensitive",
"Set",
"<",
"String",
">",
"lowerCaseNames",
"=",
"new",
"HashSet",
"<>",
"(",
")",
";",
"for",
... | Set the header names to forward from the request. Should not be defined if all is set to true
@param names the header names. | [
"Set",
"the",
"header",
"names",
"to",
"forward",
"from",
"the",
"request",
".",
"Should",
"not",
"be",
"defined",
"if",
"all",
"is",
"set",
"to",
"true"
] | 25a452cb39f592bd8a53b20db1037703898e1e22 | https://github.com/mapfish/mapfish-print/blob/25a452cb39f592bd8a53b20db1037703898e1e22/core/src/main/java/org/mapfish/print/processor/http/ForwardHeadersProcessor.java#L56-L63 |
159,462 | mapfish/mapfish-print | core/src/main/java/org/mapfish/print/map/tiled/osm/OsmLayerParam.java | OsmLayerParam.convertToMultiMap | public static Multimap<String, String> convertToMultiMap(final PObject objectParams) {
Multimap<String, String> params = HashMultimap.create();
if (objectParams != null) {
Iterator<String> customParamsIter = objectParams.keys();
while (customParamsIter.hasNext()) {
... | java | public static Multimap<String, String> convertToMultiMap(final PObject objectParams) {
Multimap<String, String> params = HashMultimap.create();
if (objectParams != null) {
Iterator<String> customParamsIter = objectParams.keys();
while (customParamsIter.hasNext()) {
... | [
"public",
"static",
"Multimap",
"<",
"String",
",",
"String",
">",
"convertToMultiMap",
"(",
"final",
"PObject",
"objectParams",
")",
"{",
"Multimap",
"<",
"String",
",",
"String",
">",
"params",
"=",
"HashMultimap",
".",
"create",
"(",
")",
";",
"if",
"("... | convert a param object to a multimap.
@param objectParams the parameters to convert.
@return the corresponding Multimap. | [
"convert",
"a",
"param",
"object",
"to",
"a",
"multimap",
"."
] | 25a452cb39f592bd8a53b20db1037703898e1e22 | https://github.com/mapfish/mapfish-print/blob/25a452cb39f592bd8a53b20db1037703898e1e22/core/src/main/java/org/mapfish/print/map/tiled/osm/OsmLayerParam.java#L117-L135 |
159,463 | mapfish/mapfish-print | core/src/main/java/org/mapfish/print/map/tiled/osm/OsmLayerParam.java | OsmLayerParam.getMaxExtent | public Envelope getMaxExtent() {
final int minX = 0;
final int maxX = 1;
final int minY = 2;
final int maxY = 3;
return new Envelope(this.maxExtent[minX], this.maxExtent[minY], this.maxExtent[maxX],
this.maxExtent[maxY]);
} | java | public Envelope getMaxExtent() {
final int minX = 0;
final int maxX = 1;
final int minY = 2;
final int maxY = 3;
return new Envelope(this.maxExtent[minX], this.maxExtent[minY], this.maxExtent[maxX],
this.maxExtent[maxY]);
} | [
"public",
"Envelope",
"getMaxExtent",
"(",
")",
"{",
"final",
"int",
"minX",
"=",
"0",
";",
"final",
"int",
"maxX",
"=",
"1",
";",
"final",
"int",
"minY",
"=",
"2",
";",
"final",
"int",
"maxY",
"=",
"3",
";",
"return",
"new",
"Envelope",
"(",
"this... | Get the max extent as a envelop object. | [
"Get",
"the",
"max",
"extent",
"as",
"a",
"envelop",
"object",
"."
] | 25a452cb39f592bd8a53b20db1037703898e1e22 | https://github.com/mapfish/mapfish-print/blob/25a452cb39f592bd8a53b20db1037703898e1e22/core/src/main/java/org/mapfish/print/map/tiled/osm/OsmLayerParam.java#L176-L183 |
159,464 | mapfish/mapfish-print | core/src/main/java/org/mapfish/print/servlet/ServletMapPrinterFactory.java | ServletMapPrinterFactory.setConfigurationFiles | public final void setConfigurationFiles(final Map<String, String> configurationFiles)
throws URISyntaxException {
this.configurationFiles.clear();
this.configurationFileLastModifiedTimes.clear();
for (Map.Entry<String, String> entry: configurationFiles.entrySet()) {
if (!... | java | public final void setConfigurationFiles(final Map<String, String> configurationFiles)
throws URISyntaxException {
this.configurationFiles.clear();
this.configurationFileLastModifiedTimes.clear();
for (Map.Entry<String, String> entry: configurationFiles.entrySet()) {
if (!... | [
"public",
"final",
"void",
"setConfigurationFiles",
"(",
"final",
"Map",
"<",
"String",
",",
"String",
">",
"configurationFiles",
")",
"throws",
"URISyntaxException",
"{",
"this",
".",
"configurationFiles",
".",
"clear",
"(",
")",
";",
"this",
".",
"configuratio... | The setter for setting configuration file. It will convert the value to a URI.
@param configurationFiles the configuration file map. | [
"The",
"setter",
"for",
"setting",
"configuration",
"file",
".",
"It",
"will",
"convert",
"the",
"value",
"to",
"a",
"URI",
"."
] | 25a452cb39f592bd8a53b20db1037703898e1e22 | https://github.com/mapfish/mapfish-print/blob/25a452cb39f592bd8a53b20db1037703898e1e22/core/src/main/java/org/mapfish/print/servlet/ServletMapPrinterFactory.java#L149-L165 |
159,465 | mapfish/mapfish-print | core/src/main/java/org/mapfish/print/attribute/map/ZoomToFeatures.java | ZoomToFeatures.copy | public final ZoomToFeatures copy() {
ZoomToFeatures obj = new ZoomToFeatures();
obj.zoomType = this.zoomType;
obj.minScale = this.minScale;
obj.minMargin = this.minMargin;
return obj;
} | java | public final ZoomToFeatures copy() {
ZoomToFeatures obj = new ZoomToFeatures();
obj.zoomType = this.zoomType;
obj.minScale = this.minScale;
obj.minMargin = this.minMargin;
return obj;
} | [
"public",
"final",
"ZoomToFeatures",
"copy",
"(",
")",
"{",
"ZoomToFeatures",
"obj",
"=",
"new",
"ZoomToFeatures",
"(",
")",
";",
"obj",
".",
"zoomType",
"=",
"this",
".",
"zoomType",
";",
"obj",
".",
"minScale",
"=",
"this",
".",
"minScale",
";",
"obj",... | Make a copy. | [
"Make",
"a",
"copy",
"."
] | 25a452cb39f592bd8a53b20db1037703898e1e22 | https://github.com/mapfish/mapfish-print/blob/25a452cb39f592bd8a53b20db1037703898e1e22/core/src/main/java/org/mapfish/print/attribute/map/ZoomToFeatures.java#L45-L51 |
159,466 | mapfish/mapfish-print | core/src/main/java/org/mapfish/print/url/data/DataUrlConnection.java | DataUrlConnection.getFullContentType | public String getFullContentType() {
final String url = this.url.toExternalForm().substring("data:".length());
final int endIndex = url.indexOf(',');
if (endIndex >= 0) {
final String contentType = url.substring(0, endIndex);
if (!contentType.isEmpty()) {
... | java | public String getFullContentType() {
final String url = this.url.toExternalForm().substring("data:".length());
final int endIndex = url.indexOf(',');
if (endIndex >= 0) {
final String contentType = url.substring(0, endIndex);
if (!contentType.isEmpty()) {
... | [
"public",
"String",
"getFullContentType",
"(",
")",
"{",
"final",
"String",
"url",
"=",
"this",
".",
"url",
".",
"toExternalForm",
"(",
")",
".",
"substring",
"(",
"\"data:\"",
".",
"length",
"(",
")",
")",
";",
"final",
"int",
"endIndex",
"=",
"url",
... | Get the content-type, including the optional ";base64". | [
"Get",
"the",
"content",
"-",
"type",
"including",
"the",
"optional",
";",
"base64",
"."
] | 25a452cb39f592bd8a53b20db1037703898e1e22 | https://github.com/mapfish/mapfish-print/blob/25a452cb39f592bd8a53b20db1037703898e1e22/core/src/main/java/org/mapfish/print/url/data/DataUrlConnection.java#L61-L71 |
159,467 | mapfish/mapfish-print | core/src/main/java/org/mapfish/print/processor/http/matcher/DnsHostMatcher.java | DnsHostMatcher.tryOverrideValidation | @Override
public final Optional<Boolean> tryOverrideValidation(final MatchInfo matchInfo) throws SocketException,
UnknownHostException, MalformedURLException {
for (AddressHostMatcher addressHostMatcher: this.matchersForHost) {
if (addressHostMatcher.matches(matchInfo)) {
... | java | @Override
public final Optional<Boolean> tryOverrideValidation(final MatchInfo matchInfo) throws SocketException,
UnknownHostException, MalformedURLException {
for (AddressHostMatcher addressHostMatcher: this.matchersForHost) {
if (addressHostMatcher.matches(matchInfo)) {
... | [
"@",
"Override",
"public",
"final",
"Optional",
"<",
"Boolean",
">",
"tryOverrideValidation",
"(",
"final",
"MatchInfo",
"matchInfo",
")",
"throws",
"SocketException",
",",
"UnknownHostException",
",",
"MalformedURLException",
"{",
"for",
"(",
"AddressHostMatcher",
"a... | Check the given URI to see if it matches.
@param matchInfo the matchInfo to validate.
@return True if it matches. | [
"Check",
"the",
"given",
"URI",
"to",
"see",
"if",
"it",
"matches",
"."
] | 25a452cb39f592bd8a53b20db1037703898e1e22 | https://github.com/mapfish/mapfish-print/blob/25a452cb39f592bd8a53b20db1037703898e1e22/core/src/main/java/org/mapfish/print/processor/http/matcher/DnsHostMatcher.java#L58-L68 |
159,468 | mapfish/mapfish-print | core/src/main/java/org/mapfish/print/processor/http/matcher/DnsHostMatcher.java | DnsHostMatcher.setHost | public final void setHost(final String host) throws UnknownHostException {
this.host = host;
final InetAddress[] inetAddresses = InetAddress.getAllByName(host);
for (InetAddress address: inetAddresses) {
final AddressHostMatcher matcher = new AddressHostMatcher();
matche... | java | public final void setHost(final String host) throws UnknownHostException {
this.host = host;
final InetAddress[] inetAddresses = InetAddress.getAllByName(host);
for (InetAddress address: inetAddresses) {
final AddressHostMatcher matcher = new AddressHostMatcher();
matche... | [
"public",
"final",
"void",
"setHost",
"(",
"final",
"String",
"host",
")",
"throws",
"UnknownHostException",
"{",
"this",
".",
"host",
"=",
"host",
";",
"final",
"InetAddress",
"[",
"]",
"inetAddresses",
"=",
"InetAddress",
".",
"getAllByName",
"(",
"host",
... | Set the host.
@param host the host | [
"Set",
"the",
"host",
"."
] | 25a452cb39f592bd8a53b20db1037703898e1e22 | https://github.com/mapfish/mapfish-print/blob/25a452cb39f592bd8a53b20db1037703898e1e22/core/src/main/java/org/mapfish/print/processor/http/matcher/DnsHostMatcher.java#L82-L91 |
159,469 | mapfish/mapfish-print | core/src/main/java/org/mapfish/print/processor/ProcessorDependencyGraph.java | ProcessorDependencyGraph.getAllRequiredAttributes | @SuppressWarnings("unchecked")
public Multimap<String, Processor> getAllRequiredAttributes() {
Multimap<String, Processor> requiredInputs = HashMultimap.create();
for (ProcessorGraphNode root: this.roots) {
final BiMap<String, String> inputMapper = root.getInputMapper();
for ... | java | @SuppressWarnings("unchecked")
public Multimap<String, Processor> getAllRequiredAttributes() {
Multimap<String, Processor> requiredInputs = HashMultimap.create();
for (ProcessorGraphNode root: this.roots) {
final BiMap<String, String> inputMapper = root.getInputMapper();
for ... | [
"@",
"SuppressWarnings",
"(",
"\"unchecked\"",
")",
"public",
"Multimap",
"<",
"String",
",",
"Processor",
">",
"getAllRequiredAttributes",
"(",
")",
"{",
"Multimap",
"<",
"String",
",",
"Processor",
">",
"requiredInputs",
"=",
"HashMultimap",
".",
"create",
"("... | Get all the names of inputs that are required to be in the Values object when this graph is executed. | [
"Get",
"all",
"the",
"names",
"of",
"inputs",
"that",
"are",
"required",
"to",
"be",
"in",
"the",
"Values",
"object",
"when",
"this",
"graph",
"is",
"executed",
"."
] | 25a452cb39f592bd8a53b20db1037703898e1e22 | https://github.com/mapfish/mapfish-print/blob/25a452cb39f592bd8a53b20db1037703898e1e22/core/src/main/java/org/mapfish/print/processor/ProcessorDependencyGraph.java#L104-L137 |
159,470 | mapfish/mapfish-print | core/src/main/java/org/mapfish/print/processor/ProcessorDependencyGraph.java | ProcessorDependencyGraph.getAllProcessors | public Set<Processor<?, ?>> getAllProcessors() {
IdentityHashMap<Processor<?, ?>, Void> all = new IdentityHashMap<>();
for (ProcessorGraphNode<?, ?> root: this.roots) {
for (Processor p: root.getAllProcessors()) {
all.put(p, null);
}
}
return all.k... | java | public Set<Processor<?, ?>> getAllProcessors() {
IdentityHashMap<Processor<?, ?>, Void> all = new IdentityHashMap<>();
for (ProcessorGraphNode<?, ?> root: this.roots) {
for (Processor p: root.getAllProcessors()) {
all.put(p, null);
}
}
return all.k... | [
"public",
"Set",
"<",
"Processor",
"<",
"?",
",",
"?",
">",
">",
"getAllProcessors",
"(",
")",
"{",
"IdentityHashMap",
"<",
"Processor",
"<",
"?",
",",
"?",
">",
",",
"Void",
">",
"all",
"=",
"new",
"IdentityHashMap",
"<>",
"(",
")",
";",
"for",
"(... | Create a set containing all the processors in the graph. | [
"Create",
"a",
"set",
"containing",
"all",
"the",
"processors",
"in",
"the",
"graph",
"."
] | 25a452cb39f592bd8a53b20db1037703898e1e22 | https://github.com/mapfish/mapfish-print/blob/25a452cb39f592bd8a53b20db1037703898e1e22/core/src/main/java/org/mapfish/print/processor/ProcessorDependencyGraph.java#L170-L178 |
159,471 | mapfish/mapfish-print | core/src/main/java/org/mapfish/print/processor/http/matcher/UriMatchers.java | UriMatchers.validate | public void validate(final List<Throwable> validationErrors) {
if (this.matchers == null) {
validationErrors.add(new IllegalArgumentException(
"Matchers cannot be null. There should be at least a !acceptAll matcher"));
}
if (this.matchers != null && this.matchers... | java | public void validate(final List<Throwable> validationErrors) {
if (this.matchers == null) {
validationErrors.add(new IllegalArgumentException(
"Matchers cannot be null. There should be at least a !acceptAll matcher"));
}
if (this.matchers != null && this.matchers... | [
"public",
"void",
"validate",
"(",
"final",
"List",
"<",
"Throwable",
">",
"validationErrors",
")",
"{",
"if",
"(",
"this",
".",
"matchers",
"==",
"null",
")",
"{",
"validationErrors",
".",
"add",
"(",
"new",
"IllegalArgumentException",
"(",
"\"Matchers cannot... | Validate the configuration.
@param validationErrors where to put the errors. | [
"Validate",
"the",
"configuration",
"."
] | 25a452cb39f592bd8a53b20db1037703898e1e22 | https://github.com/mapfish/mapfish-print/blob/25a452cb39f592bd8a53b20db1037703898e1e22/core/src/main/java/org/mapfish/print/processor/http/matcher/UriMatchers.java#L83-L93 |
159,472 | mapfish/mapfish-print | core/src/main/java/org/mapfish/print/metrics/StatsDReporterInit.java | StatsDReporterInit.init | @PostConstruct
public final void init() throws URISyntaxException {
final String address = getConfig(ADDRESS, null);
if (address != null) {
final URI uri = new URI("udp://" + address);
final String prefix = getConfig(PREFIX, "mapfish-print").replace("%h", getHostname());
... | java | @PostConstruct
public final void init() throws URISyntaxException {
final String address = getConfig(ADDRESS, null);
if (address != null) {
final URI uri = new URI("udp://" + address);
final String prefix = getConfig(PREFIX, "mapfish-print").replace("%h", getHostname());
... | [
"@",
"PostConstruct",
"public",
"final",
"void",
"init",
"(",
")",
"throws",
"URISyntaxException",
"{",
"final",
"String",
"address",
"=",
"getConfig",
"(",
"ADDRESS",
",",
"null",
")",
";",
"if",
"(",
"address",
"!=",
"null",
")",
"{",
"final",
"URI",
"... | Start the StatsD reporter, if configured.
@throws URISyntaxException | [
"Start",
"the",
"StatsD",
"reporter",
"if",
"configured",
"."
] | 25a452cb39f592bd8a53b20db1037703898e1e22 | https://github.com/mapfish/mapfish-print/blob/25a452cb39f592bd8a53b20db1037703898e1e22/core/src/main/java/org/mapfish/print/metrics/StatsDReporterInit.java#L63-L77 |
159,473 | mapfish/mapfish-print | core/src/main/java/org/mapfish/print/processor/map/CreateMapProcessor.java | CreateMapProcessor.adjustBoundsToScaleAndMapSize | public static MapBounds adjustBoundsToScaleAndMapSize(
final GenericMapAttributeValues mapValues,
final Rectangle paintArea,
final MapBounds bounds,
final double dpi) {
MapBounds newBounds = bounds;
if (mapValues.isUseNearestScale()) {
newBound... | java | public static MapBounds adjustBoundsToScaleAndMapSize(
final GenericMapAttributeValues mapValues,
final Rectangle paintArea,
final MapBounds bounds,
final double dpi) {
MapBounds newBounds = bounds;
if (mapValues.isUseNearestScale()) {
newBound... | [
"public",
"static",
"MapBounds",
"adjustBoundsToScaleAndMapSize",
"(",
"final",
"GenericMapAttributeValues",
"mapValues",
",",
"final",
"Rectangle",
"paintArea",
",",
"final",
"MapBounds",
"bounds",
",",
"final",
"double",
"dpi",
")",
"{",
"MapBounds",
"newBounds",
"=... | If requested, adjust the bounds to the nearest scale and the map size.
@param mapValues Map parameters.
@param paintArea The size of the painting area.
@param bounds The map bounds.
@param dpi the DPI. | [
"If",
"requested",
"adjust",
"the",
"bounds",
"to",
"the",
"nearest",
"scale",
"and",
"the",
"map",
"size",
"."
] | 25a452cb39f592bd8a53b20db1037703898e1e22 | https://github.com/mapfish/mapfish-print/blob/25a452cb39f592bd8a53b20db1037703898e1e22/core/src/main/java/org/mapfish/print/processor/map/CreateMapProcessor.java#L161-L182 |
159,474 | mapfish/mapfish-print | core/src/main/java/org/mapfish/print/processor/map/CreateMapProcessor.java | CreateMapProcessor.createSvgGraphics | public static SVGGraphics2D createSvgGraphics(final Dimension size)
throws ParserConfigurationException {
DocumentBuilderFactory dbf = DocumentBuilderFactory.newInstance();
DocumentBuilder db = dbf.newDocumentBuilder();
Document document = db.getDOMImplementation().createDocument(nul... | java | public static SVGGraphics2D createSvgGraphics(final Dimension size)
throws ParserConfigurationException {
DocumentBuilderFactory dbf = DocumentBuilderFactory.newInstance();
DocumentBuilder db = dbf.newDocumentBuilder();
Document document = db.getDOMImplementation().createDocument(nul... | [
"public",
"static",
"SVGGraphics2D",
"createSvgGraphics",
"(",
"final",
"Dimension",
"size",
")",
"throws",
"ParserConfigurationException",
"{",
"DocumentBuilderFactory",
"dbf",
"=",
"DocumentBuilderFactory",
".",
"newInstance",
"(",
")",
";",
"DocumentBuilder",
"db",
"... | Create a SVG graphic with the give dimensions.
@param size The size of the SVG graphic. | [
"Create",
"a",
"SVG",
"graphic",
"with",
"the",
"give",
"dimensions",
"."
] | 25a452cb39f592bd8a53b20db1037703898e1e22 | https://github.com/mapfish/mapfish-print/blob/25a452cb39f592bd8a53b20db1037703898e1e22/core/src/main/java/org/mapfish/print/processor/map/CreateMapProcessor.java#L189-L203 |
159,475 | mapfish/mapfish-print | core/src/main/java/org/mapfish/print/processor/map/CreateMapProcessor.java | CreateMapProcessor.saveSvgFile | public static void saveSvgFile(final SVGGraphics2D graphics2d, final File path) throws IOException {
try (FileOutputStream fs = new FileOutputStream(path);
OutputStreamWriter outputStreamWriter = new OutputStreamWriter(fs, StandardCharsets.UTF_8);
Writer osw = new BufferedWriter(output... | java | public static void saveSvgFile(final SVGGraphics2D graphics2d, final File path) throws IOException {
try (FileOutputStream fs = new FileOutputStream(path);
OutputStreamWriter outputStreamWriter = new OutputStreamWriter(fs, StandardCharsets.UTF_8);
Writer osw = new BufferedWriter(output... | [
"public",
"static",
"void",
"saveSvgFile",
"(",
"final",
"SVGGraphics2D",
"graphics2d",
",",
"final",
"File",
"path",
")",
"throws",
"IOException",
"{",
"try",
"(",
"FileOutputStream",
"fs",
"=",
"new",
"FileOutputStream",
"(",
"path",
")",
";",
"OutputStreamWri... | Save a SVG graphic to the given path.
@param graphics2d The SVG graphic to save.
@param path The file. | [
"Save",
"a",
"SVG",
"graphic",
"to",
"the",
"given",
"path",
"."
] | 25a452cb39f592bd8a53b20db1037703898e1e22 | https://github.com/mapfish/mapfish-print/blob/25a452cb39f592bd8a53b20db1037703898e1e22/core/src/main/java/org/mapfish/print/processor/map/CreateMapProcessor.java#L211-L218 |
159,476 | mapfish/mapfish-print | core/src/main/java/org/mapfish/print/processor/map/CreateMapProcessor.java | CreateMapProcessor.getFeatureBounds | @Nonnull
private ReferencedEnvelope getFeatureBounds(
final MfClientHttpRequestFactory clientHttpRequestFactory,
final MapAttributeValues mapValues, final ExecutionContext context) {
final MapfishMapContext mapContext = createMapContext(mapValues);
String layerName = mapValu... | java | @Nonnull
private ReferencedEnvelope getFeatureBounds(
final MfClientHttpRequestFactory clientHttpRequestFactory,
final MapAttributeValues mapValues, final ExecutionContext context) {
final MapfishMapContext mapContext = createMapContext(mapValues);
String layerName = mapValu... | [
"@",
"Nonnull",
"private",
"ReferencedEnvelope",
"getFeatureBounds",
"(",
"final",
"MfClientHttpRequestFactory",
"clientHttpRequestFactory",
",",
"final",
"MapAttributeValues",
"mapValues",
",",
"final",
"ExecutionContext",
"context",
")",
"{",
"final",
"MapfishMapContext",
... | Get the bounding-box containing all features of all layers. | [
"Get",
"the",
"bounding",
"-",
"box",
"containing",
"all",
"features",
"of",
"all",
"layers",
"."
] | 25a452cb39f592bd8a53b20db1037703898e1e22 | https://github.com/mapfish/mapfish-print/blob/25a452cb39f592bd8a53b20db1037703898e1e22/core/src/main/java/org/mapfish/print/processor/map/CreateMapProcessor.java#L591-L622 |
159,477 | mapfish/mapfish-print | core/src/main/java/org/mapfish/print/config/WorkingDirectories.java | WorkingDirectories.getJasperCompilation | public final File getJasperCompilation(final Configuration configuration) {
File jasperCompilation = new File(getWorking(configuration), "jasper-bin");
createIfMissing(jasperCompilation, "Jasper Compilation");
return jasperCompilation;
} | java | public final File getJasperCompilation(final Configuration configuration) {
File jasperCompilation = new File(getWorking(configuration), "jasper-bin");
createIfMissing(jasperCompilation, "Jasper Compilation");
return jasperCompilation;
} | [
"public",
"final",
"File",
"getJasperCompilation",
"(",
"final",
"Configuration",
"configuration",
")",
"{",
"File",
"jasperCompilation",
"=",
"new",
"File",
"(",
"getWorking",
"(",
"configuration",
")",
",",
"\"jasper-bin\"",
")",
";",
"createIfMissing",
"(",
"ja... | Get the directory where the compiled jasper reports should be put.
@param configuration the configuration for the current app. | [
"Get",
"the",
"directory",
"where",
"the",
"compiled",
"jasper",
"reports",
"should",
"be",
"put",
"."
] | 25a452cb39f592bd8a53b20db1037703898e1e22 | https://github.com/mapfish/mapfish-print/blob/25a452cb39f592bd8a53b20db1037703898e1e22/core/src/main/java/org/mapfish/print/config/WorkingDirectories.java#L81-L85 |
159,478 | mapfish/mapfish-print | core/src/main/java/org/mapfish/print/config/WorkingDirectories.java | WorkingDirectories.getTaskDirectory | public final File getTaskDirectory() {
createIfMissing(this.working, "Working");
try {
return Files.createTempDirectory(this.working.toPath(), TASK_DIR_PREFIX).toFile();
} catch (IOException e) {
throw new AssertionError("Unable to create temporary directory in '" + this.... | java | public final File getTaskDirectory() {
createIfMissing(this.working, "Working");
try {
return Files.createTempDirectory(this.working.toPath(), TASK_DIR_PREFIX).toFile();
} catch (IOException e) {
throw new AssertionError("Unable to create temporary directory in '" + this.... | [
"public",
"final",
"File",
"getTaskDirectory",
"(",
")",
"{",
"createIfMissing",
"(",
"this",
".",
"working",
",",
"\"Working\"",
")",
";",
"try",
"{",
"return",
"Files",
".",
"createTempDirectory",
"(",
"this",
".",
"working",
".",
"toPath",
"(",
")",
","... | Creates and returns a temporary directory for a printing task. | [
"Creates",
"and",
"returns",
"a",
"temporary",
"directory",
"for",
"a",
"printing",
"task",
"."
] | 25a452cb39f592bd8a53b20db1037703898e1e22 | https://github.com/mapfish/mapfish-print/blob/25a452cb39f592bd8a53b20db1037703898e1e22/core/src/main/java/org/mapfish/print/config/WorkingDirectories.java#L99-L106 |
159,479 | mapfish/mapfish-print | core/src/main/java/org/mapfish/print/config/WorkingDirectories.java | WorkingDirectories.removeDirectory | public final void removeDirectory(final File directory) {
try {
FileUtils.deleteDirectory(directory);
} catch (IOException e) {
LOGGER.error("Unable to delete directory '{}'", directory);
}
} | java | public final void removeDirectory(final File directory) {
try {
FileUtils.deleteDirectory(directory);
} catch (IOException e) {
LOGGER.error("Unable to delete directory '{}'", directory);
}
} | [
"public",
"final",
"void",
"removeDirectory",
"(",
"final",
"File",
"directory",
")",
"{",
"try",
"{",
"FileUtils",
".",
"deleteDirectory",
"(",
"directory",
")",
";",
"}",
"catch",
"(",
"IOException",
"e",
")",
"{",
"LOGGER",
".",
"error",
"(",
"\"Unable ... | Deletes the given directory.
@param directory The directory to delete. | [
"Deletes",
"the",
"given",
"directory",
"."
] | 25a452cb39f592bd8a53b20db1037703898e1e22 | https://github.com/mapfish/mapfish-print/blob/25a452cb39f592bd8a53b20db1037703898e1e22/core/src/main/java/org/mapfish/print/config/WorkingDirectories.java#L113-L119 |
159,480 | mapfish/mapfish-print | core/src/main/java/org/mapfish/print/config/WorkingDirectories.java | WorkingDirectories.getBuildFileFor | public final File getBuildFileFor(
final Configuration configuration, final File jasperFileXml,
final String extension, final Logger logger) {
final String configurationAbsolutePath = configuration.getDirectory().getPath();
final int prefixToConfiguration = configurationAbsoluteP... | java | public final File getBuildFileFor(
final Configuration configuration, final File jasperFileXml,
final String extension, final Logger logger) {
final String configurationAbsolutePath = configuration.getDirectory().getPath();
final int prefixToConfiguration = configurationAbsoluteP... | [
"public",
"final",
"File",
"getBuildFileFor",
"(",
"final",
"Configuration",
"configuration",
",",
"final",
"File",
"jasperFileXml",
",",
"final",
"String",
"extension",
",",
"final",
"Logger",
"logger",
")",
"{",
"final",
"String",
"configurationAbsolutePath",
"=",... | Calculate the file to compile a jasper report template to.
@param configuration the configuration for the current app.
@param jasperFileXml the jasper report template in xml format.
@param extension the extension of the compiled report template.
@param logger the logger to log errors to if an occur. | [
"Calculate",
"the",
"file",
"to",
"compile",
"a",
"jasper",
"report",
"template",
"to",
"."
] | 25a452cb39f592bd8a53b20db1037703898e1e22 | https://github.com/mapfish/mapfish-print/blob/25a452cb39f592bd8a53b20db1037703898e1e22/core/src/main/java/org/mapfish/print/config/WorkingDirectories.java#L139-L161 |
159,481 | mapfish/mapfish-print | core/src/main/java/org/mapfish/print/map/tiled/wmts/WMTSLayer.java | WMTSLayer.createRestURI | public static URI createRestURI(
final String matrixId, final int row, final int col,
final WMTSLayerParam layerParam) throws URISyntaxException {
String path = layerParam.baseURL;
if (layerParam.dimensions != null) {
for (int i = 0; i < layerParam.dimensions.length; ... | java | public static URI createRestURI(
final String matrixId, final int row, final int col,
final WMTSLayerParam layerParam) throws URISyntaxException {
String path = layerParam.baseURL;
if (layerParam.dimensions != null) {
for (int i = 0; i < layerParam.dimensions.length; ... | [
"public",
"static",
"URI",
"createRestURI",
"(",
"final",
"String",
"matrixId",
",",
"final",
"int",
"row",
",",
"final",
"int",
"col",
",",
"final",
"WMTSLayerParam",
"layerParam",
")",
"throws",
"URISyntaxException",
"{",
"String",
"path",
"=",
"layerParam",
... | Prepare the baseURL to make a request.
@param matrixId matrixId
@param row row
@param col cold
@param layerParam layerParam | [
"Prepare",
"the",
"baseURL",
"to",
"make",
"a",
"request",
"."
] | 25a452cb39f592bd8a53b20db1037703898e1e22 | https://github.com/mapfish/mapfish-print/blob/25a452cb39f592bd8a53b20db1037703898e1e22/core/src/main/java/org/mapfish/print/map/tiled/wmts/WMTSLayer.java#L66-L88 |
159,482 | mapfish/mapfish-print | core/src/main/java/org/mapfish/print/wrapper/PElement.java | PElement.getPath | public final String getPath(final String key) {
StringBuilder result = new StringBuilder();
addPathTo(result);
result.append(".");
result.append(getPathElement(key));
return result.toString();
} | java | public final String getPath(final String key) {
StringBuilder result = new StringBuilder();
addPathTo(result);
result.append(".");
result.append(getPathElement(key));
return result.toString();
} | [
"public",
"final",
"String",
"getPath",
"(",
"final",
"String",
"key",
")",
"{",
"StringBuilder",
"result",
"=",
"new",
"StringBuilder",
"(",
")",
";",
"addPathTo",
"(",
"result",
")",
";",
"result",
".",
"append",
"(",
"\".\"",
")",
";",
"result",
".",
... | Gets the string representation of the path to the current JSON element.
@param key the leaf key | [
"Gets",
"the",
"string",
"representation",
"of",
"the",
"path",
"to",
"the",
"current",
"JSON",
"element",
"."
] | 25a452cb39f592bd8a53b20db1037703898e1e22 | https://github.com/mapfish/mapfish-print/blob/25a452cb39f592bd8a53b20db1037703898e1e22/core/src/main/java/org/mapfish/print/wrapper/PElement.java#L39-L45 |
159,483 | mapfish/mapfish-print | core/src/main/java/org/mapfish/print/wrapper/PElement.java | PElement.addPathTo | protected final void addPathTo(final StringBuilder result) {
if (this.parent != null) {
this.parent.addPathTo(result);
if (!(this.parent instanceof PJsonArray)) {
result.append(".");
}
}
result.append(getPathElement(this.contextName));
} | java | protected final void addPathTo(final StringBuilder result) {
if (this.parent != null) {
this.parent.addPathTo(result);
if (!(this.parent instanceof PJsonArray)) {
result.append(".");
}
}
result.append(getPathElement(this.contextName));
} | [
"protected",
"final",
"void",
"addPathTo",
"(",
"final",
"StringBuilder",
"result",
")",
"{",
"if",
"(",
"this",
".",
"parent",
"!=",
"null",
")",
"{",
"this",
".",
"parent",
".",
"addPathTo",
"(",
"result",
")",
";",
"if",
"(",
"!",
"(",
"this",
"."... | Append the path to the StringBuilder.
@param result the string builder to add the path to. | [
"Append",
"the",
"path",
"to",
"the",
"StringBuilder",
"."
] | 25a452cb39f592bd8a53b20db1037703898e1e22 | https://github.com/mapfish/mapfish-print/blob/25a452cb39f592bd8a53b20db1037703898e1e22/core/src/main/java/org/mapfish/print/wrapper/PElement.java#L65-L73 |
159,484 | mapfish/mapfish-print | core/src/main/java/org/mapfish/print/WaitDB.java | WaitDB.main | public static void main(final String[] args) {
if (System.getProperty("db.name") == null) {
System.out.println("Not running in multi-instance mode: no DB to connect to");
System.exit(1);
}
while (true) {
try {
Class.forName("org.postgresql.Driv... | java | public static void main(final String[] args) {
if (System.getProperty("db.name") == null) {
System.out.println("Not running in multi-instance mode: no DB to connect to");
System.exit(1);
}
while (true) {
try {
Class.forName("org.postgresql.Driv... | [
"public",
"static",
"void",
"main",
"(",
"final",
"String",
"[",
"]",
"args",
")",
"{",
"if",
"(",
"System",
".",
"getProperty",
"(",
"\"db.name\"",
")",
"==",
"null",
")",
"{",
"System",
".",
"out",
".",
"println",
"(",
"\"Not running in multi-instance mo... | A comment.
@param args the parameters | [
"A",
"comment",
"."
] | 25a452cb39f592bd8a53b20db1037703898e1e22 | https://github.com/mapfish/mapfish-print/blob/25a452cb39f592bd8a53b20db1037703898e1e22/core/src/main/java/org/mapfish/print/WaitDB.java#L16-L40 |
159,485 | mapfish/mapfish-print | core/src/main/java/org/mapfish/print/processor/ProcessorExecutionContext.java | ProcessorExecutionContext.started | private void started(final ProcessorGraphNode processorGraphNode) {
this.processorLock.lock();
try {
this.runningProcessors.put(processorGraphNode.getProcessor(), null);
} finally {
this.processorLock.unlock();
}
} | java | private void started(final ProcessorGraphNode processorGraphNode) {
this.processorLock.lock();
try {
this.runningProcessors.put(processorGraphNode.getProcessor(), null);
} finally {
this.processorLock.unlock();
}
} | [
"private",
"void",
"started",
"(",
"final",
"ProcessorGraphNode",
"processorGraphNode",
")",
"{",
"this",
".",
"processorLock",
".",
"lock",
"(",
")",
";",
"try",
"{",
"this",
".",
"runningProcessors",
".",
"put",
"(",
"processorGraphNode",
".",
"getProcessor",
... | Flag that the processor has started execution.
@param processorGraphNode the node that has started. | [
"Flag",
"that",
"the",
"processor",
"has",
"started",
"execution",
"."
] | 25a452cb39f592bd8a53b20db1037703898e1e22 | https://github.com/mapfish/mapfish-print/blob/25a452cb39f592bd8a53b20db1037703898e1e22/core/src/main/java/org/mapfish/print/processor/ProcessorExecutionContext.java#L71-L78 |
159,486 | mapfish/mapfish-print | core/src/main/java/org/mapfish/print/processor/ProcessorExecutionContext.java | ProcessorExecutionContext.isRunning | public boolean isRunning(final ProcessorGraphNode processorGraphNode) {
this.processorLock.lock();
try {
return this.runningProcessors.containsKey(processorGraphNode.getProcessor());
} finally {
this.processorLock.unlock();
}
} | java | public boolean isRunning(final ProcessorGraphNode processorGraphNode) {
this.processorLock.lock();
try {
return this.runningProcessors.containsKey(processorGraphNode.getProcessor());
} finally {
this.processorLock.unlock();
}
} | [
"public",
"boolean",
"isRunning",
"(",
"final",
"ProcessorGraphNode",
"processorGraphNode",
")",
"{",
"this",
".",
"processorLock",
".",
"lock",
"(",
")",
";",
"try",
"{",
"return",
"this",
".",
"runningProcessors",
".",
"containsKey",
"(",
"processorGraphNode",
... | Return true if the processor of the node is currently being executed.
@param processorGraphNode the node to test. | [
"Return",
"true",
"if",
"the",
"processor",
"of",
"the",
"node",
"is",
"currently",
"being",
"executed",
"."
] | 25a452cb39f592bd8a53b20db1037703898e1e22 | https://github.com/mapfish/mapfish-print/blob/25a452cb39f592bd8a53b20db1037703898e1e22/core/src/main/java/org/mapfish/print/processor/ProcessorExecutionContext.java#L85-L92 |
159,487 | mapfish/mapfish-print | core/src/main/java/org/mapfish/print/processor/ProcessorExecutionContext.java | ProcessorExecutionContext.isFinished | public boolean isFinished(final ProcessorGraphNode processorGraphNode) {
this.processorLock.lock();
try {
return this.executedProcessors.containsKey(processorGraphNode.getProcessor());
} finally {
this.processorLock.unlock();
}
} | java | public boolean isFinished(final ProcessorGraphNode processorGraphNode) {
this.processorLock.lock();
try {
return this.executedProcessors.containsKey(processorGraphNode.getProcessor());
} finally {
this.processorLock.unlock();
}
} | [
"public",
"boolean",
"isFinished",
"(",
"final",
"ProcessorGraphNode",
"processorGraphNode",
")",
"{",
"this",
".",
"processorLock",
".",
"lock",
"(",
")",
";",
"try",
"{",
"return",
"this",
".",
"executedProcessors",
".",
"containsKey",
"(",
"processorGraphNode",... | Return true if the processor of the node has previously been executed.
@param processorGraphNode the node to test. | [
"Return",
"true",
"if",
"the",
"processor",
"of",
"the",
"node",
"has",
"previously",
"been",
"executed",
"."
] | 25a452cb39f592bd8a53b20db1037703898e1e22 | https://github.com/mapfish/mapfish-print/blob/25a452cb39f592bd8a53b20db1037703898e1e22/core/src/main/java/org/mapfish/print/processor/ProcessorExecutionContext.java#L99-L106 |
159,488 | mapfish/mapfish-print | core/src/main/java/org/mapfish/print/processor/ProcessorExecutionContext.java | ProcessorExecutionContext.finished | public void finished(final ProcessorGraphNode processorGraphNode) {
this.processorLock.lock();
try {
this.runningProcessors.remove(processorGraphNode.getProcessor());
this.executedProcessors.put(processorGraphNode.getProcessor(), null);
} finally {
this.proces... | java | public void finished(final ProcessorGraphNode processorGraphNode) {
this.processorLock.lock();
try {
this.runningProcessors.remove(processorGraphNode.getProcessor());
this.executedProcessors.put(processorGraphNode.getProcessor(), null);
} finally {
this.proces... | [
"public",
"void",
"finished",
"(",
"final",
"ProcessorGraphNode",
"processorGraphNode",
")",
"{",
"this",
".",
"processorLock",
".",
"lock",
"(",
")",
";",
"try",
"{",
"this",
".",
"runningProcessors",
".",
"remove",
"(",
"processorGraphNode",
".",
"getProcessor... | Flag that the processor has completed execution.
@param processorGraphNode the node that has finished. | [
"Flag",
"that",
"the",
"processor",
"has",
"completed",
"execution",
"."
] | 25a452cb39f592bd8a53b20db1037703898e1e22 | https://github.com/mapfish/mapfish-print/blob/25a452cb39f592bd8a53b20db1037703898e1e22/core/src/main/java/org/mapfish/print/processor/ProcessorExecutionContext.java#L113-L121 |
159,489 | mapfish/mapfish-print | core/src/main/java/org/mapfish/print/processor/map/scalebar/ScalebarDrawer.java | ScalebarDrawer.draw | public final void draw() {
AffineTransform transform = new AffineTransform(this.transform);
transform.concatenate(getAlignmentTransform());
// draw the background box
this.graphics2d.setTransform(transform);
this.graphics2d.setColor(this.params.getBackgroundColor());
thi... | java | public final void draw() {
AffineTransform transform = new AffineTransform(this.transform);
transform.concatenate(getAlignmentTransform());
// draw the background box
this.graphics2d.setTransform(transform);
this.graphics2d.setColor(this.params.getBackgroundColor());
thi... | [
"public",
"final",
"void",
"draw",
"(",
")",
"{",
"AffineTransform",
"transform",
"=",
"new",
"AffineTransform",
"(",
"this",
".",
"transform",
")",
";",
"transform",
".",
"concatenate",
"(",
"getAlignmentTransform",
"(",
")",
")",
";",
"// draw the background b... | Start the rendering of the scalebar. | [
"Start",
"the",
"rendering",
"of",
"the",
"scalebar",
"."
] | 25a452cb39f592bd8a53b20db1037703898e1e22 | https://github.com/mapfish/mapfish-print/blob/25a452cb39f592bd8a53b20db1037703898e1e22/core/src/main/java/org/mapfish/print/processor/map/scalebar/ScalebarDrawer.java#L43-L70 |
159,490 | mapfish/mapfish-print | core/src/main/java/org/mapfish/print/processor/map/scalebar/ScalebarDrawer.java | ScalebarDrawer.getAlignmentTransform | private AffineTransform getAlignmentTransform() {
final int offsetX;
switch (this.settings.getParams().getAlign()) {
case LEFT:
offsetX = 0;
break;
case RIGHT:
offsetX = this.settings.getMaxSize().width - this.settings.getSize().wid... | java | private AffineTransform getAlignmentTransform() {
final int offsetX;
switch (this.settings.getParams().getAlign()) {
case LEFT:
offsetX = 0;
break;
case RIGHT:
offsetX = this.settings.getMaxSize().width - this.settings.getSize().wid... | [
"private",
"AffineTransform",
"getAlignmentTransform",
"(",
")",
"{",
"final",
"int",
"offsetX",
";",
"switch",
"(",
"this",
".",
"settings",
".",
"getParams",
"(",
")",
".",
"getAlign",
"(",
")",
")",
"{",
"case",
"LEFT",
":",
"offsetX",
"=",
"0",
";",
... | Create a transformation which takes the alignment settings into account. | [
"Create",
"a",
"transformation",
"which",
"takes",
"the",
"alignment",
"settings",
"into",
"account",
"."
] | 25a452cb39f592bd8a53b20db1037703898e1e22 | https://github.com/mapfish/mapfish-print/blob/25a452cb39f592bd8a53b20db1037703898e1e22/core/src/main/java/org/mapfish/print/processor/map/scalebar/ScalebarDrawer.java#L75-L107 |
159,491 | mapfish/mapfish-print | core/src/main/java/org/mapfish/print/map/geotools/AbstractGeotoolsLayer.java | AbstractGeotoolsLayer.getLayerTransformer | protected final MapfishMapContext getLayerTransformer(final MapfishMapContext transformer) {
MapfishMapContext layerTransformer = transformer;
if (!FloatingPointUtil.equals(transformer.getRotation(), 0.0) && !this.supportsNativeRotation()) {
// if a rotation is set and the rotation can not ... | java | protected final MapfishMapContext getLayerTransformer(final MapfishMapContext transformer) {
MapfishMapContext layerTransformer = transformer;
if (!FloatingPointUtil.equals(transformer.getRotation(), 0.0) && !this.supportsNativeRotation()) {
// if a rotation is set and the rotation can not ... | [
"protected",
"final",
"MapfishMapContext",
"getLayerTransformer",
"(",
"final",
"MapfishMapContext",
"transformer",
")",
"{",
"MapfishMapContext",
"layerTransformer",
"=",
"transformer",
";",
"if",
"(",
"!",
"FloatingPointUtil",
".",
"equals",
"(",
"transformer",
".",
... | If the layer transformer has not been prepared yet, do it.
@param transformer the transformer | [
"If",
"the",
"layer",
"transformer",
"has",
"not",
"been",
"prepared",
"yet",
"do",
"it",
"."
] | 25a452cb39f592bd8a53b20db1037703898e1e22 | https://github.com/mapfish/mapfish-print/blob/25a452cb39f592bd8a53b20db1037703898e1e22/core/src/main/java/org/mapfish/print/map/geotools/AbstractGeotoolsLayer.java#L186-L203 |
159,492 | mapfish/mapfish-print | core/src/main/java/org/mapfish/print/output/ValuesLogger.java | ValuesLogger.log | public static void log(final String templateName, final Template template, final Values values) {
new ValuesLogger().doLog(templateName, template, values);
} | java | public static void log(final String templateName, final Template template, final Values values) {
new ValuesLogger().doLog(templateName, template, values);
} | [
"public",
"static",
"void",
"log",
"(",
"final",
"String",
"templateName",
",",
"final",
"Template",
"template",
",",
"final",
"Values",
"values",
")",
"{",
"new",
"ValuesLogger",
"(",
")",
".",
"doLog",
"(",
"templateName",
",",
"template",
",",
"values",
... | Log the values for the provided template.
@param templateName the name of the template the values came from
@param template the template object
@param values the resultant values | [
"Log",
"the",
"values",
"for",
"the",
"provided",
"template",
"."
] | 25a452cb39f592bd8a53b20db1037703898e1e22 | https://github.com/mapfish/mapfish-print/blob/25a452cb39f592bd8a53b20db1037703898e1e22/core/src/main/java/org/mapfish/print/output/ValuesLogger.java#L34-L36 |
159,493 | mapfish/mapfish-print | core/src/main/java/org/mapfish/print/servlet/job/PrintJob.java | PrintJob.getFileName | private static String getFileName(@Nullable final MapPrinter mapPrinter, final PJsonObject spec) {
String fileName = spec.optString(Constants.OUTPUT_FILENAME_KEY);
if (fileName != null) {
return fileName;
}
if (mapPrinter != null) {
final Configuration config = m... | java | private static String getFileName(@Nullable final MapPrinter mapPrinter, final PJsonObject spec) {
String fileName = spec.optString(Constants.OUTPUT_FILENAME_KEY);
if (fileName != null) {
return fileName;
}
if (mapPrinter != null) {
final Configuration config = m... | [
"private",
"static",
"String",
"getFileName",
"(",
"@",
"Nullable",
"final",
"MapPrinter",
"mapPrinter",
",",
"final",
"PJsonObject",
"spec",
")",
"{",
"String",
"fileName",
"=",
"spec",
".",
"optString",
"(",
"Constants",
".",
"OUTPUT_FILENAME_KEY",
")",
";",
... | Read filename from spec. | [
"Read",
"filename",
"from",
"spec",
"."
] | 25a452cb39f592bd8a53b20db1037703898e1e22 | https://github.com/mapfish/mapfish-print/blob/25a452cb39f592bd8a53b20db1037703898e1e22/core/src/main/java/org/mapfish/print/servlet/job/PrintJob.java#L72-L93 |
159,494 | mapfish/mapfish-print | core/src/main/java/org/mapfish/print/servlet/job/PrintJob.java | PrintJob.withOpenOutputStream | protected PrintResult withOpenOutputStream(final PrintAction function) throws Exception {
final File reportFile = getReportFile();
final Processor.ExecutionContext executionContext;
try (FileOutputStream out = new FileOutputStream(reportFile);
BufferedOutputStream bout = new Buffere... | java | protected PrintResult withOpenOutputStream(final PrintAction function) throws Exception {
final File reportFile = getReportFile();
final Processor.ExecutionContext executionContext;
try (FileOutputStream out = new FileOutputStream(reportFile);
BufferedOutputStream bout = new Buffere... | [
"protected",
"PrintResult",
"withOpenOutputStream",
"(",
"final",
"PrintAction",
"function",
")",
"throws",
"Exception",
"{",
"final",
"File",
"reportFile",
"=",
"getReportFile",
"(",
")",
";",
"final",
"Processor",
".",
"ExecutionContext",
"executionContext",
";",
... | Open an OutputStream and execute the function using the OutputStream.
@param function the function to execute
@return the URI and the file size | [
"Open",
"an",
"OutputStream",
"and",
"execute",
"the",
"function",
"using",
"the",
"OutputStream",
"."
] | 25a452cb39f592bd8a53b20db1037703898e1e22 | https://github.com/mapfish/mapfish-print/blob/25a452cb39f592bd8a53b20db1037703898e1e22/core/src/main/java/org/mapfish/print/servlet/job/PrintJob.java#L113-L121 |
159,495 | mapfish/mapfish-print | core/src/main/java/org/mapfish/print/map/geotools/grid/PointGridStyle.java | PointGridStyle.get | static Style get(final GridParam params) {
final StyleBuilder builder = new StyleBuilder();
final Symbolizer pointSymbolizer = crossSymbolizer("shape://plus", builder, CROSS_SIZE,
params.gridColor);
final Style style = builder.createSty... | java | static Style get(final GridParam params) {
final StyleBuilder builder = new StyleBuilder();
final Symbolizer pointSymbolizer = crossSymbolizer("shape://plus", builder, CROSS_SIZE,
params.gridColor);
final Style style = builder.createSty... | [
"static",
"Style",
"get",
"(",
"final",
"GridParam",
"params",
")",
"{",
"final",
"StyleBuilder",
"builder",
"=",
"new",
"StyleBuilder",
"(",
")",
";",
"final",
"Symbolizer",
"pointSymbolizer",
"=",
"crossSymbolizer",
"(",
"\"shape://plus\"",
",",
"builder",
","... | Create the Grid Point style. | [
"Create",
"the",
"Grid",
"Point",
"style",
"."
] | 25a452cb39f592bd8a53b20db1037703898e1e22 | https://github.com/mapfish/mapfish-print/blob/25a452cb39f592bd8a53b20db1037703898e1e22/core/src/main/java/org/mapfish/print/map/geotools/grid/PointGridStyle.java#L27-L42 |
159,496 | mapfish/mapfish-print | core/src/main/java/org/mapfish/print/attribute/map/ZoomLevels.java | ZoomLevels.get | public Scale get(final int index, final DistanceUnit unit) {
return new Scale(this.scaleDenominators[index], unit, PDF_DPI);
} | java | public Scale get(final int index, final DistanceUnit unit) {
return new Scale(this.scaleDenominators[index], unit, PDF_DPI);
} | [
"public",
"Scale",
"get",
"(",
"final",
"int",
"index",
",",
"final",
"DistanceUnit",
"unit",
")",
"{",
"return",
"new",
"Scale",
"(",
"this",
".",
"scaleDenominators",
"[",
"index",
"]",
",",
"unit",
",",
"PDF_DPI",
")",
";",
"}"
] | Get the scale at the given index.
@param index the index of the zoom level to access.
@param unit the unit. | [
"Get",
"the",
"scale",
"at",
"the",
"given",
"index",
"."
] | 25a452cb39f592bd8a53b20db1037703898e1e22 | https://github.com/mapfish/mapfish-print/blob/25a452cb39f592bd8a53b20db1037703898e1e22/core/src/main/java/org/mapfish/print/attribute/map/ZoomLevels.java#L76-L78 |
159,497 | mapfish/mapfish-print | core/src/main/java/org/mapfish/print/attribute/map/ZoomLevels.java | ZoomLevels.getScaleDenominators | public double[] getScaleDenominators() {
double[] dest = new double[this.scaleDenominators.length];
System.arraycopy(this.scaleDenominators, 0, dest, 0, this.scaleDenominators.length);
return dest;
} | java | public double[] getScaleDenominators() {
double[] dest = new double[this.scaleDenominators.length];
System.arraycopy(this.scaleDenominators, 0, dest, 0, this.scaleDenominators.length);
return dest;
} | [
"public",
"double",
"[",
"]",
"getScaleDenominators",
"(",
")",
"{",
"double",
"[",
"]",
"dest",
"=",
"new",
"double",
"[",
"this",
".",
"scaleDenominators",
".",
"length",
"]",
";",
"System",
".",
"arraycopy",
"(",
"this",
".",
"scaleDenominators",
",",
... | Return a copy of the zoom level scale denominators. Scales are sorted greatest to least. | [
"Return",
"a",
"copy",
"of",
"the",
"zoom",
"level",
"scale",
"denominators",
".",
"Scales",
"are",
"sorted",
"greatest",
"to",
"least",
"."
] | 25a452cb39f592bd8a53b20db1037703898e1e22 | https://github.com/mapfish/mapfish-print/blob/25a452cb39f592bd8a53b20db1037703898e1e22/core/src/main/java/org/mapfish/print/attribute/map/ZoomLevels.java#L117-L121 |
159,498 | mapfish/mapfish-print | core/src/main/java/org/mapfish/print/map/geotools/FeaturesParser.java | FeaturesParser.autoTreat | public final SimpleFeatureCollection autoTreat(final Template template, final String features)
throws IOException {
SimpleFeatureCollection featuresCollection = treatStringAsURL(template, features);
if (featuresCollection == null) {
featuresCollection = treatStringAsGeoJson(featu... | java | public final SimpleFeatureCollection autoTreat(final Template template, final String features)
throws IOException {
SimpleFeatureCollection featuresCollection = treatStringAsURL(template, features);
if (featuresCollection == null) {
featuresCollection = treatStringAsGeoJson(featu... | [
"public",
"final",
"SimpleFeatureCollection",
"autoTreat",
"(",
"final",
"Template",
"template",
",",
"final",
"String",
"features",
")",
"throws",
"IOException",
"{",
"SimpleFeatureCollection",
"featuresCollection",
"=",
"treatStringAsURL",
"(",
"template",
",",
"featu... | Get the features collection from a GeoJson inline string or URL.
@param template the template
@param features what to parse
@return the feature collection
@throws IOException | [
"Get",
"the",
"features",
"collection",
"from",
"a",
"GeoJson",
"inline",
"string",
"or",
"URL",
"."
] | 25a452cb39f592bd8a53b20db1037703898e1e22 | https://github.com/mapfish/mapfish-print/blob/25a452cb39f592bd8a53b20db1037703898e1e22/core/src/main/java/org/mapfish/print/map/geotools/FeaturesParser.java#L151-L158 |
159,499 | mapfish/mapfish-print | core/src/main/java/org/mapfish/print/map/geotools/FeaturesParser.java | FeaturesParser.treatStringAsURL | public final SimpleFeatureCollection treatStringAsURL(final Template template, final String geoJsonUrl)
throws IOException {
URL url;
try {
url = FileUtils.testForLegalFileUrl(template.getConfiguration(), new URL(geoJsonUrl));
} catch (MalformedURLException e) {
... | java | public final SimpleFeatureCollection treatStringAsURL(final Template template, final String geoJsonUrl)
throws IOException {
URL url;
try {
url = FileUtils.testForLegalFileUrl(template.getConfiguration(), new URL(geoJsonUrl));
} catch (MalformedURLException e) {
... | [
"public",
"final",
"SimpleFeatureCollection",
"treatStringAsURL",
"(",
"final",
"Template",
"template",
",",
"final",
"String",
"geoJsonUrl",
")",
"throws",
"IOException",
"{",
"URL",
"url",
";",
"try",
"{",
"url",
"=",
"FileUtils",
".",
"testForLegalFileUrl",
"("... | Get the features collection from a GeoJson URL.
@param template the template
@param geoJsonUrl what to parse
@return the feature collection | [
"Get",
"the",
"features",
"collection",
"from",
"a",
"GeoJson",
"URL",
"."
] | 25a452cb39f592bd8a53b20db1037703898e1e22 | https://github.com/mapfish/mapfish-print/blob/25a452cb39f592bd8a53b20db1037703898e1e22/core/src/main/java/org/mapfish/print/map/geotools/FeaturesParser.java#L167-L184 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.