org.apache.vysper.xmpp.addressing.stringprep
Class NodePrep

java.lang.Object
  extended by org.apache.vysper.xmpp.addressing.stringprep.StringPrep
      extended by org.apache.vysper.xmpp.addressing.stringprep.NodePrep

@SpecCompliant(spec="RFC3920",
               section="A",
               status=IN_PROGRESS)
public class NodePrep
extends StringPrep

This class is used to prepare a Node Identifier for further usage. see RFC3920:3.3 see RFC3920:Appendix A see http://www.ietf.org/rfc/rfc3920.txt

Author:
Gerolf Seitz (gseitz@apache.org)

Method Summary
protected  java.util.Map<java.lang.String,java.lang.String> buildMapping()
          Override this method and return a custom map of character mappings to alter the Stringprep behavior.
protected  java.util.Set<java.lang.String> buildProhibitedSet()
          Override this method and return a custom set of prohibited characters to alter the Stringprep behavior.
static java.lang.String prepare(java.lang.String node)
          Applies the Nodeprep profile to the given node.
 
Methods inherited from class org.apache.vysper.xmpp.addressing.stringprep.StringPrep
prepareString
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

prepare

public static final java.lang.String prepare(java.lang.String node)
                                      throws StringPrepViolationException
Applies the Nodeprep profile to the given node.

Parameters:
node - the node to prepare
Returns:
the prepared node
Throws:
StringPrepViolationException - in case the Nodeprep profile can't be applied

buildMapping

@SpecCompliant(spec="RFC3920",
               section="A.3",
               status=FINISHED)
protected java.util.Map<java.lang.String,java.lang.String> buildMapping()
Description copied from class: StringPrep
Override this method and return a custom map of character mappings to alter the Stringprep behavior.

Overrides:
buildMapping in class StringPrep
Returns:
a Map containing all character mappings

buildProhibitedSet

@SpecCompliant(spec="RFC3920",
               section="A.5",
               status=FINISHED)
protected java.util.Set<java.lang.String> buildProhibitedSet()
Description copied from class: StringPrep
Override this method and return a custom set of prohibited characters to alter the Stringprep behavior.

Overrides:
buildProhibitedSet in class StringPrep
Returns:
a Set containing all characters that are prohibited