|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectiitb.con.ds.TypeTable
public class TypeTable
TypeTable holds the Type as value objects. The super key is the type id and the sub key is the type name. In the case both super and sub key act at the same level.
Types are managed in the concept-net in the .meta file.
Type| Constructor Summary | |
|---|---|
TypeTable(java.lang.String fileName,
java.lang.String mode)
Initializes the type table |
|
| Method Summary | |
|---|---|
void |
close()
Close the file associate with the table |
void |
commit()
Commits the types to the respective file |
Type |
get(java.lang.Short id)
Gets the Type for the specified type id |
Type |
get(java.lang.String name,
java.lang.Short id)
Gets the Type for the specified type name or type id |
java.util.List<Type> |
getAllItems()
Gets all the types from the type table |
java.lang.Object |
getObject(java.lang.Object o)
Return NULL, since there is no implementation for this |
boolean |
hasType(java.lang.String name)
Returns true if type present in the table |
void |
put(java.lang.String name,
java.lang.Short id,
Type type)
Puts the given Type into the Type table with type name and type id as key. |
void |
put(java.lang.String name,
Type type)
Puts the given Type into the Type table with type name as key |
void |
put(Type type)
Puts the given Type into the Type table |
boolean |
remove(java.lang.Short id)
Removes the Type with specified type id |
boolean |
remove(java.lang.String name,
java.lang.Short id)
Removes the Type with specified type name or type id |
int |
size()
Returns the size of the table i.e. |
| Methods inherited from class java.lang.Object |
|---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Methods inherited from interface iitb.con.ds.ItemTable |
|---|
get |
| Constructor Detail |
|---|
public TypeTable(java.lang.String fileName,
java.lang.String mode)
throws java.io.FileNotFoundException,
java.io.IOException
fileName - .meta file namemode - opening mode (r, rw)
java.io.FileNotFoundException - if file not found
java.io.IOException - if file operation fails| Method Detail |
|---|
public void close()
throws java.io.IOException
close in interface ItemTable<java.lang.String,java.lang.Short,Type>java.io.IOException - if file operations fail
public void commit()
throws java.io.IOException
commit in interface ItemTable<java.lang.String,java.lang.Short,Type>java.io.IOException - if file operations failpublic Type get(java.lang.Short id)
get in interface ItemTable<java.lang.String,java.lang.Short,Type>id - type id
Type
public Type get(java.lang.String name,
java.lang.Short id)
get in interface ItemTable<java.lang.String,java.lang.Short,Type>name - type nameid - type id
Typepublic java.util.List<Type> getAllItems()
getAllItems in interface ItemTable<java.lang.String,java.lang.Short,Type>Typepublic java.lang.Object getObject(java.lang.Object o)
getObject in interface ItemTable<java.lang.String,java.lang.Short,Type>o - key object
public boolean hasType(java.lang.String name)
name - type name
public void put(java.lang.String name,
java.lang.Short id,
Type type)
put in interface ItemTable<java.lang.String,java.lang.Short,Type>name - type nameid - type idtype - TypeType
public void put(java.lang.String name,
Type type)
put in interface ItemTable<java.lang.String,java.lang.Short,Type>name - type nametype - TypeTypepublic void put(Type type)
put in interface ItemTable<java.lang.String,java.lang.Short,Type>type - TypeTypepublic boolean remove(java.lang.Short id)
remove in interface ItemTable<java.lang.String,java.lang.Short,Type>id - type id
public boolean remove(java.lang.String name,
java.lang.Short id)
remove in interface ItemTable<java.lang.String,java.lang.Short,Type>name - type nameid - type id
public int size()
size in interface ItemTable<java.lang.String,java.lang.Short,Type>
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||