@Override public void initialize(UimaContext aContext) throws ResourceInitializationException { super.initialize(aContext); typeSystemWritten = false; }
/** * Get the base location used by the reader. This location always ends in a / if it is set at * all. If there is no base, an empty string is returned. * * @return the base location used by the reader. */ protected String getBase() { return getBase(getSourceLocation()); }
protected NamedOutputStream getOutputStream(JCas aJCas, String aExtension) throws IOException { if (targetLocation == null) { return new NamedOutputStream(null, new CloseShieldOutputStream(System.out)); } else if (singularTarget) { return getOutputStream((String) null, aExtension); } else { return getOutputStream(getRelativePath(aJCas), aExtension); } }
/** * Initialize the {@link DocumentMetaData}. This must be called before setting the document * text, otherwise the end feature of this annotation will not be set correctly. * * @param aCas * the CAS. * @param aResource * the resource from which the CAS is initialized. */ protected void initCas(CAS aCas, Resource aResource) { initCas(aCas, aResource, null); }
protected void initCas(JCas aJCas, FileResource aResource) { super.initCas(aJCas.getCas(), aResource, null); } }
public static Set<String> readStopwordsURL(URL url, boolean lowercase) throws IOException { return readStopwordsInputStream(url.openStream(), lowercase); }
@Override public boolean hasNext() throws IOException, CollectionException { return textIterator != null && textIterator.hasNext() || super.hasNext(); }
@Override public Progress[] getProgress() { return new Progress[] { new ProgressImpl(completed, getIncludedFilesCount(), "file") }; }
@Override public void initialize(UimaContext aContext) throws ResourceInitializationException { super.initialize(aContext); typeSystemWritten = false; }
protected NamedOutputStream getOutputStream(JCas aJCas, String aExtension) throws IOException { if (targetLocation == null) { return new NamedOutputStream(null, new CloseShieldOutputStream(System.out)); } else if (singularTarget) { return getOutputStream((String) null, aExtension); } else { return getOutputStream(getRelativePath(aJCas), aExtension); } }
/** * Get the base location used by the reader. This location always ends in a / if it is set at * all. If there is no base, an empty string is returned. * * @return the base location used by the reader. */ protected String getBase() { return getBase(getSourceLocation()); }
/** * Initialize the {@link DocumentMetaData}. This must be called before setting the document * text, otherwise the end feature of this annotation will not be set correctly. * * @param aCas * the CAS. * @param aResource * the resource from which the CAS is initialized. */ protected void initCas(CAS aCas, Resource aResource) { initCas(aCas, aResource, null); }
protected void initCas(JCas aJCas, FileResource aResource) { super.initCas(aJCas.getCas(), aResource, null); } }
public static Set<String> readStopwordsURL(URL url, boolean lowercase) throws IOException { return readStopwordsInputStream(url.openStream(), lowercase); }
@Override public void initialize(UimaContext aContext) throws ResourceInitializationException { super.initialize(aContext); typeSystemWritten = false; }
protected void initCas(JCas aJCas, Resource aResource, String aQualifier) { super.initCas(aJCas.getCas(), aResource, aQualifier); } }
@Override public void initialize(UimaContext aContext) throws ResourceInitializationException { super.initialize(aContext); typeSystemWritten = false; }
@Override public void initialize(final UimaContext context) throws ResourceInitializationException { super.initialize(context); clazz = TypeParameterUtil.getClass(type); }