diff --git a/model/src/main/java/org/mobilitydata/gtfsvalidator/annotation/RecommendedColumn.java b/model/src/main/java/org/mobilitydata/gtfsvalidator/annotation/RecommendedColumn.java deleted file mode 100644 index f292ebd22d..0000000000 --- a/model/src/main/java/org/mobilitydata/gtfsvalidator/annotation/RecommendedColumn.java +++ /dev/null @@ -1,42 +0,0 @@ -/* - * Copyright 2020 Google LLC - * - * 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 org.mobilitydata.gtfsvalidator.annotation; - -import java.lang.annotation.ElementType; -import java.lang.annotation.Retention; -import java.lang.annotation.RetentionPolicy; -import java.lang.annotation.Target; - -/** - * Adds a validation that it's recommended that a column be present. A value for the field may be - * optional. - * - *
Example. - * - *
- * {@literal @}GtfsTable("stop_times.txt") - * public interface GtfsStopTimeSchema extends GtfsEntity { - * - * {@literal @}DefaultValue("1") - * {@literal @}RecommendedColumn - * GtfsStopTimeTimepoint timepoint(); - * } - *- */ -@Target({ElementType.METHOD, ElementType.TYPE}) -@Retention(RetentionPolicy.SOURCE) -public @interface RecommendedColumn {} diff --git a/processor/tests/src/main/java/org/mobilitydata/gtfsvalidator/processor/tests/RecommendedColumnAnnotationSchema.java b/processor/tests/src/main/java/org/mobilitydata/gtfsvalidator/processor/tests/RecommendedColumnAnnotationSchema.java deleted file mode 100644 index dff043ff42..0000000000 --- a/processor/tests/src/main/java/org/mobilitydata/gtfsvalidator/processor/tests/RecommendedColumnAnnotationSchema.java +++ /dev/null @@ -1,11 +0,0 @@ -package org.mobilitydata.gtfsvalidator.processor.tests; - -import org.mobilitydata.gtfsvalidator.annotation.GtfsTable; -import org.mobilitydata.gtfsvalidator.annotation.RecommendedColumn; - -@GtfsTable("recommended_column.txt") -public interface RecommendedColumnAnnotationSchema { - - @RecommendedColumn - String columnRecommended(); -} diff --git a/processor/tests/src/test/java/org/mobilitydata/gtfsvalidator/processor/tests/RecommendedColumnAnnotationSchemaTest.java b/processor/tests/src/test/java/org/mobilitydata/gtfsvalidator/processor/tests/RecommendedColumnAnnotationSchemaTest.java deleted file mode 100644 index fd600103e2..0000000000 --- a/processor/tests/src/test/java/org/mobilitydata/gtfsvalidator/processor/tests/RecommendedColumnAnnotationSchemaTest.java +++ /dev/null @@ -1,51 +0,0 @@ -package org.mobilitydata.gtfsvalidator.processor.tests; - -import static com.google.common.truth.Truth.assertThat; - -import org.junit.Before; -import org.junit.Test; -import org.junit.runner.RunWith; -import org.junit.runners.JUnit4; -import org.mobilitydata.gtfsvalidator.notice.MissingRequiredColumnNotice; -import org.mobilitydata.gtfsvalidator.table.RecommendedColumnAnnotationTableDescriptor; -import org.mobilitydata.gtfsvalidator.testing.LoadingHelper; -import org.mobilitydata.gtfsvalidator.validator.ValidatorLoaderException; - -@RunWith(JUnit4.class) -public class RecommendedColumnAnnotationSchemaTest { - private RecommendedColumnAnnotationTableDescriptor tableDescriptor; - private LoadingHelper helper; - - @Before - public void setup() throws ValidatorLoaderException { - tableDescriptor = new RecommendedColumnAnnotationTableDescriptor(); - helper = new LoadingHelper(); - } - - @Test - public void includingRecommendedColumnHeaderWithoutValueShouldNotGenerateNotice() - throws ValidatorLoaderException { - - helper.load(tableDescriptor, "some_column,column_recommended", "value,"); - - assertThat( - !helper - .getValidationNotices() - .contains( - new MissingRequiredColumnNotice("recommended_column.txt", "column_recommended"))); - } - - @Test - public void missingRecommendedColumnHeaderShouldGenerateNotice() throws ValidatorLoaderException { - - helper.load(tableDescriptor, "column", "value"); - // Since we use an unknown column ("column") we have to expect at least one unknown_column - // notice along with the - // missing_recommended_column notice. - assertThat( - helper - .getValidationNotices() - .contains( - new MissingRequiredColumnNotice("recommended_column.txt", "column_recommended"))); - } -}