compositeUris.add(anArtifactUri);
} else {
URL artifactURL = packageProcessor.getArtifactURL(new URL(contribution.getLocation()), anArtifactUri);
// Add the deployed artifact model to the resolver
Artifact artifact = this.contributionFactory.createArtifact();
artifact.setURI(anArtifactUri.toString());
artifact.setLocation(artifactURL.toString());
contribution.getArtifacts().add(artifact);
modelResolver.addModel(artifact);
model = this.artifactProcessor.read(contributionURL, anArtifactUri, artifactURL);
if (model != null) {
artifact.setModel(model);
// Add the loaded model to the model resolver
modelResolver.addModel(model);
// Add policy definitions to the list of policy definitions
if (model instanceof SCADefinitions) {
policyDefinitions.add(model);
SCADefinitions definitions = (SCADefinitions)model;
for (Intent intent : definitions.getPolicyIntents() ) {
policyDefinitionsResolver.addModel(intent);
}
for (PolicySet policySet : definitions.getPolicySets() ) {
policyDefinitionsResolver.addModel(policySet);
}
for (IntentAttachPointType attachPointType : definitions.getBindingTypes() ) {
policyDefinitionsResolver.addModel(attachPointType);
}
for (IntentAttachPointType attachPointType : definitions.getImplementationTypes() ) {
policyDefinitionsResolver.addModel(attachPointType);
}
for (Object binding : definitions.getBindings() ) {
policyDefinitionsResolver.addModel(binding);
}
}
}
}
}
for (URI anArtifactUri : compositeUris) {
URL artifactURL = packageProcessor.getArtifactURL(new URL(contribution.getLocation()), anArtifactUri);
// Add the deployed artifact model to the resolver
Artifact artifact = this.contributionFactory.createArtifact();
artifact.setURI(anArtifactUri.toString());
artifact.setLocation(artifactURL.toString());
contribution.getArtifacts().add(artifact);
modelResolver.addModel(artifact);
model = this.artifactProcessor.read(contributionURL, anArtifactUri, artifactURL);
if (model != null) {
artifact.setModel(model);
// Add the loaded model to the model resolver
modelResolver.addModel(model);
}
}
}