org.hypergraphdb.atom
Class HGTypeStructuralInfo

java.lang.Object
  extended by org.hypergraphdb.atom.HGTypeStructuralInfo

public final class HGTypeStructuralInfo
extends java.lang.Object

The HGTypeStructuralInfo class represents a HyperGraph atom that provides fixed structural information about atoms of a definite type.

More often than not, it is the case that atoms of a particular type will all have the same arity. In addition, links of the same type will all be ordered or all unordered (directed or undirected when using the terminology for links of arity 2). This structural uniformity is not enforced by HyperGraph, but it can be declared, for purposes such as applying better visualization algorithms and query optimization, by adding a HGTypeStructuralInfo atom with the relevant information.

If an application adds such structural information for a HyperGraph type, it is expected to stick to it. That is, while being just a "hint", HyperGraph will freely use this information assuming it is correct and it applies to all atoms of a particular type.

A HGTypeStructuralInfo is a simple record (a bean) with the following information:

Author:
Borislav Iordanov

Constructor Summary
HGTypeStructuralInfo()
          Default constructor.
HGTypeStructuralInfo(HGPersistentHandle typeHandle, int arity, boolean ordered)
          Construct a HGTypeStructuralInfo with the given set of parameters.
 
Method Summary
 int getArity()
           
 HGPersistentHandle getTypeHandle()
           
 boolean isOrdered()
           
 void setArity(int arity)
           
 void setOrdered(boolean ordered)
           
 void setTypeHandle(HGPersistentHandle typeHandle)
           
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

HGTypeStructuralInfo

public HGTypeStructuralInfo()

Default constructor.


HGTypeStructuralInfo

public HGTypeStructuralInfo(HGPersistentHandle typeHandle,
                            int arity,
                            boolean ordered)

Construct a HGTypeStructuralInfo with the given set of parameters.

Parameters:
typeHandle - The persistent handle of the type to which this structural information applies.
arity - The fixed arity of all atoms of that particular type.
ordered - Whether links of that type are ordered or not. Note that this flag applies only when arity > 0.
Method Detail

getArity

public final int getArity()

setArity

public final void setArity(int arity)

isOrdered

public final boolean isOrdered()

setOrdered

public final void setOrdered(boolean ordered)

getTypeHandle

public final HGPersistentHandle getTypeHandle()

setTypeHandle

public final void setTypeHandle(HGPersistentHandle typeHandle)