Java Doc for SurtPrefixSet.java in  » Web-Crawler » heritrix » org » archive » util » 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.util 
Source Cross Reference  Class Diagram Java Document (Java Doc) 


org.archive.util.SurtPrefixSet

SurtPrefixSet
public class SurtPrefixSet extends TreeSet (Code)
Specialized TreeSet for keeping a set of String prefixes. Redundant prefixes (those that are themselves prefixed by other set entries) are eliminated.
author:
   gojomo




Method Summary
public  booleanadd(String s)
     Maintains additional invariant: if one entry is a prefix of another, keep only the prefix.
public  booleancontainsPrefixOf(String s)
     Test whether the given String is prefixed by one of this set's entries.
public  voidconvertAllPrefixesToDomains()
     Changes all prefixes so that they only enforce a general domain (allowing subdomains).For prefixes that don't include a ')', no change is necessary.
public  voidconvertAllPrefixesToHosts()
     Changes all prefixes so that they enforce an exact host.
public static  StringconvertPrefixToDomain(String prefix)
    
public static  StringconvertPrefixToHost(String prefix)
    
public  voidexportTo(FileWriter fw)
    
public static  StringgetCandidateSurt(Object object)
    
public  voidimportFrom(Reader r)
     Read a set of SURT prefixes from a reader source; keep sorted and with redundant entries removed.
public  voidimportFromMixed(Reader r, boolean deduceFromSeeds)
     Import SURT prefixes from a reader with mixed URI and SURT prefix format.
public  voidimportFromUris(Reader r)
    
public static  voidmain(String[] args)
     Allow class to be used as a command-line tool for converting URL lists (or naked host or host/path fragments implied to be HTTP URLs) to implied SURT prefix form.
public static  StringprefixFromPlain(String u)
     Given a plain URI or hostname/hostname+path, deduce an implied SURT prefix from it.



Method Detail
add
public boolean add(String s)(Code)
Maintains additional invariant: if one entry is a prefix of another, keep only the prefix.
See Also:   java.util.Collection.add(java.lang.Object)



containsPrefixOf
public boolean containsPrefixOf(String s)(Code)
Test whether the given String is prefixed by one of this set's entries.
Parameters:
  s - True if contains prefix.



convertAllPrefixesToDomains
public void convertAllPrefixesToDomains()(Code)
Changes all prefixes so that they only enforce a general domain (allowing subdomains).For prefixes that don't include a ')', no change is necessary. For others, truncate everything from the ')' onward. Additionally, truncate off "www," if it appears.



convertAllPrefixesToHosts
public void convertAllPrefixesToHosts()(Code)
Changes all prefixes so that they enforce an exact host. For prefixes that already include a ')', this means discarding anything after ')' (path info). For prefixes that don't include a ')' -- domain prefixes open to subdomains -- add the closing ')' (or ",)").



convertPrefixToDomain
public static String convertPrefixToDomain(String prefix)(Code)



convertPrefixToHost
public static String convertPrefixToHost(String prefix)(Code)



exportTo
public void exportTo(FileWriter fw) throws IOException(Code)

Parameters:
  fw -
throws:
  IOException -



getCandidateSurt
public static String getCandidateSurt(Object object)(Code)
Calculate the SURT form URI to use as a candidate against prefixes from the given Object (CandidateURI or UURI)
Parameters:
  object - CandidateURI or UURI SURT form of URI for evaluation, or null if unavailable



importFrom
public void importFrom(Reader r)(Code)
Read a set of SURT prefixes from a reader source; keep sorted and with redundant entries removed.
Parameters:
  r - reader over file of SURT_format strings
throws:
  IOException -



importFromMixed
public void importFromMixed(Reader r, boolean deduceFromSeeds)(Code)
Import SURT prefixes from a reader with mixed URI and SURT prefix format.
Parameters:
  r - the reader to import the prefixes from
Parameters:
  deduceFromSeeds - true to also import SURT prefixes impliedfrom normal URIs/hostname seeds



importFromUris
public void importFromUris(Reader r)(Code)

Parameters:
  r - Where to read from.



main
public static void main(String[] args) throws IOException(Code)
Allow class to be used as a command-line tool for converting URL lists (or naked host or host/path fragments implied to be HTTP URLs) to implied SURT prefix form. Read from stdin or first file argument. Writes to stdout.
Parameters:
  args - cmd-line arguments: may include input file
throws:
  IOException -



prefixFromPlain
public static String prefixFromPlain(String u)(Code)
Given a plain URI or hostname/hostname+path, deduce an implied SURT prefix from it. Results may be unpredictable on strings that cannot be interpreted as URIs. UURI 'fixup' is applied to the URI that is built.
Parameters:
  u - URI or almost-URI to consider implied SURT prefix form



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