public class SrampModelUtils extends Object
| Constructor and Description |
|---|
SrampModelUtils() |
| Modifier and Type | Method and Description |
|---|---|
static org.oasis_open.docs.s_ramp.ns.s_ramp_v1.Relationship |
addGenericRelationship(org.oasis_open.docs.s_ramp.ns.s_ramp_v1.BaseArtifactType artifact,
String relationshipType,
String targetUUID)
Adds a new generic
Relationship to the artifact. |
static String |
getCustomProperty(org.oasis_open.docs.s_ramp.ns.s_ramp_v1.BaseArtifactType artifact,
String propName)
Gets the value of one of the s-ramp custom properties.
|
static org.oasis_open.docs.s_ramp.ns.s_ramp_v1.Relationship |
getGenericRelationship(org.oasis_open.docs.s_ramp.ns.s_ramp_v1.BaseArtifactType artifact,
String relationshipType)
Gets the generic relationship from the artifact (by type).
|
static boolean |
isDocumentArtifact(org.oasis_open.docs.s_ramp.ns.s_ramp_v1.BaseArtifactType artifact)
Returns true if the artifact is a Document style artifact (has content).
|
static boolean |
isTextDocumentArtifact(org.oasis_open.docs.s_ramp.ns.s_ramp_v1.DocumentArtifactType artifact)
Returns true if the artifact has text content.
|
static void |
setCustomProperty(org.oasis_open.docs.s_ramp.ns.s_ramp_v1.BaseArtifactType artifact,
String propName,
String propValue)
Convenience method to help set a custom s-ramp property on the given artifact.
|
public static void setCustomProperty(org.oasis_open.docs.s_ramp.ns.s_ramp_v1.BaseArtifactType artifact,
String propName,
String propValue)
artifact - propName - propValue - public static String getCustomProperty(org.oasis_open.docs.s_ramp.ns.s_ramp_v1.BaseArtifactType artifact, String propName)
artifact - the s-ramp artifactpropName - the name of the custom propertypublic static org.oasis_open.docs.s_ramp.ns.s_ramp_v1.Relationship addGenericRelationship(org.oasis_open.docs.s_ramp.ns.s_ramp_v1.BaseArtifactType artifact,
String relationshipType,
String targetUUID)
Relationship to the artifact.artifact - relationshipType - targetUUID - Relationshippublic static org.oasis_open.docs.s_ramp.ns.s_ramp_v1.Relationship getGenericRelationship(org.oasis_open.docs.s_ramp.ns.s_ramp_v1.BaseArtifactType artifact,
String relationshipType)
artifact - the s-ramp artifactrelationshipType - the relationship typepublic static boolean isDocumentArtifact(org.oasis_open.docs.s_ramp.ns.s_ramp_v1.BaseArtifactType artifact)
artifact - public static boolean isTextDocumentArtifact(org.oasis_open.docs.s_ramp.ns.s_ramp_v1.DocumentArtifactType artifact)
artifact - Copyright © 2011-2014 JBoss, a division of Red Hat. All Rights Reserved.