Package openllet.owlapi
Interface IRIUtils
-
public interface IRIUtilsA set of function usefull to manage IRIs- Since:
- 2.5.1
-
-
Field Summary
Fields Modifier and Type Field Description static java.util.concurrent.atomic.AtomicLong_atomicstatic java.util.Random_randomstatic long_timeShift
-
Method Summary
All Methods Static Methods Deprecated Methods Modifier and Type Method Description static <T> java.lang.Stringbase(java.lang.Class<T> clazz)static <T> org.semanticweb.owlapi.model.IRIclazz(java.lang.Class<T> clazz)static <T> java.lang.Stringcore(java.lang.Class<T> clazz)static <T> java.lang.Stringcore(java.lang.Class<T> clazz, java.lang.reflect.Method method)static java.time.InstantinstantFromRandStr(java.lang.String rand)static java.time.InstantinstantFromShortTime(java.lang.String hexTime)static java.lang.StringiriModel2iri(java.lang.String iri)static booleanisIRI(java.lang.String resource)Deprecated.static <T> org.semanticweb.owlapi.model.IRImethod(java.lang.Class<T> clazz, java.lang.reflect.Method m)static <T> org.semanticweb.owlapi.model.IRIname(java.lang.Class<T> clazz, java.lang.String entity)Work for property and individualstatic <T> org.semanticweb.owlapi.model.IRIontology(java.lang.Class<T> clazz, java.lang.String purpose, java.lang.String entity)static <T> org.semanticweb.owlapi.model.IRIrand(java.lang.Class<T> clazz)static <T> org.semanticweb.owlapi.model.IRIrand(java.lang.Class<T> clazz, java.lang.String entity)static java.lang.StringrandId(java.lang.String begin)static java.lang.StringrandStr()static java.lang.StringshortTime()We remove an huge part of the time the flow before the application first start.static java.lang.StringshortTime(long epochMilli)
-
-
-
Field Detail
-
_random
static final java.util.Random _random
-
_atomic
static final java.util.concurrent.atomic.AtomicLong _atomic
-
_timeShift
static final long _timeShift
- See Also:
- Constant Field Values
-
-
Method Detail
-
shortTime
static java.lang.String shortTime()
We remove an huge part of the time the flow before the application first start. The aim is just to get shorter ids that will stayed ordered among runs.- Returns:
- a short string that describe a point in time.
- Since:
- 2.5.1
-
shortTime
static java.lang.String shortTime(long epochMilli)
-
instantFromShortTime
static java.time.Instant instantFromShortTime(java.lang.String hexTime)
-
instantFromRandStr
static java.time.Instant instantFromRandStr(java.lang.String rand)
- Parameters:
rand- is a String generated with the the randStr() method.- Returns:
- an Instant as parsed from a String generated with the randStr() method.
- Since:
- 2.6.0
-
randStr
static java.lang.String randStr()
- Returns:
- create an random string base on a random generator, the short time, and a atomic long.
- Since:
- 2.6.0
-
randId
static java.lang.String randId(java.lang.String begin)
- Parameters:
begin- will be placed at the start of the result.- Returns:
- a random String with the given String placed at the start and two inner separator around the random part.
- Since:
- 2.5.1
-
isIRI
@Deprecated static boolean isIRI(java.lang.String resource)
Deprecated.- Parameters:
resource- to check- Returns:
- true if the String is an IRI.
- Since:
- 2.5.1
-
iriModel2iri
static java.lang.String iriModel2iri(java.lang.String iri)
- Parameters:
iri- an iri that is potentially valid or with a namespace separator.- Returns:
- The iri without the part that show the namespace as separate object as the individual name.
-
base
static <T> java.lang.String base(java.lang.Class<T> clazz)
-
core
static <T> java.lang.String core(java.lang.Class<T> clazz)
-
core
static <T> java.lang.String core(java.lang.Class<T> clazz, java.lang.reflect.Method method)
-
name
static <T> org.semanticweb.owlapi.model.IRI name(java.lang.Class<T> clazz, java.lang.String entity)Work for property and individual- Type Parameters:
T- the type of the clazz- Parameters:
clazz- of the entity. The entity msut have a clazz, at least its class of creation.entity- the name of the object/individual.- Returns:
- an IRI that is standard to the clazz and entity
-
rand
static <T> org.semanticweb.owlapi.model.IRI rand(java.lang.Class<T> clazz)
- Type Parameters:
T- type of the class- Parameters:
clazz- of the individual use to general the iri of the individual- Returns:
- a random iri that fit the name of an individiual
- Since:
- 2.5.1
-
rand
static <T> org.semanticweb.owlapi.model.IRI rand(java.lang.Class<T> clazz, java.lang.String entity)
-
method
static <T> org.semanticweb.owlapi.model.IRI method(java.lang.Class<T> clazz, java.lang.reflect.Method m)
-
clazz
static <T> org.semanticweb.owlapi.model.IRI clazz(java.lang.Class<T> clazz)
-
ontology
static <T> org.semanticweb.owlapi.model.IRI ontology(java.lang.Class<T> clazz, java.lang.String purpose, java.lang.String entity)
-
-