|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.gcube.contentmanagement.gcubemodellibrary.elements.BaseElement
org.gcube.contentmanagement.gcubemodellibrary.elements.GCubeDocument
public class GCubeDocument
A gCube Document.
This implementation if thread-unsafe. Where required, thread-safety is responsibility of clients.
Constructor Summary | |
---|---|
GCubeDocument()
Creates an instance. |
|
GCubeDocument(java.lang.String id)
Creates an instance that act as a proxy for a given document. |
|
GCubeDocument(java.lang.String id,
java.lang.String collectionID)
Creates an instance that act as a proxy for a given document in given collection. |
Method Summary | |
---|---|
InnerElements<GCubeAlternative> |
alternatives()
Returns the GCubeAlternative elements of the document for read and write access. |
AnnotationElements |
annotations()
Returns the GCubeAnnotation elements of the document for read and write access. |
java.lang.String |
collectionID()
Returns the identifier of the document's collection |
GDoc |
delta()
|
java.util.Map<java.lang.String,BaseInnerElement> |
elements()
Returns all the elements of the document, in no particular order. |
boolean |
equals(java.lang.Object obj)
|
int |
hashCode()
|
boolean |
isTracked()
|
MetadataElements |
metadata()
Returns the GCubeMetadata elements of the document for read and write access. |
InnerElements<GCubePart> |
parts()
Returns the GCubePart elements of the document for read and write access. |
void |
resetChanges()
|
void |
setCollectionID(java.lang.String id)
Sets the identifier of the document's collection. |
java.lang.String |
toString()
|
void |
trackChanges()
|
java.net.URI |
uri()
Returns the storage URI of the element. |
Methods inherited from class org.gcube.contentmanagement.gcubemodellibrary.elements.BaseElement |
---|
addProperty, bytestream, bytestreamURI, creationTime, id, isNew, language, lastUpdate, length, mimeType, name, properties, property, removeProperty, resolveBytestream, schemaName, schemaURI, setBytestream, setBytestream, setBytestream, setBytestreamURI, setLanguage, setLenght, setMimeType, setName, setSchemaName, setSchemaURI, setType, type |
Methods inherited from class java.lang.Object |
---|
getClass, notify, notifyAll, wait, wait, wait |
Constructor Detail |
---|
public GCubeDocument()
public GCubeDocument(java.lang.String id)
id
- the document identifier.public GCubeDocument(java.lang.String id, java.lang.String collectionID)
id
- the document identifier.collectionID
- the collection identifierMethod Detail |
---|
public java.lang.String collectionID()
public void setCollectionID(java.lang.String id) throws java.lang.IllegalArgumentException, java.lang.IllegalStateException
id
- the collection identifier
java.lang.IllegalArgumentException
- if the collection identifier is null
.
java.lang.IllegalStateException
- if the document has already a collection identifier.public java.net.URI uri() throws java.lang.IllegalStateException, java.net.URISyntaxException
java.lang.IllegalStateException
- if the element has no identifier or is not bound to a document.
java.net.URISyntaxException
- if the identifier of the element or its document cannot be used in a URI.public MetadataElements metadata()
GCubeMetadata
elements of the document for read and write access.
public AnnotationElements annotations()
GCubeAnnotation
elements of the document for read and write access.
public InnerElements<GCubePart> parts()
GCubePart
elements of the document for read and write access.
public InnerElements<GCubeAlternative> alternatives()
GCubeAlternative
elements of the document for read and write access.
public java.util.Map<java.lang.String,BaseInnerElement> elements()
public boolean isTracked()
public void trackChanges() throws java.lang.IllegalStateException, java.lang.Exception
java.lang.IllegalStateException
java.lang.Exception
public void resetChanges() throws java.lang.IllegalStateException
java.lang.IllegalStateException
public GDoc delta() throws java.lang.IllegalStateException, java.lang.Exception
java.lang.IllegalStateException
java.lang.Exception
public java.lang.String toString()
toString
in class BaseElement
public int hashCode()
hashCode
in class BaseElement
public boolean equals(java.lang.Object obj)
equals
in class BaseElement
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |