org.jrdf.query.relation.mem
Class SortedAttributeFactoryImpl

java.lang.Object
  extended by org.jrdf.query.relation.mem.SortedAttributeFactoryImpl
All Implemented Interfaces:
SortedAttributeFactory

public class SortedAttributeFactoryImpl
extends Object
implements SortedAttributeFactory

Allows the creation of headings.

Author:
Andrew Newman

Field Summary
 
Fields inherited from interface org.jrdf.query.relation.mem.SortedAttributeFactory
DEFAULT_OBJECT_NAME, DEFAULT_PREDICATE_NAME, DEFAULT_SUBJECT_NAME
 
Constructor Summary
SortedAttributeFactoryImpl(AttributeComparator attributeComparator, long nameCounter)
           
 
Method Summary
 SortedSet<Attribute> createHeading()
          Create the default heading based on a triple - subject, predicate, object.
 List<Attribute> createHeading(List<NodeType> types)
          Create a heading based on the given node types.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

SortedAttributeFactoryImpl

public SortedAttributeFactoryImpl(AttributeComparator attributeComparator,
                                  long nameCounter)
Method Detail

createHeading

public SortedSet<Attribute> createHeading()
Description copied from interface: SortedAttributeFactory
Create the default heading based on a triple - subject, predicate, object.

Specified by:
createHeading in interface SortedAttributeFactory
Returns:
the default heading based on a triple - subject, predicate, object.

createHeading

public List<Attribute> createHeading(List<NodeType> types)
                              throws IllegalArgumentException
Description copied from interface: SortedAttributeFactory
Create a heading based on the given node types. Currently this only accepts triples - should be extended to support anything.

Specified by:
createHeading in interface SortedAttributeFactory
Parameters:
types - the node types usually they will be URI, bnode or Literal to override the defaults.
Returns:
a heading based on the given node types.
Throws:
IllegalArgumentException - currently if there are any more or less than 3.