1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
|
/*******************************************************************************
* Copyright (c) 2013 Boeing.
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
* http://www.eclipse.org/legal/epl-v10.html
*
* Contributors:
* Boeing - initial API and implementation
*******************************************************************************/
package org.eclipse.osee.orcs.data;
import java.util.Collection;
import java.util.List;
import org.eclipse.osee.framework.core.data.ArtifactToken;
import org.eclipse.osee.framework.core.data.ArtifactTypeId;
import org.eclipse.osee.framework.core.data.AttributeId;
import org.eclipse.osee.framework.core.data.AttributeTypeId;
import org.eclipse.osee.framework.core.data.AttributeTypeToken;
import org.eclipse.osee.framework.core.data.RelationTypeId;
import org.eclipse.osee.framework.core.data.RelationTypeSide;
import org.eclipse.osee.framework.core.data.TransactionId;
import org.eclipse.osee.framework.core.enums.DeletionFlag;
import org.eclipse.osee.framework.jdk.core.type.OseeCoreException;
import org.eclipse.osee.framework.jdk.core.type.ResultSet;
/**
* @author Megumi Telles
* @author Roberto E. Escobar
* @author Andrew M. Finkbeiner
*/
public interface ArtifactReadable extends ArtifactToken, HasTransaction, OrcsReadable {
TransactionId getLastModifiedTransaction();
boolean isOfType(ArtifactTypeId... otherTypes) throws OseeCoreException;
////////////////////
int getAttributeCount(AttributeTypeId type) throws OseeCoreException;
int getAttributeCount(AttributeTypeId type, DeletionFlag deletionFlag) throws OseeCoreException;
boolean isAttributeTypeValid(AttributeTypeId attributeType) throws OseeCoreException;
Collection<AttributeTypeToken> getValidAttributeTypes() throws OseeCoreException;
Collection<AttributeTypeToken> getExistingAttributeTypes() throws OseeCoreException;
<T> T getSoleAttributeValue(AttributeTypeId attributeType);
<T> T getSoleAttributeValue(AttributeTypeId attributeType, DeletionFlag flag, T defaultValue);
<T> T getSoleAttributeValue(AttributeTypeId attributeType, T defaultValue);
String getSoleAttributeAsString(AttributeTypeId attributeType) throws OseeCoreException;
String getSoleAttributeAsString(AttributeTypeId attributeType, String defaultValue) throws OseeCoreException;
Long getSoleAttributeId(AttributeTypeId attributeType);
<T> List<T> getAttributeValues(AttributeTypeId attributeType) throws OseeCoreException;
////////////////////
AttributeReadable<Object> getAttributeById(AttributeId attributeId) throws OseeCoreException;
ResultSet<? extends AttributeReadable<Object>> getAttributes() throws OseeCoreException;
<T> ResultSet<? extends AttributeReadable<T>> getAttributes(AttributeTypeId attributeType) throws OseeCoreException;
ResultSet<? extends AttributeReadable<Object>> getAttributes(DeletionFlag deletionFlag) throws OseeCoreException;
<T> ResultSet<? extends AttributeReadable<T>> getAttributes(AttributeTypeId attributeType, DeletionFlag deletionFlag) throws OseeCoreException;
////////////////////
int getMaximumRelationAllowed(RelationTypeSide relationTypeSide) throws OseeCoreException;
Collection<RelationTypeId> getValidRelationTypes() throws OseeCoreException;
Collection<RelationTypeId> getExistingRelationTypes() throws OseeCoreException;
ArtifactReadable getParent() throws OseeCoreException;
List<ArtifactReadable> getDescendants() throws OseeCoreException;
void getDescendants(List<ArtifactReadable> descendants) throws OseeCoreException;
List<ArtifactReadable> getAncestors() throws OseeCoreException;
ResultSet<ArtifactReadable> getChildren() throws OseeCoreException;
ResultSet<ArtifactReadable> getRelated(RelationTypeSide relationTypeSide) throws OseeCoreException;
ResultSet<ArtifactReadable> getRelated(RelationTypeSide relationTypeSide, DeletionFlag deletionFlag) throws OseeCoreException;
boolean areRelated(RelationTypeSide typeAndSide, ArtifactReadable readable) throws OseeCoreException;
int getRelatedCount(RelationTypeSide typeAndSide) throws OseeCoreException;
String getRationale(RelationTypeSide typeAndSide, ArtifactReadable readable) throws OseeCoreException;
ResultSet<RelationReadable> getRelations(RelationTypeSide relationTypeSide);
}
|