|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.LexGrid.LexBIG.Impl.pagedgraph.AbstractCodedNodeGraph
org.LexGrid.LexBIG.Impl.pagedgraph.AbstractQueryBuildingCodedNodeGraph
public abstract class AbstractQueryBuildingCodedNodeGraph
The Class AbstractQueryBuildingCodedNodeGraph.
Constructor Summary | |
---|---|
AbstractQueryBuildingCodedNodeGraph()
|
|
AbstractQueryBuildingCodedNodeGraph(java.lang.String codingSchemeUri,
java.lang.String version,
java.lang.String relationsContainerName)
Instantiates a new paging coded node graph impl. |
Method Summary | |
---|---|
java.lang.Boolean |
areCodesRelated(NameAndValue association,
ConceptReference sourceCode,
ConceptReference targetCode,
boolean directOnly)
Determine whether there is an directed edge (or transitive closure of an edge) from the source code to the target code in this graph. |
protected boolean |
doGetAreCodesRelated(ConceptReference sourceCode,
ConceptReference targetCode,
NameAndValue association,
boolean directOnly)
|
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 ResolvedConceptReferenceList |
doResolveAsValidatedParameterList(ConceptReference graphFocus,
boolean resolveForward,
boolean resolveBackward,
int resolveCodedEntryDepth,
int resolveAssociationDepth,
LocalNameList propertyNames,
CodedNodeSet.PropertyType[] propertyTypes,
SortOptionList sortOptions,
LocalNameList filterOptions,
int maxToReturn,
boolean keepLastAssociationLevelUnresolved,
CycleDetectingCallback cycleDetectingCallback)
|
protected abstract ResolvedConceptReferenceList |
doResolveAsValidatedParameterList(ConceptReference graphFocus,
boolean resolveForward,
boolean resolveBackward,
int resolveCodedEntryDepth,
int resolveAssociationDepth,
LocalNameList propertyNames,
CodedNodeSet.PropertyType[] propertyTypes,
SortOptionList sortOptions,
LocalNameList filterOptions,
int maxToReturn,
boolean keepLastAssociationLevelUnresolved,
PagingCodedNodeGraphImpl.ArtificialRootResolvePolicy artificialRootResolvePolicy,
CycleDetectingCallback cycleDetectingCallback)
|
java.lang.String |
getCodingSchemeUri()
Gets the coding scheme uri. |
GraphQueryBuilder |
getGraphQueryBuilder()
Gets the graph query builder. |
java.lang.String |
getRelationsContainerName()
Gets the relations container name. |
java.lang.String |
getVersion()
Gets the version. |
boolean |
isStrictFocusValidation()
|
java.util.List<java.lang.String> |
listCodeRelationships(ConceptReference sourceCode,
ConceptReference targetCode,
boolean directOnly)
Return a list of all of the associations in the graph that have the supplied source and target codes or, if directOnly is false, all associations whose transitive closure has the supplied associations. |
CodedNodeGraph |
restrictToAnonymous(java.lang.Boolean restrictToAnonymous)
Return a graph that contains only the codes that are either Anonymous, Non-Anonymous, or Not Specified in the supplied list, and all edges that still have a source and target code remaining. |
CodedNodeGraph |
restrictToAssociations(NameAndValueList association,
NameAndValueList associationQualifiers)
Restrict the graph to the nodes that participate as a source or target of the named association and, if supplied, the named association qualifiers. |
CodedNodeGraph |
restrictToCodes(CodedNodeSet codes)
Return a graph that contains only the codes that are present in the supplied list, and all edges that still have a source and target code remaining. |
CodedNodeGraph |
restrictToCodeSystem(java.lang.String codingScheme)
Restrict the graph to codes (source and target) that originate from the supplied code system. |
CodedNodeGraph |
restrictToDirectionalNames(NameAndValueList directionalNames,
NameAndValueList associationQualifiers)
Restrict the graph to the nodes that participate as a source or target of an association whose directional name matches the one provided and, if supplied, the named association qualifiers. |
CodedNodeGraph |
restrictToEntityTypes(LocalNameList localNameList)
Return a graph that contains only the codes that contain an Entity Type in the supplied list, and all edges that still have a source and target code remaining. |
CodedNodeGraph |
restrictToSourceCodes(CodedNodeSet codes)
Restrict the graph to associations that have one of the codes in the supplied list as source codes. |
CodedNodeGraph |
restrictToSourceCodeSystem(java.lang.String codingScheme)
Restrict the graph to edges that have codes from the specified code system as a source. |
CodedNodeGraph |
restrictToTargetCodes(CodedNodeSet codes)
Restrict the graph to associations that have one of the codes in the supplied list as target codes. |
CodedNodeGraph |
restrictToTargetCodeSystem(java.lang.String codingScheme)
Restrict the graph to edges that have codes from the specified code system as a target. |
void |
setCodingSchemeUri(java.lang.String codingSchemeUri)
Sets the coding scheme uri. |
void |
setGraphQueryBuilder(GraphQueryBuilder graphQueryBuilder)
Sets the graph query builder. |
void |
setRelationsContainerName(java.lang.String relationsContainerName)
Sets the relations container name. |
void |
setStrictFocusValidation(boolean strictFocusValidation)
|
void |
setVersion(java.lang.String version)
Sets the version. |
CodedNodeSet |
toNodeList(ConceptReference graphFocus,
boolean resolveForward,
boolean resolveBackward,
int resolveAssociationDepth,
int maxToReturn)
Transform the graph into a simple of list of code references, removing all association information. |
Methods inherited from class org.LexGrid.LexBIG.Impl.pagedgraph.AbstractCodedNodeGraph |
---|
getLogger, intersect, isCodeInGraph, listCodeRelationships, resolveAsList, resolveAsList, resolveAsList, union |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public AbstractQueryBuildingCodedNodeGraph()
public AbstractQueryBuildingCodedNodeGraph(java.lang.String codingSchemeUri, java.lang.String version, java.lang.String relationsContainerName) throws LBParameterException
codingSchemeUri
- the coding scheme uriversion
- the versionrelationsContainerName
- the relations container name
LBParameterException
Method Detail |
---|
public java.util.List<java.lang.String> listCodeRelationships(ConceptReference sourceCode, ConceptReference targetCode, boolean directOnly) throws LBInvocationException, LBParameterException
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.directOnly
- True means only direct associations are tested. False means
that the transitive closure of transitive (and undefined)
associations are tested for membership.
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 java.lang.Boolean areCodesRelated(NameAndValue association, ConceptReference sourceCode, ConceptReference targetCode, boolean directOnly) throws LBInvocationException, LBParameterException
CodedNodeGraph
association
- Identifies the association to be tested. The name and value
will be compared against the id and URI of supported
associations for participating coding schemes.sourceCode
- Source code system/code to be tested.targetCode
- Target code system/code to be tested.directOnly
- True means only asserted association instances are tested.
False means that, if the association is defined as transitive,
the transitive closure of the association instances are
tested.
LBInvocationException
LBParameterException
public 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
AbstractCodedNodeGraph
doResolveAsList
in class AbstractCodedNodeGraph
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 unresolved
LBInvocationException
- the LB invocation exception
LBParameterException
- the LB parameter exceptionprotected ResolvedConceptReferenceList doResolveAsValidatedParameterList(ConceptReference graphFocus, boolean resolveForward, boolean resolveBackward, int resolveCodedEntryDepth, int resolveAssociationDepth, LocalNameList propertyNames, CodedNodeSet.PropertyType[] propertyTypes, SortOptionList sortOptions, LocalNameList filterOptions, int maxToReturn, boolean keepLastAssociationLevelUnresolved, CycleDetectingCallback cycleDetectingCallback) throws LBInvocationException, LBParameterException
LBInvocationException
LBParameterException
protected abstract ResolvedConceptReferenceList doResolveAsValidatedParameterList(ConceptReference graphFocus, boolean resolveForward, boolean resolveBackward, int resolveCodedEntryDepth, int resolveAssociationDepth, LocalNameList propertyNames, CodedNodeSet.PropertyType[] propertyTypes, SortOptionList sortOptions, LocalNameList filterOptions, int maxToReturn, boolean keepLastAssociationLevelUnresolved, PagingCodedNodeGraphImpl.ArtificialRootResolvePolicy artificialRootResolvePolicy, CycleDetectingCallback cycleDetectingCallback) throws LBInvocationException, LBParameterException
LBInvocationException
LBParameterException
protected boolean doGetAreCodesRelated(ConceptReference sourceCode, ConceptReference targetCode, NameAndValue association, boolean directOnly) throws LBParameterException, LBInvocationException
LBParameterException
LBInvocationException
public CodedNodeGraph restrictToAssociations(NameAndValueList association, NameAndValueList associationQualifiers) throws LBInvocationException, LBParameterException
CodedNodeGraph
association
- List of associations used to restrict the graph. The name and
value for each item in the list will be compared against the
id and URI of supported associations for participating
coding schemes.associationQualifiers
- If supplied, restriction only applies to associations that are
qualified by one or more of the supplied qualifiers. The name
and value for each item in the list will be compared against
the id and URI of supported association qualifiers for
participating coding schemes.
LBInvocationException
LBParameterException
public CodedNodeGraph restrictToCodeSystem(java.lang.String codingScheme) throws LBInvocationException, LBParameterException
CodedNodeGraph
codingScheme
- The local name or URI of the coding scheme to filter on.
LBInvocationException
LBParameterException
public CodedNodeGraph restrictToAnonymous(java.lang.Boolean restrictToAnonymous) throws LBInvocationException, LBParameterException
CodedNodeGraph
LBInvocationException
- the LB invocation exception
LBParameterException
- the LB parameter exceptionpublic CodedNodeGraph restrictToEntityTypes(LocalNameList localNameList) throws LBInvocationException, LBParameterException
CodedNodeGraph
localNameList
- the local name list
LBInvocationException
- the LB invocation exception
LBParameterException
- the LB parameter exceptionpublic CodedNodeGraph restrictToCodes(CodedNodeSet codes) throws LBInvocationException, LBParameterException
CodedNodeGraph
codes
- Codes to filter on.
LBInvocationException
LBParameterException
public CodedNodeGraph restrictToDirectionalNames(NameAndValueList directionalNames, NameAndValueList associationQualifiers) throws LBInvocationException, LBParameterException
CodedNodeGraph
directionalNames
- List of directionalNames used to restrict the graph. A
directional name is compared against the forward and reverse
names for defined associations. If a given name matches more
than one forward or reverse label, all corresponding
associations are included in the restriction.associationQualifiers
- If supplied, restriction only applies to associations that are
qualified by one or more of the supplied qualifiers. The name
and value for each item in the list will be compared against
the id and URI of supported association qualifiers for
participating coding schemes.
LBInvocationException
- ,LBParameterException
LBParameterException
public CodedNodeGraph restrictToSourceCodeSystem(java.lang.String codingScheme) throws LBInvocationException, LBParameterException
CodedNodeGraph
codingScheme
- The local name or URI of the coding scheme to filter on.
LBInvocationException
LBParameterException
public CodedNodeGraph restrictToSourceCodes(CodedNodeSet codes) throws LBInvocationException, LBParameterException
CodedNodeGraph
codes
- Codes to filter on.
LBInvocationException
LBParameterException
public CodedNodeGraph restrictToTargetCodeSystem(java.lang.String codingScheme) throws LBInvocationException, LBParameterException
CodedNodeGraph
codingScheme
- The local name or URI of the coding scheme to filter on.
LBInvocationException
LBParameterException
public CodedNodeGraph restrictToTargetCodes(CodedNodeSet codes) throws LBInvocationException, LBParameterException
CodedNodeGraph
codes
- Codes to filter on.
LBInvocationException
LBParameterException
public CodedNodeSet toNodeList(ConceptReference graphFocus, boolean resolveForward, boolean resolveBackward, int resolveAssociationDepth, int maxToReturn) throws LBInvocationException, LBParameterException
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 include all "forward" (source->target)
associations.resolveBackward
- True means render all "reverse" (target->source) associationsresolveAssociationDepth
- 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.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).
LBInvocationException
LBParameterException
public GraphQueryBuilder getGraphQueryBuilder()
public void setGraphQueryBuilder(GraphQueryBuilder graphQueryBuilder)
graphQueryBuilder
- the new graph query builderpublic java.lang.String getCodingSchemeUri()
public void setCodingSchemeUri(java.lang.String codingSchemeUri)
codingSchemeUri
- the new coding scheme uripublic java.lang.String getVersion()
public void setVersion(java.lang.String version)
version
- the new versionpublic java.lang.String getRelationsContainerName()
public void setRelationsContainerName(java.lang.String relationsContainerName)
relationsContainerName
- the new relations container namepublic void setStrictFocusValidation(boolean strictFocusValidation)
public boolean isStrictFocusValidation()
|
Copyright: (c) 2004-2006 Mayo Foundation for Medical Education and Research (MFMER). All rights reserved. MAYO, MAYO CLINIC, and the triple-shield Mayo logo are trademarks and service marks of MFMER. | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |