fields;
/**
* Metadata Pointer constructor.
*
* The following example
*
* {@code
*
*
* Ancapistan
* Kropotkin
*
*
* }
*
* can be created by constructing the object like this:
*
* {@code
* Map fields = new HashMap<>();
* fields.add("game", "Ancapistan");
* fields.add("character", "Kropotkin");
* MetadataPointer pointer = new MetadataPointer("http://example.com/virtualworlds", fields);
* }
*
*
* @param namespace namespace of the child element of the metadata pointer.
* @param fields fields of the child element as key, value pairs.
*/
public MetadataPointer(String namespace, Map fields) {
this.namespace = StringUtils.requireNotNullNorEmpty(namespace, "Namespace MUST NOT be null, nor empty.");
this.fields = fields;
}
/**
* Get the namespace of the pointers child element.
*
* @return the namespace
*/
public String getNamespace() {
return namespace;
}
/**
* Get the fields of the pointers child element.
*
* @return the fields
*/
public Map getFields() {
return fields;
}
}