Java Doc for XMLSettingsHandler.java in  » Web-Crawler » heritrix » org » archive » crawler » settings » Java Source Code / Java DocumentationJava Source Code and Java Documentation

Java Source Code / Java Documentation
1. 6.0 JDK Core
2. 6.0 JDK Modules
3. 6.0 JDK Modules com.sun
4. 6.0 JDK Modules com.sun.java
5. 6.0 JDK Modules sun
6. 6.0 JDK Platform
7. Ajax
8. Apache Harmony Java SE
9. Aspect oriented
10. Authentication Authorization
11. Blogger System
12. Build
13. Byte Code
14. Cache
15. Chart
16. Chat
17. Code Analyzer
18. Collaboration
19. Content Management System
20. Database Client
21. Database DBMS
22. Database JDBC Connection Pool
23. Database ORM
24. Development
25. EJB Server geronimo
26. EJB Server GlassFish
27. EJB Server JBoss 4.2.1
28. EJB Server resin 3.1.5
29. ERP CRM Financial
30. ESB
31. Forum
32. GIS
33. Graphic Library
34. Groupware
35. HTML Parser
36. IDE
37. IDE Eclipse
38. IDE Netbeans
39. Installer
40. Internationalization Localization
41. Inversion of Control
42. Issue Tracking
43. J2EE
44. JBoss
45. JMS
46. JMX
47. Library
48. Mail Clients
49. Net
50. Parser
51. PDF
52. Portal
53. Profiler
54. Project Management
55. Report
56. RSS RDF
57. Rule Engine
58. Science
59. Scripting
60. Search Engine
61. Security
62. Sevlet Container
63. Source Control
64. Swing Library
65. Template Engine
66. Test Coverage
67. Testing
68. UML
69. Web Crawler
70. Web Framework
71. Web Mail
72. Web Server
73. Web Services
74. Web Services apache cxf 2.0.1
75. Web Services AXIS2
76. Wiki Engine
77. Workflow Engines
78. XML
79. XML UI
Java
Java Tutorial
Java Open Source
Jar File Download
Java Articles
Java Products
Java by API
Photoshop Tutorials
Maya Tutorials
Flash Tutorials
3ds-Max Tutorials
Illustrator Tutorials
GIMP Tutorials
C# / C Sharp
C# / CSharp Tutorial
C# / CSharp Open Source
ASP.Net
ASP.NET Tutorial
JavaScript DHTML
JavaScript Tutorial
JavaScript Reference
HTML / CSS
HTML CSS Reference
C / ANSI-C
C Tutorial
C++
C++ Tutorial
Ruby
PHP
Python
Python Tutorial
Python Open Source
SQL Server / T-SQL
SQL Server / T-SQL Tutorial
Oracle PL / SQL
Oracle PL/SQL Tutorial
PostgreSQL
SQL / MySQL
MySQL Tutorial
VB.Net
VB.Net Tutorial
Flash / Flex / ActionScript
VBA / Excel / Access / Word
XML
XML Tutorial
Microsoft Office PowerPoint 2007 Tutorial
Microsoft Office Excel 2007 Tutorial
Microsoft Office Word 2007 Tutorial
Java Source Code / Java Documentation » Web Crawler » heritrix » org.archive.crawler.settings 
Source Cross Reference  Class Diagram Java Document (Java Doc) 


java.lang.Object
   org.archive.crawler.settings.SettingsHandler
      org.archive.crawler.settings.XMLSettingsHandler

XMLSettingsHandler
public class XMLSettingsHandler extends SettingsHandler (Code)
A SettingsHandler which uses XML files as persistent storage.
author:
   John Erik Halse


Field Summary
final protected static  StringXML_ATTRIBUTE_CLASS
    
final protected static  StringXML_ATTRIBUTE_FROM
    
final protected static  StringXML_ATTRIBUTE_NAME
    
final protected static  StringXML_ATTRIBUTE_TO
    
final protected static  StringXML_ELEMENT_AUDIENCE
    
final protected static  StringXML_ELEMENT_CONTENTMATCHES
    
final protected static  StringXML_ELEMENT_CONTROLLER
    
final protected static  StringXML_ELEMENT_DATE
    
final protected static  StringXML_ELEMENT_DESCRIPTION
    
final protected static  StringXML_ELEMENT_LIMITS
    
final protected static  StringXML_ELEMENT_META
    
final protected static  StringXML_ELEMENT_NAME
    
final protected static  StringXML_ELEMENT_NEW_OBJECT
    
final protected static  StringXML_ELEMENT_OBJECT
    
final protected static  StringXML_ELEMENT_OPERATOR
    
final protected static  StringXML_ELEMENT_ORGANIZATION
    
final protected static  StringXML_ELEMENT_PORTNUMBER
    
final protected static  StringXML_ELEMENT_REFERENCE
    
final protected static  StringXML_ELEMENT_REFINEMENT
    
final protected static  StringXML_ELEMENT_REFINEMENTLIST
    
final protected static  StringXML_ELEMENT_TIMESPAN
    
final protected static  StringXML_ELEMENT_URIMATCHES
    
final protected static  StringXML_ROOT_HOST_SETTINGS
    
final protected static  StringXML_ROOT_ORDER
    
final protected static  StringXML_ROOT_REFINEMENT
    
final protected static  StringXML_SCHEMA
    

Constructor Summary
public  XMLSettingsHandler(File orderFile)
     Create a new XMLSettingsHandler object.

Method Summary
public  voidcopySettings(File newOrderFileName, String newSettingsDirectory)
     Creates a replica of the settings file structure in another directory (fully recursive, includes all per host settings).
public  voiddeleteSettingsObject(CrawlerSettings settings)
     Delete a settings object from persistent storage. Deletes the file represented by the submitted settings object.
public  CollectiongetDomainOverrides(String rootDomain)
    
public  List<String>getListOfAllFiles()
    
public  FilegetOrderFile()
     Get the File object pointing to the order file.
public  FilegetPathRelativeToWorkingDirectory(String path)
     Transforms a relative path so that it is relative to the location of the order file.
public  voidinitialize()
     Initialize the SettingsHandler.
public  voidinitialize(File source)
     Initialize the SettingsHandler from a source. This method builds the settings data structure and initializes it with settings from the order file given as a parameter.
final protected  CrawlerSettingsreadSettingsObject(CrawlerSettings settings, File f)
     Read the CrawlerSettings object from a specific file.
Parameters:
  settings - the settings object to be updated with data from thepersistent storage.
Parameters:
  f - the file to read from.
final protected  CrawlerSettingsreadSettingsObject(CrawlerSettings settings)
    
final protected  FilesettingsToFilename(CrawlerSettings settings)
     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.
Parameters:
  settings - the settings object to get file path for.
final public  voidwriteSettingsObject(CrawlerSettings settings)
    
final public  voidwriteSettingsObject(CrawlerSettings settings, File filename)
     Write a CrawlerSettings object to a specified file.

Field Detail
XML_ATTRIBUTE_CLASS
final protected static String XML_ATTRIBUTE_CLASS(Code)



XML_ATTRIBUTE_FROM
final protected static String XML_ATTRIBUTE_FROM(Code)



XML_ATTRIBUTE_NAME
final protected static String XML_ATTRIBUTE_NAME(Code)



XML_ATTRIBUTE_TO
final protected static String XML_ATTRIBUTE_TO(Code)



XML_ELEMENT_AUDIENCE
final protected static String XML_ELEMENT_AUDIENCE(Code)



XML_ELEMENT_CONTENTMATCHES
final protected static String XML_ELEMENT_CONTENTMATCHES(Code)



XML_ELEMENT_CONTROLLER
final protected static String XML_ELEMENT_CONTROLLER(Code)



XML_ELEMENT_DATE
final protected static String XML_ELEMENT_DATE(Code)



XML_ELEMENT_DESCRIPTION
final protected static String XML_ELEMENT_DESCRIPTION(Code)



XML_ELEMENT_LIMITS
final protected static String XML_ELEMENT_LIMITS(Code)



XML_ELEMENT_META
final protected static String XML_ELEMENT_META(Code)



XML_ELEMENT_NAME
final protected static String XML_ELEMENT_NAME(Code)



XML_ELEMENT_NEW_OBJECT
final protected static String XML_ELEMENT_NEW_OBJECT(Code)



XML_ELEMENT_OBJECT
final protected static String XML_ELEMENT_OBJECT(Code)



XML_ELEMENT_OPERATOR
final protected static String XML_ELEMENT_OPERATOR(Code)



XML_ELEMENT_ORGANIZATION
final protected static String XML_ELEMENT_ORGANIZATION(Code)



XML_ELEMENT_PORTNUMBER
final protected static String XML_ELEMENT_PORTNUMBER(Code)



XML_ELEMENT_REFERENCE
final protected static String XML_ELEMENT_REFERENCE(Code)



XML_ELEMENT_REFINEMENT
final protected static String XML_ELEMENT_REFINEMENT(Code)



XML_ELEMENT_REFINEMENTLIST
final protected static String XML_ELEMENT_REFINEMENTLIST(Code)



XML_ELEMENT_TIMESPAN
final protected static String XML_ELEMENT_TIMESPAN(Code)



XML_ELEMENT_URIMATCHES
final protected static String XML_ELEMENT_URIMATCHES(Code)



XML_ROOT_HOST_SETTINGS
final protected static String XML_ROOT_HOST_SETTINGS(Code)



XML_ROOT_ORDER
final protected static String XML_ROOT_ORDER(Code)



XML_ROOT_REFINEMENT
final protected static String XML_ROOT_REFINEMENT(Code)



XML_SCHEMA
final protected static String XML_SCHEMA(Code)




Constructor Detail
XMLSettingsHandler
public XMLSettingsHandler(File orderFile) throws InvalidAttributeValueException(Code)
Create a new XMLSettingsHandler object.
Parameters:
  orderFile - where the order file is located.
throws:
  InvalidAttributeValueException -




Method Detail
copySettings
public void copySettings(File newOrderFileName, String newSettingsDirectory) throws IOException(Code)
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.
Parameters:
  newOrderFileName - where the new order file should be saved.
Parameters:
  newSettingsDirectory - the top level directory of the per host/domainsettings files.
throws:
  IOException -



deleteSettingsObject
public void deleteSettingsObject(CrawlerSettings settings)(Code)
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.
Parameters:
  settings - the settings object to delete.



getDomainOverrides
public Collection getDomainOverrides(String rootDomain)(Code)



getListOfAllFiles
public List<String> getListOfAllFiles()(Code)



getOrderFile
public File getOrderFile()(Code)
Get the File object pointing to the order file. File object for the order file.



getPathRelativeToWorkingDirectory
public File getPathRelativeToWorkingDirectory(String path)(Code)
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.

The location of it's order file is always considered as the 'working' directory for any given settings.
Parameters:
  path - A relative path to a file (or directory) The same path modified so that it is relative to the file levellocation of the order file for the settings handler.




initialize
public void initialize()(Code)
Initialize the SettingsHandler. This method builds the settings data structure and initializes it with settings from the order file given to the constructor.



initialize
public void initialize(File source)(Code)
Initialize the SettingsHandler from a source. This method builds the settings data structure and initializes it with settings from the order file given as a parameter. The intended use is to create a new order file based on a default (template) order file.
Parameters:
  source - the order file to initialize from.



readSettingsObject
final protected CrawlerSettings readSettingsObject(CrawlerSettings settings, File f)(Code)
Read the CrawlerSettings object from a specific file.
Parameters:
  settings - the settings object to be updated with data from thepersistent storage.
Parameters:
  f - the file to read from. the updated settings object or null if there was no data for thisin the persistent storage.



readSettingsObject
final protected CrawlerSettings readSettingsObject(CrawlerSettings settings)(Code)



settingsToFilename
final protected File settingsToFilename(CrawlerSettings settings)(Code)
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.
Parameters:
  settings - the settings object to get file path for. the file path for this settings object.



writeSettingsObject
final public void writeSettingsObject(CrawlerSettings settings)(Code)



writeSettingsObject
final public void writeSettingsObject(CrawlerSettings settings, File filename)(Code)
Write a CrawlerSettings object to a specified file. This method is similar to XMLSettingsHandler.writeSettingsObject(CrawlerSettings) except that it uses the submitted File object instead of trying to resolve where the file should be written.
Parameters:
  settings - the settings object to be serialized.
Parameters:
  filename - the file to which the settings object should be written.



Fields inherited from org.archive.crawler.settings.SettingsHandler
final static String BOOLEAN(Code)(Java Doc)
final static String DOUBLE(Code)(Java Doc)
final static String DOUBLE_LIST(Code)(Java Doc)
final static String FLOAT(Code)(Java Doc)
final static String FLOAT_LIST(Code)(Java Doc)
final static String INTEGER(Code)(Java Doc)
final static String INTEGER_LIST(Code)(Java Doc)
final static String LONG(Code)(Java Doc)
final static String LONG_LIST(Code)(Java Doc)
final static String MAP(Code)(Java Doc)
final static String OBJECT(Code)(Java Doc)
final static String STRING(Code)(Java Doc)
final static String STRING_LIST(Code)(Java Doc)
final static String TEXT(Code)(Java Doc)
final static String TIMESTAMP(Code)(Java Doc)

Methods inherited from org.archive.crawler.settings.SettingsHandler
protected static Object StringToType(String stringValue, String typeName)(Code)(Java Doc)
public void cleanup()(Code)(Java Doc)
public void clearPerHostSettingsCache()(Code)(Java Doc)
public void deleteSettingsObject(CrawlerSettings settings)(Code)(Java Doc)
boolean fireValueErrorHandlers(Constraint.FailedCheck error)(Code)(Java Doc)
protected static String getClassName(String typeName)(Code)(Java Doc)
public ComplexType getComplexTypeByAbsoluteName(CrawlerSettings settings, String absoluteName) throws AttributeNotFoundException(Code)(Java Doc)
abstract public Collection getDomainOverrides(String rootDomain)(Code)(Java Doc)
abstract public List getListOfAllFiles()(Code)(Java Doc)
public ModuleType getModule(String name)(Code)(Java Doc)
public CrawlerSettings getOrCreateSettingsObject(String scope)(Code)(Java Doc)
public CrawlerSettings getOrCreateSettingsObject(String scope, String refinement)(Code)(Java Doc)
public CrawlOrder getOrder()(Code)(Java Doc)
protected String getParentScope(String scope)(Code)(Java Doc)
abstract public File getPathRelativeToWorkingDirectory(String path)(Code)(Java Doc)
public CrawlerSettings getSettings(String host)(Code)(Java Doc)
public CrawlerSettings getSettings(String host, UURI uuri)(Code)(Java Doc)
protected CrawlerSettings getSettingsForHost(String host)(Code)(Java Doc)
public CrawlerSettings getSettingsObject(String scope)(Code)(Java Doc)
public CrawlerSettings getSettingsObject(String scope, String refinement)(Code)(Java Doc)
protected static String getTypeName(String className)(Code)(Java Doc)
public void initialize()(Code)(Java Doc)
public static ModuleType instantiateModuleTypeFromClassName(String name, String className) throws InvocationTargetException(Code)(Java Doc)
abstract protected CrawlerSettings readSettingsObject(CrawlerSettings settings)(Code)(Java Doc)
public void registerValueErrorHandler(ValueErrorHandler errorHandler)(Code)(Java Doc)
public void setErrorReportingLevel(Level level)(Code)(Java Doc)
public void unregisterValueErrorHandler(ValueErrorHandler errorHandler)(Code)(Java Doc)
abstract public void writeSettingsObject(CrawlerSettings settings)(Code)(Java Doc)

Methods inherited from java.lang.Object
native protected Object clone() throws CloneNotSupportedException(Code)(Java Doc)
public boolean equals(Object obj)(Code)(Java Doc)
protected void finalize() throws Throwable(Code)(Java Doc)
final native public Class getClass()(Code)(Java Doc)
native public int hashCode()(Code)(Java Doc)
final native public void notify()(Code)(Java Doc)
final native public void notifyAll()(Code)(Java Doc)
public String toString()(Code)(Java Doc)
final native public void wait(long timeout) throws InterruptedException(Code)(Java Doc)
final public void wait(long timeout, int nanos) throws InterruptedException(Code)(Java Doc)
final public void wait() throws InterruptedException(Code)(Java Doc)

www.java2java.com | Contact Us
Copyright 2009 - 12 Demo Source and Support. All rights reserved.
All other trademarks are property of their respective owners.