/** * Gets the id of this topic. * * @return the id of this topic. */ public String getId() { return getTopicIF().getObjectId(); }
@Override protected DefaultMutableTreeNode createTreeNode(Object o) { return new DefaultMutableTreeNode(new TopicNode(topicMapId, ((TopicIF)o).getObjectId())); } };
@Override protected DefaultMutableTreeNode createTreeNode(Object o) { return new DefaultMutableTreeNode(new TopicNode(topicMapId, ((TopicIF)o).getObjectId())); } };
@Override protected DefaultMutableTreeNode createTreeNode(Object o) { return new DefaultMutableTreeNode(new TopicNode(topicMapId, ((TopicIF)o).getObjectId())); } };
@Override protected DefaultMutableTreeNode createTreeNode(Object o) { return new DefaultMutableTreeNode(new TopicNode(topicMapId, ((TopicIF)o).getObjectId())); } };
@Override protected DefaultMutableTreeNode createTreeNode(Object o) { return new DefaultMutableTreeNode(new TopicNode(topicMapId, ((TopicIF)o).getObjectId())); } };
@Override protected DefaultMutableTreeNode createTreeNode(Object o) { return new DefaultMutableTreeNode(new TopicNode(topicMapId, ((TopicIF)o).getObjectId())); } };
@Override protected DefaultMutableTreeNode createTreeNode(Object o) { return new DefaultMutableTreeNode(new TopicNode(topicMapId, ((TopicIF)o).getObjectId())); } };
private void addIdentities(TopicIF t, DataPool dp, int count) { for (int i=0; i < count; i++) { t.addSubjectIdentifier(URILocator.create("http://example.org/foo/" + t.getObjectId() + "/" + (i+1))); } }
/** * PUBLIC: Makes a key for an association role. The key is made up * of the role and the player. * @since 1.2.0 * @param role The association role. * @return The key. */ public static String makeAssociationRoleKey(AssociationRoleIF role) { return makeTypedKey(role) + ":" + role.getPlayer().getObjectId(); }
public TMTopicNode(TopicIF topic, TopicIF scopingTopic, TopicMapView topicMapView) { super(topic.getObjectId()); this.topicMapView = topicMapView; this.topic = topic; this.setScopingTopic(scopingTopic); updateLabel(); }
private TopicPage getTopicPage(TopicIF topic, String key) { Map<String, Object> map = new HashMap<String, Object>(); map.put("tmid", tmid); map.put("topicid", topic.getObjectId()); String name = strify.toString(topic); String editUrl = (editBaseuri == null) ? null : StringTemplateUtils.replace(editBaseuri, map); String viewUrl = (viewBaseuri == null) ? null : StringTemplateUtils.replace(viewBaseuri, map); return new TopicPage(editUrl, viewUrl, name, name, topic); } }
private TopicPage getTopicPage(TopicIF topic, String key) { Map<String, Object> map = new HashMap<String, Object>(); map.put("tmid", tmid); map.put("topicid", topic.getObjectId()); String name = strify.toString(topic); String editUrl = (editBaseuri == null) ? null : StringTemplateUtils.replace(editBaseuri, map); String viewUrl = (viewBaseuri == null) ? null : StringTemplateUtils.replace(viewBaseuri, map); return new TopicPage(editUrl, viewUrl, name, name, topic); } }
@Override public void run() { TopicIF t = getTopic(); TopicIF type = (TopicIF)this.data.remove("type"); t.removeType(type); this.objectId = t.getObjectId(); this.value = type.getObjectId(); } });
@Override public void run() { AssociationIF a = getAssociation(); TopicIF theme = (TopicIF)this.data.remove("scope"); a.removeTheme(theme); this.objectId = a.getObjectId(); this.value = theme.getObjectId(); } });
@Override public void run() { TopicIF t = getTopic(); t.addSubjectLocator(URILocator.create("x:subject")); this.objectId = t.getObjectId(); } });
@Override public void run() { TopicNameIF bn = getTopicName(); TopicIF type = builder.makeTopic(); // create type this.data.put("type", type); bn.setType(type); this.objectId = bn.getObjectId(); this.value = type.getObjectId(); } });
@Override public void run() { AssociationIF a = getAssociation(); TopicIF theme = builder.makeTopic(); this.data.put("scope", theme); a.addTheme(theme); this.objectId = a.getObjectId(); this.value = theme.getObjectId(); } });
public void testTopicNameUnbound() throws InvalidQueryException, IOException { makeEmpty(); TopicIF theme = builder.makeTopic(); TopicIF topic = builder.makeTopic(); TopicNameIF thing = builder.makeTopicName(topic, "mybasename"); thing.addTheme(theme); List matches = new ArrayList(); addMatch(matches, "THING", thing); // NOTE: using topic-name predicate here to avoid type cross product verifyQuery(matches, "topic-name(@" + topic.getObjectId() + ", $THING), scope($THING, @" + theme.getObjectId() + ")?"); }
public void testWithSpecificId() throws InvalidQueryException, IOException { load("bb-test.ltm"); List matches = new ArrayList(); TopicIF topic = getTopicById("thequeen"); addMatch(matches, "TOPIC", topic); verifyQuery(matches, "object-id($TOPIC, \"" + topic.getObjectId() + "\")?"); closeStore(); }