idl.tmt.documentsource.webcrawl
Class MultiMapURLMapper
java.lang.Object
|
+--idl.tmt.documentsource.webcrawl.MultiMapURLMapper
- All Implemented Interfaces:
- java.io.Serializable, URLMapper
- public class MultiMapURLMapper
- extends java.lang.Object
- implements URLMapper
This class supports the URLMapper interface, two internal
Maps
Created on Feb 27, 2004
- Author:
- jelsas
- See Also:
- Serialized Form
| Methods inherited from class java.lang.Object |
, clone, equals, finalize, getClass, hashCode, notify, notifyAll, registerNatives, toString, wait, wait, wait |
localKeys
private java.util.HashMap localKeys
remoteKeys
private java.util.HashMap remoteKeys
defaultIndex
private java.lang.String defaultIndex
MultiMapURLMapper
public MultiMapURLMapper(java.lang.String defaultIndex)
addMapping
public void addMapping(java.io.File localFile,
java.net.URL remoteURL)
remoteURLToLocalFile
public java.io.File remoteURLToLocalFile(java.net.URL u)
- Converts the remote URL to a local. This method could return
null if the remote URL is unknown.
- Specified by:
remoteURLToLocalFile in interface URLMapper
- See Also:
idl.tmt.documentsource.webcrawl.URLMapper#remoteToLocal(java.net.URL)
localFileToRemoteURL
public java.net.URL localFileToRemoteURL(java.io.File f)
- Converts the local URL to a remote
- Specified by:
localFileToRemoteURL in interface URLMapper
- See Also:
idl.tmt.documentsource.webcrawl.URLMapper#localToRemote(java.net.URL)
getDefaultIndexName
public java.lang.String getDefaultIndexName()
- Returns the default index name
- Specified by:
getDefaultIndexName in interface URLMapper
- See Also:
URLMapper.getDefaultIndexName()
setDefaultIndexName
public void setDefaultIndexName(java.lang.String name)
- This method is unsupported for this URLMapper. Calling this
method has no effect
- Specified by:
setDefaultIndexName in interface URLMapper
- See Also:
URLMapper.setDefaultIndexName(java.lang.String)
getLocalFileIterator
public java.util.Iterator getLocalFileIterator()
containsLocalFile
public boolean containsLocalFile(java.io.File f)
- Description copied from interface:
URLMapper
- Indicates whether the mapping contains the local file
- Specified by:
containsLocalFile in interface URLMapper
- Following copied from interface:
idl.tmt.documentsource.webcrawl.URLMapper
- Parameters:
f - the file- Returns:
- true if the mapping contains this file
containsRemoteURL
public boolean containsRemoteURL(java.net.URL u)
- Description copied from interface:
URLMapper
- Indicates whether the mapping contains the remote URL
- Specified by:
containsRemoteURL in interface URLMapper
- Following copied from interface:
idl.tmt.documentsource.webcrawl.URLMapper
- Parameters:
u - the url- Returns:
- true if the mapping contains this URL