Package io.setl.rdf.normalization
Class IdentifierIssuer
- java.lang.Object
-
- io.setl.rdf.normalization.IdentifierIssuer
-
public class IdentifierIssuer extends java.lang.ObjectAn issuer of counted identifiers to map identifiers from one naming scheme to another.
-
-
Constructor Summary
Constructors Constructor Description IdentifierIssuer(java.lang.String prefix)Create a new instance.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidassign(IdentifierIssuer other)Create a mapping in an other issuer for all identifiers issued by this, in the same order that they were issued by this.IdentifierIssuercopy()Create a copy of this issuer.com.apicatalog.rdf.RdfResourcegetId(com.apicatalog.rdf.RdfResource id)Get or allocate a new ID for the specified old ID.com.apicatalog.rdf.RdfResourcegetIfExists(com.apicatalog.rdf.RdfResource value, java.util.concurrent.atomic.AtomicBoolean flag)Get the resource replaced by a proper blank identifier if appropriate.booleanhasId(com.apicatalog.rdf.RdfResource id)Does an old ID have an allocated new ID?.
-
-
-
Method Detail
-
assign
public void assign(IdentifierIssuer other)
Create a mapping in an other issuer for all identifiers issued by this, in the same order that they were issued by this.- Parameters:
other- the other identifier issuer.
-
copy
public IdentifierIssuer copy()
Create a copy of this issuer.- Returns:
- the issuer to copy
-
getId
public com.apicatalog.rdf.RdfResource getId(com.apicatalog.rdf.RdfResource id)
Get or allocate a new ID for the specified old ID.- Parameters:
id- the old ID- Returns:
- the new ID
-
getIfExists
public com.apicatalog.rdf.RdfResource getIfExists(com.apicatalog.rdf.RdfResource value, java.util.concurrent.atomic.AtomicBoolean flag)Get the resource replaced by a proper blank identifier if appropriate.- Parameters:
value- the resource to checkflag- set to true if a replacement happens- Returns:
- the value or the replaced value
-
hasId
public boolean hasId(com.apicatalog.rdf.RdfResource id)
Does an old ID have an allocated new ID?.- Parameters:
id- the old ID- Returns:
- true of a new ID has been allocated for this old ID.
-
-