Package org.molgenis.vibe.core.formats
Class Source
- java.lang.Object
-
- org.molgenis.vibe.core.formats.Source
-
- All Implemented Interfaces:
Comparable<Source>,ResourceUri
public class Source extends Object implements ResourceUri, Comparable<Source>
Describes the source (the database) for a specific piece of information. Based on the DisGeNET sources/levels.
Note that different versions of DisGeNET could refer to the same source, but have a different IRI to that source (for example due to using a different version of that database). To provide interoperability between different versions, The IRI's are therefore used as identifiers. The name could be identical and for the end-user the difference might not be that big, but from a design perspective these are treated as different @Sources, though in practice it might be the same source (or even the same version of that source).
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classSource.LevelThe possibleSourcelevels.
-
Constructor Summary
Constructors Constructor Description Source(URI uri, String name, String level)A constructor for describing a source with anURIid from an RDF database.Source(URI uri, String name, Source.Level level)A constructor for describing a source with anURIid from an RDF database.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description intcompareTo(Source o)booleanequals(Object o)StringgetFullName()Retrieves the full name.Source.LevelgetLevel()StringgetName()Retrieves the short name (first word only).URIgetUri()inthashCode()StringtoString()
-
-
-
Constructor Detail
-
Source
public Source(URI uri, String name, Source.Level level)
A constructor for describing a source with anURIid from an RDF database.- Parameters:
uri-name-level-
-
Source
public Source(URI uri, String name, String level) throws InvalidStringFormatException
A constructor for describing a source with anURIid from an RDF database.- Parameters:
uri-name-level-- Throws:
InvalidStringFormatException- iflevelcould not be converted into an appropriateSource.Level
-
-
Method Detail
-
getName
public String getName()
Retrieves the short name (first word only).- Returns:
- the
Sourcename
-
getLevel
public Source.Level getLevel()
-
getUri
public URI getUri()
- Specified by:
getUriin interfaceResourceUri
-
compareTo
public int compareTo(Source o)
- Specified by:
compareToin interfaceComparable<Source>
-
-