Author: andre Date: 2009-08-17 14:03:08 +0200 (Mon, 17 Aug 2009) New Revision: 37940
Modified: openimages/trunk/src/main/java/eu/openimages/AssetImporter.java Log: relate mediafragments to proper license Modified: openimages/trunk/src/main/java/eu/openimages/AssetImporter.java =================================================================== --- openimages/trunk/src/main/java/eu/openimages/AssetImporter.java 2009-08-17 11:26:29 UTC (rev 37939) +++ openimages/trunk/src/main/java/eu/openimages/AssetImporter.java 2009-08-17 12:03:08 UTC (rev 37940) @@ -22,9 +22,9 @@ /** * Imports all mediafragments which are described with set of XML. Default this ready all XML from * the directory 'B&G' in the files directory. This is the location where the files must be - * present any way. + * present anyway. * - * This can be scheduled in crontab, which will autoamaticly add the new files to the system. (It + * This can be scheduled in crontab, which will automatically add the new files to the system. (It * would _remove_ fragments though). * * @author Michiel Meeuwissen; @@ -257,6 +257,12 @@ } mediaFragment.commit(); log.info("Matched mediafragment " + mediaFragment.getNumber() + " " + mediaFragment.getStringValue("title")); + + RelationManager rm = cloud.getRelationManager(cloud.getNodeManager("mediafragments"), cloud.getNodeManager("licenses"), "related"); + Node licenseNode = cloud.getNodeByAlias("licenses_attributionsharealike"); + mediaFragment.createRelation(licenseNode, rm).commit(); + log.info("Related mediafragment " + mediaFragment.getNumber() + " to license " + licenseNode.getStringValue("name")); + } else { log.warn("No files found, ignoring this"); } _______________________________________________ Cvs mailing list Cvs@lists.mmbase.org http://lists.mmbase.org/mailman/listinfo/cvs