org.ontobox.box.base
Class BaseBoxWriter

java.lang.Object
  extended by org.ontobox.box.base.BaseBoxWriter
All Implemented Interfaces:
BoxWriter
Direct Known Subclasses:
FastBoxWriter

public abstract class BaseBoxWriter
extends java.lang.Object
implements BoxWriter

Author:
Anton Malykh

Field Summary
protected  BaseBoxWorker worker
           
 
Constructor Summary
protected BaseBoxWriter(BaseBoxWorker worker)
           
 
Method Summary
 void addBoolean(int object, int tprop, boolean value)
           
 void addBoolean(int object, int tprop, int index, boolean value)
          Add boolean TProperty value
 void addDateTime(int object, int tprop, java.util.Date value)
           
 void addDateTime(int object, int tprop, int index, java.util.Date value)
          Add date-time TProperty value
 void addInt(int object, int tprop, int value)
           
 void addInt(int object, int tprop, int index, int value)
          Add int TProperty value
 void addLong(int object, int tprop, int index, long value)
          Add long TProperty value
 void addLong(int object, int tprop, long value)
           
 void addObject(int object, int oprop, int value)
           
 void addString(int object, int tprop, java.lang.String value)
           
 void annotate(int id, java.lang.String name, java.lang.String value)
           
protected abstract  void annotateForEntity(int id, java.lang.String name, java.lang.String value)
           
 void delete(int id)
          Delete the entity.
protected abstract  void deleteForClass(int id)
           
protected abstract  void deleteForObject(int id)
           
protected abstract  void deleteForOntology(int id)
           
protected abstract  void deleteForOProperty(int id)
           
protected abstract  void deleteForTProperty(int id)
           
protected abstract  void deleteForType(int id)
           
protected abstract  void domainForOProperty(int prop, java.lang.Integer domain)
           
protected abstract  void domainForTProperty(int prop, java.lang.Integer domain)
           
 java.lang.String newName(int ont)
           
protected abstract  void rangeForOProperty(int prop, java.lang.Integer range)
           
protected abstract  void rangeForTProperty(int prop, java.lang.Integer range)
           
 void removeValue(int object, int prop, int index)
           
protected abstract  void removeValueForOProperty(int object, int prop, int index)
           
protected abstract  void removeValueForTProperty(int object, int prop, int index)
           
 void removeValues(int name)
           
 void removeValues(int object, int prop)
           
 void rename(int id, java.lang.String newFn)
           
protected abstract  void renameNamedEntity(int id, java.lang.String newFn)
           
protected abstract  void renameOntology(int id, java.lang.String newFn)
           
 void setDomain(int prop, java.lang.Integer domain)
           
 void setRange(int prop, java.lang.Integer range)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface org.ontobox.box.BoxWriter
addObject, addObjectClass, addString, addSubclass, newClass, newObject, newOntology, newOProperty, newTProperty, newType, removeObjectClass
 

Field Detail

worker

protected BaseBoxWorker worker
Constructor Detail

BaseBoxWriter

protected BaseBoxWriter(BaseBoxWorker worker)
Method Detail

newName

public java.lang.String newName(int ont)
Specified by:
newName in interface BoxWriter

domainForTProperty

protected abstract void domainForTProperty(int prop,
                                           java.lang.Integer domain)

domainForOProperty

protected abstract void domainForOProperty(int prop,
                                           java.lang.Integer domain)

setDomain

public void setDomain(int prop,
                      java.lang.Integer domain)
Specified by:
setDomain in interface BoxWriter

rangeForTProperty

protected abstract void rangeForTProperty(int prop,
                                          java.lang.Integer range)

rangeForOProperty

protected abstract void rangeForOProperty(int prop,
                                          java.lang.Integer range)

setRange

public void setRange(int prop,
                     java.lang.Integer range)
Specified by:
setRange in interface BoxWriter

removeValueForTProperty

protected abstract void removeValueForTProperty(int object,
                                                int prop,
                                                int index)

removeValueForOProperty

protected abstract void removeValueForOProperty(int object,
                                                int prop,
                                                int index)

removeValue

public void removeValue(int object,
                        int prop,
                        int index)
Specified by:
removeValue in interface BoxWriter

removeValues

public void removeValues(int object,
                         int prop)
Specified by:
removeValues in interface BoxWriter

removeValues

public void removeValues(int name)
Specified by:
removeValues in interface BoxWriter

deleteForType

protected abstract void deleteForType(int id)

deleteForClass

protected abstract void deleteForClass(int id)

deleteForObject

protected abstract void deleteForObject(int id)

deleteForOntology

protected abstract void deleteForOntology(int id)

deleteForOProperty

protected abstract void deleteForOProperty(int id)

deleteForTProperty

protected abstract void deleteForTProperty(int id)

delete

public void delete(int id)
Description copied from interface: BoxWriter
Delete the entity. If the entity is an object, all object's property values must be removed, object must

Specified by:
delete in interface BoxWriter

renameOntology

protected abstract void renameOntology(int id,
                                       java.lang.String newFn)

renameNamedEntity

protected abstract void renameNamedEntity(int id,
                                          java.lang.String newFn)

rename

public void rename(int id,
                   java.lang.String newFn)
Specified by:
rename in interface BoxWriter

annotateForEntity

protected abstract void annotateForEntity(int id,
                                          java.lang.String name,
                                          java.lang.String value)

annotate

public void annotate(int id,
                     java.lang.String name,
                     java.lang.String value)
Specified by:
annotate in interface BoxWriter

addObject

public void addObject(int object,
                      int oprop,
                      int value)
Specified by:
addObject in interface BoxWriter

addString

public void addString(int object,
                      int tprop,
                      java.lang.String value)
Specified by:
addString in interface BoxWriter

addInt

public void addInt(int object,
                   int tprop,
                   int value)
Specified by:
addInt in interface BoxWriter

addInt

public void addInt(int object,
                   int tprop,
                   int index,
                   int value)
Description copied from interface: BoxWriter
Add int TProperty value

Specified by:
addInt in interface BoxWriter
Parameters:
object - object id
tprop - tproperty id
index - index, or -1
value - int value

addLong

public void addLong(int object,
                    int tprop,
                    long value)
Specified by:
addLong in interface BoxWriter

addLong

public void addLong(int object,
                    int tprop,
                    int index,
                    long value)
Description copied from interface: BoxWriter
Add long TProperty value

Specified by:
addLong in interface BoxWriter
Parameters:
object - object id
tprop - tproperty id
index - index, or -1
value - long value

addDateTime

public void addDateTime(int object,
                        int tprop,
                        java.util.Date value)
Specified by:
addDateTime in interface BoxWriter

addDateTime

public void addDateTime(int object,
                        int tprop,
                        int index,
                        java.util.Date value)
Description copied from interface: BoxWriter
Add date-time TProperty value

Specified by:
addDateTime in interface BoxWriter
Parameters:
object - object id
tprop - tproperty id
index - index, or -1
value - date-time value

addBoolean

public void addBoolean(int object,
                       int tprop,
                       boolean value)
Specified by:
addBoolean in interface BoxWriter

addBoolean

public void addBoolean(int object,
                       int tprop,
                       int index,
                       boolean value)
Description copied from interface: BoxWriter
Add boolean TProperty value

Specified by:
addBoolean in interface BoxWriter
Parameters:
object - object id
tprop - tproperty id
index - index, or -1
value - boolean value