public class ArtificerModelUtils extends Object
Constructor and Description |
---|
ArtificerModelUtils() |
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 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,
Map<QName,String> relationshipOtherAttributes,
Map<QName,String> targetOtherAttributes)
Adds a new generic
Relationship to the artifact. |
static Map<String,String> |
getCustomPropertiesByPrefix(org.oasis_open.docs.s_ramp.ns.s_ramp_v1.BaseArtifactType artifact,
String prefix)
Gets all properties with names that begin with the given prefix.
|
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.
|
static void |
unsetCustomProperty(org.oasis_open.docs.s_ramp.ns.s_ramp_v1.BaseArtifactType artifact,
String propName)
Convenience method to help remove 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 void unsetCustomProperty(org.oasis_open.docs.s_ramp.ns.s_ramp_v1.BaseArtifactType artifact, String propName)
artifact
- propName
- 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, Map<QName,String> relationshipOtherAttributes, Map<QName,String> targetOtherAttributes)
Relationship
to the artifact.artifact
- relationshipType
- targetUUID
- relationshipOtherAttributes
- targetOtherAttributes
- Relationship
public 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
- Relationship
public 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
- public static Map<String,String> getCustomPropertiesByPrefix(org.oasis_open.docs.s_ramp.ns.s_ramp_v1.BaseArtifactType artifact, String prefix)
artifact
- the s-ramp artifactprefix
- the prefix of the properties searchedCopyright © 2011–2015 JBoss, a division of Red Hat. All rights reserved.