public class Util extends Object
Constructor and Description |
---|
Util() |
Modifier and Type | Method and Description |
---|---|
static String |
formatToWidth(int width,
String padding,
String str,
String separator)
Deprecated.
|
static Resource |
getContext(Repository repository,
String ctxID)
Get context IRI from string representation
|
static Resource[] |
getContexts(String[] tokens,
int pos,
Repository repository)
Get context IRIs from a series of tokens, starting from (zero-based) position within the series.
|
static Path |
getNormalizedPath(Path workDir,
String file)
Get path from file string if it's absolute, or from working directory if the file is relative.
|
static Path |
getPath(String file)
Deprecated.
|
static String |
getPrefixedValue(Value value,
Map<String,String> namespaces)
Get string representation for a value.
|
static boolean |
isHttpOrFile(String str)
Check if a string looks like a HTTP, HTTPS or file URI.
|
public static Resource getContext(Repository repository, String ctxID)
repository
- repositoryctxID
- context as stringpublic static Resource[] getContexts(String[] tokens, int pos, Repository repository) throws IllegalArgumentException
tokens
- command as series of tokenspos
- position to start fromrepository
- repositoryIllegalArgumentException
@Deprecated public static Path getPath(String file)
file
- file namepublic static boolean isHttpOrFile(String str)
str
- stringpublic static Path getNormalizedPath(Path workDir, String file)
workDir
- working dirfile
- file namepublic static String getPrefixedValue(Value value, Map<String,String> namespaces)
value
- valuenamespaces
- mapping (uri,prefix)@Deprecated public static String formatToWidth(int width, String padding, String str, String separator)
width
- maximum column widthpadding
- left paddingstr
- joined stringseparator
- value separatorCopyright © 2015-2020 Eclipse Foundation. All Rights Reserved.