edu.umd.cfar.lamp.apploader.propertysheets
Class ForClassPropertyDescriptor

java.lang.Object
  extended byedu.umd.cfar.lamp.apploader.propertysheets.ExplicitPropertyDescriptor
      extended byedu.umd.cfar.lamp.apploader.propertysheets.ForClassPropertyDescriptor
All Implemented Interfaces:
InstancePropertyDescriptor

public class ForClassPropertyDescriptor
extends ExplicitPropertyDescriptor

An object for manipulating a field on a property sheet. It includes methods for setting and getting the values of the field, as well as displaying it and editing it. It uses the AppLoader preferences model to get information about how to edit the property.

For example, given the RDF description of a property below:

	[	lal:propertyName "AttrName" ;
		props:interfacer :setAttrName ;
		props:renderer :attrConfigNameEditor ;
		props:editor :attrConfigNameEditor ;
		rdfs:label "Name"@en , "Nom"@fr ]
 

Then there must exist a bean with a property given the text description "Name" (in english) that has the java name "AttrName". The preferences may also define an interfacer, as a java bean (see the apploader information) with the uri :setAttrName and the same bean for the renderer and editor with the uri :setConfigNameEditor. Without an interfacer, it uses the java name to find the javabeans methods 'getJname' and 'setJname'.

 :setAttrName
 		a lal:Bean ;
		rdfs:label "Function Object to Set an Attribute Name"@en ;
		lal:className "edu.umd.cfar.lamp.viper.gui.config.SetAttrName" .
 :attrConfigNameEditor
		a props:Editor ;
		lal:className "edu.umd.cfar.lamp.viper.gui.config.AttrNameEditor" ;
		lal:setProperty [ 
			lal:propertyName "Text" ] .
 
The setAttrName is a PropertyInterfacer, impelemnted by the class specified by lal:className. The label isn't used currently.


Constructor Summary
ForClassPropertyDescriptor(PrefsManager prefs, com.hp.hpl.jena.rdf.model.Resource prop, java.lang.Object bean)
          Creates a new descriptor for the property of the given instance as described in the preferences by the resource prop
 
Methods inherited from class edu.umd.cfar.lamp.apploader.propertysheets.ExplicitPropertyDescriptor
applyGetter, applySetter, equals, getBeanType, getEditor, getInterfacer, getName, getRenderer, hashCode, isSettable, setInterfacer, setProxy
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ForClassPropertyDescriptor

public ForClassPropertyDescriptor(PrefsManager prefs,
                                  com.hp.hpl.jena.rdf.model.Resource prop,
                                  java.lang.Object bean)
                           throws PreferenceException
Creates a new descriptor for the property of the given instance as described in the preferences by the resource prop

Parameters:
prefs - The apploader prefs that describe this resource.
prop - The RDF node that represents this kind of bean property
bean - The instance to describe
Throws:
PreferenceException