private Representation license2Representation(String id, License license) { RdfValueFactory valueFactory = RdfValueFactory.getInstance(); RdfRepresentation rep = valueFactory.createRepresentation(id); if(license.getName() != null){ rep.add("http://purl.org/dc/terms/license", license.getName()); rep.add("http://www.w3.org/2000/01/rdf-schema#label", license.getName()); rep.add("http://purl.org/dc/terms/title", license.getName()); } if(license.getText() != null){ rep.add("http://www.w3.org/2000/01/rdf-schema#description", license.getText()); } rep.add("http://creativecommons.org/ns#licenseUrl", license.getUrl() == null ? id:license.getUrl()); return rep; }
for(int i=0;i<elements;i++){ try { licenseList.add(new License( names.length>i?names[i]:null, urls.length>i?urls[i]:null,
if(site.getConfiguration().getLicenses() != null){ for(License license : site.getConfiguration().getLicenses()){ if(license.getUrl() == null){ count++;
for(int i=0;i<elements;i++){ try { licenseList.add(new License( names.length>i?names[i]:null, urls.length>i?urls[i]:null,
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(license.getName() != null){ siteMetadata.put(NamespaceEnum.dcTerms.getNamespace()+"license", vf.createText(license.getName()));
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(license.getName() != null){ siteMetadata.put(NamespaceEnum.dcTerms.getNamespace()+"license", vf.createText(license.getName()));