Package dk.netarkivet.common
Class Constants
- java.lang.Object
-
- dk.netarkivet.common.Constants
-
public final class Constants extends java.lang.Object
This class is used for global constants only.If your constant is only to be used in a single package, put it in a Constants-class in that package, and make sure it is package private (no modifiers).
If your constant is used in a single class only, put it in that class, and make sure it is private.
Remember everything placed here MUST be constants.
This class is never instantiated, so thread security is not an issue.
-
-
Field Summary
Fields Modifier and Type Field Description static java.lang.String
ALL_PATTERN
Pattern that matches everything.static java.lang.String
ARCDIRECTORY_NAME
The directory name of the heritrix directory with arcfiles.static java.lang.String
CDX_MIME_PATTERN
Pattern that matches our our CDX mimetype.static java.lang.String
CDX_MIME_TYPE
The mimetype for a list of CDX entries.static int
IO_BUFFER_SIZE
How big a buffer we use for read()/write() operations on InputStream/ OutputStream.static long
IO_CHUNK_SIZE
Read this much data when copying data from a file channel.static java.util.regex.Pattern
IP_KEY_REGEXP
A full string matcher for an IP-address.static java.lang.String
IP_REGEX_STRING
The pattern for an IP-address key.static java.util.regex.Pattern
IPv6_KEY_REGEXP
A full string matcher for an IPv6-address.static org.apache.lucene.util.Version
LUCENE_VERSION
Lucene version used by this release of NetarchiveSuite.static long
ONE_DAY_IN_MILLIES
One day in milliseconds.static long
ONE_MIN_IN_MILLIES
One minute in milliseconds.static java.lang.String
PROJECT_WEBSITE
The current website for the NetarchiveSuite project.static java.lang.String
TRANSLATIONS_BUNDLE
Internationalisation resource bundle for common module.static java.lang.String
WARCDIRECTORY_NAME
The directory name of the heritrix directory with warcfiles.static java.lang.String
XML_EXTENSION
Extension of XML file names.
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static java.lang.String
getHeritrix3VersionString()
static java.lang.String
getHeritrixVersionString()
Get the Heritrix version presently in use.static java.text.SimpleDateFormat
getIsoDateFormatter()
Get a formatter that can read and write a date in ISO format including hours/minutes/seconds and timezone.static java.lang.String
getVersionString(boolean isHtmlFormat)
Get a human-readable version string.
-
-
-
Field Detail
-
IP_REGEX_STRING
public static final java.lang.String IP_REGEX_STRING
The pattern for an IP-address key.- See Also:
- Constant Field Values
-
IP_KEY_REGEXP
public static final java.util.regex.Pattern IP_KEY_REGEXP
A full string matcher for an IP-address.
-
IPv6_KEY_REGEXP
public static final java.util.regex.Pattern IPv6_KEY_REGEXP
A full string matcher for an IPv6-address.
-
CDX_MIME_TYPE
public static final java.lang.String CDX_MIME_TYPE
The mimetype for a list of CDX entries.- See Also:
- Constant Field Values
-
XML_EXTENSION
public static final java.lang.String XML_EXTENSION
Extension of XML file names.- See Also:
- Constant Field Values
-
IO_CHUNK_SIZE
public static final long IO_CHUNK_SIZE
Read this much data when copying data from a file channel. Note that due to a bug in java, this should never be set larger than Integer.MAX_VALUE, since a call to fileChannel.transferFrom/To fails with an error while calling mmap.- See Also:
- Constant Field Values
-
ARCDIRECTORY_NAME
public static final java.lang.String ARCDIRECTORY_NAME
The directory name of the heritrix directory with arcfiles.- See Also:
- Constant Field Values
-
WARCDIRECTORY_NAME
public static final java.lang.String WARCDIRECTORY_NAME
The directory name of the heritrix directory with warcfiles.- See Also:
- Constant Field Values
-
IO_BUFFER_SIZE
public static final int IO_BUFFER_SIZE
How big a buffer we use for read()/write() operations on InputStream/ OutputStream.- See Also:
- Constant Field Values
-
TRANSLATIONS_BUNDLE
public static final java.lang.String TRANSLATIONS_BUNDLE
Internationalisation resource bundle for common module.- See Also:
- Constant Field Values
-
ONE_MIN_IN_MILLIES
public static final long ONE_MIN_IN_MILLIES
One minute in milliseconds.- See Also:
- Constant Field Values
-
ONE_DAY_IN_MILLIES
public static final long ONE_DAY_IN_MILLIES
One day in milliseconds.- See Also:
- Constant Field Values
-
CDX_MIME_PATTERN
public static final java.lang.String CDX_MIME_PATTERN
Pattern that matches our our CDX mimetype.- See Also:
- Constant Field Values
-
ALL_PATTERN
public static final java.lang.String ALL_PATTERN
Pattern that matches everything.- See Also:
- Constant Field Values
-
LUCENE_VERSION
public static final org.apache.lucene.util.Version LUCENE_VERSION
Lucene version used by this release of NetarchiveSuite.
-
PROJECT_WEBSITE
public static final java.lang.String PROJECT_WEBSITE
The current website for the NetarchiveSuite project.- See Also:
- Constant Field Values
-
-
Method Detail
-
getVersionString
public static java.lang.String getVersionString(boolean isHtmlFormat)
Get a human-readable version string.- Parameters:
isHtmlFormat
- if true, return a html format for the human-readable version string.- Returns:
- A string telling current version and status of code.
-
getHeritrixVersionString
public static java.lang.String getHeritrixVersionString()
Get the Heritrix version presently in use.- Returns:
- the Heritrix version presently in use
-
getIsoDateFormatter
public static java.text.SimpleDateFormat getIsoDateFormatter()
Get a formatter that can read and write a date in ISO format including hours/minutes/seconds and timezone.- Returns:
- The formatter.
-
getHeritrix3VersionString
public static java.lang.String getHeritrix3VersionString()
-
-