org.LexGrid.LexBIG.cagrid.adapters
Class CodedNodeGraphGridAdapter

java.lang.Object
  extended by org.LexGrid.LexBIG.cagrid.adapters.CodedNodeGraphGridAdapter
All Implemented Interfaces:
java.io.Serializable, CodedNodeGraphGrid

public class CodedNodeGraphGridAdapter
extends java.lang.Object
implements CodedNodeGraphGrid

Author:
m005256
See Also:
Serialized Form

Constructor Summary
CodedNodeGraphGridAdapter(CodedNodeGraphClient client)
           
 
Method Summary
 CodeRelationship areCodesRelated(RelationshipTypeBasedPolicy policy, NameAndValue nameAndValue)
          Determine whether there is an directed edge (or transitive closure of an edge) from the source code to the target code in this graph.
 CodedNodeGraph getCodedNodeGraphInterface()
           
 EndpointReferenceType getEndpointReference()
           
 CodedNodeGraphGrid intersect(CodedNodeGraphGrid graph)
          Return the set of concepts and associations that are present in both graphs.
 CodeExistence isCodeInGraph(ConceptReference code)
          Determine whether the supplied concept code is in the graph.
 ConceptReferenceList listCodeRelationships(RelationshipDistanceBasedPolicy policy)
          Return a list of all of the associations in the graph that have the supplied source and target concepts or, if directOnly is false, all associations whose transitive closure has the supplied associations.
 java.util.List<java.lang.String> listCodeRelationships(RelationshipTypeBasedPolicy policy)
          Return a list of all of the associations in the graph that have the supplied source and target concepts or, if directOnly is false, all associations whose transitive closure has the supplied associations.
 ResolvedConceptReferenceList resolveAsList(GraphResolutionPolicy policy)
          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.
 CodedNodeGraphGrid 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.
 CodedNodeGraphGrid restrictToCodes(CodedNodeSetGrid 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.
 CodedNodeGraphGrid restrictToCodeSystem(CodingSchemeIdentification codingScheme)
          Restrict the graph to concept codes (source and target) that originate from the supplied code system.
 CodedNodeGraphGrid 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.
 CodedNodeGraphGrid restrictToSourceCodes(CodedNodeSetGrid codes)
          Restrict the graph to associations that have one of the codes in the supplied list as source codes.
 CodedNodeGraphGrid restrictToSourceCodeSystem(CodingSchemeIdentification codingScheme)
          Restrict the graph to edges that have concepts derived from the supplied code system as a source.
 CodedNodeGraphGrid restrictToTargetCodes(CodedNodeSetGrid codes)
          Restrict the graph to associations that have one of the codes in the supplied list as target codes.
 CodedNodeGraphGrid restrictToTargetCodeSystem(CodingSchemeIdentification codingScheme)
          Restrict the graph to edges that have concepts derived from the supplied code system as a target.
 CodedNodeSetGrid toNodeList(NodeListPolicy policy)
          Transform the graph into a simple of list of concept codes, removing all association information.
 CodedNodeGraphGrid union(CodedNodeGraphGrid graph)
          Return the union of the two graphs.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

CodedNodeGraphGridAdapter

public CodedNodeGraphGridAdapter(CodedNodeGraphClient client)
                          throws MalformedURIException,
                                 java.rmi.RemoteException
Throws:
MalformedURIException
java.rmi.RemoteException
Method Detail

areCodesRelated

public CodeRelationship areCodesRelated(RelationshipTypeBasedPolicy policy,
                                        NameAndValue nameAndValue)
                                 throws LBInvocationException,
                                        LBParameterException,
                                        java.rmi.RemoteException
Description copied from interface: CodedNodeGraphGrid
Determine whether there is an directed edge (or transitive closure of an edge) from the source code to the target code in this graph. The last parameter determines whether only direct associations are considered or whether the transitive closure of the edge is used.

Specified by:
areCodesRelated in interface CodedNodeGraphGrid
Parameters:
policy - Policy for resolving the relationship
nameAndValue - Identifies the association to be tested. The name and value will be compared against the local name and URN of supported associations for participating coding schemes.
Throws:
LBInvocationException
LBParameterException
java.rmi.RemoteException

intersect

public CodedNodeGraphGrid intersect(CodedNodeGraphGrid graph)
                             throws LBInvocationException,
                                    LBParameterException,
                                    InvalidServiceContextAccess,
                                    java.rmi.RemoteException
Description copied from interface: CodedNodeGraphGrid
Return the set of concepts and associations that are present in both graphs.

Specified by:
intersect in interface CodedNodeGraphGrid
Parameters:
graph - Identifies the CodedNodeGraph to be intersected with.
Returns:
A new CodedNodeGraph containing the intersection result.
Throws:
LBInvocationException
LBParameterException
InvalidServiceContextAccess
java.rmi.RemoteException

isCodeInGraph

public CodeExistence isCodeInGraph(ConceptReference code)
                            throws LBInvocationException,
                                   LBParameterException,
                                   InvalidServiceContextAccess,
                                   java.rmi.RemoteException
Description copied from interface: CodedNodeGraphGrid
Determine whether the supplied concept code is in the graph.

Specified by:
isCodeInGraph in interface CodedNodeGraphGrid
Parameters:
code - Identifies the coding scheme and concept code to test.
Returns:
CodeExistence True if the concept is present; otherwise False.
Throws:
LBInvocationException
LBParameterException
InvalidServiceContextAccess
java.rmi.RemoteException

listCodeRelationships

public java.util.List<java.lang.String> listCodeRelationships(RelationshipTypeBasedPolicy policy)
                                                       throws LBInvocationException,
                                                              LBParameterException,
                                                              InvalidServiceContextAccess,
                                                              java.rmi.RemoteException
Description copied from interface: CodedNodeGraphGrid
Return a list of all of the associations in the graph that have the supplied source and target concepts or, if directOnly is false, all associations whose transitive closure has the supplied associations.

Specified by:
listCodeRelationships in interface CodedNodeGraphGrid
Parameters:
policy - Policy for resolving the relationship
Returns:
The list of concept references for matching associations.
Throws:
LBInvocationException
LBParameterException
InvalidServiceContextAccess
java.rmi.RemoteException

resolveAsList

public ResolvedConceptReferenceList resolveAsList(GraphResolutionPolicy policy)
                                           throws LBInvocationException,
                                                  LBParameterException,
                                                  InvalidServiceContextAccess,
                                                  java.rmi.RemoteException
Description copied from interface: CodedNodeGraphGrid
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.

Specified by:
resolveAsList in interface CodedNodeGraphGrid
Parameters:
policy - Policy for resolving the relationship
Throws:
LBInvocationException
LBParameterException
InvalidServiceContextAccess
java.rmi.RemoteException

restrictToAssociations

public CodedNodeGraphGrid restrictToAssociations(NameAndValueList association,
                                                 NameAndValueList associationQualifiers)
                                          throws LBInvocationException,
                                                 LBParameterException,
                                                 InvalidServiceContextAccess,
                                                 java.rmi.RemoteException
Description copied from interface: CodedNodeGraphGrid
Restrict the graph to the nodes that participate as a source or target of the named association and, if supplied, the named association qualifiers.

Specified by:
restrictToAssociations in interface CodedNodeGraphGrid
Parameters:
association - List of associations used to restrict the graph. The name and value for each item in the list will be compared against the local name and URN 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 local name and URN of supported association qualifiers for participating coding schemes.
Returns:
A new CodedNodeGraph containing the filtered result.
Throws:
LBInvocationException
LBParameterException
InvalidServiceContextAccess
java.rmi.RemoteException

restrictToCodeSystem

public CodedNodeGraphGrid restrictToCodeSystem(CodingSchemeIdentification codingScheme)
                                        throws LBInvocationException,
                                               LBParameterException,
                                               InvalidServiceContextAccess,
                                               java.rmi.RemoteException
Description copied from interface: CodedNodeGraphGrid
Restrict the graph to concept codes (source and target) that originate from the supplied code system. Note: edges defined by other code systems will still be resolved if associated with both source and target nodes for the restricted code system.

Specified by:
restrictToCodeSystem in interface CodedNodeGraphGrid
Parameters:
codingScheme - The local name or URN of the coding scheme to filter on.
Returns:
A new CodedNodeGraph containing the filtered result.
Throws:
LBInvocationException
LBParameterException
InvalidServiceContextAccess
java.rmi.RemoteException

restrictToCodes

public CodedNodeGraphGrid restrictToCodes(CodedNodeSetGrid codes)
                                   throws LBInvocationException,
                                          LBParameterException,
                                          InvalidServiceContextAccess,
                                          java.rmi.RemoteException
Description copied from interface: CodedNodeGraphGrid
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.

Specified by:
restrictToCodes in interface CodedNodeGraphGrid
Parameters:
codes - Codes to filter on.
Returns:
A new CodedNodeGraph containing the filtered result.
Throws:
LBInvocationException
LBParameterException
InvalidServiceContextAccess
java.rmi.RemoteException

restrictToDirectionalNames

public CodedNodeGraphGrid restrictToDirectionalNames(NameAndValueList directionalNames,
                                                     NameAndValueList associationQualifiers)
                                              throws LBInvocationException,
                                                     LBParameterException,
                                                     InvalidServiceContextAccess,
                                                     java.rmi.RemoteException
Description copied from interface: CodedNodeGraphGrid
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. A directional name is considered to be either the forward or reverse label registered to an association defined by the ontology. Forward and reverse names are optionally assigned to each association. For example, an association 'lineage' may have a forward name 'ancestorOf' and reverse name 'descendentOf'.

Specified by:
restrictToDirectionalNames in interface CodedNodeGraphGrid
Parameters:
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 local name and URN of supported association qualifiers for participating coding schemes.
Returns:
A new CodedNodeGraph containing the filtered result.
Throws:
LBInvocationException
LBParameterException
InvalidServiceContextAccess
java.rmi.RemoteException

restrictToSourceCodeSystem

public CodedNodeGraphGrid restrictToSourceCodeSystem(CodingSchemeIdentification codingScheme)
                                              throws LBInvocationException,
                                                     LBParameterException,
                                                     InvalidServiceContextAccess,
                                                     java.rmi.RemoteException
Description copied from interface: CodedNodeGraphGrid
Restrict the graph to edges that have concepts derived from the supplied code system as a source.

Specified by:
restrictToSourceCodeSystem in interface CodedNodeGraphGrid
Parameters:
codingScheme - The local name or URN of the coding scheme to filter on.
Returns:
A new CodedNodeGraph containing the filtered result.
Throws:
LBInvocationException
LBParameterException
InvalidServiceContextAccess
java.rmi.RemoteException

restrictToSourceCodes

public CodedNodeGraphGrid restrictToSourceCodes(CodedNodeSetGrid codes)
                                         throws LBInvocationException,
                                                LBParameterException,
                                                InvalidServiceContextAccess,
                                                java.rmi.RemoteException
Description copied from interface: CodedNodeGraphGrid
Restrict the graph to associations that have one of the codes in the supplied list as source codes.

Specified by:
restrictToSourceCodes in interface CodedNodeGraphGrid
Parameters:
codes - Codes to filter on.
Returns:
A new CodedNodeGraph containing the filtered result.
Throws:
LBInvocationException
LBParameterException
InvalidServiceContextAccess
java.rmi.RemoteException

restrictToTargetCodeSystem

public CodedNodeGraphGrid restrictToTargetCodeSystem(CodingSchemeIdentification codingScheme)
                                              throws LBInvocationException,
                                                     LBParameterException,
                                                     InvalidServiceContextAccess,
                                                     java.rmi.RemoteException
Description copied from interface: CodedNodeGraphGrid
Restrict the graph to edges that have concepts derived from the supplied code system as a target.

Specified by:
restrictToTargetCodeSystem in interface CodedNodeGraphGrid
Parameters:
codingScheme - The local name or URN of the coding scheme to filter on.
Returns:
A new CodedNodeGraph containing the filtered result.
Throws:
LBInvocationException
LBParameterException
InvalidServiceContextAccess
java.rmi.RemoteException

restrictToTargetCodes

public CodedNodeGraphGrid restrictToTargetCodes(CodedNodeSetGrid codes)
                                         throws LBInvocationException,
                                                LBParameterException,
                                                InvalidServiceContextAccess,
                                                java.rmi.RemoteException
Description copied from interface: CodedNodeGraphGrid
Restrict the graph to associations that have one of the codes in the supplied list as target codes.

Specified by:
restrictToTargetCodes in interface CodedNodeGraphGrid
Parameters:
codes - Codes to filter on.
Returns:
A new CodedNodeGraph containing the filtered result.
Throws:
LBInvocationException
LBParameterException
InvalidServiceContextAccess
java.rmi.RemoteException

toNodeList

public CodedNodeSetGrid toNodeList(NodeListPolicy policy)
                            throws LBInvocationException,
                                   LBParameterException,
                                   InvalidServiceContextAccess,
                                   java.rmi.RemoteException
Description copied from interface: CodedNodeGraphGrid
Transform the graph into a simple of list of concept codes, removing all association information.

Specified by:
toNodeList in interface CodedNodeGraphGrid
Parameters:
policy - Policy for resolving the relationship
Throws:
LBInvocationException
LBParameterException
InvalidServiceContextAccess
java.rmi.RemoteException

union

public CodedNodeGraphGrid union(CodedNodeGraphGrid graph)
                         throws LBInvocationException,
                                LBParameterException,
                                InvalidServiceContextAccess,
                                java.rmi.RemoteException
Description copied from interface: CodedNodeGraphGrid
Return the union of the two graphs. Union, in this context, means that the resulting graph contains the unique set of coded entries (String independent) that are present in one or both of the graphs, and the unique combination of edges (associations) present in one or both of the graphs.

Specified by:
union in interface CodedNodeGraphGrid
Parameters:
graph - Identifies the CodedNodeGraph to merge with.
Returns:
A new CodedNodeGraph containing the merged result.
Throws:
LBInvocationException
LBParameterException
InvalidServiceContextAccess
java.rmi.RemoteException

getCodedNodeGraphInterface

public CodedNodeGraph getCodedNodeGraphInterface()
                                          throws java.lang.Exception
Throws:
java.lang.Exception

getEndpointReference

public EndpointReferenceType getEndpointReference()

listCodeRelationships

public ConceptReferenceList listCodeRelationships(RelationshipDistanceBasedPolicy policy)
                                           throws LBInvocationException,
                                                  LBParameterException,
                                                  InvalidServiceContextAccess,
                                                  java.rmi.RemoteException
Description copied from interface: CodedNodeGraphGrid
Return a list of all of the associations in the graph that have the supplied source and target concepts or, if directOnly is false, all associations whose transitive closure has the supplied associations.

Specified by:
listCodeRelationships in interface CodedNodeGraphGrid
Parameters:
policy - Policy for resolving the relationship
Returns:
The list of concept references for matching associations.
Throws:
LBInvocationException
LBParameterException
InvalidServiceContextAccess
java.rmi.RemoteException

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.