buf.append( "\n" ); buf.append( "src = '" ); buf.append( getSrc() ); buf.append( "'" ); buf.append( "\n" );
private void rebaseBannerPaths( final Banner banner, final URLRebaser urlContainer ) { if ( banner.getHref() != null ) // it may be empty { banner.setHref( urlContainer.rebaseLink( banner.getHref() ) ); } if ( banner.getSrc() != null ) { banner.setSrc( urlContainer.rebaseLink( banner.getSrc() ) ); } }
/** * Resolves all relative paths between the elements in a banner. The banner element might contain relative paths * to the oldBaseUrl, these are changed to the newBannerUrl. * * @param banner * @param baseUrl */ private void relativizeBannerPaths( final Banner banner, final String baseUrl ) { // banner has been checked to be not null, both href and src may be empty or null banner.setHref( relativizeLink( banner.getHref(), baseUrl ) ); banner.setSrc( relativizeLink( banner.getSrc(), baseUrl ) ); }
/** * Method equals. * * @param other * @return boolean */ public boolean equals( Object other ) { if ( this == other ) { return true; } if ( !( other instanceof Banner ) ) { return false; } Banner that = (Banner) other; boolean result = true; result = result && ( getName() == null ? that.getName() == null : getName().equals( that.getName() ) ); result = result && ( getSrc() == null ? that.getSrc() == null : getSrc().equals( that.getSrc() ) ); result = result && ( getAlt() == null ? that.getAlt() == null : getAlt().equals( that.getAlt() ) ); result = result && ( getHref() == null ? that.getHref() == null : getHref().equals( that.getHref() ) ); result = result && ( getBorder() == null ? that.getBorder() == null : getBorder().equals( that.getBorder() ) ); result = result && ( getWidth() == null ? that.getWidth() == null : getWidth().equals( that.getWidth() ) ); result = result && ( getHeight() == null ? that.getHeight() == null : getHeight().equals( that.getHeight() ) ); result = result && ( getTitle() == null ? that.getTitle() == null : getTitle().equals( that.getTitle() ) ); return result; } //-- boolean equals( Object )