com.vm.mind
Class MIAnything

java.lang.Object
  |
  +--com.vm.mind.MIAnything
All Implemented Interfaces:
ORObject
Direct Known Subclasses:
MIAction, MIContent, MIIdea, MIList, MIProperty, MIStream, MIThing, MIWorld, VM3DObject, VM3DReference, VMSurface

public class MIAnything
extends java.lang.Object
implements ORObject


Field Summary
static int IS_ERROR
           
static int IS_LINK
           
static int IS_LIST
           
static int IS_SHARED
           
static int IS_SYSTEM
           
static int IS_VALUE
           
protected  boolean m_valid
           
 
Constructor Summary
MIAnything()
           
 
Method Summary
 boolean delThing(java.lang.String i_name, MIThing i_thing)
          Should override this method defined at ORObject (not done yet). Sets Thing property to null (invalid) value or removes it from List property in case if property is List of Things.
 java.lang.String dump(java.lang.String i_indent, java.lang.String i_linefeed, int i_count, int i_type)
          Dumps Anything/Thing to string
 java.lang.String fullDump()
           
 int getCount()
          Returns number of properties of given Anything/Thing
 java.lang.String getKey(java.lang.String i_name)
           
 MIList getList(java.lang.String i_name)
          Returns list presentating property by name if property is list of Things
 java.lang.String getName()
          Returns name of given Thing (if thing assumes name presense)
 java.lang.String getName(int i_namenumber)
          Returns name of property by given number (0<=number
 java.lang.String getQuery()
          Returns ORL query to be used in order to access given Thing
 java.lang.String getString(java.lang.String i_name)
          Returns string presentation of property by name if property is not Thing or list
 MIThing getThing(java.lang.String i_name)
          Returns Thing presentation of property by name if property is Thing but not a list of Things
 int getType()
          Should override this method defined at ORObject (not done yet)
 int getType(java.lang.String i_name)
          Returns bitmask of property type.
 boolean is(java.lang.String i_name)
           
 boolean load(MIWorld i_world, MIStream i_stream)
          Loads Anything/Thing from into Stream into World
 void message(java.lang.String m)
          Sends notification message in any way ad format dependent on actual Anything
 boolean setString(java.lang.String i_name, java.lang.String i_string)
          Assigns string value to property by name if property is not Thing or list
 boolean SetString(java.lang.String i_name, java.lang.String i_string)
           
 boolean setThing(java.lang.String i_name, MIThing i_thing)
          Assigns Thing value to property by name if property Thing or list.
 boolean SetThing(java.lang.String i_name, MIThing i_thing)
           
 java.lang.String toString()
           
 boolean valid()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

m_valid

protected boolean m_valid

IS_ERROR

public static final int IS_ERROR

IS_VALUE

public static final int IS_VALUE

IS_LINK

public static final int IS_LINK

IS_SHARED

public static final int IS_SHARED

IS_LIST

public static final int IS_LIST

IS_SYSTEM

public static final int IS_SYSTEM
Constructor Detail

MIAnything

public MIAnything()
Method Detail

message

public void message(java.lang.String m)
Sends notification message in any way ad format dependent on actual Anything

getKey

public java.lang.String getKey(java.lang.String i_name)
Returns:
key value for given key expression to be used in indexing Hashtable in indexed Lists

getType

public int getType(java.lang.String i_name)
Description copied from interface: ORObject
Returns bitmask of property type. Possible values are IS_VALUE, IS_LINK, IS_LINK|IS_LIST
Specified by:
getType in interface ORObject
See Also:
ORObject

getType

public int getType()
Should override this method defined at ORObject (not done yet)
Returns:
type of given Antyhing

valid

public boolean valid()
Returns:
true if every property is filled in properly, false otherwise

is

public boolean is(java.lang.String i_name)
Returns:
true if given Anything is subclass (instance) of another Thing named by given name

getString

public java.lang.String getString(java.lang.String i_name)
Description copied from interface: ORObject
Returns string presentation of property by name if property is not Thing or list
Specified by:
getString in interface ORObject
See Also:
ORObject

getThing

public MIThing getThing(java.lang.String i_name)
Description copied from interface: ORObject
Returns Thing presentation of property by name if property is Thing but not a list of Things
Specified by:
getThing in interface ORObject
See Also:
ORObject

getList

public MIList getList(java.lang.String i_name)
Description copied from interface: ORObject
Returns list presentating property by name if property is list of Things
Specified by:
getList in interface ORObject
See Also:
ORObject

getName

public java.lang.String getName()
Description copied from interface: ORObject
Returns name of given Thing (if thing assumes name presense)
Specified by:
getName in interface ORObject
See Also:
ORObject

setString

public boolean setString(java.lang.String i_name,
                         java.lang.String i_string)
Description copied from interface: ORObject
Assigns string value to property by name if property is not Thing or list
Specified by:
setString in interface ORObject
See Also:
ORObject

setThing

public boolean setThing(java.lang.String i_name,
                        MIThing i_thing)
Description copied from interface: ORObject
Assigns Thing value to property by name if property Thing or list. In case of list, it adds input Thing to list of Things.
Specified by:
setThing in interface ORObject
See Also:
ORObject

delThing

public boolean delThing(java.lang.String i_name,
                        MIThing i_thing)
Should override this method defined at ORObject (not done yet).

Sets Thing property to null (invalid) value or removes it from List property in case if property is List of Things.

Parameters:
i_name - - name of Thing to remove named thing or keyvalue to remove thing from indexed list
i_thing - - actual Thing to be removed from list property
Returns:
type of given Antyhing

load

public boolean load(MIWorld i_world,
                    MIStream i_stream)
Description copied from interface: ORObject
Loads Anything/Thing from into Stream into World
Specified by:
load in interface ORObject
See Also:
ORObject

getCount

public int getCount()
Description copied from interface: ORObject
Returns number of properties of given Anything/Thing
Specified by:
getCount in interface ORObject
See Also:
ORObject

getName

public java.lang.String getName(int i_namenumber)
Description copied from interface: ORObject
Returns name of property by given number (0<=number
Specified by:
getName in interface ORObject
See Also:
ORObject

toString

public java.lang.String toString()
Overrides:
toString in class java.lang.Object
See Also:
Object, ORObject

fullDump

public java.lang.String fullDump()

dump

public java.lang.String dump(java.lang.String i_indent,
                             java.lang.String i_linefeed,
                             int i_count,
                             int i_type)
Description copied from interface: ORObject
Dumps Anything/Thing to string
Specified by:
dump in interface ORObject
See Also:
ORObject

getQuery

public java.lang.String getQuery()
Description copied from interface: ORObject
Returns ORL query to be used in order to access given Thing
Specified by:
getQuery in interface ORObject
See Also:
ORObject

SetString

public boolean SetString(java.lang.String i_name,
                         java.lang.String i_string)

SetThing

public boolean SetThing(java.lang.String i_name,
                        MIThing i_thing)