new resources

This commit is contained in:
Ahmed Salah Tawfik Ibrahim 2024-05-16 15:24:33 +02:00
parent 0dbbdb5494
commit 9cf5046064
4 changed files with 169 additions and 0 deletions

View File

@ -0,0 +1,64 @@
package org.gcube.social_networking.socialnetworking.model.shared;
import java.io.Serializable;
@SuppressWarnings("serial")
public class Hashtag extends Resource implements Serializable{
private String hashtag;
private int occurrence;
/**
*
*/
public Hashtag() {
super();
}
/**
*
* @param hashtag
*/
public Hashtag(String hashtag) {
super();
this.hashtag = hashtag;
this.occurrence = 0;
}
/**
*
* @param hashtag
* @param occurrence
*/
public Hashtag(String hashtag, int occurrence) {
super();
this.hashtag = hashtag;
this.occurrence = occurrence;
}
@Override
public String toString() {
return "Hashtag [hashtag=" + hashtag + ", occurrence=" + occurrence + "]";
}
public void setOccurrence(int occurrence){
this.occurrence = occurrence;
}
public int getOccurrence(){
return this.occurrence;
}
@Override
public String getId() {
return hashtag;
}
public String getHashtag() {
return hashtag;
}
public void setHashtag(String hashtag){
this.hashtag = hashtag;
}
}

View File

@ -0,0 +1,55 @@
package org.gcube.social_networking.socialnetworking.model.shared;
import java.io.Serializable;
import java.util.Arrays;
public class NotificationPreference extends Resource implements Serializable {
private String notificationType;
private String[] notificationChannelType;
/**
*
*/
public NotificationPreference() {
super();
}
/**
*
* @param notificationType
* @param notificationChannelType
*/
public NotificationPreference(String notificationType, String... notificationChannelType) {
super();
this.notificationType = notificationType;
this.notificationChannelType = notificationChannelType;
}
@Override
public String toString() {
return "NotificationPreference [notificationtype=" + notificationType + ", notificationChannelType=" + Arrays.toString(notificationChannelType) + "]";
}
public String getNotificationType() {
return notificationType;
}
public void setNotificationChannelType(String[] notificationChannelType) {
this.notificationChannelType = notificationChannelType;
}
public void setNotificationType(String notificationType) {
this.notificationType = notificationType;
}
public String[] getNotificationChannelType() {
return notificationChannelType;
}
@Override
public String getId() {
return notificationType;
}
}

View File

@ -0,0 +1,7 @@
package org.gcube.social_networking.socialnetworking.model.shared;
public abstract class Resource {
public abstract String getId();
}

View File

@ -0,0 +1,43 @@
package org.gcube.social_networking.socialnetworking.model.shared;
import java.io.Serializable;
import java.util.Date;
@SuppressWarnings("serial")
public class Vre extends Resource implements Serializable{
private String vreid;
/**
*
*/
public Vre() {
super();
}
/**
*
* @param vreid
*/
public Vre(String vreid) {
super();
this.vreid = vreid;
}
@Override
public String toString() {
return "Vre [vreid=" + vreid + "]";
}
@Override
public String getId() {
return vreid;
}
public void setId(String vreid){
this.vreid = vreid;
}
}