Package org.apache.uima.simpleserver

Examples of org.apache.uima.simpleserver.SimpleServerException


    List<TypeMap> typeSpecs = this.getTypeSpecs();
    for (TypeMap typeMap : typeSpecs) {
      // Check that the type exists.
      Type type = typeSystem.getType(typeMap.getTypeName());
      if (type == null) {
        exc.add(new SimpleServerException(SimpleServerException.type_does_not_exist,
            new Object[] { typeMap.getTypeName() }));
        continue;
      }
      // Now go through the filter and outputs and check each path for validity
      Filter filter = typeMap.getFilter();
View Full Code Here


  private static final void checkOutputs(List<Output> outputs, Type type,
      List<SimpleServerException> exc) {
    for (Output output : outputs) {
      List<String> fPath = output.getFeaturePath();
      if (TypeSystemUtils.isPathValid(type, fPath) == PathValid.NEVER) {
        exc.add(new SimpleServerException(SimpleServerException.path_never_valid, new Object[] {
            fPathToString(fPath), type }));
      }
    }
  }
View Full Code Here

      break;
    }
    case SIMPLE: {
      List<String> fPath = ((SimpleFilter) filter).getFeaturePath();
      if (TypeSystemUtils.isPathValid(type, fPath) == PathValid.NEVER) {
        exc.add(new SimpleServerException(SimpleServerException.path_never_valid, new Object[] {
            fPathToString(fPath), type }));
      }
      break;
    }
    }
View Full Code Here

    }
  }

  private static final void valueMustBeNull(FilterOp op, String value) throws SimpleServerException {
    if (value != null) {
      throw new SimpleServerException(SimpleServerException.value_must_not_be_set, new Object[] {
          op, value });
    }
  }
View Full Code Here

  }

  private static final void valueMustNotBeNull(FilterOp op, String value)
      throws SimpleServerException {
    if (value == null) {
      throw new SimpleServerException(SimpleServerException.value_must_be_set, new Object[] { op });
    }
  }
View Full Code Here

      while ((next < max) && (path.charAt(next) != ServerSpec.PATH_SEPARATOR)) {
        ++next;
      }
      // Found a slash at next position, invalid path syntax
      if ((next < max) && (next == pos)) {
        throw new SimpleServerException(SimpleServerException.incorrect_path_syntax,
            new Object[] { path });
      }
      String feature = path.substring(pos, next);
      if (!TypeSystemUtils.isIdentifier(feature)) {
        throw new SimpleServerException(SimpleServerException.incorrect_feature_syntax,
            new Object[] { feature, path });
      }
      featureList.add(feature);
      pos = next + 1;
    }
View Full Code Here

TOP

Related Classes of org.apache.uima.simpleserver.SimpleServerException

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.