Java AbstractMap Usage parseEntityURI(final String uri)

Here you can find the source of parseEntityURI(final String uri)

Description

parse Entity URI

License

Apache License

Declaration

public static Map.Entry<String, String> parseEntityURI(final String uri) 

Method Source Code

//package com.java2s;
/**/*w w  w  .  java2 s  .c  om*/
 * Licensed to the Apache Software Foundation (ASF) under one
 * or more contributor license agreements.  See the NOTICE file
 * distributed with this work for additional information
 * regarding copyright ownership.  The ASF licenses this file
 * to you under the Apache License, Version 2.0 (the
 * "License"); you may not use this file except in compliance
 * with the License.  You may obtain a copy of the License at
 *
 *   http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing,
 * software distributed under the License is distributed on an
 * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
 * KIND, either express or implied.  See the License for the
 * specific language governing permissions and limitations
 * under the License.
 */

import java.util.AbstractMap.SimpleEntry;

import java.util.Map;

public class Main {
    public static Map.Entry<String, String> parseEntityURI(final String uri) {
        final String relPath = uri.substring(uri.lastIndexOf("/"));
        final int branchIndex = relPath.indexOf('(');
        final String es = relPath.substring(0, branchIndex);
        final String eid = relPath.substring(branchIndex + 1, relPath.indexOf(')'));
        return new SimpleEntry<String, String>(es, eid);
    }
}

Related

  1. buildClause(String key, String... values)
  2. countLinesColumns(String text, int initialLinesCnt, int initialColumnsCnt)
  3. decodeIconUrl(String path)
  4. getClassType(Object obj)
  5. getSymmetricPropertyValueDifference( Properties propertyFileOne, Properties propertyFileTwo)
  6. parseExportedVariable(String exportedVariable)
  7. parseSocketAddress(String address)
  8. parseVariableName(String variableName)
  9. splitByQualifier(String str)