public final class FileHeader implements Serializable{\r
\r
/**\r
+ * The path for the resource manipulation subsystem.\r
+ */\r
+ public static final String PATH_FILES = "/files";\r
+ //TODO: Re-evaluate whether this should move in a property file\r
+\r
+ /**\r
* The persistence ID of the object.\r
*/\r
@Id\r
*/\r
@OneToMany(cascade = CascadeType.ALL)\r
private Set<Permission> permissions = new HashSet<Permission>();\r
- \r
+\r
@Column(columnDefinition=" boolean DEFAULT false")\r
private Boolean shared;\r
/**\r
}\r
\r
/**\r
+ * Retrieve the file tags as a list of strings.\r
+ *\r
+ * @return the list of file tag strings\r
+ */\r
+ public List<String> getFileTagsAsStrings() {\r
+ List<String> result = new ArrayList<String>();\r
+ for (FileTag ft : fileTags) {\r
+ result.add(ft.getTag());\r
+ }\r
+ return result;\r
+ }\r
+ \r
+ /**\r
* Retrieve the file tags.\r
*\r
* @return the list of file tags\r
}\r
\r
/**\r
+ * Retrieve the URI for this resource, relative to the REST API root URI.\r
+ * This unique identifier can be used to refer to the resource from\r
+ * various GSS clients.\r
+ *\r
+ * @return the URI\r
+ */\r
+ public String getURI() {\r
+ return owner.getUsername() + PATH_FILES + getPath();\r
+ }\r
+\r
+ /**\r
* Retrieve the shared.\r
*\r
* @return the shared\r
if(shared==null)\r
return false;\r
return shared;\r
- }\r
- \r
- \r
+ }\r
+
+
/**\r
* Modify the shared.\r
*\r