mirror of
https://github.com/google/nomulus
synced 2026-02-04 12:02:30 +00:00
Add ability to show full WHOIS output in nomulus command
------------- Created by MOE: https://github.com/google/moe MOE_MIGRATED_REVID=197731992
This commit is contained in:
@@ -134,24 +134,18 @@ abstract class WhoisResponseImpl implements WhoisResponse {
|
||||
return emitField(Joiner.on(' ').join(nameParts), value);
|
||||
}
|
||||
|
||||
/** Emit registrar address. */
|
||||
E emitRegistrarAddress(@Nullable String prefix, @Nullable Address address) {
|
||||
prefix = isNullOrEmpty(prefix) ? "" : prefix + " ";
|
||||
if (address != null) {
|
||||
emitList(prefix + "Street", address.getStreet());
|
||||
emitField(prefix + "City", address.getCity());
|
||||
emitField(prefix + "State/Province", address.getState());
|
||||
emitField(prefix + "Postal Code", address.getZip());
|
||||
emitField(prefix + "Country", address.getCountryCode());
|
||||
}
|
||||
return thisCastToDerived();
|
||||
}
|
||||
|
||||
/** Emit registrant address. */
|
||||
E emitRegistrantAddress(@Nullable String prefix, @Nullable Address address) {
|
||||
/** Emit a contact address. */
|
||||
E emitAddress(@Nullable String prefix, @Nullable Address address, boolean fullOutput) {
|
||||
prefix = isNullOrEmpty(prefix) ? "" : prefix + " ";
|
||||
if (address != null) {
|
||||
if (fullOutput) {
|
||||
emitList(prefix + "Street", address.getStreet());
|
||||
emitField(prefix + "City", address.getCity());
|
||||
}
|
||||
emitField(prefix + "State/Province", address.getState());
|
||||
if (fullOutput) {
|
||||
emitField(prefix + "Postal Code", address.getZip());
|
||||
}
|
||||
emitField(prefix + "Country", address.getCountryCode());
|
||||
}
|
||||
return thisCastToDerived();
|
||||
|
||||
Reference in New Issue
Block a user