public IExceptionEntry parseLine(String line) { IExceptionEntryProxy proxy = fParser.parseLine(line); return (proxy == null) ? null : new ExceptionEntry(proxy, getPOS()); } }
/** * Creates a new exception entry for the specified part of speech using the * information in the specified exception proxy object. * * @param proxy * the proxy containing the information for the entry * @param pos * the part of speech for the entry * @throws NullPointerException * if either argument is <code>null</code> * @since JWI 1.0 */ public ExceptionEntry(IExceptionEntryProxy proxy, POS pos) { super(proxy); if (pos == null) throw new NullPointerException(); this.pos = pos; this.id = new ExceptionEntryID(getSurfaceForm(), pos); }
public IExceptionEntry getExceptionEntry(IExceptionEntryID id) { checkOpen(); IContentType<IExceptionEntryProxy> content = resolveExceptionContentType(id.getPOS()); IDataSource<IExceptionEntryProxy> file = provider.getSource(content); // fix for bug 010 if(file == null) return null; String line = file.getLine(id.getSurfaceForm()); if (line == null) return null; IExceptionEntryProxy proxy = content.getDataType().getParser().parseLine(line); if(proxy == null) return null; return new ExceptionEntry(proxy, id.getPOS()); }
/** * Creates a new exception entry for the specified part of speech using the * specified surface and root forms. * * @param surfaceForm * the surface form for the entry * @param pos * the part of speech for the entry * @param rootForms * the root forms for the entry * @throws NullPointerException * if either argument is <code>null</code> * @since JWI 1.0 */ public ExceptionEntry(String surfaceForm, POS pos, String... rootForms) { super(surfaceForm, rootForms); if(pos == null) throw new NullPointerException(); this.id = new ExceptionEntryID(getSurfaceForm(), pos); this.pos = pos; }