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
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidcharacters(char[] ch, int start, int length) Callback method used by the SAX Parser when the text sequences of an xml stream are detected.voidcomment(char[] ch, int start, int length) SAX Handler that receives notification of comments in the DTDvoidendCDATA()SAX Handler that receives notification of the end of CDATA sectionsvoidendDTD()SAX Handler that receives notification of end of DTDvoidendElement(String uri, String localName, String qName) Callback method used by the SAX Parser when the end tag of an element is detected.voidSAX Handler that receives notification of the end of entities.Get the document name.static intbooleanGet the document processing state.voidSAX Handler that receives notification of the start of CDATA sectionsvoidCallback method used by the SAX Parser when beginning of the documentvoidSAX Handler that receives notification of DOCTYPE.voidstartElement(String uri, String localName, String qName, Attributes atts) Callback method used by the SAX Parser when the start tag of an element is detected.voidstartEntity(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, warningMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods 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:
startDocumentin interfaceContentHandler- Overrides:
startDocumentin 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:
startElementin interfaceContentHandler- Overrides:
startElementin 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:
charactersin interfaceContentHandler- Overrides:
charactersin 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:
endElementin interfaceContentHandler- Overrides:
endElementin classDefaultHandler- Throws:
SAXException
-
startDTD
SAX Handler that receives notification of DOCTYPE. Sets the DTD.- Specified by:
startDTDin 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:
endDTDin interfaceLexicalHandler- Throws:
SAXException
-
startEntity
SAX Handler that receives notification of the start of entities.- Specified by:
startEntityin interfaceLexicalHandler- Parameters:
name- name of the entity- Throws:
SAXException
-
endEntity
SAX Handler that receives notification of the end of entities.- Specified by:
endEntityin 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:
commentin interfaceLexicalHandler- Throws:
SAXException
-
startCDATA
public void startCDATA()SAX Handler that receives notification of the start of CDATA sections- Specified by:
startCDATAin interfaceLexicalHandler
-
endCDATA
public void endCDATA()SAX Handler that receives notification of the end of CDATA sections- Specified by:
endCDATAin interfaceLexicalHandler
-