Beispiel #1
0
 public OntolinguaNamedSequenceOfSentences(string name, KifSequence <KifSentence> sentences)
 {
     if (StringUtils.isEmpty(name))
     {
         throw new ArgumentException("name cann't be null or empty");
     }
     if (sentences == null || sentences.getSize() == 0)
     {
         throw new ArgumentNullException("sentences cann't be null or empty");
     }
     _name      = name;
     _sentences = new KifSequence <KifSentence>(sentences);
 }
Beispiel #2
0
        public override IList <IModelItem> getChildren() //TODO:
        {
            List <IModelItem> result = new List <IModelItem>(_sentences.getSize() + 4);

            result.Add(new KifConstant(_name));
            result.Add(DELIMITER);
            result.Add(LexemFactory.getInstance().getLexem(LEFT_BRACKET));
            result.AddRange(_sentences.getChildren());
            result.Add(LexemFactory.getInstance().getLexem(RIGHT_BRACKET));
//            KifSequence<KifObject> sequence = new KifSequence<KifObject>(new KifConstant(Name));
//            sequence.addItem(Sentence);
//            return sequence.getChildren();
            return(result);
        }