public final class HGTypeStructuralInfo extends 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:
arity > 0
.Constructor and Description |
---|
HGTypeStructuralInfo()
Default constructor.
|
HGTypeStructuralInfo(HGPersistentHandle typeHandle,
int arity,
boolean ordered)
Construct a
HGTypeStructuralInfo with the given set of
parameters. |
Modifier and Type | Method and Description |
---|---|
int |
getArity() |
HGPersistentHandle |
getTypeHandle() |
boolean |
isOrdered() |
void |
setArity(int arity) |
void |
setOrdered(boolean ordered) |
void |
setTypeHandle(HGPersistentHandle typeHandle) |
public HGTypeStructuralInfo()
Default constructor.
public HGTypeStructuralInfo(HGPersistentHandle typeHandle, int arity, boolean ordered)
Construct a HGTypeStructuralInfo
with the given set of
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
.public final int getArity()
public final void setArity(int arity)
public final boolean isOrdered()
public final void setOrdered(boolean ordered)
public final HGPersistentHandle getTypeHandle()
public final void setTypeHandle(HGPersistentHandle typeHandle)
Copyright © 2015. All rights reserved.