Skip to content

InscoperAPI/Build/Java/com.inscoper.api/com/inscoper/api/Metadata.java

Packages

Name
com.inscoper.api

Classes

Name
class com.inscoper.api.Metadata
Metadata class represents a container for image metadata.

Source code

/* ----------------------------------------------------------------------------
 * This file was automatically generated by SWIG (https://www.swig.org).
 * Version 4.3.1
 *
 * Do not make changes to this file unless you know what you are doing - modify
 * the SWIG interface file instead.
 * ----------------------------------------------------------------------------- */

package com.inscoper.api;
import com.inscoper.api.logging.*;

public class Metadata {
  private transient long swigCPtr;
  private transient boolean swigCMemOwn;

  protected Metadata(long cPtr, boolean cMemoryOwn) {
    swigCMemOwn = cMemoryOwn;
    swigCPtr = cPtr;
  }

  protected static long getCPtr(Metadata obj) {
    return (obj == null) ? 0 : obj.swigCPtr;
  }

  protected void swigSetCMemOwn(boolean own) {
    swigCMemOwn = own;
  }

  @SuppressWarnings({"deprecation", "removal"})
  protected void finalize() {
    delete();
  }

  public synchronized void delete() {
    if (swigCPtr != 0) {
      if (swigCMemOwn) {
        swigCMemOwn = false;
        InscoperJNI.delete_Metadata(swigCPtr);
      }
      swigCPtr = 0;
    }
  }

  protected void swigDirectorDisconnect() {
    swigSetCMemOwn(false);
    delete();
  }

  public void swigReleaseOwnership() {
    swigSetCMemOwn(false);
    InscoperJNI.Metadata_change_ownership(this, swigCPtr, false);
  }

  public void swigTakeOwnership() {
    swigSetCMemOwn(true);
    InscoperJNI.Metadata_change_ownership(this, swigCPtr, true);
  }

  public Metadata() {
    this(InscoperJNI.new_Metadata__SWIG_0(), true);
    InscoperJNI.Metadata_director_connect(this, swigCPtr, true, true);
  }

  public Metadata(Metadata md) {
    this(InscoperJNI.new_Metadata__SWIG_1(Metadata.getCPtr(md), md), true);
    InscoperJNI.Metadata_director_connect(this, swigCPtr, true, true);
  }

  public void copy(Metadata md) {
    InscoperJNI.Metadata_copy(swigCPtr, this, Metadata.getCPtr(md), md);
  }

  public long index() {
    return InscoperJNI.Metadata_index(swigCPtr, this);
  }

  public SWIGTYPE_p_std__type_info type() {
    return new SWIGTYPE_p_std__type_info(InscoperJNI.Metadata_type(swigCPtr, this), false);
  }

  public String serialize() {
    return (getClass() == Metadata.class) ? InscoperJNI.Metadata_serialize(swigCPtr, this) : InscoperJNI.Metadata_serializeSwigExplicitMetadata(swigCPtr, this);
  }

  public String toString() {
    return (getClass() == Metadata.class) ? InscoperJNI.Metadata_toString(swigCPtr, this) : InscoperJNI.Metadata_toStringSwigExplicitMetadata(swigCPtr, this);
  }

  public void fromString(String value, long index) throws com.inscoper.api.InscoperException {
    InscoperJNI.Metadata_fromString(swigCPtr, this, value, index);
  }

  public java.lang.Object swigOriginalObject() {
    return InscoperJNI.Metadata_swigOriginalObject(swigCPtr, this);
  }

  public Metadata(boolean value) {
    this(InscoperJNI.new_Metadata__SWIG_3(value), true);
    InscoperJNI.Metadata_director_connect(this, swigCPtr, true, true);
  }

  public Metadata(char value) {
    this(InscoperJNI.new_Metadata__SWIG_4(value), true);
    InscoperJNI.Metadata_director_connect(this, swigCPtr, true, true);
  }

  public Metadata(short value) {
    this(InscoperJNI.new_Metadata__SWIG_5(value), true);
    InscoperJNI.Metadata_director_connect(this, swigCPtr, true, true);
  }

  public Metadata(int value) {
    this(InscoperJNI.new_Metadata__SWIG_6(value), true);
    InscoperJNI.Metadata_director_connect(this, swigCPtr, true, true);
  }

  public Metadata(long value) {
    this(InscoperJNI.new_Metadata__SWIG_7(value), true);
    InscoperJNI.Metadata_director_connect(this, swigCPtr, true, true);
  }

  public Metadata(float value) {
    this(InscoperJNI.new_Metadata__SWIG_8(value), true);
    InscoperJNI.Metadata_director_connect(this, swigCPtr, true, true);
  }

  public Metadata(double value) {
    this(InscoperJNI.new_Metadata__SWIG_9(value), true);
    InscoperJNI.Metadata_director_connect(this, swigCPtr, true, true);
  }

  public Metadata(String value) {
    this(InscoperJNI.new_Metadata__SWIG_10(value), true);
    InscoperJNI.Metadata_director_connect(this, swigCPtr, true, true);
  }

  public java.lang.Object get() {
    return InscoperJNI.Metadata_get(swigCPtr, this);
  }

  public boolean isList() {
    return InscoperJNI.Metadata_isList(swigCPtr, this);
  }

  public void fromList(MetadataList args) {
    InscoperJNI.Metadata_fromList(swigCPtr, this, MetadataList.getCPtr(args), args);
  }

  public MetadataList asList() throws com.inscoper.api.InscoperException {
    return new MetadataList(InscoperJNI.Metadata_asList(swigCPtr, this), true);
  }

  public boolean isMap() {
    return InscoperJNI.Metadata_isMap(swigCPtr, this);
  }

  public void fromMap(MetadataMap args) {
    InscoperJNI.Metadata_fromMap(swigCPtr, this, MetadataMap.getCPtr(args), args);
  }

  public MetadataMap asMap() throws com.inscoper.api.InscoperException {
    return new MetadataMap(InscoperJNI.Metadata_asMap(swigCPtr, this), true);
  }

  public boolean isInstance() {
    return InscoperJNI.Metadata_isInstance(swigCPtr, this);
  }

  public void fromInstance(Metadata md) {
    InscoperJNI.Metadata_fromInstance(swigCPtr, this, Metadata.getCPtr(md), md);
  }

  public java.lang.Object asInstance() throws com.inscoper.api.InscoperException {
    return InscoperJNI.Metadata_asInstance(swigCPtr, this);
  }

}

Updated on 2026-09-03 at 12:14:19 +0200