source: ComponentRegistry/branches/ComponentRegistry-1.13.0-olha/ComponentRegistry/src/main/java/clarin/cmdi/componentregistry/CMDComponentTypeWrapper.java @ 2152

Last change on this file since 2152 was 2152, checked in by olhsha, 12 years ago

key stuff for fixing tickets 50 and 180 is discussed and coded

File size: 1.3 KB
Line 
1/*
2 * To change this template, choose Tools | Templates
3 * and open the template in the editor.
4 */
5package clarin.cmdi.componentregistry;
6
7import clarin.cmdi.componentregistry.components.CMDComponentType;
8import java.util.List;
9
10/**
11 *
12 * @author olhsha
13 */
14public class CMDComponentTypeWrapper { // extending CMDComponentType does not work :( does not want to cast
15   
16     /**
17     * Olha: null fileName of *this*, also in children
18     *
19     */
20   
21    // may be do this method static?
22    public void setFileNamesToNull(CMDComponentType component){ 
23    //public void setFileNamesToNull(){   
24       
25        // null the filename of component
26        component.setFilename(null);
27        //filename=null;
28               
29        // and now null filenames in all children's components
30        List<CMDComponentType> cildrencomponents = component.getCMDComponent();
31        CMDComponentTypeWrapper childwrapper = new CMDComponentTypeWrapper();
32        for (CMDComponentType currentcomponent : cildrencomponents) {
33        //for (CMDComponentType currentcomponent : cmdComponent) {
34                childwrapper.setFileNamesToNull(currentcomponent);
35                //((CMDComponentTypeWrapper) currentcomponent).setFileNamesToNull();
36                } 
37   
38    }
39   
40   
41   
42}
Note: See TracBrowser for help on using the repository browser.