Closed aklemp closed 4 years ago
If it's only about a relation without properties then it's just necessary to add a relation property to the package descriptor:
public interface PackageDescriptor extends PackageMemberDescriptor, DirectoryDescriptor, FileContainerDescriptor {
@Relation("DEPENDS_ON")
List<PackageDescriptor> getDependencies();
}
and use it as follows:
dependentPackage.getDependencies().add(dependencyPackage);
The mechanism you're trying to use is for typed relations which may define properties. In this case mapping requires more information, see http://buschmais.github.io/extended-objects/doc/0.4.5/neo4j/#_typed_relations_with_properties
Two questions:
While my question was of generic nature, I'm currently in the scope of integration tests. I didn't want to change the existing scanners. Thank you for the hints.
Nevertheless, configurable scanner detail configuration sounds like a nice feature. :-)
Closing old ticket.
I would like to use the create-methods in class
Store
to programmatically create a relation between two nodes. Let's take the relationDEPENDS_ON
as example. It defines a relation between two artifacts (in the sense of Maven artifact). The following code tries to create a relation between two packages.I get the following error.
From a graph point-of-view a relation is somewhat general purpose. In this example, many things might depend on other things.
I see three possible solutions, all of which have some drawbacks.
Is there any other way? Would it be useful to introduce some more abstraction? E.g. introduce a
DependsOnIncomingDescriptor
andDependsOnOutgoingDescriptor
that can be used in Maven artifacts, packages and anything else.