Constructor and Description |
---|
MappingImpl(java.lang.String name) |
MappingImpl(java.lang.String name,
HubEntity entity) |
Modifier and Type | Method and Description |
---|---|
Mapping |
deserialize(com.fasterxml.jackson.databind.JsonNode json)
Deserializes a json response and applies it to this mapping
|
java.lang.String |
getDescription()
Returns a string description of what the mapping is/does
|
java.lang.String |
getLang()
Return the language key setting
|
java.lang.String |
getLanguage()
Deprecated.
|
java.lang.String |
getName()
Returns the name of the mapping as a string
|
java.util.Map<java.lang.String,java.lang.String> |
getNamespaces()
Gets the map of the namespaces for mapping
|
java.util.HashMap<java.lang.String,com.fasterxml.jackson.databind.node.ObjectNode> |
getProperties()
Gets the hashmap of the properties mapping
|
java.lang.String |
getSourceContext()
Returns the source context string for the mapping
|
java.lang.String |
getSourceURI()
Returns a URI of the mapping source document
|
java.lang.String |
getTargetEntityType()
Returns the IRI for the targeted entity type
|
int |
getVersion()
Returns the mapping version
|
void |
incrementVersion()
Automatically increments the version of the mapping by 1
|
java.lang.String |
serialize()
Serializes the mapping as a json string
|
void |
setDescription(java.lang.String description)
Set the description for the mapping
|
void |
setLang(java.lang.String lang)
*CAREFUL - DO NOT TOUCH IF YOU DON'T EXPLICITLY KNOW WHAT THIS VALUE REPRESENTS*
Sets the language for the mapping to use for MarkLogic server
|
void |
setLanguage(java.lang.String language)
Deprecated.
|
void |
setName(java.lang.String name)
Sets the name of the mapping as a string
|
void |
setNamespaces(java.util.Map<java.lang.String,java.lang.String> namespaces)
Sets the namespaces map for the mapping
|
void |
setProperties(java.util.HashMap<java.lang.String,com.fasterxml.jackson.databind.node.ObjectNode> properties)
Sets the properties hashmap for the mapping
|
void |
setSourceContext(java.lang.String sourceContext)
Sets the source context for the mapping
|
void |
setSourceURI(java.lang.String sourceURI)
Set the URI for the mapping source document
|
void |
setTargetEntityType(java.lang.String targetEntityType)
Setting the IRI for the target entity type
|
void |
setVersion(int version)
Sets the version for the mapping
|
public MappingImpl(java.lang.String name)
public MappingImpl(java.lang.String name, HubEntity entity)
public Mapping deserialize(com.fasterxml.jackson.databind.JsonNode json)
Mapping
deserialize
in interface Mapping
json
- - the jsonnode you want deserializedpublic java.util.Map<java.lang.String,java.lang.String> getNamespaces()
Mapping
getNamespaces
in interface Mapping
public void setNamespaces(java.util.Map<java.lang.String,java.lang.String> namespaces)
Mapping
setNamespaces
in interface Mapping
namespaces
- - map of namespace prefixes and their full URIs for the mappingpublic int getVersion()
Mapping
getVersion
in interface Mapping
public void setVersion(int version)
Mapping
setVersion
in interface Mapping
version
- - a whole integer representing the version of the mappingpublic java.util.HashMap<java.lang.String,com.fasterxml.jackson.databind.node.ObjectNode> getProperties()
Mapping
getProperties
in interface Mapping
public void setProperties(java.util.HashMap<java.lang.String,com.fasterxml.jackson.databind.node.ObjectNode> properties)
Mapping
setProperties
in interface Mapping
properties
- - hashmap of properties and their settings for the mappingpublic java.lang.String getName()
Mapping
public void setName(java.lang.String name)
Mapping
public java.lang.String getSourceContext()
Mapping
getSourceContext
in interface Mapping
public void setSourceContext(java.lang.String sourceContext)
Mapping
setSourceContext
in interface Mapping
sourceContext
- - the xpath to start the mapping from inside the root of the documentspublic java.lang.String getTargetEntityType()
Mapping
getTargetEntityType
in interface Mapping
public void setTargetEntityType(java.lang.String targetEntityType)
Mapping
setTargetEntityType
in interface Mapping
targetEntityType
- - the IRI of the entity you want this mapping to usepublic java.lang.String getDescription()
Mapping
getDescription
in interface Mapping
public void setDescription(java.lang.String description)
Mapping
setDescription
in interface Mapping
description
- - a short description of what this mapping's purpose ispublic java.lang.String getSourceURI()
Mapping
getSourceURI
in interface Mapping
public void setSourceURI(java.lang.String sourceURI)
Mapping
setSourceURI
in interface Mapping
sourceURI
- - a source URI@Deprecated public java.lang.String getLanguage()
Mapping
getLanguage
in interface Mapping
@Deprecated public void setLanguage(java.lang.String language)
Mapping
setLanguage
in interface Mapping
language
- - sets the language key for the server - don't modify please!public java.lang.String getLang()
Mapping
public void setLang(java.lang.String lang)
Mapping
public java.lang.String serialize()
Mapping
public void incrementVersion()
Mapping
incrementVersion
in interface Mapping