Package io.keikai.doc.collab.structs
Class ContentDoc
- java.lang.Object
-
- io.keikai.doc.collab.structs.AbstractContent
-
- io.keikai.doc.collab.structs.ContentDoc
-
public class ContentDoc extends AbstractContent
-
-
Constructor Summary
Constructors Constructor Description ContentDoc(Doc doc)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description ContentDoccopy()Creates a copy of this content.voiddelete(Transaction transaction)Deletes this content from a transaction.voidgc(StructStore store)Performs garbage collection on this content.java.util.List<java.lang.Object>getContent()DocgetDoc()intgetLength()java.util.Map<java.lang.String,java.lang.Object>getOpts()intgetRef()voidintegrate(Transaction transaction, Item item)Integrates this content into a transaction.booleanisCountable()Should return false if this Item is some kind of meta information (e.g. format information)booleanmergeWith(ContentDoc right)static ContentDocreadContentDoc(UpdateDecoder decoder)Static method to read ContentDoc from a decodervoidsetDoc(Doc doc)voidsetOpts(java.util.Map<java.lang.String,java.lang.Object> opts)ContentDocsplice(int offset)Splices the content at the specified offset.voidwrite(UpdateEncoder encoder, int offset)Writes this content to an encoder.-
Methods inherited from class io.keikai.doc.collab.structs.AbstractContent
mergeWith
-
-
-
-
Constructor Detail
-
ContentDoc
public ContentDoc(Doc doc)
- Parameters:
doc-
-
-
Method Detail
-
getDoc
public Doc getDoc()
-
setDoc
public void setDoc(Doc doc)
-
getOpts
public java.util.Map<java.lang.String,java.lang.Object> getOpts()
-
setOpts
public void setOpts(java.util.Map<java.lang.String,java.lang.Object> opts)
-
getLength
public int getLength()
- Overrides:
getLengthin classAbstractContent- Returns:
- int
-
getContent
public java.util.List<java.lang.Object> getContent()
- Overrides:
getContentin classAbstractContent- Returns:
- List
-
isCountable
public boolean isCountable()
Description copied from class:AbstractContentShould return false if this Item is some kind of meta information (e.g. format information). * Whether this Item should be addressable via `yarray.get(i)` * Whether this Item should be counted when computing yarray.length- Overrides:
isCountablein classAbstractContent- Returns:
- boolean
-
copy
public ContentDoc copy()
Description copied from class:AbstractContentCreates a copy of this content.- Overrides:
copyin classAbstractContent- Returns:
- ContentDoc
-
splice
public ContentDoc splice(int offset)
Description copied from class:AbstractContentSplices the content at the specified offset.- Overrides:
splicein classAbstractContent- Parameters:
offset-- Returns:
- ContentDoc
-
mergeWith
public boolean mergeWith(ContentDoc right)
- Parameters:
right-- Returns:
- boolean
-
integrate
public void integrate(Transaction transaction, Item item)
Description copied from class:AbstractContentIntegrates this content into a transaction.- Overrides:
integratein classAbstractContent- Parameters:
transaction-item-
-
delete
public void delete(Transaction transaction)
Description copied from class:AbstractContentDeletes this content from a transaction.- Overrides:
deletein classAbstractContent- Parameters:
transaction-
-
gc
public void gc(StructStore store)
Description copied from class:AbstractContentPerforms garbage collection on this content.- Overrides:
gcin classAbstractContent- Parameters:
store-
-
write
public void write(UpdateEncoder encoder, int offset)
Description copied from class:AbstractContentWrites this content to an encoder.- Overrides:
writein classAbstractContent- Parameters:
encoder-offset-
-
getRef
public int getRef()
- Overrides:
getRefin classAbstractContent- Returns:
- int
-
readContentDoc
public static ContentDoc readContentDoc(UpdateDecoder decoder)
Static method to read ContentDoc from a decoder- Parameters:
decoder-- Returns:
- ContentDoc
-
-