private void checkAssociationType(String assocTypeUri, Topic typeTopic) { if (typeTopic == null) { throw new RuntimeException("Association type \"" + assocTypeUri + "\" not found"); } else if (!typeTopic.getTypeUri().equals("dm4.core.assoc_type")) { throw new RuntimeException( "URI \"" + assocTypeUri + "\" refers to a \"" + typeTopic.getTypeUri() + "\" when the caller expects a \"dm4.core.assoc_type\""); } }
private void checkTopicType(String topicTypeUri, Topic typeTopic) { if (typeTopic == null) { throw new RuntimeException("Topic type \"" + topicTypeUri + "\" not found"); } else if (!typeTopic.getTypeUri().equals("dm4.core.topic_type") && !typeTopic.getTypeUri().equals("dm4.core.meta_type") && !typeTopic.getTypeUri().equals("dm4.core.meta_meta_type")) { throw new RuntimeException( "URI \"" + topicTypeUri + "\" refers to a \"" + typeTopic.getTypeUri() + "\" when the caller expects a \"dm4.core.topic_type\""); } }