public class MetadataProfileReader extends Object implements MetadataProfileDiscovery
| Modifier and Type | Field and Description |
|---|---|
static String |
URL_OF_GCDCMETADATAPROFILEV3_XSD |
| Constructor and Description |
|---|
MetadataProfileReader(String grMetadataProfileSecondaryType)
Instantiates a new metadata profile reader.
|
| Modifier and Type | Method and Description |
|---|---|
List<MetadataProfile> |
getListOfMetadataProfiles()
Gets the list of metadata types.
|
List<NamespaceCategory> |
getListOfNamespaceCategories()
Gets the list of namespace categories.
|
MetadataFormat |
getMetadataFormatForMetadataProfile(MetadataProfile profile)
Gets the metadata format for metadata type.
|
String |
getProfileSchema()
Return the XSD of the profile schema.
|
static InputStream |
getProfileSchemaInputStream()
Gets the profile schema input stream.
|
static String |
getProfileSchemaString()
Gets the profile schema string.
|
static URL |
getProfileSchemaURL()
Gets the profile schema URL.
|
void |
resetMetadataProfile()
Reset metadata profile.
|
void |
resetNamespaceCategories()
Reset namespace categories.
|
static MetadataFormat |
toMetadataFormat(InputStream metadataProfileStream)
Utility method to get a metadata format from a "gCube Metadata Profiles" model (XML-based)
|
static void |
validateProfile(InputStream xml)
Validate profile.
|
void |
validateProfile(String xmlProfile)
Validate the xml provided as argument.
|
public static final String URL_OF_GCDCMETADATAPROFILEV3_XSD
public MetadataProfileReader(String grMetadataProfileSecondaryType) throws Exception
grMetadataProfileSecondaryType - the SecondaryType that must be used to discover the "gCube Metadata Profiles" from Information SystemException - the exceptionpublic static String getProfileSchemaString()
public static InputStream getProfileSchemaInputStream()
public static URL getProfileSchemaURL()
public static void validateProfile(InputStream xml) throws Exception
xml - the xmlException - the exceptionpublic MetadataFormat getMetadataFormatForMetadataProfile(MetadataProfile profile) throws Exception
MetadataProfileDiscoverygetMetadataFormatForMetadataProfile in interface MetadataProfileDiscoveryprofile - the typeException - the exceptionpublic List<MetadataProfile> getListOfMetadataProfiles() throws Exception
MetadataProfileDiscoverygetListOfMetadataProfiles in interface MetadataProfileDiscoveryException - the exceptionpublic List<NamespaceCategory> getListOfNamespaceCategories() throws Exception
MetadataProfileDiscoverygetListOfNamespaceCategories in interface MetadataProfileDiscoveryException - the exceptionpublic void resetMetadataProfile()
MetadataProfileDiscoveryresetMetadataProfile in interface MetadataProfileDiscoverypublic void resetNamespaceCategories()
MetadataProfileDiscoveryresetNamespaceCategories in interface MetadataProfileDiscoverypublic String getProfileSchema()
MetadataProfileDiscoverygetProfileSchema in interface MetadataProfileDiscoverypublic void validateProfile(String xmlProfile) throws ParserConfigurationException, SAXException, IOException
MetadataProfileDiscoveryvalidateProfile in interface MetadataProfileDiscoveryxmlProfile - the string representation of the XML to validate again the schemaParserConfigurationExceptionSAXExceptionIOExceptionpublic static MetadataFormat toMetadataFormat(InputStream metadataProfileStream) throws JAXBException
metadataProfileStream - the metadata profile streamJAXBException - the JAXB exceptionCopyright © 2020. All Rights Reserved.