net.sf.adf.acl.xml
Class XMLCodec
java.lang.Object
net.sf.adf.acl.xml.XMLCodec
- All Implemented Interfaces:
- ACLCodec
- Direct Known Subclasses:
- SOAPCodec
public class XMLCodec
- extends java.lang.Object
- implements ACLCodec
An XMLCodec writes and reads messages to and from an XML
format. This class uses the no-nonsense subset of the FIPA ACL Message
representation in XML.
- Author:
- Catalin Hritcu
- See Also:
FIPA
| Methods inherited from class java.lang.Object |
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
XMLCodec
public XMLCodec()
throws javax.xml.parsers.ParserConfigurationException
- Throws:
javax.xml.parsers.ParserConfigurationException
decode
public ACLMessage decode(java.lang.String str)
throws DecodingException
- Description copied from interface:
ACLCodec
- Decodes .
- Specified by:
decode in interface ACLCodec
- Parameters:
str - A String representation of an ACLMessage
- Returns:
- The
ACLMessage represented by str
- Throws:
DecodingException - For some reason the String
could not be decoded.
decodeDOM
public ACLMessage decodeDOM(org.w3c.dom.Document doc)
throws DecodingException
- Throws:
DecodingException
encode
public java.lang.String encode(ACLMessage message)
throws EncodingException
- Description copied from interface:
ACLCodec
- Encodes an
ACLMessage and returns the resulting
String.
- Specified by:
encode in interface ACLCodec
- Parameters:
message - The ACLMessage to be encoded.
- Returns:
- A textual representation of the
message
- Throws:
EncodingException - For some reason the message
could not be encoded.
encodeDOM
public org.w3c.dom.Document encodeDOM(ACLMessage message)
throws EncodingException
- Throws:
EncodingException
getDoctypePublicId
public java.lang.String getDoctypePublicId()
getDoctypeSystemId
public java.lang.String getDoctypeSystemId()
getMimeType
public java.lang.String getMimeType()
- Specified by:
getMimeType in interface ACLCodec
getNamespacePrefix
public java.lang.String getNamespacePrefix()
getNamespaceURI
public java.lang.String getNamespaceURI()
isFragment
public boolean isFragment()
isValidating
public boolean isValidating()
setDoctypePublicId
public void setDoctypePublicId(java.lang.String doctypePublicId)
setDoctypeSystemId
public void setDoctypeSystemId(java.lang.String doctypeSystemId)
setFragment
public void setFragment(boolean fragment)
setNamespacePrefix
public void setNamespacePrefix(java.lang.String namespacePrefix)
setNamespaceURI
public void setNamespaceURI(java.lang.String namespaceURI)
setValidating
public void setValidating(boolean validating)