Class Meta
- java.lang.Object
-
- org.geneontology.obographs.core.model.AbstractMeta
-
- org.geneontology.obographs.core.model.Meta
-
@ParametersAreNonnullByDefault @Generated("org.immutables.processor.ProxyProcessor") @Immutable @CheckReturnValue public final class Meta extends AbstractMeta
A holder for metadata The information in a Meta object consists sets ofPropertyValueobjects, which associate the Meta object holder with some value via some property. The set of PropertyValue objects can be partitioned into two subsets: 1. PropertyValues corresponding to a specific explicitly modeled property type (e.g synonym) 2. genericBasicPropertyValues - anything property not explicitly modeled- Author:
- cjm
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classMeta.BuilderBuilds instances of typeMeta.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static MetacopyOf(AbstractMeta instance)Creates an immutable copy of aAbstractMetavalue.booleanequals(Object another)This instance is equal to all instances ofMetathat have equal attribute values.com.google.common.collect.ImmutableList<BasicPropertyValue>getBasicPropertyValues()com.google.common.collect.ImmutableList<String>getComments()DefinitionPropertyValuegetDefinition()booleangetDeprecated()com.google.common.collect.ImmutableList<String>getSubsets()com.google.common.collect.ImmutableList<SynonymPropertyValue>getSynonyms()StringgetVersion()com.google.common.collect.ImmutableList<XrefPropertyValue>getXrefs()com.google.common.collect.ImmutableList<String>getXrefsValues()inthashCode()Computes a hash code from attributes:definition,comments,subsets,synonyms,xrefs,xrefsValues,basicPropertyValues,version,deprecated.StringtoString()Prints the immutable valueMetawith attribute values.MetawithBasicPropertyValues(Iterable<? extends BasicPropertyValue> elements)Copy the current immutable object with elements that replace the content ofbasicPropertyValues.MetawithBasicPropertyValues(BasicPropertyValue... elements)Copy the current immutable object with elements that replace the content ofbasicPropertyValues.MetawithComments(Iterable<String> elements)Copy the current immutable object with elements that replace the content ofcomments.MetawithComments(String... elements)Copy the current immutable object with elements that replace the content ofcomments.MetawithDefinition(DefinitionPropertyValue value)Copy the current immutable object by setting a value for thedefinitionattribute.MetawithDeprecated(boolean value)Copy the current immutable object by setting a value for thedeprecatedattribute.MetawithSubsets(Iterable<String> elements)Copy the current immutable object with elements that replace the content ofsubsets.MetawithSubsets(String... elements)Copy the current immutable object with elements that replace the content ofsubsets.MetawithSynonyms(Iterable<? extends SynonymPropertyValue> elements)Copy the current immutable object with elements that replace the content ofsynonyms.MetawithSynonyms(SynonymPropertyValue... elements)Copy the current immutable object with elements that replace the content ofsynonyms.MetawithVersion(String value)Copy the current immutable object by setting a value for theversionattribute.MetawithXrefs(Iterable<? extends XrefPropertyValue> elements)Copy the current immutable object with elements that replace the content ofxrefs.MetawithXrefs(XrefPropertyValue... elements)Copy the current immutable object with elements that replace the content ofxrefs.MetawithXrefsValues(Iterable<String> elements)Copy the current immutable object with elements that replace the content ofxrefsValues.MetawithXrefsValues(String... elements)Copy the current immutable object with elements that replace the content ofxrefsValues.
-
-
-
Method Detail
-
getDefinition
@Nullable public DefinitionPropertyValue getDefinition()
- Specified by:
getDefinitionin classAbstractMeta- Returns:
- The value of the
definitionattribute
-
getComments
public com.google.common.collect.ImmutableList<String> getComments()
- Specified by:
getCommentsin classAbstractMeta- Returns:
- The value of the
commentsattribute
-
getSubsets
public com.google.common.collect.ImmutableList<String> getSubsets()
- Specified by:
getSubsetsin classAbstractMeta- Returns:
- The value of the
subsetsattribute
-
getSynonyms
public com.google.common.collect.ImmutableList<SynonymPropertyValue> getSynonyms()
- Specified by:
getSynonymsin classAbstractMeta- Returns:
- The value of the
synonymsattribute
-
getXrefs
public com.google.common.collect.ImmutableList<XrefPropertyValue> getXrefs()
- Specified by:
getXrefsin classAbstractMeta- Returns:
- The value of the
xrefsattribute
-
getXrefsValues
public com.google.common.collect.ImmutableList<String> getXrefsValues()
- Overrides:
getXrefsValuesin classAbstractMeta- Returns:
- The value of the
xrefsValuesattribute
-
getBasicPropertyValues
public com.google.common.collect.ImmutableList<BasicPropertyValue> getBasicPropertyValues()
- Specified by:
getBasicPropertyValuesin classAbstractMeta- Returns:
- The value of the
basicPropertyValuesattribute
-
getVersion
public String getVersion()
- Overrides:
getVersionin classAbstractMeta- Returns:
- The value of the
versionattribute
-
getDeprecated
public boolean getDeprecated()
- Overrides:
getDeprecatedin classAbstractMeta- Returns:
- The value of the
deprecatedattribute
-
withDefinition
public final Meta withDefinition(@Nullable DefinitionPropertyValue value)
Copy the current immutable object by setting a value for thedefinitionattribute. A shallow reference equality check is used to prevent copying of the same value by returningthis.- Parameters:
value- A new value for definition (can benull)- Returns:
- A modified copy of the
thisobject
-
withComments
public final Meta withComments(String... elements)
Copy the current immutable object with elements that replace the content ofcomments.- Parameters:
elements- The elements to set- Returns:
- A modified copy of
thisobject
-
withComments
public final Meta withComments(Iterable<String> elements)
Copy the current immutable object with elements that replace the content ofcomments. A shallow reference equality check is used to prevent copying of the same value by returningthis.- Parameters:
elements- An iterable of comments elements to set- Returns:
- A modified copy of
thisobject
-
withSubsets
public final Meta withSubsets(String... elements)
Copy the current immutable object with elements that replace the content ofsubsets.- Parameters:
elements- The elements to set- Returns:
- A modified copy of
thisobject
-
withSubsets
public final Meta withSubsets(Iterable<String> elements)
Copy the current immutable object with elements that replace the content ofsubsets. A shallow reference equality check is used to prevent copying of the same value by returningthis.- Parameters:
elements- An iterable of subsets elements to set- Returns:
- A modified copy of
thisobject
-
withSynonyms
public final Meta withSynonyms(SynonymPropertyValue... elements)
Copy the current immutable object with elements that replace the content ofsynonyms.- Parameters:
elements- The elements to set- Returns:
- A modified copy of
thisobject
-
withSynonyms
public final Meta withSynonyms(Iterable<? extends SynonymPropertyValue> elements)
Copy the current immutable object with elements that replace the content ofsynonyms. A shallow reference equality check is used to prevent copying of the same value by returningthis.- Parameters:
elements- An iterable of synonyms elements to set- Returns:
- A modified copy of
thisobject
-
withXrefs
public final Meta withXrefs(XrefPropertyValue... elements)
Copy the current immutable object with elements that replace the content ofxrefs.- Parameters:
elements- The elements to set- Returns:
- A modified copy of
thisobject
-
withXrefs
public final Meta withXrefs(Iterable<? extends XrefPropertyValue> elements)
Copy the current immutable object with elements that replace the content ofxrefs. A shallow reference equality check is used to prevent copying of the same value by returningthis.- Parameters:
elements- An iterable of xrefs elements to set- Returns:
- A modified copy of
thisobject
-
withXrefsValues
public final Meta withXrefsValues(String... elements)
Copy the current immutable object with elements that replace the content ofxrefsValues.- Parameters:
elements- The elements to set- Returns:
- A modified copy of
thisobject
-
withXrefsValues
public final Meta withXrefsValues(Iterable<String> elements)
Copy the current immutable object with elements that replace the content ofxrefsValues. A shallow reference equality check is used to prevent copying of the same value by returningthis.- Parameters:
elements- An iterable of xrefsValues elements to set- Returns:
- A modified copy of
thisobject
-
withBasicPropertyValues
public final Meta withBasicPropertyValues(BasicPropertyValue... elements)
Copy the current immutable object with elements that replace the content ofbasicPropertyValues.- Parameters:
elements- The elements to set- Returns:
- A modified copy of
thisobject
-
withBasicPropertyValues
public final Meta withBasicPropertyValues(Iterable<? extends BasicPropertyValue> elements)
Copy the current immutable object with elements that replace the content ofbasicPropertyValues. A shallow reference equality check is used to prevent copying of the same value by returningthis.- Parameters:
elements- An iterable of basicPropertyValues elements to set- Returns:
- A modified copy of
thisobject
-
withVersion
public final Meta withVersion(String value)
Copy the current immutable object by setting a value for theversionattribute. An equals check used to prevent copying of the same value by returningthis.- Parameters:
value- A new value for version- Returns:
- A modified copy of the
thisobject
-
withDeprecated
public final Meta withDeprecated(boolean value)
Copy the current immutable object by setting a value for thedeprecatedattribute. A value equality check is used to prevent copying of the same value by returningthis.- Parameters:
value- A new value for deprecated- Returns:
- A modified copy of the
thisobject
-
equals
public boolean equals(@Nullable Object another)This instance is equal to all instances ofMetathat have equal attribute values.
-
hashCode
public int hashCode()
Computes a hash code from attributes:definition,comments,subsets,synonyms,xrefs,xrefsValues,basicPropertyValues,version,deprecated.
-
toString
public String toString()
Prints the immutable valueMetawith attribute values.
-
copyOf
public static Meta copyOf(AbstractMeta instance)
Creates an immutable copy of aAbstractMetavalue. 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 Meta instance
-
-