public class HQL extends FwkApplication
Property Keyword | Description |
Classname | The name of the class to be used for the command. |
Help | The help text of the command. |
Modifier and Type | Field and Description |
---|---|
static java.lang.String |
APPEND_ERR
Contants to used for method openStream
|
static java.lang.String |
APPEND_OUT
Contants to used for method openStream
|
protected FwkPropertyGroupInterface |
cmdGroup |
protected java.lang.String[] |
cmds |
static java.lang.String |
DELIMITERS |
protected static FwkDescriptionInterface |
descriptor |
java.io.PrintStream |
err
The error stream.
|
protected java.util.Vector |
errStack
The error output stream stack.
|
java.io.InputStream |
in
The input stream.
|
protected com.highqsoft.odsx.hql.HQL.HQLController |
infoBusController |
static java.lang.String |
OPEN_ERR
Contants to used for method openStream
|
static java.lang.String |
OPEN_OUT
Contants to used for method openStream
|
java.io.PrintStream |
out
The output printer.
|
protected java.util.Vector |
outStack
The output stream stack.
|
protected com.highqsoft.odsx.hql.HQL.HQLResultSetConsumer |
resultSetConsumer |
protected OdsxResultSetProducer |
resultSetProducer |
protected boolean |
verbose
The flag that decides whether to print out result sets.
|
static java.lang.String |
version |
applicationThread, args, controller, eternal, executeStateListeners, pageFormat, panel, port, readingDOM, serviceControlManager, statusLabel, statusPanel
infoBusMemberSupport
changeManager, properties, suspendChangeManager
source
author, buildnr, className, company, copyright, creationDate, dateFormatString, description, eMail, FWK_ICON, FWK_ICON_ARRAY, FWK_ICON_BG, FWK_ICON_BG_ARRAY, FWK_ICON_BG_LARGE, FWK_ICON_BG_LARGE_ARRAY, FWK_ICON_LARGE, FWK_ICON_LARGE_ARRAY, icon, ICON, iconCount, iconKey, internetAddress, name, titleName
INFOBUS_SOURCE
AUTHOR, BUILDNR, COMPANY, COPYRIGHT, DATE_FORMAT, DEFAULT_ICON, DESCRIPTION, INTERNET, LARGE_ICON, LARGE_KEY_EXT, LARGE_OPAQUE_ICON, LARGE_OPAQUE_KEY_EXT, OPAQUE_ICON, OPAQUE_KEY_EXT, RCS_DATE_FORMAT, SUPPORT_EMAIL, TITLE_NAME
Constructor and Description |
---|
HQL()
The constructor
|
Modifier and Type | Method and Description |
---|---|
void |
closeSession(java.lang.String name)
Close a session.
|
boolean |
closeStream(java.lang.String type)
Close output stream.
|
CommandInterface |
createCommand(java.lang.String name)
Create a command object.
|
boolean |
exit()
Exit the application gracefully and release all
related resources
|
FwkPropertyGroupInterface |
getCommandProperties(java.lang.String cmd)
Get the property group describing the given command.
|
static FwkDescriptionInterface |
getDescriptor() |
java.util.Enumeration |
getInterpreterCommands()
Get all available command name string.
|
OdsxSessionInterface |
getLastUsedSession()
Get thge last used session.
|
FwkPanelInterface |
getPanel()
Get the panel of the interpreter.
|
OdsxSessionInterface |
getSession(java.lang.String name)
Get the session of the current connection.
|
boolean |
getVerbose()
Get the verbose flag.
|
java.lang.String |
getVersion()
Get the version of the HQL implementation.
|
java.util.Iterator |
listSessions()
List the established sessions.
|
static void |
main(java.lang.String[] args)
The main HQL programm that reads commands from keyboard.
|
boolean |
openStream(java.lang.String type,
java.lang.String spec)
Open output stream.
|
static java.lang.String[] |
parseParams(java.lang.String params,
FwkPropertyGroup keys)
Parse the parameters.
|
protected static java.lang.String |
parseString(java.util.StringTokenizer st,
char delimiter)
Parse the string literal.
|
static void |
printCols(java.io.PrintStream out,
ResultColumnInterface[] cols)
Print out an array of result column.
|
void |
publishResultSet(OdsxResultSetInterface result)
Publish a result set.
|
CommandInterface |
readFrom(java.io.BufferedReader in)
Read commands from BuffereedReader
|
CommandInterface |
readFrom(java.io.InputStream in)
Read commands from InputStream
|
CommandInterface |
readFrom(java.io.InputStreamReader in)
Read commands from InputStreamReader
|
void |
readFromKeyboard()
Read from input steam until stop.
|
CommandInterface |
readString(java.lang.String cmdString)
Read commands from String
|
void |
release()
Release and purge the object.
|
void |
revokeResultSet(OdsxResultSetInterface result)
Revoke a result set.
|
void |
run()
The run method.
|
CommandInterface |
scanLine(java.lang.String line)
Scan a single statement line.
|
void |
setErr(java.io.PrintStream err)
The the error print stream.
|
void |
setOut(java.io.PrintStream out)
The the output print stream.
|
void |
setSession(java.lang.String name,
OdsxSessionInterface session)
Set the session.
|
void |
setVerbose(boolean flag)
Set the verbose flag.
|
addExecuteStateListener, destroyController, fireExecuteStateEvent, getController, getFwkPort, getNumberOfPages, getPageFormat, getPrintable, getPrintJobName, getPriority, getStatusPanel, hasFwkPort, init, isEternal, isInterrupted, isRegistered, print, readConstructor, readFromDOM, readingDOM, readingDOM, register, register, register, removeExecuteStateListener, setArguments, setController, setEternal, setPageFormat, setPanel, setPriority, setServiceControlManager, start, stop, unregister, writeConstructor, writeToDOM, writeToXML
addInfoBusPropertyListener, addInfoBusVetoableListener, finalize, getInfoBus, getInfoBusName, getMemberName, isConnected, joinInfoBus, removeInfoBusPropertyListener, removeInfoBusVetoableListener, setInfoBus, setInfoBusName, setMemberName, setName
addDataItemChangeListener, fireItemAdded, fireItemDeleted, fireItemRevoked, fireItemValueChanged, getName, getProperty, getPropertyGroup, getSource, isChangeManagerSuspended, removeDataItemChangeListener, setProperty, setPropertyGroup, suspendChangeManager
addCommand, addCommand, addToGroup, addToGroup, addVetoableChangeListener, addVetoableChangeListener, clearCommands, commandsAvailable, compareTo, deleteGroup, fireVetoableChange, fireVetoableChange, fireVetoableChange, fireVetoableChange, fireVetoableChange, fireVetoableChange, fireVetoableChange, fireVetoableChange, getAuthor, getBuild, getCommand, getCommands, getCommands, getCompany, getCompanyInternetAddress, getCopyright, getCreationDate, getCreationDate, getDateFormatString, getDescription, getFwkMimeTypes, getGroup, getIcon, getIcon, getIconKey, getIconKey, getPersistentObjectNames, getSupportEMail, getTitle, getTitleName, getVetoableChangeArray, getVetoableChangeListenerArray, getVetoableChangeListenerArray, groupExists, removeCommand, removeFromGroup, removeVetoableChangeListener, removeVetoableChangeListener, setAuthor, setBuild, setCommands, setCompany, setCompanyInternetAddress, setCopyright, setCreationDate, setDateFormatString, setDescription, setDescriptor, setDescriptor, setIcon, setIcon, setIconKey, setIconKey, setSource, setSupportEMail, setTitleName
addPropertyChangeListener, addPropertyChangeListener, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, getPropertyChangeArray, getPropertyChangeListenerArray, getPropertyChangeListenerArray, isPropertyChangeEventSuspended, removePropertyChangeListener, removePropertyChangeListener, suspendPropertyChangeEvents
getClassName, getPresentationString, getPresentationString, getTransferData, getTransferDataFlavors, isDataFlavorSupported, lostOwnership, setClassName, setCreationDate, toString
getNiceVersion
clone, equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
getInfoBusName, getMemberName, isConnected, setInfoBusName, setMemberName
addInfoBusPropertyListener, addInfoBusVetoableListener, getInfoBus, removeInfoBusPropertyListener, removeInfoBusVetoableListener, setInfoBus
getCompany
fireItemAdded, fireItemDeleted, fireItemRevoked, fireItemValueChanged, getProperty, getPropertyGroup, setProperty, setPropertyGroup, suspendChangeManager
getCommands, getPersistentObjectNames
addPropertyChangeListener, addPropertyChangeListener, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, getPropertyChangeArray, getPropertyChangeListenerArray, getPropertyChangeListenerArray, isPropertyChangeEventSuspended, removePropertyChangeListener, removePropertyChangeListener, setSource, suspendPropertyChangeEvents
addVetoableChangeListener, addVetoableChangeListener, getVetoableChangeArray, getVetoableChangeListenerArray, getVetoableChangeListenerArray, removeVetoableChangeListener, removeVetoableChangeListener
getAuthor, getBuild, getClassName, getCompanyInternetAddress, getCopyright, getCreationDate, getCreationDate, getDateFormatString, getDescription, getIcon, getIcon, getIconKey, getIconKey, getName, getPresentationString, getPresentationString, getSupportEMail, getTitle, getTitleName, setAuthor, setBuild, setClassName, setCompany, setCompanyInternetAddress, setCopyright, setCreationDate, setCreationDate, setDateFormatString, setDescription, setDescriptor, setIcon, setIcon, setIconKey, setIconKey, setName, setSupportEMail, setTitleName
getTransferData, getTransferDataFlavors, isDataFlavorSupported
addCommand, addCommand, addToGroup, addToGroup, clearCommands, commandsAvailable, deleteGroup, getCommand, getCommands, getGroup, groupExists, removeCommand, removeFromGroup, setCommands
getPresentationString, getPresentationString
public static final java.lang.String version
protected static final FwkDescriptionInterface descriptor
public static final java.lang.String DELIMITERS
public static final java.lang.String OPEN_OUT
public static final java.lang.String APPEND_OUT
public static final java.lang.String OPEN_ERR
public static final java.lang.String APPEND_ERR
protected com.highqsoft.odsx.hql.HQL.HQLController infoBusController
protected com.highqsoft.odsx.hql.HQL.HQLResultSetConsumer resultSetConsumer
protected OdsxResultSetProducer resultSetProducer
protected java.util.Vector outStack
protected java.util.Vector errStack
public java.io.PrintStream out
public java.io.InputStream in
protected boolean verbose
public java.io.PrintStream err
protected FwkPropertyGroupInterface cmdGroup
protected java.lang.String[] cmds
public java.lang.String getVersion()
getVersion
in interface FwkInterface
getVersion
in class FwkApplication
public static FwkDescriptionInterface getDescriptor()
public void setVerbose(boolean flag)
flag
- true to ommit result printing.public boolean getVerbose()
public void run()
run
in interface java.lang.Runnable
run
in class FwkApplication
public FwkPanelInterface getPanel()
getPanel
in interface FwkApplicationInterface
getPanel
in class FwkApplication
public boolean exit()
exit
in interface FwkApplicationInterface
exit
in class FwkApplication
public void release()
release
in interface FwkInterface
release
in interface javax.infobus.DataItem
release
in class FwkItem
public static java.lang.String[] parseParams(java.lang.String params, FwkPropertyGroup keys)
params
- The parameter string.keys
- The property group the receives the options, specified by a name value pair.protected static java.lang.String parseString(java.util.StringTokenizer st, char delimiter)
st
- the tokenizer.delimiter
- the delimiter of the string to be parsed.public CommandInterface readString(java.lang.String cmdString) throws java.lang.RuntimeException
cmdString
- the command stringjava.lang.RuntimeException
public CommandInterface readFrom(java.io.InputStream in) throws java.lang.RuntimeException
in
- the input streamjava.lang.RuntimeException
public CommandInterface readFrom(java.io.InputStreamReader in) throws java.lang.RuntimeException
in
- the input stream readerjava.lang.RuntimeException
public CommandInterface readFrom(java.io.BufferedReader in) throws java.lang.RuntimeException
in
- the input stream readerjava.lang.RuntimeException
public CommandInterface scanLine(java.lang.String line) throws java.lang.Throwable
line
- the line to be scanned.java.lang.Throwable
public CommandInterface createCommand(java.lang.String name)
name
- the command name.public void readFromKeyboard()
public static void printCols(java.io.PrintStream out, ResultColumnInterface[] cols)
public FwkPropertyGroupInterface getCommandProperties(java.lang.String cmd)
cmd
- the command.public java.util.Enumeration getInterpreterCommands()
public void setSession(java.lang.String name, OdsxSessionInterface session)
name
- the name to be assigned to the session.
if null, the name of the session is used.session
- the session of the current connection.public void closeSession(java.lang.String name)
name
- the of the session to be closed.public OdsxSessionInterface getSession(java.lang.String name)
name
- the name of the requested session.public OdsxSessionInterface getLastUsedSession()
public java.util.Iterator listSessions()
public boolean openStream(java.lang.String type, java.lang.String spec)
type
- the type of stream.spec
- the file specification.public boolean closeStream(java.lang.String type)
type
- the type of stream.public void setOut(java.io.PrintStream out)
out
- the output print stream.public void setErr(java.io.PrintStream err)
err
- the error print stream.public void publishResultSet(OdsxResultSetInterface result)
result
- the result set to be published.to find out the infobus conditions.
public void revokeResultSet(OdsxResultSetInterface result)
result
- the result set to be revoked.to find out the infobus conditions.
public static void main(java.lang.String[] args)
java -mx100m -ms60m com.highqsoft.odsx.hql.HQL -Odsx.NewSession.AskForPassword false
args
- the commands line arguments.