-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #33 from reTHINK-project/3.3
3.3
- Loading branch information
Showing
17 changed files
with
945 additions
and
888 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
242 changes: 127 additions & 115 deletions
242
src/main/java/eu/rethink/globalregistry/model/AbstractDataset.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,120 +1,132 @@ | ||
package eu.rethink.globalregistry.model; | ||
|
||
import org.json.JSONArray; | ||
import org.json.JSONException; | ||
import org.json.JSONObject; | ||
|
||
public abstract class AbstractDataset { | ||
|
||
protected String guid; | ||
protected String salt; | ||
protected JSONArray userIDs; | ||
protected String lastUpdate; | ||
protected String timeout; | ||
protected String publicKey; | ||
protected int active; | ||
protected int revoked; | ||
protected JSONObject defaults; | ||
protected int schemaVersion; | ||
protected JSONArray legacyIDs; | ||
|
||
|
||
public String getGUID() { | ||
return guid; | ||
} | ||
|
||
|
||
public void setGUID(String guid) { | ||
this.guid = guid; | ||
} | ||
|
||
|
||
public int getSchemaVersion() { | ||
return schemaVersion; | ||
} | ||
|
||
|
||
public void setSchemaVersion(int schemaVersion) { | ||
this.schemaVersion = schemaVersion; | ||
} | ||
|
||
|
||
public String getSalt() { | ||
return salt; | ||
} | ||
|
||
public void setSalt(String salt) { | ||
this.salt = salt; | ||
} | ||
|
||
|
||
public JSONArray getUserIDs() { | ||
return userIDs; | ||
} | ||
|
||
public JSONObject getUserIDs(int index) { | ||
return userIDs.getJSONObject(index); | ||
} | ||
|
||
|
||
public void setUserIDs(JSONArray userIDs) { | ||
this.userIDs = userIDs; | ||
} | ||
|
||
|
||
public String getLastUpdate() { | ||
return lastUpdate; | ||
} | ||
|
||
|
||
public void setLastUpdate(String lastUpdate) { | ||
this.lastUpdate = lastUpdate; | ||
} | ||
|
||
public String getTimeout() { | ||
return timeout; | ||
} | ||
|
||
|
||
public void setTimeout(String timeout) { | ||
this.timeout = timeout; | ||
} | ||
|
||
|
||
public String getPublicKey() { | ||
return publicKey; | ||
} | ||
|
||
|
||
public void setPublicKey(String publicKey) { | ||
this.publicKey = publicKey; | ||
} | ||
|
||
|
||
public int getActive() { | ||
return active; | ||
} | ||
|
||
|
||
public void setActive(int active) { | ||
this.active = active; | ||
} | ||
|
||
public int getRevoked() { | ||
return revoked; | ||
} | ||
|
||
public void setRevoked(int revoked) { | ||
this.revoked = revoked; | ||
} | ||
|
||
|
||
public JSONObject getDefaults() { | ||
return defaults; | ||
} | ||
|
||
|
||
public void setDefaults(JSONObject defaults) { | ||
this.defaults = defaults; | ||
} | ||
|
||
} | ||
public abstract class AbstractDataset | ||
{ | ||
protected String guid; | ||
protected String salt; | ||
protected JSONArray userIDs; | ||
protected String lastUpdate; | ||
protected String timeout; | ||
protected String publicKey; | ||
protected int active; | ||
protected int revoked; | ||
protected JSONObject defaults; | ||
protected int schemaVersion; | ||
protected JSONArray legacyIDs; | ||
|
||
public String getGUID() | ||
{ | ||
return guid; | ||
} | ||
|
||
public void setGUID(String guid) | ||
{ | ||
this.guid = guid; | ||
} | ||
|
||
public int getSchemaVersion() | ||
{ | ||
return schemaVersion; | ||
} | ||
|
||
public void setSchemaVersion(int schemaVersion) | ||
{ | ||
this.schemaVersion = schemaVersion; | ||
} | ||
|
||
public String getSalt() | ||
{ | ||
return salt; | ||
} | ||
|
||
public void setSalt(String salt) | ||
{ | ||
this.salt = salt; | ||
} | ||
|
||
public JSONArray getUserIDs() | ||
{ | ||
return userIDs; | ||
} | ||
|
||
public JSONObject getUserIDs(int index) | ||
{ | ||
try | ||
{ | ||
return userIDs.getJSONObject(index); | ||
} | ||
catch(JSONException e) | ||
{ | ||
return new JSONObject(); | ||
} | ||
} | ||
|
||
public void setUserIDs(JSONArray userIDs) | ||
{ | ||
this.userIDs = userIDs; | ||
} | ||
|
||
public String getLastUpdate() | ||
{ | ||
return lastUpdate; | ||
} | ||
|
||
public void setLastUpdate(String lastUpdate) | ||
{ | ||
this.lastUpdate = lastUpdate; | ||
} | ||
|
||
public String getTimeout() | ||
{ | ||
return timeout; | ||
} | ||
|
||
public void setTimeout(String timeout) | ||
{ | ||
this.timeout = timeout; | ||
} | ||
|
||
public String getPublicKey() | ||
{ | ||
return publicKey; | ||
} | ||
|
||
public void setPublicKey(String publicKey) | ||
{ | ||
this.publicKey = publicKey; | ||
} | ||
|
||
public int getActive() | ||
{ | ||
return active; | ||
} | ||
|
||
public void setActive(int active) | ||
{ | ||
this.active = active; | ||
} | ||
|
||
public int getRevoked() | ||
{ | ||
return revoked; | ||
} | ||
|
||
public void setRevoked(int revoked) | ||
{ | ||
this.revoked = revoked; | ||
} | ||
|
||
public JSONObject getDefaults() | ||
{ | ||
return defaults; | ||
} | ||
|
||
public void setDefaults(JSONObject defaults) | ||
{ | ||
this.defaults = defaults; | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.