- * Abstract the base a given modular distribution set that is the parent all
- * versions of the same distribution
+ * Abstract the base of a given modular distribution set i.e. the parent of all
+ * versions of a given modular distribution
final static public String AETHER_BINARIES_TYPE = "binaries";
final static public String AETHER_DEP_TYPE = "dep";
private String type;
final static public String AETHER_BINARIES_TYPE = "binaries";
final static public String AETHER_DEP_TYPE = "dep";
private String type;
+ public Node getCategoryBase() {
+ // TODO clean this
+ if (type.equals(AETHER_CATEGORY_BASE))
+ return modularDistBase;
+ else
+ try {
+ return modularDistBase.getParent();
+ } catch (RepositoryException e) {
+ throw new SlcException("unable tyo get parent node for "
+ + modularDistBase, e);
+ }
+ }
+
try {
NodeIterator ni = getDistVersions();
while (ni != null && ni.hasNext()) {
Node curNode = ni.nextNode();
try {
NodeIterator ni = getDistVersions();
while (ni != null && ni.hasNext()) {
Node curNode = ni.nextNode();
- addChild(new ModularDistVersionElem(this, curNode
- .getProperty(SlcNames.SLC_ARTIFACT_VERSION)
- .getString(), curNode));
+ if (curNode.hasProperty(SlcNames.SLC_ARTIFACT_VERSION))
+ addChild(new ModularDistVersionElem(this, curNode
+ .getProperty(SlcNames.SLC_ARTIFACT_VERSION)
+ .getString(), curNode));
- throw new ArgeoException(
- "Unexcpected error while initializing children SingleJcrNode",
- re);
+ throw new ArgeoException("Unable to retrieve children for "
+ + modularDistBase, re);
.getWorkspace().getQueryManager();
QueryObjectModelFactory factory = queryManager.getQOMFactory();
Selector source = factory.selector(
SlcTypes.SLC_MODULAR_DISTRIBUTION,
SlcTypes.SLC_MODULAR_DISTRIBUTION);
Constraint constraint = factory.descendantNode(
.getWorkspace().getQueryManager();
QueryObjectModelFactory factory = queryManager.getQOMFactory();
Selector source = factory.selector(
SlcTypes.SLC_MODULAR_DISTRIBUTION,
SlcTypes.SLC_MODULAR_DISTRIBUTION);
Constraint constraint = factory.descendantNode(
// Ordering order = factory.descending(factory.propertyValue(
// source.getSelectorName(), SlcNames.SLC_ARTIFACT_VERSION));
// Ordering[] orderings = { order };
// Ordering order = factory.descending(factory.propertyValue(
// source.getSelectorName(), SlcNames.SLC_ARTIFACT_VERSION));
// Ordering[] orderings = { order };