public final class SrampAtomUtils extends Object
| Modifier and Type | Method and Description |
|---|---|
protected static org.overlord.sramp.common.ArtifactType |
disambiguateExtendedType(org.jboss.resteasy.plugins.providers.atom.Entry entry,
org.overlord.sramp.common.ArtifactType artifactType)
Attempts to figure out whether we're dealing with an
ExtendedArtifactType or a
ExtendedDocument by looking for clues in the Entry. |
static org.overlord.sramp.common.ArtifactType |
getArtifactType(org.jboss.resteasy.plugins.providers.atom.Entry entry)
Figures out the S-RAMP artifact type for the given
Entry. |
protected static org.overlord.sramp.common.ArtifactType |
getArtifactTypeFromEntry(org.jboss.resteasy.plugins.providers.atom.Entry entry)
Figures out the S-RAMP artifact type for the given
Entry. |
protected static String |
getArtifactWrappedElementName(Element artifactWrapperElement) |
protected static Element |
getArtifactWrapperNode(org.jboss.resteasy.plugins.providers.atom.Entry entry)
Gets the XML node for the wrapper 'artifact' element from the
Entry. |
static <T> T |
unwrap(org.jboss.resteasy.plugins.providers.atom.Entry entry,
Class<T> clazz)
Unwrap some other jaxb object from its Atom Entry wrapper.
|
static org.jboss.downloads.overlord.sramp._2013.auditing.AuditEntry |
unwrapAuditEntry(org.jboss.resteasy.plugins.providers.atom.Entry entry)
Unwraps the audit entry from the Atom Entry.
|
static org.w3._1999._02._22_rdf_syntax_ns_.RDF |
unwrapRDF(org.jboss.resteasy.plugins.providers.atom.Entry entry)
Unwraps the Ontology from the Atom Entry.
|
static org.oasis_open.docs.s_ramp.ns.s_ramp_v1.BaseArtifactType |
unwrapSrampArtifact(org.overlord.sramp.common.ArtifactType artifactType,
org.oasis_open.docs.s_ramp.ns.s_ramp_v1.Artifact artifact)
Unwraps the specific
BaseArtifactType from the S-RAMP Artifact wrapper
element. |
static org.oasis_open.docs.s_ramp.ns.s_ramp_v1.BaseArtifactType |
unwrapSrampArtifact(org.overlord.sramp.common.ArtifactType artifactType,
org.jboss.resteasy.plugins.providers.atom.Entry entry)
Unwraps a specific
BaseArtifactType from the Atom Entry containing it. |
static org.oasis_open.docs.s_ramp.ns.s_ramp_v1.BaseArtifactType |
unwrapSrampArtifact(org.jboss.resteasy.plugins.providers.atom.Entry entry)
Unwraps a specific
BaseArtifactType from the Atom Entry containing it. |
static org.jboss.resteasy.plugins.providers.atom.Entry |
wrapSrampArtifact(org.oasis_open.docs.s_ramp.ns.s_ramp_v1.BaseArtifactType artifact)
Wraps the given s-ramp artifact in an Atom
Entry. |
public static org.oasis_open.docs.s_ramp.ns.s_ramp_v1.BaseArtifactType unwrapSrampArtifact(org.overlord.sramp.common.ArtifactType artifactType,
org.oasis_open.docs.s_ramp.ns.s_ramp_v1.Artifact artifact)
BaseArtifactType from the S-RAMP Artifact wrapper
element. This method requires the artifact's type.artifactType - the s-ramp artifact typeartifact - the s-ramp wrapper ArtifactBaseArtifactTypepublic static org.oasis_open.docs.s_ramp.ns.s_ramp_v1.BaseArtifactType unwrapSrampArtifact(org.jboss.resteasy.plugins.providers.atom.Entry entry)
BaseArtifactType from the Atom Entry containing it. This
method grabs the Artifact child from the Atom Entry and then unwraps the
BaseArtifactType from that.entry - an Atom EntryBaseArtifactTypepublic static org.oasis_open.docs.s_ramp.ns.s_ramp_v1.BaseArtifactType unwrapSrampArtifact(org.overlord.sramp.common.ArtifactType artifactType,
org.jboss.resteasy.plugins.providers.atom.Entry entry)
BaseArtifactType from the Atom Entry containing it. This
method grabs the Artifact child from the Atom Entry and then unwraps the
BaseArtifactType from that.artifactType - the s-ramp artifact typeentry - an Atom EntryBaseArtifactTypepublic static org.jboss.resteasy.plugins.providers.atom.Entry wrapSrampArtifact(org.oasis_open.docs.s_ramp.ns.s_ramp_v1.BaseArtifactType artifact)
throws URISyntaxException,
IllegalArgumentException,
IllegalAccessException,
InvocationTargetException,
SecurityException,
NoSuchMethodException
Entry.artifact - URISyntaxExceptionInvocationTargetExceptionIllegalAccessExceptionIllegalArgumentExceptionNoSuchMethodExceptionSecurityExceptionpublic static org.overlord.sramp.common.ArtifactType getArtifactType(org.jboss.resteasy.plugins.providers.atom.Entry entry)
Entry.entry - protected static org.overlord.sramp.common.ArtifactType getArtifactTypeFromEntry(org.jboss.resteasy.plugins.providers.atom.Entry entry)
Entry. There are a number of
ways we can do this. We'll try them all:
1) check the 'self' link, parsing it for the type and model information
2) check the Atom Category - there should be one for the artifact type
3) unwrap the Entry's Artifact and get the artifactType value (xml attribute)entry - protected static org.overlord.sramp.common.ArtifactType disambiguateExtendedType(org.jboss.resteasy.plugins.providers.atom.Entry entry,
org.overlord.sramp.common.ArtifactType artifactType)
ExtendedArtifactType or a
ExtendedDocument by looking for clues in the Entry.entry - artifactType - public static <T> T unwrap(org.jboss.resteasy.plugins.providers.atom.Entry entry,
Class<T> clazz)
throws JAXBException
entry - clazz - JAXBExceptionprotected static Element getArtifactWrapperNode(org.jboss.resteasy.plugins.providers.atom.Entry entry)
Entry.entry - protected static String getArtifactWrappedElementName(Element artifactWrapperElement)
artifactWrapperElement - Artifact wrapperpublic static org.w3._1999._02._22_rdf_syntax_ns_.RDF unwrapRDF(org.jboss.resteasy.plugins.providers.atom.Entry entry)
entry - public static org.jboss.downloads.overlord.sramp._2013.auditing.AuditEntry unwrapAuditEntry(org.jboss.resteasy.plugins.providers.atom.Entry entry)
entry - Copyright © 2011-2014 JBoss, a division of Red Hat. All Rights Reserved.