Changeset 2174


Ignore:
Timestamp:
08/29/12 15:19:28 (12 years ago)
Author:
olhsha
Message:

#50 fix is refactored and the test is refined (the result is written in the file). Next: try the fix on the specs generated via TomCat?.
#181 how to send the generated channel to the RssReader?? where to get "practical abstract description files", largeProfile is not marshallable to abstract/profile/component!!

Location:
ComponentRegistry/branches/ComponentRegistry-1.13.0-olha/ComponentRegistry/src
Files:
1 added
5 edited

Legend:

Unmodified
Added
Removed
  • ComponentRegistry/branches/ComponentRegistry-1.13.0-olha/ComponentRegistry/src/main/java/clarin/cmdi/componentregistry/CMDComponentTypeWrapper.java

    r2153 r2174  
    3434        if (component != null) {component.setFilename(null);}
    3535       
    36         for (CMDComponentType currentcomponent : listofcomponents) {
    37                 CMDComponentTypeWrapper currentwrapper = new CMDComponentTypeWrapper(currentcomponent);
    38                 currentwrapper.setFileNamesToNull();
     36        setFileNamesFromListToNull(listofcomponents);
     37   
     38    }
     39   
     40   
     41    private void setFileNamesFromListToNull(List<CMDComponentType> listofcomponents){
     42     
     43        for (CMDComponentType currentcomponent : listofcomponents) {
     44                setFileNamesToNullCurrent(currentcomponent);
    3945                }
     46   
     47    }
     48   
     49    private void setFileNamesToNullCurrent(CMDComponentType currentcomponent){
     50     
     51      currentcomponent.setFilename(null);
     52      setFileNamesFromListToNull(currentcomponent.getCMDComponent());
    4053   
    4154    }
  • ComponentRegistry/branches/ComponentRegistry-1.13.0-olha/ComponentRegistry/src/test/java/clarin/cmdi/componentregistry/CMDComponentTypeWrapperTest.java

    r2173 r2174  
    256256          writeSpecToFile(compspec, "src/test/resources/xml/largeProfileDummyFilenames.xml");
    257257         
    258          
    259          
    260258      }
    261259       
     
    280278         
    281279         checkNullnessOfFilenamesInListOfComponents(newcompspec.getCMDComponent());
    282       }
    283      
    284      
    285      
    286     }
    287    
    288    
    289    
    290    
    291 
     280         writeSpecToFile(newcompspec, "src/test/resources/xml/largeProfileUndummied.xml");
     281         
     282         
     283      }
     284     
     285     
     286     
     287    }
     288   
     289   
     290   
     291   
     292
  • ComponentRegistry/branches/ComponentRegistry-1.13.0-olha/ComponentRegistry/src/test/resources/xml/Component1.xml

    r2173 r2174  
    11<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
    22<componentDescription xmlns:ns2="http://www.w3.org/1999/xlink">
    3     <id>clarin.eu:cr1:c_1346251472675</id>
     3    <id>clarin.eu:cr1:c_1346252981279</id>
    44    <description>description1dum</description>
    55    <name>name1dum</name>
    6     <registrationDate>2012-08-29T14:44:32+00:00</registrationDate>
     6    <registrationDate>2012-08-29T15:12:50+00:00</registrationDate>
    77    <creatorName>God</creatorName>
    88    <userId>uid1dum</userId>
  • ComponentRegistry/branches/ComponentRegistry-1.13.0-olha/ComponentRegistry/src/test/resources/xml/Component2.xml

    r2173 r2174  
    11<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
    22<componentDescription xmlns:ns2="http://www.w3.org/1999/xlink">
    3     <id>clarin.eu:cr1:c_1346251472676</id>
     3    <id>clarin.eu:cr1:c_1346252981280</id>
    44    <description>description2dum</description>
    55    <name>name2dum</name>
    6     <registrationDate>2012-08-29T14:44:32+00:00</registrationDate>
     6    <registrationDate>2012-08-29T15:12:50+00:00</registrationDate>
    77    <creatorName>Allah</creatorName>
    88    <userId>uid2dum</userId>
  • ComponentRegistry/branches/ComponentRegistry-1.13.0-olha/ComponentRegistry/src/test/resources/xml/rssTest.xml

    r2173 r2174  
    1 <?xml version="1.0" encoding="UTF-8" standalone="yes"?>
     1,<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
    22<rss>
    33    <channel>
     
    77            <link>href1dum</link>
    88            <author>God</author>
    9             <pubDate>2012-08-29T14:44:09+00:00</pubDate>
     9            <pubDate>2012-08-29T15:05:08+00:00</pubDate>
    1010        </item>
    1111        <item>
     
    1414            <link>href2dum</link>
    1515            <author>Allah</author>
    16             <pubDate>2012-08-29T14:44:10+00:00</pubDate>
     16            <pubDate>2012-08-29T15:05:08+00:00</pubDate>
    1717        </item>
    1818    </channel>
Note: See TracChangeset for help on using the changeset viewer.