PropertyEventMethodIndex
WebSquare.collection - 5.0_1.3015A.20180410.143527

Type

engine

Property Summary

Event Summary

Method Summary

addAll( vec )
Adds all data in the vector.
addElement( data )
Adds new data to the vector.
containsKey( key )
Checks whether the Hashtable contains a key.
elementAt( i )
Returns the data of the corresponding index. If no data exists in the specified index, null data will be returned.
elements( )
Returns the data contained in the Hashtable as an array.
fastRemove( i )
Removes the value of the corresponding index.
get( key )
Gets the value paired with the key in the Hashtable.
getAction( )
Returns the action of the vector.
getAction( )
Returns the action of the Hashtable.
getAttribute( name )
Gets the attributes of the Vector.
getAttribute( name )
Gets the attributes of the Hashtable.
getTask( )
Gets the task of the Vector.
getTask( )
Gets the task of the Hashtable.
insertElementAt( data , i )
Inserts data to the specified position.
keys( )
Gets the list of the keys stored on the Hashtable as an array.
put( key , data )
Puts the data with the specified key in the Hashtable. Returns the value of the corresponding key.
remove( i )
Removes the data of the specified location from the Vector, and returns the removed key.
remove( key )
Removes the data of the corresponding key from the Hashtable.
set( i , data )
Sets the new data in the specified location.
setAction( value )
Sets the action property in the Vector.
setAction( value )
Sets the action property in the Hashtable.
setAttribute( name , value )
Sets the vector attributes.
setAttribute( name , value )
Sets the attributes of the Hashtable.
setDebug( value )
Sets the debugging attributes in the vector.
setDebug( value )
Sets the debugging attributes in the Hashtable.
setDocument( doc )
기존 VecRemoves the data in the existing Vector, and initializes the data in the XML format.
setDocument( doc )
Removes the data in the existing Hashtable, and initializes the data in the XML format.
setTask( value )
Sets the task attribute in the Vector.
setTask( value )
Sets the task attribute in the Hashtable.
size( )
Returns the data count in the vector.
toDocument( )
Converts the vector into XML document.
toDocument( )
Converts the Hashtable into XML document.
toHashtable( doc )
Converts the XML (string/document) into a Hashtable object.
toString( )
Converts the Vector into an XML string.
toString( )
Converts the Hashtable into an XML string.
toVector( doc )
Converts the XML ( String/Document) into a Vector object.
WebSquare.collection.Hashtable( )
Creates a Hashtable.
WebSquare.collection.Vector( )
Creates a Vector.

Property Detail

Event Detail

Method Detail

addAll( vec )
Adds all data in the vector.
Parameter
nametyperequireddescription
vecVectorYWebSquare vector containing the data to add
Sample
var vec = new WebSquare.collection.Vector(); vec.addElement("Seoul"); var vec1 = new WebSquare.collection.Vector(); vec1.addElement("Busan"); vec.addAll( vec1 ); alert( vec.toString() ); Result: <vector result='2'><data vectorkey='0' value='Seoul' /><data vectorkey='1' value='Busan' /></vector>
addElement( data )
Adds new data to the vector.
Supported data types include vector, Hashtable, XML document, XML string (well-formed XML-type string), and string. Other data types are converted into string before being added.
Parameter
nametyperequireddescription
dataObjectYData to add
Sample
var vec = new WebSquare.collection.Vector(); vec.addElement("Seoul"); alert(vec.toString()); Result: <vector result='1'><data vectorkey='0' value='Seoul' /></vector>
containsKey( key )
Checks whether the Hashtable contains a key.
Parameter
nametyperequireddescription
keyObjectYKey to check
Return
typedescription
BooleanIf the Hashtable contains the key, "true" will be returned. Otherwise, "false" will be returned.
Sample
var hash = new WebSquare.collection.Hashtable(); hash.put("location" , "Seoul"); var exist = hash.containsKey("location") exist : true
elementAt( i )
Returns the data of the corresponding index. If no data exists in the specified index, null data will be returned.
Parameter
nametyperequireddescription
iStringYIndex
Return
typedescription
ObjectData of the corresponding index. Null when no data exists.
Sample
var vec = new WebSquare.collection.Vector(); vec.addElement("Seoul"); vec.addElement("Busan"); var result = vec.elementAt( 1 ); result : Busan
elements( )
Returns the data contained in the Hashtable as an array.
Return
typedescription
ArrayHashtable data Array
Sample
var hash = new WebSquare.collection.Hashtable(); hash.put("location" , "Seoul"); hash.put("date" , "20120101"); var arr = hash.elements(); arr[0] is 20120101, and arr[1] is Seoul.
fastRemove( i )
Removes the value of the corresponding index.
Parameter
nametyperequireddescription
iStringYIndex
Sample
vec.fastRemove( 0 );
get( key )
Gets the value matching with the key in the Hashtable.
Parameter
nametyperequireddescription
keyObjectYKey to check
Return
typedescription
ObjectThe matching value will be returned. If there is no matching value, null will be returned.
Sample
var hash = new WebSquare.collection.Hashtable(); hash.put("location", "Seoul"); alert(hash.get("location")); Result : Seoul
getAction( )
Returns the action of the vector.
Supported on the Inswave framework.
Return
typedescription
StringValue of the action
Sample
var action = vec.getAction();
getAction( )
Returns the action of the Hashtable.
Supported on the Inswave framework.
Return
typedescription
StringValue of the action
Sample
var action = hash.getAction();
getAttribute( name )
Gets the attribute of the vector. When converted into XML, vector attributes are in the highest node.
Parameter
nametyperequireddescription
nameStringYName of the attribute
Return
typedescription
StringValue of the attribute
Sample
var vec = new WebSquare.collection.Vector(); vec.setAttribute( "task", "com.inswave.system.task.TMSTask" ); alert(vec.getAttribute("task")); Result: com.inswave.system.task.TMSTask
getAttribute( name )
Gets the attributes of the Hashtable.
When converted to XML, Hashtable attributes are in the highest node.
Parameter
nametyperequireddescription
nameStringYName of the attribute
Return
typedescription
ObjectValue of the attribute
Sample
var hash = new WebSquare.collection.Hashtable(); hash.setAttribute( "task", "com.inswave.system.task.TMSTask" ); alert(hash.getAttribute("task")); Result: com.inswave.system.task.TMSTask
getTask( )
Gets the task of the Vector.
Supported on the Inswave framework.
Return
typedescription
StringValue of the task
Sample
var action = vec.getTask();
getTask( )
Gets the task of the Hashtable.
Supported on the Inswave framework.
Return
typedescription
StringValue of the task
Sample
var task = hash.getTask();
insertElementAt( data , i )
Inserts data to the specified position. Not functions when the index is smaller than 0 or larger than the vector length.
Parameter
nametyperequireddescription
dataObjectYSupported data types include vector, Hashtable, XML document, XML string (well-formed XML-type string), and string. Other data types are converted into string before being inserted.
iStringYIndex
Sample
var vec = new WebSquare.collection.Vector(); vec.addElement("Seoul"); vec.insertElementAt("<msg><sName value='tom'/></msg>", 0 ); alert( vec.toString() ); Result : <vector result='2'><data vectorkey='0'><msg><sName value='tom'/></msg></data><data vectorkey='1' value='Seoul'/></vector>
keys( )
Gets the list of the keys stored on the Hashtable as an array.
Return
typedescription
ArrayKey array
Sample
var hash = new WebSquare.collection.Hashtable(); hash.put("location" , "Seoul"); hash.put("date" , "20120101"); var arr = hash.keys(); arr[0] is date, and arr[1] is location.
put( key , data )
Puts the data with the specified key in the Hashtable. Returns the value of the corresponding key.
Supported data types include vector, Hashtable, XML document, XML string (well-formed XML-type string), and string. Other data types are converted into string before being added.
Parameter
nametyperequireddescription
keyStringYValue of the key
dataObjectYValue to be matched with the key
Return
typedescription
ObjectThe matching value will be returned. If there is no matching value, null will be returned.
Sample
var hash = new WebSquare.collection.Hashtable(); hash.put("location", "Seoul"); alert(hash.toString()); Result : <hashtable><data hashkey='location' value='Seoul' /></hashtable>
remove( i )
Removes the data of the specified location from the vector, and returns the removed data.
Parameter
nametyperequireddescription
iStringYIndex
Return
typedescription
ObjectData removed from index i
Sample
var vec = new WebSquare.collection.Vector(); vec.addElement("Seoul"); var removedElement = vec.remove( 0 ); removedElement : Seoul
remove( key )
Removes the data of the corresponding key from the Hashtable. Returns the removed key.
Parameter
nametyperequireddescription
keyStringYKey of the data to remove
Return
typedescription
ObjectData of the specified key will be returned. If no data exists, null data will be returned.
Sample
var hash = new WebSquare.collection.Hashtable(); hash.put("location" , "Seoul"); hash.remove("location"); alert(hash.toString()); Result : <hashtable></hashtable>
set( i , data )
Sets the data in the specified index with the new data.
Parameter
nametyperequireddescription
iStringYIndex to set the data
dataObjectYData to set. Supported data types include vector, Hashtable, XML document, XML string (well-formed XML-type string), and string. Other data types are converted into string before being inserted.
Sample
var vec = new WebSquare.collection.Vector(); vec.addElement("Seoul"); vec.set( 0, "Busan" ); alert(vec.toString()); Result : <vector result='1'><data vectorkey='0' value='Busan' /></vector>
setAction( value )
Sets the action property in the Vector.
Supported on the Inswave framework.
Parameter
nametyperequireddescription
valueStringYName of the action
Sample
vec.setAction("selectList");
setAction( value )
Sets the action property in the Hashtable.
Supported on the Inswave framework.
Parameter
nametyperequireddescription
valueStringYName of the action
Sample
hash.setAction( "selectList" );
setAttribute( name , value )
Sets the attributes of the Vector. When converted into XML, vector attributes are in the highest node.
Parameter
nametyperequireddescription
nameStringYName of the attribute
valueObjectYValue of the attribute
Sample
var vec = new WebSquare.collection.Vector(); vec.setAttribute( "task", "com.inswave.system.task.TMSTask" ); alert(vec.toString()); Result: <vector result='0' task='com.inswave.system.task.TMSTask'></vector>
setAttribute( name , value )
Sets the attributes of the Hashtable.
When converted to XML, Hashtable attributes are in the highest node.
Parameter
nametyperequireddescription
nameStringYName of the attribute
valueObjectYValue of the attribute
Sample
var hash = new WebSquare.collection.Hashtable(); hash.setAttribute( "task", "com.inswave.system.task.TMSTask" ); alert(hash.toString()); Result : <hashtable task='com.inswave.system.task.TMSTask'></hashtable>
setDebug( value )
Sets the debugging attributes in the vector.
Debugging-related attribute is debug, and the value is true or false.
If debug is "true", additional debugging information will be displayed by the server that supports debugging.
Supported on the Inswave framework.
Parameter
nametyperequireddescription
valueBooleanYDebug Flag(true/false)
Sample
vec.setDebug( true );
setDebug( value )
Sets the debugging attributes in the Hashtable.
If debug is "true", additional debugging information will be displayed by the server that supports debugging.
Supported on the Inswave framework.
Parameter
nametyperequireddescription
valueBooleanYValue of the debugging attribute
Return
typedescription
Booleanvalue Debug Flag(true/false)
Sample
hash.setDebug( true );
setDocument( doc )
Initializes the existing data in XML format in the Vector.
Parameter
nametyperequireddescription
docDocumentYXML document containing new data
Sample
var vec = new WebSquare.collection.Vector(); var doc = WebSquare.xml.parse( "<vector><data vectorkey='0' value='Seoul' /></vector>" ); vec.setDocument( doc ); alert(vec.toString()); Result: <vector result='1'><data vectorkey='0' value='Seoul' /></vector>
setDocument( doc )
Initializes the existing data in XML format in the Hashtable.
Parameter
nametyperequireddescription
docDocumentYXML document containing new data
Sample
var hash = new WebSquare.collection.Hashtable(); var doc = WebSquare.xml.parse( "<hashtable><data hashkey='0' value='Seoul' /></hashtable>" ); hash.setDocument( doc ); alert(hash.toString()); Result : <hashtable><data hashkey='0' value='Seoul' /></hashtable>
setTask( value )
Sets the task attribute in the Vector.
Supported on the Inswave framework.
Parameter
nametyperequireddescription
valueStringYName of the task
Sample
vec.setTask("com.inswave.system.task.TMSTask");
setTask( value )
Sets the task attribute in the Hashtable.
Supported on the Inswave framework.
Parameter
nametyperequireddescription
valueStringYName of the task
Sample
hash.setTask( "com.inswave.system.task.TMSTask" );
size( )
Returns the data count in the vector.
Return
typedescription
NumberSize of the vector
Sample
var vec = new WebSquare.collection.Vector(); vec.addElement("Seoul"); var vecSize = vec.size(); vecSize : 1
toDocument( )
Converts the Vector into an XML document.
Return
typedescription
DocumentXML document of the vector
Sample
var doc = vec.toDocument();
toDocument( )
Converts the Hashtable into XML document.
Return
typedescription
DocumentXML Document of the Hashtable
Sample
var doc = hash.toDocument();
toHashtable( doc )
Convert the XML (String/Document) into a Hashtable object. (Does not reference the value.)
Parameter
nametyperequireddescription
docObjectYXML String/Document to Convert
Return
typedescription
ObjectWebSquare.collection.Hashtable object
Sample
var vector = WebSquare.collection.toHashtable( doc );
toString( )
Converts the Vector into an XML string.
Return
typedescription
StringXML string of the vector
Sample
var doc = vec.toString();
toString( )
Converts the Hashtable into an XML string.
Return
typedescription
StringXML string of the Hashtable
Sample
var hashStr = hash.toString();
toVector( doc )
Converts the XML (string/document) into a vector object. (Does not reference the value.)
Parameter
nametyperequireddescription
docObjectYXML String/Document to Convert
Return
typedescription
ObjectWebSquare.collection.Vector object
Sample
var vector = WebSquare.collection.toVector( doc );
WebSquare.collection.Hashtable( )
Creates a Hashtable.
Sample
var hash = new WebSquare.collection.Hashtable();
WebSquare.collection.Vector( )
Creates a Vector.
Sample
var vec = new WebSquare.collection.Vector();