String filePath = URIUtil.getLocalPath( uri ); if ( !StringUtil.isEmpty( filePath ) ) { setProperty( ImageItem.SOURCE_PROP, DesignChoiceConstants.IMAGE_REF_TYPE_FILE ); } else { setProperty( ImageItem.SOURCE_PROP, DesignChoiceConstants.IMAGE_REF_TYPE_URL ); }
setProperty( ImageItem.SOURCE_PROP, DesignChoiceConstants.IMAGE_REF_TYPE_URL );
	private void checkImageType( )	{		int type = 0;		ReportDesign design = handler.getDesign( );		String uri = (String) image.getLocalProperty( design,				ImageItem.URI_PROP );		if ( !StringUtil.isEmpty( uri ) )		{			String filePath = URIUtil.getLocalPath( uri );			if ( !StringUtil.isEmpty( filePath ) )			{				setProperty( ImageItem.SOURCE_PROP,						DesignChoiceConstants.IMAGE_REF_TYPE_FILE );			}			else			{				setProperty( ImageItem.SOURCE_PROP,						DesignChoiceConstants.IMAGE_REF_TYPE_URL );			}			type++;		}		String name = (String) image.getLocalProperty( design,				ImageItem.IMAGE_NAME_PROP );		if ( !StringUtil.isEmpty( name ) )		{			setProperty( ImageItem.SOURCE_PROP,					DesignChoiceConstants.IMAGE_REF_TYPE_EMBED );			type++;		}		String typeExpr = (String) image.getLocalProperty( design,				ImageItem.TYPE_EXPR_PROP );		String valueExpr = (String) image.getLocalProperty( design,				ImageItem.VALUE_EXPR_PROP );		if ( !StringUtil.isEmpty( typeExpr ) || !StringUtil.isEmpty( valueExpr ) )		{			setProperty( ImageItem.SOURCE_PROP,					DesignChoiceConstants.IMAGE_REF_TYPE_EXPR );			type++;		}		if ( type > 1 )			handler.semanticError( new DesignParserException(					DesignParserException.DESIGN_EXCEPTION_IMAGE_REF_CONFLICT ) );	}