ArtifactType type = ArtifactType.PRIMARY;
String name = aggregate.getName();
String ext = ".xml";
Artifact parent = null;
if (!hasFullCoverage()) {
parent = new DirectoryArtifact(name);
artifacts.add(parent);
name = "";
ext = Constants.DOT_CONTENT_XML;
// special optimization if only nt:folder
if (aggregate.getNode().getPrimaryNodeType().getName().equals("nt:folder")
&& aggregate.getNode().getMixinNodeTypes().length == 0) {
return artifacts;
}
}
// add extra
Serializer ser = new DocViewSerializer(aggregate);
artifacts.add(parent, name, ext, type, ser, 0);
// add binaries
Collection<Property> bins = aggregate.getBinaries();
if (bins != null && !bins.isEmpty()) {
if (hasFullCoverage()) {
assert parent == null;
parent = new DirectoryArtifact(aggregate.getName());
artifacts.add(parent);
}
int pathLen = aggregate.getPath().length();
if (pathLen > 1) {
pathLen++;