Changeset 1037


Ignore:
Timestamp:
May 1, 2018, 4:31:01 PM (6 years ago)
Author:
sommeria
Message:

miscellaneous adaptations to opendap

Location:
trunk/src
Files:
8 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/PARAM.xml.default

    r501 r1037  
    22<UvmatParam>
    33<RunParam>
    4 <RunTime>${MCRROOT712}</RunTime>
    54<CivBin>bin/civ<!--binary for the new civx version (relative or
    65absolute path)--></CivBin>
     
    1413</RunParam>
    1514<BatchParam>
    16 <BatchMode>oar</BatchMode>
    17 <RunTime>${MCRROOT712}</RunTime>
    1815<CivBin>bin/civ</CivBin>
    1916<Civ1Bin>bin/civ1</Civ1Bin>
     
    2320<PatchBin>bin/patch_up</PatchBin>
    2421</BatchParam>
    25 <SchemaPath>XML_SCHEMAS <!--directory of xml schemas(relative or absolut
    26 e path)--></SchemaPath>
    2722</UvmatParam>
  • trunk/src/browse_data.m

    r1027 r1037  
    8787
    8888%% initialize the GUI
    89 if ~(exist('DataSeries','var') && ischar(DataSeries) && exist(DataSeries,'dir'))
     89if isempty(regexp(DataSeries,'^http:'))&& ~(exist('DataSeries','var') && ischar(DataSeries) && exist(DataSeries,'dir'))
    9090    DataSeries=pwd;% current dir is the starting data series by default
    9191end
     
    210210%------------------------------------------------------------------------
    211211errormsg='';
    212 if exist(Campaign,'dir')
    213     ListStruct=dir(Campaign); %list files and dirs
     212if ~isempty(regexp(Campaign,'^http'))|| exist(Campaign,'dir')
     213    ListStruct=dir_uvmat(Campaign); %list files and dirs
    214214    if numel(ListStruct)>1000% A campaign folder must contain maily a list of 'experiment' sub-folders
    215215        errormsg=[Campaign ' contains too many items (>1000) to be a Campaign folder'];
  • trunk/src/dir_uvmat.m

    r1033 r1037  
    2727%=======================================================================
    2828
    29 function [ ListFiles] = dir_uvmat(DirName)
     29function [ ListFiles,errormsg] = dir_uvmat(DirName)
     30errormsg='';
    3031if regexp(DirName,'^http://')
    3132    catalog=[DirName,'/catalog.xml'];
     33    try
    3234    str=urlread(catalog);
    33     ListFiles=(regexp(str,'xlink:title="(?<name>[^"]+)"','names'))';
     35    catch ME
     36        ListFiles=[];
     37        errormsg=ME.message;
     38        return
     39    end
     40    ListFiles=(regexp(str,'xlink:title="(?<name>[^"]+)"','names'))';%list subfolders
    3441    NumDir=numel(ListFiles);
    35     ListFiles=[ListFiles;(regexp(str,'dataset name="(?<name>[^"]+)"','names'))'];
     42    ListFiles=[ListFiles;(regexp(str,'dataset name="(?<name>[^"]+)"','names'))'];% append files to the list
    3643    for ilist=1:numel(ListFiles)
    3744        ListFiles(ilist).date=0;
     
    4350        ListFiles(ilist).isdir=true;
    4451    end
     52    ListFiles(NumDir+1)=[];
    4553else
    4654    ListFiles=dir(DirName);
  • trunk/src/editxml.m

    r1027 r1037  
    5555% varargin   command line arguments to editxml (see VARARGIN)
    5656
    57 % set(handles.replicate,'String',['copy';'<---'])
    5857if nargin
    5958    CurrentFile=varargin{1};
     
    6160    CurrentFile=[];
    6261end
    63 % if exist('varargin') & length(varargin)>=1
    64 %     CurrentFile=cell2mat(varargin{1});
    65 % else
    66 %     CurrentFile=[];
    67 % end
     62
    6863% Choose default command line output for editxml
    6964handles.output = hObject;
    70 % set(hObject,'Units','pixel')
    7165if exist(CurrentFile,'file')
    7266    [PathName,Nme,FileExt]=fileparts(CurrentFile);
     
    118112        DataIn.CurrentUid=[DataIn.CurrentUid NewRootUid];%record new current uid
    119113        DataIn.xs_CurrentUid=[DataIn.xs_CurrentUid xs_node];%record the new curent schema uid
    120     end
    121    
    122 %     %update the import file display
    123 %     if isfield(DataIn,'h_ref')&ishandle(DataIn.h_ref)
    124 %         tag0_ref=find(t_ref,['/' path '/' xs_element.key]);
    125 %         node_ref=list.index(ind);
    126 %         if length(tag0_ref)<node_ref
    127 %             node_ref=length(tag0_ref);
    128 %         end
    129 %         [ref_element,ref_subelem]=get_xml(t_ref,path,xs_element,node_ref,xs_subelem);
    130 %         update_ref_list(DataIn.h_ref,xs_element,ref_element,node_ref,xs_subelem,ref_subelem);
    131 %     end 
     114    end 
    132115set(get(hObject,'Parent'),'UserData',DataIn);
    133116else%no schema
     
    164147else
    165148    xs_nodeup=[];
    166 %     if isfield(DataIn,'xs_UpUid')
    167149    if isfield(DataIn,'xs_CurrentUid')&length(DataIn.xs_CurrentUid)>1
    168 %         xs_nodeup=DataIn.xs_UpUid
    169150        xs_nodeup=DataIn.xs_CurrentUid(end-1);
    170151        DataIn.xs_CurrentUid(end)=[];%uid of the root element in the schema
     
    245226update_list(handles,path,xs_element,element,DataIn.CurrentUid(end),xs_subelem,subelem);
    246227set(handles.list_element,'Value',element_index);
    247 
    248 %
    249 % % --- Executes on button press in inport_file.
    250 % function inport_file_Callback(hObject, eventdata, handles)
    251 % CurrentFile=get(handles.RefFile,'String');
    252 % if isempty(CurrentFile)|isequal(CurrentFile,'')
    253 %     CurrentFile=get(handles.CurrentFile,'String')
    254 % end
    255 % [FileName, PathName]=uigetfile( ...
    256 %        {'*.xml', '(*.xml)';
    257 %         '*.xml',  '.xml files '; ...
    258 %         '*.*',  'All Files (*.*)'}, ...
    259 %         'Pick a file',CurrentFile); %file browser
    260 % fileinput=fullfile(PathName,FileName);
    261 % sizf=size(fileinput);
    262 % if (~ischar(fileinput)|~isequal(sizf(1),1)),return;end% keep only character strings as input file name
    263 % if exist(fileinput,'file')
    264 %    set(handles.RefFile,'Visible','on')
    265 %    set(handles.replicate,'Visible','on')
    266 %    set(handles.RefFile,'String',fileinput)
    267 %    RefFile_Callback(handles.RefFile, eventdata, handles)
    268 % end
    269 
    270228
    271229%------------------------------------------------------
     
    287245if (~ischar(CurrentFile)||~isequal(sizf(1),1)),return;end% keep only character strings as input file name
    288246if exist(CurrentFile,'file')
    289 %     set(handles.CurrentAttributes,'UserDataIn',PathName); %store the path to the xml file
    290247    [CurPath,CurName,CurExt]=fileparts(CurrentFile);
    291248    if isequal(CurExt,'.xls')   
     
    333290    %Path to shemas:
    334291    path_uvmat=fileparts(which('editxml'));% check the path detected for source file uvmat
    335     % path_UVMAT=fileparts(path_uvmat); %path to UVMAT
    336     %     xmlparam=fullfile(path_UVMAT,'PARAM.xml');
    337     %     xmlparam='PARAM.xml'; %will find PARAM.xml whose path is set in priority
    338     %     if exist(xmlparam,'file')
    339     %         tparam=xmltree(xmlparam);
    340     %         sparam=convert(tparam);
    341     %         if isfield(sparam,'SchemaPath')
    342292    schemafile=[fullfile(path_uvmat,'xml_shemas',head_name) '.xsd'];
    343293    if ~exist(schemafile,'file')
     
    347297        xs=xmltree(schemafile);
    348298    else
    349 %         msgbox_uvmat('WARNING','The xml schema is not found, check the file PARAM.xml')
    350 %         [FileName, PathName]=uigetfile( ...
    351 %             {'*.xsd', '(*.xsd)';
    352 %             '*.xsd',  '.xsd files '; ...
    353 %             '*.*',  'All Files (*.*)'}, ...
    354 %             'Pick a .xsd schema' ,schemafile); %file browser
    355 %         if ischar(PathName) && ischar(FileName) && exist(fullfile(PathName,FileName),'file')
    356 %             DataIn.Schema=fullfile(PathName,FileName);
    357 %             xs=xmltree(DataIn.Schema);%open the associated schema file
    358 %         else
    359299            xs=[];
    360 %
    361 
    362     end
    363     %         end
    364     %     end
     300    end
    365301end
    366302DataIn.CurrentUid=1;
     
    533469                     xs_subelem(k).minOccurs=1; %default
    534470                     xs_subelem(k).maxOccurs=1; %default
    535 %                      pref{k}=[]; %default
    536471                     if isequal(node_content.name,'xs:element')
    537472                        attr=node_content.attributes;
    538 %                         attr{:}.key
    539473                        for l=1:length(attr)
    540474                            if isequal(attr{l}.key,'name')
     
    561495                     end
    562496                 end           
    563 
    564497             end
    565498         end     
     
    576509            node1=children(xs,node_type(i));
    577510            node2=find(xs,node1,'name','xs:restriction');
    578 %             nodename1=find(xs,
    579511            node3=children(xs,node2);
    580512            node4=find(xs,node3,'name','xs:enumeration');
     
    621553element.attr_val='';%default
    622554element.val='';
    623 % element.type='';
    624 % element.testmanual=testmanual %inheritates the input manual editing flag by default
    625555subelem=[]; %default
    626556attrup=[];
    627 % node=[];
    628557
    629558% %find the element properties in the xml file
     
    635564            element.val=[];
    636565        else
    637             element.val=elem_contents.value
     566            element.val=elem_contents.value;
    638567        end
    639568    end
     
    643572            element.attr_key{iattr}=elem_attr{iattr}.key ;
    644573            element.attr_val{iattr}=elem_attr{iattr}.val;
    645 %             attrup=setfield(attrup,elem_attr{iattr}.key,elem_attr{iattr}.val);
    646574           breakdetect=find(elem_attr{iattr}.key=='/'| elem_attr{iattr}.key==':'| elem_attr{iattr}.key=='.');% find '/'
    647575           if isempty(breakdetect)
    648 %                 comline=['attrup.' elem_attr{iattr}.key '=' elem_attr{iattr}.val ';']
    649576                eval(['attrup.' elem_attr{iattr}.key '=''' elem_attr{iattr}.val ''';'])
    650577           end
     
    678605   iline=0;
    679606   for k=1:length(xs_subelem)%node2: list of subelements in the sub-sequence
    680 %     attr=attributes(xs,'get',node2(i),1);%
    681 %     element=attr.val;%name of the element
    682607     tag=find(t,['/' path '/' xs_element.key '/' xs_subelem(k).key]);%look for the corresponding element node in the .xml tree
    683608     struct_element=get(t,tag);%get the content of the element
     
    687612         subelem(iline).xsindex=k;
    688613         subelem(iline).index=0;
    689 %          subelem(iline).testmanual=element.testmanual;% inheritates the manual editing flag by default
    690614         if isequal(xs_subelem(k).minOccurs,'0')
    691615             subelem(iline).val='[]';%element value not mandatory in the schema
     
    693617             subelem(iline).val='[MISSING]';%element value mandatory in the schema
    694618         end
    695 %          subelem(iline).attrup=attrup; %inheritated attributes
    696619     elseif isequal(length(struct_element),1)
    697620         contents=get(t,struct_element.contents);
     
    700623         subelem(iline).xsindex=k;
    701624         subelem(iline).index=1;
    702 %          subelem(iline).testmanual=element.testmanual;%
    703625         if isfield(contents,'value') & ~isempty(contents.value)
    704626             subelem(iline).val=contents.value;
     
    710632             subelem(iline).val='[MISSING]';%element value mandatory in the schema
    711633         end
    712 %          subelem(iline).attrup=attrup; %inheritated attributes
    713634         if isfield(struct_element,'attributes')
    714635            element_attr=struct_element.attributes;
    715636            attr_display=[];
    716637            for iattr=1:length(element_attr)
    717 %                 attr_display{iline}=[attr_display ' , ' element_attr{iattr}.key '  =  ' element_attr{iattr}.val];
    718638                subelem(iline).val=[subelem(iline).val attr_display ' , ' element_attr{iattr}.key '  =  ' element_attr{iattr}.val];
    719 %                 subelem(iline).attrup=setfield(subelem(iline).attrup,element_attr{iattr}.key,element_attr{iattr}.val);
    720639            end
    721640         end
     
    726645             subelem(iline).index=subindex;%index of the element
    727646             subelem(iline).xsindex=k;
    728 %              subelem(iline).testmanual=element.testmanual;%
    729647             if isfield(contents,'value')& ~isempty(contents.value)
    730648                 subelem(iline).val=contents.value;
     
    734652                 subelem(iline).val='[]';
    735653             end
    736 %              subelem(iline).attrup=attrup; %inheritated attributes
    737654             if isfield(struct_element{subindex},'attributes')
    738655                element_attr=struct_element{subindex}.attributes;
    739656                attr_display=[];
    740657                for iattr=1:length(element_attr)
    741 %                     attr_display{iline}=[attr_display ' , ' element_attr{iattr}.key '  =  ' element_attr{iattr}.val];
    742658                    subelem(iline).val=[subelem(iline).val attr_display ' , ' element_attr{iattr}.key '  =  ' element_attr{iattr}.val];
    743 %                     subelem(iline).attrup=setfield(subelem(iline).attrup,element_attr{iattr}.key,element_attr{iattr}.val);
    744659                end
    745660            end
     
    757672    set(handles.export_list,'String','')%flush the export list
    758673    set(handles.CurrentElement,'String',[path '/' xs_element.key])
    759 %     title_element.key=[path '/' xs_element.key];
    760 %     if ~isempty(path)
    761 %         xsnode_index=get(handles.list_element,'UserDataIn');
    762 %         ind=get(handles.list_element,'Value');
    763 %         title_element.index=xsnode_index(2,ind);
    764 %     else
    765 %         title_element.index=1;
    766 %     end
    767 %     title_element.xsnode=xs_element.uid;
    768 %     title_element.node=node;
    769 %     set(handles.CurrentFile,'UserDataIn',title_element)%element corresponding to the title
    770674    set(handles.CurrentAnnotation,'String',xs_element.annot)
    771675    attr_col=[];
    772676    testedit=0;% cannot edit elements by default
    773677    for iattr=1:length(element.attr_key)
    774 %          if isequal(element.attr_key{iattr},'source') & isequal(element.attr_val{iattr},'manual')
    775 %             testedit=1;
    776 %         end
    777678        attr_col=strvcat(attr_col,[element.attr_key{iattr} ' = ' element.attr_val{iattr}]);
    778679    end
     
    792693        end
    793694        node(iline)=xs_subelem(xsindex).node;
    794 %         testmanual(iline)=subelem(iline).testmanual;
    795695        ikey=xs_subelem(xsindex).key;
    796696        if xs_subelem(xsindex).testsub
     
    812712    set(handles.element_value,'Visible','off')
    813713else % we edit an element
    814 
    815714    export_list=get(handles.export_list,'String');%export list
    816715    testadd=1;
     
    840739    testedit=0;% cannot edit element by default
    841740    for iattr=1:length(element.attr_key)
    842 %         if isequal(element.attr_key{iattr},'source') & isequal(element.attr_val{iattr},'manual')
    843 %             testedit=1;
    844 %         end
    845741        attr_col=strvcat(attr_col,[element.attr_key{iattr} ' = ' element.attr_val{iattr}]);
    846742    end
    847743    set(handles.element_attrib,'String',attr_col)
    848744    set(handles.element_key,'String',xs_element.key)
    849 
    850  
    851745    if isempty(xs_element.enum)
    852746        set(handles.element_value,'Value',1)
     
    890784CurrentFile=get(handles.CurrentFile,'String');
    891785if isfield(DataIn,'Schema')
    892 if ~isempty(DataIn.Schema)% update ref to schema
    893     attrxsd=attributes(t,'get',1);
    894     setest=0;
    895     for iattr=1:length(attrxsd)
    896         if isequal(attrxsd{iattr}.key,'xsi:noNamespaceSchemaLocation')
    897             t= attributes(t,'set',1,iattr,'xsi:noNamespaceSchemaLocation',DataIn.Schema);
    898             setest=1;
    899         end
    900     end
    901     if setest==0;
    902         t=attributes(t,'add',1,'xmlns:xsi','http://www.w3.org/2001/XMLSchema-instance');
    903         t= attributes(t,'add',1,'xsi:noNamespaceSchemaLocation',DataIn.Schema);
    904     end
    905 end
     786    if ~isempty(DataIn.Schema)% update ref to schema
     787        attrxsd=attributes(t,'get',1);
     788        setest=0;
     789        for iattr=1:length(attrxsd)
     790            if isequal(attrxsd{iattr}.key,'xsi:noNamespaceSchemaLocation')
     791                t= attributes(t,'set',1,iattr,'xsi:noNamespaceSchemaLocation',DataIn.Schema);
     792                setest=1;
     793            end
     794        end
     795        if setest==0;
     796            t=attributes(t,'add',1,'xmlns:xsi','http://www.w3.org/2001/XMLSchema-instance');
     797            t= attributes(t,'add',1,'xsi:noNamespaceSchemaLocation',DataIn.Schema);
     798        end
     799    end
    906800end
    907801copyfile(CurrentFile,[CurrentFile '.bak']);
     
    939833% Hints: contents = get(hObject,'String') returns element_attr_val contents as cell array
    940834%        contents{get(hObject,'Value')} returns selected item from element_attr_val
    941 
    942 
    943 % --- Executes on button press in ADD.
    944 function ADD_Callback(hObject, eventdata, handles)
    945 % hObject    handle to ADD (see GCBO)
    946 % eventdata  reserved - to be defined in a future version of MATLAB
    947 % handles    structure with handles and user data (see GUIDATA)
    948835
    949836%----------------------------------------
     
    999886                        for iattr_up=1:nbattrib_up
    1000887                            attr= attributes(t,'get',uidparent,iattr_up);
    1001 %                             if isequal(attr.key,'source')&isequal(attr.val,'directory')% look for 'source' attribute
    1002888                              if isequal(attr.key,'DirName')
    1003889                                 cur_file=fullfile(attr.val,cur_file);
     
    1031917               end
    1032918           end
    1033        %elseif isequal(attr.val,'dir') A FAIRE : check directory
    1034        %else A FAIRE: edit the element
    1035919        end
    1036920    end
     
    1042926if ~testsimple
    1043927    list_element=[];
    1044 %      Data.CurrentUid=[Data.CurrentUid root_uid]%record new current uid
    1045928    for iline=1:length(list_uid)
    1046929        element=get(t,list_uid(iline));
     
    1097980    index(iline)=indexcur;
    1098981    node(iline)=xs_subelem(xsindex).node;
    1099 %         testmanual(iline)=subelem(iline).testmanual;
    1100982    ikey=xs_subelem(xsindex).key;
    1101983    if xs_subelem(xsindex).testsub
     
    1114996set(hh,'UserData',RefDataIn)
    1115997
    1116 %
    1117 % function RefFile_Callback(hObject, eventdata, handles)
    1118 % global t_ref xs
    1119 % t_ref=xmltree(get(hObject,'String'));%open the xml file fileinput
    1120 % heditxml=get(hObject,'parent');
    1121 % DataIn=get(get(hObject,'parent'),'UserData');
    1122 % % set(heditxml,'Units','pixel')
    1123 % figpos=get(heditxml,'Position')
    1124 % % title_element=get(handles.element_cur,'UserDataIn');
    1125 % % xs_node=xsnode_index(1,ind);
    1126 % % index_chosen=xsnode_index(2,ind);
    1127 % if isfield(DataIn,'fig_ref')&ishandle(DataIn.fig_ref)
    1128 %     figure(DataIn.fig_ref);
    1129 % else
    1130 %     DataIn.fig_ref=figure;
    1131 % end
    1132 % set(DataIn.fig_ref,'Name',get(hObject,'String'))
    1133 % set(DataIn.fig_ref,'MenuBar','none')
    1134 % newfigpos=[figpos(1)+figpos(3) figpos(2)+0.4*figpos(4) 0.5*figpos(3) 0.3*figpos(4)];
    1135 % set(DataIn.fig_ref,'Units','normalized')
    1136 % set(DataIn.fig_ref,'Position',newfigpos)
    1137 % DataIn.h_ref=uicontrol('Style','listbox', 'Max',2,'Units','pixel','Position', [0 0 newfigpos(3) newfigpos(4)], ...
    1138 %         'FontName','FixedWidth','Tag','listbox');
    1139 % if isfield(DataIn,'xs_CurrentUid');
    1140 %     xs_CurrentUid=DataIn.xs_CurrentUid(end);
    1141 % else
    1142 %     DataIn.xs_CurrentUid=find(xs,'/xs:schema/xs:element');%uid of the root element in the schema
    1143 % end
    1144 % [nodeup,path,xs_element,xs_subelem]=scan_schema(xs,xs_CurrentUid(end));
    1145 % xs_element.key
    1146 % tag0=find(t_ref,['/' path '/' xs_element.key]);
    1147 % if length(tag0)>=1
    1148 %     CurrentRefNode=tag0(1);%chose the first occurence of the element
    1149 % else
    1150 %     CurrentRefNode=0;
    1151 % end
    1152 % [ref_element,ref_subelem]=get_xml(t_ref,path,xs_element,CurrentRefNode,xs_subelem);
    1153 % update_ref_list(DataIn.h_ref,xs_element,ref_element,CurrentRefNode,xs_subelem,ref_subelem);
    1154 % siztext=size(get(DataIn.h_ref,'String'));
    1155 % set(DataIn.h_ref,'Value',[1:siztext(1)]); %select the whole list by default
    1156 % set(heditxml,'UserData',DataIn)
    1157 % set(handles.ref_data,'Value',siztext(1)); %select the whole list by default
    1158 % 'TESTimport'
    1159 % title_element=get(handles.element_cur,'UserDataIn')
    1160 % xs_node=title_element.xsnode;%uid of the element in the schema
    1161 % node=title_element.node;
    1162 % t=flush(t,node);%removes the corresponding subtree in t
    1163 % [nodeup,path,xs_element,xs_subelem]=scan_schema(xs,xs_node);%scan the schema
    1164 % tag0=find(t_import,['/' path '/' xs_element.key])
    1165 % if isempty(tag)
    1166 %     errordlg(['element /' path '/' xs_element.key ' not found in' fileinput])
    1167 %     return
    1168 % end
    1169 % % [element_import,node_import]=get_xml(t_import,path,xs_element,1,xs_subelem);% read the corresponding xml data
    1170 % node2_import=children(t_import,tag0);
    1171 % % t_import=branch(t_import,node_import);% extract branch of the new file
    1172 % % %removes the corresponding subtree in t
    1173 % for inode=1:length(node2_import)
    1174 %     struct=get(t_import,node2_import(inode))
    1175 %     if isfield(struct,'type') & isfield(struct,'name')%if the node is an elmeent type
    1176 %         node3_import=children(t_import,node2_import(inode))
    1177 %        [t,newuid]=add(t,node,struct.type,struct.name);
    1178 %        for inode2=1:length(node3_import)
    1179 %            struct2=get(t_import,node3_import(inode2))
    1180 %            if isequal(struct2.type,'chardata')
    1181 %                 t=add(t,newuid,'chardata',struct2.value);
    1182 %             end
    1183 %         end
    1184 %     end
    1185 % end
    1186998% --- Executes on button press in replicate.
    1187999function replicate_Callback(hObject, eventdata, handles)
     
    11911003export_val=get(handles.export_list,'UserData');
    11921004heditxml=get(handles.replicate,'parent');
    1193 Data=get(heditxml,'UserData')
    1194 
    1195 hdataview=findobj(allchild(0),'Name','dataview')
     1005Data=get(heditxml,'UserData');
     1006
     1007hdataview=findobj(allchild(0),'Name','dataview');
    11961008if isempty(hdataview)
    11971009    hdataview=dataview;
     
    12151027    ListRecords=ListRecords(Value);
    12161028end
    1217 % uvmat('runplus_Callback',hObject,eventdata,handleshaxes)
    12181029[ListDevices,ListRecords,ListXml,List]=ListDir(CurrentPath,ListExperiments,ListDevices,ListRecords);
    12191030ListXml=get(hhdataview.ListXml,'String');
     
    12681079                        end
    12691080                    end
    1270 %                     [Title,test]=check_heading(Currentpath,Campaign,ExpName,DeviceName,[],FileName,SubCampaignTest);
    1271 %                     if test
    1272 %                         [List.Experiment{iexp}.Device{idevice}.xmlfile{ixml} ' , Heading updated']
    1273 %                     end
    12741081                end
    12751082             elseif isfield(List.Experiment{iexp}.Device{idevice},'Record')
     
    12851092                                end
    12861093                            end
    1287 %                             [Title,test]=check_heading(Currentpath,Campaign,ExpName,DeviceName,RecordName,FileName,SubCampaignTest);
    1288 %                             if test
    1289 %                                 [FileName ' , Heading updated']
    1290 %                             end
    12911094                        end
    12921095                    end
     
    13501153[element,subelem]=get_xml(t,path,xs_element,DataIn.CurrentUid(end),xs_subelem);
    13511154update_list(handles,path,xs_element,element,DataIn.CurrentUid(end),xs_subelem,subelem);
    1352 % t=set_xml(t,xs_DataIn,subelem)
     1155
    13531156%edit list of subelments:   
    13541157
     
    15381341
    15391342
    1540 % --- Executes on button press in pushbutton9.
    1541 function pushbutton9_Callback(hObject, eventdata, handles)
    1542 % hObject    handle to pushbutton9 (see GCBO)
    1543 % eventdata  reserved - to be defined in a future version of MATLAB
    1544 % handles    structure with handles and user data (see GUIDATA)
    1545 
    1546 
     1343
  • trunk/src/read_xls.m

    r1027 r1037  
    101101ExpDocName=fullfile(ExpPath,[ExpName '.xml']);% full name of the .xml file ExpDoc
    102102if exist(ExpDocName,'file')
    103     hh=editxml({ExpDocName})   
    104 %     [FileName, PathName, filterindex] = uigetfile( ...
    105 %        {'*.xml','(*.xml)';
    106 %        '*.xml',  '.xml files ';
    107 %         '*.*',  'All Files (*.*)'}, ...
    108 %         'Pick a file',ExpDocName);
    109 %      fileinput=[PathName FileName];%complete file name
    110 %      sizf=size(fileinput);
    111 %     if (~ischar(fileinput)|~isequal(sizf(1),1)),return;end
    112 %         [path,name,ext]=fileparts(fileinput);
    113 %     if isequal(ext,'.civ') | isequal(ext,'.log') | isequal(ext,'.cmx') isequal(ext,'.txt')
    114 %         edit(fileinput)
    115 %     elseif isequal(ext,'.xml')
    116 %         varargin{1}=fileinput;
    117 %         editxml(varargin)
    118 %     elseif isequal(ext,'.fig')
    119 %         open(fileinput)
    120 %     elseif isequal(ext,'.xls')
    121 %         xlsdisplay(fileinput)
    122 %     else
    123 %         uvmat({fileinput})
    124 %     end
     103    hh=editxml({ExpDocName});   
    125104else
    126105    answer=questdlg({['ExpDoc file ' ExpDocName ' does not exist, create the experiment?'];''})
  • trunk/src/series.m

    r1036 r1037  
    486486InputTable=get(handles.InputTable,'Data');
    487487if ~isempty(InputTable)
    488 oldfile=fullfile(InputTable{1,1},InputTable{1,2});
     488oldfile=[InputTable{1,1} InputTable{1,2}];
    489489else
    490490    % use a file name stored in prefdir
  • trunk/src/series.xml.default

    r1019 r1037  
    1212  <LaunchCmdFcn>cluster_command</LaunchCmdFcn> <!--name of the function used to create job launch commmand-->
    1313</ClusterParam>
    14 <SgeParam>
    15 </SgeParam>
    1614</SeriesParam>
  • trunk/src/uigetfile_uvmat.m

    r1031 r1037  
    7373end
    7474
    75 hfig=findobj(allchild(0),'tag',option);
    76 if isempty(hfig)
     75hfig=findobj(allchild(0),'tag',option);%look for existing browser fig
     76if isempty(hfig)% create the browser fig if it does not exist
    7777    set(0,'Unit','points')
    7878    ScreenSize=get(0,'ScreenSize');% get the size of the screen, to put the fig on the upper right
     
    149149function OK_Callback(option,filter_ext,hObject,event)
    150150set(hObject,'backgroundColor',[1 1 0])% indicate button activation
    151 hfig=get(hObject,'parent');%handle of the fig
     151fig_struct=get(hObject,'parent');
     152if isstruct(fig_struct);%recent Matlab
     153    hfig=fig_struct.Number;
     154else
     155    hfig=fig_struct;
     156end
    152157htitlebox=findobj(hfig,'tag','titlebox');  % display the current dir name 
    153158DirName=get(htitlebox,'String');
     
    192197end
    193198set(hObject,'backgroundColor',[0 1 0])% indicate end button activatio
    194 fig_struct=get(hObject,'parent');
    195 if isstruct(fig_struct);%recent Matlab
    196 uiresume(fig_struct.Number)
    197 else
    198    uiresume(fig_struct)
    199 end
    200199
    201200%------------------------------------------------------------------------
Note: See TracChangeset for help on using the changeset viewer.