protected void mergeSite_Id( Site target, Site source, boolean sourceDominant, Map<Object, Object> context ) { String src = source.getId(); if ( src != null ) { if ( sourceDominant || target.getId() == null ) { target.setId( src ); target.setLocation( "id", source.getLocation( "id" ) ); } } }
protected void mergeSite_Name( Site target, Site source, boolean sourceDominant, Map<Object, Object> context ) { String src = source.getName(); if ( src != null ) { if ( sourceDominant || target.getName() == null ) { target.setName( src ); target.setLocation( "name", source.getLocation( "name" ) ); } } }
protected void mergeSite_Url( Site target, Site source, boolean sourceDominant, Map<Object, Object> context ) { String src = source.getUrl(); if ( src != null ) { if ( sourceDominant || target.getUrl() == null ) { target.setUrl( src ); target.setLocation( "url", source.getLocation( "url" ) ); } } }
protected void mergeSite_ChildSiteUrlInheritAppendPath( Site target, Site source, boolean sourceDominant, Map<Object, Object> context ) { String src = source.getChildSiteUrlInheritAppendPath(); if ( src != null ) { if ( sourceDominant || target.getChildSiteUrlInheritAppendPath() == null ) { target.setChildSiteUrlInheritAppendPath( src ); target.setLocation( "child.site.url.inherit.append.path", source.getLocation( "child.site.url.inherit.append.path" ) ); } } }
@Override protected void mergeSite_Url( Site target, Site source, boolean sourceDominant, Map<Object, Object> context ) { String src = source.getUrl(); if ( src != null ) { if ( sourceDominant ) { target.setUrl( src ); target.setLocation( "url", source.getLocation( "url" ) ); } else if ( target.getUrl() == null ) { target.setUrl( extrapolateChildUrl( src, source.isChildSiteUrlInheritAppendPath(), context ) ); target.setLocation( "url", source.getLocation( "url" ) ); } } }
@Override protected void mergeDistributionManagement_Site( DistributionManagement target, DistributionManagement source, boolean sourceDominant, Map<Object, Object> context ) { Site src = source.getSite(); if ( src != null ) { Site tgt = target.getSite(); if ( sourceDominant || tgt == null || isSiteEmpty( tgt ) ) { if ( tgt == null ) { tgt = new Site(); } tgt.setLocation( "", src.getLocation( "" ) ); target.setSite( tgt ); mergeSite( tgt, src, sourceDominant, context ); } mergeSite_ChildSiteUrlInheritAppendPath( tgt, src, sourceDominant, context ); } }
InputLocation _location; _location = new InputLocation( parser.getLineNumber(), parser.getColumnNumber(), source ); site.setLocation( "", _location ); for ( int i = parser.getAttributeCount() - 1; i >= 0; i-- ) site.setLocation( "childSiteUrlInheritAppendPath", _location ); site.setChildSiteUrlInheritAppendPath( interpolatedTrimmed( value, "child.site.url.inherit.append.path" ) ); site.setLocation( "id", _location ); site.setId( interpolatedTrimmed( parser.nextText(), "id" ) ); site.setLocation( "name", _location ); site.setName( interpolatedTrimmed( parser.nextText(), "name" ) ); site.setLocation( "url", _location ); site.setUrl( interpolatedTrimmed( parser.nextText(), "url" ) );
/** * @param key * @param location */ public FluentSiteBuilder withLocation(Object key, InputLocation location) { site.setLocation(key, location); return this; }
protected void mergeSite_Url( Site target, Site source, boolean sourceDominant, Map<Object, Object> context ) { String src = source.getUrl(); if ( src != null ) { if ( sourceDominant || target.getUrl() == null ) { target.setUrl( src ); target.setLocation( "url", source.getLocation( "url" ) ); } } }
protected void mergeSite_Name( Site target, Site source, boolean sourceDominant, Map<Object, Object> context ) { String src = source.getName(); if ( src != null ) { if ( sourceDominant || target.getName() == null ) { target.setName( src ); target.setLocation( "name", source.getLocation( "name" ) ); } } }
protected void mergeSite_Id( Site target, Site source, boolean sourceDominant, Map<Object, Object> context ) { String src = source.getId(); if ( src != null ) { if ( sourceDominant || target.getId() == null ) { target.setId( src ); target.setLocation( "id", source.getLocation( "id" ) ); } } }
@Override protected void mergeSite_Url( Site target, Site source, boolean sourceDominant, Map<Object, Object> context ) { String src = source.getUrl(); if ( src != null ) { if ( sourceDominant ) { target.setUrl( src ); target.setLocation( "url", source.getLocation( "url" ) ); } else if ( target.getUrl() == null ) { target.setUrl( extrapolateChildUrl( src, source.isChildInheritAppendPath(), context ) ); target.setLocation( "url", source.getLocation( "url" ) ); } } }
@Override protected void mergeDistributionManagement_Site( DistributionManagement target, DistributionManagement source, boolean sourceDominant, Map<Object, Object> context ) { Site src = source.getSite(); if ( src != null ) { Site tgt = target.getSite(); if ( sourceDominant || tgt == null ) { tgt = new Site(); tgt.setLocation( "", src.getLocation( "" ) ); target.setSite( tgt ); mergeSite( tgt, src, sourceDominant, context ); } } }
InputLocation _location; _location = new InputLocation( parser.getLineNumber(), parser.getColumnNumber(), source ); site.setLocation( "", _location ); for ( int i = parser.getAttributeCount() - 1; i >= 0; i-- ) site.setLocation( "id", _location ); site.setId( getTrimmedValue( parser.nextText() ) ); site.setLocation( "name", _location ); site.setName( getTrimmedValue( parser.nextText() ) ); site.setLocation( "url", _location ); site.setUrl( getTrimmedValue( parser.nextText() ) );