Hy,
I was able to extract the MetaData using the asMap() method of
defaultMetaData Object
=============================
Map<String,Object> hashMap= defaultMetadata.asMap();
========================
I am able to print the key Value pairs as below
------------------------
characterSets
[UTF-8]
contacts
[Responsible party
├─Role……………………… Resource provider
└─Party
└─Name…………… UCAR/NCAR - CISL - ACADIS
]
......
However the API doc describes the asMap() method returning a
HashMap<String,Object>.I need help in identifying the Object returned
by each key which would aid me in using theier setter() and getter()
methods.
Kindly let me know where i could get the list of Objects in the Map,I
could identify *Citation* as one of them.
Regards
Gautham
On Sat, Feb 14, 2015 at 1:54 PM, Gautham Gowrishankar <[email protected]>
wrote:
> Cool, Sounds Good !!!
>
> Will try this out,this makes my life a lot easier :)
> Will keep you posted
>
> Regards
> Gautham
>
> On Sat, Feb 14, 2015 at 1:51 PM, Martin Desruisseaux <
> [email protected]> wrote:
>
>> Hello Gautham
>>
>> Great that it worked!
>>
>> For reading metadata: if the goal is to read metadata not only from XML
>> document, but also from other sources (currently only NetCDF), then I
>> would suggest the following:
>>
>> import org.apache.sis.storage.DataStore;
>> import org.apache.sis.storage.DataStores;
>>
>> ...
>>
>> try (DataStore ds = DataStores.open(input)) {
>> Metadata md = ds.getMetadata();
>> }
>>
>>
>> where 'input' can be a File, URI or any other type documented there:
>>
>>
>>
>> http://sis.apache.org/apidocs/org/apache/sis/storage/DataStores.html#open-java.lang.Object-
>>
>> Once you have the Metadata object, the getter methods allow to fetch
>> various information (or just do a System.out.println(md) to see what is
>> there). The "Aggregation hierarchy" column in the table in the following
>> page may be useful:
>>
>>
>> http://sis.apache.org/apidocs/org/apache/sis/metadata/iso/package-summary.html
>>
>> Martin
>>
>>
>>
>> Le 14/02/15 21:31, Gautham Gowrishankar a écrit :
>> > Hello Martin,
>> >
>> > Could you guide me as to which classes would i have look into since i
>> need
>> > to extract MetaData.
>> > I am basically trying to build a .iso19139 parser for Tika using Apache
>> SIS.
>> >
>> > I am trying look into the Java API doc for the MetaData Package,but i
>> need
>> > a starting point as to how files are read in Apache SIS.
>> > The Test Cases looks a little vague for me.
>> >
>> > Regards
>> > Gautham
>>
>>
>