Logo Search packages:      
Sourcecode: libloader version File versions  Download package

static Object org::pentaho::reporting::libraries::resourceloader::ResourceKeyUtils::readSchemaFromString ( final String  data ) [inline, static]

Returns the schema portion of the serialized ResourceKey string. If the string is invalid, null will be returned.

Parameters:
datathe String serialized version of a ResourceKey
Returns:
the schema object.

Definition at line 244 of file ResourceKeyUtils.java.

  {
    if (data == null)
    {
      return null;
    }
    final CSVTokenizer tokenizer = new CSVTokenizer(data, DELIMITER, CSVTokenizer.DOUBLE_QUATE, false);
    if (tokenizer.hasMoreElements() == false)
    {
      return null;
    }

    final String tempData = tokenizer.nextToken();
    if (tempData.startsWith(SERIALIZATION_PREFIX))
    {
      return tempData.substring(SERIALIZATION_PREFIX.length());
    }
    return null;
  }

Generated by  Doxygen 1.6.0   Back to index