diff options
author | lresende <lresende@13f79535-47bb-0310-9956-ffa450edef68> | 2009-11-10 19:19:03 +0000 |
---|---|---|
committer | lresende <lresende@13f79535-47bb-0310-9956-ffa450edef68> | 2009-11-10 19:19:03 +0000 |
commit | dc741421e88c3e4210b00f39877159c5117b99d3 (patch) | |
tree | 68ae372d3c8a7fee11f44a4701585db55d24369d /sdo-java/branches/sdo-java-M2/sdo-api/src/main/java/commonj/sdo/DataGraph.java | |
parent | 9833a542bb75c2008c71809e4fdfebc41e67fb46 (diff) |
moving SDO branches
git-svn-id: http://svn.us.apache.org/repos/asf/tuscany@834611 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'sdo-java/branches/sdo-java-M2/sdo-api/src/main/java/commonj/sdo/DataGraph.java')
-rw-r--r-- | sdo-java/branches/sdo-java-M2/sdo-api/src/main/java/commonj/sdo/DataGraph.java | 73 |
1 files changed, 73 insertions, 0 deletions
diff --git a/sdo-java/branches/sdo-java-M2/sdo-api/src/main/java/commonj/sdo/DataGraph.java b/sdo-java/branches/sdo-java-M2/sdo-api/src/main/java/commonj/sdo/DataGraph.java new file mode 100644 index 0000000000..78bc7227a1 --- /dev/null +++ b/sdo-java/branches/sdo-java-M2/sdo-api/src/main/java/commonj/sdo/DataGraph.java @@ -0,0 +1,73 @@ +/** + * <copyright> + * + * Service Data Objects + * Version 2.0 + * Licensed Materials - Property of BEA and IBM + * + * (c) Copyright BEA Systems, Inc. and International Business Machines Corp 2005. All rights reserved. + * + * </copyright> + * + */ + +package commonj.sdo; + +import java.io.Serializable; + +/** + * A data graph is used to package a graph of {@link DataObject data objects} along with their + * metadata, that is, data describing the data. + * A data graph also contains a {@link #getChangeSummary change summary} + * which is used to record changes made to the objects in the graph. + */ + +public interface DataGraph extends Serializable +{ + /** + * Returns the root {@link DataObject data object} of this data graph. + * @return the root data object. + * @see DataObject#getDataGraph + */ + DataObject getRootObject(); + + /** + * Returns the {@link ChangeSummary change summary} associated with this data graph. + * @return the change summary. + * @see ChangeSummary#getDataGraph + */ + ChangeSummary getChangeSummary(); + + /** + * Returns the {@link Type type} with the given the {@link Type#getURI() URI}, + * or contained by the resource at the given URI, + * and with the given {@link Type#getName name}. + * @param uri the namespace URI of a type or the location URI of a resource containing a type. + * @param typeName name of a type. + * @return the type with the corresponding namespace and name. + */ + Type getType(String uri, String typeName); + + /** + * Creates a new root data object of the {@link #getType specified type}. + * An exception is thrown if a root object exists. + * @param namespaceURI namespace of the type. + * @param typeName name of the type. + * @return the new root. + * @throws IllegalStateException if the root object already exists. + * @see #createRootObject(Type) + * @see #getType(String, String) + */ + DataObject createRootObject(String namespaceURI, String typeName); + + /** + * Creates a new root data object of the specified type. + * An exception is thrown if a root object exists. + * @param type the type of the new root. + * @return the new root. + * @throws IllegalStateException if the root object already exists. + * @see #createRootObject(String, String) + */ + DataObject createRootObject(Type type); + +} |