001 /***************************************************************************/
002 /* Copyright (C) 2010-2011, Sebastian Hellmann */
003 /* Note: If you need parts of NLP2RDF in another licence due to licence */
004 /* incompatibility, please mail hellmann@informatik.uni-leipzig.de */
005 /* */
006 /* This file is part of NLP2RDF. */
007 /* */
008 /* NLP2RDF is free software; you can redistribute it and/or modify */
009 /* it under the terms of the GNU General Public License as published by */
010 /* the Free Software Foundation; either version 3 of the License, or */
011 /* (at your option) any later version. */
012 /* */
013 /* NLP2RDF is distributed in the hope that it will be useful, */
014 /* but WITHOUT ANY WARRANTY; without even the implied warranty of */
015 /* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the */
016 /* GNU General Public License for more details. */
017 /* */
018 /* You should have received a copy of the GNU General Public License */
019 /* along with this program. If not, see <http://www.gnu.org/licenses/>. */
020 /***************************************************************************/
021
022 package eu.lod2.nlp2rdf.schema.sso;
023
024 import java.util.ArrayList;
025 import java.util.List;
026 import java.util.Iterator;
027
028 import nl.tudelft.tbm.eeni.owl2java.model.jenautils.NullFilter;
029
030 import org.apache.commons.logging.Log;
031 import org.apache.commons.logging.LogFactory;
032
033 import com.hp.hpl.jena.enhanced.BuiltinPersonalities;
034 import com.hp.hpl.jena.enhanced.EnhGraph;
035 import com.hp.hpl.jena.enhanced.EnhNode;
036 import com.hp.hpl.jena.enhanced.Implementation;
037 import com.hp.hpl.jena.graph.Graph;
038 import com.hp.hpl.jena.graph.Node;
039 import com.hp.hpl.jena.ontology.Individual;
040 import com.hp.hpl.jena.ontology.OntClass;
041 import com.hp.hpl.jena.ontology.OntModel;
042 import com.hp.hpl.jena.ontology.Profile;
043 import com.hp.hpl.jena.ontology.impl.IndividualImpl;
044 import com.hp.hpl.jena.rdf.model.Resource;
045 import com.hp.hpl.jena.rdf.model.RDFNode;
046 import com.hp.hpl.jena.rdf.model.Statement;
047 import com.hp.hpl.jena.rdf.model.Literal;
048 import com.hp.hpl.jena.util.iterator.WrappedIterator;
049 import com.hp.hpl.jena.util.iterator.ExtendedIterator;
050 import com.hp.hpl.jena.util.iterator.Filter;
051 import com.hp.hpl.jena.util.iterator.Map1;
052
053 // import interface
054 import eu.lod2.nlp2rdf.schema.sso.IStopWord;
055
056 /**
057 * Class http://nlp2rdf.lod2.eu/schema/sso/StopWord
058 */
059 public class StopWord extends IndividualImpl implements IStopWord {
060
061 private static Log log = LogFactory.getLog(StopWord.class);
062
063 /**
064 * Implementation factory for StopWord
065 */
066 static final public Implementation factory = new Implementation() {
067
068 /**
069 * Convert a Node into an instance of the class
070 */
071 public EnhNode wrap(Node n, EnhGraph eg) {
072 if (canWrap(n, eg)) {
073 return new StopWord(n, eg);
074 } else {
075 log.warn("Cannot convert node " + n.toString() + " to StopWord");
076 return null;
077 }
078 }
079
080 /**
081 * Return true iff the node can be converted to an instance of
082 * this class (StopWord)
083 */
084 public boolean canWrap(Node n, EnhGraph eg) {
085 Profile profile;
086 if (eg instanceof OntModel)
087 profile = ((OntModel) eg).getProfile();
088 else
089 return false;
090
091 if (!profile.isSupported(n, eg, Individual.class)) {
092 return false;
093 }
094
095 Graph graph = eg.asGraph();
096 return graph.contains(n, com.hp.hpl.jena.vocabulary.RDF.type.asNode(), eu.lod2.nlp2rdf.schema.tools.Vocabulary.StopWord.asNode());
097 }
098 };
099
100 /**
101 * Filtering support for StopWord
102 */
103 static final public Filter<StopWord> nullFilter = new NullFilter<StopWord>();
104
105 /**
106 * Mapping support for StopWord
107 */
108 public static <From> Map1<From, StopWord> mapperFrom(Class<From> from) {
109 return new Map1<From, StopWord>() {
110 @Override
111 public StopWord map1(Object x) {
112 if (x instanceof Statement) {
113 Resource r = ((Statement) x).getResource();
114 if (r.canAs(StopWord.class))
115 return r.as(StopWord.class);
116 } else if (x instanceof RDFNode) {
117 if (((RDFNode) x).canAs(StopWord.class))
118 return ((RDFNode) x).as(StopWord.class);
119 }
120 return null;
121 }
122 };
123 }
124
125 // Instantiate some mappers for general use
126 static final public Map1<Statement, StopWord> statementMapper = mapperFrom(Statement.class);
127 static final public Map1<Individual, StopWord> individualMapper = mapperFrom(Individual.class);
128 static final public Map1<RDFNode, StopWord> nodeMapper = mapperFrom(RDFNode.class);
129
130 /**
131 * Generic functions from parent class
132 */
133 public StopWord(Node n, EnhGraph g) {
134 super(n, g);
135 }
136
137 /**
138 * Registers all custom classes with jena
139 */
140 public static void register() {
141 log.debug("Registering custom class StopWord with jena");
142 BuiltinPersonalities.model.add(StopWord.class, StopWord.factory);
143 BuiltinPersonalities.model.add(eu.lod2.nlp2rdf.schema.sso.StopWord.class, StopWord.factory);
144 }
145
146 /**
147 * Static Functions for instance handling
148 */
149 public static StopWord get(java.lang.String uri, OntModel ontModel) {
150 Individual individual = ontModel.getIndividual(uri);
151 return (eu.lod2.nlp2rdf.schema.sso.StopWord) individual.as(eu.lod2.nlp2rdf.schema.sso.StopWord.class);
152 }
153
154 public static StopWord get(java.lang.String uri) {
155 return get(uri, eu.lod2.nlp2rdf.schema.tools.Factory.getDefaultModel());
156 }
157
158 public static Iterator<StopWord> iterate(OntModel ontModel) {
159 ExtendedIterator<Individual> it = ontModel.listIndividuals(eu.lod2.nlp2rdf.schema.tools.Vocabulary.StopWord);
160 return it.mapWith(individualMapper).filterDrop(nullFilter);
161 }
162
163 public static Iterator<StopWord> iterate() {
164 return iterate(eu.lod2.nlp2rdf.schema.tools.Factory.getDefaultModel());
165 }
166
167 public static List<StopWord> list(OntModel ontModel) {
168 List<StopWord> list = new ArrayList<StopWord>();
169 Iterator<StopWord> it = iterate(ontModel);
170 while (it.hasNext()) {
171 StopWord cls = it.next();
172 list.add(cls);
173 }
174 return list;
175 }
176
177 public static List<StopWord> list() {
178 return list(eu.lod2.nlp2rdf.schema.tools.Factory.getDefaultModel());
179 }
180
181 public static Iterator<StopWord> iterate(boolean direct, OntModel ontModel) {
182 OntClass cls = ontModel.getOntClass("http://nlp2rdf.lod2.eu/schema/sso/StopWord");
183 ExtendedIterator<? extends RDFNode> it = cls.listInstances(direct);
184 ExtendedIterator<RDFNode> nodeIt = new WrappedIterator<RDFNode>(it) {
185 };
186 return nodeIt.mapWith(nodeMapper).filterDrop(nullFilter);
187 }
188
189 public static Iterator<StopWord> iterate(boolean direct) {
190 return iterate(direct, eu.lod2.nlp2rdf.schema.tools.Factory.getDefaultModel());
191 }
192
193 public static List<StopWord> list(boolean direct, OntModel ontModel) {
194 List<StopWord> list = new ArrayList<StopWord>();
195 Iterator<StopWord> it = iterate(direct, ontModel);
196 while (it.hasNext()) {
197 StopWord cls = it.next();
198 list.add(cls);
199 }
200 return list;
201 }
202
203 public static List<StopWord> list(boolean direct) {
204 return list(direct, eu.lod2.nlp2rdf.schema.tools.Factory.getDefaultModel());
205 }
206
207 public static int count(OntModel ontModel) {
208 int count = 0;
209 Iterator<StopWord> it = iterate(ontModel);
210 while (it.hasNext()) {
211 it.next();
212 count++;
213 }
214 return count;
215 }
216
217 public static int count() {
218 return count(eu.lod2.nlp2rdf.schema.tools.Factory.getDefaultModel());
219 }
220
221 public static int count(boolean direct, OntModel ontModel) {
222 int count = 0;
223 Iterator<StopWord> it = iterate(direct, ontModel);
224 while (it.hasNext()) {
225 it.next();
226 count++;
227 }
228 return count;
229 }
230
231 public static int count(boolean direct) {
232 return count(direct, eu.lod2.nlp2rdf.schema.tools.Factory.getDefaultModel());
233 }
234
235 public static boolean exists(java.lang.String uri, OntModel ontModel) {
236 Individual individual = ontModel.getIndividual(uri);
237 if (individual != null)
238 return true;
239 return false;
240 }
241
242 public static boolean exists(java.lang.String uri) {
243 return exists(uri, eu.lod2.nlp2rdf.schema.tools.Factory.getDefaultModel());
244 }
245
246 public static StopWord create(java.lang.String uri, OntModel ontModel) {
247 return (StopWord) ontModel.createOntResource(StopWord.class, eu.lod2.nlp2rdf.schema.tools.Vocabulary.StopWord, uri);
248 }
249
250 public static StopWord create(OntModel ontModel) {
251 return create(null, ontModel);
252 }
253
254 public static StopWord create(java.lang.String uri) {
255 return create(uri, eu.lod2.nlp2rdf.schema.tools.Factory.getDefaultModel());
256 }
257
258 public static StopWord create() {
259 return create(null, eu.lod2.nlp2rdf.schema.tools.Factory.getDefaultModel());
260 }
261
262 public static void delete(java.lang.String uri, OntModel ontModel) {
263 eu.lod2.nlp2rdf.schema.tools.Factory.deleteInstance(uri, ontModel);
264 }
265
266 public static void delete(java.lang.String uri) {
267 eu.lod2.nlp2rdf.schema.tools.Factory.deleteInstance(uri);
268 }
269
270 /**
271 * Domain property sentence
272 * with uri http://nlp2rdf.lod2.eu/schema/sso/sentence
273 */
274 public boolean existsSentence() {
275 return hasProperty(eu.lod2.nlp2rdf.schema.tools.Vocabulary.sentence);
276 }
277
278 public boolean hasSentence(eu.lod2.nlp2rdf.schema.sso.ISentence sentenceValue) {
279 return hasProperty(eu.lod2.nlp2rdf.schema.tools.Vocabulary.sentence, sentenceValue);
280 }
281
282 public eu.lod2.nlp2rdf.schema.sso.Sentence getSentence() {
283 RDFNode n = getPropertyValue(eu.lod2.nlp2rdf.schema.tools.Vocabulary.sentence);
284 if (n.canAs(eu.lod2.nlp2rdf.schema.sso.Sentence.class))
285 return (eu.lod2.nlp2rdf.schema.sso.Sentence) n.as(eu.lod2.nlp2rdf.schema.sso.Sentence.class);
286 else {
287 log.warn("Could not convert sentence of " + getURI() + " (" + n + ") to type Sentence");
288 return null;
289 }
290 }
291
292 public void setSentence(eu.lod2.nlp2rdf.schema.sso.ISentence sentenceValue) {
293 removeAll(eu.lod2.nlp2rdf.schema.tools.Vocabulary.sentence);
294 setPropertyValue(eu.lod2.nlp2rdf.schema.tools.Vocabulary.sentence, sentenceValue);
295 }
296
297 public void removeSentence() {
298 removeAll(eu.lod2.nlp2rdf.schema.tools.Vocabulary.sentence);
299 }
300
301 /**
302 * Domain property oliaLink
303 * with uri http://nlp2rdf.lod2.eu/schema/sso/oliaLink
304 */
305 public boolean existsOliaLink() {
306 return hasProperty(eu.lod2.nlp2rdf.schema.tools.Vocabulary.oliaLink);
307 }
308
309 public boolean hasOliaLink(eu.lod2.nlp2rdf.schema.IThing thingValue) {
310 return hasProperty(eu.lod2.nlp2rdf.schema.tools.Vocabulary.oliaLink, thingValue);
311 }
312
313 public int countOliaLink() {
314 int count = 0;
315 Iterator<eu.lod2.nlp2rdf.schema.Thing> it = iterateOliaLink();
316 while (it.hasNext()) {
317 it.next();
318 count++;
319 }
320 return count;
321 }
322
323 public Iterator<eu.lod2.nlp2rdf.schema.Thing> iterateOliaLink() {
324 ExtendedIterator<Statement> it = listProperties(eu.lod2.nlp2rdf.schema.tools.Vocabulary.oliaLink);
325 return it.mapWith(eu.lod2.nlp2rdf.schema.Thing.statementMapper).filterDrop(eu.lod2.nlp2rdf.schema.Thing.nullFilter);
326 }
327
328 public List<eu.lod2.nlp2rdf.schema.Thing> listOliaLink() {
329 List<eu.lod2.nlp2rdf.schema.Thing> list = new ArrayList<eu.lod2.nlp2rdf.schema.Thing>();
330 Iterator<eu.lod2.nlp2rdf.schema.Thing> it = iterateOliaLink();
331 while (it.hasNext()) {
332 eu.lod2.nlp2rdf.schema.Thing inst = it.next();
333 list.add(inst);
334 }
335 return list;
336 }
337
338 public void addOliaLink(eu.lod2.nlp2rdf.schema.IThing thingValue) {
339 addProperty(eu.lod2.nlp2rdf.schema.tools.Vocabulary.oliaLink, thingValue);
340 }
341
342 public void addAllOliaLink(List<? extends eu.lod2.nlp2rdf.schema.IThing> thingList) {
343 for (eu.lod2.nlp2rdf.schema.IThing o : thingList)
344 addOliaLink(o);
345
346 }
347
348 public void removeOliaLink(eu.lod2.nlp2rdf.schema.IThing thingValue) {
349 removeProperty(eu.lod2.nlp2rdf.schema.tools.Vocabulary.oliaLink, thingValue);
350 }
351
352 public void removeAllOliaLink() {
353 removeAll(eu.lod2.nlp2rdf.schema.tools.Vocabulary.oliaLink);
354 }
355
356 /**
357 * Domain property previousWord
358 * with uri http://nlp2rdf.lod2.eu/schema/sso/previousWord
359 */
360 public boolean existsPreviousWord() {
361 return hasProperty(eu.lod2.nlp2rdf.schema.tools.Vocabulary.previousWord);
362 }
363
364 public boolean hasPreviousWord(eu.lod2.nlp2rdf.schema.sso.IWord wordValue) {
365 return hasProperty(eu.lod2.nlp2rdf.schema.tools.Vocabulary.previousWord, wordValue);
366 }
367
368 public eu.lod2.nlp2rdf.schema.sso.Word getPreviousWord() {
369 RDFNode n = getPropertyValue(eu.lod2.nlp2rdf.schema.tools.Vocabulary.previousWord);
370 if (n.canAs(eu.lod2.nlp2rdf.schema.sso.Word.class))
371 return (eu.lod2.nlp2rdf.schema.sso.Word) n.as(eu.lod2.nlp2rdf.schema.sso.Word.class);
372 else {
373 log.warn("Could not convert previousWord of " + getURI() + " (" + n + ") to type Word");
374 return null;
375 }
376 }
377
378 public void setPreviousWord(eu.lod2.nlp2rdf.schema.sso.IWord wordValue) {
379 removeAll(eu.lod2.nlp2rdf.schema.tools.Vocabulary.previousWord);
380 setPropertyValue(eu.lod2.nlp2rdf.schema.tools.Vocabulary.previousWord, wordValue);
381 }
382
383 public void removePreviousWord() {
384 removeAll(eu.lod2.nlp2rdf.schema.tools.Vocabulary.previousWord);
385 }
386
387 /**
388 * Domain property nextWord
389 * with uri http://nlp2rdf.lod2.eu/schema/sso/nextWord
390 */
391 public boolean existsNextWord() {
392 return hasProperty(eu.lod2.nlp2rdf.schema.tools.Vocabulary.nextWord);
393 }
394
395 public boolean hasNextWord(eu.lod2.nlp2rdf.schema.sso.IWord wordValue) {
396 return hasProperty(eu.lod2.nlp2rdf.schema.tools.Vocabulary.nextWord, wordValue);
397 }
398
399 public eu.lod2.nlp2rdf.schema.sso.Word getNextWord() {
400 RDFNode n = getPropertyValue(eu.lod2.nlp2rdf.schema.tools.Vocabulary.nextWord);
401 if (n.canAs(eu.lod2.nlp2rdf.schema.sso.Word.class))
402 return (eu.lod2.nlp2rdf.schema.sso.Word) n.as(eu.lod2.nlp2rdf.schema.sso.Word.class);
403 else {
404 log.warn("Could not convert nextWord of " + getURI() + " (" + n + ") to type Word");
405 return null;
406 }
407 }
408
409 public void setNextWord(eu.lod2.nlp2rdf.schema.sso.IWord wordValue) {
410 removeAll(eu.lod2.nlp2rdf.schema.tools.Vocabulary.nextWord);
411 setPropertyValue(eu.lod2.nlp2rdf.schema.tools.Vocabulary.nextWord, wordValue);
412 }
413
414 public void removeNextWord() {
415 removeAll(eu.lod2.nlp2rdf.schema.tools.Vocabulary.nextWord);
416 }
417
418 /**
419 * Domain property nextSentenceTrans
420 * with uri http://nlp2rdf.lod2.eu/schema/sso/nextSentenceTrans
421 */
422 public boolean existsNextSentenceTrans() {
423 return hasProperty(eu.lod2.nlp2rdf.schema.tools.Vocabulary.nextSentenceTrans);
424 }
425
426 public boolean hasNextSentenceTrans(eu.lod2.nlp2rdf.schema.sso.IWord wordValue) {
427 return hasProperty(eu.lod2.nlp2rdf.schema.tools.Vocabulary.nextSentenceTrans, wordValue);
428 }
429
430 public int countNextSentenceTrans() {
431 int count = 0;
432 Iterator<eu.lod2.nlp2rdf.schema.sso.Word> it = iterateNextSentenceTrans();
433 while (it.hasNext()) {
434 it.next();
435 count++;
436 }
437 return count;
438 }
439
440 public Iterator<eu.lod2.nlp2rdf.schema.sso.Word> iterateNextSentenceTrans() {
441 ExtendedIterator<Statement> it = listProperties(eu.lod2.nlp2rdf.schema.tools.Vocabulary.nextSentenceTrans);
442 return it.mapWith(eu.lod2.nlp2rdf.schema.sso.Word.statementMapper).filterDrop(eu.lod2.nlp2rdf.schema.sso.Word.nullFilter);
443 }
444
445 public List<eu.lod2.nlp2rdf.schema.sso.Word> listNextSentenceTrans() {
446 List<eu.lod2.nlp2rdf.schema.sso.Word> list = new ArrayList<eu.lod2.nlp2rdf.schema.sso.Word>();
447 Iterator<eu.lod2.nlp2rdf.schema.sso.Word> it = iterateNextSentenceTrans();
448 while (it.hasNext()) {
449 eu.lod2.nlp2rdf.schema.sso.Word inst = it.next();
450 list.add(inst);
451 }
452 return list;
453 }
454
455 public void addNextSentenceTrans(eu.lod2.nlp2rdf.schema.sso.IWord wordValue) {
456 addProperty(eu.lod2.nlp2rdf.schema.tools.Vocabulary.nextSentenceTrans, wordValue);
457 }
458
459 public void addAllNextSentenceTrans(List<? extends eu.lod2.nlp2rdf.schema.sso.IWord> wordList) {
460 for (eu.lod2.nlp2rdf.schema.sso.IWord o : wordList)
461 addNextSentenceTrans(o);
462
463 }
464
465 public void removeNextSentenceTrans(eu.lod2.nlp2rdf.schema.sso.IWord wordValue) {
466 removeProperty(eu.lod2.nlp2rdf.schema.tools.Vocabulary.nextSentenceTrans, wordValue);
467 }
468
469 public void removeAllNextSentenceTrans() {
470 removeAll(eu.lod2.nlp2rdf.schema.tools.Vocabulary.nextSentenceTrans);
471 }
472
473 /**
474 * Domain property previousWordTrans
475 * with uri http://nlp2rdf.lod2.eu/schema/sso/previousWordTrans
476 */
477 public boolean existsPreviousWordTrans() {
478 return hasProperty(eu.lod2.nlp2rdf.schema.tools.Vocabulary.previousWordTrans);
479 }
480
481 public boolean hasPreviousWordTrans(eu.lod2.nlp2rdf.schema.sso.IWord wordValue) {
482 return hasProperty(eu.lod2.nlp2rdf.schema.tools.Vocabulary.previousWordTrans, wordValue);
483 }
484
485 public int countPreviousWordTrans() {
486 int count = 0;
487 Iterator<eu.lod2.nlp2rdf.schema.sso.Word> it = iteratePreviousWordTrans();
488 while (it.hasNext()) {
489 it.next();
490 count++;
491 }
492 return count;
493 }
494
495 public Iterator<eu.lod2.nlp2rdf.schema.sso.Word> iteratePreviousWordTrans() {
496 ExtendedIterator<Statement> it = listProperties(eu.lod2.nlp2rdf.schema.tools.Vocabulary.previousWordTrans);
497 return it.mapWith(eu.lod2.nlp2rdf.schema.sso.Word.statementMapper).filterDrop(eu.lod2.nlp2rdf.schema.sso.Word.nullFilter);
498 }
499
500 public List<eu.lod2.nlp2rdf.schema.sso.Word> listPreviousWordTrans() {
501 List<eu.lod2.nlp2rdf.schema.sso.Word> list = new ArrayList<eu.lod2.nlp2rdf.schema.sso.Word>();
502 Iterator<eu.lod2.nlp2rdf.schema.sso.Word> it = iteratePreviousWordTrans();
503 while (it.hasNext()) {
504 eu.lod2.nlp2rdf.schema.sso.Word inst = it.next();
505 list.add(inst);
506 }
507 return list;
508 }
509
510 public void addPreviousWordTrans(eu.lod2.nlp2rdf.schema.sso.IWord wordValue) {
511 addProperty(eu.lod2.nlp2rdf.schema.tools.Vocabulary.previousWordTrans, wordValue);
512 }
513
514 public void addAllPreviousWordTrans(List<? extends eu.lod2.nlp2rdf.schema.sso.IWord> wordList) {
515 for (eu.lod2.nlp2rdf.schema.sso.IWord o : wordList)
516 addPreviousWordTrans(o);
517
518 }
519
520 public void removePreviousWordTrans(eu.lod2.nlp2rdf.schema.sso.IWord wordValue) {
521 removeProperty(eu.lod2.nlp2rdf.schema.tools.Vocabulary.previousWordTrans, wordValue);
522 }
523
524 public void removeAllPreviousWordTrans() {
525 removeAll(eu.lod2.nlp2rdf.schema.tools.Vocabulary.previousWordTrans);
526 }
527
528 /**
529 * Domain property nextWordTrans
530 * with uri http://nlp2rdf.lod2.eu/schema/sso/nextWordTrans
531 */
532 public boolean existsNextWordTrans() {
533 return hasProperty(eu.lod2.nlp2rdf.schema.tools.Vocabulary.nextWordTrans);
534 }
535
536 public boolean hasNextWordTrans(eu.lod2.nlp2rdf.schema.sso.IWord wordValue) {
537 return hasProperty(eu.lod2.nlp2rdf.schema.tools.Vocabulary.nextWordTrans, wordValue);
538 }
539
540 public int countNextWordTrans() {
541 int count = 0;
542 Iterator<eu.lod2.nlp2rdf.schema.sso.Word> it = iterateNextWordTrans();
543 while (it.hasNext()) {
544 it.next();
545 count++;
546 }
547 return count;
548 }
549
550 public Iterator<eu.lod2.nlp2rdf.schema.sso.Word> iterateNextWordTrans() {
551 ExtendedIterator<Statement> it = listProperties(eu.lod2.nlp2rdf.schema.tools.Vocabulary.nextWordTrans);
552 return it.mapWith(eu.lod2.nlp2rdf.schema.sso.Word.statementMapper).filterDrop(eu.lod2.nlp2rdf.schema.sso.Word.nullFilter);
553 }
554
555 public List<eu.lod2.nlp2rdf.schema.sso.Word> listNextWordTrans() {
556 List<eu.lod2.nlp2rdf.schema.sso.Word> list = new ArrayList<eu.lod2.nlp2rdf.schema.sso.Word>();
557 Iterator<eu.lod2.nlp2rdf.schema.sso.Word> it = iterateNextWordTrans();
558 while (it.hasNext()) {
559 eu.lod2.nlp2rdf.schema.sso.Word inst = it.next();
560 list.add(inst);
561 }
562 return list;
563 }
564
565 public void addNextWordTrans(eu.lod2.nlp2rdf.schema.sso.IWord wordValue) {
566 addProperty(eu.lod2.nlp2rdf.schema.tools.Vocabulary.nextWordTrans, wordValue);
567 }
568
569 public void addAllNextWordTrans(List<? extends eu.lod2.nlp2rdf.schema.sso.IWord> wordList) {
570 for (eu.lod2.nlp2rdf.schema.sso.IWord o : wordList)
571 addNextWordTrans(o);
572
573 }
574
575 public void removeNextWordTrans(eu.lod2.nlp2rdf.schema.sso.IWord wordValue) {
576 removeProperty(eu.lod2.nlp2rdf.schema.tools.Vocabulary.nextWordTrans, wordValue);
577 }
578
579 public void removeAllNextWordTrans() {
580 removeAll(eu.lod2.nlp2rdf.schema.tools.Vocabulary.nextWordTrans);
581 }
582
583 /**
584 * Domain property posTag
585 * with uri http://nlp2rdf.lod2.eu/schema/sso/posTag
586 */
587 public boolean existsPosTag() {
588 return hasProperty(eu.lod2.nlp2rdf.schema.tools.Vocabulary.posTag);
589 }
590
591 public boolean hasPosTag(java.lang.String stringValue) {
592 return hasProperty(eu.lod2.nlp2rdf.schema.tools.Vocabulary.posTag);
593 }
594
595 public int countPosTag() {
596 int count = 0;
597 Iterator<java.lang.String> it = iteratePosTag();
598 while (it.hasNext()) {
599 it.next();
600 count++;
601 }
602 return count;
603 }
604
605 public Iterator<java.lang.String> iteratePosTag() {
606 ExtendedIterator<Statement> it = listProperties(eu.lod2.nlp2rdf.schema.tools.Vocabulary.posTag);
607 return it.mapWith(nl.tudelft.tbm.eeni.owl2java.model.xsd.XsdUtils.objectAsStringMapper).filterDrop(new NullFilter<java.lang.String>());
608 }
609
610 public List<java.lang.String> listPosTag() {
611 List<java.lang.String> list = new ArrayList<java.lang.String>();
612 Iterator<java.lang.String> it = iteratePosTag();
613 while (it.hasNext()) {
614 java.lang.String inst = it.next();
615 list.add(inst);
616 }
617 return list;
618 }
619
620 public void addPosTag(java.lang.String stringValue) {
621 Literal literal = nl.tudelft.tbm.eeni.owl2java.model.xsd.XsdUtils.createTypedLiteral((OntModel) getModel(), stringValue, "http://www.w3.org/1999/02/22-rdf-syntax-ns#XMLLiteral");
622 setPropertyValue(eu.lod2.nlp2rdf.schema.tools.Vocabulary.posTag, literal);
623 }
624
625 public void addAllPosTag(List<java.lang.String> stringList) {
626 for (java.lang.String o : stringList)
627 addPosTag(o);
628 }
629
630 public void removePosTag(java.lang.String stringValue) {
631 Literal literal = nl.tudelft.tbm.eeni.owl2java.model.xsd.XsdUtils.createTypedLiteral((OntModel) getModel(), stringValue, "http://www.w3.org/1999/02/22-rdf-syntax-ns#XMLLiteral");
632 removeProperty(eu.lod2.nlp2rdf.schema.tools.Vocabulary.posTag, literal);
633 }
634
635 public void removeAllPosTag() {
636 removeAll(eu.lod2.nlp2rdf.schema.tools.Vocabulary.posTag);
637
638 }
639
640 /**
641 * Domain property lemma
642 * with uri http://nlp2rdf.lod2.eu/schema/sso/lemma
643 */
644 public boolean existsLemma() {
645 return hasProperty(eu.lod2.nlp2rdf.schema.tools.Vocabulary.lemma);
646 }
647
648 public boolean hasLemma(java.lang.String stringValue) {
649 return hasProperty(eu.lod2.nlp2rdf.schema.tools.Vocabulary.lemma);
650 }
651
652 public int countLemma() {
653 int count = 0;
654 Iterator<java.lang.String> it = iterateLemma();
655 while (it.hasNext()) {
656 it.next();
657 count++;
658 }
659 return count;
660 }
661
662 public Iterator<java.lang.String> iterateLemma() {
663 ExtendedIterator<Statement> it = listProperties(eu.lod2.nlp2rdf.schema.tools.Vocabulary.lemma);
664 return it.mapWith(nl.tudelft.tbm.eeni.owl2java.model.xsd.XsdUtils.objectAsStringMapper).filterDrop(new NullFilter<java.lang.String>());
665 }
666
667 public List<java.lang.String> listLemma() {
668 List<java.lang.String> list = new ArrayList<java.lang.String>();
669 Iterator<java.lang.String> it = iterateLemma();
670 while (it.hasNext()) {
671 java.lang.String inst = it.next();
672 list.add(inst);
673 }
674 return list;
675 }
676
677 public void addLemma(java.lang.String stringValue) {
678 Literal literal = nl.tudelft.tbm.eeni.owl2java.model.xsd.XsdUtils.createTypedLiteral((OntModel) getModel(), stringValue, "http://www.w3.org/1999/02/22-rdf-syntax-ns#XMLLiteral");
679 setPropertyValue(eu.lod2.nlp2rdf.schema.tools.Vocabulary.lemma, literal);
680 }
681
682 public void addAllLemma(List<java.lang.String> stringList) {
683 for (java.lang.String o : stringList)
684 addLemma(o);
685 }
686
687 public void removeLemma(java.lang.String stringValue) {
688 Literal literal = nl.tudelft.tbm.eeni.owl2java.model.xsd.XsdUtils.createTypedLiteral((OntModel) getModel(), stringValue, "http://www.w3.org/1999/02/22-rdf-syntax-ns#XMLLiteral");
689 removeProperty(eu.lod2.nlp2rdf.schema.tools.Vocabulary.lemma, literal);
690 }
691
692 public void removeAllLemma() {
693 removeAll(eu.lod2.nlp2rdf.schema.tools.Vocabulary.lemma);
694
695 }
696
697 /**
698 * Domain property stem
699 * with uri http://nlp2rdf.lod2.eu/schema/sso/stem
700 */
701 public boolean existsStem() {
702 return hasProperty(eu.lod2.nlp2rdf.schema.tools.Vocabulary.stem);
703 }
704
705 public boolean hasStem(java.lang.String stringValue) {
706 return hasProperty(eu.lod2.nlp2rdf.schema.tools.Vocabulary.stem);
707 }
708
709 public int countStem() {
710 int count = 0;
711 Iterator<java.lang.String> it = iterateStem();
712 while (it.hasNext()) {
713 it.next();
714 count++;
715 }
716 return count;
717 }
718
719 public Iterator<java.lang.String> iterateStem() {
720 ExtendedIterator<Statement> it = listProperties(eu.lod2.nlp2rdf.schema.tools.Vocabulary.stem);
721 return it.mapWith(nl.tudelft.tbm.eeni.owl2java.model.xsd.XsdUtils.objectAsStringMapper).filterDrop(new NullFilter<java.lang.String>());
722 }
723
724 public List<java.lang.String> listStem() {
725 List<java.lang.String> list = new ArrayList<java.lang.String>();
726 Iterator<java.lang.String> it = iterateStem();
727 while (it.hasNext()) {
728 java.lang.String inst = it.next();
729 list.add(inst);
730 }
731 return list;
732 }
733
734 public void addStem(java.lang.String stringValue) {
735 Literal literal = nl.tudelft.tbm.eeni.owl2java.model.xsd.XsdUtils.createTypedLiteral((OntModel) getModel(), stringValue, "http://www.w3.org/1999/02/22-rdf-syntax-ns#XMLLiteral");
736 setPropertyValue(eu.lod2.nlp2rdf.schema.tools.Vocabulary.stem, literal);
737 }
738
739 public void addAllStem(List<java.lang.String> stringList) {
740 for (java.lang.String o : stringList)
741 addStem(o);
742 }
743
744 public void removeStem(java.lang.String stringValue) {
745 Literal literal = nl.tudelft.tbm.eeni.owl2java.model.xsd.XsdUtils.createTypedLiteral((OntModel) getModel(), stringValue, "http://www.w3.org/1999/02/22-rdf-syntax-ns#XMLLiteral");
746 removeProperty(eu.lod2.nlp2rdf.schema.tools.Vocabulary.stem, literal);
747 }
748
749 public void removeAllStem() {
750 removeAll(eu.lod2.nlp2rdf.schema.tools.Vocabulary.stem);
751
752 }
753
754 /**
755 * Domain property superString
756 * with uri http://nlp2rdf.lod2.eu/schema/string/superString
757 */
758 public boolean existsSuperString() {
759 return hasProperty(eu.lod2.nlp2rdf.schema.tools.Vocabulary.superString);
760 }
761
762 public boolean hasSuperString(eu.lod2.nlp2rdf.schema.str.IString stringValue) {
763 return hasProperty(eu.lod2.nlp2rdf.schema.tools.Vocabulary.superString, stringValue);
764 }
765
766 public int countSuperString() {
767 int count = 0;
768 Iterator<eu.lod2.nlp2rdf.schema.str.String> it = iterateSuperString();
769 while (it.hasNext()) {
770 it.next();
771 count++;
772 }
773 return count;
774 }
775
776 public Iterator<eu.lod2.nlp2rdf.schema.str.String> iterateSuperString() {
777 ExtendedIterator<Statement> it = listProperties(eu.lod2.nlp2rdf.schema.tools.Vocabulary.superString);
778 return it.mapWith(eu.lod2.nlp2rdf.schema.str.String.statementMapper).filterDrop(eu.lod2.nlp2rdf.schema.str.String.nullFilter);
779 }
780
781 public List<eu.lod2.nlp2rdf.schema.str.String> listSuperString() {
782 List<eu.lod2.nlp2rdf.schema.str.String> list = new ArrayList<eu.lod2.nlp2rdf.schema.str.String>();
783 Iterator<eu.lod2.nlp2rdf.schema.str.String> it = iterateSuperString();
784 while (it.hasNext()) {
785 eu.lod2.nlp2rdf.schema.str.String inst = it.next();
786 list.add(inst);
787 }
788 return list;
789 }
790
791 public void addSuperString(eu.lod2.nlp2rdf.schema.str.IString stringValue) {
792 addProperty(eu.lod2.nlp2rdf.schema.tools.Vocabulary.superString, stringValue);
793 }
794
795 public void addAllSuperString(List<? extends eu.lod2.nlp2rdf.schema.str.IString> stringList) {
796 for (eu.lod2.nlp2rdf.schema.str.IString o : stringList)
797 addSuperString(o);
798
799 }
800
801 public void removeSuperString(eu.lod2.nlp2rdf.schema.str.IString stringValue) {
802 removeProperty(eu.lod2.nlp2rdf.schema.tools.Vocabulary.superString, stringValue);
803 }
804
805 public void removeAllSuperString() {
806 removeAll(eu.lod2.nlp2rdf.schema.tools.Vocabulary.superString);
807 }
808
809 /**
810 * Domain property subString
811 * with uri http://nlp2rdf.lod2.eu/schema/string/subString
812 */
813 public boolean existsSubString() {
814 return hasProperty(eu.lod2.nlp2rdf.schema.tools.Vocabulary.subString);
815 }
816
817 public boolean hasSubString(eu.lod2.nlp2rdf.schema.str.IString stringValue) {
818 return hasProperty(eu.lod2.nlp2rdf.schema.tools.Vocabulary.subString, stringValue);
819 }
820
821 public int countSubString() {
822 int count = 0;
823 Iterator<eu.lod2.nlp2rdf.schema.str.String> it = iterateSubString();
824 while (it.hasNext()) {
825 it.next();
826 count++;
827 }
828 return count;
829 }
830
831 public Iterator<eu.lod2.nlp2rdf.schema.str.String> iterateSubString() {
832 ExtendedIterator<Statement> it = listProperties(eu.lod2.nlp2rdf.schema.tools.Vocabulary.subString);
833 return it.mapWith(eu.lod2.nlp2rdf.schema.str.String.statementMapper).filterDrop(eu.lod2.nlp2rdf.schema.str.String.nullFilter);
834 }
835
836 public List<eu.lod2.nlp2rdf.schema.str.String> listSubString() {
837 List<eu.lod2.nlp2rdf.schema.str.String> list = new ArrayList<eu.lod2.nlp2rdf.schema.str.String>();
838 Iterator<eu.lod2.nlp2rdf.schema.str.String> it = iterateSubString();
839 while (it.hasNext()) {
840 eu.lod2.nlp2rdf.schema.str.String inst = it.next();
841 list.add(inst);
842 }
843 return list;
844 }
845
846 public void addSubString(eu.lod2.nlp2rdf.schema.str.IString stringValue) {
847 addProperty(eu.lod2.nlp2rdf.schema.tools.Vocabulary.subString, stringValue);
848 }
849
850 public void addAllSubString(List<? extends eu.lod2.nlp2rdf.schema.str.IString> stringList) {
851 for (eu.lod2.nlp2rdf.schema.str.IString o : stringList)
852 addSubString(o);
853
854 }
855
856 public void removeSubString(eu.lod2.nlp2rdf.schema.str.IString stringValue) {
857 removeProperty(eu.lod2.nlp2rdf.schema.tools.Vocabulary.subString, stringValue);
858 }
859
860 public void removeAllSubString() {
861 removeAll(eu.lod2.nlp2rdf.schema.tools.Vocabulary.subString);
862 }
863
864 /**
865 * Domain property superStringTrans
866 * with uri http://nlp2rdf.lod2.eu/schema/string/superStringTrans
867 */
868 public boolean existsSuperStringTrans() {
869 return hasProperty(eu.lod2.nlp2rdf.schema.tools.Vocabulary.superStringTrans);
870 }
871
872 public boolean hasSuperStringTrans(eu.lod2.nlp2rdf.schema.str.IString stringValue) {
873 return hasProperty(eu.lod2.nlp2rdf.schema.tools.Vocabulary.superStringTrans, stringValue);
874 }
875
876 public int countSuperStringTrans() {
877 int count = 0;
878 Iterator<eu.lod2.nlp2rdf.schema.str.String> it = iterateSuperStringTrans();
879 while (it.hasNext()) {
880 it.next();
881 count++;
882 }
883 return count;
884 }
885
886 public Iterator<eu.lod2.nlp2rdf.schema.str.String> iterateSuperStringTrans() {
887 ExtendedIterator<Statement> it = listProperties(eu.lod2.nlp2rdf.schema.tools.Vocabulary.superStringTrans);
888 return it.mapWith(eu.lod2.nlp2rdf.schema.str.String.statementMapper).filterDrop(eu.lod2.nlp2rdf.schema.str.String.nullFilter);
889 }
890
891 public List<eu.lod2.nlp2rdf.schema.str.String> listSuperStringTrans() {
892 List<eu.lod2.nlp2rdf.schema.str.String> list = new ArrayList<eu.lod2.nlp2rdf.schema.str.String>();
893 Iterator<eu.lod2.nlp2rdf.schema.str.String> it = iterateSuperStringTrans();
894 while (it.hasNext()) {
895 eu.lod2.nlp2rdf.schema.str.String inst = it.next();
896 list.add(inst);
897 }
898 return list;
899 }
900
901 public void addSuperStringTrans(eu.lod2.nlp2rdf.schema.str.IString stringValue) {
902 addProperty(eu.lod2.nlp2rdf.schema.tools.Vocabulary.superStringTrans, stringValue);
903 }
904
905 public void addAllSuperStringTrans(List<? extends eu.lod2.nlp2rdf.schema.str.IString> stringList) {
906 for (eu.lod2.nlp2rdf.schema.str.IString o : stringList)
907 addSuperStringTrans(o);
908
909 }
910
911 public void removeSuperStringTrans(eu.lod2.nlp2rdf.schema.str.IString stringValue) {
912 removeProperty(eu.lod2.nlp2rdf.schema.tools.Vocabulary.superStringTrans, stringValue);
913 }
914
915 public void removeAllSuperStringTrans() {
916 removeAll(eu.lod2.nlp2rdf.schema.tools.Vocabulary.superStringTrans);
917 }
918
919 /**
920 * Domain property subStringTrans
921 * with uri http://nlp2rdf.lod2.eu/schema/string/subStringTrans
922 */
923 public boolean existsSubStringTrans() {
924 return hasProperty(eu.lod2.nlp2rdf.schema.tools.Vocabulary.subStringTrans);
925 }
926
927 public boolean hasSubStringTrans(eu.lod2.nlp2rdf.schema.str.IString stringValue) {
928 return hasProperty(eu.lod2.nlp2rdf.schema.tools.Vocabulary.subStringTrans, stringValue);
929 }
930
931 public int countSubStringTrans() {
932 int count = 0;
933 Iterator<eu.lod2.nlp2rdf.schema.str.String> it = iterateSubStringTrans();
934 while (it.hasNext()) {
935 it.next();
936 count++;
937 }
938 return count;
939 }
940
941 public Iterator<eu.lod2.nlp2rdf.schema.str.String> iterateSubStringTrans() {
942 ExtendedIterator<Statement> it = listProperties(eu.lod2.nlp2rdf.schema.tools.Vocabulary.subStringTrans);
943 return it.mapWith(eu.lod2.nlp2rdf.schema.str.String.statementMapper).filterDrop(eu.lod2.nlp2rdf.schema.str.String.nullFilter);
944 }
945
946 public List<eu.lod2.nlp2rdf.schema.str.String> listSubStringTrans() {
947 List<eu.lod2.nlp2rdf.schema.str.String> list = new ArrayList<eu.lod2.nlp2rdf.schema.str.String>();
948 Iterator<eu.lod2.nlp2rdf.schema.str.String> it = iterateSubStringTrans();
949 while (it.hasNext()) {
950 eu.lod2.nlp2rdf.schema.str.String inst = it.next();
951 list.add(inst);
952 }
953 return list;
954 }
955
956 public void addSubStringTrans(eu.lod2.nlp2rdf.schema.str.IString stringValue) {
957 addProperty(eu.lod2.nlp2rdf.schema.tools.Vocabulary.subStringTrans, stringValue);
958 }
959
960 public void addAllSubStringTrans(List<? extends eu.lod2.nlp2rdf.schema.str.IString> stringList) {
961 for (eu.lod2.nlp2rdf.schema.str.IString o : stringList)
962 addSubStringTrans(o);
963
964 }
965
966 public void removeSubStringTrans(eu.lod2.nlp2rdf.schema.str.IString stringValue) {
967 removeProperty(eu.lod2.nlp2rdf.schema.tools.Vocabulary.subStringTrans, stringValue);
968 }
969
970 public void removeAllSubStringTrans() {
971 removeAll(eu.lod2.nlp2rdf.schema.tools.Vocabulary.subStringTrans);
972 }
973
974 /**
975 * Domain property anchorOf
976 * with uri http://nlp2rdf.lod2.eu/schema/string/anchorOf
977 */
978 public boolean existsAnchorOf() {
979 return hasProperty(eu.lod2.nlp2rdf.schema.tools.Vocabulary.anchorOf);
980 }
981
982 public boolean hasAnchorOf(java.lang.String stringValue) {
983 return hasProperty(eu.lod2.nlp2rdf.schema.tools.Vocabulary.anchorOf);
984 }
985
986 public java.lang.String getAnchorOf() {
987 RDFNode n = getPropertyValue(eu.lod2.nlp2rdf.schema.tools.Vocabulary.anchorOf);
988 if (n instanceof Literal) {
989 Literal l = (Literal) n;
990 return (java.lang.String) (nl.tudelft.tbm.eeni.owl2java.model.xsd.XsdUtils.getString(l));
991 } else {
992 log.warn("Could not convert anchorOf of " + getURI() + " (" + n + ") to type String");
993 return null;
994 }
995 }
996
997 public void setAnchorOf(java.lang.String stringValue) {
998 removeAll(eu.lod2.nlp2rdf.schema.tools.Vocabulary.anchorOf);
999 nl.tudelft.tbm.eeni.owl2java.model.xsd.XsdUtils.createTypedLiteral((OntModel) getModel(), stringValue, "http://www.w3.org/1999/02/22-rdf-syntax-ns#XMLLiteral");
1000 Literal literal = nl.tudelft.tbm.eeni.owl2java.model.xsd.XsdUtils.createTypedLiteral((OntModel) getModel(), stringValue, "http://www.w3.org/1999/02/22-rdf-syntax-ns#XMLLiteral");
1001 setPropertyValue(eu.lod2.nlp2rdf.schema.tools.Vocabulary.anchorOf, literal);
1002 }
1003
1004 public void removeAnchorOf() {
1005 removeAll(eu.lod2.nlp2rdf.schema.tools.Vocabulary.anchorOf);
1006 }
1007
1008 /**
1009 * Domain property endIndex
1010 * with uri http://nlp2rdf.lod2.eu/schema/string/endIndex
1011 */
1012 public boolean existsEndIndex() {
1013 return hasProperty(eu.lod2.nlp2rdf.schema.tools.Vocabulary.endIndex);
1014 }
1015
1016 public boolean hasEndIndex(java.lang.String stringValue) {
1017 return hasProperty(eu.lod2.nlp2rdf.schema.tools.Vocabulary.endIndex);
1018 }
1019
1020 public int countEndIndex() {
1021 int count = 0;
1022 Iterator<java.lang.String> it = iterateEndIndex();
1023 while (it.hasNext()) {
1024 it.next();
1025 count++;
1026 }
1027 return count;
1028 }
1029
1030 public Iterator<java.lang.String> iterateEndIndex() {
1031 ExtendedIterator<Statement> it = listProperties(eu.lod2.nlp2rdf.schema.tools.Vocabulary.endIndex);
1032 return it.mapWith(nl.tudelft.tbm.eeni.owl2java.model.xsd.XsdUtils.objectAsStringMapper).filterDrop(new NullFilter<java.lang.String>());
1033 }
1034
1035 public List<java.lang.String> listEndIndex() {
1036 List<java.lang.String> list = new ArrayList<java.lang.String>();
1037 Iterator<java.lang.String> it = iterateEndIndex();
1038 while (it.hasNext()) {
1039 java.lang.String inst = it.next();
1040 list.add(inst);
1041 }
1042 return list;
1043 }
1044
1045 public void addEndIndex(java.lang.String stringValue) {
1046 Literal literal = nl.tudelft.tbm.eeni.owl2java.model.xsd.XsdUtils.createTypedLiteral((OntModel) getModel(), stringValue, "http://www.w3.org/1999/02/22-rdf-syntax-ns#XMLLiteral");
1047 setPropertyValue(eu.lod2.nlp2rdf.schema.tools.Vocabulary.endIndex, literal);
1048 }
1049
1050 public void addAllEndIndex(List<java.lang.String> stringList) {
1051 for (java.lang.String o : stringList)
1052 addEndIndex(o);
1053 }
1054
1055 public void removeEndIndex(java.lang.String stringValue) {
1056 Literal literal = nl.tudelft.tbm.eeni.owl2java.model.xsd.XsdUtils.createTypedLiteral((OntModel) getModel(), stringValue, "http://www.w3.org/1999/02/22-rdf-syntax-ns#XMLLiteral");
1057 removeProperty(eu.lod2.nlp2rdf.schema.tools.Vocabulary.endIndex, literal);
1058 }
1059
1060 public void removeAllEndIndex() {
1061 removeAll(eu.lod2.nlp2rdf.schema.tools.Vocabulary.endIndex);
1062
1063 }
1064
1065 /**
1066 * Domain property beginIndex
1067 * with uri http://nlp2rdf.lod2.eu/schema/string/beginIndex
1068 */
1069 public boolean existsBeginIndex() {
1070 return hasProperty(eu.lod2.nlp2rdf.schema.tools.Vocabulary.beginIndex);
1071 }
1072
1073 public boolean hasBeginIndex(java.lang.String stringValue) {
1074 return hasProperty(eu.lod2.nlp2rdf.schema.tools.Vocabulary.beginIndex);
1075 }
1076
1077 public int countBeginIndex() {
1078 int count = 0;
1079 Iterator<java.lang.String> it = iterateBeginIndex();
1080 while (it.hasNext()) {
1081 it.next();
1082 count++;
1083 }
1084 return count;
1085 }
1086
1087 public Iterator<java.lang.String> iterateBeginIndex() {
1088 ExtendedIterator<Statement> it = listProperties(eu.lod2.nlp2rdf.schema.tools.Vocabulary.beginIndex);
1089 return it.mapWith(nl.tudelft.tbm.eeni.owl2java.model.xsd.XsdUtils.objectAsStringMapper).filterDrop(new NullFilter<java.lang.String>());
1090 }
1091
1092 public List<java.lang.String> listBeginIndex() {
1093 List<java.lang.String> list = new ArrayList<java.lang.String>();
1094 Iterator<java.lang.String> it = iterateBeginIndex();
1095 while (it.hasNext()) {
1096 java.lang.String inst = it.next();
1097 list.add(inst);
1098 }
1099 return list;
1100 }
1101
1102 public void addBeginIndex(java.lang.String stringValue) {
1103 Literal literal = nl.tudelft.tbm.eeni.owl2java.model.xsd.XsdUtils.createTypedLiteral((OntModel) getModel(), stringValue, "http://www.w3.org/1999/02/22-rdf-syntax-ns#XMLLiteral");
1104 setPropertyValue(eu.lod2.nlp2rdf.schema.tools.Vocabulary.beginIndex, literal);
1105 }
1106
1107 public void addAllBeginIndex(List<java.lang.String> stringList) {
1108 for (java.lang.String o : stringList)
1109 addBeginIndex(o);
1110 }
1111
1112 public void removeBeginIndex(java.lang.String stringValue) {
1113 Literal literal = nl.tudelft.tbm.eeni.owl2java.model.xsd.XsdUtils.createTypedLiteral((OntModel) getModel(), stringValue, "http://www.w3.org/1999/02/22-rdf-syntax-ns#XMLLiteral");
1114 removeProperty(eu.lod2.nlp2rdf.schema.tools.Vocabulary.beginIndex, literal);
1115 }
1116
1117 public void removeAllBeginIndex() {
1118 removeAll(eu.lod2.nlp2rdf.schema.tools.Vocabulary.beginIndex);
1119
1120 }
1121
1122 /**
1123 * Domain property rightContext
1124 * with uri http://nlp2rdf.lod2.eu/schema/string/rightContext
1125 */
1126 public boolean existsRightContext() {
1127 return hasProperty(eu.lod2.nlp2rdf.schema.tools.Vocabulary.rightContext);
1128 }
1129
1130 public boolean hasRightContext(java.lang.String stringValue) {
1131 return hasProperty(eu.lod2.nlp2rdf.schema.tools.Vocabulary.rightContext);
1132 }
1133
1134 public int countRightContext() {
1135 int count = 0;
1136 Iterator<java.lang.String> it = iterateRightContext();
1137 while (it.hasNext()) {
1138 it.next();
1139 count++;
1140 }
1141 return count;
1142 }
1143
1144 public Iterator<java.lang.String> iterateRightContext() {
1145 ExtendedIterator<Statement> it = listProperties(eu.lod2.nlp2rdf.schema.tools.Vocabulary.rightContext);
1146 return it.mapWith(nl.tudelft.tbm.eeni.owl2java.model.xsd.XsdUtils.objectAsStringMapper).filterDrop(new NullFilter<java.lang.String>());
1147 }
1148
1149 public List<java.lang.String> listRightContext() {
1150 List<java.lang.String> list = new ArrayList<java.lang.String>();
1151 Iterator<java.lang.String> it = iterateRightContext();
1152 while (it.hasNext()) {
1153 java.lang.String inst = it.next();
1154 list.add(inst);
1155 }
1156 return list;
1157 }
1158
1159 public void addRightContext(java.lang.String stringValue) {
1160 Literal literal = nl.tudelft.tbm.eeni.owl2java.model.xsd.XsdUtils.createTypedLiteral((OntModel) getModel(), stringValue, "http://www.w3.org/1999/02/22-rdf-syntax-ns#XMLLiteral");
1161 setPropertyValue(eu.lod2.nlp2rdf.schema.tools.Vocabulary.rightContext, literal);
1162 }
1163
1164 public void addAllRightContext(List<java.lang.String> stringList) {
1165 for (java.lang.String o : stringList)
1166 addRightContext(o);
1167 }
1168
1169 public void removeRightContext(java.lang.String stringValue) {
1170 Literal literal = nl.tudelft.tbm.eeni.owl2java.model.xsd.XsdUtils.createTypedLiteral((OntModel) getModel(), stringValue, "http://www.w3.org/1999/02/22-rdf-syntax-ns#XMLLiteral");
1171 removeProperty(eu.lod2.nlp2rdf.schema.tools.Vocabulary.rightContext, literal);
1172 }
1173
1174 public void removeAllRightContext() {
1175 removeAll(eu.lod2.nlp2rdf.schema.tools.Vocabulary.rightContext);
1176
1177 }
1178
1179 /**
1180 * Domain property leftContext
1181 * with uri http://nlp2rdf.lod2.eu/schema/string/leftContext
1182 */
1183 public boolean existsLeftContext() {
1184 return hasProperty(eu.lod2.nlp2rdf.schema.tools.Vocabulary.leftContext);
1185 }
1186
1187 public boolean hasLeftContext(java.lang.String stringValue) {
1188 return hasProperty(eu.lod2.nlp2rdf.schema.tools.Vocabulary.leftContext);
1189 }
1190
1191 public int countLeftContext() {
1192 int count = 0;
1193 Iterator<java.lang.String> it = iterateLeftContext();
1194 while (it.hasNext()) {
1195 it.next();
1196 count++;
1197 }
1198 return count;
1199 }
1200
1201 public Iterator<java.lang.String> iterateLeftContext() {
1202 ExtendedIterator<Statement> it = listProperties(eu.lod2.nlp2rdf.schema.tools.Vocabulary.leftContext);
1203 return it.mapWith(nl.tudelft.tbm.eeni.owl2java.model.xsd.XsdUtils.objectAsStringMapper).filterDrop(new NullFilter<java.lang.String>());
1204 }
1205
1206 public List<java.lang.String> listLeftContext() {
1207 List<java.lang.String> list = new ArrayList<java.lang.String>();
1208 Iterator<java.lang.String> it = iterateLeftContext();
1209 while (it.hasNext()) {
1210 java.lang.String inst = it.next();
1211 list.add(inst);
1212 }
1213 return list;
1214 }
1215
1216 public void addLeftContext(java.lang.String stringValue) {
1217 Literal literal = nl.tudelft.tbm.eeni.owl2java.model.xsd.XsdUtils.createTypedLiteral((OntModel) getModel(), stringValue, "http://www.w3.org/1999/02/22-rdf-syntax-ns#XMLLiteral");
1218 setPropertyValue(eu.lod2.nlp2rdf.schema.tools.Vocabulary.leftContext, literal);
1219 }
1220
1221 public void addAllLeftContext(List<java.lang.String> stringList) {
1222 for (java.lang.String o : stringList)
1223 addLeftContext(o);
1224 }
1225
1226 public void removeLeftContext(java.lang.String stringValue) {
1227 Literal literal = nl.tudelft.tbm.eeni.owl2java.model.xsd.XsdUtils.createTypedLiteral((OntModel) getModel(), stringValue, "http://www.w3.org/1999/02/22-rdf-syntax-ns#XMLLiteral");
1228 removeProperty(eu.lod2.nlp2rdf.schema.tools.Vocabulary.leftContext, literal);
1229 }
1230
1231 public void removeAllLeftContext() {
1232 removeAll(eu.lod2.nlp2rdf.schema.tools.Vocabulary.leftContext);
1233
1234 }
1235
1236 }