com.guiseframework.model.rdf
Class AbstractRDFResourceTreeNodeModel<V extends com.globalmentor.rdf.RDFResource>
java.lang.Object
com.globalmentor.beans.BoundPropertyObject
com.guiseframework.model.AbstractModel
com.guiseframework.model.AbstractValueModel<V>
com.guiseframework.model.DefaultValueModel<V>
com.guiseframework.model.DefaultTreeNodeModel<V>
com.guiseframework.model.DynamicTreeNodeModel<V>
com.guiseframework.model.rdf.AbstractRDFResourceTreeNodeModel<V>
- Type Parameters:
V - The type of value contained in the tree node.
- All Implemented Interfaces:
- com.globalmentor.beans.PropertyBindable, com.globalmentor.beans.PropertyConstrainable, ActionListenable, ActionModel, Model, RDFObjectTreeNodeModel<V>, Selectable, TreeNodeModel<V>, Valued<V>, ValueModel<V>, java.lang.Iterable<TreeNodeModel<?>>
- Direct Known Subclasses:
- RDFResourceTreeNodeModel
public abstract class AbstractRDFResourceTreeNodeModel<V extends com.globalmentor.rdf.RDFResource>
- extends DynamicTreeNodeModel<V>
- implements RDFObjectTreeNodeModel<V>
Abstract functionality for a tree node model that represents an RDF resource.
Any properties will be dynamically loaded
This class has special support for RDF lists, the contents of which are by default displayed as children of the given resource.
- Author:
- Garret Wilson
| Fields inherited from class com.globalmentor.beans.BoundPropertyObject |
NO_PROPERTY_CHANGE_LISTENERS, NO_VETOABLE_CHANGE_LISTENERS |
| Methods inherited from class com.guiseframework.model.DefaultTreeNodeModel |
add, addActionListener, fireActionPerformed, fireActionPerformed, getActionListeners, getChildren, getDepth, getParent, getTreeNodeList, hasChild, hasChildren, isExpanded, isSelected, iterator, performAction, performAction, remove, removeActionListener, setAllExpanded, setChildren, setParent, setSelected |
| Methods inherited from class com.globalmentor.beans.BoundPropertyObject |
addPropertyChangeListener, addPropertyChangeListener, addVetoableChangeListener, addVetoableChangeListener, createPostponedPropertyChangeEvent, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, fireVetoableChange, fireVetoableChange, fireVetoableChange, fireVetoableChange, getForwardPropertyChangeListener, getPropertyChangeListeners, getPropertyChangeListeners, getPropertyChangeSupport, getRepeatPropertyChangeListener, getRepeatVetoableChangeListener, getVetoableChangeListeners, getVetoableChangeListeners, getVetoableChangeSupport, hasPropertyChangeListeners, hasVetoableChangeListeners, removePropertyChangeListener, removePropertyChangeListener, removeVetoableChangeListener, removeVetoableChangeListener |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Methods inherited from interface com.guiseframework.model.TreeNodeModel |
add, clear, getDepth, getParent, hasChild, hasChildren, isExpanded, isLeaf, remove, setAllExpanded, setExpanded, setParent |
| Methods inherited from interface com.globalmentor.beans.PropertyBindable |
addPropertyChangeListener, addPropertyChangeListener, getPropertyChangeListeners, getPropertyChangeListeners, hasPropertyChangeListeners, removePropertyChangeListener, removePropertyChangeListener |
| Methods inherited from interface com.globalmentor.beans.PropertyConstrainable |
addVetoableChangeListener, addVetoableChangeListener, getVetoableChangeListeners, getVetoableChangeListeners, hasVetoableChangeListeners, removeVetoableChangeListener, removeVetoableChangeListener |
| Methods inherited from interface java.lang.Iterable |
iterator |
RESOURCE_CHILDREN_INCLUDED_PROPERTY
public static final java.lang.String RESOURCE_CHILDREN_INCLUDED_PROPERTY
- The bound property of whether resource children are included in the node.
RESOURCE_PROPERTIES_INCLUDED_PROPERTY
public static final java.lang.String RESOURCE_PROPERTIES_INCLUDED_PROPERTY
- The bound property of whether resource properties are included in the node.
AbstractRDFResourceTreeNodeModel
public AbstractRDFResourceTreeNodeModel(java.lang.Class<V> valueClass)
- Value class constructor with no initial value.
- Parameters:
valueClass - The class indicating the type of value held in the model.
AbstractRDFResourceTreeNodeModel
public AbstractRDFResourceTreeNodeModel(java.lang.Class<V> valueClass,
V initialValue)
- Initial value constructor.
- Parameters:
valueClass - The class indicating the type of value held in the model.initialValue - The initial value, which will not be validated.
AbstractRDFResourceTreeNodeModel
public AbstractRDFResourceTreeNodeModel(java.lang.Class<V> valueClass,
com.globalmentor.rdf.RDFResource rdfProperty,
V initialValue)
- Property and initial value constructor.
- Parameters:
valueClass - The class indicating the type of value held in the model.rdfProperty - The property of which this object is a resource, or null if this object should not be considered the object of any property.initialValue - The initial value, which will not be validated.
getProperty
public com.globalmentor.rdf.RDFResource getProperty()
- Specified by:
getProperty in interface RDFObjectTreeNodeModel<V extends com.globalmentor.rdf.RDFResource>
- Returns:
- The RDF property of which this RDF object is an object, or
null if this object should not be considered the object of any property.
isResourceChildrenIncluded
public boolean isResourceChildrenIncluded()
- Returns:
- Whether resource children are included in the node.
setResourceChildrenIncluded
public void setResourceChildrenIncluded(boolean newChildrenIncluded)
- Sets whether resource children are included in the node.
This is a bound property of type
Boolean.
- Parameters:
newChildrenIncluded - true if resource children should be included as children of this node.- See Also:
RESOURCE_CHILDREN_INCLUDED_PROPERTY
isResourcePropertiesIncluded
public boolean isResourcePropertiesIncluded()
- Returns:
- Whether resource properties are included in the node.
setResourcePropertiesIncluded
public void setResourcePropertiesIncluded(boolean newPropertiesIncluded)
- Sets whether resource properties are included in the node.
This is a bound property of type
Boolean.
- Parameters:
newPropertiesIncluded - true if resource properties should be included as children of this node.- See Also:
RESOURCE_PROPERTIES_INCLUDED_PROPERTY
determineLeaf
protected boolean determineLeaf()
- Dynamically determines whether this node is a leaf.
This version determines if resource properties are included and there are properties, or if resource children are included and there are children.
This version ignores RDF type properties and properties of an
RDFListResource.
- Specified by:
determineLeaf in class DynamicTreeNodeModel<V extends com.globalmentor.rdf.RDFResource>
- Returns:
- Whether this node should be considered a leaf with no children.
determineChildren
protected java.util.List<TreeNodeModel<?>> determineChildren()
- Dynamically determines children.
This version ignores RDF type properties and properties of an
RDFListResource.
- Specified by:
determineChildren in class DynamicTreeNodeModel<V extends com.globalmentor.rdf.RDFResource>
- Returns:
- The dynamically loaded list of children.
createRDFLiteralTreeNode
protected RDFLiteralTreeNodeModel createRDFLiteralTreeNode(com.globalmentor.rdf.RDFResource rdfProperty,
com.globalmentor.rdf.RDFLiteral rdfLiteral)
- Creates a child node to represent a property object literal and optional property.
This version returns an
RDFLiteralTreeNodeModel.
- Parameters:
rdfProperty - The property of which the object is a resource, or null if this object should not be considered the object of any property.rdfLiteral - The literal to represent in the new node.
- Returns:
- A child node to represent the given property object literal.
createRDFResourceTreeNode
protected AbstractRDFResourceTreeNodeModel createRDFResourceTreeNode(com.globalmentor.rdf.RDFResource rdfProperty,
com.globalmentor.rdf.RDFResource rdfResource)
- Creates a child node to represent a property object resource and optional property.
This version returns an
RDFResourceTreeNodeModel.
- Parameters:
rdfProperty - The property of which the object is a resource, or null if this object should not be considered the object of any property.rdfResource - The resource to represent in the new node.
- Returns:
- A child node to represent the given property object resource.
Copyright © 2005-2010 GlobalMentor, Inc. All Rights Reserved.