Skip to content

Commit

Permalink
renamed java language bindings to mobilitydata
Browse files Browse the repository at this point in the history
  • Loading branch information
Alessandro100 committed Apr 24, 2024
1 parent 583914f commit 353d869
Show file tree
Hide file tree
Showing 58 changed files with 222 additions and 278 deletions.
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ JSON Schema for [General Bikeshare Feed Specification(GBFS)](https://github.com/
## Language Bindings

* [TypeScript ](models/typescript/README.md)
* [Java ](models/java/README.md)

Are we missing your favorite language? Consider contributing:

Expand Down
64 changes: 0 additions & 64 deletions models/java/gbfs-java-model/bin/gbfs-download-extract.sh

This file was deleted.

56 changes: 17 additions & 39 deletions models/java/gbfs-java-model/pom.xml
Original file line number Diff line number Diff line change
@@ -1,17 +1,17 @@
<?xml version="1.0" encoding="UTF-8"?>
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<groupId>org.entur.gbfs</groupId>
<groupId>org.mobilitydata</groupId>
<artifactId>gbfs-java-model</artifactId>
<version>3.1.3-SNAPSHOT</version>

<name>gbfs-java-model</name>

<description>Generates Java model from GBFS JSON schema using jsonschema2pojo.</description>
<url>https://github.com/entur/gbfs-java-model</url>
<url>https://github.com/MobilityData/gbfs-json-schema</url>
<organization>
<name>Entur AS</name>
<url>http://www.entur.org/</url>
<name>MobilityData</name>
<url>https://mobilitydata.org/</url>
</organization>
<licenses>
<license>
Expand All @@ -29,9 +29,9 @@
</developer>
</developers>
<scm>
<connection>scm:git:ssh://[email protected]/entur/gbfs-java-model.git</connection>
<developerConnection>scm:git:ssh://[email protected]/entur/gbfs-java-model.git</developerConnection>
<url>https://github.com/entur/gbfs-java-model/tree/master</url>
<connection>scm:git:ssh://[email protected]/MobilityData/gbfs-json-schema.git</connection>
<developerConnection>scm:git:ssh://[email protected]/MobilityData/gbfs-json-schema.git</developerConnection>
<url>https://github.com/MobilityData/gbfs-json-schema/tree/master</url>
<tag>HEAD</tag>
</scm>
<distributionManagement>
Expand Down Expand Up @@ -163,35 +163,13 @@
</plugins>
</pluginManagement>
<plugins>
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>exec-maven-plugin</artifactId>
<version>${maven-exec-plugin.version}</version>
<executions>
<execution>
<id>download-extract-current-version</id>
<phase>generate-sources</phase>
<goals>
<goal>exec</goal>
</goals>
<configuration>
<environmentVariables>
<GITHUB_URL>${gbfsGithubUrl}</GITHUB_URL>
<SCHEMA_VERSION>${schemaVersion}</SCHEMA_VERSION>
<DESTINATION_PATH>src/main/resources/schema</DESTINATION_PATH>
</environmentVariables>
<executable>./bin/gbfs-download-extract.sh</executable>
</configuration>
</execution>
</executions>
</plugin>
<plugin>
<groupId>org.jsonschema2pojo</groupId>
<artifactId>jsonschema2pojo-maven-plugin</artifactId>
<version>${jsonschema2pojo-maven-plugin.version}</version>
<dependencies>
<dependency>
<groupId>org.entur.gbfs</groupId>
<groupId>org.mobilitydata</groupId>
<artifactId>rule-factory</artifactId>
<version>1.0.0</version>
</dependency>
Expand All @@ -211,9 +189,9 @@
<serializable>true</serializable>
<initializeCollections>false</initializeCollections>
<generateBuilders>true</generateBuilders>
<sourceDirectory>${basedir}/src/main/resources/schema/v2.2</sourceDirectory>
<targetPackage>org.entur.gbfs.v2_2</targetPackage>
<customRuleFactory>org.entur.gbfs.GeofencingRuleFactory</customRuleFactory>
<sourceDirectory>${basedir}/../../../v2.2</sourceDirectory>
<targetPackage>org.mobilitydata.v2_2</targetPackage>
<customRuleFactory>org.mobilitydata.gbfs.GeofencingRuleFactory</customRuleFactory>
</configuration>
</execution>
<execution>
Expand All @@ -230,9 +208,9 @@
<serializable>true</serializable>
<initializeCollections>false</initializeCollections>
<generateBuilders>true</generateBuilders>
<sourceDirectory>${basedir}/src/main/resources/schema/v2.3</sourceDirectory>
<targetPackage>org.entur.gbfs.v2_3</targetPackage>
<customRuleFactory>org.entur.gbfs.GeofencingRuleFactory</customRuleFactory>
<sourceDirectory>${basedir}/../../../v2.3</sourceDirectory>
<targetPackage>org.mobilitydata.v2_3</targetPackage>
<customRuleFactory>org.mobilitydata.gbfs.GeofencingRuleFactory</customRuleFactory>
</configuration>
</execution>
<execution>
Expand All @@ -249,9 +227,9 @@
<serializable>true</serializable>
<initializeCollections>false</initializeCollections>
<generateBuilders>true</generateBuilders>
<sourceDirectory>${basedir}/src/main/resources/schema/v3.0</sourceDirectory>
<targetPackage>org.entur.gbfs.v3_0</targetPackage>
<customRuleFactory>org.entur.gbfs.GeofencingRuleFactory</customRuleFactory>
<sourceDirectory>${basedir}/../../../v3.0</sourceDirectory>
<targetPackage>org.mobilitydata.v3_0</targetPackage>
<customRuleFactory>org.mobilitydata.gbfs.GeofencingRuleFactory</customRuleFactory>
</configuration>
</execution>
</executions>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
package org.entur.gbfs.v2_3.gbfs;
package org.mobilitydata.gbfs.v2_2.gbfs;
import org.mobilitydata.v2_2.GBFSGbfs;

import com.fasterxml.jackson.annotation.JsonProperty;
import com.fasterxml.jackson.annotation.JsonPropertyDescription;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package org.entur.gbfs.v2_2.gbfs;
package org.mobilitydata.gbfs.v2_2.gbfs;

import com.fasterxml.jackson.annotation.JsonProperty;
import com.fasterxml.jackson.annotation.JsonPropertyDescription;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,19 +1,19 @@
package org.entur.gbfs.v2_2.gbfs;
package org.mobilitydata.gbfs.v2_2.gbfs;

import com.fasterxml.jackson.annotation.JsonCreator;
import com.fasterxml.jackson.annotation.JsonValue;
import org.entur.gbfs.v2_2.free_bike_status.GBFSFreeBikeStatus;
import org.entur.gbfs.v2_2.gbfs_versions.GBFSGbfsVersions;
import org.entur.gbfs.v2_2.geofencing_zones.GBFSGeofencingZones;
import org.entur.gbfs.v2_2.station_information.GBFSStationInformation;
import org.entur.gbfs.v2_2.station_status.GBFSStationStatus;
import org.entur.gbfs.v2_2.system_alerts.GBFSSystemAlerts;
import org.entur.gbfs.v2_2.system_calendar.GBFSSystemCalendar;
import org.entur.gbfs.v2_2.system_hours.GBFSSystemHours;
import org.entur.gbfs.v2_2.system_information.GBFSSystemInformation;
import org.entur.gbfs.v2_2.system_pricing_plans.GBFSSystemPricingPlans;
import org.entur.gbfs.v2_2.system_regions.GBFSSystemRegions;
import org.entur.gbfs.v2_2.vehicle_types.GBFSVehicleTypes;
import org.mobilitydata.v2_2.GBFSFreeBikeStatus;
import org.mobilitydata.v2_2.GBFSGbfsVersions;
import org.mobilitydata.v2_2.GBFSGeofencingZones;
import org.mobilitydata.v2_2.GBFSStationInformation;
import org.mobilitydata.v2_2.GBFSStationStatus;
import org.mobilitydata.v2_2.GBFSSystemAlerts;
import org.mobilitydata.v2_2.GBFSSystemCalendar;
import org.mobilitydata.v2_2.GBFSSystemHours;
import org.mobilitydata.v2_2.GBFSSystemInformation;
import org.mobilitydata.v2_2.GBFSSystemPricingPlans;
import org.mobilitydata.v2_2.GBFSSystemRegions;
import org.mobilitydata.v2_2.GBFSVehicleTypes;

import java.util.HashMap;
import java.util.Map;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package org.entur.gbfs.v2_2.gbfs;
package org.mobilitydata.gbfs.v2_2.gbfs;

import com.fasterxml.jackson.annotation.JsonProperty;
import com.fasterxml.jackson.annotation.JsonPropertyDescription;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
package org.entur.gbfs.v2_2.gbfs;
package org.mobilitydata.gbfs.v2_3.gbfs;
import org.mobilitydata.v2_3.GBFSGbfs;

import com.fasterxml.jackson.annotation.JsonProperty;
import com.fasterxml.jackson.annotation.JsonPropertyDescription;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package org.entur.gbfs.v2_3.gbfs;
package org.mobilitydata.gbfs.v2_3.gbfs;

import com.fasterxml.jackson.annotation.JsonProperty;
import com.fasterxml.jackson.annotation.JsonPropertyDescription;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,25 +1,26 @@
package org.entur.gbfs.v2_3.gbfs;
package org.mobilitydata.gbfs.v2_3.gbfs;

import com.fasterxml.jackson.annotation.JsonCreator;
import com.fasterxml.jackson.annotation.JsonValue;
import org.entur.gbfs.v2_3.free_bike_status.GBFSFreeBikeStatus;
import org.entur.gbfs.v2_3.gbfs_versions.GBFSGbfsVersions;
import org.entur.gbfs.v2_3.geofencing_zones.GBFSGeofencingZones;
import org.entur.gbfs.v2_3.station_information.GBFSStationInformation;
import org.entur.gbfs.v2_3.station_status.GBFSStationStatus;
import org.entur.gbfs.v2_3.system_alerts.GBFSSystemAlerts;
import org.entur.gbfs.v2_3.system_calendar.GBFSSystemCalendar;
import org.entur.gbfs.v2_3.system_hours.GBFSSystemHours;
import org.entur.gbfs.v2_3.system_information.GBFSSystemInformation;
import org.entur.gbfs.v2_3.system_pricing_plans.GBFSSystemPricingPlans;
import org.entur.gbfs.v2_3.system_regions.GBFSSystemRegions;
import org.entur.gbfs.v2_3.vehicle_types.GBFSVehicleTypes;
import org.mobilitydata.v2_3.GBFSFreeBikeStatus;
import org.mobilitydata.v2_3.GBFSGbfsVersions;
import org.mobilitydata.v2_3.GBFSGeofencingZones;
import org.mobilitydata.v2_3.GBFSStationInformation;
import org.mobilitydata.v2_3.GBFSStationStatus;
import org.mobilitydata.v2_3.GBFSSystemAlerts;
import org.mobilitydata.v2_3.GBFSSystemCalendar;
import org.mobilitydata.v2_3.GBFSSystemHours;
import org.mobilitydata.v2_3.GBFSSystemInformation;
import org.mobilitydata.v2_3.GBFSSystemPricingPlans;
import org.mobilitydata.v2_3.GBFSSystemRegions;
import org.mobilitydata.v2_3.GBFSVehicleTypes;
import org.mobilitydata.v2_3.GBFSGbfs;

import java.util.HashMap;
import java.util.Map;

public enum GBFSFeedName {
GBFS("gbfs", org.entur.gbfs.v2_3.gbfs.GBFS.class),
GBFS("gbfs", GBFSGbfs.class),
GBFSVersions("gbfs_versions", GBFSGbfsVersions.class),
SystemInformation("system_information", GBFSSystemInformation.class),
VehicleTypes("vehicle_types", GBFSVehicleTypes.class),
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package org.entur.gbfs.v2_3.gbfs;
package org.mobilitydata.gbfs.v2_3.gbfs;

import com.fasterxml.jackson.annotation.JsonProperty;
import com.fasterxml.jackson.annotation.JsonPropertyDescription;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,15 +1,17 @@
package org.entur.gbfs.v3_0.gbfs;

import org.entur.gbfs.v3_0.gbfs_versions.GBFSGbfsVersions;
import org.entur.gbfs.v3_0.geofencing_zones.GBFSGeofencingZones;
import org.entur.gbfs.v3_0.station_information.GBFSStationInformation;
import org.entur.gbfs.v3_0.station_status.GBFSStationStatus;
import org.entur.gbfs.v3_0.system_alerts.GBFSSystemAlerts;
import org.entur.gbfs.v3_0.system_information.GBFSSystemInformation;
import org.entur.gbfs.v3_0.system_pricing_plans.GBFSSystemPricingPlans;
import org.entur.gbfs.v3_0.system_regions.GBFSSystemRegions;
import org.entur.gbfs.v3_0.vehicle_status.GBFSVehicleStatus;
import org.entur.gbfs.v3_0.vehicle_types.GBFSVehicleTypes;
package org.mobilitydata.gbfs.v3_0.gbfs;

import org.mobilitydata.v3_0.GBFSGbfsVersions;
import org.mobilitydata.v3_0.GBFSGeofencingZones;
import org.mobilitydata.v3_0.GBFSStationInformation;
import org.mobilitydata.v3_0.GBFSStationStatus;
import org.mobilitydata.v3_0.GBFSSystemAlerts;
import org.mobilitydata.v3_0.GBFSSystemInformation;
import org.mobilitydata.v3_0.GBFSSystemPricingPlans;
import org.mobilitydata.v3_0.GBFSSystemRegions;
import org.mobilitydata.v3_0.GBFSVehicleStatus;
import org.mobilitydata.v3_0.GBFSVehicleTypes;
import org.mobilitydata.v3_0.GBFSFeed;
import org.mobilitydata.v3_0.GBFSGbfs;

import java.util.EnumMap;
import java.util.Map;
Expand Down

This file was deleted.

Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package org.entur.gbfs;
package org.mobilitydata.gbfs;

import com.fasterxml.jackson.databind.ObjectMapper;

Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
package org.entur.gbfs.v2_2.free_bike_status;
package org.mobilitydata.gbfs.v2_2.free_bike_status;

import org.entur.gbfs.TestBase;
import org.mobilitydata.gbfs.TestBase;
import org.mobilitydata.v2_2.GBFSFreeBikeStatus;
import org.junit.jupiter.api.Test;

class FreeBikeStatusTest extends TestBase {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
package org.entur.gbfs.v2_2.gbfs;
package org.mobilitydata.gbfs.v2_2.gbfs;

import org.entur.gbfs.v2_2.station_information.GBFSStationInformation;
import org.mobilitydata.v2_2.GBFSStationInformation;
import org.junit.jupiter.api.Test;

import static org.junit.jupiter.api.Assertions.*;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
package org.entur.gbfs.v2_3.gbfs;
package org.mobilitydata.gbfs.v2_2.gbfs;

import org.entur.gbfs.TestBase;
import org.mobilitydata.gbfs.TestBase;
import org.junit.jupiter.api.Test;

class GBFSTest extends TestBase {
Expand Down
Loading

0 comments on commit 353d869

Please sign in to comment.