code
stringlengths
73
34.1k
label
stringclasses
1 value
private static String getColumnTitle(final PropertyDescriptor _property) { final StringBuilder buffer = new StringBuilder(); final String name = _property.getName(); buffer.append(Character.toUpperCase(name.charAt(0))); for (int i = 1; i < name.length(); i++) { final char c =...
java
private static boolean isValidPropertyClass(final PropertyDescriptor _property) { final Class type = _property.getPropertyType(); return Number.class.isAssignableFrom(type) || type == String.class || Date.class.isAssignableFrom(type) || type == Boolean.class; }
java
private static int getColumnWidth(final PropertyDescriptor _property) { final Class type = _property.getPropertyType(); if (Float.class.isAssignableFrom(type) || Double.class.isAssignableFrom(type)) { return 70; } else if (type == Boolean.class) { return 10; } els...
java
public void addSerie(AbstractColumn column, StringExpression labelExpression) { series.add(column); seriesLabels.put(column, labelExpression); }
java
public DynamicReport build() { if (built) { throw new DJBuilderException("DynamicReport already built. Cannot use more than once."); } else { built = true; } report.setOptions(options); if (!globalVariablesGroup.getFooterVariables().isEmpty() || !globalV...
java
protected void concatenateReports() { if (!concatenatedReports.isEmpty()) { // dummy group for page break if needed DJGroup globalGroup = createDummyGroup(); report.getColumnsGroups().add(0, globalGroup); } for (Subreport subreport : concatenatedReports) { D...
java
public DynamicReportBuilder setTemplateFile(String path, boolean importFields, boolean importVariables, boolean importParameters, boolean importDatasets) { report.setTemplateFileName(path); report.setTemplateImportFields(importFields); report.setTemplateImportParameters(importParameters); ...
java
public DynamicReportBuilder addStyle(Style style) throws DJBuilderException { if (style.getName() == null) { throw new DJBuilderException("Invalid style. The style must have a name"); } report.addStyle(style); return this; }
java
public DynamicReportBuilder setQuery(String text, String language) { this.report.setQuery(new DJQuery(text, language)); return this; }
java
public DynamicReportBuilder setProperty(String name, String value) { this.report.setProperty(name, value); return this; }
java
public DynamicReportBuilder setColspan(int colNumber, int colQuantity, String colspanTitle) { this.setColspan(colNumber, colQuantity, colspanTitle, null); return this; }
java
public void setTotalColorForColumn(int column, Color color){ int map = (colors.length-1) - column; colors[map][colors[0].length-1]=color; }
java
public void setColorForTotal(int row, int column, Color color){ int mapC = (colors.length-1) - column; int mapR = (colors[0].length-1) - row; colors[mapC][mapR]=color; }
java
public static void copyThenClose(InputStream input, OutputStream output) throws IOException { copy(input, output); input.close(); output.close(); }
java
public SubReportBuilder setParameterMapPath(String path) { subreport.setParametersExpression(path); subreport.setParametersMapOrigin(DJConstants.SUBREPORT_PARAMETER_MAP_ORIGIN_PARAMETER); return this; }
java
public List<ColumnProperty> getAllFields(){ ArrayList<ColumnProperty> l = new ArrayList<ColumnProperty>(); for (AbstractColumn abstractColumn : this.getColumns()) { if (abstractColumn instanceof SimpleColumn && !(abstractColumn instanceof ExpressionColumn)) { l.add(((SimpleColumn)abstractColumn).getColumnPro...
java
protected void registerValueFormatter(DJGroupVariable djVariable, String variableName) { if ( djVariable.getValueFormatter() == null){ return; } JRDesignParameter dparam = new JRDesignParameter(); dparam.setName(variableName + "_vf"); //value formater suffix dparam.setValueClassName(DJValueFormatter.cla...
java
protected void setWhenNoDataBand() { log.debug("setting up WHEN NO DATA band"); String whenNoDataText = getReport().getWhenNoDataText(); Style style = getReport().getWhenNoDataStyle(); if (whenNoDataText == null || "".equals(whenNoDataText)) return; JRDesignBand band ...
java
protected void ensureDJStyles() { //first of all, register all parent styles if any for (Style style : getReport().getStyles().values()) { addStyleToDesign(style); } Style defaultDetailStyle = getReport().getOptions().getDefaultDetailStyle(); Style defaultHeaderStyl...
java
protected void setColumnsFinalWidth() { log.debug("Setting columns final width."); float factor; int printableArea = report.getOptions().getColumnWidth(); //Create a list with only the visible columns. List visibleColums = getVisibleColumns(); if (report.getOptions().i...
java
protected void setBandsFinalHeight() { log.debug("Setting bands final height..."); List<JRBand> bands = new ArrayList<JRBand>(); Utils.addNotNull(bands, design.getPageHeader()); Utils.addNotNull(bands, design.getPageFooter()); Utils.addNotNull(bands, design.getColumnHeader()); ...
java
private void setBandFinalHeight(JRDesignBand band, int currHeigth, boolean fitToContent) { if (band != null) { int finalHeight = LayoutUtils.findVerticalOffset(band); //noinspection StatementWithEmptyBody if (finalHeight < currHeigth && !fitToContent) { //noth...
java
protected JRDesignGroup getParent(JRDesignGroup group) { int index = realGroups.indexOf(group); return (index > 0) ? (JRDesignGroup) realGroups.get(index - 1) : group; }
java
public static int findVerticalOffset(JRDesignBand band) { int finalHeight = 0; if (band != null) { for (JRChild jrChild : band.getChildren()) { JRDesignElement element = (JRDesignElement) jrChild; int currentHeight = element.getY() + element.getHeight(); if (currentHeight > finalHeight) finalHeight =...
java
public static void moveBandsElemnts(int yOffset, JRDesignBand band) { if (band == null) return; for (JRChild jrChild : band.getChildren()) { JRDesignElement elem = (JRDesignElement) jrChild; elem.setY(elem.getY() + yOffset); } }
java
public static JRDesignGroup getJRDesignGroup(DynamicJasperDesign jd, LayoutManager layoutManager, DJGroup group) { Map references = layoutManager.getReferencesMap(); for (Object o : references.keySet()) { String groupName = (String) o; DJGroup djGroup = (DJGroup) references.get(groupName); if (group == djG...
java
protected void applyBanners() { DynamicReportOptions options = getReport().getOptions(); if (options.getFirstPageImageBanners().isEmpty() && options.getImageBanners().isEmpty()){ return; } /* First create image banners for the first page only */ JRDesignBand title = (JRDe...
java
protected void generateTitleBand() { log.debug("Generating title band..."); JRDesignBand band = (JRDesignBand) getDesign().getPageHeader(); int yOffset = 0; //If title is not present then subtitle will be ignored if (getReport().getTitle() == null) return; if (band != null && !getDesign().isTitleNewPag...
java
protected void layoutGroupFooterLabels(DJGroup djgroup, JRDesignGroup jgroup, int x, int y, int width, int height) { //List footerVariables = djgroup.getFooterVariables(); DJGroupLabel label = djgroup.getFooterLabel(); //if (label == null || footerVariables.isEmpty()) //return; //PropertyColumn col = djgro...
java
private int findYOffsetForGroupLabel(JRDesignBand band) { int offset = 0; for (JRChild jrChild : band.getChildren()) { JRDesignElement elem = (JRDesignElement) jrChild; if (elem.getKey() != null && elem.getKey().startsWith("variable_for_column_")) { offset = elem.getY(); break; } } return offse...
java
protected void layoutGroupSubreports(DJGroup columnsGroup, JRDesignGroup jgroup) { log.debug("Starting subreport layout..."); JRDesignBand footerBand = (JRDesignBand) ((JRDesignSection)jgroup.getGroupFooterSection()).getBandsList().get(0); JRDesignBand headerBand = (JRDesignBand) ((JRDesignSection)jgroup.getGroup...
java
protected void sendPageBreakToBottom(JRDesignBand band) { JRElement[] elems = band.getElements(); JRElement aux = null; for (JRElement elem : elems) { if (("" + elem.getKey()).startsWith(PAGE_BREAK_FOR_)) { aux = elem; break; } } if (aux != null) ((JRDesignElement)aux).setY(band.getHeight());...
java
public DJCrosstab build(){ if (crosstab.getMeasures().isEmpty()){ throw new LayoutException("Crosstabs must have at least one measure"); } if (crosstab.getColumns().isEmpty()){ throw new LayoutException("Crosstabs must have at least one column"); } if (crosstab.getRows().isEmpty()){ throw new...
java
public CrosstabBuilder useMainReportDatasource(boolean preSorted) { DJDataSource datasource = new DJDataSource("ds",DJConstants.DATA_SOURCE_ORIGIN_REPORT_DATASOURCE,DJConstants.DATA_SOURCE_TYPE_JRDATASOURCE); datasource.setPreSorted(preSorted); crosstab.setDatasource(datasource); return this; }
java
public CrosstabBuilder addInvisibleMeasure(String property, String className, String title) { DJCrosstabMeasure measure = new DJCrosstabMeasure(property, className, DJCalculation.NOTHING, title); measure.setVisible(false); crosstab.getMeasures().add(measure); return this; }
java
public CrosstabBuilder setRowStyles(Style headerStyle, Style totalStyle, Style totalHeaderStyle) { crosstab.setRowHeaderStyle(headerStyle); crosstab.setRowTotalheaderStyle(totalHeaderStyle); crosstab.setRowTotalStyle(totalStyle); return this; }
java
public CrosstabBuilder setColumnStyles(Style headerStyle, Style totalStyle, Style totalHeaderStyle) { crosstab.setColumnHeaderStyle(headerStyle); crosstab.setColumnTotalheaderStyle(totalHeaderStyle); crosstab.setColumnTotalStyle(totalStyle); return this; }
java
public FastReportBuilder addBarcodeColumn(String title, String property,String className, int barcodeType,boolean showText, int width, boolean fixedWidth,ImageScaleMode imageScaleMode, Style style) throws ColumnBuilderException, ClassNotFoundException { AbstractColumn column = ColumnBuilder.getNew() .setColumnProp...
java
public FastReportBuilder addGroups(int numgroups) { groupCount = numgroups; for (int i = 0; i < groupCount; i++) { GroupBuilder gb = new GroupBuilder(); PropertyColumn col = (PropertyColumn) report.getColumns().get(i); gb.setCriteriaColumn(col); report.getColumnsGroups().add(gb.build()); } return th...
java
protected Object transformEntity(Entity entity) { PropertyColumn propertyColumn = (PropertyColumn) entity; JRDesignField field = new JRDesignField(); ColumnProperty columnProperty = propertyColumn.getColumnProperty(); field.setName(columnProperty.getProperty()); field.setValueClassName(columnProperty.getValue...
java
public String getTextForExpression(DJGroup group, DJGroup childGroup, String type) { return "new Double( $V{" + getReportName() + "_" + getGroupVariableName(childGroup) + "}.doubleValue() / $V{" + getReportName() + "_" + getGroupVariableName(type,group.getColumnToGroupBy().getColumnProperty().getProperty()) + "}.dou...
java
public ReportWriter getReportWriter(final JasperPrint _jasperPrint, final String _format, final Map<JRExporterParameter,Object> _parameters) { final JRExporter exporter = FormatInfoRegistry.getInstance().getExporter(_format); exporter.setParameters(_parameters); if (_jasperPrint.getPages().size...
java
public static HorizontalBandAlignment buildAligment(byte aligment){ if (aligment == RIGHT.getAlignment()) return RIGHT; else if (aligment == LEFT.getAlignment()) return LEFT; else if (aligment == CENTER.getAlignment()) return CENTER; return LEFT; }
java
protected Map getParametersMap(ActionInvocation _invocation) { Map map = (Map) _invocation.getStack().findValue(this.parameters); if (map == null) map = new HashMap(); return map; }
java
protected LayoutManager getLayOutManagerObj(ActionInvocation _invocation) { if (layoutManager == null || "".equals(layoutManager)){ LOG.warn("No valid LayoutManager, using ClassicLayoutManager"); return new ClassicLayoutManager(); } Object los = conditionalParse(layoutManager, _invocation); if (los inst...
java
protected AbstractColumn buildSimpleBarcodeColumn() { BarCodeColumn column = new BarCodeColumn(); populateCommonAttributes(column); column.setColumnProperty(columnProperty); column.setExpressionToGroupBy(customExpressionToGroupBy); column.setScaleMode(imageScaleMode); column.setApplicationIdentifier(applica...
java
protected AbstractColumn buildSimpleImageColumn() { ImageColumn column = new ImageColumn(); populateCommonAttributes(column); populateExpressionAttributes(column); column.setExpression(customExpression); column.setExpressionToGroupBy(customExpressionToGroupBy); column.setExpressionForCalculation(customEx...
java
protected AbstractColumn buildExpressionColumn() { ExpressionColumn column = new ExpressionColumn(); populateCommonAttributes(column); populateExpressionAttributes(column); column.setExpression(customExpression); column.setExpressionToGroupBy(customExpressionToGroupBy); column.setExpressionForCalculat...
java
protected AbstractColumn buildSimpleColumn() { SimpleColumn column = new SimpleColumn(); populateCommonAttributes(column); columnProperty.getFieldProperties().putAll(fieldProperties); column.setColumnProperty(columnProperty); column.setExpressionToGroupBy(customExpressionToGroupBy); column.setFieldDescripti...
java
public ColumnBuilder addFieldProperty(String propertyName, String value) { fieldProperties.put(propertyName, value); return this; }
java
public static void copyProperties(Object dest, Object orig){ try { if (orig != null && dest != null){ BeanUtils.copyProperties(dest, orig); PropertyUtils putils = new PropertyUtils(); PropertyDescriptor origDescriptors[] = putils.getPropertyDescriptors(orig); for (PropertyDescriptor orig...
java
private void printSuggestion( String arg, List<ConfigOption> co ) { List<ConfigOption> sortedList = new ArrayList<ConfigOption>( co ); Collections.sort( sortedList, new ConfigOptionLevenshteinDistance( arg ) ); System.err.println( "Parse error for argument \"" + arg + "\", did you mean " + sorte...
java
public static ReportGenerator.Format getFormat( String... args ) { ConfigOptionParser configParser = new ConfigOptionParser(); List<ConfigOption> configOptions = Arrays.asList( format, help ); for( ConfigOption co : configOptions ) { if( co.hasDefault() ) { configPar...
java
static List<List<String>> handleNewLines( List<List<String>> tableModel ) { List<List<String>> result = Lists.newArrayListWithExpectedSize( tableModel.size() ); for( List<String> row : tableModel ) { if( hasNewline( row ) ) { result.addAll( splitRow( row ) ); } e...
java
public static AbstractReportGenerator generateHtml5Report() { AbstractReportGenerator report; try { Class<?> aClass = new ReportGenerator().getClass().getClassLoader() .loadClass( "com.tngtech.jgiven.report.html5.Html5ReportGenerator" ); report = (AbstractRepo...
java
private static void flushCurrentWord( StringBuilder currentWords, List<Word> formattedWords, boolean cutWhitespace ) { if( currentWords.length() > 0 ) { if( cutWhitespace && currentWords.charAt( currentWords.length() - 1 ) == ' ' ) { currentWords.setLength( currentWords.length() - 1 ...
java
private static int nextIndex( String description, int defaultIndex ) { Pattern startsWithNumber = Pattern.compile( "(\\d+).*" ); Matcher matcher = startsWithNumber.matcher( description ); if( matcher.matches() ) { return Integer.parseInt( matcher.group( 1 ) ) - 1; } ...
java
public static String capitalize( String text ) { if( text == null || text.isEmpty() ) { return text; } return text.substring( 0, 1 ).toUpperCase().concat( text.substring( 1, text.length() ) ); }
java
private void deleteUnusedCaseSteps( ReportModel model ) { for( ScenarioModel scenarioModel : model.getScenarios() ) { if( scenarioModel.isCasesAsTable() && !hasAttachment( scenarioModel ) ) { List<ScenarioCaseModel> cases = scenarioModel.getScenarioCases(); for( int ...
java
boolean attachmentsAreStructurallyDifferent( List<AttachmentModel> firstAttachments, List<AttachmentModel> otherAttachments ) { if( firstAttachments.size() != otherAttachments.size() ) { return true; } for( int i = 0; i < firstAttachments.size(); i++ ) { if( attachmentIs...
java
List<List<Word>> getDifferentArguments( List<List<Word>> argumentWords ) { List<List<Word>> result = Lists.newArrayList(); for( int i = 0; i < argumentWords.size(); i++ ) { result.add( Lists.<Word>newArrayList() ); } int nWords = argumentWords.get( 0 ).size(); for( ...
java
public final TagConfiguration.Builder configureTag( Class<? extends Annotation> tagAnnotation ) { TagConfiguration configuration = new TagConfiguration( tagAnnotation ); tagConfigurations.put( tagAnnotation, configuration ); return new TagConfiguration.Builder( configuration ); }
java
private StepFormatter.Formatting<?, ?> getFormatting( Annotation[] annotations, Set<Class<?>> visitedTypes, Annotation originalAnnotation, String parameterName ) { List<StepFormatter.Formatting<?, ?>> foundFormatting = Lists.newArrayList(); Table tableAnnotation = null; for( Annotati...
java
public static <GIVEN, WHEN, THEN> Scenario<GIVEN, WHEN, THEN> create( Class<GIVEN> givenClass, Class<WHEN> whenClass, Class<THEN> thenClass ) { return new Scenario<GIVEN, WHEN, THEN>( givenClass, whenClass, thenClass ); }
java
@Override public Scenario<GIVEN, WHEN, THEN> startScenario( String description ) { super.startScenario( description ); return this; }
java
public void wireSteps( CanWire canWire ) { for( StageState steps : stages.values() ) { canWire.wire( steps.instance ); } }
java
public void finished() throws Throwable { if( state == FINISHED ) { return; } State previousState = state; state = FINISHED; methodInterceptor.enableMethodInterception( false ); try { if( previousState == STARTED ) { callFinishLi...
java
public void startScenario( Class<?> testClass, Method method, List<NamedArgument> arguments ) { listener.scenarioStarted( testClass, method, arguments ); if( method.isAnnotationPresent( Pending.class ) ) { Pending annotation = method.getAnnotation( Pending.class ); if( annotati...
java
public ConfigOptionBuilder setCommandLineOptionWithArgument( CommandLineOption commandLineOption, StringConverter converter ) { co.setCommandLineOption( commandLineOption ); return setStringConverter( converter ); }
java
public ConfigOptionBuilder setCommandLineOptionWithoutArgument( CommandLineOption commandLineOption, Object value ) { co.setCommandLineOption( commandLineOption ); co.setValue( value ); return this; }
java
public ConfigOptionBuilder setDefaultWith( Object defaultValue ) { co.setHasDefault( true ); co.setValue( defaultValue ); return setOptional(); }
java
public ConfigOptionBuilder setStringConverter( StringConverter converter ) { co.setConverter( converter ); co.setHasArgument( true ); return this; }
java
static List<NamedArgument> getNamedArgs( ExtensionContext context ) { List<NamedArgument> namedArgs = new ArrayList<>(); if( context.getTestMethod().get().getParameterCount() > 0 ) { try { if( context.getClass().getCanonicalName().equals( METHOD_EXTENSION_CONTEXT ) ) { ...
java
public static Attachment fromBinaryBytes( byte[] bytes, MediaType mediaType ) { if( !mediaType.isBinary() ) { throw new IllegalArgumentException( "MediaType must be binary" ); } return new Attachment(BaseEncoding.base64().encode( bytes ), mediaType, null ); }
java
public static Attachment fromBinaryInputStream( InputStream inputStream, MediaType mediaType ) throws IOException { return fromBinaryBytes( ByteStreams.toByteArray( inputStream ), mediaType ); }
java
public static MediaType binary( MediaType.Type type, String subType ) { return new MediaType( type, subType, true ); }
java
public static MediaType nonBinary( MediaType.Type type, String subType, Charset charSet ) { ApiUtil.notNull( charSet, "charset must not be null" ); return new MediaType( type, subType, charSet ); }
java
public static MediaType nonBinaryUtf8( MediaType.Type type, String subType ) { return new MediaType( type, subType, UTF_8 ); }
java
public static MediaType text( String subType, Charset charset ) { return nonBinary( TEXT, subType, charset ); }
java
public void parseVersion( String version ) { DefaultVersioning artifactVersion = new DefaultVersioning( version ); getLog().debug( "Parsed Version" ); getLog().debug( " major: " + artifactVersion.getMajor() ); getLog().debug( " minor: " + artifactVersion.getMinor() )...
java
private int findAvailablePortNumber( Integer portNumberStartingPoint, List<Integer> reservedPorts ) { assert portNumberStartingPoint != null; int candidate = portNumberStartingPoint; while ( reservedPorts.contains( candidate ) ) { candidate++; } return can...
java
public void populateFromAttributes( @Nonnull final Template template, @Nonnull final Map<String, Attribute> attributes, @Nonnull final PObject requestJsonAttributes) { if (requestJsonAttributes.has(JSON_REQUEST_HEADERS) && requestJsonAttributes.getObject(JSON_...
java
public void addRequiredValues(@Nonnull final Values sourceValues) { Object taskDirectory = sourceValues.getObject(TASK_DIRECTORY_KEY, Object.class); MfClientHttpRequestFactoryProvider requestFactoryProvider = sourceValues.getObject(CLIENT_HTTP_REQUEST_FACTORY_KEY, ...
java
public void put(final String key, final Object value) { if (TASK_DIRECTORY_KEY.equals(key) && this.values.keySet().contains(TASK_DIRECTORY_KEY)) { // ensure that no one overwrites the task directory throw new IllegalArgumentException("Invalid key: " + key); } if (value =...
java
public <V> V getObject(final String key, final Class<V> type) { final Object obj = this.values.get(key); return type.cast(obj); }
java
@Nullable public Boolean getBoolean(@Nonnull final String key) { return (Boolean) this.values.get(key); }
java
@SuppressWarnings("unchecked") public <T> Map<String, T> find(final Class<T> valueTypeToFind) { return (Map<String, T>) this.values.entrySet().stream() .filter(input -> valueTypeToFind.isInstance(input.getValue())) .collect( Collectors.toMap(Map.Entry:...
java
@Override public ConfigurableRequest createRequest( @Nonnull final URI uri, @Nonnull final HttpMethod httpMethod) throws IOException { HttpRequestBase httpRequest = (HttpRequestBase) createHttpUriRequest(httpMethod, uri); return new Request(getHttpClient(), httpRequest, creat...
java
public final PJsonObject toJSON() { try { JSONObject json = new JSONObject(); for (String key: this.obj.keySet()) { Object opt = opt(key); if (opt instanceof PYamlObject) { opt = ((PYamlObject) opt).toJSON().getInternalObj(); ...
java
public static MatchInfo fromUri(final URI uri, final HttpMethod method) { int newPort = uri.getPort(); if (newPort < 0) { try { newPort = uri.toURL().getDefaultPort(); } catch (MalformedURLException | IllegalArgumentException e) { newPort = ANY_POR...
java
@SuppressWarnings("StringEquality") public static MatchInfo fromAuthScope(final AuthScope authscope) { String newScheme = StringUtils.equals(authscope.getScheme(), AuthScope.ANY_SCHEME) ? ANY_SCHEME : authscope.getScheme(); String newHost = StringUtils.equals(authscope.getHost(), Aut...
java
public Style createStyle(final List<Rule> styleRules) { final Rule[] rulesArray = styleRules.toArray(new Rule[0]); final FeatureTypeStyle featureTypeStyle = this.styleBuilder.createFeatureTypeStyle(null, rulesArray); final Style style = this.styleBuilder.createStyle(); style.featureTypeS...
java
@VisibleForTesting @Nullable protected LineSymbolizer createLineSymbolizer(final PJsonObject styleJson) { final Stroke stroke = createStroke(styleJson, true); if (stroke == null) { return null; } else { return this.styleBuilder.createLineSymbolizer(stroke); ...
java
@Nullable @VisibleForTesting protected PolygonSymbolizer createPolygonSymbolizer(final PJsonObject styleJson) { if (this.allowNullSymbolizer && !styleJson.has(JSON_FILL_COLOR)) { return null; } final PolygonSymbolizer symbolizer = this.styleBuilder.createPolygonSymbolizer();...
java
@VisibleForTesting protected TextSymbolizer createTextSymbolizer(final PJsonObject styleJson) { final TextSymbolizer textSymbolizer = this.styleBuilder.createTextSymbolizer(); // make sure that labels are also rendered if a part of the text would be outside // the view context, see http://d...
java
public static void configureProtocolHandler() { final String pkgs = System.getProperty("java.protocol.handler.pkgs"); String newValue = "org.mapfish.print.url"; if (pkgs != null && !pkgs.contains(newValue)) { newValue = newValue + "|" + pkgs; } else if (pkgs != null) { ...
java
protected final StyleSupplier<FeatureSource> createStyleFunction( final Template template, final String styleString) { return new StyleSupplier<FeatureSource>() { @Override public Style load( final MfClientHttpRequestFactory requestFactory, ...
java
public static URI makeWmsGetLayerRequest( final WmsLayerParam wmsLayerParam, final URI commonURI, final Dimension imageSize, final double dpi, final double angle, final ReferencedEnvelope bounds) throws FactoryException, URISyntaxException, IOExcep...
java
private static boolean isDpiSet(final Multimap<String, String> extraParams) { String searchKey = "FORMAT_OPTIONS"; for (String key: extraParams.keys()) { if (key.equalsIgnoreCase(searchKey)) { for (String value: extraParams.get(key)) { if (value.toLowerCas...
java
private static void setDpiValue(final Multimap<String, String> extraParams, final int dpi) { String searchKey = "FORMAT_OPTIONS"; for (String key: extraParams.keys()) { if (key.equalsIgnoreCase(searchKey)) { Collection<String> values = extraParams.removeAll(key); ...
java