test_class.declarator: decoder = new OpenLRProtoDecoder()
test_class.original_string: OpenLRProtoDecoder decoder = new OpenLRProtoDecoder();
test_class.type: OpenLRProtoDecoder
test_class.var_name: decoder
test_class.file: proto/src/test/java/openlr/proto/OpenLRProtoDecoderTest.java
test_class.identifier: OpenLRProtoDecoderTest
test_case.body: @Test
      public void testPointAlongLineLocationReference() throws PhysicalFormatException {
          Coordinates firstCoordinates = Coordinates.newBuilder()
                  .setLongitude(4)
                  .setLatitude(5)
                  .build();
  
          LineAttributes firstLineAttributes = LineAttributes.newBuilder()
                  .setBearing(120)
                  .setFrc(FRC.FRC_3)
                  .setFow(FOW.FOW_SLIPROAD)
                  .build();
  
          PathAttributes firstPathAttributes = PathAttributes.newBuilder()
                  .setDistanceToNext(200)
                  .setLowestFrcAlongPath(FRC.FRC_5)
                  .build();
  
          LocationReferencePoint first = LocationReferencePoint.newBuilder()
                  .setCoordinates(firstCoordinates)
                  .setLineAttributes(firstLineAttributes)
                  .setPathAttributes(firstPathAttributes)
                  .build();
  
          Coordinates lastCoordinates = Coordinates.newBuilder()
                  .setLongitude(4.2)
                  .setLatitude(5.2)
                  .build();
  
          LineAttributes lastLineAttributes = LineAttributes.newBuilder()
                  .setBearing(270)
                  .setFrc(FRC.FRC_1)
                  .setFow(FOW.FOW_MULTIPLE_CARRIAGEWAY)
                  .build();
  
          LocationReferencePoint last = LocationReferencePoint.newBuilder()
                  .setCoordinates(lastCoordinates)
                  .setLineAttributes(lastLineAttributes)
                  .build();
  
          PointAlongLineLocationReference pointAlongLineLocationReference = PointAlongLineLocationReference.newBuilder()
                  .setFirst(first)
                  .setLast(last)
                  .setPositiveOffset(20)
                  .setSideOfRoad(openlr.proto.schema.SideOfRoad.SIDE_OF_ROAD_RIGHT)
                  .setOrientation(openlr.proto.schema.Orientation.ORIENTATION_BOTH)
                  .build();
  
          LocationReferenceData locationReferenceData = LocationReferenceData.newBuilder()
                  .setPointAlongLineLocationReference(pointAlongLineLocationReference)
                  .build();
  
          LocationReference locationReference = new LocationReferenceProtoImpl("3", LocationType.POINT_ALONG_LINE, locationReferenceData);
  
          RawLocationReference rawLocationReference = decoder.decodeData(locationReference);
  
          assertNotNull(rawLocationReference);
          assertEquals(rawLocationReference.getID(), "3");
          assertEquals(rawLocationReference.getLocationType(), LocationType.POINT_ALONG_LINE);
          assertTrue(rawLocationReference.isValid());
      }
test_case.class_method_signature: OpenLRProtoDecoderTest.testPointAlongLineLocationReference()
test_case.full_signature: @Test public void testPointAlongLineLocationReference()
test_case.identifier: testPointAlongLineLocationReference
test_case.invocations: build setLatitude setLongitude newBuilder build setFow setFrc setBearing newBuilder build setLowestFrcAlongPath setDistanceToNext newBuilder build setPathAttributes setLineAttributes setCoordinates newBuilder build setLatitude setLongitude newBuilder build setFow setFrc setBearing newBuilder build setLineAttributes setCoordinates newBuilder build setOrientation setSideOfRoad setPositiveOffset setLast setFirst newBuilder build setPointAlongLineLocationReference newBuilder decodeData assertNotNull assertEquals getID assertEquals getLocationType assertTrue isValid
test_case.modifiers: @Test public
test_case.parameters: ()
test_case.return: void
test_case.signature: void testPointAlongLineLocationReference()
focal_class.declarator: locationTypeDecoderRegistry = LocationTypeDecoderRegistry.create()
focal_class.modifier: private final
focal_class.original_string: private final LocationTypeDecoderRegistry locationTypeDecoderRegistry = LocationTypeDecoderRegistry.create();
focal_class.type: LocationTypeDecoderRegistry
focal_class.var_name: locationTypeDecoderRegistry
focal_class.file: proto/src/main/java/openlr/proto/OpenLRProtoDecoder.java
focal_class.identifier: OpenLRProtoDecoder
focal_class.interfaces: implements PhysicalDecoder
focal_class.class_method_signature: OpenLRProtoDecoder.getDataClass()
focal_class.full_signature: @Override public Class<?> getDataClass()
focal_class.identifier: getDataClass
focal_class.modifiers: @Override public
focal_class.parameters: ()
focal_class.return: Class<?>
focal_class.signature: Class<?> getDataClass()
focal_class.class_method_signature: OpenLRProtoDecoder.decodeData(LocationReference data)
focal_class.full_signature: @Override public RawLocationReference decodeData(LocationReference data)
focal_class.identifier: decodeData
focal_class.modifiers: @Override public
focal_class.parameters: (LocationReference data)
focal_class.return: RawLocationReference
focal_class.signature: RawLocationReference decodeData(LocationReference data)
focal_class.class_method_signature: OpenLRProtoDecoder.getDataFormatIdentifier()
focal_class.full_signature: @Override public String getDataFormatIdentifier()
focal_class.identifier: getDataFormatIdentifier
focal_class.modifiers: @Override public
focal_class.parameters: ()
focal_class.return: String
focal_class.signature: String getDataFormatIdentifier()
focal_method.body: @Override
      public RawLocationReference decodeData(LocationReference data) throws PhysicalFormatException {
          LocationType locationType = data.getLocationType();
          LocationReferenceDecoder locationReferenceDecoder = locationTypeDecoderRegistry.getDecoder(locationType);
  
          if (locationReferenceDecoder == null) {
              throw new OpenLRProtoException(OpenLRProtoStatusCode.UNSUPPORTED_LOCATION_TYPE);
          }
  
          Object locationReferenceData = data.getLocationReferenceData();
  
          if (!(locationReferenceData instanceof LocationReferenceData)) {
              throw new OpenLRProtoException(OpenLRProtoStatusCode.INVALID_DATA_TYPE);
          }
  
          return locationReferenceDecoder.decode(data.getID(), (LocationReferenceData) locationReferenceData);
      }
focal_method.class_method_signature: OpenLRProtoDecoder.decodeData(LocationReference data)
focal_method.full_signature: @Override public RawLocationReference decodeData(LocationReference data)
focal_method.identifier: decodeData
focal_method.invocations: getLocationType getDecoder getLocationReferenceData decode getID
focal_method.modifiers: @Override public
focal_method.parameters: (LocationReference data)
focal_method.return: RawLocationReference
focal_method.signature: RawLocationReference decodeData(LocationReference data)