Java Doc for Community.java in  » Content-Management-System » dspace » org » dspace » content » Java Source Code / Java DocumentationJava Source Code and Java Documentation

Java Source Code / Java Documentation
1. 6.0 JDK Core
2. 6.0 JDK Modules
3. 6.0 JDK Modules com.sun
4. 6.0 JDK Modules com.sun.java
5. 6.0 JDK Modules sun
6. 6.0 JDK Platform
7. Ajax
8. Apache Harmony Java SE
9. Aspect oriented
10. Authentication Authorization
11. Blogger System
12. Build
13. Byte Code
14. Cache
15. Chart
16. Chat
17. Code Analyzer
18. Collaboration
19. Content Management System
20. Database Client
21. Database DBMS
22. Database JDBC Connection Pool
23. Database ORM
24. Development
25. EJB Server geronimo
26. EJB Server GlassFish
27. EJB Server JBoss 4.2.1
28. EJB Server resin 3.1.5
29. ERP CRM Financial
30. ESB
31. Forum
32. GIS
33. Graphic Library
34. Groupware
35. HTML Parser
36. IDE
37. IDE Eclipse
38. IDE Netbeans
39. Installer
40. Internationalization Localization
41. Inversion of Control
42. Issue Tracking
43. J2EE
44. JBoss
45. JMS
46. JMX
47. Library
48. Mail Clients
49. Net
50. Parser
51. PDF
52. Portal
53. Profiler
54. Project Management
55. Report
56. RSS RDF
57. Rule Engine
58. Science
59. Scripting
60. Search Engine
61. Security
62. Sevlet Container
63. Source Control
64. Swing Library
65. Template Engine
66. Test Coverage
67. Testing
68. UML
69. Web Crawler
70. Web Framework
71. Web Mail
72. Web Server
73. Web Services
74. Web Services apache cxf 2.0.1
75. Web Services AXIS2
76. Wiki Engine
77. Workflow Engines
78. XML
79. XML UI
Java
Java Tutorial
Java Open Source
Jar File Download
Java Articles
Java Products
Java by API
Photoshop Tutorials
Maya Tutorials
Flash Tutorials
3ds-Max Tutorials
Illustrator Tutorials
GIMP Tutorials
C# / C Sharp
C# / CSharp Tutorial
C# / CSharp Open Source
ASP.Net
ASP.NET Tutorial
JavaScript DHTML
JavaScript Tutorial
JavaScript Reference
HTML / CSS
HTML CSS Reference
C / ANSI-C
C Tutorial
C++
C++ Tutorial
Ruby
PHP
Python
Python Tutorial
Python Open Source
SQL Server / T-SQL
SQL Server / T-SQL Tutorial
Oracle PL / SQL
Oracle PL/SQL Tutorial
PostgreSQL
SQL / MySQL
MySQL Tutorial
VB.Net
VB.Net Tutorial
Flash / Flex / ActionScript
VBA / Excel / Access / Word
XML
XML Tutorial
Microsoft Office PowerPoint 2007 Tutorial
Microsoft Office Excel 2007 Tutorial
Microsoft Office Word 2007 Tutorial
Java Source Code / Java Documentation » Content Management System » dspace » org.dspace.content 
Source Cross Reference  Class Diagram Java Document (Java Doc) 


java.lang.Object
   org.dspace.content.DSpaceObject
      org.dspace.content.Community

Community
public class Community extends DSpaceObject (Code)
Class representing a community

The community's metadata (name, introductory text etc.) is loaded into' memory. Changes to this metadata are only reflected in the database after update is called.
author:
   Robert Tansley
version:
   $Revision: 2339 $




Constructor Summary
 Community(Context context, TableRow row)
     Construct a community object from a database row.

Method Summary
public  voidaddCollection(Collection c)
    
public  voidaddSubcommunity(Community c)
    
public  voidcanEdit()
    
public  booleancanEditBoolean()
    
public  intcountItems()
    
public static  Communitycreate(Community parent, Context context)
     Create a new community, with a new ID.
public  CollectioncreateCollection()
     Create a new collection within this community.
public  CommunitycreateSubcommunity()
     Create a new sub-community within this community.
public  voiddelete()
     Delete the community, including the metadata and logo.
public  booleanequals(Object other)
    
public static  Communityfind(Context context, int id)
     Get a community from the database.
public static  Community[]findAll(Context context)
     Get a list of all communities in the system.
public static  Community[]findAllTop(Context context)
     Get a list of all top-level communities in the system.
public  Community[]getAllParents()
     Return an array of parent communities of this community, in ascending order.
public  Collection[]getCollections()
     Get the collections in this community.
public  StringgetHandle()
    
public  intgetID()
    
public  BitstreamgetLogo()
     Get the logo for the community.
public  StringgetMetadata(String field)
    
public  StringgetName()
    
public  CommunitygetParentCommunity()
    
public  Community[]getSubcommunities()
     Get the immediate sub-communities of this community.
public  intgetType()
    
public  voidremoveCollection(Collection c)
     Remove a collection.
public  voidremoveSubcommunity(Community c)
     Remove a subcommunity.
public  BitstreamsetLogo(InputStream is)
     Give the community a logo.
public  voidsetMetadata(String field, String value)
    
public  voidupdate()
     Update the community metadata (including logo) to the database.


Constructor Detail
Community
Community(Context context, TableRow row) throws SQLException(Code)
Construct a community object from a database row.
Parameters:
  context - the context this object exists in
Parameters:
  row - the corresponding row in the table




Method Detail
addCollection
public void addCollection(Collection c) throws SQLException, AuthorizeException(Code)
Add an exisiting collection to the community
Parameters:
  c - collection to add



addSubcommunity
public void addSubcommunity(Community c) throws SQLException, AuthorizeException(Code)
Add an exisiting community as a subcommunity to the community
Parameters:
  c - subcommunity to add



canEdit
public void canEdit() throws AuthorizeException, SQLException(Code)



canEditBoolean
public boolean canEditBoolean() throws java.sql.SQLException(Code)
return TRUE if context's user can edit community, false otherwise boolean true = current user can edit community



countItems
public int countItems() throws SQLException(Code)
counts items in this community total items



create
public static Community create(Community parent, Context context) throws SQLException, AuthorizeException(Code)
Create a new community, with a new ID.
Parameters:
  context - DSpace context object the newly created community



createCollection
public Collection createCollection() throws SQLException, AuthorizeException(Code)
Create a new collection within this community. The collection is created without any workflow groups or default submitter group. the new collection



createSubcommunity
public Community createSubcommunity() throws SQLException, AuthorizeException(Code)
Create a new sub-community within this community. the new community



delete
public void delete() throws SQLException, AuthorizeException, IOException(Code)
Delete the community, including the metadata and logo. Collections and subcommunities that are then orphans are deleted.



equals
public boolean equals(Object other)(Code)
Return true if other is the same Community as this object, false otherwise
Parameters:
  other - object to compare to true if object passed in represents the samecommunity as this object



find
public static Community find(Context context, int id) throws SQLException(Code)
Get a community from the database. Loads in the metadata
Parameters:
  context - DSpace context object
Parameters:
  id - ID of the community the community, or null if the ID is invalid.



findAll
public static Community[] findAll(Context context) throws SQLException(Code)
Get a list of all communities in the system. These are alphabetically sorted by community name.
Parameters:
  context - DSpace context object the communities in the system



findAllTop
public static Community[] findAllTop(Context context) throws SQLException(Code)
Get a list of all top-level communities in the system. These are alphabetically sorted by community name. A top-level community is one without a parent community.
Parameters:
  context - DSpace context object the top-level communities in the system



getAllParents
public Community[] getAllParents() throws SQLException(Code)
Return an array of parent communities of this community, in ascending order. If community is top-level, return an empty array. an array of parent communities, empty if top-level



getCollections
public Collection[] getCollections() throws SQLException(Code)
Get the collections in this community. Throws an SQLException because creating a community object won't load in all collections. array of Collection objects



getHandle
public String getHandle()(Code)

See Also:   org.dspace.content.DSpaceObject.getHandle



getID
public int getID()(Code)
Get the internal ID of this collection the internal identifier



getLogo
public Bitstream getLogo()(Code)
Get the logo for the community. null is return if the community does not have a logo. the logo of the community, or null



getMetadata
public String getMetadata(String field)(Code)
Get the value of a metadata field
Parameters:
  field - the name of the metadata field to get the value of the metadata field
exception:
  IllegalArgumentException - if the requested metadata field doesn't exist



getName
public String getName()(Code)



getParentCommunity
public Community getParentCommunity() throws SQLException(Code)
Return the parent community of this community, or null if the community is top-level the immediate parent community, or null if top-level



getSubcommunities
public Community[] getSubcommunities() throws SQLException(Code)
Get the immediate sub-communities of this community. Throws an SQLException because creating a community object won't load in all collections. array of Community objects



getType
public int getType()(Code)
return type found in Constants



removeCollection
public void removeCollection(Collection c) throws SQLException, AuthorizeException, IOException(Code)
Remove a collection. Any items then orphaned are deleted.
Parameters:
  c - collection to remove



removeSubcommunity
public void removeSubcommunity(Community c) throws SQLException, AuthorizeException, IOException(Code)
Remove a subcommunity. Any substructure then orphaned is deleted.
Parameters:
  c - subcommunity to remove



setLogo
public Bitstream setLogo(InputStream is) throws AuthorizeException, IOException, SQLException(Code)
Give the community a logo. Passing in null removes any existing logo. You will need to set the format of the new logo bitstream before it will work, for example to "JPEG". Note that update(/code> will need to be called for the change to take effect. Setting a logo and not calling update later may result in a previous logo lying around as an "orphaned" bitstream.
Parameters:
  is - the stream to use as the new logo the new logo bitstream, or null if there is nologo (null was passed in)



setMetadata
public void setMetadata(String field, String value) throws MissingResourceException(Code)
Set a metadata value
Parameters:
  field - the name of the metadata field to get
Parameters:
  value - value to set the field to
exception:
  IllegalArgumentException - if the requested metadata field doesn't exist
exception:
  MissingResourceException -



update
public void update() throws SQLException, IOException, AuthorizeException(Code)
Update the community metadata (including logo) to the database.



Methods inherited from org.dspace.content.DSpaceObject
protected void addDetails(String d)(Code)(Java Doc)
protected void clearDetails()(Code)(Java Doc)
public static DSpaceObject find(Context context, int type, int id) throws SQLException(Code)(Java Doc)
protected String getDetails()(Code)(Java Doc)
abstract public String getHandle()(Code)(Java Doc)
abstract public int getID()(Code)(Java Doc)
abstract public String getName()(Code)(Java Doc)
abstract public int getType()(Code)(Java Doc)

Methods inherited from java.lang.Object
native protected Object clone() throws CloneNotSupportedException(Code)(Java Doc)
public boolean equals(Object obj)(Code)(Java Doc)
protected void finalize() throws Throwable(Code)(Java Doc)
final native public Class getClass()(Code)(Java Doc)
native public int hashCode()(Code)(Java Doc)
final native public void notify()(Code)(Java Doc)
final native public void notifyAll()(Code)(Java Doc)
public String toString()(Code)(Java Doc)
final native public void wait(long timeout) throws InterruptedException(Code)(Java Doc)
final public void wait(long timeout, int nanos) throws InterruptedException(Code)(Java Doc)
final public void wait() throws InterruptedException(Code)(Java Doc)

www.java2java.com | Contact Us
Copyright 2009 - 12 Demo Source and Support. All rights reserved.
All other trademarks are property of their respective owners.