Skip to content

Commit f8a769c

Browse files
committed
Set title of the package document
1 parent 29893ec commit f8a769c

1 file changed

Lines changed: 5 additions & 5 deletions

File tree

src/main/java/com/atomgraph/linkeddatahub/resource/admin/pkg/InstallPackage.java

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -68,6 +68,7 @@
6868
import com.atomgraph.linkeddatahub.vocabulary.SIOC;
6969
import com.atomgraph.linkeddatahub.server.util.Skolemizer;
7070
import org.apache.jena.rdf.model.ModelFactory;
71+
import org.apache.jena.vocabulary.DCTerms;
7172
import org.apache.jena.vocabulary.RDF;
7273

7374
/**
@@ -442,26 +443,25 @@ private void regenerateMasterStylesheet(EndUserApplication app, com.atomgraph.li
442443
/**
443444
* Creates a package document item.
444445
*
445-
* @param packageDocModel the model to populate
446+
* @param model the model to populate
446447
* @param packageDocumentURI the document URI
447448
* @param container the container resource
448449
* @param pkg the package resource
449450
* @param slug the document slug
450451
* @return the document item resource
451452
*/
452-
private Resource createPackageDocument(Model packageDocModel,
453+
private Resource createPackageDocument(Model model,
453454
URI packageDocumentURI,
454455
Resource container,
455456
com.atomgraph.linkeddatahub.apps.model.Package pkg,
456457
String slug)
457458
{
458-
Resource packageDocItem = packageDocModel.createResource(packageDocumentURI.toString()).
459+
return model.createResource(packageDocumentURI.toString()).
459460
addProperty(RDF.type, DH.Item).
460461
addProperty(SIOC.HAS_CONTAINER, container).
461462
addLiteral(DH.slug, slug).
463+
addLiteral(DCTerms.title, pkg.getProperty(DCTerms.title).getString()).
462464
addProperty(FOAF.primaryTopic, pkg);
463-
464-
return packageDocItem;
465465
}
466466

467467
/**

0 commit comments

Comments
 (0)