|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.foray.fotree.Property
public abstract class Property
Class representing an XSL-FO property. A Property consists of two parts: 1. Its identifier (what property am I?), e.g. "start-indent" or "font-family". This class does not currently record this, as its instances are accumulated in a PropertyList that knows this information. 2. Its value. For now, we consider a value to be either a) a valid datatype, or b) an expression (which contains valid datatypes).
Field Summary | |
---|---|
static int |
PRECEDENCE_FORCE
Constant defining a precedence of "force" (the maximum integer value). |
Constructor Summary | |
---|---|
Property()
|
Method Summary | |
---|---|
protected int |
convertNumericToInteger(PropertyValue value)
Converts a numeric property value its integer equivalent. |
protected int |
convertValueToLength(PropertyValue value,
FObj fobj,
org.axsl.fo.FoContext context)
Converts a property value to its computed length. |
static String |
getBasePropertyName(String propertyName)
Find the "base" portion of the property Name. |
static int |
getKeywordIndex(FoValue possibleKeyword,
FoValue[] validKeywords)
Searches an array of keywords to see if a keyword candidate is found in that list. |
static FoValue |
getKeywordInSet(FoValue keyword,
FoValue[] keywordSet)
Determines whether a given keyword is included in a given keyword set. |
abstract PropertyType |
getPropertyType()
Returns the type of this property. |
static String |
getSubPropertyName(String propertyName)
Find the "sub" portion of the property Name. |
static PropertyException |
invalidPropertyName(String propertyName)
Returns an exception indicating that the passed property name is not valid. |
static boolean |
keywordInSet(FoValue keyword,
FoValue[] keywordSet)
Determines whether a given keyword index is included in a given keyword set. |
protected static IllegalArgumentException |
unexpectedInitialValueArgument(PropertyType propertyType,
Class<? extends Property> theClass)
Returns an IllegalArgumentException indicating that the arguments
presented for retrieving an initial value for a given property are not
valid. |
protected IllegalStateException |
unexpectedRetrieval()
Returns an IllegalStateException indicating that the stored value
is not expected at retrieval time. |
protected PropertyException |
unexpectedValue(String value,
FObj fobj)
Convenience method which returns an exception indicating that the value of this property does not meet the properties requirements. |
protected PropertyException |
unexpectedValue(String value,
FObj fobj,
String reason)
Returns an exception indicating that the value of this property does not meet the property's requirements. |
abstract PropertyValue |
value()
Returns the value for this property. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static final int PRECEDENCE_FORCE
Constructor Detail |
---|
public Property()
Method Detail |
---|
public abstract PropertyType getPropertyType()
protected PropertyException unexpectedValue(String value, FObj fobj)
value
- The unparsed property value.fobj
- The FObj to which this property belongs.
protected PropertyException unexpectedValue(String value, FObj fobj, String reason)
value
- The unparsed property value.fobj
- The FObj to which this property belongs.reason
- The reason for the failure.
public static PropertyException invalidPropertyName(String propertyName)
propertyName
- The name of the property that is not valid.
protected IllegalStateException unexpectedRetrieval()
IllegalStateException
indicating that the stored value
is not expected at retrieval time.
protected static IllegalArgumentException unexpectedInitialValueArgument(PropertyType propertyType, Class<? extends Property> theClass)
IllegalArgumentException
indicating that the arguments
presented for retrieving an initial value for a given property are not
valid.
propertyType
- The property type for which the initial value is
being obtained.theClass
- The class reporting the illegal argument exception.
public static int getKeywordIndex(FoValue possibleKeyword, FoValue[] validKeywords)
possibleKeyword
- The candidate keyword being tested.validKeywords
- The array of valid keywords.
validKeywords
,
otherwise returns -1.public static FoValue getKeywordInSet(FoValue keyword, FoValue[] keywordSet)
keyword
- The keyword whose inclusion is being tested.keywordSet
- The array of keywords that is being tested against.
public static boolean keywordInSet(FoValue keyword, FoValue[] keywordSet)
keyword
- The keyword index whose inclusion is being tested.keywordSet
- The short array that keywordIndex is being tested
against.
public static String getBasePropertyName(String propertyName)
propertyName
- The raw, unparsed property name.
public static String getSubPropertyName(String propertyName)
propertyName
- The raw, unparsed property name.
public abstract PropertyValue value()
protected int convertValueToLength(PropertyValue value, FObj fobj, org.axsl.fo.FoContext context)
value
- The property value to be evaluated.fobj
- The FObj to which this property belongs.context
- An object that knows how to resolve FO context issues.
protected int convertNumericToInteger(PropertyValue value)
value
- The property value to be converted.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |