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