JHPcte
Class NttVagueObjSet

java.lang.Object
  |
  +--JHPcte.NttVagueObjSet

public class NttVagueObjSet
extends java.lang.Object

A class representing NTT's Java interface.
All operations are able to cope with the inaccessibility of parts of the database in a senseful way. Further information about the NTT database query language is available at NTT's Homepage

See Also:
PcteProcess.NttQuery(java.lang.String, JHPcte.NttVagueObjSet[]), NttObjectReference, NttException

Constructor Summary
protected NttVagueObjSet(PcteProcess actualProcess, PcteObjectReference[] inputObjects)
          constructs an NttVagueObjSet of some object references.
protected NttVagueObjSet(PcteProcess actualProcess, java.lang.String query, NttVagueObjSet[] inputVagueObjSets)
          submits an NTT query.
 
Method Summary
 int containsObject(PcteObjectReference object)
          checks whether an object belongs to this NttVagueObjSet.
 void discardAtServer()
          discards this NttVagueObjSet at the server.
protected  void finalize()
           
 PcteAttributeTypeProperties getAttributeTypeProperties(java.lang.String type)
          NTT's API operation to get attribute type properties.
 PcteLinkTypeProperties getLinkTypeProperties(java.lang.String type)
          NTT's API operation to get link type properties.
 java.lang.String getTuplesLine(NttObjectReference object)
          gets the tuples output line belonging to a result object.
 java.lang.String getTuplesTitle()
          gets the tuples output title line.
 boolean isComplete()
          checks whether all possible candidates were found during the query processing.
 int numberOfSureObjects()
          the number of stored objects definitely belonging to this NttVagueObjSet
 int numberOfUncertainObjects()
          the number of stored objects possibly belonging to this NttVagueObjSet
protected  PcteAttributeValue objectGetAttribute(PcteObjectReference object, java.lang.String attribute)
          NTT's API operation to get an object attribute.
protected  NttVagueObjSet objectGetDestinationObjects(PcteObjectReference object, java.lang.String link)
          NTT's API operation for navigation.
 NttObjectReference sureObjectAt(int index)
          the sure object of this NttVagueObjSet stored at position index
 NttObjectReference uncertainObjectAt(int index)
          the uncertain object of this NttVagueObjSet stored at position index
 
Methods inherited from class java.lang.Object
clone, equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

NttVagueObjSet

protected NttVagueObjSet(PcteProcess actualProcess,
                         java.lang.String query,
                         NttVagueObjSet[] inputVagueObjSets)
                  throws NttException,
                         PcteException
submits an NTT query. The PcteProcess.NttQuery method should be preferred.
Parameters:
query - the query text
inputVagueObjSets - input sets (can be referred to by INPUT[n] in the query)
See Also:
PcteProcess.NttQuery(java.lang.String, JHPcte.NttVagueObjSet[])

NttVagueObjSet

protected NttVagueObjSet(PcteProcess actualProcess,
                         PcteObjectReference[] inputObjects)
                  throws NttException,
                         PcteException
constructs an NttVagueObjSet of some object references.
Necessary for using them as input for a query. The PcteProcess.CreateNttVagueObjSet method should be preferred.
Parameters:
inputObjects - the object references to build the NttVagueObjSet
See Also:
PcteProcess.CreateNttVagueObjSet(JHPcte.PcteObjectReference[])
Method Detail

discardAtServer

public void discardAtServer()
                     throws NttException,
                            PcteException
discards this NttVagueObjSet at the server.
All structures allocated at the server are released.

finalize

protected void finalize()
Overrides:
finalize in class java.lang.Object

numberOfSureObjects

public int numberOfSureObjects()
                        throws NttException,
                               PcteException
the number of stored objects definitely belonging to this NttVagueObjSet

numberOfUncertainObjects

public int numberOfUncertainObjects()
                             throws NttException,
                                    PcteException
the number of stored objects possibly belonging to this NttVagueObjSet

sureObjectAt

public NttObjectReference sureObjectAt(int index)
                                throws NttException,
                                       PcteException
the sure object of this NttVagueObjSet stored at position index
Parameters:
index - position in the array of the sure objects

uncertainObjectAt

public NttObjectReference uncertainObjectAt(int index)
                                     throws NttException,
                                            PcteException
the uncertain object of this NttVagueObjSet stored at position index
Parameters:
index - position in the array of the uncertain objects

containsObject

public int containsObject(PcteObjectReference object)
                   throws NttException,
                          PcteException
checks whether an object belongs to this NttVagueObjSet.
Parameters:
object - the object reference to check
Returns:
[1, 0, -1] if object is [sure, uncertain, no] member

isComplete

public boolean isComplete()
                   throws NttException,
                          PcteException
checks whether all possible candidates were found during the query processing.
Returns:
true, if all possible objects belong to this NttVagueObjSet
false, otherwise

objectGetAttribute

protected PcteAttributeValue objectGetAttribute(PcteObjectReference object,
                                                java.lang.String attribute)
                                         throws NttException,
                                                PcteException
NTT's API operation to get an object attribute.
The attribute may be virtual and is computed in the context of this NttVagueObjSet. So the object is expected to be at least uncertain member of this NttVagueObjSet.
Parameters:
object - the reference of the desired object
attribute - the name of the desired attribute
Returns:
the desired attribute value or null, if the result value is unknown (i.e. cannot be computed)
See Also:
NttObjectReference.getAttribute(java.lang.String), PcteObjectReference.Pcte_object_get_attribute(java.lang.String)

objectGetDestinationObjects

protected NttVagueObjSet objectGetDestinationObjects(PcteObjectReference object,
                                                     java.lang.String link)
                                              throws NttException,
                                                     PcteException
NTT's API operation for navigation.
The link (or link pattern) may be virtual and the result objects are computed in the context of this NttVagueObjSet. So the object is expected to be at least uncertain member of this NttVagueObjSet.
Parameters:
object - the reference of the desired object
link - the link name (pattern) to follow
Returns:
the NttVagueObjSet containing the reached objects
See Also:
NttObjectReference.getDestinationObjects(java.lang.String), PcteObjectReference.Pcte_object_reference_set_relative(java.lang.String, int)

getAttributeTypeProperties

public PcteAttributeTypeProperties getAttributeTypeProperties(java.lang.String type)
                                                       throws NttException,
                                                              PcteException
NTT's API operation to get attribute type properties.
This operation covers the corresponding Pcte_ws operation and supplements it for virtual atrributes in the query specific schema.
Parameters:
type - the typename of the desired attribute type
Returns:
the properties of the attribute type in the query specific schema
See Also:
PcteProcess.Pcte_ws_get_attribute_type_properties(java.lang.String)

getLinkTypeProperties

public PcteLinkTypeProperties getLinkTypeProperties(java.lang.String type)
                                             throws NttException,
                                                    PcteException
NTT's API operation to get link type properties.
This operation covers the corresponding Pcte_ws operation and supplements it for virtual links in the query specific schema.
Parameters:
type - the typename of the desired link type
Returns:
the properties of the link type in the query specific schema
See Also:
PcteProcess.Pcte_ws_get_link_type_properties(java.lang.String)

getTuplesTitle

public java.lang.String getTuplesTitle()
                                throws NttException,
                                       PcteException
gets the tuples output title line.
It contains the attribute names generated by the tuples operator seperated with TAB characters.

getTuplesLine

public java.lang.String getTuplesLine(NttObjectReference object)
                               throws NttException,
                                      PcteException
gets the tuples output line belonging to a result object.
It contains the attributes computed by the tuples operator seperated with TAB characters.
Parameters:
object - the reference of the desired object