@Override public void processEvent(Object object, String event, OccurrenceIF new_value, OccurrenceIF old_value) { objects.remove(old_value.getValue(), old_value); } }
private String get(TopicIF topic, LocatorIF psi) { for (OccurrenceIF occ : topic.getOccurrences()) { TopicIF type = occ.getType(); if (type.getSubjectIdentifiers().contains(psi)) return occ.getValue(); } return null; }
public static List<OccurrenceIF> findOccurrences(TopicIF oType, TopicIF topicIF, String value, Collection<TopicIF> scope) { List<OccurrenceIF> result = new ArrayList<OccurrenceIF>(); Iterator<OccurrenceIF> it = topicIF.getOccurrences().iterator(); while (it.hasNext()) { OccurrenceIF occurIF = it.next(); if (ObjectUtils.equals(occurIF.getValue(), value) && ObjectUtils.equals(occurIF.getType(), oType) && CollectionUtils.equalsUnorderedSet(occurIF.getScope(), scope)) result.add(occurIF); } return result; }
/** * Returns the assigned height of the name text field. */ public int getHeight() { TopicIF oType = OntopolyModelUtils.getTopicIF(getTopicMap(), PSI.ON_HEIGHT); OccurrenceIF occ = OntopolyModelUtils.findOccurrence(oType, getTopicIF()); return (occ == null ? 1 : Integer.parseInt(occ.getValue())); }
/** * Returns the assigned height of the identity text field. */ public int getHeight() { TopicIF oType = OntopolyModelUtils.getTopicIF(getTopicMap(), PSI.ON_HEIGHT); OccurrenceIF occ = OntopolyModelUtils.findOccurrence(oType, getTopicIF()); return (occ == null ? 1 : Integer.parseInt(occ.getValue())); }
/** * Returns the assigned height of the occurrence text field. */ public int getHeight() { TopicIF oType = OntopolyModelUtils.getTopicIF(getTopicMap(), PSI.ON_HEIGHT); OccurrenceIF occ = OntopolyModelUtils.findOccurrence(oType, getTopicIF()); return (occ == null ? 1 : Integer.parseInt(occ.getValue())); }
/** * Returns the assigned width of the identity text field. */ public int getWidth() { TopicIF oType = OntopolyModelUtils.getTopicIF(getTopicMap(), PSI.ON_WIDTH); OccurrenceIF occ = OntopolyModelUtils.findOccurrence(oType, getTopicIF()); return (occ == null ? 50 : Integer.parseInt(occ.getValue())); }
/** * Returns the assigned height of the occurrence text field. */ public int getHeight() { TopicIF oType = OntopolyModelUtils.getTopicIF(getTopicMap(), PSI.ON_HEIGHT); OccurrenceIF occ = OntopolyModelUtils.findOccurrence(oType, getTopicIF()); return (occ == null ? 1 : Integer.parseInt(occ.getValue())); }
/** * Returns the assigned width of the occurrence text field. */ public int getWidth() { TopicIF oType = OntopolyModelUtils.getTopicIF(getTopicMap(), PSI.ON_WIDTH); OccurrenceIF occ = OntopolyModelUtils.findOccurrence(oType, getTopicIF()); return (occ == null ? 50 : Integer.parseInt(occ.getValue())); }
/** * Returns the assigned width of the name text field. */ public int getWidth() { TopicIF oType = OntopolyModelUtils.getTopicIF(getTopicMap(), PSI.ON_WIDTH); OccurrenceIF occ = OntopolyModelUtils.findOccurrence(oType, getTopicIF()); return (occ == null ? 50 : Integer.parseInt(occ.getValue())); }
/** * Returns the validation type. */ public String getValidationType() { TopicIF oType = OntopolyModelUtils.getTopicIF(getTopicMap(), PSI.ON_VALIDATION_TYPE); OccurrenceIF occ = OntopolyModelUtils.findOccurrence(oType, getTopicIF()); return occ == null ? null : occ.getValue(); }
private String getAllowedPlayersSearchQuery() { TopicIF topicIf = getTopicIF(); TopicIF typeIf = OntopolyModelUtils.getTopicIF(getTopicMap(), PSI.ON, "allowed-players-search-query"); OccurrenceIF occ = OntopolyModelUtils.findOccurrence(typeIf, topicIf); return (occ == null ? null : occ.getValue()); }
private String getAllowedPlayersTypesQuery() { TopicIF topicIf = getTopicIF(); TopicIF typeIf = OntopolyModelUtils.getTopicIF(getTopicMap(), PSI.ON, "allowed-players-types-query"); OccurrenceIF occ = OntopolyModelUtils.findOccurrence(typeIf, topicIf); return (occ == null ? null : occ.getValue()); }
private String getValuesQuery() { TopicIF topicIf = getTopicIF(); TopicIF typeIf = OntopolyModelUtils.getTopicIF(getTopicMap(), PSI.ON_VALUES_QUERY); OccurrenceIF occ = OntopolyModelUtils.findOccurrence(typeIf, topicIf); return (occ == null ? null : occ.getValue()); }
private String getAllowedPlayersQuery() { TopicIF topicIf = getTopicIF(); TopicIF typeIf = OntopolyModelUtils.getTopicIF(getTopicMap(), PSI.ON, "allowed-players-query"); OccurrenceIF occ = OntopolyModelUtils.findOccurrence(typeIf, topicIf); return (occ == null ? null : occ.getValue()); }
protected String getDefinitionQuery(Topic topic) { TopicIF typeIf = OntopolyModelUtils.getTopicIF(topic.getTopicMap(), PSI.ON, "hierarchy-definition-query"); if (typeIf == null) return null; OccurrenceIF occ = OntopolyModelUtils.findOccurrence(typeIf, topic.getTopicIF()); return (occ == null ? null : occ.getValue()); }
protected String getDefinitionQuery(Topic topic) { TopicIF typeIf = OntopolyModelUtils.getTopicIF(topic.getTopicMap(), PSI.ON, "hierarchy-definition-query"); if (typeIf == null) return null; OccurrenceIF occ = OntopolyModelUtils.findOccurrence(typeIf, topic.getTopicIF()); return (occ == null ? null : occ.getValue()); }
@Override public void run(MasterTest mt) { OccurrenceIF o = (OccurrenceIF)topicmap.getObjectById(mt.objectId); assertTrue("Occurrence value is not set", "New occurrence".equals(o.getValue())); } });
@Override public void run(MasterTest mt) { OccurrenceIF o = (OccurrenceIF)topicmap.getObjectById(mt.objectId); assertTrue("Occurrence value is not null", "".equals(o.getValue())); } });