test_class.declarator: pointAlongLineDecoder = new PointAlongLineDecoder(new LocationReferencePointDecoder())
test_class.original_string: PointAlongLineDecoder pointAlongLineDecoder = new PointAlongLineDecoder(new LocationReferencePointDecoder());
test_class.type: PointAlongLineDecoder
test_class.var_name: pointAlongLineDecoder
test_class.file: proto/src/test/java/openlr/proto/decoder/PointAlongLineDecoderTest.java
test_class.identifier: PointAlongLineDecoderTest
test_case.body: @Test
      public void testInvalidLocationReference() {
          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()
                  .setLast(last)
                  .setPositiveOffset(20)
                  .build();
  
          LocationReferenceData locationReferenceData = LocationReferenceData.newBuilder()
                  .setPointAlongLineLocationReference(pointAlongLineLocationReference)
                  .build();
  
          try {
              pointAlongLineDecoder.decode("1", locationReferenceData);
              fail();
          } catch (PhysicalFormatException e) {
              assertEquals(e.getErrorCode(), OpenLRProtoStatusCode.INVALID_LOCATION_REFERENCE);
          }
      }
test_case.class_method_signature: PointAlongLineDecoderTest.testInvalidLocationReference()
test_case.full_signature: @Test public void testInvalidLocationReference()
test_case.identifier: testInvalidLocationReference
test_case.invocations: build setLatitude setLongitude newBuilder build setFow setFrc setBearing newBuilder build setLineAttributes setCoordinates newBuilder build setPositiveOffset setLast newBuilder build setPointAlongLineLocationReference newBuilder decode fail assertEquals getErrorCode
test_case.modifiers: @Test public
test_case.parameters: ()
test_case.return: void
test_case.signature: void testInvalidLocationReference()
focal_class.declarator: locationReferencePointDecoder
focal_class.modifier: private final
focal_class.original_string: private final LocationReferencePointDecoder locationReferencePointDecoder;
focal_class.type: LocationReferencePointDecoder
focal_class.var_name: locationReferencePointDecoder
focal_class.file: proto/src/main/java/openlr/proto/decoder/PointAlongLineDecoder.java
focal_class.identifier: PointAlongLineDecoder
focal_class.interfaces: implements LocationReferenceDecoder
focal_class.class_method_signature: PointAlongLineDecoder.PointAlongLineDecoder(LocationReferencePointDecoder locationReferencePointDecoder)
focal_class.full_signature:   PointAlongLineDecoder(LocationReferencePointDecoder locationReferencePointDecoder)
focal_class.identifier: PointAlongLineDecoder
focal_class.parameters: (LocationReferencePointDecoder locationReferencePointDecoder)
focal_class.signature:  PointAlongLineDecoder(LocationReferencePointDecoder locationReferencePointDecoder)
focal_class.class_method_signature: PointAlongLineDecoder.decode(String id, LocationReferenceData data)
focal_class.full_signature: @Override public RawLocationReference decode(String id, LocationReferenceData data)
focal_class.identifier: decode
focal_class.modifiers: @Override public
focal_class.parameters: (String id, LocationReferenceData data)
focal_class.return: RawLocationReference
focal_class.signature: RawLocationReference decode(String id, LocationReferenceData data)
focal_class.class_method_signature: PointAlongLineDecoder.map(openlr.proto.schema.SideOfRoad sideOfRoad)
focal_class.full_signature: private SideOfRoad map(openlr.proto.schema.SideOfRoad sideOfRoad)
focal_class.identifier: map
focal_class.modifiers: private
focal_class.parameters: (openlr.proto.schema.SideOfRoad sideOfRoad)
focal_class.return: SideOfRoad
focal_class.signature: SideOfRoad map(openlr.proto.schema.SideOfRoad sideOfRoad)
focal_class.class_method_signature: PointAlongLineDecoder.map(openlr.proto.schema.Orientation orientation)
focal_class.full_signature: private Orientation map(openlr.proto.schema.Orientation orientation)
focal_class.identifier: map
focal_class.modifiers: private
focal_class.parameters: (openlr.proto.schema.Orientation orientation)
focal_class.return: Orientation
focal_class.signature: Orientation map(openlr.proto.schema.Orientation orientation)
focal_method.body: @Override
      public RawLocationReference decode(String id, LocationReferenceData data) throws OpenLRProtoException {
          if (!data.hasPointAlongLineLocationReference()) {
              throw new OpenLRProtoException(OpenLRProtoStatusCode.MISSING_LOCATION_REFERENCE);
          }
  
          PointAlongLineLocationReference pointAlongLineLocationReference = data.getPointAlongLineLocationReference();
  
          if (!pointAlongLineLocationReference.hasFirst()) {
              throw new OpenLRProtoException(OpenLRProtoStatusCode.INVALID_LOCATION_REFERENCE);
          }
  
          LocationReferencePoint first = locationReferencePointDecoder.decode(
                  pointAlongLineLocationReference.getFirst(), 1, false);
  
          if (!pointAlongLineLocationReference.hasLast()) {
              throw new OpenLRProtoException(OpenLRProtoStatusCode.INVALID_LOCATION_REFERENCE);
          }
  
          LocationReferencePoint last = locationReferencePointDecoder.decode(
                  pointAlongLineLocationReference.getLast(), 2, true);
  
          Offsets offsets = new OffsetsProtoImpl(pointAlongLineLocationReference.getPositiveOffset());
  
          SideOfRoad sideOfRoad = map(pointAlongLineLocationReference.getSideOfRoad());
          Orientation orientation = map(pointAlongLineLocationReference.getOrientation());
  
          return new RawPointAlongLocRef(id, first, last, offsets, sideOfRoad, orientation);
      }
focal_method.class_method_signature: PointAlongLineDecoder.decode(String id, LocationReferenceData data)
focal_method.full_signature: @Override public RawLocationReference decode(String id, LocationReferenceData data)
focal_method.identifier: decode
focal_method.invocations: hasPointAlongLineLocationReference getPointAlongLineLocationReference hasFirst decode getFirst hasLast decode getLast getPositiveOffset map getSideOfRoad map getOrientation
focal_method.modifiers: @Override public
focal_method.parameters: (String id, LocationReferenceData data)
focal_method.return: RawLocationReference
focal_method.signature: RawLocationReference decode(String id, LocationReferenceData data)