com.vgrs.xcode.idna.contextualrule
Class ContextualRulesRegistry

java.lang.Object
  extended by com.vgrs.xcode.idna.contextualrule.ContextualRulesRegistry

public class ContextualRulesRegistry
extends java.lang.Object

This class serves as a registry for all the contextual rules defined in "ContextualRules.properties" file. This class on startup will instantiate each of the classes specified in the properties file. It also contains a method to execute the contextual rules if a contextual code point is found.

Version:
1.0 May 5, 2010
Author:
nchigurupati

Constructor Summary
ContextualRulesRegistry()
           
 
Method Summary
static void init()
          This method loads the contextual rules specified in "ContextualRules.properties" file.
static void main(java.lang.String[] args)
           
static java.util.Set<java.lang.String> runContextualRules(int[] aCodePoints)
          This method executes the contextual rules.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ContextualRulesRegistry

public ContextualRulesRegistry()
Method Detail

init

public static void init()
                 throws XcodeException
This method loads the contextual rules specified in "ContextualRules.properties" file.

Throws:
java.lang.Exception
XcodeException

runContextualRules

public static java.util.Set<java.lang.String> runContextualRules(int[] aCodePoints)
                                                          throws XcodeException
This method executes the contextual rules. This method is only invoked if there are contextual code points. For each rule in the contextual rules registry, if the rule can be executed, it will be executed only once.

Parameters:
aCodePoints - the int[] array containing the code points to be evaluated by the contextual rules.
Returns:
Set containing the rule names of the contextual rules executed
Throws:
XcodeException - if no contextual rules have been executed.

main

public static void main(java.lang.String[] args)


Copyright © 2000-2010 VeriSign Inc. All Rights Reserved