Class AspectModelUrn
java.lang.Object
io.openmanufacturing.sds.aspectmodel.urn.AspectModelUrn
- All Implemented Interfaces:
Comparable<AspectModelUrn>
Represents the identifier URN of an Aspect Model.
- See Also:
-
- https://openmanufacturingplatform.github.io/sds-bamm-aspect-meta-model/bamm-specification/v1.0.0/namespaces.html for the definition of the URN.
-
Field Summary
Fields -
Method Summary
Modifier and TypeMethodDescriptionintbooleanstatic AspectModelUrnCreates aAspectModelUrnfrom a URN.static AspectModelUrnCreates aAspectModelUrnfrom a URN.getName()Returns the local name of the model element, e.g.Returns the namespace part of the URN, e.g.getUrn()Returns the full URN of the model elementReturns prefix part of the URN, i.e.Returns the version of the model element, e.g.inthashCode()booleantoString()
-
Field Details
-
NAMESPACE_REGEX
- See Also:
-
NAMESPACE_PATTERN
-
MODEL_ELEMENT_NAME_REGEX
- See Also:
-
VERSION_REGEX
- See Also:
-
VALID_PROTOCOL
- See Also:
-
VALID_NAMESPACE_IDENTIFIER
- See Also:
-
MAX_URN_LENGTH
public static final int MAX_URN_LENGTH- See Also:
-
ASPECT_NAME_INDEX
public static final int ASPECT_NAME_INDEX- See Also:
-
-
Method Details
-
fromUrn
Creates aAspectModelUrnfrom a URN.- Parameters:
urn- the urn which will be parsed to create theAspectModelUrninstance- Returns:
AspectModelUrncontaining the individual parts from the urn- Throws:
UrnSyntaxException- ifurnis not valid
-
fromUrn
Creates aAspectModelUrnfrom a URN.- Parameters:
urn- the urn which will be parsed to create theAspectModelUrninstance- Returns:
AspectModelUrncontaining the individual parts from the urn- Throws:
UrnSyntaxException- ifurnis not valid
-
getUrn
Returns the full URN of the model element- Returns:
- the model URN
-
getName
Returns the local name of the model element, e.g. MyAspect- Returns:
- the local name of the model element
-
getVersion
Returns the version of the model element, e.g. 1.2.3- Returns:
- the version of the model element
-
getNamespace
Returns the namespace part of the URN, e.g. com.example.foo- Returns:
- the namespace part of the URN
-
getUrnPrefix
Returns prefix part of the URN, i.e. the part up to and including the # but not including the local name, e.g. urn:bamm:com.foo.example:1.0.0#- Returns:
- the prefix part of the URN
-
getElementType
-
isBammUrn
public boolean isBammUrn() -
toString
-
equals
-
hashCode
public int hashCode() -
compareTo
- Specified by:
compareToin interfaceComparable<AspectModelUrn>
-