Class Check
java.lang.Object
net.ontopia.topicmaps.impl.tmapi2.Check
INTERNAL: Provides various argument constraint checks.
-
Method Summary
Modifier and TypeMethodDescriptionstatic voiddatatypeNotNull(org.tmapi.core.Locator loc) Throws a IllegalArgumentException if the datatype isnullstatic voiditemIdentifierNotNull(org.tmapi.core.Construct sender, org.tmapi.core.Locator loc) static voidlocatorNotNull(org.tmapi.core.Locator loc) Throws a IllegalArgumentException if the locator isnullstatic voidplayerInTopicMap(org.tmapi.core.TopicMap topicMap, org.tmapi.core.Topic player) Checks if the player is in the topic mapstatic voidplayerNotNull(org.tmapi.core.Construct sender, org.tmapi.core.Topic player) Throws aModelConstraintExceptioniff the player is null.static voidreifierInTopicMap(org.tmapi.core.TopicMap topicMap, org.tmapi.core.Topic reifier) Checks if the reifier is in the topic mapstatic voidscopeInTopicMap(org.tmapi.core.TopicMap topicMap, org.tmapi.core.Topic... scope) Checks if the scope is in the topic mapstatic voidscopeNotEmpty(org.tmapi.core.Construct sender, Collection<org.tmapi.core.Topic> scope) Throws aModelConstraintExceptioniff the scope is empty.static voidscopeNotEmpty(org.tmapi.core.Construct sender, org.tmapi.core.Topic[] scope) Throws aModelConstraintExceptioniff the scope is empty.static voidscopeNotNull(org.tmapi.core.Construct sender, Collection<org.tmapi.core.Topic> scope) Throws aModelConstraintExceptioniff the scope is null.static voidscopeNotNull(org.tmapi.core.Construct sender, org.tmapi.core.Topic[] scope) Throws aModelConstraintExceptioniff the scope is null.static voidsubjectIdentifierNotNull(org.tmapi.core.Construct sender, org.tmapi.core.Locator loc) static voidsubjectIdentifierNotNull(org.tmapi.core.Locator sid) Throws a IllegalArgumentException if the subject identifier isnullstatic voidsubjectLocatorNotNull(org.tmapi.core.Construct sender, org.tmapi.core.Locator loc) static voidsubjectLocatorNotNull(org.tmapi.core.Locator loc) Throws a IllegalArgumentException if the subject locator isnullstatic voidthemeNotNull(org.tmapi.core.Construct sender, org.tmapi.core.Topic theme) Throws aModelConstraintExceptioniff the theme is null.static voidthemeNotNull(org.tmapi.core.Topic theme) Throws aIllegalArgumentExceptioniff the theme is null.static voidthemeNotNull(org.tmapi.core.Topic... themes) Throws aIllegalArgumentExceptioniff the theme is null.static voidtypeInTopicMap(org.tmapi.core.TopicMap topicMap, org.tmapi.core.Topic type) Checks if the type is in the topic mapstatic voidtypeNotNull(org.tmapi.core.Construct sender, org.tmapi.core.Topic type) Throws aModelConstraintExceptioniff the type is null.static voidtypeNotNull(org.tmapi.core.Topic type) Throws aIllegalArgumentExceptioniff the type is null.static voidvalueNotNull(Object value) Throws a IllegalArgumentException if the value isnullstatic voidvalueNotNull(org.tmapi.core.Construct sender, Object value) Throws aModelConstraintExceptioniff the value is null.static voidvalueNotNull(org.tmapi.core.Construct sender, Object value, org.tmapi.core.Locator datatype) Throws aModelConstraintExceptioniff the value or the datatype is null.
-
Method Details
-
scopeNotNull
public static void scopeNotNull(org.tmapi.core.Construct sender, org.tmapi.core.Topic[] scope) Throws aModelConstraintExceptioniff the scope is null.- Parameters:
sender- The sender.scope- The scope.
-
themeNotNull
public static void themeNotNull(org.tmapi.core.Construct sender, org.tmapi.core.Topic theme) Throws aModelConstraintExceptioniff the theme is null.- Parameters:
sender- The sender.theme- The theme.
-
scopeNotNull
public static void scopeNotNull(org.tmapi.core.Construct sender, Collection<org.tmapi.core.Topic> scope) Throws aModelConstraintExceptioniff the scope is null.- Parameters:
sender- The sender.scope- The scope.
-
scopeNotEmpty
public static void scopeNotEmpty(org.tmapi.core.Construct sender, Collection<org.tmapi.core.Topic> scope) Throws aModelConstraintExceptioniff the scope is empty.- Parameters:
sender- The sender.scope- The scope.
-
scopeNotEmpty
public static void scopeNotEmpty(org.tmapi.core.Construct sender, org.tmapi.core.Topic[] scope) Throws aModelConstraintExceptioniff the scope is empty.- Parameters:
sender- The sender.scope- The scope.
-
typeNotNull
public static void typeNotNull(org.tmapi.core.Construct sender, org.tmapi.core.Topic type) Throws aModelConstraintExceptioniff the type is null.- Parameters:
sender- The sender.type- The type.
-
valueNotNull
Throws aModelConstraintExceptioniff the value is null.- Parameters:
sender- The sender.value- The value.
-
valueNotNull
public static void valueNotNull(org.tmapi.core.Construct sender, Object value, org.tmapi.core.Locator datatype) Throws aModelConstraintExceptioniff the value or the datatype is null.- Parameters:
sender- The sender.value- The value.datatype- The datatype.
-
playerNotNull
public static void playerNotNull(org.tmapi.core.Construct sender, org.tmapi.core.Topic player) Throws aModelConstraintExceptioniff the player is null.- Parameters:
sender- The sender.player- The player.
-
subjectIdentifierNotNull
public static void subjectIdentifierNotNull(org.tmapi.core.Construct sender, org.tmapi.core.Locator loc) -
subjectLocatorNotNull
public static void subjectLocatorNotNull(org.tmapi.core.Construct sender, org.tmapi.core.Locator loc) -
itemIdentifierNotNull
public static void itemIdentifierNotNull(org.tmapi.core.Construct sender, org.tmapi.core.Locator loc) -
subjectLocatorNotNull
public static void subjectLocatorNotNull(org.tmapi.core.Locator loc) Throws a IllegalArgumentException if the subject locator isnull- Parameters:
loc- the locator to check
-
subjectIdentifierNotNull
public static void subjectIdentifierNotNull(org.tmapi.core.Locator sid) Throws a IllegalArgumentException if the subject identifier isnull- Parameters:
sid- the identifier to check
-
valueNotNull
Throws a IllegalArgumentException if the value isnull- Parameters:
value- the value to check
-
locatorNotNull
public static void locatorNotNull(org.tmapi.core.Locator loc) Throws a IllegalArgumentException if the locator isnull- Parameters:
loc- the locator to check
-
datatypeNotNull
public static void datatypeNotNull(org.tmapi.core.Locator loc) Throws a IllegalArgumentException if the datatype isnull- Parameters:
loc- the locator to check
-
themeNotNull
public static void themeNotNull(org.tmapi.core.Topic theme) Throws aIllegalArgumentExceptioniff the theme is null.- Parameters:
theme- The theme.
-
themeNotNull
public static void themeNotNull(org.tmapi.core.Topic... themes) Throws aIllegalArgumentExceptioniff the theme is null.- Parameters:
themes- The array of themes.
-
typeNotNull
public static void typeNotNull(org.tmapi.core.Topic type) Throws aIllegalArgumentExceptioniff the type is null.- Parameters:
type- The type.
-
scopeInTopicMap
public static void scopeInTopicMap(org.tmapi.core.TopicMap topicMap, org.tmapi.core.Topic... scope) Checks if the scope is in the topic map- Parameters:
topicMap- the topicMap creating a scoped statementscope- an array of themes (scope types)- Throws:
org.tmapi.core.ModelConstraintException- if a theme is not part of the topic map
-
typeInTopicMap
public static void typeInTopicMap(org.tmapi.core.TopicMap topicMap, org.tmapi.core.Topic type) Checks if the type is in the topic map- Parameters:
topicMap- the topicMap creating a typed constructtype- type to check- Throws:
org.tmapi.core.ModelConstraintException- if the type is not part of the topic map
-
reifierInTopicMap
public static void reifierInTopicMap(org.tmapi.core.TopicMap topicMap, org.tmapi.core.Topic reifier) Checks if the reifier is in the topic map- Parameters:
topicMap- the topicMap creating a typed constructreifier- reifier to check- Throws:
org.tmapi.core.ModelConstraintException- if the reifier is not part of the topic map
-
playerInTopicMap
public static void playerInTopicMap(org.tmapi.core.TopicMap topicMap, org.tmapi.core.Topic player) Checks if the player is in the topic map- Parameters:
topicMap- the topicMap creating a typed constructplayer- player to check- Throws:
org.tmapi.core.ModelConstraintException- if the player is not part of the topic map
-