Javadoc corrections

This commit is contained in:
Stefan Kalscheuer 2017-01-02 15:40:34 +01:00
parent ad147fb85f
commit 03e6fc0338
6 changed files with 55 additions and 19 deletions

View File

@ -1,5 +1,5 @@
/* /*
* Copyright 2016 Stefan Kalscheuer * Copyright 2016-2017 Stefan Kalscheuer
* *
* Licensed under the Apache License, Version 2.0 (the "License"); * Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License. * you may not use this file except in compliance with the License.
@ -31,7 +31,7 @@ import java.util.List;
/** /**
* Client for URA based public transport API. * Client for URA based public transport API.
* *
* @author Stefan Kalscheuer <stefan@stklcode.de> * @author Stefan Kalscheuer [stefan@stklcode.de]
*/ */
public class UraClient { public class UraClient {
private static final String DEFAULT_INSTANT_URL = "/interfaces/ura/instant_V2"; private static final String DEFAULT_INSTANT_URL = "/interfaces/ura/instant_V2";
@ -94,7 +94,7 @@ public class UraClient {
* @param stops Stop IDs * @param stops Stop IDs
* @return the request * @return the request
*/ */
public Query forStops(final String...stops) { public Query forStops(final String... stops) {
return new Query().forStops(stops); return new Query().forStops(stops);
} }
@ -104,7 +104,7 @@ public class UraClient {
* @param stopNames Stop Point Names * @param stopNames Stop Point Names
* @return the request * @return the request
*/ */
public Query forStopsByName(final String...stopNames) { public Query forStopsByName(final String... stopNames) {
return new Query().forStopsByName(stopNames); return new Query().forStopsByName(stopNames);
} }
@ -114,7 +114,7 @@ public class UraClient {
* @param lines line IDs * @param lines line IDs
* @return the request * @return the request
*/ */
public Query forLines(final String...lines) { public Query forLines(final String... lines) {
return new Query().forLines(lines); return new Query().forLines(lines);
} }
@ -124,7 +124,7 @@ public class UraClient {
* @param lineNames line names * @param lineNames line names
* @return the request * @return the request
*/ */
public Query forLinesByName(final String...lineNames) { public Query forLinesByName(final String... lineNames) {
return new Query().forLinesByName(lineNames); return new Query().forLinesByName(lineNames);
} }
@ -152,6 +152,7 @@ public class UraClient {
* Get list of trips with limit. * Get list of trips with limit.
* If forStops() and/or forLines() has been called, those will be used as filter. * If forStops() and/or forLines() has been called, those will be used as filter.
* *
* @param limit maximum number of results
* @return list of trips * @return list of trips
*/ */
public List<Trip> getTrips(final Integer limit) { public List<Trip> getTrips(final Integer limit) {
@ -162,6 +163,7 @@ public class UraClient {
* Get list of trips. * Get list of trips.
* If forStops() and/or forLines() has been called, those will be used as filter. * If forStops() and/or forLines() has been called, those will be used as filter.
* *
* @param query the query
* @return list of trips * @return list of trips
*/ */
public List<Trip> getTrips(Query query) { public List<Trip> getTrips(Query query) {
@ -171,7 +173,7 @@ public class UraClient {
/** /**
* Get list of trips for given stopIDs and lineIDs with result limit. * Get list of trips for given stopIDs and lineIDs with result limit.
* *
* @param query the request * @param query the query
* @param limit maximum number of results * @param limit maximum number of results
* @return list of trips * @return list of trips
*/ */
@ -205,6 +207,7 @@ public class UraClient {
* List available stopIDs. * List available stopIDs.
* If forStops() and/or forLines() has been called, those will be used as filter. * If forStops() and/or forLines() has been called, those will be used as filter.
* *
* @param query the query
* @return the list * @return the list
*/ */
public List<Stop> getStops(Query query) { public List<Stop> getStops(Query query) {
@ -263,7 +266,7 @@ public class UraClient {
* @param lineIDs line IDs * @param lineIDs line IDs
* @return the query * @return the query
*/ */
public Query forLines(final String...lineIDs) { public Query forLines(final String... lineIDs) {
this.lineIDs = lineIDs; this.lineIDs = lineIDs;
return this; return this;
} }
@ -274,7 +277,7 @@ public class UraClient {
* @param lineNames line names * @param lineNames line names
* @return the query * @return the query
*/ */
public Query forLinesByName(final String...lineNames) { public Query forLinesByName(final String... lineNames) {
this.lineNames = lineNames; this.lineNames = lineNames;
return this; return this;
} }
@ -285,7 +288,7 @@ public class UraClient {
* @param stopIDs stop IDs * @param stopIDs stop IDs
* @return the query * @return the query
*/ */
public Query forStops(final String...stopIDs) { public Query forStops(final String... stopIDs) {
this.stopIDs = stopIDs; this.stopIDs = stopIDs;
return this; return this;
} }
@ -296,7 +299,7 @@ public class UraClient {
* @param stopNames line names * @param stopNames line names
* @return the query * @return the query
*/ */
public Query forStopsByName(final String...stopNames) { public Query forStopsByName(final String... stopNames) {
this.stopNames = stopNames; this.stopNames = stopNames;
return this; return this;
} }

View File

@ -1,5 +1,5 @@
/* /*
* Copyright 2016 Stefan Kalscheuer * Copyright 2016-2017 Stefan Kalscheuer
* *
* Licensed under the Apache License, Version 2.0 (the "License"); * Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License. * you may not use this file except in compliance with the License.
@ -22,7 +22,7 @@ import java.util.List;
/** /**
* Entity for a single stop. * Entity for a single stop.
* *
* @author Stefan Kalscheuer <stefan@stklcode.de> * @author Stefan Kalscheuer [stefan@stklcode.de]
*/ */
public class Stop { public class Stop {
private final String id; private final String id;

View File

@ -1,5 +1,5 @@
/* /*
* Copyright 2016 Stefan Kalscheuer * Copyright 2016-2017 Stefan Kalscheuer
* *
* Licensed under the Apache License, Version 2.0 (the "License"); * Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License. * you may not use this file except in compliance with the License.
@ -22,7 +22,7 @@ import java.util.List;
/** /**
* Entity for a single trip. * Entity for a single trip.
* *
* @author Stefan Kalscheuer <stefan@stklcode.de> * @author Stefan Kalscheuer [stefan@stklcode.de]
*/ */
public class Trip { public class Trip {
private final Stop stop; private final Stop stop;

View File

@ -1,5 +1,5 @@
/* /*
* Copyright 2016 Stefan Kalscheuer * Copyright 2016-2017 Stefan Kalscheuer
* *
* Licensed under the Apache License, Version 2.0 (the "License"); * Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License. * you may not use this file except in compliance with the License.
@ -38,6 +38,7 @@ import static org.hamcrest.core.Is.is;
* Unit test for the URA Client. * Unit test for the URA Client.
* Tests run against mocked data collected from hte ASEAG API (http://ivu.aseag.de/) * Tests run against mocked data collected from hte ASEAG API (http://ivu.aseag.de/)
* *
* @author Stefan Kalscheuer [stefan@stklcode.de]
*/ */
@RunWith(PowerMockRunner.class) @RunWith(PowerMockRunner.class)
@PrepareForTest({ UraClient.class, URL.class }) @PrepareForTest({ UraClient.class, URL.class })

View File

@ -1,3 +1,19 @@
/*
* Copyright 2016-2017 Stefan Kalscheuer
*
* Licensed 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 KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package de.stklcode.pubtrans.ura.model; package de.stklcode.pubtrans.ura.model;
import org.junit.Test; import org.junit.Test;
@ -15,7 +31,7 @@ import static org.junit.Assert.fail;
/** /**
* Unit test for the Stop metamodel. * Unit test for the Stop metamodel.
* *
* @author Stefan Kalscheuer <stefan@stklcode.de> * @author Stefan Kalscheuer [stefan@stklcode.de]
*/ */
public class StopTest { public class StopTest {
@Test @Test

View File

@ -1,3 +1,19 @@
/*
* Copyright 2016-2017 Stefan Kalscheuer
*
* Licensed 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 KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package de.stklcode.pubtrans.ura.model; package de.stklcode.pubtrans.ura.model;
import org.junit.Test; import org.junit.Test;
@ -15,7 +31,7 @@ import static org.junit.Assert.fail;
/** /**
* Unit test for the Trip metamodel. * Unit test for the Trip metamodel.
* *
* @author Stefan Kalscheuer <stefan@stklcode.de> * @author Stefan Kalscheuer [stefan@stklcode.de]
*/ */
public class TripTest { public class TripTest {
@Test @Test