Class Trs
- java.lang.Object
-
- com.sodius.oslc.core.model.Namespace
-
- com.sodius.oslc.core.trs.model.Trs
-
public class Trs extends Namespace
Namespace of Tracked Resource Set.See the Tracked Resource Set specification for details:
https://archive.open-services.net/wiki/core/TrackedResourceSet-2.0/- Since:
- 1.6.0
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
Trs.Readers
ProviderMessageBodyReader
s to de-serializeTrackedResourceSet
andChangeLog
instances, which cannot be de-serialized with default readers due to shapes using abstract classes.
-
Field Summary
Fields Modifier and Type Field Description static String
NAMESPACE_PREFIX
static String
NAMESPACE_URI
static String
PROPERTY_BASE
static String
PROPERTY_CHANGE
static String
PROPERTY_CHANGE_LOG
static String
PROPERTY_CHANGED
static String
PROPERTY_CUTOFFEVENT
static String
PROPERTY_ORDER
static String
PROPERTY_PREVIOUS
static String
PROPERTY_TRACKED_RESOURCE_SET
static String
PROPERTY_TRACKED_RESOURCE_SET_PROVIDER
static String
TYPE_BASE
static String
TYPE_CHANGE_LOG
static String
TYPE_CREATION
static String
TYPE_DELETION
static String
TYPE_MODIFICATION
static String
TYPE_TRACKED_RESOURCE_SET
static String
TYPE_TRACKED_RESOURCE_SET_PROVIDER
-
Method Summary
All Methods Static Methods Concrete Methods Deprecated Methods Modifier and Type Method Description static ChangeLog
getChangeLog(TrackedResourceSet trs)
Deprecated.UseTrackedResourceSet.getChangeLog()
directly.static Trs
getInstance()
static int
getOrder(ChangeEvent event)
Returns the change event order as anint
value.static void
setChangeLog(TrackedResourceSet trs, ChangeLog changeLog)
Deprecated.UseTrackedResourceSet.setChangeLog(ChangeLog)
directly.static void
setOrder(ChangeEvent event, int order)
Assigns the given order to the change event.-
Methods inherited from class com.sodius.oslc.core.model.Namespace
equals, getPrefix, getPrefixed, getQName, getUri, hashCode, parseQName, toString
-
-
-
-
Field Detail
-
NAMESPACE_URI
public static final String NAMESPACE_URI
- See Also:
- Constant Field Values
-
NAMESPACE_PREFIX
public static final String NAMESPACE_PREFIX
- See Also:
- Constant Field Values
-
TYPE_BASE
public static final String TYPE_BASE
- See Also:
- Constant Field Values
-
TYPE_CHANGE_LOG
public static final String TYPE_CHANGE_LOG
- See Also:
- Constant Field Values
-
TYPE_CREATION
public static final String TYPE_CREATION
- See Also:
- Constant Field Values
-
TYPE_DELETION
public static final String TYPE_DELETION
- See Also:
- Constant Field Values
-
TYPE_MODIFICATION
public static final String TYPE_MODIFICATION
- See Also:
- Constant Field Values
-
TYPE_TRACKED_RESOURCE_SET
public static final String TYPE_TRACKED_RESOURCE_SET
- See Also:
- Constant Field Values
-
TYPE_TRACKED_RESOURCE_SET_PROVIDER
public static final String TYPE_TRACKED_RESOURCE_SET_PROVIDER
- See Also:
- Constant Field Values
-
PROPERTY_BASE
public static final String PROPERTY_BASE
- See Also:
- Constant Field Values
-
PROPERTY_CHANGE_LOG
public static final String PROPERTY_CHANGE_LOG
- See Also:
- Constant Field Values
-
PROPERTY_CHANGED
public static final String PROPERTY_CHANGED
- See Also:
- Constant Field Values
-
PROPERTY_CHANGE
public static final String PROPERTY_CHANGE
- See Also:
- Constant Field Values
-
PROPERTY_CUTOFFEVENT
public static final String PROPERTY_CUTOFFEVENT
- See Also:
- Constant Field Values
-
PROPERTY_ORDER
public static final String PROPERTY_ORDER
- See Also:
- Constant Field Values
-
PROPERTY_PREVIOUS
public static final String PROPERTY_PREVIOUS
- See Also:
- Constant Field Values
-
PROPERTY_TRACKED_RESOURCE_SET
public static final String PROPERTY_TRACKED_RESOURCE_SET
- See Also:
- Constant Field Values
-
PROPERTY_TRACKED_RESOURCE_SET_PROVIDER
public static final String PROPERTY_TRACKED_RESOURCE_SET_PROVIDER
- See Also:
- Constant Field Values
-
-
Method Detail
-
getChangeLog
@Deprecated public static ChangeLog getChangeLog(TrackedResourceSet trs)
Deprecated.UseTrackedResourceSet.getChangeLog()
directly. This method will be removed in next version.Gets the change log of a Tracked Resource Set.- Parameters:
trs
- the Tracked Resource Set- Returns:
- changeLog the change log.
- Since:
- 1.12.0
-
setChangeLog
@Deprecated public static void setChangeLog(TrackedResourceSet trs, ChangeLog changeLog)
Deprecated.UseTrackedResourceSet.setChangeLog(ChangeLog)
directly. This method will be removed in next version.Sets the change log of a Tracked Resource Set. This method delegates to Lyo'sTrackedResourceSet.setChangeLog()
method. It enables binary compatibility with both Lyo 2.1, whose signature issetChangeLog(AbstractChangeLog)
, and higher versions, whose signature issetChangeLog(ChangeLog)
.- Parameters:
trs
- the Tracked Resource SetchangeLog
- the change log.- Since:
- 1.10.0
-
getOrder
public static int getOrder(ChangeEvent event)
Returns the change event order as anint
value.The TRS specification indicates a change event order is an XSD Integer. Such value should be represented with a Java
BigInteger
. This is what Lyo 5.0 does, but before that it was represented with Javaint
value.This method shall be used only when compatibility with all versions of Lyo is desired and when it is expected the change event orders do no exceed what can be represented with an
int
value.If Lyo 5.0 or higher is used, the conversion from
BigInteger
to anint
is analogous to a narrowing primitive conversion fromlong
toint
, as defined in section 5.1.3 of The Javaâ„¢ Language Specification: if thisBigInteger
is too big to fit in anint
, only the low-order 32 bits are returned. Note that this conversion can lose information about the overall magnitude of theBigInteger
value as well as return a result with the opposite sign.- Parameters:
event
- the change event- Returns:
- the change event converted to an int value.
- Since:
- 3.4.0
-
setOrder
public static void setOrder(ChangeEvent event, int order)
Assigns the given order to the change event.The TRS specification indicates a change event order is an XSD Integer. Such value should be represented with a Java
BigInteger
. This is what Lyo 5.0 does, but before that it was represented with Javaint
value.This method shall be used only when compatibility with all versions of Lyo is desired and when it is expected the change event orders do no exceed what can be represented with an
int
value.- Parameters:
event
- the change eventorder
- the order to assign- Since:
- 3.4.0
-
getInstance
public static Trs getInstance()
-
-