Eser
Eser

Reputation: 1

Java PlantUML to Astah Class Diagram UML

I would like to convert my PlantUML file to Astah file, but the problem is the extension of puml astah doesnt import it as astah, it only shows preview. Can anyone help me to convert it or, can anyone convert this puml code to astah file please.

See here - Astah

My PUML code:

@startuml

package "SEP2 Client" {
    class Main {
        +main(args: String[]): void
    }

    class MyApplication {
        +start(primaryStage: Stage): void
    }

    package mediator {
        interface ChatRemoteModel {
            +remoteMethod1(): void
            +remoteMethod2(): void
        }
        class RmiChatClient {
            +method1(): void
            +method2(): void
        }
    }

    package model {
        interface ChatModel {
            +method1(): void
            +method2(): void
        }
        class ChatModelManager {
            +method1(): void
            +method2(): void
        }
        class Message {
            +content: String
            +metadata: String
        }
        class TimestampManipulation {
            +formatTimestamp(timestamp: Date): String
        }
        class UserAuth {
            +authenticate(username: String, password: String): boolean
        }
    }

    package utility {
        class IntStringConverter {
            +convertIntToString(value: int): String
            +convertStringToInt(value: String): int
        }
        class UnnamedPropertyChangeSubject {
            +addPropertyChangeListener(listener: PropertyChangeListener): void
            +removePropertyChangeListener(listener: PropertyChangeListener): void
        }
    }

    package view {
        class ChatViewController {
            +handleEvent(event: Event): void
        }
        class SettingsViewController {
            +handleEvent(event: Event): void
        }
        class ViewHandler {
            +openView(viewName: String): void
        }
    }

    package viewmodel {
        class ChatViewModel {
            +dataBindingMethod(): void
        }
        class SettingsViewModel {
            +dataBindingMethod(): void
        }
        class ViewModelFactory {
            +createChatViewModel(): ChatViewModel
            +createSettingsViewModel(): SettingsViewModel
        }
    }

    Main --> MyApplication
    MyApplication --> mediator.ChatRemoteModel
    mediator.ChatRemoteModel <|-- mediator.RmiChatClient
    mediator.RmiChatClient --> model.ChatModel
    model.ChatModel <|-- model.ChatModelManager
    model.ChatModelManager --> model.Message
    model.ChatModelManager --> model.TimestampManipulation
    model.ChatModelManager --> model.UserAuth
    model.TimestampManipulation --> model.Message
    utility.IntStringConverter --> model.Message
    utility.UnnamedPropertyChangeSubject --> model.ChatModelManager
    view.ChatViewController --> model.ChatModel
    view.SettingsViewController --> model.ChatModel
    view.ViewHandler --> view.ChatViewController
    view.ViewHandler --> view.SettingsViewController
    viewmodel.ChatViewModel --> model.ChatModelManager
    viewmodel.SettingsViewModel --> model.ChatModelManager
    viewmodel.ViewModelFactory --> viewmodel.ChatViewModel
    viewmodel.ViewModelFactory --> viewmodel.SettingsViewModel
}

package "SEP2 Server" {
    class Main {
        +main(args: String[]): void
    }

    class MyApplication {
        +start(primaryStage: Stage): void
    }

    package mediator {
        interface ChatRemoteModel {
            +remoteMethod1(): void
            +remoteMethod2(): void
        }
        class RmiChatServer {
            +method1(): void
            +method2(): void
        }
    }

    package model {
        interface ChatModel {
            +method1(): void
            +method2(): void
        }
        class ChatModelManager {
            +method1(): void
            +method2(): void
        }
        class Message {
            +content: String
            +metadata: String
        }
        class MessageLog {
            +logMessage(message: Message): void
        }
        class TimestampManipulation {
            +formatTimestamp(timestamp: Date): String
        }
    }

    package utility {
        class UnnamedPropertyChangeSubject {
            +addPropertyChangeListener(listener: PropertyChangeListener): void
            +removePropertyChangeListener(listener: PropertyChangeListener): void
        }
    }

    package view {
        class ChatViewController {
            +handleEvent(event: Event): void
        }
        class ViewHandler {
            +openView(viewName: String): void
        }
    }

    package viewmodel {
        class ChatViewModel {
            +dataBindingMethod(): void
        }
        class ViewModelFactory {
            +createChatViewModel(): ChatViewModel
        }
    }

    Main --> MyApplication
    MyApplication --> mediator.ChatRemoteModel
    mediator.ChatRemoteModel <|-- mediator.RmiChatServer
    mediator.RmiChatServer --> model.ChatModel
    model.ChatModel <|-- model.ChatModelManager
    model.ChatModelManager --> model.Message
    model.ChatModelManager --> model.MessageLog
    model.ChatModelManager --> model.TimestampManipulation
    model.TimestampManipulation --> model.Message
    utility.UnnamedPropertyChangeSubject --> model.ChatModelManager
    view.ChatViewController --> model.ChatModel
    view.ViewHandler --> view.ChatViewController
    viewmodel.ChatViewModel --> model.ChatModelManager
    viewmodel.ViewModelFactory --> viewmodel.ChatViewModel
}

@enduml

I've tried PUML Astah extension

Upvotes: 0

Views: 82

Answers (0)

Related Questions