Discussions
Categories
Groups
Community Home
Categories
INTERNAL ENABLEMENT
POPULAR
THRUST SERVICES & TOOLS
CLOUD EDITIONS
Quick Links
MY LINKS
HELPFUL TIPS
Back to website
Home
Web CMS (TeamSite)
Data Migration
motlnt
We are implementing Metatagger 3.5 with Teamsite 5.5.2
I am trying to migrate the DCR values as the EA's with the file.
So what i am doing is getting the values from the DCR and setting it as a extended atributes
The script is working fine except for few conditions:
I have some values in DCR(typeid and typename) and i need to set it as a extended attribute but now in Tagger UI, this fields which i want to populate is a metatagger enabled field. So i set the code and names for this field the way it is set for extended attribute when they are set directly from TAgger UI.
But it doesn't show in the textarea.
I just found out that there is one more attribute which gets set which is subjectMetadata0 which has the values for all the metatagger enabled fields, so i just thought of parsing and including my values in that attribute. But there is a problem, i try to get this extended attribute and it gives me the proper result but when i try to set it again after including my changes, it gets set as a different attribute..
I am sending you the snapshot of the extended attributes which i see in File Properties.
Even here is a part of code:
$get= "subjectMetadata0";
$metadata = getEA($new_filepath,$get);
$length = index($metadata,"</metadata>");
$metadata=substr($metadata,0,$length+1);
chomp($metadata);
$txt = << "END";
<facet><facetName>VOCABTYPE</facetName><descriptor><vocab>VOCAB_PREFIX</vocab><code>HIERARCHY_ID</code><label>TYPENAME</label></descriptor></facet>
END
if($new_filepath =~ /documentation/){
$txt =~ s/VOCABTYPE/documentation_type/g;
$txt =~ s/VOCAB_PREFIX/DOCTYPE/g;
}
elsif($new_filepath =~ /tools/){
$txt =~ s/VOCABTYPE/documentation_type/g;
$txt =~ s/VOCAB_PREFIX/DOCTYPE/g;
}
$txt =~ s/HIERARCHY_ID/$typeid/g;
$txt =~ s/TYPENAME/$typeName/g;
chomp($txt);
$metatext = "</metadata>";
$metadata= $metadata.$txt.$metatext;
chomp($metadata);
$set= "subjectMetadata0";
$out = setEA($new_filepath,$set,$metadata);
Find more posts tagged with
Comments
There are no comments yet