Search in sources :

Example 1 with VisualAppearanceId

use of org.eclipse.winery.repository.datatypes.ids.elements.VisualAppearanceId in project winery by eclipse.

the class ToscaExportUtil method addVisualAppearanceToCSAR.

private void addVisualAppearanceToCSAR(IRepository repository, TopologyGraphElementEntityTypeId id) {
    VisualAppearanceId visId = new VisualAppearanceId(id);
    if (repository.exists(visId)) {
        // we do NOT check for the id, but simply check for bigIcon.png (only exists in NodeType) and smallIcon.png (exists in NodeType and RelationshipType)
        RepositoryFileReference ref = new RepositoryFileReference(visId, Filename.FILENAME_BIG_ICON);
        if (repository.exists(ref)) {
            this.referencesToPathInCSARMap.put(ref, BackendUtils.getPathInsideRepo(ref));
        }
        ref = new RepositoryFileReference(visId, Filename.FILENAME_SMALL_ICON);
        if (repository.exists(ref)) {
            this.referencesToPathInCSARMap.put(ref, BackendUtils.getPathInsideRepo(ref));
        }
    }
}
Also used : RepositoryFileReference(org.eclipse.winery.common.RepositoryFileReference) VisualAppearanceId(org.eclipse.winery.repository.datatypes.ids.elements.VisualAppearanceId)

Example 2 with VisualAppearanceId

use of org.eclipse.winery.repository.datatypes.ids.elements.VisualAppearanceId in project winery by eclipse.

the class CsarImporter method adjustRelationshipType.

/**
 * Adds a color to the given relationship type
 */
private void adjustRelationshipType(Path rootPath, TRelationshipType ci, RelationshipTypeId wid, TOSCAMetaFile tmf, final List<String> errors) {
    VisualAppearanceId visId = new VisualAppearanceId(wid);
    this.importIcons(rootPath, visId, tmf, errors);
}
Also used : VisualAppearanceId(org.eclipse.winery.repository.datatypes.ids.elements.VisualAppearanceId)

Example 3 with VisualAppearanceId

use of org.eclipse.winery.repository.datatypes.ids.elements.VisualAppearanceId in project winery by eclipse.

the class CsarImporter method adjustNodeType.

private void adjustNodeType(Path rootPath, TNodeType ci, NodeTypeId wid, TOSCAMetaFile tmf, final List<String> errors) {
    VisualAppearanceId visId = new VisualAppearanceId(wid);
    this.importIcons(rootPath, visId, tmf, errors);
}
Also used : VisualAppearanceId(org.eclipse.winery.repository.datatypes.ids.elements.VisualAppearanceId)

Aggregations

VisualAppearanceId (org.eclipse.winery.repository.datatypes.ids.elements.VisualAppearanceId)3 RepositoryFileReference (org.eclipse.winery.common.RepositoryFileReference)1