@Test public void getSingleLineOneLine() { final Address address = new Address().addLine( "Lower Road 20" ); Assert.assertEquals( "Lower Road 20", utils.getSingleLine( address ) ); }
@Nullable @Override public String getSingleLine( @Nullable ICompositeType address, @Nonnull String delimiter ) { final Address convertedAddress = (Address) address; if ( (address == null) || convertedAddress.getLine().isEmpty() ) { return null; } return convertedAddress.getLine().stream().map( PrimitiveType::getValue ).collect( Collectors.joining( delimiter ) ); }
Dstu3AddressFhirToDhisTransformerUtils extends AbstractAddressFhirToDhisTransformerUtils { @Nullable @Override public String getSingleLine( @Nullable ICompositeType address, @Nonnull String delimiter ) { final Address convertedAddress = (Address) address; if ( (address == null) || convertedAddress.getLine().isEmpty() ) { return null; } return convertedAddress.getLine().stream().map( PrimitiveType::getValue ).collect( Collectors.joining( delimiter ) ); } }
Dstu3AddressFhirToDhisTransformerUtils extends AbstractAddressFhirToDhisTransformerUtils { @Nullable @Override public String getSingleLine( @Nullable ICompositeType address, @Nonnull String delimiter ) { final Address convertedAddress = (Address) address; if ( (address == null) || convertedAddress.getLine().isEmpty() ) { return null; } return convertedAddress.getLine().stream().map( PrimitiveType::getValue ).collect( Collectors.joining( delimiter ) ); } Dstu3AddressFhirToDhisTransformerUtils( @Nonnull ScriptExecutionContext scriptExecutionContext, @Nonnull Dstu3DateTimeFhirToDhisTransformerUtils dateTimeTransformerUtils ); }
Dstu3AddressFhirToDhisTransformerUtils extends AbstractAddressFhirToDhisTransformerUtils { @Nullable @Override public String getSingleLine( @Nullable ICompositeType address, @Nonnull String delimiter ) { final Address convertedAddress = (Address) address; if ( (address == null) || convertedAddress.getLine().isEmpty() ) { return null; } return convertedAddress.getLine().stream().map( PrimitiveType::getValue ).collect( Collectors.joining( delimiter ) ); } Dstu3AddressFhirToDhisTransformerUtils( @Nonnull ScriptExecutionContext scriptExecutionContext, @Nonnull Dstu3DateTimeFhirToDhisTransformerUtils dateTimeTransformerUtils ); @Nonnull @Override Set<FhirVersion> getFhirVersions(); @Nullable @Override ICompositeType getPrimaryAddress( @Nonnull List<? extends ICompositeType> addresses ); @Nullable @Override String getSingleLine( @Nullable ICompositeType address, @Nonnull String delimiter ); @Nullable @Override String getConstructedText( @Nullable ICompositeType address, @Nonnull String delimiter ); @Nullable @Override String getText( @Nullable ICompositeType address ); }
Dstu3AddressFhirToDhisTransformerUtils extends AbstractAddressFhirToDhisTransformerUtils { @Nullable @Override public String getSingleLine( @Nullable ICompositeType address, @Nonnull String delimiter ) { final Address convertedAddress = (Address) address; if ( (address == null) || convertedAddress.getLine().isEmpty() ) { return null; } return convertedAddress.getLine().stream().map( PrimitiveType::getValue ).collect( Collectors.joining( delimiter ) ); } Dstu3AddressFhirToDhisTransformerUtils( @Nonnull ScriptExecutionContext scriptExecutionContext, @Nonnull Dstu3DateTimeFhirToDhisTransformerUtils dateTimeTransformerUtils ); @Nonnull @Override Set<FhirVersion> getFhirVersions(); @Nullable @Override ICompositeType getPrimaryAddress( @Nonnull List<? extends ICompositeType> addresses ); @Nullable @Override String getSingleLine( @Nullable ICompositeType address, @Nonnull String delimiter ); @Nullable @Override String getConstructedText( @Nullable ICompositeType address, @Nonnull String delimiter ); @Nullable @Override String getText( @Nullable ICompositeType address );  }