com.unister.semweb.drums.storable
Class GeneralStructure

java.lang.Object
  extended by com.unister.semweb.drums.storable.GeneralStructure
All Implemented Interfaces:
java.io.Serializable

public class GeneralStructure
extends java.lang.Object
implements java.io.Serializable

This class represents the structure of one GeneralStorable-Type. It is comparable with a "Create Table" in other databases.

Author:
Martin Nettling
See Also:
Serialized Form

Nested Class Summary
static class GeneralStructure.Basic_Field_Types
          All allowed basic types.
 
Constructor Summary
GeneralStructure()
           
 
Method Summary
 boolean addKeyPart(java.lang.String name, GeneralStructure.Basic_Field_Types type)
          Adds a new KeyPart.
 boolean addKeyPart(java.lang.String name, int size)
          Adds a new KeyPart
 boolean addValuePart(java.lang.String name, GeneralStructure.Basic_Field_Types type)
          Adds a new ValuePart.
 boolean addValuePart(java.lang.String name, int size)
          Adds a new ValuePart
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

GeneralStructure

public GeneralStructure()
Method Detail

addValuePart

public boolean addValuePart(java.lang.String name,
                            int size)
                     throws java.io.IOException
Adds a new ValuePart

Parameters:
name - the name of the key part. With this name you can access this part
size - the size of the key part in bytes
Returns:
true if adding the value part was successful
Throws:
java.io.IOException

addValuePart

public boolean addValuePart(java.lang.String name,
                            GeneralStructure.Basic_Field_Types type)
                     throws java.io.IOException
Adds a new ValuePart. This is a wrapper method for addKeyPart(String, int).

Parameters:
name - the name of the key part. With this name you can access this part
type - the type of the key part.
Returns:
true if adding the value part was successful
Throws:
java.io.IOException

addKeyPart

public boolean addKeyPart(java.lang.String name,
                          int size)
                   throws java.io.IOException
Adds a new KeyPart

Parameters:
name - the name of the key part. With this name you can access this part
size - the size of the key part in bytes
Returns:
true if adding the key part was successful
Throws:
java.io.IOException

addKeyPart

public boolean addKeyPart(java.lang.String name,
                          GeneralStructure.Basic_Field_Types type)
                   throws java.io.IOException
Adds a new KeyPart. This is a wrapper method for addKeyPart(String, int).

Parameters:
name - the name of the key part. With this name you can access this part
type - the type of the key part.
Returns:
true if adding the key part was successful
Throws:
java.io.IOException