📄 xmlsettingshandler.html
字号:
<PRE>protected final java.io.File <B>settingsToFilename</B>(<A HREF="../../../../org/archive/crawler/settings/CrawlerSettings.html" title="class in org.archive.crawler.settings">CrawlerSettings</A> settings)</PRE><DL><DD>Resolves the filename for a settings object into a file path. It will also create the directory structure leading to this file if it doesn't exist.<P><DD><DL><DT><B>Parameters:</B><DD><CODE>settings</CODE> - the settings object to get file path for.<DT><B>Returns:</B><DD>the file path for this settings object.</DL></DD></DL><HR><A NAME="writeSettingsObject(org.archive.crawler.settings.CrawlerSettings)"><!-- --></A><H3>writeSettingsObject</H3><PRE>public final void <B>writeSettingsObject</B>(<A HREF="../../../../org/archive/crawler/settings/CrawlerSettings.html" title="class in org.archive.crawler.settings">CrawlerSettings</A> settings)</PRE><DL><DD><B>Description copied from class: <CODE><A HREF="../../../../org/archive/crawler/settings/SettingsHandler.html#writeSettingsObject(org.archive.crawler.settings.CrawlerSettings)">SettingsHandler</A></CODE></B></DD><DD>Write the CrawlerSettings object to persistent storage.<P><DD><DL><DT><B>Specified by:</B><DD><CODE><A HREF="../../../../org/archive/crawler/settings/SettingsHandler.html#writeSettingsObject(org.archive.crawler.settings.CrawlerSettings)">writeSettingsObject</A></CODE> in class <CODE><A HREF="../../../../org/archive/crawler/settings/SettingsHandler.html" title="class in org.archive.crawler.settings">SettingsHandler</A></CODE></DL></DD><DD><DL><DT><B>Parameters:</B><DD><CODE>settings</CODE> - the settings object to write.</DL></DD></DL><HR><A NAME="writeSettingsObject(org.archive.crawler.settings.CrawlerSettings, java.io.File)"><!-- --></A><H3>writeSettingsObject</H3><PRE>public final void <B>writeSettingsObject</B>(<A HREF="../../../../org/archive/crawler/settings/CrawlerSettings.html" title="class in org.archive.crawler.settings">CrawlerSettings</A> settings, java.io.File filename)</PRE><DL><DD>Write a CrawlerSettings object to a specified file. This method is similar to <A HREF="../../../../org/archive/crawler/settings/XMLSettingsHandler.html#writeSettingsObject(org.archive.crawler.settings.CrawlerSettings)"><CODE>writeSettingsObject(CrawlerSettings)</CODE></A> except that it uses the submitted File object instead of trying to resolve where the file should be written.<P><DD><DL><DT><B>Parameters:</B><DD><CODE>settings</CODE> - the settings object to be serialized.<DD><CODE>filename</CODE> - the file to which the settings object should be written.</DL></DD></DL><HR><A NAME="readSettingsObject(org.archive.crawler.settings.CrawlerSettings, java.io.File)"><!-- --></A><H3>readSettingsObject</H3><PRE>protected final <A HREF="../../../../org/archive/crawler/settings/CrawlerSettings.html" title="class in org.archive.crawler.settings">CrawlerSettings</A> <B>readSettingsObject</B>(<A HREF="../../../../org/archive/crawler/settings/CrawlerSettings.html" title="class in org.archive.crawler.settings">CrawlerSettings</A> settings, java.io.File f)</PRE><DL><DD>Read the CrawlerSettings object from a specific file.<P><DD><DL><DT><B>Parameters:</B><DD><CODE>settings</CODE> - the settings object to be updated with data from the persistent storage.<DD><CODE>f</CODE> - the file to read from.<DT><B>Returns:</B><DD>the updated settings object or null if there was no data for this in the persistent storage.</DL></DD></DL><HR><A NAME="readSettingsObject(org.archive.crawler.settings.CrawlerSettings)"><!-- --></A><H3>readSettingsObject</H3><PRE>protected final <A HREF="../../../../org/archive/crawler/settings/CrawlerSettings.html" title="class in org.archive.crawler.settings">CrawlerSettings</A> <B>readSettingsObject</B>(<A HREF="../../../../org/archive/crawler/settings/CrawlerSettings.html" title="class in org.archive.crawler.settings">CrawlerSettings</A> settings)</PRE><DL><DD><B>Description copied from class: <CODE><A HREF="../../../../org/archive/crawler/settings/SettingsHandler.html#readSettingsObject(org.archive.crawler.settings.CrawlerSettings)">SettingsHandler</A></CODE></B></DD><DD>Read the CrawlerSettings object from persistent storage.<P><DD><DL><DT><B>Specified by:</B><DD><CODE><A HREF="../../../../org/archive/crawler/settings/SettingsHandler.html#readSettingsObject(org.archive.crawler.settings.CrawlerSettings)">readSettingsObject</A></CODE> in class <CODE><A HREF="../../../../org/archive/crawler/settings/SettingsHandler.html" title="class in org.archive.crawler.settings">SettingsHandler</A></CODE></DL></DD><DD><DL><DT><B>Parameters:</B><DD><CODE>settings</CODE> - the settings object to be updated with data from the persistent storage.<DT><B>Returns:</B><DD>the updated settings object or null if there was no data for this in the persistent storage.</DL></DD></DL><HR><A NAME="getOrderFile()"><!-- --></A><H3>getOrderFile</H3><PRE>public java.io.File <B>getOrderFile</B>()</PRE><DL><DD>Get the <code>File</code> object pointing to the order file.<P><DD><DL><DT><B>Returns:</B><DD>File object for the order file.</DL></DD></DL><HR><A NAME="copySettings(java.io.File, java.lang.String)"><!-- --></A><H3>copySettings</H3><PRE>public void <B>copySettings</B>(java.io.File newOrderFileName, java.lang.String newSettingsDirectory) throws java.io.IOException</PRE><DL><DD>Creates a replica of the settings file structure in another directory (fully recursive, includes all per host settings). The SettingsHandler will then refer to the new files. Observe that this method should only be called after the SettingsHandler has been initialized.<P><DD><DL><DT><B>Parameters:</B><DD><CODE>newOrderFileName</CODE> - where the new order file should be saved.<DD><CODE>newSettingsDirectory</CODE> - the top level directory of the per host/domain settings files.<DT><B>Throws:</B><DD><CODE>java.io.IOException</CODE></DL></DD></DL><HR><A NAME="getPathRelativeToWorkingDirectory(java.lang.String)"><!-- --></A><H3>getPathRelativeToWorkingDirectory</H3><PRE>public java.io.File <B>getPathRelativeToWorkingDirectory</B>(java.lang.String path)</PRE><DL><DD>Transforms a relative path so that it is relative to the location of the order file. If an absolute path is given, it will be returned unchanged.<p> The location of it's order file is always considered as the 'working' directory for any given settings.<P><DD><DL><DT><B>Specified by:</B><DD><CODE><A HREF="../../../../org/archive/crawler/settings/SettingsHandler.html#getPathRelativeToWorkingDirectory(java.lang.String)">getPathRelativeToWorkingDirectory</A></CODE> in class <CODE><A HREF="../../../../org/archive/crawler/settings/SettingsHandler.html" title="class in org.archive.crawler.settings">SettingsHandler</A></CODE></DL></DD><DD><DL><DT><B>Parameters:</B><DD><CODE>path</CODE> - A relative path to a file (or directory)<DT><B>Returns:</B><DD>The same path modified so that it is relative to the file level location of the order file for the settings handler.</DL></DD></DL><HR><A NAME="getDomainOverrides(java.lang.String)"><!-- --></A><H3>getDomainOverrides</H3><PRE>public java.util.Collection <B>getDomainOverrides</B>(java.lang.String rootDomain)</PRE><DL><DD><B>Description copied from class: <CODE><A HREF="../../../../org/archive/crawler/settings/SettingsHandler.html#getDomainOverrides(java.lang.String)">SettingsHandler</A></CODE></B></DD><DD>Will return a Collection of strings with domains that contain 'per' domain overrides (or their subdomains contain them). The domains considered are limited to those that are subdomains of the supplied domain. If null or empty string is supplied the TLDs will be considered.<P><DD><DL><DT><B>Specified by:</B><DD><CODE><A HREF="../../../../org/archive/crawler/settings/SettingsHandler.html#getDomainOverrides(java.lang.String)">getDomainOverrides</A></CODE> in class <CODE><A HREF="../../../../org/archive/crawler/settings/SettingsHandler.html" title="class in org.archive.crawler.settings">SettingsHandler</A></CODE></DL></DD><DD><DL><DT><B>Parameters:</B><DD><CODE>rootDomain</CODE> - The domain to get domain overrides for. Examples: 'org', 'archive.org', 'crawler.archive.org' etc.<DT><B>Returns:</B><DD>An array of domains that contain overrides. If rootDomain does not exist an empty array will be returned.</DL></DD></DL><HR><A NAME="deleteSettingsObject(org.archive.crawler.settings.CrawlerSettings)"><!-- --></A><H3>deleteSettingsObject</H3><PRE>public void <B>deleteSettingsObject</B>(<A HREF="../../../../org/archive/crawler/settings/CrawlerSettings.html" title="class in org.archive.crawler.settings">CrawlerSettings</A> settings)</PRE><DL><DD>Delete a settings object from persistent storage. Deletes the file represented by the submitted settings object. All empty directories that are parents to the files path are also deleted.<P><DD><DL><DT><B>Overrides:</B><DD><CODE><A HREF="../../../../org/archive/crawler/settings/SettingsHandler.html#deleteSettingsObject(org.archive.crawler.settings.CrawlerSettings)">deleteSettingsObject</A></CODE> in class <CODE><A HREF="../../../../org/archive/crawler/settings/SettingsHandler.html" title="class in org.archive.crawler.settings">SettingsHandler</A></CODE></DL></DD><DD><DL><DT><B>Parameters:</B><DD><CODE>settings</CODE> - the settings object to delete.</DL></DD></DL><HR><A NAME="getListOfAllFiles()"><!-- --></A><H3>getListOfAllFiles</H3><PRE>public java.util.List <B>getListOfAllFiles</B>()</PRE><DL><DD><B>Description copied from class: <CODE><A HREF="../../../../org/archive/crawler/settings/SettingsHandler.html#getListOfAllFiles()">SettingsHandler</A></CODE></B></DD><DD>Creates and returns a <tt>List</tt> of all files comprising the current settings framework. <p>The List contains the absolute String path of each file. <p>The list should contain any configurable files, including such files as seed file and any other files use by the various settings modules. <p>Implementations of the SettingsHandler that do not use files for permanent storage should return an empty list.<P><DD><DL><DT><B>Specified by:</B><DD><CODE><A HREF="../../../../org/archive/crawler/settings/SettingsHandler.html#getListOfAllFiles()">getListOfAllFiles</A></CODE> in class <CODE><A HREF="../../../../org/archive/crawler/settings/SettingsHandler.html" title="class in org.archive.crawler.settings">SettingsHandler</A></CODE></DL></DD><DD><DL><DT><B>Returns:</B><DD><code>List</code> of framework files.</DL></DD></DL><!-- ========= END OF CLASS DATA ========= --><HR><!-- ======= START OF BOTTOM NAVBAR ====== --><A NAME="navbar_bottom"><!-- --></A><A HREF="#skip-navbar_bottom" title="Skip navigation links"></A><TABLE BORDER="0" WIDTH="100%" CELLPADDING="1" CELLSPACING="0" SUMMARY=""><TR><TD COLSPAN=2 BGCOLOR="#EEEEFF" CLASS="NavBarCell1"><A NAME="navbar_bottom_firstrow"><!-- --></A><TABLE BORDER="0" CELLPADDING="0" CELLSPACING="3" SUMMARY=""> <TR ALIGN="center" VALIGN="top"> <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../../overview-summary.html"><FONT CLASS="NavBarFont1"><B>Overview</B></FONT></A> </TD> <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="package-summary.html"><FONT CLASS="NavBarFont1"><B>Package</B></FONT></A> </TD> <TD BGCOLOR="#FFFFFF" CLASS="NavBarCell1Rev"> <FONT CLASS="NavBarFont1Rev"><B>Class</B></FONT> </TD> <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="class-use/XMLSettingsHandler.html"><FONT CLASS="NavBarFont1"><B>Use</B></FONT></A> </TD> <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="package-tree.html"><FONT CLASS="NavBarFont1"><B>Tree</B></FONT></A> </TD> <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../../deprecated-list.html"><FONT CLASS="NavBarFont1"><B>Deprecated</B></FONT></A> </TD> <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../../index-all.html"><FONT CLASS="NavBarFont1"><B>Index</B></FONT></A> </TD> <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../../help-doc.html"><FONT CLASS="NavBarFont1"><B>Help</B></FONT></A> </TD> </TR></TABLE></TD><TD ALIGN="right" VALIGN="top" ROWSPAN=3><EM></EM></TD></TR><TR><TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2"> <A HREF="../../../../org/archive/crawler/settings/ValueErrorHandler.html" title="interface in org.archive.crawler.settings"><B>PREV CLASS</B></A> NEXT CLASS</FONT></TD><TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2"> <A HREF="../../../../index.html?org/archive/crawler/settings/XMLSettingsHandler.html" target="_top"><B>FRAMES</B></A> <A HREF="XMLSettingsHandler.html" target="_top"><B>NO FRAMES</B></A> <SCRIPT type="text/javascript"> <!-- if(window==top) { document.writeln('<A HREF="../../../../allclasses-noframe.html"><B>All Classes</B></A>'); } //--></SCRIPT><NOSCRIPT> <A HREF="../../../../allclasses-noframe.html"><B>All Classes</B></A></NOSCRIPT></FONT></TD></TR><TR><TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2"> SUMMARY: NESTED | <A HREF="#field_summary">FIELD</A> | <A HREF="#constructor_summary">CONSTR</A> | <A HREF="#method_summary">METHOD</A></FONT></TD><TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2">DETAIL: <A HREF="#field_detail">FIELD</A> | <A HREF="#constructor_detail">CONSTR</A> | <A HREF="#method_detail">METHOD</A></FONT></TD></TR></TABLE><A NAME="skip-navbar_bottom"></A><!-- ======== END OF BOTTOM NAVBAR ======= --><HR>Copyright © 2003-2006 Internet Archive. All Rights Reserved.</BODY></HTML>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -