Splits a list of qualified (meta-) annotation names into a proper java
list.

@param rawCorpusNames The qualified names separated by ",".
@return
768050
private List<MatrixQueryData.QName> splitMatrixKeysFromRaw(String raw)
  {
    LinkedList<MatrixQueryData.QName> result = new LinkedList<>();

    String[] split = raw.split(",");
    for (String s : split)
    {
      String[] nameSplit = s.trim().split(":", 2);
      MatrixQueryData.QName qname = new MatrixQueryData.QName();
      if (nameSplit.length == 2)
      {
        qname.namespace = nameSplit[0].trim();
        qname.name = nameSplit[1].trim();
      }
      else
      {
        qname.name = nameSplit[0].trim();
      }
      result.add(qname);
    }

    return result;
  }
388221
protected List<String> parseNameList( DdlTokenStream tokens ) throws ParsingException {
        List<String> names = new LinkedList<String>();

        while (true) {
            names.add(parseName(tokens));

            if (!tokens.canConsume(COMMA)) {
                break;
            }
        }

        return names;
    }
792145
private String trimLeadingSlashIfNeeded(String rawName) {
        if (rawName != null && rawName.startsWith("/")) {
            return rawName.substring(1);
        }
        return rawName;
    }
798425
public static List<ColumnDefinition> fromSchema(UntypedResultSet serializedColumns, String ksName, String cfName, AbstractType<?> rawComparator, boolean isSuper)
    {
        List<ColumnDefinition> cds = new ArrayList<>();
        for (UntypedResultSet.Row row : serializedColumns)
        {
            Kind kind = row.has(KIND)
                      ? Kind.deserialize(row.getString(KIND))
                      : Kind.REGULAR;

            Integer componentIndex = null;
            if (row.has(COMPONENT_INDEX))
                componentIndex = row.getInt(COMPONENT_INDEX);
            else if (kind == Kind.CLUSTERING_COLUMN && isSuper)
                componentIndex = 1; // A ColumnDefinition for super columns applies to the column component

            // Note: we save the column name as string, but we should not assume that it is an UTF8 name, we
            // we need to use the comparator fromString method
            AbstractType<?> comparator = getComponentComparator(rawComparator, componentIndex, kind);
            ColumnIdentifier name = new ColumnIdentifier(comparator.fromString(row.getString(COLUMN_NAME)), comparator);

            AbstractType<?> validator;
            try
            {
                validator = TypeParser.parse(row.getString(TYPE));
            }
            catch (RequestValidationException e)
            {
                throw new RuntimeException(e);
            }

            IndexType indexType = null;
            if (row.has(INDEX_TYPE))
                indexType = IndexType.valueOf(row.getString(INDEX_TYPE));

            Map<String, String> indexOptions = null;
            if (row.has(INDEX_OPTIONS))
                indexOptions = FBUtilities.fromJsonMap(row.getString(INDEX_OPTIONS));

            String indexName = null;
            if (row.has(INDEX_NAME))
                indexName = row.getString(INDEX_NAME);

            cds.add(new ColumnDefinition(ksName, cfName, name, validator, indexType, indexOptions, indexName, componentIndex, kind));
        }

        return cds;
    }
594027
@Override
    public Resource qualifiedNameToResource(QualifiedName name) {
	String unescapedLocalName = qnU.unescapeProvLocalName(name.getLocalPart());
	if (isBlankName(name)) {
	    return new BNodeImpl(unescapedLocalName);
	} else {
	    return new URIImpl(name.getNamespaceURI() + unescapedLocalName);

	}
    }
1266248
public final List<SequenceLabel> getNames(final String[] tokens) {

    final Span[] origSpans = nercToSpans(tokens);
    final Span[] neSpans = SequenceLabelerME.dropOverlappingSpans(origSpans);
    final List<SequenceLabel> names = getNamesFromSpans(neSpans, tokens);
    return names;
  }
340556
private static List<String> parseTagNames(String tagNames) {
    return Arrays.stream(tagNames.split("\\s*,\\s*"))
        .map(String::trim)
        .collect(Collectors.toList());
  }
797931
public static List<String> split( String name ) {
        List<String> firstPassTokens = tokeniseOnSeparators( name );

        List<String> tokens = tokeniseOnLowercaseToUppercase( firstPassTokens );

        return tokens;
    }
19516
private String buildFileName(final String... names) {
        final StringBuilder builder = new StringBuilder();
        for (int i = 0; i < names.length; i++) {
            builder.append(names[i]);
            if (i < names.length - 1) {
                builder.append(SEPARATOR);
            }
        }
        builder.append(".").append("csv");
        return builder.toString();
    }
1088529
public static List<AnnotationDto> transformToDto(List<Annotation> annotations) {
        if (annotations == null) {
            throw new WebApplicationException("Null entity object cannot be converted to Dto object.", Status.INTERNAL_SERVER_ERROR);
        }

        List<AnnotationDto> result = new ArrayList<>();

        for (Annotation annotation : annotations) {
            result.add(transformToDto(annotation));
        }
        return result;
    }
850117
public void splitQuery(I invocation, String rawURI)
    throws IOException
  {
    int p = rawURI.indexOf('?');
    if (p > 0) {
      invocation.setQueryString(rawURI.substring(p + 1));
      
      rawURI = rawURI.substring(0, p);
    }

    invocation.setRawURI(rawURI);
    
    String uri = normalizeUri(rawURI);

    invocation.setURI(uri);
  }
582870
public static String concatEntityCollectionHref(
      String baseUri,
      String qualifiedEntityName,
      String qualifiedIdAttributeName,
      List<String> entitiesIds) {
    String ids;
    ids = entitiesIds.stream().map(Href::encodeIdToRSQL).collect(Collectors.joining(","));
    return String.format(
        "%s/%s?q=%s=in=(%s)",
        baseUri,
        encodePathSegment(qualifiedEntityName),
        encodePathSegment(qualifiedIdAttributeName),
        ids);
  }
422062
public static String [] splitClassname ( String classname ) {
        classname = canonicalizeClassName( classname );

        int i=classname.lastIndexOf(".");
        String classn, packn;
        if ( i == -1 )  {
            // top level class
            classn = classname;
            packn="<unpackaged>";
        } else {
            packn = classname.substring(0,i);
            classn = classname.substring(i+1);
        }
        return new String [] { packn, classn };
    }
1204825
@GET
  @Produces("text/plain")
  @Path("check")
  public String check(@QueryParam("q") String query, 
    @DefaultValue("") @QueryParam("corpora") String rawCorpusNames)
  {
    Subject user = SecurityUtils.getSubject();
    List<String> corpusNames = splitCorpusNamesFromRaw(rawCorpusNames);
    for (String c : corpusNames)
    {
      user.checkPermission("query:parse:" + c);
    }
    Collections.sort(corpusNames);
    
    List<Long> corpusIDs = queryDao.mapCorpusNamesToIds(
      corpusNames);
    
    queryDao.parseAQL(query, corpusIDs);
    return "ok";
  }
229850
public GroupFilter nameContains(String... subStrings) {
        checkNotNull(subStrings, "Name match criteria must be not a null");

        predicate = predicate.and(combine(
            GroupMetadata::getName, in(asList(subStrings), Predicates::containsIgnoreCase)
        ));

        return this;
    }
44069
public static CmsEntityWrapper[] arrayFromEntityList(List<CmsEntity> entities) {

        CmsEntityWrapper[] result = new CmsEntityWrapper[entities.size()];
        for (int i = 0; i < entities.size(); i++) {
            result[i] = new CmsEntityWrapper(entities.get(i));
        }
        return result;
    }
1360097
public static List<NamespaceDto> transformToDto(List<Namespace> namespaces) {
        if (namespaces == null) {
            throw new WebApplicationException("Null entity object cannot be converted to Dto object.", Status.INTERNAL_SERVER_ERROR);
        }

        List<NamespaceDto> result = new ArrayList<>();

        for (Namespace namespace : namespaces) {
            result.add(transformToDto(namespace));
        }
        return result;
    }