org.ceryle.tm
Class VariantUtils
java.lang.Object
org.ceryle.tm.VariantUtils
public class VariantUtils
- extends Object
Provides a utility method to remove duplicate Variants within a BaseName,
as well as the method providing the necessary Variant signature.
- Since:
- JDK1.4
- Version:
- $Id: VariantUtils.java,v 3.4 2007-06-15 12:09:33 altheim Exp $
- Author:
- Murray Altheim
|
Method Summary |
static String |
getSignature(Variant variant,
StringBuffer sb)
Returns a signature for a TopicMap Variant. |
static void |
removeDuplicateVariants(BaseName basename)
The currently-used version of TM4J does not include
suppression of duplicate variant names, so this method
is used to strip them by creating comparative signatures
for each. |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
VariantUtils
public VariantUtils()
removeDuplicateVariants
public static void removeDuplicateVariants(BaseName basename)
throws PropertyVetoException
- The currently-used version of TM4J does not include
suppression of duplicate variant names, so this method
is used to strip them by creating comparative signatures
for each.
- Throws:
PropertyVetoException
getSignature
public static String getSignature(Variant variant,
StringBuffer sb)
- Returns a signature for a TopicMap Variant.
This signature is created from the recursive Variant structure
by appending identifier strings for each object to a final
String signature. This method should be called with a null
parameter for the StringBuffer, as this parameter is only used
recursively by the method itself.
- Parameters:
variant - the variant from which to compute the signaturesb - the StringBuffer to which to append the signature. This should provided as a null.
- Returns:
- the computed signature
The Ceryle Project. Copyright ©2001-2007 Murray Altheim, All Rights Reserved. See LICENSE included with distribution.