Skip to content

Commit e1598cc

Browse files
committed
Optimized imports and javadoc
1 parent 8ed73b0 commit e1598cc

File tree

43 files changed

+160
-277
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

43 files changed

+160
-277
lines changed

janos-api/src/main/java/org/apache/olingo/odata2/janos/processor/api/JanosService.java

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -18,13 +18,13 @@
1818
******************************************************************************/
1919
package org.apache.olingo.odata2.janos.processor.api;
2020

21-
import java.util.Collection;
22-
21+
import org.apache.olingo.odata2.api.ODataService;
22+
import org.apache.olingo.odata2.api.exception.ODataException;
2323
import org.apache.olingo.odata2.janos.processor.api.datasource.DataSource;
2424
import org.apache.olingo.odata2.janos.processor.api.datasource.DataStoreManager;
2525
import org.apache.olingo.odata2.janos.processor.api.datasource.ValueAccess;
26-
import org.apache.olingo.odata2.api.ODataService;
27-
import org.apache.olingo.odata2.api.exception.ODataException;
26+
27+
import java.util.Collection;
2828

2929
/**
3030
* AnnotationServiceFactory which provides an AnnotationService which handles java beans (classes)

janos-api/src/main/java/org/apache/olingo/odata2/janos/processor/api/datasource/DataSource.java

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -18,17 +18,16 @@
1818
******************************************************************************/
1919
package org.apache.olingo.odata2.janos.processor.api.datasource;
2020

21-
import java.util.Arrays;
22-
import java.util.List;
23-
import java.util.Map;
24-
2521
import org.apache.olingo.odata2.api.edm.EdmEntitySet;
2622
import org.apache.olingo.odata2.api.edm.EdmException;
27-
import org.apache.olingo.odata2.api.edm.EdmFunctionImport;
2823
import org.apache.olingo.odata2.api.exception.ODataApplicationException;
2924
import org.apache.olingo.odata2.api.exception.ODataNotFoundException;
3025
import org.apache.olingo.odata2.api.exception.ODataNotImplementedException;
3126

27+
import java.util.Arrays;
28+
import java.util.List;
29+
import java.util.Map;
30+
3231
/**
3332
* <p>This interface is intended to make it easier to implement an OData
3433
* service in cases where all data for each entity set can be provided as a {@link List} of objects from which all

janos-api/src/main/java/org/apache/olingo/odata2/janos/processor/api/datasource/DataStoreException.java

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,9 +15,10 @@
1515
*/
1616
package org.apache.olingo.odata2.janos.processor.api.datasource;
1717

18-
import java.util.Locale;
1918
import org.apache.olingo.odata2.api.exception.ODataApplicationException;
2019

20+
import java.util.Locale;
21+
2122
/**
2223
*
2324
*/

janos-api/src/main/java/org/apache/olingo/odata2/janos/processor/api/datasource/DataStoreManager.java

Lines changed: 9 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -41,16 +41,18 @@ public interface DataStoreManager {
4141
* @throws DataStoreException
4242
*/
4343
<T> DataStore<T> createDataStore(Class<T> clz) throws DataStoreException;
44+
4445
/**
4546
* Create a DataStore without managing (keeping a reference to it).
4647
*
4748
* @param clz class for which the DataStore is created
4849
* @param <T> type of class for which the DataStore is created
4950
* @param properties properties for creation
5051
* @return the created (and not managed) DataStore
51-
* @throws DataStoreException
52+
* @throws DataStoreException if something goes wrong
5253
*/
5354
<T> DataStore<T> createDataStore(Class<T> clz, Map<String, String> properties) throws DataStoreException;
55+
5456
/**
5557
* Create a DataStore and managing it (keeping a reference to it).
5658
* If a DataStore with given name already exists this will be returned.
@@ -59,9 +61,10 @@ public interface DataStoreManager {
5961
* @param clz class for which the DataStore is created
6062
* @param <T> type of class for which the DataStore is created
6163
* @return the created (and managed) DataStore
62-
* @throws DataStoreException
64+
* @throws DataStoreException if something goes wrong
6365
*/
6466
<T> DataStore<T> grantDataStore(String name, Class<T> clz) throws DataStoreException;
67+
6568
/**
6669
* Create a DataStore and managing it (keeping a reference to it).
6770
* If a DataStore with given name already exists this will be returned.
@@ -71,25 +74,26 @@ public interface DataStoreManager {
7174
* @param <T> type of class for which the DataStore is created
7275
* @param properties properties for creation
7376
* @return the created (and managed) DataStore
74-
* @throws DataStoreException
77+
* @throws DataStoreException if something goes wrong
7578
*/
7679
<T> DataStore<T> grantDataStore(String name, Class<T> clz, Map<String, String> properties) throws DataStoreException;
80+
7781
/**
7882
* Get a reference to an already existing (managed) DataStore.
7983
*
8084
* @param <T> type of class for which the DataStore is created
8185
* @param name name of the DataStore which is requested
8286
* @param clz class for which the DataStore is created
8387
* @return the created (and managed) DataStore or <code>NULL</code> if no according DataStore exists
84-
* @throws DataStoreException
88+
* @throws DataStoreException if something goes wrong
8589
*/
8690
<T> DataStore<T> getDataStore(String name, Class<T> clz) throws DataStoreException;
91+
8792
/**
8893
* Get a reference to an already existing (managed) DataStore.
8994
*
9095
* @param name name of the DataStore which is requested
9196
* @return the created (and managed) DataStore or <code>NULL</code> if no according DataStore exists
92-
* @throws DataStoreException
9397
*/
9498
DataStore<Object> getDataStore(String name);
9599
}

janos-it/src/test/java/org/apache/olingo/odata2/janos/processor/ref/AbstractRefJsonTest.java

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,11 +18,10 @@
1818
******************************************************************************/
1919
package org.apache.olingo.odata2.janos.processor.ref;
2020

21-
import org.junit.Ignore;
22-
2321
import com.google.gson.Gson;
2422
import com.google.gson.internal.StringMap;
2523
import com.google.gson.reflect.TypeToken;
24+
import org.junit.Ignore;
2625

2726
/**
2827
*

janos-it/src/test/java/org/apache/olingo/odata2/janos/processor/ref/AbstractRefTest.java

Lines changed: 8 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -18,37 +18,29 @@
1818
******************************************************************************/
1919
package org.apache.olingo.odata2.janos.processor.ref;
2020

21-
import static org.junit.Assert.assertEquals;
22-
import static org.junit.Assert.assertNotNull;
23-
import static org.junit.Assert.assertTrue;
24-
25-
import java.net.URI;
26-
import java.util.Arrays;
27-
import java.util.List;
28-
2921
import org.apache.http.HttpEntityEnclosingRequest;
3022
import org.apache.http.HttpHeaders;
3123
import org.apache.http.HttpResponse;
32-
import org.apache.http.client.methods.HttpDelete;
33-
import org.apache.http.client.methods.HttpGet;
34-
import org.apache.http.client.methods.HttpPatch;
35-
import org.apache.http.client.methods.HttpPost;
36-
import org.apache.http.client.methods.HttpPut;
37-
import org.apache.http.client.methods.HttpRequestBase;
24+
import org.apache.http.client.methods.*;
3825
import org.apache.http.entity.StringEntity;
3926
import org.apache.log4j.Logger;
40-
import org.apache.olingo.odata2.janos.processor.api.JanosService;
4127
import org.apache.olingo.odata2.api.ODataService;
4228
import org.apache.olingo.odata2.api.commons.HttpStatusCodes;
4329
import org.apache.olingo.odata2.api.commons.ODataHttpMethod;
4430
import org.apache.olingo.odata2.api.exception.ODataException;
45-
import org.apache.olingo.odata2.testutil.data.JanosSampleDataGenerator;
31+
import org.apache.olingo.odata2.janos.processor.api.JanosService;
4632
import org.apache.olingo.odata2.testutil.fit.AbstractFitTest;
4733
import org.apache.olingo.odata2.testutil.helper.StringHelper;
4834
import org.junit.Ignore;
4935
import org.junit.runner.RunWith;
5036
import org.junit.runners.Parameterized;
5137

38+
import java.net.URI;
39+
import java.util.Arrays;
40+
import java.util.List;
41+
42+
import static org.junit.Assert.*;
43+
5244
/**
5345
* Abstract base class for tests employing the reference scenario.
5446
*

janos-it/src/test/java/org/apache/olingo/odata2/janos/processor/ref/AbstractRefXmlTest.java

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -18,13 +18,6 @@
1818
******************************************************************************/
1919
package org.apache.olingo.odata2.janos.processor.ref;
2020

21-
import static org.custommonkey.xmlunit.XMLAssert.assertXpathExists;
22-
23-
import java.io.IOException;
24-
import java.io.InputStream;
25-
import java.util.HashMap;
26-
import java.util.Map;
27-
2821
import org.apache.http.HttpResponse;
2922
import org.apache.olingo.odata2.api.commons.HttpStatusCodes;
3023
import org.apache.olingo.odata2.api.edm.Edm;
@@ -35,6 +28,13 @@
3528
import org.junit.Ignore;
3629
import org.xml.sax.SAXException;
3730

31+
import java.io.IOException;
32+
import java.io.InputStream;
33+
import java.util.HashMap;
34+
import java.util.Map;
35+
36+
import static org.custommonkey.xmlunit.XMLAssert.assertXpathExists;
37+
3838
/**
3939
* Abstract base class for tests employing the reference scenario reading or writing XML.
4040
*

janos-it/src/test/java/org/apache/olingo/odata2/janos/processor/ref/EntryJsonCreateTest.java

Lines changed: 4 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -18,19 +18,16 @@
1818
******************************************************************************/
1919
package org.apache.olingo.odata2.janos.processor.ref;
2020

21-
import static org.junit.Assert.assertEquals;
22-
import static org.junit.Assert.assertNotNull;
23-
import static org.junit.Assert.assertNull;
24-
25-
import java.util.UUID;
26-
21+
import com.google.gson.internal.StringMap;
2722
import org.apache.http.HttpHeaders;
2823
import org.apache.http.HttpResponse;
2924
import org.apache.olingo.odata2.api.commons.HttpContentType;
3025
import org.apache.olingo.odata2.api.commons.HttpStatusCodes;
3126
import org.junit.Test;
3227

33-
import com.google.gson.internal.StringMap;
28+
import java.util.UUID;
29+
30+
import static org.junit.Assert.*;
3431

3532
/**
3633
*

janos-it/src/test/java/org/apache/olingo/odata2/janos/processor/ref/ServiceJsonTest.java

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -18,13 +18,7 @@
1818
******************************************************************************/
1919
package org.apache.olingo.odata2.janos.processor.ref;
2020

21-
import static org.custommonkey.xmlunit.XMLAssert.assertXpathExists;
22-
23-
import java.util.HashMap;
24-
import java.util.Map;
25-
2621
import junit.framework.Assert;
27-
2822
import org.apache.http.HttpResponse;
2923
import org.apache.olingo.odata2.api.commons.HttpContentType;
3024
import org.apache.olingo.odata2.api.commons.HttpHeaders;
@@ -34,6 +28,11 @@
3428
import org.custommonkey.xmlunit.XMLUnit;
3529
import org.junit.Test;
3630

31+
import java.util.HashMap;
32+
import java.util.Map;
33+
34+
import static org.custommonkey.xmlunit.XMLAssert.assertXpathExists;
35+
3736
/**
3837
* Tests employing the reference scenario reading the service document in JSON format.
3938
*

janos-it/src/test/java/org/apache/olingo/odata2/janos/processor/ref/ServiceXmlTest.java

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -18,11 +18,6 @@
1818
******************************************************************************/
1919
package org.apache.olingo.odata2.janos.processor.ref;
2020

21-
import static org.custommonkey.xmlunit.XMLAssert.assertXpathEvaluatesTo;
22-
import static org.custommonkey.xmlunit.XMLAssert.assertXpathExists;
23-
24-
import java.io.IOException;
25-
2621
import org.apache.http.HttpResponse;
2722
import org.apache.olingo.odata2.api.commons.HttpContentType;
2823
import org.apache.olingo.odata2.api.commons.HttpHeaders;
@@ -31,6 +26,11 @@
3126
import org.junit.Test;
3227
import org.xml.sax.SAXException;
3328

29+
import java.io.IOException;
30+
31+
import static org.custommonkey.xmlunit.XMLAssert.assertXpathEvaluatesTo;
32+
import static org.custommonkey.xmlunit.XMLAssert.assertXpathExists;
33+
3434
/**
3535
* Tests employing the reference scenario reading the service document in XML format
3636
*/

0 commit comments

Comments
 (0)