NAME

ODO::Query::Simple::Mapper

SYNOPSIS

Synopsis.

DESCRIPTION

Description.

METHODS

new( $source_simple_query, $dest_simple_query )

This object creates a mapping between the variables of two ODO::Query::Simple objects's. For example, if T1 contains the variable named 'A' in its subject and T2 contains the variable 'A' in its object then the new ODO::Query::Simple::Mapper object will return 'object' when its subject method is invoked, i.e:

                ($mapper->subject() eq 'object' == 1)

This can be used to compare statements with respect to their variables.

compare( $source, $dest )

compare does the following:

        1. Determine if the (s, p, o) of the source statement maps on to 
           either the s, p, or o of the destination statement.
        2. If it does, compare the source statement's component to the
           destination statement's component.
        3. If they do not match return false
        4. Return true if we make it through the loop
find_var( $statementMatch, $variableNode )

Looks for a variable in one of the components of the destination statement.

AUTHOR

IBM Corporation

COPYRIGHT

Copyright (c) 2004-2006 IBM Corporation.

All rights reserved. This program and the accompanying materials are made available under the terms of the Eclipse Public License v1.0 which accompanies this distribution, and is available at http://www.eclipse.org/legal/epl-v10.html