01: /*
02: * Copyright Aduna (http://www.aduna-software.com/) (c) 1997-2006.
03: *
04: * Licensed under the Aduna BSD-style license.
05: */
06: package org.openrdf.http.webclient.properties;
07:
08: import java.beans.PropertyEditorSupport;
09:
10: import org.openrdf.rio.RDFFormat;
11:
12: public class RDFFormatPropertyEditor extends PropertyEditorSupport {
13:
14: @Override
15: public String getAsText() {
16: return ((RDFFormat) getValue()).getName();
17: }
18:
19: @Override
20: public void setAsText(String text) throws IllegalArgumentException {
21: setValue(RDFFormat.valueOf(text));
22: }
23: }
|