public interface Model
An important member of a Model is the root ClassificationNode of the Model. But
Model offers useful methods that are more global than those offered by
Node, ClassificationNode and Module.
A Model and the child classes which implement this interface and child
interfaces will generally be based on Config and child
interfaces, although this is not strictly required.
The methods in this interface and child interfaces are similar to those in Config and child interfaces, which may seem redundant. The idea is that Dragom separates the Model from its Config so that Config implementations can be used interchangeably using the same Model implementation.
A Model is essentially static in the sense that the properties of
Node's cannot be changed once the Model is created, except if the Model is a
MutableModel). However, a Model can implement
ModelNodeBuilderFactory if it allows new Node's to be dynamically
created. But once such new Node's are created, they become static as other
Node's.
| Modifier and Type | Method and Description |
|---|---|
Module |
findModuleByArtifactGroupId(ArtifactGroupId artifactGroupId)
Finds and returns the
Module whose build produces an
ArtifactGroupId. |
ClassificationNode |
getClassificationNode(NodePath nodePath)
Returns the
ClassificationNode corresponding to a NodePath. |
ClassificationNode |
getClassificationNodeRoot() |
Module |
getModule(NodePath nodePath)
|
ClassificationNode getClassificationNodeRoot()
ClassificationNode getClassificationNode(NodePath nodePath)
ClassificationNode corresponding to a NodePath.
This method follows the path of ClassificationNode's given the specified NodePath until the leaf ClassificationNode of the NodePath is reached. If any ClassificationNode along the path does not exist, null is returned.
nodePath - NodePath of the ClassificationNode to return. Must be partial.Module getModule(NodePath nodePath)
Module corresponding to a NodePath.
This methods gets the parent ClassificationNode as described for
getClassificationNode(org.azyva.dragom.model.NodePath) (NodePath.getNodePathParent())
and looks up the requested Module.
nodePath - NodePath of the Module to return. Must not be partial.Module findModuleByArtifactGroupId(ArtifactGroupId artifactGroupId)
Module whose build produces an
ArtifactGroupId.artifactGroupId - ArtifactGroupId for which to find a Module.Copyright © 2015–2017 AZYVA INC.. All rights reserved.