Package edu.uga.galileo.voci.exception

Examples of edu.uga.galileo.voci.exception.ImportException


  public ArrayList<VociBusinessObject> performQuery( String query,
      ContentType type, int projectId ) throws ImportException
  {
    if ((type == ContentType.COMMUNITY) && (!query.startsWith("id:")))
    {
      throw new ImportException("Invalid query.  Repository imports "
          + "can only be done by id.");
    }
    else if ((type == ContentType.COLLECTION)
        && (!((query.startsWith("id:")) || (query.startsWith("repo:")))))
    {
      throw new ImportException("Invalid query.  Collection imports "
          + "must be done individually by id, or collectively "
          + "by repository.");
    }
    else if ((type == ContentType.ITEM)
        && (!((query.startsWith("id:")) || (query.startsWith("coll:")))))
    {
      throw new ImportException("Invalid query.  Item imports "
          + "must be done individually by id, or collectively "
          + "by collection.");
    }

    Document document = null;
View Full Code Here


    {
      document = sax.build(sread);
    }
    catch( IOException ioex )
    {
      throw new ImportException(
          "A communications error occurred in processing the "
              + "reply from Ultimate: " + ioex.getMessage());
    }
    catch( JDOMException jd )
    {
      throw new ImportException("A parsing error occurred while reading "
          + "the reply from Ultimate: " + jd.getMessage());
    }
    return document;

  }// end getDocument()
View Full Code Here

                        : ContentType.COLLECTION
                            .getValue());
          }
          catch( NoSuchMetadataException e )
          {
            throw new ImportException(
                "Couldn't retrieve 'id' metadata field for "
                    + (keys[i].startsWith("repo") ? ContentType.COMMUNITY
                        .toString().toLowerCase()
                        : ContentType.COLLECTION
                            .toString()
View Full Code Here

TOP

Related Classes of edu.uga.galileo.voci.exception.ImportException

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.