com.adobe.xmp.core.parser.RDFXMLParserContext Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of aem-sdk-api Show documentation
Show all versions of aem-sdk-api Show documentation
The Adobe Experience Manager SDK
// =================================================================================================
// ADOBE SYSTEMS INCORPORATED
// Copyright 2012 Adobe Systems Incorporated
// All Rights Reserved
//
// NOTICE: Adobe permits you to use, modify, and distribute this file in accordance with the terms
// of the Adobe license agreement accompanying it.
// =================================================================================================
package com.adobe.xmp.core.parser;
import java.util.HashMap;
import java.util.Map;
/**
* The context object for the RDFXMLParser.
* It returns the prefix to namespace definitions found during parsing.
* These can be re-used for serialization.
*/
@SuppressWarnings("serial")
public class RDFXMLParserContext extends HashMap
{
/** the key for the prefix definition that are found during parsing */
public static String PREFIX_DEFINITIONS = "prefixDefinitions";
/** is populated with the XMP packet attributes, e.g. 'begin="" id="W5M0MpCehiHzreSzNTczkc9d"' */
public static final String XPACKET_ATTRIBUTES = "xpacketAttributes";
/**
* @return Returns the prefix definitions found in the parsed XMP packet or null
.
*/
@SuppressWarnings("unchecked")
public Map getPrefixDefinitions()
{
Object result = super.get(PREFIX_DEFINITIONS);
if (result instanceof Map )
{
return (Map) result;
}
else
{
return null;
}
}
/**
* @return Returns the attributes of the {@literal } processing instruction
* if available or null
.
*/
public String getXPacketAttributes()
{
Object result = super.get(XPACKET_ATTRIBUTES);
if (result instanceof String )
{
return (String) result;
}
else
{
return null;
}
}
}
© 2015 - 2024 Weber Informatics LLC | Privacy Policy