private DataType getDataType(int type) { switch (type) { case LiteralType.BOOLEAN: return DataTypes.BooleanType; case LiteralType.STRING: return DataTypes.StringType; case LiteralType.FLOAT: return DataTypes.FloatType; case LiteralType.DOUBLE: return DataTypes.DoubleType; case LiteralType.INTEGER: return DataTypes.IntegerType; case LiteralType.LONG: return DataTypes.LongType; case LiteralType.DATETIME: // datetime not supported due to timezone issues with java.sql.Timestamp // check the InstanceAggregator for more info return DataTypes.StringType; } throw new NotImplementedException("Not able to write literal type " + type); }
String generateDiagram() throws MojoExecutionException { switch (diagramType) { case plantuml: PlantumlClassDiagramBuilder builder = new PlantumlClassDiagramBuilder(project, packageRoot, excludes, rootAggregateColor == null || rootAggregateColor.isEmpty() ? DEFAULT_ROOT_COLOR : rootAggregateColor, diagramHeader, diagramFooter, diagramShowMethods, diagramShowFields, diagramWithDependencies, diagramLinkPage); if (onlyAnnotated) { builder.filterOnAnnotation(UbiquitousLanguage.class); } if (diagramWithLink && !DiagramImageType.png.equals(diagramImageType)) { builder.mapNames(glossaryMapping); } return builder.generate(); default: throw new NotImplementedException(String.format("format %s is not implemented yet", diagramType)); } }
@Override public void handle(Connection connection, RetrieveItemRewardPacket packet) { Character character = gameDataRetreiver.getUserCharacterByConnectionId(connection.getID()); CharactersQuests quest = findSuiteQuest(character.getQuests(), packet.getQuestName()); CharactersQuestsItemReward itemReward = findSuiteItemReward(quest.getItemsReward(), packet.getItemIdentifier()); PlayerCharacter player = (PlayerCharacter) gameContainer.getObject(character.getId()); InventoryPosition inventoryPosition = new InventoryPosition(packet.getDesiredInventoryPage(), packet.getDesiredInventoryX(), packet.getDesiredInventoryY()); Item gameItem; if (itemReward.getNumberOfItems() == packet.getNumberOfItems()) gameItem = GameItemsFactory.produce(itemReward.getItemIdentifier(), itemReward.getNumberOfItems(), IdSupplier.getId(), inventoryPosition); else throw new NotImplementedException("Not implemented yet"); player.addItemAllowStacking(gameItem); connection.sendTCP(PacketsMaker.makeItemRewardRemovePacket(packet.getItemIdentifier(), itemReward.getNumberOfItems())); connection.sendTCP(PacketsMaker.makeItemPacket(gameItem)); }
@Override public <R> TypeAdapter<R> create(Gson gson, TypeToken<R> type) { if (type.getRawType() != baseType) { return null; } return new TypeAdapter<R>() { @Override public R read(JsonReader in) throws IOException { JsonElement jsonElement = Streams.parse(in); JsonElement labelJsonElement = jsonElement.getAsJsonObject().remove(typeFieldName); if (labelJsonElement == null) { throw new JsonParseException("cannot deserialize " + baseType + " because it does not define a field named " + typeFieldName); } String label = labelJsonElement.getAsString(); try { String subclassName = baseType.getName() + "$" + label.replaceAll("\\s", ""); Class<?> subclass = Class.forName(subclassName); @SuppressWarnings("unchecked") TypeAdapter<R> delegate = (TypeAdapter<R>) gson.getDelegateAdapter( InnerClassTypeAdapterFactory.this, TypeToken.get(subclass)); if (delegate == null) { throw new JsonParseException("cannot deserialize " + baseType + " subtype named " + label); } return delegate.fromJsonTree(jsonElement); } catch (ClassNotFoundException e) { throw new JsonParseException("cannot deserialize " + baseType + " subtype named " + label); } } @Override public void write(JsonWriter out, R value) throws IOException { throw new NotImplementedException("Write not implemented for InnerClassTypeAdapter"); } }.nullSafe(); }
public static Persistor createPersistor(OutputConfig config) { OutputConfig.OutputTarget target = config.getTarget(); switch (target) { case DB: try { String driverClassName = config.getDbConfig().getDriverClassName(); switch (driverClassName) { case "org.postgresql.Driver": return new DbPersistorPostgres(config.getDbConfig(), config.getSaveMode()); case "com.microsoft.sqlserver.jdbc.SQLServerDriver": return new DbPersistorSQLServer(config.getDbConfig(), config.getSaveMode()); } } catch (ConfigurationException ignored) { } return new DbPersistor(config.getDbConfig(), config.getSaveMode()); case CSV: return new CSVPersistor(config.getFileConfig(), config.getSaveMode()); case JSON: return new JSONPersistor(config.getFileConfig(), config.getSaveMode()); case ES: return new ElasticSearchPersistor(config.getEsConfig()); case Preview: return new PreviewPersistor(); case DataFrameMap: return new DataFrameMapPersistor(config.getResultMap()); default: throw new NotImplementedException("Output not supported: " + config); } }
@ExceptionHandler(NotImplementedException.class) @ResponseStatus(value = HttpStatus.NOT_IMPLEMENTED) @ResponseBody public XAPIErrorInfo handleNotImplementedException(final HttpServletRequest request, final NotImplementedException e) { final XAPIErrorInfo result = new XAPIErrorInfo(HttpStatus.NOT_IMPLEMENTED, request, e.getLocalizedMessage()); this.logException(e); this.logError(result); return result; }
@Override public <T> Codec<T> get(Type type, TypeCodecRegistry typeCodecRegistry) { // byte arrays are handled well by the mongo java driver if (TypeUtils.isArrayType(type)) { return new ArrayCodec(type, typeCodecRegistry); } else if (type instanceof TypeVariable) { throw new IllegalArgumentException("This registry (and probably no other one as well) can not handle generic type variables."); } else if (type instanceof WildcardType) { LOGGER.error("WildcardTypes are not yet supported. {}", type); throw new NotImplementedException("WildcardTypes are not yet supported. " + type); } // the default codecs provided by the mongo driver lack the decode method, hence this redefinition else if (Float.class.equals(type)) { return (Codec<T>) FLOAT_CODEC; } else if (Short.class.equals(type)) { return (Codec<T>) SHORT_CODEC; } else if (Byte.class.equals(type)) { return (Codec<T>) BYTE_CODEC; } else if (TypeUtils.isAssignable(type, SpecialFieldsMap.class)) { return new SpecialFieldsMapCodec(type, typeCodecRegistry); } // List ? Codec<T> codec = ListTypeCodec.getCodecIfApplicable(type, typeCodecRegistry); if (codec != null) { return codec; } // Set ? codec = SetTypeCodec.getCodecIfApplicable(type, typeCodecRegistry); if (codec != null) { return codec; } // Map ? codec = MapTypeCodec.getCodecIfApplicable(type, typeCodecRegistry); if (codec != null) { return codec; } return null; }
@Test public void toResponse() { final EmptyResultDataAccessException exception = new EmptyResultDataAccessException("message-error", 1, new NotImplementedException("message-error2")); check(mock(new NoResultExceptionMapper()).toResponse(exception), 404, "{\"code\":\"entity\",\"message\":\"message-error2\",\"parameters\":null,\"cause\":null}"); }
public PassageContent substituteIntoPassages(String text, String uri, List<Link> links) { throw new NotImplementedException("Not implemented yet."); }
@Override public SamlService createService(final String id) { throw new NotImplementedException("This operation is not supported. "); }
@Override public WebApplicationService extractServiceInternal(final HttpServletRequest request) { throw new NotImplementedException("This operation is not supported. " + "The class is deprecated and will be removed in future versions"); }
@Override public GoogleAccountsService createService(final String id) { throw new NotImplementedException("This operation is not supported. "); }
@Override protected WebApplicationService extractServiceInternal(final HttpServletRequest request) { throw new NotImplementedException("This operation is not supported. " + "The class is deprecated and will be removed in future versions"); }
@Override public void destroyDeviceImplementation(Device device) { throw new NotImplementedException("not implemented..."); //TODO }
default T generateIdIfAbsentFromDocument(T document) { throw new NotImplementedException("Please implement in collectible implementations."); }
@Override public void highlight(String locator) { throw new NotImplementedException(""); }
@Override public void highlight(String locator, String color) { throw new NotImplementedException(""); }
public void inviteMember() { throw new NotImplementedException("Not implemented in client"); }
@Override public String getAuthType() { throw new NotImplementedException(""); }
@Override protected SqlFirewallRuleImpl wrapModel(String name) { throw new NotImplementedException("Should never hit this code, currently not exposed"); }
@Override public long getDateHeader(String name) { throw new NotImplementedException(""); }
@Override public int getIntHeader(String name) { throw new NotImplementedException(""); }
@Override public String getMethod() { throw new NotImplementedException(""); }
@Override public String getPathTranslated() { throw new NotImplementedException(""); }
@Override public String getContextPath() { throw new NotImplementedException(""); }
@Override public String getQueryString() { throw new NotImplementedException(""); }
public List<File> getJavaSourceFolders() { throw new NotImplementedException(""); }
@Override public Principal getUserPrincipal() { throw new NotImplementedException(""); }
@Override public String getRequestedSessionId() { throw new NotImplementedException(""); }
@Override public String getRequestURI() { throw new NotImplementedException(""); }
@Override public StringBuffer getRequestURL() { throw new NotImplementedException(""); }
@Override public HttpSession getSession(boolean create) { throw new NotImplementedException(""); }
@Override public HttpSession getSession() { throw new NotImplementedException(""); }
@Override public boolean isRequestedSessionIdFromCookie() { throw new NotImplementedException(""); }
@Override public boolean isRequestedSessionIdFromURL() { throw new NotImplementedException(""); }