info.informatica.doc.style.css.property
Class PropertyDatabase

java.lang.Object
  extended by info.informatica.doc.style.css.property.PropertyDatabase

public final class PropertyDatabase
extends Object

Database of device-independent CSS 2.1 property information.

Also creates CSSPropertyName objects.

Author:
Carlos Amengual (amengual at informatica.info)

Constructor Summary
protected PropertyDatabase()
           
 
Method Summary
protected  void addShorthand(String shorthand, String[] subproperties)
           
protected  List<String> computeInheritedPropertiesList()
           
protected  Map<String,org.w3c.dom.css.CSSValue> computeInitialValueMap()
           
 org.w3c.dom.css.CSSValue getInitialValue(String propertyName)
          Gives the initial device-independent initial (default) value for the given property.
static PropertyDatabase getInstance()
          Gets an instance of this class.
 CSSPropertyName getPropertyName(String name)
          Gets the CSSPropertyName object corresponding to the given property name.
 String[] getShorthandSubproperties(String shorthandName)
           
 boolean isIdentifierValue(String propertyName, String value)
          Determines if the given value is an identifier for the given property name.
 boolean isInherited(String name)
          Does this property inherit value by default?
 boolean isShorthand(String name)
          Is this a shorthand property?
 boolean isShorthandSubproperty(String name)
          Is this the subproperty of a shorthand property?
 boolean isShorthandSubpropertyOf(String shorthand, String subpName)
          Is this the subproperty of the given shorthand property ?
protected  String resourcePath(String filename)
           
 void setClassLoader(ClassLoader loader)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

PropertyDatabase

protected PropertyDatabase()
Method Detail

getInstance

public static PropertyDatabase getInstance()
Gets an instance of this class.

Returns:
an instance of PropertyNameFactory.

isInherited

public boolean isInherited(String name)
Does this property inherit value by default?

Parameters:
name - the name of the property.
Returns:
true if inherits by default, false otherwise.

computeInheritedPropertiesList

protected List<String> computeInheritedPropertiesList()

getInitialValue

public org.w3c.dom.css.CSSValue getInitialValue(String propertyName)
Gives the initial device-independent initial (default) value for the given property.

Parameters:
propertyName - the property name.
Returns:
the initial CSS value, or null if no device-independent default could be found.

computeInitialValueMap

protected Map<String,org.w3c.dom.css.CSSValue> computeInitialValueMap()

isShorthand

public boolean isShorthand(String name)
Is this a shorthand property?

Parameters:
name - the name of the property.
Returns:
true if is a shorthand, false otherwise.

isShorthandSubproperty

public boolean isShorthandSubproperty(String name)
Is this the subproperty of a shorthand property?

Parameters:
name - the name of the property.
Returns:
true if is a shorthand subproperty, false otherwise.

isShorthandSubpropertyOf

public boolean isShorthandSubpropertyOf(String shorthand,
                                        String subpName)
Is this the subproperty of the given shorthand property ?

Parameters:
shorthand - the name of the shorthand property.
subpName - the name of the subproperty.
Returns:
true if subpName is a subproperty of the given shorthand, false otherwise.

getShorthandSubproperties

public String[] getShorthandSubproperties(String shorthandName)

getPropertyName

public CSSPropertyName getPropertyName(String name)
Gets the CSSPropertyName object corresponding to the given property name.

Parameters:
name - the property name.
Returns:
the associated CSSPropertyName object.

addShorthand

protected void addShorthand(String shorthand,
                            String[] subproperties)

isIdentifierValue

public boolean isIdentifierValue(String propertyName,
                                 String value)
Determines if the given value is an identifier for the given property name.

Generic identifiers such as inherit or none are not checked.

Parameters:
propertyName - the name of the property.
value - the value that has to be tested to be an identifier for propertyName.
Returns:
true if value is recognized as an identifier of propertyName, false otherwise.

setClassLoader

public void setClassLoader(ClassLoader loader)

resourcePath

protected String resourcePath(String filename)


Copyright © 2011 informatica.info. All Rights Reserved.