|
The Jumper Crosswalk relies on equivalencies of metadata between different schemas where the syntax is different but the
meaning and usage of the metadata and data is the same. To build these equivalencies we first create a semantic model for
each service in the workflow. The Jumper Crosswalk then aligns the semantic objects in each smodel. Jumper does this in
Perl using the pattern matching function.
The Jumper crosswalk will load two files for mapping. The smodel for your existing system, defined by a varaible called
$smodel_input, and then the smodel for the system you are integrating your service with, defined by a second variable
called $smodel_output. The smodel_output file will then be rewritten with the alinged smodel_input metadata and saved
as a new file, this new file is defined by a third variable called $crosswalk.
To find out the exact position inside the pattern we use the pos function, which works similarly to the index function, to
start a pattern-match at a specific position in the array. The pos function takes a scalar value (often a variable) as an
argument, and returns the offset of the character after the last character of the match.
open (INV, $smodel_input) || die("Could not open file!"); #open $openme
for reading
open (INV, $smodel_output) || die("Could not open file!"); #open $openme
for reading
create (OUTFILE, $crosswalk) || die("Could not create file!"); #create
$_.jmp for writing
my @array := <$smodel_input>; # first @array now bound to iterator
my @array := <$smodel_output>; # second @array now bound to iterator
my $array is ArrayString(@array); # an ordinary tie
while () {
$find = "<<semantic1>>";
if (($in =~ /^<<semantic1>>/i) && ($in =~ /"foo"/)) &&
($in =~ /<</semantic1>>$/i) { ...
# correct input
print "qualified. semantic1..\n";
else { print "unqualified. semantic1..\n"; }
next;
$find = "<<semantic2>>";
if (($in =~ /^<<semantic2>>/i) && ($in =~ /"foo"/)) &&
($in =~ /<</semantic2>>$/i) { ...
# correct input
print "qualified. semantic2..\n";
else { print "unqualified. semantic2..\n"; }
next;
We will continue this matching pattern until the end of the smodel. The above code is provided to clearly outline the
methodology. The final source code will define this task as a loop.
foreach $semantic (@smodel_input)
{
command .... ;
}
|