Search in sources :

Example 1 with ConfigurationParameterSettings

use of org.apache.uima.resource.metadata.ConfigurationParameterSettings in project dkpro-tc by dkpro.

the class DiscriminableNameConverter method getCollectionReaderDescription.

public static String getCollectionReaderDescription(CollectionReaderDescription crd) {
    ResourceMetaData metaData = crd.getMetaData();
    ConfigurationParameterSettings settings = metaData.getConfigurationParameterSettings();
    NameValuePair[] params = settings.getParameterSettings();
    String implementationName = crd.getImplementationName();
    List<String> entries = new ArrayList<>();
    entries.add(implementationName);
    entries = addParameters(entries, params);
    StringBuilder sb = new StringBuilder();
    for (int i = 0; i < entries.size(); i++) {
        sb.append(entries.get(i));
        if (i + 1 < entries.size()) {
            sb.append(", ");
        }
    }
    String description = "[" + sb.toString() + "]";
    return description;
}
Also used : ConfigurationParameterSettings(org.apache.uima.resource.metadata.ConfigurationParameterSettings) NameValuePair(org.apache.uima.resource.metadata.NameValuePair) ArrayList(java.util.ArrayList) ResourceMetaData(org.apache.uima.resource.metadata.ResourceMetaData)

Aggregations

ArrayList (java.util.ArrayList)1 ConfigurationParameterSettings (org.apache.uima.resource.metadata.ConfigurationParameterSettings)1 NameValuePair (org.apache.uima.resource.metadata.NameValuePair)1 ResourceMetaData (org.apache.uima.resource.metadata.ResourceMetaData)1