"prohibited IDs: {} (case insensitive)",siteConfiguration.getId(),
PROHIBITED_SITE_IDS));
}
log.info(" > initialise Referenced Site {}",siteConfiguration.getName());
siteMetadata = new HashMap<String,Object>();
ValueFactory vf = InMemoryValueFactory.getInstance();
if(siteConfiguration.getAttribution() != null){
siteMetadata.put(NamespaceEnum.cc.getNamespace()+"attributionName",
vf.createText(siteConfiguration.getAttribution()));
}
if(siteConfiguration.getAttributionUrl() != null){
siteMetadata.put(NamespaceEnum.cc.getNamespace()+"attributionURL",
vf.createReference(siteConfiguration.getAttributionUrl()));
}
//add the licenses
if(siteConfiguration.getLicenses() != null){
for(License license : siteConfiguration.getLicenses()){
if(license.getUrl() != null){
siteMetadata.put(NamespaceEnum.cc.getNamespace()+"license",
vf.createReference(license.getUrl()));
} else if(license.getText() != null){
siteMetadata.put(NamespaceEnum.cc.getNamespace()+"license",
vf.createText(license.getText()));
}
//if defined add the name to dc:license
if(license.getName() != null){
siteMetadata.put(NamespaceEnum.dcTerms.getNamespace()+"license",
vf.createText(license.getName()));
}
//link to the license via cc:license
}
}