|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
This interface give the primitive operations that can be used for manipulation of semistructured data stored in a database. This interface is used to implement a module of a Semistructured Database Manager System for manipulating the primitive data operations, it has the purpose to be a base for the construction of higher level modules.
ssdbms.ssd
Method Summary | |
void |
add(ID parent,
Label childsLabel,
ID child)
Adds a labeled semistructured datum in other's content. |
void |
addSSDTable(Label name,
ID root)
Adds a SSD Table in the database. |
boolean |
belongs(ID child,
ID parent)
Checks if a given semistructured belongs to another given datum. |
void |
commit()
Commits the current Transaction and leaves the system ready to init another new. |
boolean |
contains(ID parent,
ID child)
Checks if a given semistructured datum owns another given datum in its content. |
boolean |
containsLabel(ID parent,
Label childLabel)
Checks if a given semistructured datum owns a specified label. |
ID |
createBLOB()
Creates a new primitive BLOB datum. |
ID |
createByteSequence(ByteSequenceValue value)
Creates a new primitive byte sequence datum. |
ID |
createCLOB()
Creates a new primitive CLOB datum. |
ID |
createInteger(IntegerValue value)
Creates a new primitive integer datum. |
ID |
createNonPrimitive()
Creates a new non primitive semistructured datum. |
ID |
createReal(RealValue value)
Creates a new primitive real datum. |
ID |
createString(StringValue value)
Creates a new primitive string datum. |
void |
drop(ID id)
Drops a semistructured datum giving its identifier. |
SetOfLabeledSSD |
getAllContent(ID parent)
Given a semistructured datum, this returns the semistructured data in its content. |
SSDValue |
getContent(ID id)
Returns the content of a specified datum in a SSDValue object. |
SetOfLabeledSSD |
getContentWithID(ID parent,
ID child)
Given a semistructured datum, this returns the semistructured data in its content with the specified identifier. |
SetOfLabeledSSD |
getContentWithLabel(ID parent,
Label childLabel)
Given a semistructured datum, this returns the semistructured data in its content with the specified label. |
SetOfID |
getParents(ID id)
Returns the parents of a given semistructured datum. |
ID |
getRoot(Label name)
Returns the identifier of the semistructured datum which is the root of the SSD-Table. |
int |
getType(ID id)
Returns the kind of this semistructured datum. |
boolean |
isPrimitive(ID id)
Checks if a semistructured datum with a given identifier is primitive or not. |
void |
remove(ID parent,
Label childsLabel,
ID child)
Removes a labeled semistructured datum from other's content. |
void |
removeID(ID parent,
ID child)
Removes a datum from other's content. |
void |
removeLabel(ID parent,
Label childsLabel)
Removes all subdata from a specified datum with a given label. |
void |
removeSSDTable(Label name)
Removes a SSD-Table from the database. |
void |
removeSSDTablesWithID(ID id)
Removes the SSD-Tables whith the specified datum. |
void |
rollback()
Rollbacks the current Transaction and leaves the system ready to init another new. |
Method Detail |
public void commit() throws FatalErrorException
FatalErrorException
public void rollback() throws FatalErrorException
FatalErrorException
public ID createNonPrimitive() throws BadFunctionException, FatalErrorException
BadFunctionException
FatalErrorException
public ID createInteger(IntegerValue value) throws BadFunctionException, FatalErrorException
value
- The integer value of the semistructured datum to be created.
BadFunctionException
FatalErrorException
public ID createReal(RealValue value) throws BadFunctionException, FatalErrorException
value
- The real value of the semistructured datum to be created.
BadFunctionException
FatalErrorException
public ID createString(StringValue value) throws BadFunctionException, FatalErrorException
value
- The string value of the semistructured datum to be created.
BadFunctionException
FatalErrorException
public ID createByteSequence(ByteSequenceValue value) throws BadFunctionException, FatalErrorException
value
- The byte sequence value of the semistructured datum to be created.
BadFunctionException
FatalErrorException
public ID createBLOB() throws BadFunctionException, FatalErrorException
BadFunctionException
FatalErrorException
public ID createCLOB() throws BadFunctionException, FatalErrorException
BadFunctionException
FatalErrorException
public int getType(ID id) throws BadFunctionException, NotExistingDatumException, FatalErrorException
id
- The identifier of the datum to check.
BadFunctionException
NotExistingDatumException
FatalErrorException
SSDValue.NON_PRIMITIVE
,
SSDValue.INTEGER
,
SSDValue.REAL
,
SSDValue.STRING
,
SSDValue.BYTE_SEQUENCE
,
SSDValue.BLOB
,
SSDValue.CLOB
public SSDValue getContent(ID id) throws NotExistingDatumException, BadFunctionException, FatalErrorException
SSDValue
object.
id
- The identifier of the datum to get the content.
SSDValue
.
Returns a SetOfLabeledSSD
if the datum in non primitive.
Returns a IntegerValue
if the datum is an integer number.
Returns a RealValue
if the datum is a real number.
Returns a StringValue
if the datum is a string.
Returns a ByteSequenceValue
if the datum is a byte sequence.
Returns a BLOBManager
if the datum is BLOB.
Returns a CLOBManager
if the datum is CLOB.
NotExistingDatumException
BadFunctionException
FatalErrorException
public boolean isPrimitive(ID id) throws BadFunctionException, NotExistingDatumException, FatalErrorException
id
- The datum's identifier to be checked.
true
if the datum is primitive, false
otherwise.
BadFunctionException
NotExistingDatumException
FatalErrorException
public void add(ID parent, Label childsLabel, ID child) throws NotExistingDatumException, InvalidDatumOperationException, BadFunctionException, FatalErrorException
parent
- The identifier of the semistructured datum which its content will be modified,
this has to be non-primitive.childsLabel
- The label of the datum to be added.child
- The identifier of the datum to be added.
NotExistingDatumException
InvalidDatumOperationException
BadFunctionException
FatalErrorException
public void remove(ID parent, Label childsLabel, ID child) throws BadFunctionException, NotExistingDatumException, InvalidDatumOperationException, FatalErrorException
parent
- The identifier of the semistructured datum which its content will be modified.childsLabel
- The label of the datum to be removed.child
- The identifier of the datum to be removed.
BadFunctionException
NotExistingDatumException
InvalidDatumOperationException
FatalErrorException
public void removeID(ID parent, ID child) throws BadFunctionException, NotExistingDatumException, InvalidDatumOperationException, FatalErrorException
parent
- The identifier of the semistructured datum which its content will be modified.child
- The identifier of the datum to be removed.
BadFunctionException
NotExistingDatumException
InvalidDatumOperationException
FatalErrorException
public void removeLabel(ID parent, Label childsLabel) throws NotExistingDatumException, InvalidDatumOperationException, BadFunctionException, FatalErrorException
parent
- The identifier of the semistructured datum which its content will be modified.childsLabel
- The label of the data to be removed.
NotExistingDatumException
InvalidDatumOperationException
BadFunctionException
FatalErrorException
public boolean contains(ID parent, ID child) throws BadFunctionException, NotExistingDatumException, FatalErrorException
parent
- The datum's identifier which content will be analized.child
- The datum's identifier will be searched in parent
's content.
true
if child
is in parents
's content,
false
otherwise. Note: If parent
is primitive this method
returns false.
BadFunctionException
NotExistingDatumException
FatalErrorException
public boolean belongs(ID child, ID parent) throws BadFunctionException, NotExistingDatumException, FatalErrorException
child
- The datum's identifier will be searched in parent
's content.parent
- The datum's identifier which content will be analized.
true
if child
is in parents
's content,
false
otherwise. Note: If parent
is primitive this method
returns false.
BadFunctionException
NotExistingDatumException
FatalErrorException
public boolean containsLabel(ID parent, Label childLabel) throws BadFunctionException, NotExistingDatumException, FatalErrorException
parent
- The datum's identifier which content will be analized.childLabel
- The label to be searched in parent
's content.
true
if childLabel
is in parents
's content,
false
otherwise. Note: If parent
is primitive this method
returns false.
BadFunctionException
NotExistingDatumException
FatalErrorException
public void addSSDTable(Label name, ID root) throws NotExistingDatumException, AlreadyDefinedSSDTableException, BadFunctionException, FatalErrorException
name
- The name of the new table.root
- The identifier of the semistructured datum which will be the root of
the new SSD-Table.
NotExistingDatumException
AlreadyDefinedSSDTableException
BadFunctionException
FatalErrorException
public ID getRoot(Label name) throws BadFunctionException, NotDefinedSSDTableException, FatalErrorException
name
- The name of the SSD-Table to get its root.
BadFunctionException
NotDefinedSSDTableException
FatalErrorException
public void removeSSDTable(Label name) throws BadFunctionException, NotDefinedSSDTableException, FatalErrorException
name
- The name of the SSD-Table to be removed.
BadFunctionException
NotDefinedSSDTableException
FatalErrorException
public void removeSSDTablesWithID(ID id) throws NotExistingDatumException, NotDefinedSSDTableException, BadFunctionException, FatalErrorException
id
- The identifier of the root of the SSD-Tables to be removed.
NotExistingDatumException
NotDefinedSSDTableException
BadFunctionException
FatalErrorException
public void drop(ID id) throws NotExistingDatumException, NotIsolatedDatumException, BadFunctionException, FatalErrorException
id
- The identifier of the semistructured datum to be dropped.
NotExistingDatumException
NotIsolatedDatumException
BadFunctionException
FatalErrorException
public SetOfID getParents(ID id) throws NotExistingDatumException, BadFunctionException, FatalErrorException
id
- The datum's identifier to obtain its parents.
NotExistingDatumException
BadFunctionException
FatalErrorException
public SetOfLabeledSSD getContentWithID(ID parent, ID child) throws NotExistingDatumException, InvalidDatumOperationException, BadFunctionException, FatalErrorException
parent
- The datum's identifier which its content will be analized.child
- The datum to search in parent
's content.
parent
's content with
the child
identifier.
NotExistingDatumException
InvalidDatumOperationException
BadFunctionException
FatalErrorException
public SetOfLabeledSSD getContentWithLabel(ID parent, Label childLabel) throws NotExistingDatumException, InvalidDatumOperationException, BadFunctionException, FatalErrorException
parent
- The datum's identifier which its content will be analized.childLabel
- The label which data of parent
's content
must match to be returned.
parent
's content labeled
as childrenLabel
.
NotExistingDatumException
InvalidDatumOperationException
BadFunctionException
FatalErrorException
public SetOfLabeledSSD getAllContent(ID parent) throws NotExistingDatumException, InvalidDatumOperationException, BadFunctionException, FatalErrorException
parent
- The datum's identifier which its content will be analized.
parent
's content.
NotExistingDatumException
InvalidDatumOperationException
BadFunctionException
FatalErrorException
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |