http://git-wip-us.apache.org/repos/asf/olingo-odata4/blob/d1507449/lib/commons-core/src/main/java/org/apache/olingo/commons/core/edm/annotation/EdmLabeledElementImpl.java ---------------------------------------------------------------------- diff --git a/lib/commons-core/src/main/java/org/apache/olingo/commons/core/edm/annotation/EdmLabeledElementImpl.java b/lib/commons-core/src/main/java/org/apache/olingo/commons/core/edm/annotation/EdmLabeledElementImpl.java index b6aa511..d921017 100644 --- a/lib/commons-core/src/main/java/org/apache/olingo/commons/core/edm/annotation/EdmLabeledElementImpl.java +++ b/lib/commons-core/src/main/java/org/apache/olingo/commons/core/edm/annotation/EdmLabeledElementImpl.java @@ -6,9 +6,9 @@ * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at - * + * * http://www.apache.org/licenses/LICENSE-2.0 - * + * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY @@ -22,7 +22,7 @@ import org.apache.olingo.commons.api.edm.annotation.EdmDynamicAnnotationExpressi import org.apache.olingo.commons.api.edm.annotation.EdmLabeledElement; public class EdmLabeledElementImpl - extends AbstractEdmAnnotatableDynamicAnnotationExpression implements EdmLabeledElement { +extends AbstractEdmAnnotatableDynamicAnnotationExpression implements EdmLabeledElement { private final String name;
http://git-wip-us.apache.org/repos/asf/olingo-odata4/blob/d1507449/lib/commons-core/src/main/java/org/apache/olingo/commons/core/edm/annotation/EdmLabeledElementReferenceImpl.java ---------------------------------------------------------------------- diff --git a/lib/commons-core/src/main/java/org/apache/olingo/commons/core/edm/annotation/EdmLabeledElementReferenceImpl.java b/lib/commons-core/src/main/java/org/apache/olingo/commons/core/edm/annotation/EdmLabeledElementReferenceImpl.java index f2f9443..4eab4cb 100644 --- a/lib/commons-core/src/main/java/org/apache/olingo/commons/core/edm/annotation/EdmLabeledElementReferenceImpl.java +++ b/lib/commons-core/src/main/java/org/apache/olingo/commons/core/edm/annotation/EdmLabeledElementReferenceImpl.java @@ -6,9 +6,9 @@ * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at - * + * * http://www.apache.org/licenses/LICENSE-2.0 - * + * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY @@ -21,7 +21,7 @@ package org.apache.olingo.commons.core.edm.annotation; import org.apache.olingo.commons.api.edm.annotation.EdmLabeledElementReference; public class EdmLabeledElementReferenceImpl - extends AbstractEdmElementOrAttributeNotation implements EdmLabeledElementReference { +extends AbstractEdmElementOrAttributeNotation implements EdmLabeledElementReference { public EdmLabeledElementReferenceImpl(final String value) { super(value); http://git-wip-us.apache.org/repos/asf/olingo-odata4/blob/d1507449/lib/commons-core/src/main/java/org/apache/olingo/commons/core/edm/annotation/EdmLeImpl.java ---------------------------------------------------------------------- diff --git a/lib/commons-core/src/main/java/org/apache/olingo/commons/core/edm/annotation/EdmLeImpl.java b/lib/commons-core/src/main/java/org/apache/olingo/commons/core/edm/annotation/EdmLeImpl.java index 6e8238f..cfca96b 100644 --- a/lib/commons-core/src/main/java/org/apache/olingo/commons/core/edm/annotation/EdmLeImpl.java +++ b/lib/commons-core/src/main/java/org/apache/olingo/commons/core/edm/annotation/EdmLeImpl.java @@ -6,9 +6,9 @@ * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at - * + * * http://www.apache.org/licenses/LICENSE-2.0 - * + * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY http://git-wip-us.apache.org/repos/asf/olingo-odata4/blob/d1507449/lib/commons-core/src/main/java/org/apache/olingo/commons/core/edm/annotation/EdmLtImpl.java ---------------------------------------------------------------------- diff --git a/lib/commons-core/src/main/java/org/apache/olingo/commons/core/edm/annotation/EdmLtImpl.java b/lib/commons-core/src/main/java/org/apache/olingo/commons/core/edm/annotation/EdmLtImpl.java index 0a2739b..83ac2e6 100644 --- a/lib/commons-core/src/main/java/org/apache/olingo/commons/core/edm/annotation/EdmLtImpl.java +++ b/lib/commons-core/src/main/java/org/apache/olingo/commons/core/edm/annotation/EdmLtImpl.java @@ -6,9 +6,9 @@ * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at - * + * * http://www.apache.org/licenses/LICENSE-2.0 - * + * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY http://git-wip-us.apache.org/repos/asf/olingo-odata4/blob/d1507449/lib/commons-core/src/main/java/org/apache/olingo/commons/core/edm/annotation/EdmNavigationPropertyPathImpl.java ---------------------------------------------------------------------- diff --git a/lib/commons-core/src/main/java/org/apache/olingo/commons/core/edm/annotation/EdmNavigationPropertyPathImpl.java b/lib/commons-core/src/main/java/org/apache/olingo/commons/core/edm/annotation/EdmNavigationPropertyPathImpl.java index 5bb6080..a1a7785 100644 --- a/lib/commons-core/src/main/java/org/apache/olingo/commons/core/edm/annotation/EdmNavigationPropertyPathImpl.java +++ b/lib/commons-core/src/main/java/org/apache/olingo/commons/core/edm/annotation/EdmNavigationPropertyPathImpl.java @@ -6,9 +6,9 @@ * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at - * + * * http://www.apache.org/licenses/LICENSE-2.0 - * + * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY @@ -21,7 +21,7 @@ package org.apache.olingo.commons.core.edm.annotation; import org.apache.olingo.commons.api.edm.annotation.EdmNavigationPropertyPath; public class EdmNavigationPropertyPathImpl - extends AbstractEdmElementOrAttributeNotation implements EdmNavigationPropertyPath { +extends AbstractEdmElementOrAttributeNotation implements EdmNavigationPropertyPath { public EdmNavigationPropertyPathImpl(final String value) { super(value); http://git-wip-us.apache.org/repos/asf/olingo-odata4/blob/d1507449/lib/commons-core/src/main/java/org/apache/olingo/commons/core/edm/annotation/EdmNeImpl.java ---------------------------------------------------------------------- diff --git a/lib/commons-core/src/main/java/org/apache/olingo/commons/core/edm/annotation/EdmNeImpl.java b/lib/commons-core/src/main/java/org/apache/olingo/commons/core/edm/annotation/EdmNeImpl.java index c27131d..67679eb 100644 --- a/lib/commons-core/src/main/java/org/apache/olingo/commons/core/edm/annotation/EdmNeImpl.java +++ b/lib/commons-core/src/main/java/org/apache/olingo/commons/core/edm/annotation/EdmNeImpl.java @@ -6,9 +6,9 @@ * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at - * + * * http://www.apache.org/licenses/LICENSE-2.0 - * + * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY http://git-wip-us.apache.org/repos/asf/olingo-odata4/blob/d1507449/lib/commons-core/src/main/java/org/apache/olingo/commons/core/edm/annotation/EdmNotImpl.java ---------------------------------------------------------------------- diff --git a/lib/commons-core/src/main/java/org/apache/olingo/commons/core/edm/annotation/EdmNotImpl.java b/lib/commons-core/src/main/java/org/apache/olingo/commons/core/edm/annotation/EdmNotImpl.java index 42ca3cb..cce2cbe 100644 --- a/lib/commons-core/src/main/java/org/apache/olingo/commons/core/edm/annotation/EdmNotImpl.java +++ b/lib/commons-core/src/main/java/org/apache/olingo/commons/core/edm/annotation/EdmNotImpl.java @@ -6,9 +6,9 @@ * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at - * + * * http://www.apache.org/licenses/LICENSE-2.0 - * + * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY http://git-wip-us.apache.org/repos/asf/olingo-odata4/blob/d1507449/lib/commons-core/src/main/java/org/apache/olingo/commons/core/edm/annotation/EdmNullImpl.java ---------------------------------------------------------------------- diff --git a/lib/commons-core/src/main/java/org/apache/olingo/commons/core/edm/annotation/EdmNullImpl.java b/lib/commons-core/src/main/java/org/apache/olingo/commons/core/edm/annotation/EdmNullImpl.java index 0d7bea3..f8b127e 100644 --- a/lib/commons-core/src/main/java/org/apache/olingo/commons/core/edm/annotation/EdmNullImpl.java +++ b/lib/commons-core/src/main/java/org/apache/olingo/commons/core/edm/annotation/EdmNullImpl.java @@ -6,9 +6,9 @@ * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at - * + * * http://www.apache.org/licenses/LICENSE-2.0 - * + * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY @@ -21,5 +21,5 @@ package org.apache.olingo.commons.core.edm.annotation; import org.apache.olingo.commons.api.edm.annotation.EdmNull; public class EdmNullImpl extends AbstractEdmAnnotatableDynamicAnnotationExpression implements EdmNull { -//No additional methods needed for now. + // No additional methods needed for now. } http://git-wip-us.apache.org/repos/asf/olingo-odata4/blob/d1507449/lib/commons-core/src/main/java/org/apache/olingo/commons/core/edm/annotation/EdmOrImpl.java ---------------------------------------------------------------------- diff --git a/lib/commons-core/src/main/java/org/apache/olingo/commons/core/edm/annotation/EdmOrImpl.java b/lib/commons-core/src/main/java/org/apache/olingo/commons/core/edm/annotation/EdmOrImpl.java index 6531a12..3746300 100644 --- a/lib/commons-core/src/main/java/org/apache/olingo/commons/core/edm/annotation/EdmOrImpl.java +++ b/lib/commons-core/src/main/java/org/apache/olingo/commons/core/edm/annotation/EdmOrImpl.java @@ -6,9 +6,9 @@ * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at - * + * * http://www.apache.org/licenses/LICENSE-2.0 - * + * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY http://git-wip-us.apache.org/repos/asf/olingo-odata4/blob/d1507449/lib/commons-core/src/main/java/org/apache/olingo/commons/core/edm/annotation/EdmPathImpl.java ---------------------------------------------------------------------- diff --git a/lib/commons-core/src/main/java/org/apache/olingo/commons/core/edm/annotation/EdmPathImpl.java b/lib/commons-core/src/main/java/org/apache/olingo/commons/core/edm/annotation/EdmPathImpl.java index d9e2900..669609c 100644 --- a/lib/commons-core/src/main/java/org/apache/olingo/commons/core/edm/annotation/EdmPathImpl.java +++ b/lib/commons-core/src/main/java/org/apache/olingo/commons/core/edm/annotation/EdmPathImpl.java @@ -6,9 +6,9 @@ * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at - * + * * http://www.apache.org/licenses/LICENSE-2.0 - * + * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY http://git-wip-us.apache.org/repos/asf/olingo-odata4/blob/d1507449/lib/commons-core/src/main/java/org/apache/olingo/commons/core/edm/annotation/EdmPropertyPathImpl.java ---------------------------------------------------------------------- diff --git a/lib/commons-core/src/main/java/org/apache/olingo/commons/core/edm/annotation/EdmPropertyPathImpl.java b/lib/commons-core/src/main/java/org/apache/olingo/commons/core/edm/annotation/EdmPropertyPathImpl.java index c81aa43..7809b34 100644 --- a/lib/commons-core/src/main/java/org/apache/olingo/commons/core/edm/annotation/EdmPropertyPathImpl.java +++ b/lib/commons-core/src/main/java/org/apache/olingo/commons/core/edm/annotation/EdmPropertyPathImpl.java @@ -6,9 +6,9 @@ * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at - * + * * http://www.apache.org/licenses/LICENSE-2.0 - * + * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY http://git-wip-us.apache.org/repos/asf/olingo-odata4/blob/d1507449/lib/commons-core/src/main/java/org/apache/olingo/commons/core/edm/annotation/EdmPropertyValueImpl.java ---------------------------------------------------------------------- diff --git a/lib/commons-core/src/main/java/org/apache/olingo/commons/core/edm/annotation/EdmPropertyValueImpl.java b/lib/commons-core/src/main/java/org/apache/olingo/commons/core/edm/annotation/EdmPropertyValueImpl.java index 7ca003f..08307ea 100644 --- a/lib/commons-core/src/main/java/org/apache/olingo/commons/core/edm/annotation/EdmPropertyValueImpl.java +++ b/lib/commons-core/src/main/java/org/apache/olingo/commons/core/edm/annotation/EdmPropertyValueImpl.java @@ -6,9 +6,9 @@ * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at - * + * * http://www.apache.org/licenses/LICENSE-2.0 - * + * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY @@ -22,7 +22,7 @@ import org.apache.olingo.commons.api.edm.annotation.EdmAnnotationExpression; import org.apache.olingo.commons.api.edm.annotation.EdmPropertyValue; public class EdmPropertyValueImpl - extends AbstractEdmAnnotatableDynamicAnnotationExpression implements EdmPropertyValue { +extends AbstractEdmAnnotatableDynamicAnnotationExpression implements EdmPropertyValue { private final String property; http://git-wip-us.apache.org/repos/asf/olingo-odata4/blob/d1507449/lib/commons-core/src/main/java/org/apache/olingo/commons/core/edm/annotation/EdmRecordImpl.java ---------------------------------------------------------------------- diff --git a/lib/commons-core/src/main/java/org/apache/olingo/commons/core/edm/annotation/EdmRecordImpl.java b/lib/commons-core/src/main/java/org/apache/olingo/commons/core/edm/annotation/EdmRecordImpl.java index cd71c6c..9464e34 100644 --- a/lib/commons-core/src/main/java/org/apache/olingo/commons/core/edm/annotation/EdmRecordImpl.java +++ b/lib/commons-core/src/main/java/org/apache/olingo/commons/core/edm/annotation/EdmRecordImpl.java @@ -1,18 +1,18 @@ /* * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file + * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file + * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the + * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. */ http://git-wip-us.apache.org/repos/asf/olingo-odata4/blob/d1507449/lib/commons-core/src/main/java/org/apache/olingo/commons/core/edm/annotation/EdmUrlRefImpl.java ---------------------------------------------------------------------- diff --git a/lib/commons-core/src/main/java/org/apache/olingo/commons/core/edm/annotation/EdmUrlRefImpl.java b/lib/commons-core/src/main/java/org/apache/olingo/commons/core/edm/annotation/EdmUrlRefImpl.java index 565d4b0..3c2db50 100644 --- a/lib/commons-core/src/main/java/org/apache/olingo/commons/core/edm/annotation/EdmUrlRefImpl.java +++ b/lib/commons-core/src/main/java/org/apache/olingo/commons/core/edm/annotation/EdmUrlRefImpl.java @@ -6,9 +6,9 @@ * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at - * + * * http://www.apache.org/licenses/LICENSE-2.0 - * + * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY http://git-wip-us.apache.org/repos/asf/olingo-odata4/blob/d1507449/lib/commons-core/src/main/java/org/apache/olingo/commons/core/edm/primitivetype/AbstractGeospatialType.java ---------------------------------------------------------------------- diff --git a/lib/commons-core/src/main/java/org/apache/olingo/commons/core/edm/primitivetype/AbstractGeospatialType.java b/lib/commons-core/src/main/java/org/apache/olingo/commons/core/edm/primitivetype/AbstractGeospatialType.java index 96ab236..dd0d025 100644 --- a/lib/commons-core/src/main/java/org/apache/olingo/commons/core/edm/primitivetype/AbstractGeospatialType.java +++ b/lib/commons-core/src/main/java/org/apache/olingo/commons/core/edm/primitivetype/AbstractGeospatialType.java @@ -6,9 +6,9 @@ * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at - * + * * http://www.apache.org/licenses/LICENSE-2.0 - * + * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY @@ -18,6 +18,13 @@ */ package org.apache.olingo.commons.core.edm.primitivetype; +import java.util.ArrayList; +import java.util.Collections; +import java.util.Iterator; +import java.util.List; +import java.util.regex.Matcher; +import java.util.regex.Pattern; + import org.apache.commons.lang3.StringUtils; import org.apache.olingo.commons.api.edm.EdmPrimitiveTypeException; import org.apache.olingo.commons.api.edm.geo.Geospatial; @@ -32,13 +39,6 @@ import org.apache.olingo.commons.api.edm.geo.Point; import org.apache.olingo.commons.api.edm.geo.Polygon; import org.apache.olingo.commons.api.edm.geo.SRID; -import java.util.ArrayList; -import java.util.Collections; -import java.util.Iterator; -import java.util.List; -import java.util.regex.Matcher; -import java.util.regex.Pattern; - public abstract class AbstractGeospatialType<T extends Geospatial> extends SingletonPrimitiveType { private static final Pattern PATTERN = @@ -87,7 +87,7 @@ public abstract class AbstractGeospatialType<T extends Geospatial> extends Singl private Point newPoint(final SRID srid, final String point, final Boolean isNullable, final Integer maxLength, final Integer precision, final Integer scale, final Boolean isUnicode) - throws EdmPrimitiveTypeException { + throws EdmPrimitiveTypeException { final String[] pointCoo = StringUtils.split(point, ' '); if (pointCoo == null || pointCoo.length != 2) { @@ -128,7 +128,7 @@ public abstract class AbstractGeospatialType<T extends Geospatial> extends Singl private LineString newLineString(final SRID srid, final String lineString, final Boolean isNullable, final Integer maxLength, final Integer precision, final Integer scale, final Boolean isUnicode) - throws EdmPrimitiveTypeException { + throws EdmPrimitiveTypeException { final List<Point> points = new ArrayList<Point>(); for (String pointCoo : StringUtils.split(lineString, ',')) { @@ -149,7 +149,7 @@ public abstract class AbstractGeospatialType<T extends Geospatial> extends Singl protected MultiLineString stringToMultiLineString(final String value, final Boolean isNullable, final Integer maxLength, final Integer precision, final Integer scale, final Boolean isUnicode) - throws EdmPrimitiveTypeException { + throws EdmPrimitiveTypeException { final Matcher matcher = getMatcher(PATTERN, value); @@ -173,7 +173,7 @@ public abstract class AbstractGeospatialType<T extends Geospatial> extends Singl private Polygon newPolygon(final SRID srid, final String polygon, final Boolean isNullable, final Integer maxLength, final Integer precision, final Integer scale, final Boolean isUnicode) - throws EdmPrimitiveTypeException { + throws EdmPrimitiveTypeException { final String[] first = polygon.split("\\),\\("); @@ -229,7 +229,7 @@ public abstract class AbstractGeospatialType<T extends Geospatial> extends Singl protected GeospatialCollection stringToCollection(final String value, final Boolean isNullable, final Integer maxLength, final Integer precision, final Integer scale, final Boolean isUnicode) - throws EdmPrimitiveTypeException { + throws EdmPrimitiveTypeException { final Matcher matcher = getMatcher(COLLECTION_PATTERN, value); @@ -294,15 +294,15 @@ public abstract class AbstractGeospatialType<T extends Geospatial> extends Singl private String point(final Point point, final Boolean isNullable, final Integer maxLength, final Integer precision, final Integer scale, final Boolean isUnicode) - throws EdmPrimitiveTypeException { + throws EdmPrimitiveTypeException { return new StringBuilder(). append(EdmDouble.getInstance().valueToString(point.getX(), isNullable, maxLength, precision, scale, isUnicode)). - append(' '). - append(EdmDouble.getInstance().valueToString(point.getY(), - isNullable, maxLength, precision, scale, isUnicode)). - toString(); + append(' '). + append(EdmDouble.getInstance().valueToString(point.getY(), + isNullable, maxLength, precision, scale, isUnicode)). + toString(); } protected String toString(final Point point, final Boolean isNullable, final Integer maxLength, @@ -333,8 +333,8 @@ public abstract class AbstractGeospatialType<T extends Geospatial> extends Singl for (final Iterator<Point> itor = multiPoint.iterator(); itor.hasNext();) { result.append('('). - append(point(itor.next(), isNullable, maxLength, precision, scale, isUnicode)). - append(')'); + append(point(itor.next(), isNullable, maxLength, precision, scale, isUnicode)). + append(')'); if (itor.hasNext()) { result.append(','); } @@ -345,7 +345,7 @@ public abstract class AbstractGeospatialType<T extends Geospatial> extends Singl private String lineString(final LineString lineString, final Boolean isNullable, final Integer maxLength, final Integer precision, final Integer scale, final Boolean isUnicode) - throws EdmPrimitiveTypeException { + throws EdmPrimitiveTypeException { final StringBuilder result = new StringBuilder(); @@ -386,8 +386,8 @@ public abstract class AbstractGeospatialType<T extends Geospatial> extends Singl for (final Iterator<LineString> itor = multiLineString.iterator(); itor.hasNext();) { result.append('('). - append(lineString(itor.next(), isNullable, maxLength, precision, scale, isUnicode)). - append(')'); + append(lineString(itor.next(), isNullable, maxLength, precision, scale, isUnicode)). + append(')'); if (itor.hasNext()) { result.append(','); } @@ -398,7 +398,7 @@ public abstract class AbstractGeospatialType<T extends Geospatial> extends Singl private String polygon(final Polygon polygon, final Boolean isNullable, final Integer maxLength, final Integer precision, final Integer scale, final Boolean isUnicode) - throws EdmPrimitiveTypeException { + throws EdmPrimitiveTypeException { final StringBuilder result = new StringBuilder(); @@ -447,8 +447,8 @@ public abstract class AbstractGeospatialType<T extends Geospatial> extends Singl for (final Iterator<Polygon> itor = multiPolygon.iterator(); itor.hasNext();) { result.append('('). - append(polygon(itor.next(), isNullable, maxLength, precision, scale, isUnicode)). - append(')'); + append(polygon(itor.next(), isNullable, maxLength, precision, scale, isUnicode)). + append(')'); if (itor.hasNext()) { result.append(','); } @@ -480,8 +480,8 @@ public abstract class AbstractGeospatialType<T extends Geospatial> extends Singl case GeometryMultiPoint: for (final Iterator<Point> itor = ((MultiPoint) item).iterator(); itor.hasNext();) { result.append('('). - append(point(itor.next(), isNullable, maxLength, precision, scale, isUnicode)). - append(')'); + append(point(itor.next(), isNullable, maxLength, precision, scale, isUnicode)). + append(')'); if (itor.hasNext()) { result.append(','); } @@ -497,8 +497,8 @@ public abstract class AbstractGeospatialType<T extends Geospatial> extends Singl case GeometryMultiLineString: for (final Iterator<LineString> itor = ((MultiLineString) item).iterator(); itor.hasNext();) { result.append('('). - append(lineString(itor.next(), isNullable, maxLength, precision, scale, isUnicode)). - append(')'); + append(lineString(itor.next(), isNullable, maxLength, precision, scale, isUnicode)). + append(')'); if (itor.hasNext()) { result.append(','); } @@ -514,8 +514,8 @@ public abstract class AbstractGeospatialType<T extends Geospatial> extends Singl case GeometryMultiPolygon: for (final Iterator<Polygon> itor = ((MultiPolygon) item).iterator(); itor.hasNext();) { result.append('('). - append(polygon(itor.next(), isNullable, maxLength, precision, scale, isUnicode)). - append(')'); + append(polygon(itor.next(), isNullable, maxLength, precision, scale, isUnicode)). + append(')'); if (itor.hasNext()) { result.append(','); } http://git-wip-us.apache.org/repos/asf/olingo-odata4/blob/d1507449/lib/commons-core/src/main/java/org/apache/olingo/commons/core/edm/primitivetype/AbstractPrimitiveType.java ---------------------------------------------------------------------- diff --git a/lib/commons-core/src/main/java/org/apache/olingo/commons/core/edm/primitivetype/AbstractPrimitiveType.java b/lib/commons-core/src/main/java/org/apache/olingo/commons/core/edm/primitivetype/AbstractPrimitiveType.java index 4928d17..feae934 100644 --- a/lib/commons-core/src/main/java/org/apache/olingo/commons/core/edm/primitivetype/AbstractPrimitiveType.java +++ b/lib/commons-core/src/main/java/org/apache/olingo/commons/core/edm/primitivetype/AbstractPrimitiveType.java @@ -6,9 +6,9 @@ * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at - * + * * http://www.apache.org/licenses/LICENSE-2.0 - * + * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY @@ -58,7 +58,7 @@ abstract class AbstractPrimitiveType implements EdmPrimitiveType { public final <T> T valueOfString(final String value, final Boolean isNullable, final Integer maxLength, final Integer precision, final Integer scale, final Boolean isUnicode, final Class<T> returnType) - throws EdmPrimitiveTypeException { + throws EdmPrimitiveTypeException { if (value == null) { if (isNullable != null && !isNullable) { @@ -93,7 +93,7 @@ abstract class AbstractPrimitiveType implements EdmPrimitiveType { @Override public String toUriLiteral(final String literal) { return literal == null ? null : - uriPrefix.isEmpty() && uriSuffix.isEmpty() ? literal : uriPrefix + literal + uriSuffix; + uriPrefix.isEmpty() && uriSuffix.isEmpty() ? literal : uriPrefix + literal + uriSuffix; } @Override http://git-wip-us.apache.org/repos/asf/olingo-odata4/blob/d1507449/lib/commons-core/src/main/java/org/apache/olingo/commons/core/edm/primitivetype/EdmBinary.java ---------------------------------------------------------------------- diff --git a/lib/commons-core/src/main/java/org/apache/olingo/commons/core/edm/primitivetype/EdmBinary.java b/lib/commons-core/src/main/java/org/apache/olingo/commons/core/edm/primitivetype/EdmBinary.java index 8e1c95e..735250a 100644 --- a/lib/commons-core/src/main/java/org/apache/olingo/commons/core/edm/primitivetype/EdmBinary.java +++ b/lib/commons-core/src/main/java/org/apache/olingo/commons/core/edm/primitivetype/EdmBinary.java @@ -6,9 +6,9 @@ * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at - * + * * http://www.apache.org/licenses/LICENSE-2.0 - * + * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY @@ -19,6 +19,7 @@ package org.apache.olingo.commons.core.edm.primitivetype; import java.nio.charset.Charset; + import org.apache.commons.codec.binary.Base64; import org.apache.olingo.commons.api.edm.EdmPrimitiveTypeException; @@ -50,13 +51,13 @@ public class EdmBinary extends SingletonPrimitiveType { * <b>NOTE</b>: this is provided here from Commons Codec for Android compatibility. */ private static final byte[] DECODE_TABLE = { - -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, - -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, - -1, -1, -1, -1, -1, -1, -1, -1, -1, 62, -1, 62, -1, 63, 52, 53, 54, - 55, 56, 57, 58, 59, 60, 61, -1, -1, -1, -1, -1, -1, -1, 0, 1, 2, 3, 4, - 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, - 24, 25, -1, -1, -1, -1, 63, -1, 26, 27, 28, 29, 30, 31, 32, 33, 34, - 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51 + -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, -1, 62, -1, 62, -1, 63, 52, 53, 54, + 55, 56, 57, 58, 59, 60, 61, -1, -1, -1, -1, -1, -1, -1, 0, 1, 2, 3, 4, + 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, + 24, 25, -1, -1, -1, -1, 63, -1, 26, 27, 28, 29, 30, 31, 32, 33, 34, + 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51 }; private static final EdmBinary INSTANCE = new EdmBinary(); @@ -85,13 +86,13 @@ public class EdmBinary extends SingletonPrimitiveType { */ private static boolean isWhiteSpace(final byte byteToCheck) { switch (byteToCheck) { - case ' ': - case '\n': - case '\r': - case '\t': - return true; - default: - return false; + case ' ': + case '\n': + case '\r': + case '\t': + return true; + default: + return false; } } @@ -129,22 +130,22 @@ public class EdmBinary extends SingletonPrimitiveType { @Override public boolean validate(final String value, - final Boolean isNullable, final Integer maxLength, final Integer precision, - final Integer scale, final Boolean isUnicode) { + final Boolean isNullable, final Integer maxLength, final Integer precision, + final Integer scale, final Boolean isUnicode) { return value == null - ? isNullable == null || isNullable - : isBase64(value.getBytes(UTF_8)) && validateMaxLength(value, maxLength); + ? isNullable == null || isNullable + : isBase64(value.getBytes(UTF_8)) && validateMaxLength(value, maxLength); } private static boolean validateMaxLength(final String value, final Integer maxLength) { return maxLength == null ? true - : // Every three bytes are represented as four base-64 characters. - // Additionally, there could be up to two padding "=" characters - // if the number of bytes is not a multiple of three, - // and there could be line feeds, possibly with carriage returns. - maxLength >= (value.length() - lineEndingsLength(value)) * 3 / 4 - - (value.endsWith("==") ? 2 : value.endsWith("=") ? 1 : 0); + : // Every three bytes are represented as four base-64 characters. + // Additionally, there could be up to two padding "=" characters + // if the number of bytes is not a multiple of three, + // and there could be line feeds, possibly with carriage returns. + maxLength >= (value.length() - lineEndingsLength(value)) * 3 / 4 + - (value.endsWith("==") ? 2 : value.endsWith("=") ? 1 : 0); } private static int lineEndingsLength(final String value) { @@ -159,8 +160,8 @@ public class EdmBinary extends SingletonPrimitiveType { @Override protected <T> T internalValueOfString(final String value, - final Boolean isNullable, final Integer maxLength, final Integer precision, - final Integer scale, final Boolean isUnicode, final Class<T> returnType) throws EdmPrimitiveTypeException { + final Boolean isNullable, final Integer maxLength, final Integer precision, + final Integer scale, final Boolean isUnicode, final Class<T> returnType) throws EdmPrimitiveTypeException { if (value == null || !isBase64(value.getBytes(UTF_8))) { throw new EdmPrimitiveTypeException("The literal '" + value + "' has illegal content."); @@ -186,8 +187,8 @@ public class EdmBinary extends SingletonPrimitiveType { @Override protected <T> String internalValueToString(final T value, - final Boolean isNullable, final Integer maxLength, final Integer precision, - final Integer scale, final Boolean isUnicode) throws EdmPrimitiveTypeException { + final Boolean isNullable, final Integer maxLength, final Integer precision, + final Integer scale, final Boolean isUnicode) throws EdmPrimitiveTypeException { byte[] byteArrayValue; if (value instanceof byte[]) { http://git-wip-us.apache.org/repos/asf/olingo-odata4/blob/d1507449/lib/commons-core/src/main/java/org/apache/olingo/commons/core/edm/primitivetype/EdmBoolean.java ---------------------------------------------------------------------- diff --git a/lib/commons-core/src/main/java/org/apache/olingo/commons/core/edm/primitivetype/EdmBoolean.java b/lib/commons-core/src/main/java/org/apache/olingo/commons/core/edm/primitivetype/EdmBoolean.java index b009a65..6c5ec9f 100644 --- a/lib/commons-core/src/main/java/org/apache/olingo/commons/core/edm/primitivetype/EdmBoolean.java +++ b/lib/commons-core/src/main/java/org/apache/olingo/commons/core/edm/primitivetype/EdmBoolean.java @@ -6,9 +6,9 @@ * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at - * + * * http://www.apache.org/licenses/LICENSE-2.0 - * + * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY http://git-wip-us.apache.org/repos/asf/olingo-odata4/blob/d1507449/lib/commons-core/src/main/java/org/apache/olingo/commons/core/edm/primitivetype/EdmByte.java ---------------------------------------------------------------------- diff --git a/lib/commons-core/src/main/java/org/apache/olingo/commons/core/edm/primitivetype/EdmByte.java b/lib/commons-core/src/main/java/org/apache/olingo/commons/core/edm/primitivetype/EdmByte.java index 68d1e1b..bd81f5c 100644 --- a/lib/commons-core/src/main/java/org/apache/olingo/commons/core/edm/primitivetype/EdmByte.java +++ b/lib/commons-core/src/main/java/org/apache/olingo/commons/core/edm/primitivetype/EdmByte.java @@ -6,9 +6,9 @@ * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at - * + * * http://www.apache.org/licenses/LICENSE-2.0 - * + * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY @@ -18,11 +18,11 @@ */ package org.apache.olingo.commons.core.edm.primitivetype; +import java.math.BigInteger; + import org.apache.olingo.commons.api.edm.EdmPrimitiveType; import org.apache.olingo.commons.api.edm.EdmPrimitiveTypeException; -import java.math.BigInteger; - /** * Implementation of the EDM primitive type Byte. */ http://git-wip-us.apache.org/repos/asf/olingo-odata4/blob/d1507449/lib/commons-core/src/main/java/org/apache/olingo/commons/core/edm/primitivetype/EdmDate.java ---------------------------------------------------------------------- diff --git a/lib/commons-core/src/main/java/org/apache/olingo/commons/core/edm/primitivetype/EdmDate.java b/lib/commons-core/src/main/java/org/apache/olingo/commons/core/edm/primitivetype/EdmDate.java index 71b747f..3eddca0 100644 --- a/lib/commons-core/src/main/java/org/apache/olingo/commons/core/edm/primitivetype/EdmDate.java +++ b/lib/commons-core/src/main/java/org/apache/olingo/commons/core/edm/primitivetype/EdmDate.java @@ -6,9 +6,9 @@ * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at - * + * * http://www.apache.org/licenses/LICENSE-2.0 - * + * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY @@ -18,13 +18,13 @@ */ package org.apache.olingo.commons.core.edm.primitivetype; -import org.apache.olingo.commons.api.edm.EdmPrimitiveTypeException; - import java.util.Calendar; import java.util.TimeZone; import java.util.regex.Matcher; import java.util.regex.Pattern; +import org.apache.olingo.commons.api.edm.EdmPrimitiveTypeException; + /** * Implementation of the EDM primitive type Date. */ http://git-wip-us.apache.org/repos/asf/olingo-odata4/blob/d1507449/lib/commons-core/src/main/java/org/apache/olingo/commons/core/edm/primitivetype/EdmDateTimeOffset.java ---------------------------------------------------------------------- diff --git a/lib/commons-core/src/main/java/org/apache/olingo/commons/core/edm/primitivetype/EdmDateTimeOffset.java b/lib/commons-core/src/main/java/org/apache/olingo/commons/core/edm/primitivetype/EdmDateTimeOffset.java index 6646c83..816a9af 100644 --- a/lib/commons-core/src/main/java/org/apache/olingo/commons/core/edm/primitivetype/EdmDateTimeOffset.java +++ b/lib/commons-core/src/main/java/org/apache/olingo/commons/core/edm/primitivetype/EdmDateTimeOffset.java @@ -6,9 +6,9 @@ * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at - * + * * http://www.apache.org/licenses/LICENSE-2.0 - * + * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY @@ -18,8 +18,6 @@ */ package org.apache.olingo.commons.core.edm.primitivetype; -import org.apache.olingo.commons.api.edm.EdmPrimitiveTypeException; - import java.sql.Timestamp; import java.text.DecimalFormat; import java.util.Calendar; @@ -28,6 +26,8 @@ import java.util.TimeZone; import java.util.regex.Matcher; import java.util.regex.Pattern; +import org.apache.olingo.commons.api.edm.EdmPrimitiveTypeException; + /** * Implementation of the EDM primitive type DateTimeOffset. */ @@ -41,7 +41,7 @@ public final class EdmDateTimeOffset extends SingletonPrimitiveType { }; private static final Pattern PATTERN = Pattern.compile( - "(-?\\p{Digit}{4,})-(\\p{Digit}{2})-(\\p{Digit}{2})" + "(-?\\p{Digit}{4,})-(\\p{Digit}{2})-(\\p{Digit}{2})" + "T(\\p{Digit}{2}):(\\p{Digit}{2})(?::(\\p{Digit}{2})(\\.(\\p{Digit}{0,12}?)0*)?)?" + "(Z|([-+]\\p{Digit}{2}:\\p{Digit}{2}))?"); @@ -58,8 +58,8 @@ public final class EdmDateTimeOffset extends SingletonPrimitiveType { @Override protected <T> T internalValueOfString(final String value, - final Boolean isNullable, final Integer maxLength, final Integer precision, - final Integer scale, final Boolean isUnicode, final Class<T> returnType) throws EdmPrimitiveTypeException { + final Boolean isNullable, final Integer maxLength, final Integer precision, + final Integer scale, final Boolean isUnicode, final Class<T> returnType) throws EdmPrimitiveTypeException { final Matcher matcher = PATTERN.matcher(value); if (!matcher.matches()) { @@ -67,7 +67,7 @@ public final class EdmDateTimeOffset extends SingletonPrimitiveType { } final String timeZoneOffset = matcher.group(9) == null || matcher.group(10) == null - || matcher.group(10).matches("[-+]0+:0+") ? null : matcher.group(10); + || matcher.group(10).matches("[-+]0+:0+") ? null : matcher.group(10); final Calendar dateTimeValue = Calendar.getInstance(TimeZone.getTimeZone("GMT" + timeZoneOffset)); if (dateTimeValue.get(Calendar.ZONE_OFFSET) == 0 && timeZoneOffset != null) { throw new EdmPrimitiveTypeException("The literal '" + value + "' has illegal content."); @@ -75,12 +75,12 @@ public final class EdmDateTimeOffset extends SingletonPrimitiveType { dateTimeValue.clear(); dateTimeValue.set( - Short.parseShort(matcher.group(1)), - Byte.parseByte(matcher.group(2)) - 1, // month is zero-based - Byte.parseByte(matcher.group(3)), - Byte.parseByte(matcher.group(4)), - Byte.parseByte(matcher.group(5)), - matcher.group(6) == null ? 0 : Byte.parseByte(matcher.group(6))); + Short.parseShort(matcher.group(1)), + Byte.parseByte(matcher.group(2)) - 1, // month is zero-based + Byte.parseByte(matcher.group(3)), + Byte.parseByte(matcher.group(4)), + Byte.parseByte(matcher.group(5)), + matcher.group(6) == null ? 0 : Byte.parseByte(matcher.group(6))); int nanoSeconds = 0; if (matcher.group(7) != null) { @@ -94,13 +94,13 @@ public final class EdmDateTimeOffset extends SingletonPrimitiveType { if (returnType.isAssignableFrom(Timestamp.class)) { if (!decimals.isEmpty()) { nanoSeconds = Integer.parseInt(decimals.length() > 9 ? decimals.substring(0, 9) - : decimals + "000000000".substring(decimals.length())); + : decimals + "000000000".substring(decimals.length())); } } else { final String milliSeconds = decimals.length() > 3 - ? decimals.substring(0, 3) - : decimals + "000".substring(decimals.length()); - dateTimeValue.set(Calendar.MILLISECOND, Short.parseShort(milliSeconds)); + ? decimals.substring(0, 3) + : decimals + "000".substring(decimals.length()); + dateTimeValue.set(Calendar.MILLISECOND, Short.parseShort(milliSeconds)); } } @@ -125,7 +125,7 @@ public final class EdmDateTimeOffset extends SingletonPrimitiveType { * @throws ClassCastException if the return type is not allowed */ protected static <T> T convertDateTime(final Calendar dateTimeValue, final int nanoSeconds, - final Class<T> returnType) throws IllegalArgumentException, ClassCastException { + final Class<T> returnType) throws IllegalArgumentException, ClassCastException { // The Calendar class does not check any values until a get method is called, // so we do just that to validate the fields that may have been set, @@ -154,8 +154,8 @@ public final class EdmDateTimeOffset extends SingletonPrimitiveType { @Override protected <T> String internalValueToString(final T value, - final Boolean isNullable, final Integer maxLength, final Integer precision, - final Integer scale, final Boolean isUnicode) throws EdmPrimitiveTypeException { + final Boolean isNullable, final Integer maxLength, final Integer precision, + final Integer scale, final Boolean isUnicode) throws EdmPrimitiveTypeException { final Calendar dateTimeValue; final int fractionalSecs; @@ -195,7 +195,7 @@ public final class EdmDateTimeOffset extends SingletonPrimitiveType { } final int offsetInMinutes = (dateTimeValue.get(Calendar.ZONE_OFFSET) - + dateTimeValue.get(Calendar.DST_OFFSET)) / 60 / 1000; + + dateTimeValue.get(Calendar.DST_OFFSET)) / 60 / 1000; final int offsetHours = offsetInMinutes / 60; final int offsetMinutes = Math.abs(offsetInMinutes % 60); final String offsetString = offsetInMinutes == 0 ? "Z" : String.format("%+03d:%02d", offsetHours, offsetMinutes); @@ -252,7 +252,7 @@ public final class EdmDateTimeOffset extends SingletonPrimitiveType { * @throws IllegalArgumentException if precision is not met */ protected static void appendMilliseconds(final StringBuilder result, final int milliseconds, - final Integer precision) throws IllegalArgumentException { + final Integer precision) throws IllegalArgumentException { final int digits = milliseconds % 1000 == 0 ? 0 : milliseconds % 100 == 0 ? 1 : milliseconds % 10 == 0 ? 2 : 3; if (digits > 0) { @@ -279,7 +279,7 @@ public final class EdmDateTimeOffset extends SingletonPrimitiveType { * @throws IllegalArgumentException if precision is not met */ protected static void appendFractionalSeconds(final StringBuilder result, final int fractionalSeconds, - final Integer precision) throws IllegalArgumentException { + final Integer precision) throws IllegalArgumentException { if (fractionalSeconds > 0) { String formatted = NANO_FORMAT.get().format(fractionalSeconds); http://git-wip-us.apache.org/repos/asf/olingo-odata4/blob/d1507449/lib/commons-core/src/main/java/org/apache/olingo/commons/core/edm/primitivetype/EdmDecimal.java ---------------------------------------------------------------------- diff --git a/lib/commons-core/src/main/java/org/apache/olingo/commons/core/edm/primitivetype/EdmDecimal.java b/lib/commons-core/src/main/java/org/apache/olingo/commons/core/edm/primitivetype/EdmDecimal.java index f4dbba1..a3aa348 100644 --- a/lib/commons-core/src/main/java/org/apache/olingo/commons/core/edm/primitivetype/EdmDecimal.java +++ b/lib/commons-core/src/main/java/org/apache/olingo/commons/core/edm/primitivetype/EdmDecimal.java @@ -6,9 +6,9 @@ * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at - * + * * http://www.apache.org/licenses/LICENSE-2.0 - * + * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY @@ -18,14 +18,14 @@ */ package org.apache.olingo.commons.core.edm.primitivetype; -import org.apache.olingo.commons.api.edm.EdmPrimitiveType; -import org.apache.olingo.commons.api.edm.EdmPrimitiveTypeException; - import java.math.BigDecimal; import java.math.BigInteger; import java.util.regex.Matcher; import java.util.regex.Pattern; +import org.apache.olingo.commons.api.edm.EdmPrimitiveType; +import org.apache.olingo.commons.api.edm.EdmPrimitiveTypeException; + /** * Implementation of the EDM primitive type Decimal. */ @@ -106,7 +106,7 @@ public final class EdmDecimal extends SingletonPrimitiveType { /** * Converts a {@link BigDecimal} value into the requested return type if possible. - * + * * @param value the value * @param returnType the class of the returned value; it must be one of {@link BigDecimal}, {@link Double}, * {@link Float}, {@link BigInteger}, {@link Long}, {@link Integer}, {@link Short}, or {@link Byte} @@ -179,12 +179,12 @@ public final class EdmDecimal extends SingletonPrimitiveType { final int digits = bigDecimalValue.scale() >= 0 ? Math.max(bigDecimalValue.precision(), bigDecimalValue.scale()) - : bigDecimalValue.precision() - bigDecimalValue.scale(); - if ((precision == null || precision >= digits) && (bigDecimalValue.scale() <= (scale == null ? 0 : scale))) { - result = bigDecimalValue.toPlainString(); - } else { - throw new EdmPrimitiveTypeException("The value '" + value + "' does not match the facets' constraints."); - } + : bigDecimalValue.precision() - bigDecimalValue.scale(); + if ((precision == null || precision >= digits) && (bigDecimalValue.scale() <= (scale == null ? 0 : scale))) { + result = bigDecimalValue.toPlainString(); + } else { + throw new EdmPrimitiveTypeException("The value '" + value + "' does not match the facets' constraints."); + } } else { throw new EdmPrimitiveTypeException("The value type " + value.getClass() + " is not supported."); http://git-wip-us.apache.org/repos/asf/olingo-odata4/blob/d1507449/lib/commons-core/src/main/java/org/apache/olingo/commons/core/edm/primitivetype/EdmDouble.java ---------------------------------------------------------------------- diff --git a/lib/commons-core/src/main/java/org/apache/olingo/commons/core/edm/primitivetype/EdmDouble.java b/lib/commons-core/src/main/java/org/apache/olingo/commons/core/edm/primitivetype/EdmDouble.java index 2cbdbfd..e216238 100644 --- a/lib/commons-core/src/main/java/org/apache/olingo/commons/core/edm/primitivetype/EdmDouble.java +++ b/lib/commons-core/src/main/java/org/apache/olingo/commons/core/edm/primitivetype/EdmDouble.java @@ -6,9 +6,9 @@ * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at - * + * * http://www.apache.org/licenses/LICENSE-2.0 - * + * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY @@ -18,12 +18,12 @@ */ package org.apache.olingo.commons.core.edm.primitivetype; -import org.apache.olingo.commons.api.edm.EdmPrimitiveType; -import org.apache.olingo.commons.api.edm.EdmPrimitiveTypeException; - import java.math.BigDecimal; import java.util.regex.Pattern; +import org.apache.olingo.commons.api.edm.EdmPrimitiveType; +import org.apache.olingo.commons.api.edm.EdmPrimitiveTypeException; + /** * Implementation of the EDM primitive type Double. */ http://git-wip-us.apache.org/repos/asf/olingo-odata4/blob/d1507449/lib/commons-core/src/main/java/org/apache/olingo/commons/core/edm/primitivetype/EdmDuration.java ---------------------------------------------------------------------- diff --git a/lib/commons-core/src/main/java/org/apache/olingo/commons/core/edm/primitivetype/EdmDuration.java b/lib/commons-core/src/main/java/org/apache/olingo/commons/core/edm/primitivetype/EdmDuration.java index b0de820..1d743aa 100644 --- a/lib/commons-core/src/main/java/org/apache/olingo/commons/core/edm/primitivetype/EdmDuration.java +++ b/lib/commons-core/src/main/java/org/apache/olingo/commons/core/edm/primitivetype/EdmDuration.java @@ -6,9 +6,9 @@ * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at - * + * * http://www.apache.org/licenses/LICENSE-2.0 - * + * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY @@ -18,13 +18,13 @@ */ package org.apache.olingo.commons.core.edm.primitivetype; -import org.apache.olingo.commons.api.edm.EdmPrimitiveTypeException; - import java.math.BigDecimal; import java.math.BigInteger; import java.util.regex.Matcher; import java.util.regex.Pattern; +import org.apache.olingo.commons.api.edm.EdmPrimitiveTypeException; + public class EdmDuration extends SingletonPrimitiveType { private static final Pattern PATTERN = Pattern.compile( @@ -63,9 +63,9 @@ public class EdmDuration extends SingletonPrimitiveType { : new BigDecimal(matcher.group(1)).multiply(BigDecimal.valueOf(24 * 60 * 60))). add(matcher.group(2) == null ? BigDecimal.ZERO : new BigDecimal(matcher.group(2)).multiply(BigDecimal.valueOf(60 * 60))). - add(matcher.group(3) == null ? BigDecimal.ZERO - : new BigDecimal(matcher.group(3)).multiply(BigDecimal.valueOf(60))). - add(matcher.group(4) == null ? BigDecimal.ZERO : new BigDecimal(matcher.group(4))); + add(matcher.group(3) == null ? BigDecimal.ZERO + : new BigDecimal(matcher.group(3)).multiply(BigDecimal.valueOf(60))). + add(matcher.group(4) == null ? BigDecimal.ZERO : new BigDecimal(matcher.group(4))); if (result.scale() <= (precision == null ? 0 : precision)) { result = value.charAt(0) == '-' ? result.negate() : result; http://git-wip-us.apache.org/repos/asf/olingo-odata4/blob/d1507449/lib/commons-core/src/main/java/org/apache/olingo/commons/core/edm/primitivetype/EdmGeography.java ---------------------------------------------------------------------- diff --git a/lib/commons-core/src/main/java/org/apache/olingo/commons/core/edm/primitivetype/EdmGeography.java b/lib/commons-core/src/main/java/org/apache/olingo/commons/core/edm/primitivetype/EdmGeography.java index 16db86d..37a8514 100644 --- a/lib/commons-core/src/main/java/org/apache/olingo/commons/core/edm/primitivetype/EdmGeography.java +++ b/lib/commons-core/src/main/java/org/apache/olingo/commons/core/edm/primitivetype/EdmGeography.java @@ -6,9 +6,9 @@ * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at - * + * * http://www.apache.org/licenses/LICENSE-2.0 - * + * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY @@ -37,7 +37,7 @@ public final class EdmGeography extends AbstractGeospatialType<Geospatial> { @Override protected <T> T internalValueOfString(final String value, final Boolean isNullable, final Integer maxLength, final Integer precision, final Integer scale, final Boolean isUnicode, final Class<T> returnType) - throws EdmPrimitiveTypeException { + throws EdmPrimitiveTypeException { throw new EdmPrimitiveTypeException("Not implemented!"); } http://git-wip-us.apache.org/repos/asf/olingo-odata4/blob/d1507449/lib/commons-core/src/main/java/org/apache/olingo/commons/core/edm/primitivetype/EdmGeographyCollection.java ---------------------------------------------------------------------- diff --git a/lib/commons-core/src/main/java/org/apache/olingo/commons/core/edm/primitivetype/EdmGeographyCollection.java b/lib/commons-core/src/main/java/org/apache/olingo/commons/core/edm/primitivetype/EdmGeographyCollection.java index 4ee35a2..af574fe 100644 --- a/lib/commons-core/src/main/java/org/apache/olingo/commons/core/edm/primitivetype/EdmGeographyCollection.java +++ b/lib/commons-core/src/main/java/org/apache/olingo/commons/core/edm/primitivetype/EdmGeographyCollection.java @@ -6,9 +6,9 @@ * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at - * + * * http://www.apache.org/licenses/LICENSE-2.0 - * + * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY http://git-wip-us.apache.org/repos/asf/olingo-odata4/blob/d1507449/lib/commons-core/src/main/java/org/apache/olingo/commons/core/edm/primitivetype/EdmGeographyLineString.java ---------------------------------------------------------------------- diff --git a/lib/commons-core/src/main/java/org/apache/olingo/commons/core/edm/primitivetype/EdmGeographyLineString.java b/lib/commons-core/src/main/java/org/apache/olingo/commons/core/edm/primitivetype/EdmGeographyLineString.java index 9027ed1..67da6a7 100644 --- a/lib/commons-core/src/main/java/org/apache/olingo/commons/core/edm/primitivetype/EdmGeographyLineString.java +++ b/lib/commons-core/src/main/java/org/apache/olingo/commons/core/edm/primitivetype/EdmGeographyLineString.java @@ -6,9 +6,9 @@ * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at - * + * * http://www.apache.org/licenses/LICENSE-2.0 - * + * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY http://git-wip-us.apache.org/repos/asf/olingo-odata4/blob/d1507449/lib/commons-core/src/main/java/org/apache/olingo/commons/core/edm/primitivetype/EdmGeographyMultiLineString.java ---------------------------------------------------------------------- diff --git a/lib/commons-core/src/main/java/org/apache/olingo/commons/core/edm/primitivetype/EdmGeographyMultiLineString.java b/lib/commons-core/src/main/java/org/apache/olingo/commons/core/edm/primitivetype/EdmGeographyMultiLineString.java index 6cd17b9..77ef0fa 100644 --- a/lib/commons-core/src/main/java/org/apache/olingo/commons/core/edm/primitivetype/EdmGeographyMultiLineString.java +++ b/lib/commons-core/src/main/java/org/apache/olingo/commons/core/edm/primitivetype/EdmGeographyMultiLineString.java @@ -6,9 +6,9 @@ * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at - * + * * http://www.apache.org/licenses/LICENSE-2.0 - * + * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY http://git-wip-us.apache.org/repos/asf/olingo-odata4/blob/d1507449/lib/commons-core/src/main/java/org/apache/olingo/commons/core/edm/primitivetype/EdmGeographyMultiPoint.java ---------------------------------------------------------------------- diff --git a/lib/commons-core/src/main/java/org/apache/olingo/commons/core/edm/primitivetype/EdmGeographyMultiPoint.java b/lib/commons-core/src/main/java/org/apache/olingo/commons/core/edm/primitivetype/EdmGeographyMultiPoint.java index f10aef7..10eab98 100644 --- a/lib/commons-core/src/main/java/org/apache/olingo/commons/core/edm/primitivetype/EdmGeographyMultiPoint.java +++ b/lib/commons-core/src/main/java/org/apache/olingo/commons/core/edm/primitivetype/EdmGeographyMultiPoint.java @@ -6,9 +6,9 @@ * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at - * + * * http://www.apache.org/licenses/LICENSE-2.0 - * + * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY @@ -38,7 +38,7 @@ public final class EdmGeographyMultiPoint extends AbstractGeospatialType<MultiPo @Override protected <T> T internalValueOfString(final String value, final Boolean isNullable, final Integer maxLength, final Integer precision, final Integer scale, final Boolean isUnicode, final Class<T> returnType) - throws EdmPrimitiveTypeException { + throws EdmPrimitiveTypeException { final MultiPoint point = stringToMultiPoint(value, isNullable, maxLength, precision, scale, isUnicode); if (returnType.isAssignableFrom(MultiPoint.class)) { http://git-wip-us.apache.org/repos/asf/olingo-odata4/blob/d1507449/lib/commons-core/src/main/java/org/apache/olingo/commons/core/edm/primitivetype/EdmGeographyMultiPolygon.java ---------------------------------------------------------------------- diff --git a/lib/commons-core/src/main/java/org/apache/olingo/commons/core/edm/primitivetype/EdmGeographyMultiPolygon.java b/lib/commons-core/src/main/java/org/apache/olingo/commons/core/edm/primitivetype/EdmGeographyMultiPolygon.java index f9c1012..109a56e 100644 --- a/lib/commons-core/src/main/java/org/apache/olingo/commons/core/edm/primitivetype/EdmGeographyMultiPolygon.java +++ b/lib/commons-core/src/main/java/org/apache/olingo/commons/core/edm/primitivetype/EdmGeographyMultiPolygon.java @@ -6,9 +6,9 @@ * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at - * + * * http://www.apache.org/licenses/LICENSE-2.0 - * + * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY http://git-wip-us.apache.org/repos/asf/olingo-odata4/blob/d1507449/lib/commons-core/src/main/java/org/apache/olingo/commons/core/edm/primitivetype/EdmGeographyPoint.java ---------------------------------------------------------------------- diff --git a/lib/commons-core/src/main/java/org/apache/olingo/commons/core/edm/primitivetype/EdmGeographyPoint.java b/lib/commons-core/src/main/java/org/apache/olingo/commons/core/edm/primitivetype/EdmGeographyPoint.java index eae0fdc..3de34ab 100644 --- a/lib/commons-core/src/main/java/org/apache/olingo/commons/core/edm/primitivetype/EdmGeographyPoint.java +++ b/lib/commons-core/src/main/java/org/apache/olingo/commons/core/edm/primitivetype/EdmGeographyPoint.java @@ -6,9 +6,9 @@ * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at - * + * * http://www.apache.org/licenses/LICENSE-2.0 - * + * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY http://git-wip-us.apache.org/repos/asf/olingo-odata4/blob/d1507449/lib/commons-core/src/main/java/org/apache/olingo/commons/core/edm/primitivetype/EdmGeographyPolygon.java ---------------------------------------------------------------------- diff --git a/lib/commons-core/src/main/java/org/apache/olingo/commons/core/edm/primitivetype/EdmGeographyPolygon.java b/lib/commons-core/src/main/java/org/apache/olingo/commons/core/edm/primitivetype/EdmGeographyPolygon.java index a9ccbfa..a37b05d 100644 --- a/lib/commons-core/src/main/java/org/apache/olingo/commons/core/edm/primitivetype/EdmGeographyPolygon.java +++ b/lib/commons-core/src/main/java/org/apache/olingo/commons/core/edm/primitivetype/EdmGeographyPolygon.java @@ -6,9 +6,9 @@ * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at - * + * * http://www.apache.org/licenses/LICENSE-2.0 - * + * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY http://git-wip-us.apache.org/repos/asf/olingo-odata4/blob/d1507449/lib/commons-core/src/main/java/org/apache/olingo/commons/core/edm/primitivetype/EdmGeometry.java ---------------------------------------------------------------------- diff --git a/lib/commons-core/src/main/java/org/apache/olingo/commons/core/edm/primitivetype/EdmGeometry.java b/lib/commons-core/src/main/java/org/apache/olingo/commons/core/edm/primitivetype/EdmGeometry.java index 12e3994..f14665b 100644 --- a/lib/commons-core/src/main/java/org/apache/olingo/commons/core/edm/primitivetype/EdmGeometry.java +++ b/lib/commons-core/src/main/java/org/apache/olingo/commons/core/edm/primitivetype/EdmGeometry.java @@ -6,9 +6,9 @@ * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at - * + * * http://www.apache.org/licenses/LICENSE-2.0 - * + * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY @@ -37,7 +37,7 @@ public final class EdmGeometry extends AbstractGeospatialType<Geospatial> { @Override protected <T> T internalValueOfString(final String value, final Boolean isNullable, final Integer maxLength, final Integer precision, final Integer scale, final Boolean isUnicode, final Class<T> returnType) - throws EdmPrimitiveTypeException { + throws EdmPrimitiveTypeException { throw new EdmPrimitiveTypeException("Not implemented!"); } http://git-wip-us.apache.org/repos/asf/olingo-odata4/blob/d1507449/lib/commons-core/src/main/java/org/apache/olingo/commons/core/edm/primitivetype/EdmGeometryCollection.java ---------------------------------------------------------------------- diff --git a/lib/commons-core/src/main/java/org/apache/olingo/commons/core/edm/primitivetype/EdmGeometryCollection.java b/lib/commons-core/src/main/java/org/apache/olingo/commons/core/edm/primitivetype/EdmGeometryCollection.java index a03fb5f..8357427 100644 --- a/lib/commons-core/src/main/java/org/apache/olingo/commons/core/edm/primitivetype/EdmGeometryCollection.java +++ b/lib/commons-core/src/main/java/org/apache/olingo/commons/core/edm/primitivetype/EdmGeometryCollection.java @@ -6,9 +6,9 @@ * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at - * + * * http://www.apache.org/licenses/LICENSE-2.0 - * + * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY http://git-wip-us.apache.org/repos/asf/olingo-odata4/blob/d1507449/lib/commons-core/src/main/java/org/apache/olingo/commons/core/edm/primitivetype/EdmGeometryLineString.java ---------------------------------------------------------------------- diff --git a/lib/commons-core/src/main/java/org/apache/olingo/commons/core/edm/primitivetype/EdmGeometryLineString.java b/lib/commons-core/src/main/java/org/apache/olingo/commons/core/edm/primitivetype/EdmGeometryLineString.java index 013f466..2533955 100644 --- a/lib/commons-core/src/main/java/org/apache/olingo/commons/core/edm/primitivetype/EdmGeometryLineString.java +++ b/lib/commons-core/src/main/java/org/apache/olingo/commons/core/edm/primitivetype/EdmGeometryLineString.java @@ -6,9 +6,9 @@ * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at - * + * * http://www.apache.org/licenses/LICENSE-2.0 - * + * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY http://git-wip-us.apache.org/repos/asf/olingo-odata4/blob/d1507449/lib/commons-core/src/main/java/org/apache/olingo/commons/core/edm/primitivetype/EdmGeometryMultiLineString.java ---------------------------------------------------------------------- diff --git a/lib/commons-core/src/main/java/org/apache/olingo/commons/core/edm/primitivetype/EdmGeometryMultiLineString.java b/lib/commons-core/src/main/java/org/apache/olingo/commons/core/edm/primitivetype/EdmGeometryMultiLineString.java index d4502b2..277eaf8 100644 --- a/lib/commons-core/src/main/java/org/apache/olingo/commons/core/edm/primitivetype/EdmGeometryMultiLineString.java +++ b/lib/commons-core/src/main/java/org/apache/olingo/commons/core/edm/primitivetype/EdmGeometryMultiLineString.java @@ -6,9 +6,9 @@ * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at - * + * * http://www.apache.org/licenses/LICENSE-2.0 - * + * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY http://git-wip-us.apache.org/repos/asf/olingo-odata4/blob/d1507449/lib/commons-core/src/main/java/org/apache/olingo/commons/core/edm/primitivetype/EdmGeometryMultiPoint.java ---------------------------------------------------------------------- diff --git a/lib/commons-core/src/main/java/org/apache/olingo/commons/core/edm/primitivetype/EdmGeometryMultiPoint.java b/lib/commons-core/src/main/java/org/apache/olingo/commons/core/edm/primitivetype/EdmGeometryMultiPoint.java index 3fe9c97..0361cd6 100644 --- a/lib/commons-core/src/main/java/org/apache/olingo/commons/core/edm/primitivetype/EdmGeometryMultiPoint.java +++ b/lib/commons-core/src/main/java/org/apache/olingo/commons/core/edm/primitivetype/EdmGeometryMultiPoint.java @@ -6,9 +6,9 @@ * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at - * + * * http://www.apache.org/licenses/LICENSE-2.0 - * + * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY @@ -38,7 +38,7 @@ public final class EdmGeometryMultiPoint extends AbstractGeospatialType<MultiPoi @Override protected <T> T internalValueOfString(final String value, final Boolean isNullable, final Integer maxLength, final Integer precision, final Integer scale, final Boolean isUnicode, final Class<T> returnType) - throws EdmPrimitiveTypeException { + throws EdmPrimitiveTypeException { final MultiPoint point = stringToMultiPoint(value, isNullable, maxLength, precision, scale, isUnicode); if (returnType.isAssignableFrom(MultiPoint.class)) { http://git-wip-us.apache.org/repos/asf/olingo-odata4/blob/d1507449/lib/commons-core/src/main/java/org/apache/olingo/commons/core/edm/primitivetype/EdmGeometryMultiPolygon.java ---------------------------------------------------------------------- diff --git a/lib/commons-core/src/main/java/org/apache/olingo/commons/core/edm/primitivetype/EdmGeometryMultiPolygon.java b/lib/commons-core/src/main/java/org/apache/olingo/commons/core/edm/primitivetype/EdmGeometryMultiPolygon.java index 1fee1b9..979186f 100644 --- a/lib/commons-core/src/main/java/org/apache/olingo/commons/core/edm/primitivetype/EdmGeometryMultiPolygon.java +++ b/lib/commons-core/src/main/java/org/apache/olingo/commons/core/edm/primitivetype/EdmGeometryMultiPolygon.java @@ -6,9 +6,9 @@ * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at - * + * * http://www.apache.org/licenses/LICENSE-2.0 - * + * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY http://git-wip-us.apache.org/repos/asf/olingo-odata4/blob/d1507449/lib/commons-core/src/main/java/org/apache/olingo/commons/core/edm/primitivetype/EdmGeometryPoint.java ---------------------------------------------------------------------- diff --git a/lib/commons-core/src/main/java/org/apache/olingo/commons/core/edm/primitivetype/EdmGeometryPoint.java b/lib/commons-core/src/main/java/org/apache/olingo/commons/core/edm/primitivetype/EdmGeometryPoint.java index 5384abe..7f4c9dc 100644 --- a/lib/commons-core/src/main/java/org/apache/olingo/commons/core/edm/primitivetype/EdmGeometryPoint.java +++ b/lib/commons-core/src/main/java/org/apache/olingo/commons/core/edm/primitivetype/EdmGeometryPoint.java @@ -6,9 +6,9 @@ * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at - * + * * http://www.apache.org/licenses/LICENSE-2.0 - * + * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY http://git-wip-us.apache.org/repos/asf/olingo-odata4/blob/d1507449/lib/commons-core/src/main/java/org/apache/olingo/commons/core/edm/primitivetype/EdmGeometryPolygon.java ---------------------------------------------------------------------- diff --git a/lib/commons-core/src/main/java/org/apache/olingo/commons/core/edm/primitivetype/EdmGeometryPolygon.java b/lib/commons-core/src/main/java/org/apache/olingo/commons/core/edm/primitivetype/EdmGeometryPolygon.java index 12924fc..d3bcce8 100644 --- a/lib/commons-core/src/main/java/org/apache/olingo/commons/core/edm/primitivetype/EdmGeometryPolygon.java +++ b/lib/commons-core/src/main/java/org/apache/olingo/commons/core/edm/primitivetype/EdmGeometryPolygon.java @@ -6,9 +6,9 @@ * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at - * + * * http://www.apache.org/licenses/LICENSE-2.0 - * + * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY http://git-wip-us.apache.org/repos/asf/olingo-odata4/blob/d1507449/lib/commons-core/src/main/java/org/apache/olingo/commons/core/edm/primitivetype/EdmGuid.java ---------------------------------------------------------------------- diff --git a/lib/commons-core/src/main/java/org/apache/olingo/commons/core/edm/primitivetype/EdmGuid.java b/lib/commons-core/src/main/java/org/apache/olingo/commons/core/edm/primitivetype/EdmGuid.java index e188b5d..c11bc27 100644 --- a/lib/commons-core/src/main/java/org/apache/olingo/commons/core/edm/primitivetype/EdmGuid.java +++ b/lib/commons-core/src/main/java/org/apache/olingo/commons/core/edm/primitivetype/EdmGuid.java @@ -6,9 +6,9 @@ * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at - * + * * http://www.apache.org/licenses/LICENSE-2.0 - * + * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY @@ -18,10 +18,10 @@ */ package org.apache.olingo.commons.core.edm.primitivetype; -import org.apache.olingo.commons.api.edm.EdmPrimitiveTypeException; - import java.util.UUID; +import org.apache.olingo.commons.api.edm.EdmPrimitiveTypeException; + /** * Implementation of the EDM primitive type Guid. */ http://git-wip-us.apache.org/repos/asf/olingo-odata4/blob/d1507449/lib/commons-core/src/main/java/org/apache/olingo/commons/core/edm/primitivetype/EdmInt16.java ---------------------------------------------------------------------- diff --git a/lib/commons-core/src/main/java/org/apache/olingo/commons/core/edm/primitivetype/EdmInt16.java b/lib/commons-core/src/main/java/org/apache/olingo/commons/core/edm/primitivetype/EdmInt16.java index eecbe73..041c579 100644 --- a/lib/commons-core/src/main/java/org/apache/olingo/commons/core/edm/primitivetype/EdmInt16.java +++ b/lib/commons-core/src/main/java/org/apache/olingo/commons/core/edm/primitivetype/EdmInt16.java @@ -6,9 +6,9 @@ * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at - * + * * http://www.apache.org/licenses/LICENSE-2.0 - * + * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY @@ -18,11 +18,11 @@ */ package org.apache.olingo.commons.core.edm.primitivetype; +import java.math.BigInteger; + import org.apache.olingo.commons.api.edm.EdmPrimitiveType; import org.apache.olingo.commons.api.edm.EdmPrimitiveTypeException; -import java.math.BigInteger; - /** * Implementation of the EDM primitive type Int16. */ http://git-wip-us.apache.org/repos/asf/olingo-odata4/blob/d1507449/lib/commons-core/src/main/java/org/apache/olingo/commons/core/edm/primitivetype/EdmInt32.java ---------------------------------------------------------------------- diff --git a/lib/commons-core/src/main/java/org/apache/olingo/commons/core/edm/primitivetype/EdmInt32.java b/lib/commons-core/src/main/java/org/apache/olingo/commons/core/edm/primitivetype/EdmInt32.java index 6fef259..7f31543 100644 --- a/lib/commons-core/src/main/java/org/apache/olingo/commons/core/edm/primitivetype/EdmInt32.java +++ b/lib/commons-core/src/main/java/org/apache/olingo/commons/core/edm/primitivetype/EdmInt32.java @@ -6,9 +6,9 @@ * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at - * + * * http://www.apache.org/licenses/LICENSE-2.0 - * + * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY @@ -18,11 +18,11 @@ */ package org.apache.olingo.commons.core.edm.primitivetype; +import java.math.BigInteger; + import org.apache.olingo.commons.api.edm.EdmPrimitiveType; import org.apache.olingo.commons.api.edm.EdmPrimitiveTypeException; -import java.math.BigInteger; - /** * Implementation of the EDM primitive type Int32. */ http://git-wip-us.apache.org/repos/asf/olingo-odata4/blob/d1507449/lib/commons-core/src/main/java/org/apache/olingo/commons/core/edm/primitivetype/EdmInt64.java ---------------------------------------------------------------------- diff --git a/lib/commons-core/src/main/java/org/apache/olingo/commons/core/edm/primitivetype/EdmInt64.java b/lib/commons-core/src/main/java/org/apache/olingo/commons/core/edm/primitivetype/EdmInt64.java index 20d20e6..1f10be7 100644 --- a/lib/commons-core/src/main/java/org/apache/olingo/commons/core/edm/primitivetype/EdmInt64.java +++ b/lib/commons-core/src/main/java/org/apache/olingo/commons/core/edm/primitivetype/EdmInt64.java @@ -6,9 +6,9 @@ * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at - * + * * http://www.apache.org/licenses/LICENSE-2.0 - * + * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY @@ -18,11 +18,11 @@ */ package org.apache.olingo.commons.core.edm.primitivetype; +import java.math.BigInteger; + import org.apache.olingo.commons.api.edm.EdmPrimitiveType; import org.apache.olingo.commons.api.edm.EdmPrimitiveTypeException; -import java.math.BigInteger; - /** * Implementation of the EDM primitive type Int64. */ @@ -73,7 +73,7 @@ public final class EdmInt64 extends SingletonPrimitiveType { /** * Converts a whole {@link Number} value into the requested return type if possible. - * + * * @param value the value * @param returnType the class of the returned value; it must be one of {@link BigInteger}, {@link Long}, * {@link Integer}, {@link Short}, or {@link Byte} http://git-wip-us.apache.org/repos/asf/olingo-odata4/blob/d1507449/lib/commons-core/src/main/java/org/apache/olingo/commons/core/edm/primitivetype/EdmPrimitiveTypeFactory.java ---------------------------------------------------------------------- diff --git a/lib/commons-core/src/main/java/org/apache/olingo/commons/core/edm/primitivetype/EdmPrimitiveTypeFactory.java b/lib/commons-core/src/main/java/org/apache/olingo/commons/core/edm/primitivetype/EdmPrimitiveTypeFactory.java index 43faf8d..83273d6 100644 --- a/lib/commons-core/src/main/java/org/apache/olingo/commons/core/edm/primitivetype/EdmPrimitiveTypeFactory.java +++ b/lib/commons-core/src/main/java/org/apache/olingo/commons/core/edm/primitivetype/EdmPrimitiveTypeFactory.java @@ -6,9 +6,9 @@ * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at - * + * * http://www.apache.org/licenses/LICENSE-2.0 - * + * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY @@ -25,7 +25,7 @@ public final class EdmPrimitiveTypeFactory { /** * Returns an instance for the provided {@link EdmPrimitiveTypeKind} in the form of {@link EdmPrimitiveType}. - * + * * @param kind EdmPrimitiveTypeKind * @return {@link EdmPrimitiveType} instance */ http://git-wip-us.apache.org/repos/asf/olingo-odata4/blob/d1507449/lib/commons-core/src/main/java/org/apache/olingo/commons/core/edm/primitivetype/EdmSByte.java ---------------------------------------------------------------------- diff --git a/lib/commons-core/src/main/java/org/apache/olingo/commons/core/edm/primitivetype/EdmSByte.java b/lib/commons-core/src/main/java/org/apache/olingo/commons/core/edm/primitivetype/EdmSByte.java index 42514d5..564458e 100644 --- a/lib/commons-core/src/main/java/org/apache/olingo/commons/core/edm/primitivetype/EdmSByte.java +++ b/lib/commons-core/src/main/java/org/apache/olingo/commons/core/edm/primitivetype/EdmSByte.java @@ -6,9 +6,9 @@ * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at - * + * * http://www.apache.org/licenses/LICENSE-2.0 - * + * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY @@ -18,11 +18,11 @@ */ package org.apache.olingo.commons.core.edm.primitivetype; +import java.math.BigInteger; + import org.apache.olingo.commons.api.edm.EdmPrimitiveType; import org.apache.olingo.commons.api.edm.EdmPrimitiveTypeException; -import java.math.BigInteger; - /** * Implementation of the EDM primitive type SByte. */ http://git-wip-us.apache.org/repos/asf/olingo-odata4/blob/d1507449/lib/commons-core/src/main/java/org/apache/olingo/commons/core/edm/primitivetype/EdmSingle.java ---------------------------------------------------------------------- diff --git a/lib/commons-core/src/main/java/org/apache/olingo/commons/core/edm/primitivetype/EdmSingle.java b/lib/commons-core/src/main/java/org/apache/olingo/commons/core/edm/primitivetype/EdmSingle.java index c4b2116..b629277 100644 --- a/lib/commons-core/src/main/java/org/apache/olingo/commons/core/edm/primitivetype/EdmSingle.java +++ b/lib/commons-core/src/main/java/org/apache/olingo/commons/core/edm/primitivetype/EdmSingle.java @@ -6,9 +6,9 @@ * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at - * + * * http://www.apache.org/licenses/LICENSE-2.0 - * + * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY @@ -18,12 +18,12 @@ */ package org.apache.olingo.commons.core.edm.primitivetype; -import org.apache.olingo.commons.api.edm.EdmPrimitiveType; -import org.apache.olingo.commons.api.edm.EdmPrimitiveTypeException; - import java.math.BigDecimal; import java.util.regex.Pattern; +import org.apache.olingo.commons.api.edm.EdmPrimitiveType; +import org.apache.olingo.commons.api.edm.EdmPrimitiveTypeException; + /** * Implementation of the EDM primitive type Single. */ http://git-wip-us.apache.org/repos/asf/olingo-odata4/blob/d1507449/lib/commons-core/src/main/java/org/apache/olingo/commons/core/edm/primitivetype/EdmStream.java ---------------------------------------------------------------------- diff --git a/lib/commons-core/src/main/java/org/apache/olingo/commons/core/edm/primitivetype/EdmStream.java b/lib/commons-core/src/main/java/org/apache/olingo/commons/core/edm/primitivetype/EdmStream.java index 91611d0..ff46b7d 100644 --- a/lib/commons-core/src/main/java/org/apache/olingo/commons/core/edm/primitivetype/EdmStream.java +++ b/lib/commons-core/src/main/java/org/apache/olingo/commons/core/edm/primitivetype/EdmStream.java @@ -6,9 +6,9 @@ * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at - * + * * http://www.apache.org/licenses/LICENSE-2.0 - * + * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY @@ -18,11 +18,11 @@ */ package org.apache.olingo.commons.core.edm.primitivetype; -import org.apache.olingo.commons.api.edm.EdmPrimitiveTypeException; - import java.net.URI; import java.net.URISyntaxException; +import org.apache.olingo.commons.api.edm.EdmPrimitiveTypeException; + /** * Implementation of the EDM primitive type Stream as URI. */
