Class DomainRangeAxiom
- java.lang.Object
-
- org.geneontology.obographs.core.model.axiom.AbstractDomainRangeAxiom
-
- org.geneontology.obographs.core.model.axiom.DomainRangeAxiom
-
- All Implemented Interfaces:
Comparable<AbstractDomainRangeAxiom>,Axiom
@ParametersAreNonnullByDefault @Generated("org.immutables.processor.ProxyProcessor") @Immutable @CheckReturnValue public final class DomainRangeAxiom extends AbstractDomainRangeAxiom
This combined ObjectPropertyDomain, ObjectPropertyRange, and some AllValuesFrom expressions into a single convenience structure- Author:
- cjm
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classDomainRangeAxiom.BuilderBuilds instances of typeDomainRangeAxiom.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static DomainRangeAxiomcopyOf(AbstractDomainRangeAxiom instance)Creates an immutable copy of aAbstractDomainRangeAxiomvalue.booleanequals(Object another)This instance is equal to all instances ofDomainRangeAxiomthat have equal attribute values.com.google.common.collect.ImmutableSet<Edge>getAllValuesFromEdges()Set of edges representing `X SubClassOf P only Y` axioms.com.google.common.collect.ImmutableSet<String>getDomainClassIds()For multiple domains, this is treated as intersectionMetagetMeta()StringgetPredicateId()com.google.common.collect.ImmutableSet<String>getRangeClassIds()For multiple ranges, this is treated as intersectioninthashCode()Computes a hash code from attributes:meta,predicateId,domainClassIds,rangeClassIds,allValuesFromEdges.StringtoString()Prints the immutable valueDomainRangeAxiomwith attribute values.DomainRangeAxiomwithAllValuesFromEdges(Iterable<? extends Edge> elements)Copy the current immutable object with elements that replace the content ofallValuesFromEdges.DomainRangeAxiomwithAllValuesFromEdges(Edge... elements)Copy the current immutable object with elements that replace the content ofallValuesFromEdges.DomainRangeAxiomwithDomainClassIds(Iterable<String> elements)Copy the current immutable object with elements that replace the content ofdomainClassIds.DomainRangeAxiomwithDomainClassIds(String... elements)Copy the current immutable object with elements that replace the content ofdomainClassIds.DomainRangeAxiomwithMeta(Meta value)Copy the current immutable object by setting a value for themetaattribute.DomainRangeAxiomwithPredicateId(String value)Copy the current immutable object by setting a value for thepredicateIdattribute.DomainRangeAxiomwithRangeClassIds(Iterable<String> elements)Copy the current immutable object with elements that replace the content ofrangeClassIds.DomainRangeAxiomwithRangeClassIds(String... elements)Copy the current immutable object with elements that replace the content ofrangeClassIds.-
Methods inherited from class org.geneontology.obographs.core.model.axiom.AbstractDomainRangeAxiom
compareTo
-
-
-
-
Method Detail
-
getMeta
@Nullable public Meta getMeta()
- Returns:
- the meta
-
getPredicateId
public String getPredicateId()
- Specified by:
getPredicateIdin classAbstractDomainRangeAxiom- Returns:
- the predicateId
-
getDomainClassIds
public com.google.common.collect.ImmutableSet<String> getDomainClassIds()
For multiple domains, this is treated as intersection- Specified by:
getDomainClassIdsin classAbstractDomainRangeAxiom- Returns:
- the domainClassIds
-
getRangeClassIds
public com.google.common.collect.ImmutableSet<String> getRangeClassIds()
For multiple ranges, this is treated as intersection- Specified by:
getRangeClassIdsin classAbstractDomainRangeAxiom- Returns:
- the rangeClassIds
-
getAllValuesFromEdges
public com.google.common.collect.ImmutableSet<Edge> getAllValuesFromEdges()
Set of edges representing `X SubClassOf P only Y` axioms.Note that these are not in the main graph.edges object, as the edge graph is intended to be an existential graph. Most applications that do not perform a reasoning function have no use for universal axioms.
- Specified by:
getAllValuesFromEdgesin classAbstractDomainRangeAxiom- Returns:
- the allValuesFromEdges
-
withMeta
public final DomainRangeAxiom withMeta(@Nullable Meta value)
Copy the current immutable object by setting a value for themetaattribute. A shallow reference equality check is used to prevent copying of the same value by returningthis.- Parameters:
value- A new value for meta (can benull)- Returns:
- A modified copy of the
thisobject
-
withPredicateId
public final DomainRangeAxiom withPredicateId(String value)
Copy the current immutable object by setting a value for thepredicateIdattribute. An equals check used to prevent copying of the same value by returningthis.- Parameters:
value- A new value for predicateId- Returns:
- A modified copy of the
thisobject
-
withDomainClassIds
public final DomainRangeAxiom withDomainClassIds(String... elements)
Copy the current immutable object with elements that replace the content ofdomainClassIds.- Parameters:
elements- The elements to set- Returns:
- A modified copy of
thisobject
-
withDomainClassIds
public final DomainRangeAxiom withDomainClassIds(Iterable<String> elements)
Copy the current immutable object with elements that replace the content ofdomainClassIds. A shallow reference equality check is used to prevent copying of the same value by returningthis.- Parameters:
elements- An iterable of domainClassIds elements to set- Returns:
- A modified copy of
thisobject
-
withRangeClassIds
public final DomainRangeAxiom withRangeClassIds(String... elements)
Copy the current immutable object with elements that replace the content ofrangeClassIds.- Parameters:
elements- The elements to set- Returns:
- A modified copy of
thisobject
-
withRangeClassIds
public final DomainRangeAxiom withRangeClassIds(Iterable<String> elements)
Copy the current immutable object with elements that replace the content ofrangeClassIds. A shallow reference equality check is used to prevent copying of the same value by returningthis.- Parameters:
elements- An iterable of rangeClassIds elements to set- Returns:
- A modified copy of
thisobject
-
withAllValuesFromEdges
public final DomainRangeAxiom withAllValuesFromEdges(Edge... elements)
Copy the current immutable object with elements that replace the content ofallValuesFromEdges.- Parameters:
elements- The elements to set- Returns:
- A modified copy of
thisobject
-
withAllValuesFromEdges
public final DomainRangeAxiom withAllValuesFromEdges(Iterable<? extends Edge> elements)
Copy the current immutable object with elements that replace the content ofallValuesFromEdges. A shallow reference equality check is used to prevent copying of the same value by returningthis.- Parameters:
elements- An iterable of allValuesFromEdges elements to set- Returns:
- A modified copy of
thisobject
-
equals
public boolean equals(@Nullable Object another)This instance is equal to all instances ofDomainRangeAxiomthat have equal attribute values.
-
hashCode
public int hashCode()
Computes a hash code from attributes:meta,predicateId,domainClassIds,rangeClassIds,allValuesFromEdges.
-
toString
public String toString()
Prints the immutable valueDomainRangeAxiomwith attribute values.
-
copyOf
public static DomainRangeAxiom copyOf(AbstractDomainRangeAxiom instance)
Creates an immutable copy of aAbstractDomainRangeAxiomvalue. Uses accessors to get values to initialize the new immutable instance. If an instance is already immutable, it is returned as is.- Parameters:
instance- The instance to copy- Returns:
- A copied immutable DomainRangeAxiom instance
-
-