r67925 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r67924‎ | r67925 | r67926 >
Date:21:23, 12 June 2010
Author:daniel
Status:deferred
Tags:
Comment:
conveniance methods for checking properties
Modified paths:
  • /trunk/WikiWord/WikiWord/src/main/java/de/brightbyte/wikiword/model/ConceptProperties.java (modified) (history)

Diff [purge]

Index: trunk/WikiWord/WikiWord/src/main/java/de/brightbyte/wikiword/model/ConceptProperties.java
@@ -27,6 +27,20 @@
2828 return properties;
2929 }
3030
 31+ public Collection<String> getProperty(String name) {
 32+ return getProperties().get(name);
 33+ }
 34+
 35+ public boolean hasProperty(String name) {
 36+ Collection<String> vv = getProperties().get(name);
 37+ return vv!=null && !vv.isEmpty();
 38+ }
 39+
 40+ public boolean hasProperty(String name, String value) {
 41+ Collection<String> vv = getProperties().get(name);
 42+ return vv!=null && vv.contains(value);
 43+ }
 44+
3145 public WikiWordConcept getConcept() {
3246 return concept;
3347 }

Status & tagging log