Package org.molgenis.model.elements

Examples of org.molgenis.model.elements.Index


      NodeList index_elements = elem.getElementsByTagName("index");
      for (int k = 0; k < index_elements.getLength(); k++)
      {
        elem = (Element) index_elements.item(k);

        Index index = new Index(elem.getAttribute("name"));

        NodeList indexfield_elements = elem.getElementsByTagName("indexfield");
        for (int l = 0; l < indexfield_elements.getLength(); l++)
        {
          elem = (Element) indexfield_elements.item(l);

          Field f = entity.getField(elem.getAttribute("name"));
          if (f == null)
          {
            // System.err.println(String.format(Error.
            // MISSING_INDEX_FIELD.msg,
            // elem.getAttribute("name")));
            throw new MolgenisModelException("Missing index field: " + elem.getAttribute("name"));
            // return null;
          }

          try
          {
            index.addField(elem.getAttribute("name"));
          }
          catch (Exception e)
          {
            throw new MolgenisModelException(e.getMessage());
          }
View Full Code Here


    }

    // check whether this field has a short-hand for index
    if (index.equals("true"))
    {
      Index i = new Index(name);
      try
      {
        i.addField(name);
      }
      catch (Exception e)
      {
        throw new MolgenisModelException("duplicate field '" + field.getName() + "' in entity '"
            + entity.getName() + "'");
View Full Code Here

TOP

Related Classes of org.molgenis.model.elements.Index

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.