Package com.greentea.relaxation.jnmf.util.data.loading

Examples of com.greentea.relaxation.jnmf.util.data.loading.WrongMetadataException


         metadata = (Metadata) XmlUtils.unmarshall(xml, Metadata.class, ColumnInfo.class);
      }
      catch (JAXBException e)
      {
         e.printStackTrace();
         throw new WrongMetadataException(
                 Localizer.getString(StringId.CANT_PARSE_METADATA) + ": " + XmlUtils.lineSeparator +
                         xml.trim(), e);
      }

      return metadata;
View Full Code Here


      int columnsCount = data.getInputsCount() + data.getOutputsCount();

      if (min < 0)
      {
         throw new WrongMetadataException(Localizer.getString(StringId.MIN_COLUMN_INDEX) + " < 0.");
      }

      if (max >= columnsCount)
      {
         throw new WrongMetadataException(
                 "" + max + " >= " + columnsCount + Localizer.getString(StringId.MAX_COLUMN_INDEX));
      }

      Set<Integer> indexes = new TreeSet<Integer>();
      {
         for (ColumnInfo column : columns)
         {
            int index = column.getIndex();
            if (indexes.contains(index))
            {
               throw new WrongMetadataException(
                       Localizer.getString(StringId.COLUMN_INDEX_IS_NOT_UNIQUE, index));
            }

            indexes.add(index);
         }
View Full Code Here

TOP

Related Classes of com.greentea.relaxation.jnmf.util.data.loading.WrongMetadataException

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.