org.foray.fotree.xml
Class AbstractXmlProperty

java.lang.Object
  extended by org.foray.fotree.Property
      extended by org.foray.fotree.xml.AbstractXmlProperty
Direct Known Subclasses:
Lang

public abstract class AbstractXmlProperty
extends Property

Superclass for properties in the "xml:" namespace.


Field Summary
 
Fields inherited from class org.foray.fotree.Property
PRECEDENCE_FORCE
 
Constructor Summary
AbstractXmlProperty()
           
 
Method Summary
protected  FoPropertyKeyword checkKeywords(FoValue[] validKeywords, String possibleKeyword)
          Checks the keywords for this property, returning an appropriate property value if a keyword is detected.
abstract  XmlProperty getPropertyType()
          Returns the type of this property.
protected abstract  FoValue[] getValidKeywords()
          Returns the valid keywords for this property.
protected  PropertyValue standardParse(FObj fobj, String rawPropertyValue)
          Handles the standard parsing of a property value.
 
Methods inherited from class org.foray.fotree.Property
convertNumericToInteger, convertValueToLength, getBasePropertyName, getKeywordIndex, getKeywordInSet, getSubPropertyName, invalidPropertyName, keywordInSet, unexpectedInitialValueArgument, unexpectedRetrieval, unexpectedValue, unexpectedValue, value
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

AbstractXmlProperty

public AbstractXmlProperty()
Method Detail

standardParse

protected PropertyValue standardParse(FObj fobj,
                                      String rawPropertyValue)
                               throws PropertyException
Handles the standard parsing of a property value.

Parameters:
fobj - The FObj to which this property belongs.
rawPropertyValue - String containing the raw property value.
Returns:
The PropertyValue instance created by the parser.
Throws:
PropertyException - If the input is inconsistent.

getValidKeywords

protected abstract FoValue[] getValidKeywords()
Returns the valid keywords for this property.

Returns:
The valid keywords for this property.

checkKeywords

protected FoPropertyKeyword checkKeywords(FoValue[] validKeywords,
                                          String possibleKeyword)
Checks the keywords for this property, returning an appropriate property value if a keyword is detected.

Parameters:
validKeywords - The array of valid keywords.
possibleKeyword - The token to be evaluated against the valid keywords.
Returns:
If possibleKeyword is found in the validKeywords, return an appropriate property value instance, otherwise returns null.

getPropertyType

public abstract XmlProperty getPropertyType()
Description copied from class: Property
Returns the type of this property.

Specified by:
getPropertyType in class Property
Returns:
The type of this property.


Copyright © 2017. All rights reserved.