ch.interlis.iom
Interface IomObject


public interface IomObject

defines the generic object.

The most important functions are: To test, if a property is primitve or structured, use

if(obj.getattrvalue("attrname")==null){
     IomObject struct=obj.getattrobj("attrname",0);
}

Version:
$Revision: 1.0 $ $Date: 11.04.2006 $
Author:
ce

Method Summary
 void addattrobj(java.lang.String attrName, IomObject value)
          appends a new value to an indexed attribute with a structured type.
 IomObject addattrobj(java.lang.String attrName, java.lang.String type)
          Deprecated.  
 void changeattrobj(java.lang.String attrName, int index, IomObject value)
          changes the value of an indexed attribute with a structured type.
 IomObject changeattrobj(java.lang.String attrName, int index, java.lang.String type)
          Deprecated.  
 void delete()
          Deprecated.  
 void deleteattrobj(java.lang.String attrName, int index)
          removes a value from an indexed attibute with a structured type.
 int getattrcount()
          gets the number of attributes of this object.
 java.lang.String getattrname(int index)
          gets an attribute name.
 IomObject getattrobj(java.lang.String attrName, int index)
          gets the value of an indexed attribute with a structured type.
 java.lang.String getattrprim(java.lang.String attrName, int index)
          gets the value of an indexed attribute with a primitive type.
 java.lang.String getattrvalue(java.lang.String attrName)
          gets the value of an attribute with a primitive type.
 int getattrvaluecount(java.lang.String attrName)
          gets the number of values of a given attribute.
 int getobjectcol()
          gets the column of the object in the file, if read from a file.
 int getobjectconsistency()
          Deprecated.  
 int getobjectline()
          gets the line of the object in the file, if read from a file.
 java.lang.String getobjectoid()
          gets the identifier of the object.
 int getobjectoperation()
          Deprecated.  
 java.lang.String getobjectrefbid()
          gets the identifier of the basket containing the referenced object, if this object is a reference value.
 java.lang.String getobjectrefoid()
          gets the identifier of the referenced object, if this object is a reference value.
 long getobjectreforderpos()
          gets the ordering index, if this object is a reference value of an ordered relationship.
 java.lang.String getobjecttag()
          gets the type of the object.
 java.lang.String getxmleleattrname(int xmlEleIndex)
          Deprecated.  
 int getxmlelecount()
          Deprecated.  
 IomObject getxmleleobj(int xmlEleIndex)
          Deprecated.  
 java.lang.String getxmleleprim(int xmlEleIndex)
          Deprecated.  
 int getxmlelevalueidx(int xmlEleIndex)
          Deprecated.  
 void insertattrobj(java.lang.String attrName, int index, IomObject value)
          inserts a new value to an indexed attribute with a structured type.
 IomObject insertattrobj(java.lang.String attrName, int index, java.lang.String type)
          Deprecated.  
 void setattrundefined(java.lang.String attrName)
          Removes any values for a given attribute.
 void setattrvalue(java.lang.String attrName, java.lang.String value)
          sets the value of an attribute with a primitve type.
 void setobjectcol(int col)
          sets the column of the object in the file, if read from a file.
 void setobjectconsistency(int consistency)
          Deprecated.  
 void setobjectline(int line)
          sets the line of the object in the file, if read from a file.
 void setobjectoid(java.lang.String oid)
          sets the identifier of the object.
 void setobjectoperation(int operation)
          Deprecated.  
 void setobjectrefbid(java.lang.String refbid)
          sets the identifier of the basket containing the referenced object, if this object is a reference value.
 void setobjectrefoid(java.lang.String refoid)
          sets the identifier of the referenced object, if this object is a reference value.
 void setobjectreforderpos(long orderPos)
          sets the ordering index, if this object is a reference value of an ordered relationship.
 void setobjecttag(java.lang.String tag)
          sets the type of the object.
 

Method Detail

delete

void delete()
Deprecated. 

disposes the underlying native object.


getobjectline

int getobjectline()
gets the line of the object in the file, if read from a file.


setobjectline

void setobjectline(int line)
sets the line of the object in the file, if read from a file.


getobjectcol

int getobjectcol()
gets the column of the object in the file, if read from a file.


setobjectcol

void setobjectcol(int col)
sets the column of the object in the file, if read from a file.


getobjecttag

java.lang.String getobjecttag()
gets the type of the object.


setobjecttag

void setobjecttag(java.lang.String tag)
sets the type of the object.


getobjectoid

java.lang.String getobjectoid()
gets the identifier of the object.


setobjectoid

void setobjectoid(java.lang.String oid)
sets the identifier of the object.


getobjectrefoid

java.lang.String getobjectrefoid()
gets the identifier of the referenced object, if this object is a reference value.


setobjectrefoid

void setobjectrefoid(java.lang.String refoid)
sets the identifier of the referenced object, if this object is a reference value.


getobjectrefbid

java.lang.String getobjectrefbid()
gets the identifier of the basket containing the referenced object, if this object is a reference value.


setobjectrefbid

void setobjectrefbid(java.lang.String refbid)
sets the identifier of the basket containing the referenced object, if this object is a reference value.


getobjectreforderpos

long getobjectreforderpos()
gets the ordering index, if this object is a reference value of an ordered relationship. In ordered relationships the attribute ORDER_POS (value > 0!) defines the absolute position of this reference in the ordered list of references that are part of this transfer basket.


setobjectreforderpos

void setobjectreforderpos(long orderPos)
sets the ordering index, if this object is a reference value of an ordered relationship.


getobjectoperation

int getobjectoperation()
Deprecated. 

gets the operation mode (insert, update, delete) of this object.


setobjectoperation

void setobjectoperation(int operation)
Deprecated. 

sets the operation mode (insert, update, delete) of this object.


getobjectconsistency

int getobjectconsistency()
Deprecated. 

gets the consistency (complete, incomplete, inconsistent, adapted) of this object.


setobjectconsistency

void setobjectconsistency(int consistency)
Deprecated. 

sets the consistency (complete, incomplete, inconsistent, adapted) of this object.


getxmlelecount

int getxmlelecount()
Deprecated. 

gets the number of xml-subelements.


getxmleleattrname

java.lang.String getxmleleattrname(int xmlEleIndex)
Deprecated. 

gets the name of the xml-element with the given xml-element index.


getxmlelevalueidx

int getxmlelevalueidx(int xmlEleIndex)
Deprecated. 

gets the attribute value index of the xml-element with the given xml-element index.


getxmleleprim

java.lang.String getxmleleprim(int xmlEleIndex)
Deprecated. 

gets the simple value of the xml-element with the given xml-element index.

Returns:
the value or null if not a simple value.

getxmleleobj

IomObject getxmleleobj(int xmlEleIndex)
Deprecated. 

gets the structured value of the xml-element with the given xml-element index.


getattrcount

int getattrcount()
gets the number of attributes of this object. This is not the same as the number of attributes of the class of this object. Together with getttrname() this function enables to query an object without knowing the class definition.

 for(int i=0;i

Returns:
gets the number of atrributes with at least one value.

getattrname

java.lang.String getattrname(int index)
gets an attribute name. Together with getttrcount() this function enables to query an object without knowing the class definition.

 for(int i=0;i

Parameters:
index - The index is opaque and only useable to enumerate all defined attributes of this object.
Returns:
the name of the attribute.

getattrvaluecount

int getattrvaluecount(java.lang.String attrName)
gets the number of values of a given attribute.

Parameters:
attrName - name of attribute
Returns:
number of values

getattrvalue

java.lang.String getattrvalue(java.lang.String attrName)
gets the value of an attribute with a primitive type.

Parameters:
attrName - name of attribute
Returns:
primitive value

setattrvalue

void setattrvalue(java.lang.String attrName,
                  java.lang.String value)
sets the value of an attribute with a primitve type.

Parameters:
attrName - name of attribute
value - new primitive value

setattrundefined

void setattrundefined(java.lang.String attrName)
Removes any values for a given attribute. Sets it to NULL, UNDEFINED.

Parameters:
attrName - name of attribute

getattrprim

java.lang.String getattrprim(java.lang.String attrName,
                             int index)
gets the value of an indexed attribute with a primitive type.

Parameters:
attrName - name of attribute
index - index of value to retrieve
Returns:
primitive value

getattrobj

IomObject getattrobj(java.lang.String attrName,
                     int index)
gets the value of an indexed attribute with a structured type.

Parameters:
attrName - name of attribute
index - index of value to retrieve
Returns:
structured value

changeattrobj

IomObject changeattrobj(java.lang.String attrName,
                        int index,
                        java.lang.String type)
Deprecated. 


changeattrobj

void changeattrobj(java.lang.String attrName,
                   int index,
                   IomObject value)
changes the value of an indexed attribute with a structured type.

Parameters:
attrName - name of attribute
index - index of value to change
value - new value

insertattrobj

IomObject insertattrobj(java.lang.String attrName,
                        int index,
                        java.lang.String type)
Deprecated. 


insertattrobj

void insertattrobj(java.lang.String attrName,
                   int index,
                   IomObject value)
inserts a new value to an indexed attribute with a structured type. Shifts the value currently at that position (if any) and any subsequent values to the right (adds one to their indices).

Parameters:
attrName - name of attribute
index - index at which the specified value is to be inserted
value - new value

addattrobj

IomObject addattrobj(java.lang.String attrName,
                     java.lang.String type)
Deprecated. 


addattrobj

void addattrobj(java.lang.String attrName,
                IomObject value)
appends a new value to an indexed attribute with a structured type.

Parameters:
attrName - name of attribute
value - new value

deleteattrobj

void deleteattrobj(java.lang.String attrName,
                   int index)
removes a value from an indexed attibute with a structured type.

Parameters:
attrName - name of attribute
index - index ov value to remove