/** * Create a index collection from a set of descriptions. * * @param descriptions * the index descriptions * @return the index collection */ public static FsIndexCollection createFsIndexCollection(FsIndexDescription... descriptions) { FsIndexCollection_impl fsIndexCollection = new FsIndexCollection_impl(); fsIndexCollection.setFsIndexes(descriptions); return fsIndexCollection; }
/** * @see org.apache.uima.analysis_engine.metadata.AnalysisEngineMetaData#setFsIndexes(FsIndexDescription[]) */ public void setFsIndexes(FsIndexDescription[] aFsIndexes) { if (mFsIndexCollection == null) { mFsIndexCollection = new FsIndexCollection_impl(); } mFsIndexCollection.setFsIndexes(aFsIndexes); }
/** * Creates a {@link FsIndexCollection} from descriptor names. * * @param descriptorNames * The fully qualified, Java-style, dotted descriptor names. * @return a {@link FsIndexCollection} that includes the indexes from all of the specified files. */ public static FsIndexCollection createFsIndexCollection(String... descriptorNames) { List<Import> imports = new ArrayList<Import>(); for (String descriptorName : descriptorNames) { Import imp = new Import_impl(); imp.setName(descriptorName); imports.add(imp); } Import[] importArray = new Import[imports.size()]; FsIndexCollection fsIndexCollection = new FsIndexCollection_impl(); fsIndexCollection.setImports(imports.toArray(importArray)); return fsIndexCollection; }
/** * Creates a {@link FsIndexCollection} from a descriptor file * * @param descriptorURIs * The descriptor file paths. * @return A {@link FsIndexCollection} that includes the indexes from all of the specified files. */ public static FsIndexCollection createTypeSystemDescriptionFromPath(String... descriptorURIs) { List<Import> imports = new ArrayList<Import>(); for (String descriptorURI : descriptorURIs) { Import imp = new Import_impl(); imp.setLocation(descriptorURI); imports.add(imp); } Import[] importArray = new Import[imports.size()]; FsIndexCollection fsIndexCollection = new FsIndexCollection_impl(); fsIndexCollection.setImports(imports.toArray(importArray)); return fsIndexCollection; }
FsIndexCollection_impl fsIndexCollection = new FsIndexCollection_impl();