|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object net.firstpartners.rp.back.extractor.util.UtilExtract
public class UtilExtract
Extractor utility
Field Summary | |
---|---|
static java.lang.String |
FILE_BASE
File protocol |
static java.lang.String |
FTP_BASE
Ftp protocol |
static java.lang.String |
HTTP_BASE
Http protocol |
static java.lang.String |
HTTPS_BASE
Https protocol |
static java.lang.String |
NO_FILE_EXTENSION
Unknown file extension |
static java.lang.String |
NO_FILE_TITLE
Unknown document title |
static java.lang.String |
pathSep
System separator |
static int |
TYPE_DOC
Document type |
static int |
TYPE_HTML
HTML type of the document |
static int |
TYPE_PDF
PDF Type |
static int |
TYPE_TEXT
Text type of the document |
static int |
TYPE_UNKNOWN
Uknown type of the document |
static int |
TYPE_XML
XML type of the document |
static java.lang.String |
WWW_BASE
Www protocol |
Constructor Summary | |
---|---|
UtilExtract()
|
Method Summary | |
---|---|
static java.lang.String |
encode(java.lang.String strText)
Encode the value (remove the special xml-characters) |
static java.lang.String |
getFilenameTitle(java.lang.String fileName)
Get the title for the specfied filename |
static java.lang.String |
getLocationExtension(java.lang.String location)
Return the location extension |
static java.io.InputStream |
getStream(java.lang.String uri)
Return a stream to the specified location. |
static java.lang.String |
getUri(java.lang.String location)
Get the uri for the specified start location |
static java.util.LinkedList |
getValueList(java.lang.String buffer,
int minLengthWord,
java.util.regex.Pattern notIgnorePattern,
java.util.regex.Pattern replacePattern)
Return the list of the words which have match the criteria |
static boolean |
isExtesionSupported(java.lang.String extension,
java.lang.String[] list)
Return true if the location is in the list |
static boolean |
isValidUriLocation(java.lang.String uri)
Validation of the uri. |
static java.lang.String |
replaceAll(java.lang.String s,
java.lang.String s1,
java.lang.String s2)
Replace all |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static final java.lang.String NO_FILE_EXTENSION
public static final java.lang.String NO_FILE_TITLE
public static final int TYPE_UNKNOWN
public static final int TYPE_HTML
public static final int TYPE_TEXT
public static final int TYPE_XML
public static final int TYPE_DOC
public static final int TYPE_PDF
public static final java.lang.String HTTP_BASE
public static final java.lang.String HTTPS_BASE
public static final java.lang.String FTP_BASE
public static final java.lang.String WWW_BASE
public static final java.lang.String FILE_BASE
public static final java.lang.String pathSep
Constructor Detail |
---|
public UtilExtract()
Method Detail |
---|
public static java.lang.String getLocationExtension(java.lang.String location)
location
-
public static boolean isExtesionSupported(java.lang.String extension, java.lang.String[] list)
extension
- Extension to validatelist
- List of extesnion supported
public static boolean isValidUriLocation(java.lang.String uri)
uri
- Uri location
public static java.lang.String getUri(java.lang.String location)
location
- Location
public static java.util.LinkedList getValueList(java.lang.String buffer, int minLengthWord, java.util.regex.Pattern notIgnorePattern, java.util.regex.Pattern replacePattern)
buffer
- String to be processminLengthWord
- Minim word lengthnotIgnorePattern
- Pattern with the characters not to ignorereplacePattern
- Pattern to replace characters
public static java.lang.String getFilenameTitle(java.lang.String fileName)
fileName
-
public static java.lang.String replaceAll(java.lang.String s, java.lang.String s1, java.lang.String s2)
s
- s1
- s2
-
public static java.io.InputStream getStream(java.lang.String uri) throws RpException
uri
-
RpException
- RPException will be thrown in case the reader cann't
be obtainedpublic static java.lang.String encode(java.lang.String strText)
strText
- Text to process
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |