org.bee.processor
Class AbstractValue
java.lang.Object
org.xml.sax.helpers.DefaultHandler
org.bee.processor.AbstractValue
- All Implemented Interfaces:
- Instruction, org.xml.sax.ContentHandler, org.xml.sax.DTDHandler, org.xml.sax.EntityResolver, org.xml.sax.ErrorHandler
- Direct Known Subclasses:
- AbstractBlock, Interrupt, Value
public abstract class AbstractValue
- extends org.xml.sax.helpers.DefaultHandler
- implements Instruction
Fields inherited from interface org.bee.processor.Instruction |
ATTR_CODE, ATTR_COMMENT, ATTR_DIR, ATTR_ERROUT, ATTR_ERROUT_STREAM, ATTR_EXEC, ATTR_IN, ATTR_NAME, ATTR_OPTIONS, ATTR_PATH, ATTR_PROCESSONLY, ATTR_PROPERTY, ATTR_SEPARATOR, ATTR_STDIN, ATTR_STDOUT, ATTR_STDOUT_STREAM, ATTR_TARGET, ATTR_TYPE, ATTR_URL, ATTR_VALUE, ATTR_VARIABLE, RESERVE_BUILD_FILE, RESERVE_CLASS_LIB, RESERVE_NAME_ARGS, RESERVE_NAME_DIR, RESERVE_NAME_ERROR, RESERVE_NAME_EXCEPTION, RESERVE_OPTION_NOINPUT, TYPE_BOOL, TYPE_DATE, TYPE_DIRECTORY, TYPE_FILE, TYPE_NUMBER, TYPE_URL, TYPE_VARIABLE |
Method Summary |
void |
characters(char[] ch,
int start,
int length)
|
void |
childDone(Instruction child)
Child notifies a parent that evaluation done, and a parent can use it
for own evaluation |
void |
endElement(java.lang.String uri,
java.lang.String localName,
java.lang.String qName)
|
java.lang.String[] |
getAllowedAttributeNames()
Funtions used only for diagnostic purpose to check if
not allowed attribute for instruction used. |
org.xml.sax.ContentHandler |
getHandler()
provides a handler to parce instruction |
Instruction.NameSpace |
getNameSpace()
return current name space |
Instruction |
getParent()
returns parent, not sure that we need it at all |
XmlPath |
getPath()
Provides path to the instruction |
void |
ignorableWhitespace(char[] ch,
int start,
int length)
|
InfoHolder<java.lang.String,InfoHolder,java.lang.Object> |
lookupInChain(java.lang.String lookName)
|
Instruction.NameSpace |
lookupNameSpace(java.lang.String lookName)
|
InfoHolder<java.lang.String,InfoHolder,java.lang.Object> |
lookupOnTop(java.lang.String lookName)
|
java.lang.String |
lookupStringValue(java.lang.String lookName)
|
protected java.io.File |
makeFile(java.lang.String pathName)
|
void |
setDocumentLocator(org.xml.sax.Locator locator)
|
void |
setParent(Instruction parent)
call back from processor to set parent instruction |
void |
startElement(java.lang.String uri,
java.lang.String localName,
java.lang.String qName,
org.xml.sax.Attributes attributes)
|
protected void |
traceInChain(java.lang.String lookName)
|
protected void |
updateInNameSpace(java.lang.String lookName,
InfoHolder<java.lang.String,InfoHolder,java.lang.Object> nv)
|
protected void |
verifyAttributes(org.xml.sax.Attributes attrs)
|
Methods inherited from class org.xml.sax.helpers.DefaultHandler |
endDocument, endPrefixMapping, error, fatalError, notationDecl, processingInstruction, resolveEntity, skippedEntity, startDocument, startPrefixMapping, unparsedEntityDecl, warning |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
xpath
protected java.lang.String xpath
value
protected java.lang.String value
variable
protected java.lang.String variable
name
protected java.lang.String name
parent
protected Instruction parent
valueBuffer
protected java.lang.StringBuffer valueBuffer
type
protected AbstractValue.Type type
locator
protected org.xml.sax.Locator locator
TYPE_RESERVED
protected static final java.lang.String TYPE_RESERVED
- See Also:
- Constant Field Values
TYPE_SHORTCUTS
protected static final java.lang.String TYPE_SHORTCUTS
- See Also:
- Constant Field Values
AbstractValue
public AbstractValue(java.lang.String xpath)
getHandler
public org.xml.sax.ContentHandler getHandler()
- Description copied from interface:
Instruction
- provides a handler to parce instruction
- Specified by:
getHandler
in interface Instruction
- Returns:
getPath
public XmlPath getPath()
- Description copied from interface:
Instruction
- Provides path to the instruction
- Specified by:
getPath
in interface Instruction
- Returns:
XmlPath path
generally path can be modified outside, so it should return clone
if path is statically calculated inside
childDone
public void childDone(Instruction child)
- Description copied from interface:
Instruction
- Child notifies a parent that evaluation done, and a parent can use it
for own evaluation
- Specified by:
childDone
in interface Instruction
setParent
public void setParent(Instruction parent)
- Description copied from interface:
Instruction
- call back from processor to set parent instruction
- Specified by:
setParent
in interface Instruction
getParent
public Instruction getParent()
- Description copied from interface:
Instruction
- returns parent, not sure that we need it at all
- Specified by:
getParent
in interface Instruction
- Returns:
- parent
getNameSpace
public Instruction.NameSpace getNameSpace()
- Description copied from interface:
Instruction
- return current name space
- Specified by:
getNameSpace
in interface Instruction
- Returns:
- NameSpace where children can be stored
makes no sense for simple variables
getAllowedAttributeNames
public java.lang.String[] getAllowedAttributeNames()
- Description copied from interface:
Instruction
- Funtions used only for diagnostic purpose to check if
not allowed attribute for instruction used.
- Specified by:
getAllowedAttributeNames
in interface Instruction
- Returns:
- String[] names of allowed attribute, can return null
if any attribute is allowed
lookupInChain
public InfoHolder<java.lang.String,InfoHolder,java.lang.Object> lookupInChain(java.lang.String lookName)
lookupNameSpace
public Instruction.NameSpace lookupNameSpace(java.lang.String lookName)
traceInChain
protected void traceInChain(java.lang.String lookName)
lookupOnTop
public InfoHolder<java.lang.String,InfoHolder,java.lang.Object> lookupOnTop(java.lang.String lookName)
updateInNameSpace
protected void updateInNameSpace(java.lang.String lookName,
InfoHolder<java.lang.String,InfoHolder,java.lang.Object> nv)
lookupStringValue
public java.lang.String lookupStringValue(java.lang.String lookName)
startElement
public void startElement(java.lang.String uri,
java.lang.String localName,
java.lang.String qName,
org.xml.sax.Attributes attributes)
throws org.xml.sax.SAXException
- Specified by:
startElement
in interface org.xml.sax.ContentHandler
- Overrides:
startElement
in class org.xml.sax.helpers.DefaultHandler
- Throws:
org.xml.sax.SAXException
endElement
public void endElement(java.lang.String uri,
java.lang.String localName,
java.lang.String qName)
throws org.xml.sax.SAXException
- Specified by:
endElement
in interface org.xml.sax.ContentHandler
- Overrides:
endElement
in class org.xml.sax.helpers.DefaultHandler
- Throws:
org.xml.sax.SAXException
characters
public void characters(char[] ch,
int start,
int length)
throws org.xml.sax.SAXException
- Specified by:
characters
in interface org.xml.sax.ContentHandler
- Overrides:
characters
in class org.xml.sax.helpers.DefaultHandler
- Throws:
org.xml.sax.SAXException
ignorableWhitespace
public void ignorableWhitespace(char[] ch,
int start,
int length)
throws org.xml.sax.SAXException
- Specified by:
ignorableWhitespace
in interface org.xml.sax.ContentHandler
- Overrides:
ignorableWhitespace
in class org.xml.sax.helpers.DefaultHandler
- Throws:
org.xml.sax.SAXException
setDocumentLocator
public void setDocumentLocator(org.xml.sax.Locator locator)
- Specified by:
setDocumentLocator
in interface org.xml.sax.ContentHandler
- Overrides:
setDocumentLocator
in class org.xml.sax.helpers.DefaultHandler
verifyAttributes
protected void verifyAttributes(org.xml.sax.Attributes attrs)
makeFile
protected java.io.File makeFile(java.lang.String pathName)