|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectcom.edustructures.sifworks.SIFVersion
public class SIFVersion
Encapsulates a SIF version number.
The ADK uses instances of SIFVersion rather than strings to identify
versions of SIF. Typically you do not need to obtain a SIFVersion instance
directly except for when initializing the class framework with the
ADK.initialize method. Rather, classes for which SIF version is
a property, such as SIFDataObject and Query, provide a getSIFVersion
method to obtain the version associated with an object.
| Field Summary | |
|---|---|
static SIFVersion |
LATEST
Identifies the latest SIF Specification supported by the SIFWorks ADK |
static SIFVersion |
SIF11
Identifies the SIF 1.1 Specification |
static SIFVersion |
SIF15r1
Identifies the SIF 1.5r1 Specification |
static SIFVersion |
SIF20
Identifies the SIF 2.0 Specification |
static SIFVersion |
SIF20r1
Identifies the SIF 2.0r1 Specification |
static SIFVersion |
SIF21
Identifies the SIF 2.1 Specification |
| Method Summary | |
|---|---|
int |
compareTo(SIFVersion version)
Compare this version to another |
static SIFVersion |
getLatest(int major)
Returns the latest SIFVersion supported by the ADK for the major version number of SIF specified. |
int |
getMajor()
Gets the major version number |
int |
getMinor()
Gets the minor version number |
int |
getRevision()
Gets the revision number |
java.lang.String |
getXmlns()
Get the SIF namespace for this version of the specification. |
static SIFVersion |
parse(java.lang.String versionStr)
Parse a SIFVersion from a string |
static SIFVersion |
parseXmlns(java.lang.String xmlns)
Parse a SIFVersion from a xmlns attribute value |
java.lang.String |
toString()
Gets the string representation of the version |
java.lang.String |
toSymbol()
Gets the string representation of the version using an underscore instead of a period as the delimiter |
| Methods inherited from class java.lang.Object |
|---|
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Field Detail |
|---|
public static final SIFVersion SIF11
public static final SIFVersion SIF15r1
public static final SIFVersion SIF20
public static final SIFVersion SIF20r1
public static final SIFVersion SIF21
public static final SIFVersion LATEST
| Method Detail |
|---|
public int getMajor()
public int getMinor()
public int getRevision()
public static SIFVersion parse(java.lang.String versionStr)
SIFVersion from a string
versionStr - A version string in the format "1.0r1"
java.lang.IllegalArgumentException - is thrown if the version string is invalidpublic static SIFVersion getLatest(int major)
SIFVersion.15r1
major -
public static SIFVersion parseXmlns(java.lang.String xmlns)
SIFVersion from a xmlns attribute valueIf the xmlns attribute is in the form "http://www.sifinfo.org/v1.0r1/messages", the version identified by the namespace is returned (e.g. "1.0r1"). If the xmlns attribute is in the form "http://www.sifinfo.org/infrastructure/1.x", the latest version of SIF identified by the major version number is returned.
xmlns - A SIF xmlns attribute value (e.g. "http://www.sifinfo.org/v1.0r1/messages",
"http://www.sifinfo.org/infrastructure/1x.", etc)
public java.lang.String getXmlns()
public int compareTo(SIFVersion version)
compareTo in interface java.lang.Comparable<SIFVersion>version - The version to compare
version, 0 if
the versions are equal, or 1 if this version is greater than
version or version is null.public java.lang.String toString()
toString in class java.lang.Objectpublic java.lang.String toSymbol()
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||