@Override
    public NamespaceValue findNamespaceEquivalence(
            NamespaceValue sourceNamespaceValue, Namespace targetNamespace)
            throws EquivalencerException {
        String equivalenceValue;
        SkinnyUUID uuid;
        if (sourceNamespaceValue.getEquivalence() != null) {
            uuid = convert(sourceNamespaceValue.getEquivalence());
            equivalenceValue =
                    equivalencer.equivalence(uuid, convert(targetNamespace));
        } else {
            final Namespace sourceNs = sourceNamespaceValue.getNamespace();
            final org.openbel.framework.common.model.Namespace sns =
                    convert(sourceNs);
            final String sourceValue = sourceNamespaceValue.getValue();
            equivalenceValue = equivalencer.equivalence(
                    convert(sourceNs),
                    sourceValue, convert(targetNamespace));
            uuid = equivalencer.getUUID(sns, sourceValue);
        }

        final NamespaceValue targetNsValue = new NamespaceValue();
        targetNsValue.setNamespace(targetNamespace);
        targetNsValue.setValue(equivalenceValue);

        // uuid based off of source
        targetNsValue.setEquivalence(convert(uuid));

        return targetNsValue;
    }
@ Override public NamespaceValue findNamespaceEquivalence ( NamespaceValue sourceNamespaceValue , Namespace targetNamespace ) throws EquivalencerException { String equivalenceValue ; SkinnyUUID uuid ; if ( sourceNamespaceValue . getEquivalence ( ) != null ) { uuid = convert ( sourceNamespaceValue . getEquivalence ( ) ) ; equivalenceValue = equivalencer . equivalence ( uuid , convert ( targetNamespace ) ) ; } else { final Namespace sourceNs = sourceNamespaceValue . getNamespace ( ) ; final org . openbel . framework . common . model . Namespace sns = convert ( sourceNs ) ; final String sourceValue = sourceNamespaceValue . getValue ( ) ; equivalenceValue = equivalencer . equivalence ( convert ( sourceNs ) , sourceValue , convert ( targetNamespace ) ) ; uuid = equivalencer . getUUID ( sns , sourceValue ) ; } final NamespaceValue targetNsValue = new NamespaceValue ( ) ; targetNsValue . setNamespace ( targetNamespace ) ; targetNsValue . setValue ( equivalenceValue ) ; targetNsValue . setEquivalence ( convert ( uuid ) ) ; return targetNsValue ; }
{@inheritDoc}