Class PrefixMapImpl
- java.lang.Object
-
- de.tudresden.inf.lat.tabulas.table.PrefixMapImpl
-
- All Implemented Interfaces:
PrefixMap
,Serializable
,scala.Equals
,scala.Product
public class PrefixMapImpl extends Object implements PrefixMap, scala.Product, Serializable
An object of this class is a map of URI prefixes. This implementation iterates on the keys keeping the order in which they were added for the first time.- See Also:
- Serialized Form
-
-
Constructor Summary
Constructors Constructor Description PrefixMapImpl(scala.collection.immutable.Map<URI,URI> prefixMap, scala.collection.immutable.Seq<URI> keyList)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static PrefixMapImpl
apply()
scala.Option<URI>
get(URI key)
Returns the expansion for the given prefix.scala.collection.immutable.Seq<URI>
getKeys()
Returns a sequence to iterate on the keys.scala.Option<URI>
getPrefixFor(URI uri)
Returns an optional with the prefix for the given URI, or empty if there is none.URI
getWithoutPrefix(URI uri)
Returns a URI without the prefix, i.e.URI
getWithPrefix(URI uri)
Returns a URI with the prefix, i.e.boolean
isEmpty()
Returnstrue
if and only if this map does not contain associations.scala.collection.immutable.Seq<URI>
keyList()
String
PrefixAmpersand()
Start of the prefix.scala.collection.immutable.Map<URI,URI>
prefixMap()
String
PrefixSemicolon()
End of the prefix.int
size()
Returns the size of this prefix map.String
toString()
-
-
-
Method Detail
-
apply
public static PrefixMapImpl apply()
-
PrefixAmpersand
public final String PrefixAmpersand()
Description copied from interface:PrefixMap
Start of the prefix.- Specified by:
PrefixAmpersand
in interfacePrefixMap
- Returns:
- (undocumented)
-
PrefixSemicolon
public final String PrefixSemicolon()
Description copied from interface:PrefixMap
End of the prefix.- Specified by:
PrefixSemicolon
in interfacePrefixMap
- Returns:
- (undocumented)
-
keyList
public scala.collection.immutable.Seq<URI> keyList()
-
isEmpty
public boolean isEmpty()
Description copied from interface:PrefixMap
Returnstrue
if and only if this map does not contain associations.
-
size
public int size()
Description copied from interface:PrefixMap
Returns the size of this prefix map.
-
getWithoutPrefix
public URI getWithoutPrefix(URI uri)
Description copied from interface:PrefixMap
Returns a URI without the prefix, i.e. with the prefix already expanded.- Specified by:
getWithoutPrefix
in interfacePrefixMap
- Parameters:
uri
- uri- Returns:
- a URI without the prefix
-
getWithPrefix
public URI getWithPrefix(URI uri)
Description copied from interface:PrefixMap
Returns a URI with the prefix, i.e. a shortened URI.- Specified by:
getWithPrefix
in interfacePrefixMap
- Parameters:
uri
- URI- Returns:
- a URI with the prefix
-
get
public scala.Option<URI> get(URI key)
Description copied from interface:PrefixMap
Returns the expansion for the given prefix.
-
getPrefixFor
public scala.Option<URI> getPrefixFor(URI uri)
Description copied from interface:PrefixMap
Returns an optional with the prefix for the given URI, or empty if there is none.- Specified by:
getPrefixFor
in interfacePrefixMap
- Parameters:
uri
- URI- Returns:
- an optional with the prefix for the given URI, or empty if there is none
-
getKeys
public scala.collection.immutable.Seq<URI> getKeys()
Description copied from interface:PrefixMap
Returns a sequence to iterate on the keys.
-
-