Use this function to find a Fieldmapper class from the JSON hint or
class id:
my $class = Fieldmapper::class_for_hint('au');
print("$class\n");
Will print:
Fieldmapper::actor::user
Signed-off-by: Jason Stephenson <jason@sigio.com>
Signed-off-by: Bill Erickson <berick@esilibrary.com>
return keys %$fieldmap;
}
+# Find a Fieldmapper class given the json hint.
+sub class_for_hint {
+ my $hint = shift;
+ foreach (keys %$fieldmap) {
+ return $_ if ($fieldmap->{$_}->{hint} eq $hint);
+ }
+ return undef;
+}
+
sub get_attribute {
my $attr_list = shift;
my $attr_name = shift;