java.lang.Object
org.apache.jena.ontapi.utils.Graphs
Helper to work with
Jena Graph (generally with our UnionGraph) and with its related objects:
Triple and Node.- See Also:
-
GraphUtilGraphUtils
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic org.apache.jena.shared.PrefixMappingcollectPrefixes(Iterable<org.apache.jena.graph.Graph> graphs) Collects a prefixes' library from the collection of the graphs.static org.apache.jena.graph.NodecreateNode(String iri) Makes a fresh node instance according to the given iri.static org.apache.jena.graph.NodecreateOntologyHeaderNode(org.apache.jena.graph.Graph graph, String uriOrNull) Creates a new ontology header (uriOrBlank rdf:type owl:Ontology) if it is not present in the graph.static Stream<org.apache.jena.graph.Graph>dataGraphs(org.apache.jena.graph.Graph graph) Lists all indivisible graphs extracted from the composite or wrapper graph including the base as flat stream of non-composite (primitive) graphs.static booleandependsOn(org.apache.jena.graph.Graph left, org.apache.jena.graph.Graph right) Answerstrueif the left graph depends on the right one.static Stream<org.apache.jena.graph.Graph>directSubGraphs(org.apache.jena.graph.Graph graph) Extracts and lists all top-level sub-graphs from the given composite graph-container, that is allowed to be eitherUnionGraphorPolyadicorDyadic.static Optional<org.apache.jena.graph.Node>findOntologyNameNode(org.apache.jena.graph.Graph graph) Returns OWL Ontology ID (either object inany owl:versionIRI <uri>statement or subject in<uri> rdf:type owl:Ontologystatement).static Optional<org.apache.jena.graph.Node>findOntologyNameNode(org.apache.jena.graph.Graph graph, boolean allowMultipleOntologyHeaders) Returns OWL Ontology ID (either object inany owl:versionIRI <uri>statement or subject in<uri> rdf:type owl:Ontologystatement).static Optional<org.apache.jena.graph.Node>findVersionIRI(org.apache.jena.graph.Graph graph, org.apache.jena.graph.Node header) static Stream<UnionGraph>flatHierarchy(UnionGraph graph) Lists all graphs in the tree that is specified asUnionGraph.static Stream<org.apache.jena.graph.Graph>flatTree(org.apache.jena.graph.Graph graph, Function<org.apache.jena.graph.Graph, org.apache.jena.graph.Graph> getBase, Function<org.apache.jena.graph.Graph, Stream<org.apache.jena.graph.Graph>> listSubGraphs) Lists all indivisible data graphs extracted from the composite or wrapper graph;getImports(org.apache.jena.graph.Graph graph) Returns all uri-objects from the_:x owl:imports _:uristatements.getImports(org.apache.jena.graph.Graph graph, boolean allowMultipleOntologyHeaders) Returns all uri-objects from the_:x owl:imports _:uristatements.static org.apache.jena.graph.GraphgetPrimary(org.apache.jena.graph.Graph graph) Gets the base (primary) base graph from a composite or wrapper graph if it is possible otherwise returns the same graph.static intgetSpliteratorCharacteristics(org.apache.jena.graph.Graph graph) Returns aSpliteratorcharacteristics based on graph analysis.static booleanhasImports(org.apache.jena.graph.Graph graph, String uri) Answerstrueif the given uri is present in the import closure.static booleanhasOneOfType(org.apache.jena.graph.Node node, org.apache.jena.graph.Graph graph, Set<org.apache.jena.graph.Node> types) Answerstrue, if there is a declarationnode rdf:type $type, where $type is one of the specified types.static org.apache.jena.graph.TripleinvertTriple(org.apache.jena.graph.Triple triple) Inverts the given triple so that the new triple has the same subject as the given object, and the same object as the given subject.static booleanisDistinct(org.apache.jena.graph.Graph graph) Answerstrueiff the given graph is distinct.static booleanisGraphInf(org.apache.jena.graph.Graph graph) Answerstrueif the graph specified isInfGraph.static booleanisGraphMem(org.apache.jena.graph.Graph graph) Answerstrueif the graph specified isGraphMem.static booleanisNamedTriple(org.apache.jena.graph.Triple triple) Answerstrueif all parts of the given RDF triple are URIs (i.e., not blank nodes or literals).static booleanisOntGraph(org.apache.jena.graph.Graph graph) Checks whether the specified graph is ontological, that is, has an OWL header.static booleanisOntUnionGraph(UnionGraph graph, boolean allowMultipleOntologyHeaders) Checks whether the specified graph is ontological, that is, has a hierarchy synchronized with theowl:imports&owl:Ontologyrelationships.static booleanisSameBase(org.apache.jena.graph.Graph left, org.apache.jena.graph.Graph right) Answerstrueiff the two input graphs are based on the same primitive graph.static booleanisSized(org.apache.jena.graph.Graph graph) Answerstrueiff the givengraphhas known size and therefore the operationgraph.size()does not take significant efforts.static booleanisWrapper(org.apache.jena.graph.Graph g) Answerstrueif the given graph can be unwrapped.static org.apache.jena.util.iterator.ExtendedIterator<org.apache.jena.graph.Node>listAllNodes(org.apache.jena.graph.Graph graph) Lists all unique nodes in the given graph.static org.apache.jena.util.iterator.ExtendedIterator<String>listImports(org.apache.jena.graph.Graph graph, boolean allowMultipleOntologyHeaders) Returns anExtendedIteratorover all URIs from the_:x owl:imports _:uristatements.static org.apache.jena.util.iterator.ExtendedIterator<org.apache.jena.graph.Triple>listOntHeaderTriples(org.apache.jena.graph.Graph graph) Lists all triples which related to ontology header somehow.static org.apache.jena.util.iterator.ExtendedIterator<org.apache.jena.graph.Node>listOntologyNodes(org.apache.jena.graph.Graph graph) Lists all subjects fromuriOrBlankNode rdf:type owl:Ontologystatements.static org.apache.jena.util.iterator.ExtendedIterator<org.apache.jena.graph.Node>listSubjects(org.apache.jena.graph.Graph graph) Lists all unique subject nodes in the given graph.static org.apache.jena.util.iterator.ExtendedIterator<org.apache.jena.graph.Node>listSubjectsAndObjects(org.apache.jena.graph.Graph graph) Lists all unique nodes in the given graph, which are used in a subject or an object positions.static org.apache.jena.graph.NodemakeOntologyHeaderNode(org.apache.jena.graph.Graph graph, org.apache.jena.graph.Node newOntology) Creates (if absents) a new ontology header (node rdf:type owl:Ontology) for the specified node, removing existing ontology headers (if any) and moving their contents to the new header.static UnionGraphmakeOntUnion(org.apache.jena.graph.Graph graph, Collection<org.apache.jena.graph.Graph> repository, Function<org.apache.jena.graph.Graph, UnionGraph> wrapAsUnion) Assembles the hierarchical ontologyUnion Graphfrom the specified components in accordance with theirowl:importsandowl:Ontologydeclarations.static UnionGraphmakeOntUnionFrom(org.apache.jena.graph.Graph graph, Function<org.apache.jena.graph.Graph, UnionGraph> wrapAsUnion) Creates an ontologyUnionGraphfrom the specifiedgraphof arbitrary nature.static Optional<org.apache.jena.graph.Node>ontologyNode(org.apache.jena.graph.Graph graph) Returns the primary Ontology Node (the subject in the_:x rdf:type owl:Ontologystatement) within the given graph if it can be uniquely determined.static Optional<org.apache.jena.graph.Node>ontologyNode(org.apache.jena.graph.Graph graph, boolean allowMultipleOntologyHeaders) Returns the primary Ontology Node (the subject in the_:x rdf:type owl:Ontologystatement) within the given graph if it can be uniquely determined.static Comparator<org.apache.jena.graph.Node>rootNodeComparator(org.apache.jena.graph.Graph graph) Returns a comparator for root nodes.static longsize(org.apache.jena.graph.Graph graph) Returns the number of triples in thegraphaslong.static booleantestTypes(org.apache.jena.graph.Node node, org.apache.jena.graph.Graph graph, Set<org.apache.jena.graph.Node> whiteTypes, Set<org.apache.jena.graph.Node> blackTypes) Answerstrue, if there is a declarationnode rdf:type $type, where $type is from the white types list, but not from the black types list.static booleantestTypesUsingContains(org.apache.jena.graph.Node node, org.apache.jena.graph.Graph g, Set<org.apache.jena.graph.Node> whiteTypes, Set<org.apache.jena.graph.Node> blackTypes) static org.apache.jena.graph.Graphunwrap(org.apache.jena.graph.Graph graph) Unwraps the base (primary) base graph from a composite or wrapper graph if it is possible otherwise returns the same graph.
-
Constructor Details
-
Graphs
public Graphs()
-
-
Method Details
-
directSubGraphs
public static Stream<org.apache.jena.graph.Graph> directSubGraphs(org.apache.jena.graph.Graph graph) Extracts and lists all top-level sub-graphs from the given composite graph-container, that is allowed to be eitherUnionGraphorPolyadicorDyadic. If the graph is not of the list above, an empty stream is expected. The base graph is not included in the resulting stream. In case ofDyadic, the left graph is considered as a base and the right is a sub-graph.- Parameters:
graph-Graph- Returns:
StreamofGraphs- See Also:
-
getPrimary(Graph)UnionGraphPolyadicDyadic
-
getPrimary
public static org.apache.jena.graph.Graph getPrimary(org.apache.jena.graph.Graph graph) Gets the base (primary) base graph from a composite or wrapper graph if it is possible otherwise returns the same graph. If the specified graph isDyadic, the left part is considered as base graph.- Parameters:
graph-Graph- Returns:
Graph- See Also:
-
directSubGraphs(Graph)UnionGraphMultiUnionPolyadicDyadic
-
unwrap
public static org.apache.jena.graph.Graph unwrap(org.apache.jena.graph.Graph graph) Unwraps the base (primary) base graph from a composite or wrapper graph if it is possible otherwise returns the same graph. If the specified graph isDyadic, the left part is considered as base graph.- Parameters:
graph-Graph- Returns:
Graph- See Also:
-
isWrapper(Graph)UnionGraphMultiUnionPolyadicDyadicInfGraphGraphWrapperWrappedGraph
-
isWrapper
public static boolean isWrapper(org.apache.jena.graph.Graph g) Answerstrueif the given graph can be unwrapped.- Parameters:
g-Graph- Returns:
- boolean
- See Also:
-
isGraphMem
public static boolean isGraphMem(org.apache.jena.graph.Graph graph) Answerstrueif the graph specified isGraphMem.- Parameters:
graph-Graph- Returns:
boolean
-
isGraphInf
public static boolean isGraphInf(org.apache.jena.graph.Graph graph) Answerstrueif the graph specified isInfGraph.- Parameters:
graph-Graph- Returns:
boolean
-
dataGraphs
Lists all indivisible graphs extracted from the composite or wrapper graph including the base as flat stream of non-composite (primitive) graphs.- Parameters:
graph-Graph- Returns:
StreamofGraphs
-
flatTree
public static Stream<org.apache.jena.graph.Graph> flatTree(org.apache.jena.graph.Graph graph, Function<org.apache.jena.graph.Graph, org.apache.jena.graph.Graph> getBase, Function<org.apache.jena.graph.Graph, Stream<org.apache.jena.graph.Graph>> listSubGraphs) Lists all indivisible data graphs extracted from the composite or wrapper graph; -
isSameBase
public static boolean isSameBase(org.apache.jena.graph.Graph left, org.apache.jena.graph.Graph right) Answerstrueiff the two input graphs are based on the same primitive graph.- Parameters:
left-Graphright-Graph- Returns:
boolean
-
isDistinct
public static boolean isDistinct(org.apache.jena.graph.Graph graph) Answerstrueiff the given graph is distinct. A distinctGraphbehaves like aSet: for each pair of encountered triplest1, t2from any iterator,!t1.equals(t2).- Parameters:
graph-Graphto test- Returns:
booleanifgraphis distinct- See Also:
-
isSized
public static boolean isSized(org.apache.jena.graph.Graph graph) Answerstrueiff the givengraphhas known size and therefore the operationgraph.size()does not take significant efforts. Composite graphs are considered as sized only if they relay on a single base graph, since their sizes are not always a sum of part size.- Parameters:
graph-Graphto test- Returns:
booleanifgraphis sized- See Also:
-
size
public static long size(org.apache.jena.graph.Graph graph) Returns the number of triples in thegraphaslong.- Parameters:
graph-Graph, notnull- Returns:
long- See Also:
-
makeOntUnionFrom
public static UnionGraph makeOntUnionFrom(org.apache.jena.graph.Graph graph, Function<org.apache.jena.graph.Graph, UnionGraph> wrapAsUnion) Creates an ontologyUnionGraphfrom the specifiedgraphof arbitrary nature. The method can be used, for example, to transform the legacyMultiUnionGraph toUnionGraph.- Parameters:
graph-GraphwrapAsUnion-Functionto produce new instanceUnionGraphfromGraph- Returns:
UnionGraph
-
makeOntUnion
public static UnionGraph makeOntUnion(org.apache.jena.graph.Graph graph, Collection<org.apache.jena.graph.Graph> repository, Function<org.apache.jena.graph.Graph, UnionGraph> wrapAsUnion) Assembles the hierarchical ontologyUnion Graphfrom the specified components in accordance with theirowl:importsandowl:Ontologydeclarations. Irrelevant graphs are ignored.- Parameters:
graph-Graphrepository- aCollectionofgraphs to search in for missed dependencieswrapAsUnion-Functionto produce new instanceUnionGraphfromGraph- Returns:
UnionGraph
-
flatHierarchy
Lists all graphs in the tree that is specified asUnionGraph.- Parameters:
graph-UnionGraph- Returns:
StreamofUnionGraphs- See Also:
-
isOntGraph
public static boolean isOntGraph(org.apache.jena.graph.Graph graph) Checks whether the specified graph is ontological, that is, has an OWL header. This method does not check the graph for validity; it may still be misconfigured (if there are several headers).- Parameters:
graph-Graph- Returns:
- boolean
-
isOntUnionGraph
Checks whether the specified graph is ontological, that is, has a hierarchy synchronized with theowl:imports&owl:Ontologyrelationships.- Parameters:
graph-UnionGraphallowMultipleOntologyHeaders-boolean, seeontologyNode(Graph, boolean)for explanation- Returns:
- boolean
-
createOntologyHeaderNode
public static org.apache.jena.graph.Node createOntologyHeaderNode(org.apache.jena.graph.Graph graph, String uriOrNull) Creates a new ontology header (uriOrBlank rdf:type owl:Ontology) if it is not present in the graph. According to the OWL specification, each non-composite ontology graph must contain one and only one ontology header. If a well-formed header already exists, the method returns it unchanged. If there are multiple other headers, any extra headers will be removed, and the content will be moved to a new generated anonymous header.- Parameters:
graph-GraphuriOrNull- ontology header IRI, ifnullthen the method returns either existing anonymous header or generates new anonymous (blank) header- Returns:
- existing or new header
-
makeOntologyHeaderNode
public static org.apache.jena.graph.Node makeOntologyHeaderNode(org.apache.jena.graph.Graph graph, org.apache.jena.graph.Node newOntology) Creates (if absents) a new ontology header (node rdf:type owl:Ontology) for the specified node, removing existing ontology headers (if any) and moving their contents to the new header. Note that a valid ontology must have a single header, but there could be multiple headers in imports closure.- Parameters:
graph-GraphnewOntology-Nodethe new ontology header (iri or blank)- Returns:
newOntology
-
findOntologyNameNode
public static Optional<org.apache.jena.graph.Node> findOntologyNameNode(org.apache.jena.graph.Graph graph) Returns OWL Ontology ID (either object inany owl:versionIRI <uri>statement or subject in<uri> rdf:type owl:Ontologystatement).- Parameters:
graph-Graph- Returns:
OptionalwithNodeblank or URI, orOptional#emptyif the ontology Node cannot be uniquely defined or absent in thegraph- See Also:
-
findOntologyNameNode
public static Optional<org.apache.jena.graph.Node> findOntologyNameNode(org.apache.jena.graph.Graph graph, boolean allowMultipleOntologyHeaders) Returns OWL Ontology ID (either object inany owl:versionIRI <uri>statement or subject in<uri> rdf:type owl:Ontologystatement).- Parameters:
graph-GraphallowMultipleOntologyHeaders-boolean, seeontologyNode(Graph, boolean)for explanation- Returns:
OptionalwithNodeblank or URI, orOptional#emptyif the ontology Node cannot be uniquely defined or absent in thegraph- See Also:
-
findVersionIRI
public static Optional<org.apache.jena.graph.Node> findVersionIRI(org.apache.jena.graph.Graph graph, org.apache.jena.graph.Node header) - Parameters:
graph-Graphheader-Nodesubject fromheader rdf:type owl:Ontologystatement- Returns:
Optionalwith URINode
-
ontologyNode
public static Optional<org.apache.jena.graph.Node> ontologyNode(org.apache.jena.graph.Graph graph, boolean allowMultipleOntologyHeaders) Returns the primary Ontology Node (the subject in the_:x rdf:type owl:Ontologystatement) within the given graph if it can be uniquely determined. Note: it works with any graph, not necessarily with the base. A valid composite ontology graph a lot of ontological nodes are expected. IfallowMultipleOntologyHeaders = true, the most suitable ontology header will be chosen: if there are both uri and blank ontological nodes together in the graph, then the method prefers uri; if there are several ontological nodes of the same kind, it chooses the most cumbersome one.- Parameters:
graph-GraphallowMultipleOntologyHeaders-boolean- Returns:
Optionalaround theNodewhich could be uri or blank
-
ontologyNode
Returns the primary Ontology Node (the subject in the_:x rdf:type owl:Ontologystatement) within the given graph if it can be uniquely determined. Note: it works with any graph, not necessarily with the base. A valid composite ontology graph a lot of ontological nodes are expected.- Parameters:
graph-Graph- Returns:
Optionalaround theNodewhich could be uri or blank
-
rootNodeComparator
public static Comparator<org.apache.jena.graph.Node> rootNodeComparator(org.apache.jena.graph.Graph graph) Returns a comparator for root nodes. Tricky logic: first compares roots as standalone nodes and any uri-node is considered less than any blank-node, then compares roots as part of the graph using the rule 'the fewer children -> the greater weight'.- Parameters:
graph-Graph- Returns:
Comparator
-
listOntologyNodes
public static org.apache.jena.util.iterator.ExtendedIterator<org.apache.jena.graph.Node> listOntologyNodes(org.apache.jena.graph.Graph graph) Lists all subjects fromuriOrBlankNode rdf:type owl:Ontologystatements.- Parameters:
graph-Graph- Returns:
ExtendedIteratorofNode
-
getImports
Returns all uri-objects from the_:x owl:imports _:uristatements. In the case of composite graph, imports are listed transitively.- Parameters:
graph-Graph, notnull- Returns:
- unordered Set of uris from the whole graph (it may be composite)
-
getImports
public static Set<String> getImports(org.apache.jena.graph.Graph graph, boolean allowMultipleOntologyHeaders) Returns all uri-objects from the_:x owl:imports _:uristatements. In the case of composite graph, imports are listed transitively.- Parameters:
graph-Graph, notnullallowMultipleOntologyHeaders-boolean, seeontologyNode(Graph, boolean)for explanation- Returns:
- unordered Set of uris from the whole graph (it may be composite)
-
hasImports
Answerstrueif the given uri is present in the import closure.- Parameters:
graph-Graph, notnulluri- to test- Returns:
- boolean
-
listImports
public static org.apache.jena.util.iterator.ExtendedIterator<String> listImports(org.apache.jena.graph.Graph graph, boolean allowMultipleOntologyHeaders) Returns anExtendedIteratorover all URIs from the_:x owl:imports _:uristatements. In the case of composite graph, imports are listed transitively.- Parameters:
graph-Graph, notnullallowMultipleOntologyHeaders-boolean, seeontologyNode(Graph, boolean)for explanation- Returns:
ExtendedIteratorofString-URIs
-
listOntHeaderTriples
public static org.apache.jena.util.iterator.ExtendedIterator<org.apache.jena.graph.Triple> listOntHeaderTriples(org.apache.jena.graph.Graph graph) Lists all triples which related to ontology header somehow.- Parameters:
graph-Graph- Returns:
ExtendedIteratorofTriples
-
collectPrefixes
public static org.apache.jena.shared.PrefixMapping collectPrefixes(Iterable<org.apache.jena.graph.Graph> graphs) Collects a prefixes' library from the collection of the graphs.- Parameters:
graphs-Iterablea collection of graphs- Returns:
- unmodifiable (locked)
prefix mapping
-
dependsOn
public static boolean dependsOn(org.apache.jena.graph.Graph left, org.apache.jena.graph.Graph right) Answerstrueif the left graph depends on the right one.- Parameters:
left-Graphright-Graph- Returns:
trueif the left argument graph is dependent on the right
-
listSubjects
public static org.apache.jena.util.iterator.ExtendedIterator<org.apache.jena.graph.Node> listSubjects(org.apache.jena.graph.Graph graph) Lists all unique subject nodes in the given graph. Warning: the result is temporary stored in-memory!- Parameters:
graph-Graph, notnull- Returns:
- an
ExtendedIterator(distinct) of all subjects in the graph - Throws:
OutOfMemoryError- may occur while iterating, e.g.when the graph is huge so that all its subjects can be placed in memory as aSet- See Also:
-
GraphUtil.listSubjects(Graph, Node, Node)
-
listSubjectsAndObjects
public static org.apache.jena.util.iterator.ExtendedIterator<org.apache.jena.graph.Node> listSubjectsAndObjects(org.apache.jena.graph.Graph graph) Lists all unique nodes in the given graph, which are used in a subject or an object positions. Warning: the result is temporary stored in-memory!- Parameters:
graph-Graph, notnull- Returns:
- an
ExtendedIterator(distinct) of all subjects or objects in the graph - Throws:
OutOfMemoryError- while iterating in case the graph is too large so that all its subjects and objects can be placed in memory as aSet- See Also:
-
GraphUtils.allNodes(Graph)
-
listAllNodes
public static org.apache.jena.util.iterator.ExtendedIterator<org.apache.jena.graph.Node> listAllNodes(org.apache.jena.graph.Graph graph) Lists all unique nodes in the given graph. Warning: the result is temporary stored in-memory!- Parameters:
graph-Graph, notnull- Returns:
- an
ExtendedIterator(distinct) of all nodes in the graph - Throws:
OutOfMemoryError- while iterating in case the graph is too large to be placed in memory as aSet
-
createNode
Makes a fresh node instance according to the given iri.- Parameters:
iri- String, an IRI to create URI-Node ornullto create Blank-Node- Returns:
Node, notnull
-
isNamedTriple
public static boolean isNamedTriple(org.apache.jena.graph.Triple triple) Answerstrueif all parts of the given RDF triple are URIs (i.e., not blank nodes or literals).- Parameters:
triple- a regular graphTriple, notnull- Returns:
boolean
-
invertTriple
public static org.apache.jena.graph.Triple invertTriple(org.apache.jena.graph.Triple triple) Inverts the given triple so that the new triple has the same subject as the given object, and the same object as the given subject.- Parameters:
triple-SPOtheTriple, notnull- Returns:
Triple,OPS
-
getSpliteratorCharacteristics
public static int getSpliteratorCharacteristics(org.apache.jena.graph.Graph graph) Returns aSpliteratorcharacteristics based on graph analysis.- Parameters:
graph-Graph- Returns:
- int
-
hasOneOfType
public static boolean hasOneOfType(org.apache.jena.graph.Node node, org.apache.jena.graph.Graph graph, Set<org.apache.jena.graph.Node> types) Answerstrue, if there is a declarationnode rdf:type $type, where $type is one of the specified types.Impl note: depending on the type of the underlying graph, it may or may not be advantageous to get all types at once, or ask many separate queries. Heuristically, we assume that fine-grain queries to an inference graph are preferable, and all-at-once for other types, including persistent stores.
- Parameters:
node-Nodeto testgraph-Graphtypes- Set ofNode-types- Returns:
- boolean
-
testTypes
public static boolean testTypes(org.apache.jena.graph.Node node, org.apache.jena.graph.Graph graph, Set<org.apache.jena.graph.Node> whiteTypes, Set<org.apache.jena.graph.Node> blackTypes) Answerstrue, if there is a declarationnode rdf:type $type, where $type is from the white types list, but not from the black types list.Impl note: depending on the type of the underlying graph, it may or may not be advantageous to get all types at once, or ask many separate queries. Heuristically, we assume that fine-grain queries to an inference graph are preferable, and all-at-once for other types, including persistent stores.
- Parameters:
node-Nodeto testgraph-GraphwhiteTypes- Set ofNode-typesblackTypes- Set ofNode-types- Returns:
- boolean
-
testTypesUsingContains
-