com.guiseframework.component.rdf
Class AbstractRDFResourceTreeNodeRepresentationStrategy<V extends com.globalmentor.rdf.RDFResource>

java.lang.Object
  extended by com.guiseframework.component.TreeControl.AbstractTreeNodeRepresentationStrategy<V>
      extended by com.guiseframework.component.rdf.AbstractRDFObjectTreeNodeRepresentationStrategy<V>
          extended by com.guiseframework.component.rdf.AbstractRDFResourceTreeNodeRepresentationStrategy<V>
All Implemented Interfaces:
TreeControl.TreeNodeRepresentationStrategy<V>
Direct Known Subclasses:
RDFResourceTreeNodeRepresentationStrategy

public abstract class AbstractRDFResourceTreeNodeRepresentationStrategy<V extends com.globalmentor.rdf.RDFResource>
extends AbstractRDFObjectTreeNodeRepresentationStrategy<V>

Abstract functionality for a tree node representation strategy representing an RDF resource.

Author:
Garret Wilson

Constructor Summary
AbstractRDFResourceTreeNodeRepresentationStrategy()
          Default constructor with a default RDF XMLifier.
AbstractRDFResourceTreeNodeRepresentationStrategy(com.globalmentor.rdf.RDFXMLGenerator rdfXMLifier)
          RDF XMLifier constructor.
 
Method Summary
protected  java.lang.StringBuilder buildLabelText(java.lang.StringBuilder stringBuilder, TreeControl treeControl, TreeModel model, TreeNodeModel<? extends V> treeNode, V value)
          Builds the label to be used for a tree node.
protected  boolean isResourceReferenceURIIncluded()
           
protected  boolean isResourceTypeIncluded()
           
protected  void setResourceReferenceURIIncluded(boolean referenceURIIncluded)
          Sets whether the resource reference URI should be included.
protected  void setResourceTypeIncluded(boolean resourceTypeIncluded)
          Sets whether the resource type should be included.
 
Methods inherited from class com.guiseframework.component.rdf.AbstractRDFObjectTreeNodeRepresentationStrategy
createComponent, createInfoModel, getXMLGenerator
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

AbstractRDFResourceTreeNodeRepresentationStrategy

public AbstractRDFResourceTreeNodeRepresentationStrategy()
Default constructor with a default RDF XMLifier.


AbstractRDFResourceTreeNodeRepresentationStrategy

public AbstractRDFResourceTreeNodeRepresentationStrategy(com.globalmentor.rdf.RDFXMLGenerator rdfXMLifier)
RDF XMLifier constructor.

Parameters:
rdfXMLifier - The RDF XMLifier to use for creating labels.
Throws:
java.lang.NullPointerException - if the given RDF XMLifier is null.
Method Detail

isResourceReferenceURIIncluded

protected boolean isResourceReferenceURIIncluded()
Returns:
Whether the resource reference URI should be included.

setResourceReferenceURIIncluded

protected void setResourceReferenceURIIncluded(boolean referenceURIIncluded)
Sets whether the resource reference URI should be included.

Parameters:
referenceURIIncluded - Whether the resource reference URI should be included.

isResourceTypeIncluded

protected boolean isResourceTypeIncluded()
Returns:
Whether the resource type should be included.

setResourceTypeIncluded

protected void setResourceTypeIncluded(boolean resourceTypeIncluded)
Sets whether the resource type should be included.

Parameters:
resourceTypeIncluded - Whether the resource type should be included.

buildLabelText

protected java.lang.StringBuilder buildLabelText(java.lang.StringBuilder stringBuilder,
                                                 TreeControl treeControl,
                                                 TreeModel model,
                                                 TreeNodeModel<? extends V> treeNode,
                                                 V value)
Builds the label to be used for a tree node. This version appends information about the resource.

Overrides:
buildLabelText in class AbstractRDFObjectTreeNodeRepresentationStrategy<V extends com.globalmentor.rdf.RDFResource>
Type Parameters:
N - The type of value contained in the node.
Parameters:
stringBuilder - The string builder to hold the label text.
treeControl - The component containing the model.
model - The model containing the value.
treeNode - The node containing the value.
value - The value contained in the node.
Returns:
The string builder used to construct the label.


Copyright © 2005-2010 GlobalMentor, Inc. All Rights Reserved.