public class AasUtils extends Object
| Modifier and Type | Field and Description |
|---|---|
static URI |
EMPTY_URI
An empty URI for
readUri(Object[], int, URI). |
| Constructor and Description |
|---|
AasUtils() |
| Modifier and Type | Method and Description |
|---|---|
static String |
fixId(String id)
Modifies a given
id so that it fits the needs of the implementation. |
static int |
readInt(Object[] args,
int index,
int dflt)
Reads the
index argument from args as int. |
static Map<String,String> |
readMap(Object[] args,
int index,
Map<String,String> dflt)
Reads the
index argument from args as map of strings. |
static String |
readString(Object[] args)
Reads the first argument from args as String with default value empty.
|
static String |
readString(Object[] args,
int index)
Reads the
index argument from args as String with default value empty. |
static String |
readString(Object[] args,
int index,
String dflt)
Reads the
index argument from args as String. |
static URI |
readUri(Object[] args,
int index,
URI dflt)
Reads the
index argument from args as URI. |
static URI |
readUriEx(Object[] args,
int index,
URI dflt)
Reads the
index argument from args as URI. |
static String |
writeMap(Map<String,String> map)
Writes a map to JSON.
|
public static final URI EMPTY_URI
readUri(Object[], int, URI).public static String readString(Object[] args)
args - the array to take the value frompublic static String readString(Object[] args, int index)
index argument from args as String with default value empty.args - the array to take the value fromindex - the 0-based index into argspublic static String readString(Object[] args, int index, String dflt)
index argument from args as String.args - the array to take the value fromindex - the 0-based index into argsdflt - default value if the index is wrong, there is no value/null ...public static int readInt(Object[] args, int index, int dflt)
index argument from args as int.args - the array to take the value fromindex - the 0-based index into argsdflt - default value if the index is wrong, there is no value/null, the value is no int...public static URI readUriEx(Object[] args, int index, URI dflt) throws URISyntaxException
index argument from args as URI.args - the array to take the value fromindex - the 0-based index into argsdflt - default value if the index is wrong, there is no value/nullURISyntaxException - if the value cannot be turned into an URI...public static URI readUri(Object[] args, int index, URI dflt)
index argument from args as URI.args - the array to take the value fromindex - the 0-based index into argsdflt - default value if the index is wrong, there is no value/null, the value cannot be turned
into an URI...public static String fixId(String id)
id so that it fits the needs of the implementation. Uses
AasFactory.fixId(String).id - the idpublic static Map<String,String> readMap(Object[] args, int index, Map<String,String> dflt)
index argument from args as map of strings.args - the array to take the value fromindex - the 0-based index into argsdflt - default value if the index is wrong, there is no value/null ...Copyright © 2021. All rights reserved.