Skip to content

[OLD]Class Diagrams

Mücahit Erdoğan Ünlü edited this page Oct 7, 2024 · 1 revision
classDiagram
    class ProfileController{
        +get(username: String) Profile
        +create(username: String) int
        +delete(username: String) int
        +update(profile: Profile) int
    }
    class ContentController{
        +create(text: String, author: RegisteredUser, title: String, image: Image) int
        +find(keywordList: List~String~) List~Post~
        +get(id: int) Post
        +edit(post: Post) int
        +delete(id: int) int
        +likePost(post_id: int, username: String) int
        +unlikePost(post_id: int, username: String) int
        +bookmarkPost(post_id: int, username: String) int
        +unbookmarkPost(post_id: int, username: String) int

    }

    class User{
        <<abstract>>
        -user_controller: UserController
        -search_engine: SearchEngine
        -feed: Feed
        +getUserController() UserController
        +getSearchEngine() SearchEngine
    }

    class UserController{
        +register(username: String, password: String, email: String) int
        +login(username: String, password: String) int
        +logout(username: String) int
        +get(username: String) User
        +delete(username: String) int
        +update( user: User) int
        +blockUser(username: String) int
        +unblockUser(username: String) int
        +followUser(username: String) int
        +unfollowUser(username: String) int
        +muteUser(username: String) int
        +unmuteUser(username: String) int
        +getBlockedList(username: String) List~RegisteredUser~
        +getMutedList(username: String) List~RegisteredUser~
        +getFollowingList(username: String) List~RegisteredUser~
        +getFollowerList(username: String) List~RegisteredUser~ 
    }

    class GuestUser{
    }

    class RegisteredUser{
        -id: int
        -contentcontroller: ContentController
        -username: String
        -profile: Profile
        -password: String
        +getId() int
        +getProfile() Profile
        +getUsername() String
        
    }
    class Profile{
        -profileController
        -email: String
        -biography: String
        -profile_picture: Image    
        -registration_date: Date
        +getEmail() String
        +setEmail(email: String) int
        +getBiography() String
        +setBiography(biography: String) int        
        +getProfilePicture() Image
        +setProfilePicture(image: Image) int        
    }
    class Content{
        -text: String
        -publication_date: Date
        -edit_date: Date
        -author: RegisteredUser
        
        +getText() String
        +getPublicationDate() Date
        +getEditDate() Date
        +getAuthor() RegisteredUser

        +setText(text: String) int        
    }
    class Post {
        -id: int
        -title: String
        -image: Image


        -like_count: int
        -like_list: List~RegisteredUser~

        -bookmark_count: int
        +getId() int
        +getTitle() String
        +getImage() Image
        +getLikeCount() int
        +getLikeList() List~RegisteredUser~
        +getBookmarkCount() int
        
        +setTitle(title: String) int
        +setImage(image: Image) int




    }  

    class Feed{
        -post_list: List~Post~
        -contentcontroller: ContentController
        +populateFeed(user: User) int
        +getPostList() List~Post~
    }
    class SearchEngine{
        -contentcontroller: ContentController
        -wikidata_client : WikiData
        + updateSearchHistory(search: String) int
        + filter(post_list:List~Post~, filter: Filter) List~Post~
        + createFilter(author: String, from_date: Date, to_date: Date) Filter
    }
    class Filter {
        -author: String
        -from_date: Date
        -to_date: Date
            
        +getAuthor() String
        +getFromDate() String
        +getToDate() String
    }

    class WikiData{
        +query(query: String) List~Wikidata_Entity~
        +getInfoBox(wikidata_entity: Wikidata_Entity) InfoBox
        +getKeywords(wikidata_entity: Wikidata_Entity) List~String~
    }

    class InfoBox{
        -key_value_pairs: Hashmap~String, String~
        
        +getKey_value_pairs() Hashmap~String, String~
        +setKey_value_pairs(pairs: Hashmap~String, String~) int
    }

    class Image {
        -alt_text: String
        -url: String
        
        +getUrl() String
        +getAltText() String
    }

    Post "1" -- "0..*" RegisteredUser : likes
    Content "1" -- "1" RegisteredUser : owns
    User <|-- RegisteredUser
    Profile "1" --* "1" RegisteredUser : has

    ContentController "1" -- "0..*" Content : manages
    UserController "1" --* "1" User : controls

    RegisteredUser "0..*" -- "0..*" RegisteredUser : interacts
    Content <|-- Post
    Feed "1" --* "1" User : has
    User "1" *-- "1" SearchEngine : uses
    Post "0..*" *-- "0..*" Image
    User <|-- GuestUser

    SearchEngine "1" *-- "0..*" Filter : filtersWith
    SearchEngine "1" *-- "1" WikiData : queries
    WikiData "1" *-- "0..*" InfoBox : returns
    ContentController "1" --* "1" Feed : controls
    ContentController "1" --* "1" RegisteredUser : controls
    ContentController "1" --* "1" SearchEngine : controls
    ProfileController "1" --* "1" Profile : controls
Loading

BOUNSWE2024 - G11

Logo Turquiz App

⏳ Status

DONE

🧑🏼‍💻 Team

📝 Diagrams

📆 Lab Reports

📆 Meeting Notes

📍 Milestones

📎 Planning

📚 User Scenarios / Stories

📚 Resources

🔎 Research

🗂️ Templates

Clone this wiki locally