- Add the Codota plugin to your IDE and get smart completions
private void myMethod () {Charset c =
String charsetName;Charset.forName(charsetName)
Charset.defaultCharset()
ContentType contentType;contentType.getCharset()
- Smart code suggestions by Codota
}
/** * Formats this CRS as a <cite>Well Known Text</cite> {@code ImageCRS[…]} element. * * <div class="note"><b>Compatibility note:</b> * {@code ImageCRS} are defined in the WKT 2 specification only.</div> * * @return {@code "ImageCRS"}. * * @see <a href="http://docs.opengeospatial.org/is/12-063r5/12-063r5.html#79">WKT 2 specification §12</a> */ @Override protected String formatTo(final Formatter formatter) { super.formatTo(formatter); if (formatter.getConvention().majorVersion() == 1) { formatter.setInvalidWKT(this, null); } return WKTKeywords.ImageCRS; }
/** * Formats this CRS as a <cite>Well Known Text</cite> {@code ImageCRS[…]} element. * * <div class="note"><b>Compatibility note:</b> * {@code ImageCRS} are defined in the WKT 2 specification only.</div> * * @return {@code "ImageCRS"}. * * @see <a href="http://docs.opengeospatial.org/is/12-063r5/12-063r5.html#79">WKT 2 specification §12</a> */ @Override protected String formatTo(final Formatter formatter) { super.formatTo(formatter); if (formatter.getConvention().majorVersion() == 1) { formatter.setInvalidWKT(this, null); } return WKTKeywords.ImageCRS; }
/** * Formats this CRS as a <cite>Well Known Text</cite> {@code VerticalCRS[…]} element. * * @return {@code "VerticalCRS"} (WKT 2) or {@code "Vert_CS"} (WKT 1). * * @see <a href="http://docs.opengeospatial.org/is/12-063r5/12-063r5.html#69">WKT 2 specification §10</a> */ @Override protected String formatTo(final Formatter formatter) { super.formatTo(formatter); return (formatter.getConvention().majorVersion() == 1) ? WKTKeywords.Vert_CS : isBaseCRS(formatter) ? WKTKeywords.BaseVertCRS : formatter.shortOrLong(WKTKeywords.VertCRS, WKTKeywords.VerticalCRS); }
/** * Formats this CRS as a <cite>Well Known Text</cite> {@code EngineeringCRS[…]} element. * * @return {@code "EngineeringCRS"} (WKT 2) or {@code "Local_CS"} (WKT 1). * * @see <a href="http://docs.opengeospatial.org/is/12-063r5/12-063r5.html#74">WKT 2 specification §11</a> */ @Override protected String formatTo(final Formatter formatter) { super.formatTo(formatter); return (formatter.getConvention().majorVersion() == 1) ? WKTKeywords.Local_CS : isBaseCRS(formatter) ? WKTKeywords.BaseEngCRS : formatter.shortOrLong(WKTKeywords.EngCRS, WKTKeywords.EngineeringCRS); }
/** * Formats this CRS as a <cite>Well Known Text</cite> {@code EngineeringCRS[…]} element. * * @return {@code "EngineeringCRS"} (WKT 2) or {@code "Local_CS"} (WKT 1). * * @see <a href="http://docs.opengeospatial.org/is/12-063r5/12-063r5.html#74">WKT 2 specification §11</a> */ @Override protected String formatTo(final Formatter formatter) { super.formatTo(formatter); return (formatter.getConvention().majorVersion() == 1) ? WKTKeywords.Local_CS : isBaseCRS(formatter) ? WKTKeywords.BaseEngCRS : formatter.shortOrLong(WKTKeywords.EngCRS, WKTKeywords.EngineeringCRS); }
/** * Formats this CRS as a <cite>Well Known Text</cite> {@code VerticalCRS[…]} element. * * @return {@code "VerticalCRS"} (WKT 2) or {@code "Vert_CS"} (WKT 1). * * @see <a href="http://docs.opengeospatial.org/is/12-063r5/12-063r5.html#69">WKT 2 specification §10</a> */ @Override protected String formatTo(final Formatter formatter) { super.formatTo(formatter); return (formatter.getConvention().majorVersion() == 1) ? WKTKeywords.Vert_CS : isBaseCRS(formatter) ? WKTKeywords.BaseVertCRS : formatter.shortOrLong(WKTKeywords.VertCRS, WKTKeywords.VerticalCRS); }
/** * Formats this datum as a <cite>Well Known Text</cite> {@code ParametricDatum[…]} element. * * <div class="note"><b>Compatibility note:</b> * {@code ParametricDatum} is defined in the WKT 2 specification only.</div> * * @return {@code "ParametricDatum"}. * * @see <a href="http://docs.opengeospatial.org/is/12-063r5/12-063r5.html#83">WKT 2 specification</a> */ @Override protected String formatTo(final Formatter formatter) { super.formatTo(formatter); if (formatter.getConvention().majorVersion() == 1) { formatter.setInvalidWKT(this, null); } return formatter.shortOrLong(WKTKeywords.PDatum, WKTKeywords.ParametricDatum); }
/** * Formats this CRS as a <cite>Well Known Text</cite> {@code ParametricCRS[…]} element. * * <div class="note"><b>Compatibility note:</b> * {@code ParametricCRS} is defined in the WKT 2 specification only.</div> * * @return {@code "ParametricCRS"}. * * @see <a href="http://docs.opengeospatial.org/is/12-063r5/12-063r5.html#83">WKT 2 specification</a> */ @Override protected String formatTo(final Formatter formatter) { super.formatTo(formatter); if (formatter.getConvention().majorVersion() == 1) { formatter.setInvalidWKT(this, null); } return isBaseCRS(formatter) ? WKTKeywords.BaseParamCRS : WKTKeywords.ParametricCRS; }
/** * Formats this CRS as a <cite>Well Known Text</cite> {@code TimeCRS[…]} element. * * <div class="note"><b>Compatibility note:</b> * {@code TimeCRS} is defined in the WKT 2 specification only.</div> * * @return {@code "TimeCRS"}. * * @see <a href="http://docs.opengeospatial.org/is/12-063r5/12-063r5.html#88">WKT 2 specification §14</a> */ @Override protected String formatTo(final Formatter formatter) { super.formatTo(formatter); if (formatter.getConvention().majorVersion() == 1) { formatter.setInvalidWKT(this, null); } return isBaseCRS(formatter) ? WKTKeywords.BaseTimeCRS : WKTKeywords.TimeCRS; }
/** * Formats this CRS as a <cite>Well Known Text</cite> {@code TimeCRS[…]} element. * * <div class="note"><b>Compatibility note:</b> * {@code TimeCRS} is defined in the WKT 2 specification only.</div> * * @return {@code "TimeCRS"}. * * @see <a href="http://docs.opengeospatial.org/is/12-063r5/12-063r5.html#88">WKT 2 specification §14</a> */ @Override protected String formatTo(final Formatter formatter) { super.formatTo(formatter); if (formatter.getConvention().majorVersion() == 1) { formatter.setInvalidWKT(this, null); } return isBaseCRS(formatter) ? WKTKeywords.BaseTimeCRS : WKTKeywords.TimeCRS; }
/** * Formats this datum as a <cite>Well Known Text</cite> {@code ParametricDatum[…]} element. * * <div class="note"><b>Compatibility note:</b> * {@code ParametricDatum} is defined in the WKT 2 specification only.</div> * * @return {@code "ParametricDatum"}. * * @see <a href="http://docs.opengeospatial.org/is/12-063r5/12-063r5.html#83">WKT 2 specification</a> */ @Override protected String formatTo(final Formatter formatter) { super.formatTo(formatter); if (formatter.getConvention().majorVersion() == 1) { formatter.setInvalidWKT(this, null); } return formatter.shortOrLong(WKTKeywords.PDatum, WKTKeywords.ParametricDatum); }
/** * Formats this CRS as a <cite>Well Known Text</cite> {@code ParametricCRS[…]} element. * * <div class="note"><b>Compatibility note:</b> * {@code ParametricCRS} is defined in the WKT 2 specification only.</div> * * @return {@code "ParametricCRS"}. * * @see <a href="http://docs.opengeospatial.org/is/12-063r5/12-063r5.html#83">WKT 2 specification</a> */ @Override protected String formatTo(final Formatter formatter) { super.formatTo(formatter); if (formatter.getConvention().majorVersion() == 1) { formatter.setInvalidWKT(this, null); } return isBaseCRS(formatter) ? WKTKeywords.BaseParamCRS : WKTKeywords.ParametricCRS; }
/** * Formats this datum as a <cite>Well Known Text</cite> {@code EngineeringDatum[…]} element. * * @return {@code "EngineeringDatum"} (WKT 2) or {@code "Local_Datum"} (WKT 1). * * @see <a href="http://docs.opengeospatial.org/is/12-063r5/12-063r5.html#76">WKT 2 specification §11.2</a> */ @Override protected String formatTo(final Formatter formatter) { super.formatTo(formatter); if (formatter.getConvention().majorVersion() == 1) { /* * Datum type was provided for all kind of datum in the legacy OGC 01-009 specification. * Datum types became provided only for vertical datum in the ISO 19111:2003 specification, * then removed completely in the ISO 19111:2007 revision. We are supposed to format them * in WKT 1, but do not have any indication about what the values should be. */ formatter.append(0); return WKTKeywords.Local_Datum; } return formatter.shortOrLong(WKTKeywords.EDatum, WKTKeywords.EngineeringDatum); }
/** * Formats this datum as a <cite>Well Known Text</cite> {@code EngineeringDatum[…]} element. * * @return {@code "EngineeringDatum"} (WKT 2) or {@code "Local_Datum"} (WKT 1). * * @see <a href="http://docs.opengeospatial.org/is/12-063r5/12-063r5.html#76">WKT 2 specification §11.2</a> */ @Override protected String formatTo(final Formatter formatter) { super.formatTo(formatter); if (formatter.getConvention().majorVersion() == 1) { /* * Datum type was provided for all kind of datum in the legacy OGC 01-009 specification. * Datum types became provided only for vertical datum in the ISO 19111:2003 specification, * then removed completely in the ISO 19111:2007 revision. We are supposed to format them * in WKT 1, but do not have any indication about what the values should be. */ formatter.append(0); return WKTKeywords.Local_Datum; } return formatter.shortOrLong(WKTKeywords.EDatum, WKTKeywords.EngineeringDatum); }
/** * Formats this datum as a <cite>Well Known Text</cite> {@code VerticalDatum[…]} element. * * <div class="note"><b>Compatibility note:</b> * OGC 01-009 defined numerical codes for various vertical datum types, for example 2005 for geoidal height * and 2002 for ellipsoidal height. Such codes were formatted for all {@code Datum} subtypes in WKT 1. * Datum types became provided only for vertical datum in the ISO 19111:2003 specification, then removed * completely in ISO 19111:2007.</div> * * @return {@code "VerticalDatum"} (WKT 2) or {@code "Vert_Datum"} (WKT 1). * * @see <a href="http://docs.opengeospatial.org/is/12-063r5/12-063r5.html#71">WKT 2 specification §10.2</a> */ @Override protected String formatTo(final Formatter formatter) { super.formatTo(formatter); if (formatter.getConvention().majorVersion() == 1) { formatter.append(VerticalDatumTypes.toLegacy(type())); return WKTKeywords.Vert_Datum; } return formatter.shortOrLong(WKTKeywords.VDatum, WKTKeywords.VerticalDatum); }
/** * Formats this datum as a <cite>Well Known Text</cite> {@code ImageDatum[…]} element. * * <div class="note"><b>Compatibility note:</b> * {@code ImageDatum} is defined in the WKT 2 specification only.</div> * * @return {@code "ImageDatum"}. * * @see <a href="http://docs.opengeospatial.org/is/12-063r5/12-063r5.html#81">WKT 2 specification §12.2</a> */ @Override protected String formatTo(final Formatter formatter) { super.formatTo(formatter); final Convention convention = formatter.getConvention(); if (convention == Convention.INTERNAL) { formatter.append(getPixelInCell()); // This is an extension compared to ISO 19162. } else if (convention.majorVersion() == 1) { formatter.setInvalidWKT(this, null); } return formatter.shortOrLong(WKTKeywords.IDatum, WKTKeywords.ImageDatum); }
/** * Formats this datum as a <cite>Well Known Text</cite> {@code ImageDatum[…]} element. * * <div class="note"><b>Compatibility note:</b> * {@code ImageDatum} is defined in the WKT 2 specification only.</div> * * @return {@code "ImageDatum"}. * * @see <a href="http://docs.opengeospatial.org/is/12-063r5/12-063r5.html#81">WKT 2 specification §12.2</a> */ @Override protected String formatTo(final Formatter formatter) { super.formatTo(formatter); final Convention convention = formatter.getConvention(); if (convention == Convention.INTERNAL) { formatter.append(getPixelInCell()); // This is an extension compared to ISO 19162. } else if (convention.majorVersion() == 1) { formatter.setInvalidWKT(this, null); } return formatter.shortOrLong(WKTKeywords.IDatum, WKTKeywords.ImageDatum); }
/** * Formats this datum as a <cite>Well Known Text</cite> {@code VerticalDatum[…]} element. * * <div class="note"><b>Compatibility note:</b> * OGC 01-009 defined numerical codes for various vertical datum types, for example 2005 for geoidal height * and 2002 for ellipsoidal height. Such codes were formatted for all {@code Datum} subtypes in WKT 1. * Datum types became provided only for vertical datum in the ISO 19111:2003 specification, then removed * completely in ISO 19111:2007.</div> * * @return {@code "VerticalDatum"} (WKT 2) or {@code "Vert_Datum"} (WKT 1). * * @see <a href="http://docs.opengeospatial.org/is/12-063r5/12-063r5.html#71">WKT 2 specification §10.2</a> */ @Override protected String formatTo(final Formatter formatter) { super.formatTo(formatter); if (formatter.getConvention().majorVersion() == 1) { formatter.append(VerticalDatumTypes.toLegacy(type())); return WKTKeywords.Vert_Datum; } return formatter.shortOrLong(WKTKeywords.VDatum, WKTKeywords.VerticalDatum); }
/** * Formats this datum as a <cite>Well Known Text</cite> {@code TimeDatum[…]} element. * * <div class="note"><b>Compatibility note:</b> * {@code TimeDatum} is defined in the WKT 2 specification only.</div> * * @return {@code "TimeDatum"}. * * @see <a href="http://docs.opengeospatial.org/is/12-063r5/12-063r5.html#90">WKT 2 specification §14.2</a> */ @Override protected String formatTo(final Formatter formatter) { super.formatTo(formatter); formatter.append(new Origin(getOrigin())); if (formatter.getConvention().majorVersion() == 1) { formatter.setInvalidWKT(this, null); } return formatter.shortOrLong(WKTKeywords.TDatum, WKTKeywords.TimeDatum); }
/** * Formats this datum as a <cite>Well Known Text</cite> {@code TimeDatum[…]} element. * * <div class="note"><b>Compatibility note:</b> * {@code TimeDatum} is defined in the WKT 2 specification only.</div> * * @return {@code "TimeDatum"}. * * @see <a href="http://docs.opengeospatial.org/is/12-063r5/12-063r5.html#90">WKT 2 specification §14.2</a> */ @Override protected String formatTo(final Formatter formatter) { super.formatTo(formatter); formatter.append(new Origin(getOrigin())); if (formatter.getConvention().majorVersion() == 1) { formatter.setInvalidWKT(this, null); } return formatter.shortOrLong(WKTKeywords.TDatum, WKTKeywords.TimeDatum); }