Set the {@link ExternalGraphic}'s path.

<p>Currently one {@link ExternalGraphic} per {@link Symbolizer} is supported.

<p>This is used for point styles.

@param externalGraphicPath the path to set.
@throws MalformedURLException
325530
public void setExternalGraphicPath( String externalGraphicPath ) throws MalformedURLException {
        if (externalGraphicPath == null) {
            PointSymbolizerWrapper pointSymbolizerWrapper = adapt(PointSymbolizerWrapper.class);
            if (pointSymbolizerWrapper != null) {
                Graphic graphic = pointSymbolizerWrapper.getGraphic();
                graphic.graphicalSymbols().clear();
                externalGraphic = null;
            }
        } else {
            PointSymbolizerWrapper pointSymbolizerWrapper = adapt(PointSymbolizerWrapper.class);
            if (pointSymbolizerWrapper != null) {
                Graphic graphic = pointSymbolizerWrapper.getGraphic();
                graphic.graphicalSymbols().clear();
                String urlStr = externalGraphicPath;
                if (!externalGraphicPath.startsWith("http:") && !externalGraphicPath.startsWith("file:")) { //$NON-NLS-1$ //$NON-NLS-2$
                    urlStr = "file:" + externalGraphicPath; //$NON-NLS-1$
                } else if (externalGraphicPath.startsWith("./")) {
                    urlStr = "file:" + externalGraphicPath; //$NON-NLS-1$
                }
                externalGraphic = sb.createExternalGraphic(new URL(urlStr), getFormat(externalGraphicPath));
                graphic.graphicalSymbols().add(externalGraphic);
            }
            setExternalGraphicPath(externalGraphicPath, externalGraphic);
        }
    }
828468
private static ImageIcon createImageIcon(String path) {
        java.net.URL imgURL = GraphPanel.class.getResource(path);
        if (imgURL != null)
            return new ImageIcon(imgURL);
        else {
            throw new RuntimeException("Couldn't find file: " + path);
            //log.error("Couldn't find file: " + path);
            //return null;
        }
    }
3751
public void setExternalFrame(Shape current) {
		this.current = current;
		next = (Shape) shapes.get(0);
		offset = 0;
	}
471777
@Override
	public Resource createRelative(String relativePath) throws MalformedURLException {
		if (relativePath.startsWith("/")) {
			relativePath = relativePath.substring(1);
		}
		return new UrlResource(new URL(this.url, relativePath));
	}
240612
public void setEntityPath(java.util.Collection<FaultRootCauseEntity> entityPath) {
        if (entityPath == null) {
            this.entityPath = null;
            return;
        }

        this.entityPath = new java.util.ArrayList<FaultRootCauseEntity>(entityPath);
    }
321955
public void setExternalCacheFragment(ExternalInvalidation externalCacheFragment) {
        if (tc.isEntryEnabled())
            Tr.entry(tc, "setExternalCacheFragment: {0}", externalCacheFragment.getUri());
        externalCacheFragment = invalidationAuditDaemon.filterExternalCacheFragment(ServerCache.cache.getCacheName(), externalCacheFragment);
        if (externalCacheFragment != null) {
            batchUpdateDaemon.pushExternalCacheFragment(externalCacheFragment, ServerCache.cache);  
        }
        if (tc.isEntryEnabled())
            Tr.exit(tc, "setExternalCacheFragment: {0}", externalCacheFragment.getUri());
    }
1286090
public void setClassPath(Path classpath) {
        pathComponents.removeAllElements();
        if (classpath != null) {
            Path actualClasspath = classpath.concatSystemClasspath("ignore");
            String[] pathElements = actualClasspath.list();
            for (int i = 0; i < pathElements.length; ++i) {
                try {
                    addPathElement(pathElements[i]);
                } catch (BuildException e) {
                    // ignore path elements which are invalid
                    // relative to the project
                }
            }
        }
    }
667794
public void setPath( String path )
    {
        // Note that an empty path is OK
        if ( path == null )
        {
            _path = null;
            setQuery( null );
            setFragment( null );
        }
        else
        {
            _path = path;
            _opaque = false;
            setSchemeSpecificPart( null );
        }
    }
331135
void setPathToNamesInternal(Set<GeneralNameInterface> names) {
        // set names to non-null dummy value
        // this breaks getPathToNames()
        pathToNames = Collections.<List<?>>emptySet();
        pathToGeneralNames = names;
    }
68899
@ConfigArg(0)
  public void setPath(PathImpl path)
  {
    if (path.getPath().endsWith(".jar")
        || path.getPath().endsWith(".zip")) {
      path = JarPath.create(path);
    }

    _path = path;
  }
787246
public void setPath(List<? extends S> path, Direction1D direction) {
		this.path = path == null || path.isEmpty() ? null : new ArrayList<>(path);
		this.firstSegmentDirection = detectFirstSegmentDirection(direction);
	}
233290
public void setActualFilePath(String actualFilePath) {
        this.actualFilePath = actualFilePath;
        this.sha1sum = null;
        this.sha256sum = null;
        this.md5sum = null;
        final File file = getActualFile();
        if (file.isFile()) {
            calculateChecksums(this.getActualFile());
        }
    }
1062959
public void setSourcePath(String sourcePath) {
		this.sourcePath = new ArrayList<>();
		for (final String path : Strings.split(sourcePath, Pattern.quote(File.pathSeparator))) {
			this.sourcePath.add(normalizeFile(path));
		}
	}
1338858
public void initializeRelativePath(ServletRequest request, String relativeTo) 
    {
        if ( relativeTo == null )
        {
            relativeTo = _relativeTo;
        }

        if ( relativeTo == null ) return;

        assert ! relativeTo.endsWith("/") : relativeTo;
        String path = getPath();
         
        // If this is a local (relative) path, prefix it with the given 'relativeTo' path, and save a flag.
        // We save this flag in a local variable because the Forward object may be saved/restored for use again.
        if (! getContextRelative() && ! FileUtils.isAbsoluteURI(path)) {
            assert path.startsWith("/") : path;
            setPath(relativeTo + path);
            setContextRelative(true);
            _outsidePageFlowDirectory = true;
        }
        
        // Store a flag in the request that will prevent another page flow from being initialized implicitly because
        // we're hitting a path within it.  We want to stay in the context of the current page flow.
        if (_outsidePageFlowDirectory) {
            PageFlowRequestWrapper.get(request).setStayInCurrentModule(true);
        }
    }
57882
private static URL getUrlForResourceAsStream(final ExternalContext externalContext, String path)
            throws MalformedURLException
    {
        URLStreamHandler handler = new URLStreamHandler()
        {
            protected URLConnection openConnection(URL u) throws IOException
            {
                final String file = u.getFile();
                return new URLConnection(u)
                {
                    public void connect() throws IOException
                    {
                    }

                    public InputStream getInputStream() throws IOException
                    {
                        if (log.isLoggable(Level.FINE))
                        {
                            log.fine("Opening internal url to " + file);
                        }
                        Object ctx = externalContext.getContext();
                        // Or maybe fetch the external context afresh ?
                        // Object ctx =
                        // FacesContext.getCurrentInstance().getExternalContext().getContext();

                        if (ctx instanceof ServletContext)
                        {
                            ServletContext servletContext = (ServletContext) ctx;
                            InputStream stream = servletContext.getResourceAsStream(file);
                            if (stream == null)
                            {
                                throw new FileNotFoundException("Cannot open resource " + file);
                            }
                            return stream;
                        }
                        else
                        {
                            throw new IOException("Cannot open resource for an context of "
                                    + (ctx != null ? ctx.getClass() : null));
                        }
                    }
                };
            }
        };
        return new URL("internal", null, 0, path, handler);
    }
280373
public void setPath(String path) {
        if (path != null) {
            manifest = ManifestIterator.getInstance().findByPath(path);
        }
    }
115895
public boolean addPath(String path) throws MalformedURLException {
        File file = new File(path);
        return addPath( file );
    }