Class AccessControlList
java.lang.Object
org.xml.sax.helpers.DefaultHandler
edu.ucsb.nceas.metacat.accesscontrol.AccessControlList
- All Implemented Interfaces:
edu.ucsb.nceas.utilities.access.AccessControlInterface
,ContentHandler
,DTDHandler
,EntityResolver
,ErrorHandler
,LexicalHandler
public class AccessControlList
extends DefaultHandler
implements edu.ucsb.nceas.utilities.access.AccessControlInterface, LexicalHandler
A Class that loads eml-access.xml file containing ACL for a metadata
document into relational DB. It extends DefaultHandler class to handle
SAX parsing events when processing the XML stream.
-
Field Summary
Fields inherited from interface edu.ucsb.nceas.utilities.access.AccessControlInterface
ACCESS, ACLID, ALL, ALLOW, ALLOWFIRST, ALLSTRING, CHMOD, CHMODSTRING, DENY, DENYFIRST, ORDER, PERMISSION, PRINCIPAL, PUBLIC, READ, READSTRING, WRITE, WRITESTRING
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionvoid
characters
(char[] ch, int start, int length) Callback method used by the SAX Parser when the text sequences of an xml stream are detected.void
comment
(char[] ch, int start, int length) SAX Handler that receives notification of comments in the DTDvoid
endCDATA()
SAX Handler that receives notification of the end of CDATA sectionsvoid
endDTD()
SAX Handler that receives notification of end of DTDvoid
endElement
(String uri, String localName, String qName) Callback method used by the SAX Parser when the end tag of an element is detected.void
SAX Handler that receives notification of the end of entities.Get the document name.static int
boolean
Get the document processing state.void
SAX Handler that receives notification of the start of CDATA sectionsvoid
Callback method used by the SAX Parser when beginning of the documentvoid
SAX Handler that receives notification of DOCTYPE.void
startElement
(String uri, String localName, String qName, Attributes atts) Callback method used by the SAX Parser when the start tag of an element is detected.void
startEntity
(String name) SAX Handler that receives notification of the start of entities.Methods inherited from class org.xml.sax.helpers.DefaultHandler
endDocument, endPrefixMapping, error, fatalError, ignorableWhitespace, notationDecl, processingInstruction, resolveEntity, setDocumentLocator, skippedEntity, startPrefixMapping, unparsedEntityDecl, warning
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface org.xml.sax.ContentHandler
declaration
-
Constructor Details
-
AccessControlList
public AccessControlList()
-
-
Method Details
-
startDocument
Callback method used by the SAX Parser when beginning of the document- Specified by:
startDocument
in interfaceContentHandler
- Overrides:
startDocument
in classDefaultHandler
- Throws:
SAXException
-
startElement
public void startElement(String uri, String localName, String qName, Attributes atts) throws SAXException Callback method used by the SAX Parser when the start tag of an element is detected. Used in this context to parse and store the acl information in class variables.- Specified by:
startElement
in interfaceContentHandler
- Overrides:
startElement
in classDefaultHandler
- Throws:
SAXException
-
characters
Callback method used by the SAX Parser when the text sequences of an xml stream are detected. Used in this context to parse and store the acl information in class variables.- Specified by:
characters
in interfaceContentHandler
- Overrides:
characters
in classDefaultHandler
- Throws:
SAXException
-
endElement
Callback method used by the SAX Parser when the end tag of an element is detected. Used in this context to parse and store the acl information in class variables.- Specified by:
endElement
in interfaceContentHandler
- Overrides:
endElement
in classDefaultHandler
- Throws:
SAXException
-
startDTD
SAX Handler that receives notification of DOCTYPE. Sets the DTD.- Specified by:
startDTD
in interfaceLexicalHandler
- Parameters:
name
- name of the DTDpublicId
- Public Identifier of the DTDsystemId
- System Identifier of the DTD- Throws:
SAXException
-
endDTD
SAX Handler that receives notification of end of DTD- Specified by:
endDTD
in interfaceLexicalHandler
- Throws:
SAXException
-
startEntity
SAX Handler that receives notification of the start of entities.- Specified by:
startEntity
in interfaceLexicalHandler
- Parameters:
name
- name of the entity- Throws:
SAXException
-
endEntity
SAX Handler that receives notification of the end of entities.- Specified by:
endEntity
in interfaceLexicalHandler
- Parameters:
name
- name of the entity- Throws:
SAXException
-
getDocname
Get the document name. -
processingDTD
public boolean processingDTD()Get the document processing state. -
intValue
-
comment
SAX Handler that receives notification of comments in the DTD- Specified by:
comment
in interfaceLexicalHandler
- Throws:
SAXException
-
startCDATA
public void startCDATA()SAX Handler that receives notification of the start of CDATA sections- Specified by:
startCDATA
in interfaceLexicalHandler
-
endCDATA
public void endCDATA()SAX Handler that receives notification of the end of CDATA sections- Specified by:
endCDATA
in interfaceLexicalHandler
-