public abstract class AbstractCodedNodeGraph extends java.lang.Object implements CodedNodeGraph
Modifier | Constructor and Description |
---|---|
protected |
AbstractCodedNodeGraph() |
Modifier and Type | Method and Description |
---|---|
abstract ResolvedConceptReferenceList |
doResolveAsList(ConceptReference graphFocus,
boolean resolveForward,
boolean resolveBackward,
int resolveCodedEntryDepth,
int resolveAssociationDepth,
LocalNameList propertyNames,
CodedNodeSet.PropertyType[] propertyTypes,
SortOptionList sortOptions,
LocalNameList filterOptions,
int maxToReturn,
boolean keepLastAssociationLevelUnresolved)
Do resolve as list.
|
protected LgLoggerIF |
getLogger()
The logger.
|
CodedNodeGraph |
intersect(CodedNodeGraph graph)
Return the set of nodes and associations that are present in both
graphs.
|
java.lang.Boolean |
isCodeInGraph(ConceptReference code)
Determine whether the supplied code is in the graph.
|
java.util.List<java.lang.String> |
listCodeRelationships(ConceptReference sourceCode,
ConceptReference targetCode,
int distance)
Return a list of all of the associations in the graph that have the
supplied source and target codes based on distance between them.
|
ResolvedConceptReferenceList |
resolveAsList(ConceptReference graphFocus,
boolean resolveForward,
boolean resolveBackward,
int resolveCodedEntryDepth,
int resolveAssociationDepth,
LocalNameList propertyNames,
CodedNodeSet.PropertyType[] propertyTypes,
SortOptionList sortOptions,
int maxToReturn)
Resolve all of the coded nodes in the list, sorting by the supplied
property (if any), resolving the supplied properties, resolving coded
entries to the supplied depth and resolving associations to the supplied
depth.
|
ResolvedConceptReferenceList |
resolveAsList(ConceptReference graphFocus,
boolean resolveForward,
boolean resolveBackward,
int resolveCodedEntryDepth,
int resolveAssociationDepth,
LocalNameList propertyNames,
CodedNodeSet.PropertyType[] propertyTypes,
SortOptionList sortOptions,
LocalNameList filterOptions,
int maxToReturn)
Resolve all of the coded nodes in the list, sorting by the supplied
property (if any), resolving the supplied properties, resolving coded
entries to the supplied depth, resolving associations to the supplied
depth, and allowing for additional filters to be applied against
the returned items.
|
ResolvedConceptReferenceList |
resolveAsList(ConceptReference graphFocus,
boolean resolveForward,
boolean resolveBackward,
int resolveCodedEntryDepth,
int resolveAssociationDepth,
LocalNameList propertyNames,
CodedNodeSet.PropertyType[] propertyTypes,
SortOptionList sortOptions,
LocalNameList filterOptions,
int maxToReturn,
boolean keepLastAssociationLevelUnresolved)
Resolve all of the coded nodes in the list, sorting by the supplied
property (if any), resolving the supplied properties, resolving coded
entries to the supplied depth, resolving associations to the supplied
depth, and allowing for additional filters to be applied against
the returned items.
|
CodedNodeGraph |
union(CodedNodeGraph graph)
Return the union of the two graphs.
|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
areCodesRelated, listCodeRelationships, restrictToAnonymous, restrictToAssociations, restrictToCodes, restrictToCodeSystem, restrictToDirectionalNames, restrictToEntityTypes, restrictToSourceCodes, restrictToSourceCodeSystem, restrictToTargetCodes, restrictToTargetCodeSystem, toNodeList
protected LgLoggerIF getLogger()
public ResolvedConceptReferenceList resolveAsList(ConceptReference graphFocus, boolean resolveForward, boolean resolveBackward, int resolveCodedEntryDepth, int resolveAssociationDepth, LocalNameList propertyNames, CodedNodeSet.PropertyType[] propertyTypes, SortOptionList sortOptions, int maxToReturn) throws LBInvocationException, LBParameterException
CodedNodeGraph
resolveAsList
in interface CodedNodeGraph
graphFocus
- Set the top or "focus" node of the graph. If present, only
the nodes that are reachable via this node will be returned.
If null, nodes with no incoming or outgoing associations
are used as starting points for navigation of forward and
reverse relationships, respectively.resolveForward
- True means resolve in the direction of source to target.resolveBackward
- True means resolve in the direction of target to source.resolveCodedEntryDepth
- Depth in the graph to resolve coded entries. - 1 means don't
resolve anything - just return code references, 0 means
resolve just the root nodes, 1 means resolve 1 deep, etc.resolveAssociationDepth
- Number of hops to resolve associations. 0 means leave all
associations unresolved, 1 means immediate neighbors, etc. -1
means follow the entire closure of the graph.propertyNames
- Local names of properties to resolve. If not empty and not
null, only properties matching the given names are included
for resolved nodes.propertyTypes
- Indicates whether to resolve only specific property categories,
regardless of the assigned name. Any of the enumerated PropertyType
values can be specified. If not empty and not null, only
properties matching the given types are included for resolved
nodes.sortOptions
- List of sort options to apply during resolution. If supplied,
the sort algorithms will be applied in the order provided. Any
algorithms not valid to be applied in context of node set
iteration, as specified in the sort extension description,
will result in a parameter exception. Available algorithms can
be retrieved through the LexBIGService getSortExtensions()
method after being defined to the LexBIGServiceManager
extension registry.maxToReturn
- Maximum number of entries to return; a value less than 1
indicates to return unlimited entries (to the limit specified
in the runtime configuration file).Each entry will include basic information for the node along with an embedded object (e.g. concept) populated with requested properties.
Note that while the class of the returned value appears to imply concepts only, each contained reference inherits from the more general CodedNodeReference and is capable of representing any type of node contained by the graph.
LBInvocationException
LBParameterException
public ResolvedConceptReferenceList resolveAsList(ConceptReference graphFocus, boolean resolveForward, boolean resolveBackward, int resolveCodedEntryDepth, int resolveAssociationDepth, LocalNameList propertyNames, CodedNodeSet.PropertyType[] propertyTypes, SortOptionList sortOptions, LocalNameList filterOptions, int maxToReturn) throws LBInvocationException, LBParameterException
CodedNodeGraph
resolveAsList
in interface CodedNodeGraph
graphFocus
- Set the top or "focus" node of the graph. If present, only
the nodes that are reachable via this node will be returned.
If null, nodes with no incoming or outgoing associations
are used as starting points for navigation of forward and
reverse relationships, respectively.resolveForward
- True means resolve in the direction of source to target.resolveBackward
- True means resolve in the direction of target to source.resolveCodedEntryDepth
- Depth in the graph to resolve coded entries. - 1 means don't
resolve anything - just return the code references, 0 means
resolve just the root nodes, 1 means resolve 1 deep, etc.resolveAssociationDepth
- Number of hops to resolve associations. 0 means leave all
associations unresolved, 1 means immediate neighbors, etc. -1
means follow the entire closure of the graph.propertyNames
- Local names of properties to resolve. If not empty and not
null, only properties matching the given names are included
for resolved nodes.propertyTypes
- Indicates whether to resolve only specific property categories,
regardless of the assigned name. Any of the enumerated PropertyType
values can be specified. If not empty and not null, only
properties matching the given types are included for resolved
nodes.sortOptions
- List of sort options to apply during resolution. If supplied,
the sort algorithms will be applied in the order provided. Any
algorithms not valid to be applied in context of node set
iteration, as specified in the sort extension description,
will result in a parameter exception. Available algorithms can
be retrieved through the LexBIGService getSortExtensions()
method after being defined to the LexBIGServiceManager
extension registry.filterOptions
- List of Filter extensions to apply during resolution. If
supplied, filters are applied in the order provided. Each name
in the list must correspond to the name of a Filter
description as registered to the associated service. Available
Filter descriptions can be retrieved through the LexBIGService
getFilterExtensions() method after being defined to the
LexBIGServiceManager extension registry.maxToReturn
- Maximum number of entries to return; a value less than 1
indicates to return unlimited entries (to the limit specified
in the runtime configuration file).Note that while the class of the returned value appears to imply concepts only, each contained reference inherits from the more general CodedNodeReference and is capable of representing any type of node contained by the graph.
LBInvocationException
LBParameterException
public ResolvedConceptReferenceList resolveAsList(ConceptReference graphFocus, boolean resolveForward, boolean resolveBackward, int resolveCodedEntryDepth, int resolveAssociationDepth, LocalNameList propertyNames, CodedNodeSet.PropertyType[] propertyTypes, SortOptionList sortOptions, LocalNameList filterOptions, int maxToReturn, boolean keepLastAssociationLevelUnresolved) throws LBInvocationException, LBParameterException
CodedNodeGraph
resolveAsList
in interface CodedNodeGraph
graphFocus
- Set the top or "focus" node of the graph. If present, only
the nodes that are reachable via this node will be returned.
If null, nodes with no incoming or outgoing associations
are used as starting points for navigation of forward and
reverse relationships, respectively.resolveForward
- True means resolve in the direction of source to target.resolveBackward
- True means resolve in the direction of target to source.resolveCodedEntryDepth
- Depth in the graph to resolve coded entries. - 1 means don't
resolve anything - just return the code references, 0 means
resolve just the root nodes, 1 means resolve 1 deep, etc.resolveAssociationDepth
- Number of hops to resolve associations. 0 means leave all
associations unresolved, 1 means immediate neighbors, etc. -1
means follow the entire closure of the graph.propertyNames
- Local names of properties to resolve. If not empty and not
null, only properties matching the given names are included
for resolved nodes.propertyTypes
- Indicates whether to resolve only specific property categories,
regardless of the assigned name. Any of the enumerated PropertyType
values can be specified. If not empty and not null, only
properties matching the given types are included for resolved
nodes.sortOptions
- List of sort options to apply during resolution. If supplied,
the sort algorithms will be applied in the order provided. Any
algorithms not valid to be applied in context of node set
iteration, as specified in the sort extension description,
will result in a parameter exception. Available algorithms can
be retrieved through the LexBIGService getSortExtensions()
method after being defined to the LexBIGServiceManager
extension registry.filterOptions
- List of Filter extensions to apply during resolution. If
supplied, filters are applied in the order provided. Each name
in the list must correspond to the name of a Filter
description as registered to the associated service. Available
Filter descriptions can be retrieved through the LexBIGService
getFilterExtensions() method after being defined to the
LexBIGServiceManager extension registry.maxToReturn
- Maximum number of entries to return; a value less than 1
indicates to return unlimited entries (to the limit specified
in the runtime configuration file).keepLastAssociationLevelUnresolved
- Keep the last hop while resolving associations to the resolveAssociationDepth
unresolved. This is useful while drawing trees of an ontology and we need a
quick way to tell if the tree can be expanded further.Note that while the class of the returned value appears to imply concepts only, each contained reference inherits from the more general CodedNodeReference and is capable of representing any type of node contained by the graph.
LBInvocationException
LBParameterException
public abstract ResolvedConceptReferenceList doResolveAsList(ConceptReference graphFocus, boolean resolveForward, boolean resolveBackward, int resolveCodedEntryDepth, int resolveAssociationDepth, LocalNameList propertyNames, CodedNodeSet.PropertyType[] propertyTypes, SortOptionList sortOptions, LocalNameList filterOptions, int maxToReturn, boolean keepLastAssociationLevelUnresolved) throws LBInvocationException, LBParameterException
graphFocus
- the graph focusresolveForward
- the resolve forwardresolveBackward
- the resolve backwardresolveCodedEntryDepth
- the resolve coded entry depthresolveAssociationDepth
- the resolve association depthpropertyNames
- the property namespropertyTypes
- the property typessortOptions
- the sort optionsfilterOptions
- the filter optionsmaxToReturn
- the max to returnkeepLastAssociationLevelUnresolved
- the keep last association level unresolvedLBInvocationException
- the LB invocation exceptionLBParameterException
- the LB parameter exceptionpublic CodedNodeGraph intersect(CodedNodeGraph graph) throws LBInvocationException, LBParameterException
CodedNodeGraph
intersect
in interface CodedNodeGraph
graph
- Identifies the CodedNodeGraph to be intersected with.LBInvocationException
LBParameterException
public CodedNodeGraph union(CodedNodeGraph graph) throws LBInvocationException, LBParameterException
CodedNodeGraph
union
in interface CodedNodeGraph
graph
- Identifies the CodedNodeGraph to merge with.LBInvocationException
LBParameterException
public java.lang.Boolean isCodeInGraph(ConceptReference code) throws LBInvocationException, LBParameterException
CodedNodeGraph
isCodeInGraph
in interface CodedNodeGraph
code
- Identifies the coding scheme and code to test.LBInvocationException
LBParameterException
public java.util.List<java.lang.String> listCodeRelationships(ConceptReference sourceCode, ConceptReference targetCode, int distance) throws LBInvocationException, LBParameterException
CodedNodeGraph
listCodeRelationships
in interface CodedNodeGraph
sourceCode
- Source end of the association. If null, all sources for the
specified target are included.targetCode
- Target end of the association. If null, all targets for the
specified source are included.distance
- Distance (# of edges) source and target codes must have in
between. Must be positive & greater than zero.LBInvocationException
LBParameterException