|
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface Collection
A document representing a collection of documents. This class is in prototyping stage.
Field Summary | |
---|---|
static java.lang.String |
ATTRIBUTE_ID
|
static java.lang.String |
DEFAULT_PREFIX
|
static java.lang.String |
ELEMENT_COLLECTION
|
static java.lang.String |
ELEMENT_DOCUMENT
|
static java.lang.String |
NAMESPACE
|
Method Summary | |
---|---|
void |
add(Document document)
Adds a document to the collection. |
void |
add(int position,
Document document)
Inserts a document into the collection at a specific position. |
void |
clear()
Removes all documents from this collection. |
boolean |
contains(Document document)
Checks if this collection contains a specific document. |
Document[] |
getDocuments()
Returns the documents in this collection. |
int |
getFirstPosition(Document document)
Returns the first position of this document in the collection. |
void |
remove(Document document)
Removes a document from the collection. |
void |
save()
Saves the XML source of this collection. |
int |
size()
Returns the number of documents in this collection. |
Methods inherited from interface org.apache.lenya.cms.publication.Document |
---|
exists, existsInAnyLanguage, getArea, getCompleteInfoURL, getCompleteURL, getCompleteURLWithoutLanguage, getDocumentURL, getDublinCore, getExtension, getFile, getId, getLabel, getLanguage, getLanguages, getLastModified, getName, getNodeId, getPublication |
Field Detail |
---|
static final java.lang.String NAMESPACE
static final java.lang.String DEFAULT_PREFIX
static final java.lang.String ELEMENT_COLLECTION
static final java.lang.String ELEMENT_DOCUMENT
static final java.lang.String ATTRIBUTE_ID
Method Detail |
---|
Document[] getDocuments() throws DocumentException
DocumentException
- when something went wrong.void add(Document document) throws DocumentException
document
- A document.
DocumentException
- when an error occurs.void add(int position, Document document) throws DocumentException
document
- A document.position
- The position of the document after insertion,
starting with 0.
DocumentException
- when something went wrong.void remove(Document document) throws DocumentException
document
- A document.
DocumentException
- when the document is not contained
or another error occurs.void clear() throws DocumentException
DocumentException
- when something went wrong.boolean contains(Document document) throws DocumentException
document
- The document to check.
DocumentException
- when something went wrong.int getFirstPosition(Document document) throws DocumentException
document
- The document.
DocumentException
- when the document is not contained.int size() throws DocumentException
DocumentException
- when something went wrong.void save() throws DocumentException
DocumentException
- when something went wrong.
|
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |