All Downloads are FREE. Search and download functionalities are using the official Maven repository.

org.visallo.web.clientapi.model.ClientApiSourceInfo Maven / Gradle / Ivy

There is a newer version: 4.0.0
Show newest version
package org.visallo.web.clientapi.model;

import org.visallo.web.clientapi.util.ObjectMapperFactory;

import java.io.IOException;

public class ClientApiSourceInfo {
    public long startOffset;
    public long endOffset;
    public String vertexId;
    public String snippet;
    public String textPropertyKey;
    public String textPropertyName;

    public static ClientApiSourceInfo fromString(String sourceInfoString) {
        try {
            if (sourceInfoString == null || sourceInfoString.length() == 0) {
                return null;
            }
            return ObjectMapperFactory.getInstance().readValue(sourceInfoString, ClientApiSourceInfo.class);
        } catch (IOException e) {
            throw new RuntimeException("Could not read value: " + sourceInfoString, e);
        }
    }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy