Class Check
- java.lang.Object
-
- net.ontopia.topicmaps.impl.tmapi2.Check
-
public final class Check extends Object
INTERNAL: Provides various argument constraint checks.
-
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static void
datatypeNotNull(org.tmapi.core.Locator loc)
Throws a IllegalArgumentException if the datatype isnull
static void
itemIdentifierNotNull(org.tmapi.core.Construct sender, org.tmapi.core.Locator loc)
static void
locatorNotNull(org.tmapi.core.Locator loc)
Throws a IllegalArgumentException if the locator isnull
static void
playerInTopicMap(org.tmapi.core.TopicMap topicMap, org.tmapi.core.Topic player)
Checks if the player is in the topic mapstatic void
playerNotNull(org.tmapi.core.Construct sender, org.tmapi.core.Topic player)
Throws aModelConstraintException
iff the player is null.static void
reifierInTopicMap(org.tmapi.core.TopicMap topicMap, org.tmapi.core.Topic reifier)
Checks if the reifier is in the topic mapstatic void
scopeInTopicMap(org.tmapi.core.TopicMap topicMap, org.tmapi.core.Topic... scope)
Checks if the scope is in the topic mapstatic void
scopeNotEmpty(org.tmapi.core.Construct sender, Collection<org.tmapi.core.Topic> scope)
Throws aModelConstraintException
iff the scope is empty.static void
scopeNotEmpty(org.tmapi.core.Construct sender, org.tmapi.core.Topic[] scope)
Throws aModelConstraintException
iff the scope is empty.static void
scopeNotNull(org.tmapi.core.Construct sender, Collection<org.tmapi.core.Topic> scope)
Throws aModelConstraintException
iff the scope is null.static void
scopeNotNull(org.tmapi.core.Construct sender, org.tmapi.core.Topic[] scope)
Throws aModelConstraintException
iff the scope is null.static void
subjectIdentifierNotNull(org.tmapi.core.Construct sender, org.tmapi.core.Locator loc)
static void
subjectIdentifierNotNull(org.tmapi.core.Locator sid)
Throws a IllegalArgumentException if the subject identifier isnull
static void
subjectLocatorNotNull(org.tmapi.core.Construct sender, org.tmapi.core.Locator loc)
static void
subjectLocatorNotNull(org.tmapi.core.Locator loc)
Throws a IllegalArgumentException if the subject locator isnull
static void
themeNotNull(org.tmapi.core.Construct sender, org.tmapi.core.Topic theme)
Throws aModelConstraintException
iff the theme is null.static void
themeNotNull(org.tmapi.core.Topic theme)
Throws aIllegalArgumentException
iff the theme is null.static void
themeNotNull(org.tmapi.core.Topic... themes)
Throws aIllegalArgumentException
iff the theme is null.static void
typeInTopicMap(org.tmapi.core.TopicMap topicMap, org.tmapi.core.Topic type)
Checks if the type is in the topic mapstatic void
typeNotNull(org.tmapi.core.Construct sender, org.tmapi.core.Topic type)
Throws aModelConstraintException
iff the type is null.static void
typeNotNull(org.tmapi.core.Topic type)
Throws aIllegalArgumentException
iff the type is null.static void
valueNotNull(Object value)
Throws a IllegalArgumentException if the value isnull
static void
valueNotNull(org.tmapi.core.Construct sender, Object value)
Throws aModelConstraintException
iff the value is null.static void
valueNotNull(org.tmapi.core.Construct sender, Object value, org.tmapi.core.Locator datatype)
Throws aModelConstraintException
iff the value or the datatype is null.
-
-
-
Method Detail
-
scopeNotNull
public static void scopeNotNull(org.tmapi.core.Construct sender, org.tmapi.core.Topic[] scope)
Throws aModelConstraintException
iff 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 aModelConstraintException
iff 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 aModelConstraintException
iff 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 aModelConstraintException
iff 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 aModelConstraintException
iff 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 aModelConstraintException
iff the type is null.- Parameters:
sender
- The sender.type
- The type.
-
valueNotNull
public static void valueNotNull(org.tmapi.core.Construct sender, Object value)
Throws aModelConstraintException
iff 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 aModelConstraintException
iff 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 aModelConstraintException
iff 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
public static void valueNotNull(Object value)
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 aIllegalArgumentException
iff the theme is null.- Parameters:
theme
- The theme.
-
themeNotNull
public static void themeNotNull(org.tmapi.core.Topic... themes)
Throws aIllegalArgumentException
iff the theme is null.- Parameters:
themes
- The array of themes.
-
typeNotNull
public static void typeNotNull(org.tmapi.core.Topic type)
Throws aIllegalArgumentException
iff 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
-
-