Package org.codelibs.fess.util
Class GsaConfigParser
- java.lang.Object
-
- org.xml.sax.helpers.DefaultHandler
-
- org.codelibs.fess.util.GsaConfigParser
-
- All Implemented Interfaces:
ContentHandler,DTDHandler,EntityResolver,ErrorHandler
public class GsaConfigParser extends DefaultHandler
-
-
Field Summary
Fields Modifier and Type Field Description protected static StringBAD_URLSprotected static StringCOLLECTIONprotected static StringCOLLECTIONSstatic StringCONTAINSprotected FileConfigfileConfigprotected String[]fileProtocolsprotected Map<String,String>globalParamsprotected static StringGLOBALPARAMSprotected static StringGOOD_URLSprotected List<LabelType>labelListprotected LabelTypelabelTypestatic StringREGEXPstatic StringREGEXP_CASEstatic StringREGEXP_IGNORE_CASEprotected static StringSTART_URLSprotected LinkedList<String>tagQueueprotected StringBuildertextBufprotected StringuserAgentprotected WebConfigwebConfigprotected String[]webProtocols
-
Constructor Summary
Constructors Constructor Description GsaConfigParser()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected StringappendFileterPath(StringBuilder buf, String v)voidcharacters(char[] ch, int start, int length)voidendDocument()voidendElement(String uri, String localName, String qName)protected Stringescape(String s)org.dbflute.optional.OptionalEntity<FileConfig>getFileConfig()protected StringgetFilterPath(String s)LabelType[]getLabelTypes()org.dbflute.optional.OptionalEntity<WebConfig>getWebConfig()voidparse(InputSource is)protected StringparseFilterPaths(String text, boolean web, boolean file)voidsetFileProtocols(String[] fileProtocols)voidsetWebProtocols(String[] webProtocols)voidstartDocument()voidstartElement(String uri, String localName, String qName, Attributes attributes)StringtoString()protected Stringunescape(String s)-
Methods inherited from class org.xml.sax.helpers.DefaultHandler
endPrefixMapping, error, fatalError, ignorableWhitespace, notationDecl, processingInstruction, resolveEntity, setDocumentLocator, skippedEntity, startPrefixMapping, unparsedEntityDecl, warning
-
-
-
-
Field Detail
-
REGEXP
public static final String REGEXP
- See Also:
- Constant Field Values
-
REGEXP_CASE
public static final String REGEXP_CASE
- See Also:
- Constant Field Values
-
REGEXP_IGNORE_CASE
public static final String REGEXP_IGNORE_CASE
- See Also:
- Constant Field Values
-
CONTAINS
public static final String CONTAINS
- See Also:
- Constant Field Values
-
COLLECTIONS
protected static final String COLLECTIONS
- See Also:
- Constant Field Values
-
COLLECTION
protected static final String COLLECTION
- See Also:
- Constant Field Values
-
GLOBALPARAMS
protected static final String GLOBALPARAMS
- See Also:
- Constant Field Values
-
START_URLS
protected static final String START_URLS
- See Also:
- Constant Field Values
-
GOOD_URLS
protected static final String GOOD_URLS
- See Also:
- Constant Field Values
-
BAD_URLS
protected static final String BAD_URLS
- See Also:
- Constant Field Values
-
webProtocols
protected String[] webProtocols
-
fileProtocols
protected String[] fileProtocols
-
tagQueue
protected LinkedList<String> tagQueue
-
labelType
protected LabelType labelType
-
webConfig
protected WebConfig webConfig
-
fileConfig
protected FileConfig fileConfig
-
textBuf
protected StringBuilder textBuf
-
userAgent
protected String userAgent
-
-
Method Detail
-
parse
public void parse(InputSource is)
-
startDocument
public void startDocument() throws SAXException- Specified by:
startDocumentin interfaceContentHandler- Overrides:
startDocumentin classDefaultHandler- Throws:
SAXException
-
endDocument
public void endDocument() throws SAXException- Specified by:
endDocumentin interfaceContentHandler- Overrides:
endDocumentin classDefaultHandler- Throws:
SAXException
-
startElement
public void startElement(String uri, String localName, String qName, Attributes attributes) throws SAXException
- Specified by:
startElementin interfaceContentHandler- Overrides:
startElementin classDefaultHandler- Throws:
SAXException
-
endElement
public void endElement(String uri, String localName, String qName) throws SAXException
- Specified by:
endElementin interfaceContentHandler- Overrides:
endElementin classDefaultHandler- Throws:
SAXException
-
characters
public void characters(char[] ch, int start, int length) throws SAXException- Specified by:
charactersin interfaceContentHandler- Overrides:
charactersin classDefaultHandler- Throws:
SAXException
-
appendFileterPath
protected String appendFileterPath(StringBuilder buf, String v)
-
setWebProtocols
public void setWebProtocols(String[] webProtocols)
-
setFileProtocols
public void setFileProtocols(String[] fileProtocols)
-
getWebConfig
public org.dbflute.optional.OptionalEntity<WebConfig> getWebConfig()
-
getFileConfig
public org.dbflute.optional.OptionalEntity<FileConfig> getFileConfig()
-
getLabelTypes
public LabelType[] getLabelTypes()
-
-