The Altair Community is migrating to a new platform to provide a better experience for you. In preparation for the migration, the Altair Community is on read-only mode from October 28 - November 6, 2024. Technical support via cases will continue to work as is. For any urgent requests from Students/Faculty members, please submit the form linked here

Repository full path

StaryVenaStaryVena Member Posts: 126 Contributor II
edited November 2018 in Help
Hi,
can anybody help me, how to get full path of actual repository. I would like to make operator similar to Retrieve, that can open image with relative path in repository. I already figured out how to get path in repository,.
Thank you for replies.

Vena
Tagged:

Answers

  • fischerfischer Member Posts: 439 Maven
    Hi,

    you mean the file on disk? No way. There is not necessarily a file behind it.

    Cheers,
    Simon
  • radoneradone RapidMiner Certified Expert, Member Posts: 74 Guru
    Hello,
    I guess you are dealing with problem of reading a file from repository. To do so you probably need to extend the
    class YourClass extends AbstractReader<YourIOObject> { ... }
    and also you will need to register reader description

    class YourClass extends AbstractReader<YourIOObject> {
          static {
    AbstractReader.registerReaderDescription(new ReaderDescription("txt",
    YourClass.class, PARAMETER_FILENAME));
    }
    ...
    }
    Then the:
    getParameterAsFile(fileName);
    should search also in local repositories.

    Unfortunately I had to miss something because it does not work for me  :(.

    If you find a solution I would be really interested.
  • fischerfischer Member Posts: 439 Maven
    Hi,

    once again: The API of Repositories has nothing to do with files. Repository entries are not necessarily files. Therefore, if you want to operate on repositories, getParameterAsFile() will be of absolutely zero use. It returnes a File and knows nothing about repositories.

    But if you want to store or retrieve images from the repository, you can use blobs. Repositories can contain processes, ioobjects, and blobs. So you take the RepositoryLocation, locate (or create) the corresponding entry, and cast it to BlobEntry. You can then store binary image date.

    Best,
    Simon
Sign In or Register to comment.