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

com.onespatial.dwglib.objects.ObjectMap Maven / Gradle / Ivy

Go to download

dwg-lib is a Java library for reading AutoCad files version 2010 and later

The newest version!
package com.onespatial.dwglib.objects;

import com.onespatial.dwglib.Issues;
import com.onespatial.dwglib.Reader;
import com.onespatial.dwglib.bitstreams.Handle;

// This is a place-holder class.  Passes thru everything to reader for time being.
public class ObjectMap
{
    private Reader reader;

    public ObjectMap(Reader reader) {
        this.reader = reader;
    }

    public Issues getIssues() {
        return reader.getIssues();
    }

    public CadObject parseObject(Handle handle)
    {
        return reader.parseObject(handle);
    }

    public CadObject parseObjectPossiblyNull(Handle handle)
    {
        if (handle.offset == 0) {
            return null;
        } else {
            return reader.parseObject(handle);
        }
    }

    public CadObject parseObjectPossiblyOrphaned(Handle handle)
    {
        return reader.parseObjectPossiblyOrphaned(handle);
    }

    public CadObject parseObjectPossiblyNullOrOrphaned(Handle handle)
    {
        if (handle.offset == 0)
        {
            return null;
        }
        else
        {
            return reader.parseObjectPossiblyOrphaned(handle);
        }
    }

}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy