Exemplo n.º 1
0
 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\"");
   }
 }
Exemplo n.º 2
0
 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\"");
   }
 }