Permalink
Browse files

[GRAPHDB-485] fixed bugs uncovered by new api tests

  • Loading branch information...
1 parent f056a9a commit d6e6d73cde75b053758c650958857229feac7b47 Markus Zorn committed Nov 29, 2011
Showing with 1,181 additions and 872 deletions.
  1. +15 −12 GraphDS/Client/Implementations/GraphDSRemoteClient/ConvertHelper.cs
  2. +1 −0 GraphDS/Client/Implementations/GraphDSRemoteClient/GraphDSRemoteClient.csproj
  3. +257 −234 ...ementations/GraphDSRemoteClient/Service References/sonesGraphDSRemoteAPI/RPCServiceContract1.wsdl
  4. +505 −361 .../Client/Implementations/GraphDSRemoteClient/Service References/sonesGraphDSRemoteAPI/Reference.cs
  5. +4 −0 ...mplementations/GraphDSRemoteClient/StubExtensions/ChangesetObjects/ServiceAlterVertexChangeset.cs
  6. +1 −1 ...t/Implementations/GraphDSRemoteClient/StubExtensions/ServiceRequests/ServiceIndexPredefinition.cs
  7. +22 −0 ...ations/GraphDSRemoteClient/StubExtensions/ServiceRequests/ServiceUnknownAttributePredefinition.cs
  8. +6 −0 ...es/Implementations/RemoteAPIService/DataContracts/ChangesetObjects/ServiceAlterVertexChangeset.cs
  9. +2 −11 ...vices/Implementations/RemoteAPIService/DataContracts/ServiceRequests/ServiceIndexPredefinition.cs
  10. +0 −3 ...ices/Implementations/RemoteAPIService/DataContracts/ServiceRequests/ServiceUniquePredefinition.cs
  11. +69 −0 ...mentations/RemoteAPIService/DataContracts/ServiceRequests/ServiceUnknownAttributePredefinition.cs
  12. +1 −0 Plugins/GraphDS/Services/Implementations/RemoteAPIService/RemoteAPIService.csproj
  13. +257 −234 Plugins/GraphDS/Services/Implementations/RemoteAPIService/ServiceContracts/MEX/WSDL.xml
  14. +16 −13 Plugins/GraphDS/Services/Implementations/RemoteAPIService/ServiceConverter/ConvertHelper.cs
  15. +25 −3 Plugins/GraphDS/Services/Implementations/RemoteAPIService/ServiceConverter/ServiceRequestFactory.cs
@@ -56,19 +56,22 @@ internal static ServiceEdgeInstance ToServiceEdgeInstance(IEdge myEdge)
internal static IAttributeDefinition ToAttributeDefinition(ServiceAttributeDefinition mySvcAttributeDefinition, IServiceToken myServiceToken)
{
IAttributeDefinition AttributeDefinition = null;
- switch(mySvcAttributeDefinition.Kind)
+ if (mySvcAttributeDefinition != null)
{
- case ServiceAttributeType.Property:
- AttributeDefinition = new RemotePropertyDefinition((ServicePropertyDefinition)mySvcAttributeDefinition, myServiceToken);
- break;
- case ServiceAttributeType.BinaryProperty:
- throw new NotImplementedException();
- case ServiceAttributeType.IncomingEdge:
- AttributeDefinition = new RemoteIncomingEdgeDefinition((ServiceIncomingEdgeDefinition)mySvcAttributeDefinition, myServiceToken);
- break;
- case ServiceAttributeType.OutgoingEdge:
- AttributeDefinition = new RemoteOutgoingEdgeDefinition((ServiceOutgoingEdgeDefinition)mySvcAttributeDefinition, myServiceToken);
- break;
+ switch (mySvcAttributeDefinition.Kind)
+ {
+ case ServiceAttributeType.Property:
+ AttributeDefinition = new RemotePropertyDefinition((ServicePropertyDefinition)mySvcAttributeDefinition, myServiceToken);
+ break;
+ case ServiceAttributeType.BinaryProperty:
+ throw new NotImplementedException();
+ case ServiceAttributeType.IncomingEdge:
+ AttributeDefinition = new RemoteIncomingEdgeDefinition((ServiceIncomingEdgeDefinition)mySvcAttributeDefinition, myServiceToken);
+ break;
+ case ServiceAttributeType.OutgoingEdge:
+ AttributeDefinition = new RemoteOutgoingEdgeDefinition((ServiceOutgoingEdgeDefinition)mySvcAttributeDefinition, myServiceToken);
+ break;
+ }
}
return AttributeDefinition;
}
@@ -93,6 +93,7 @@
<Compile Include="StubExtensions\ServiceRequests\ServicePropertyPredefinition.cs" />
<Compile Include="StubExtensions\ServiceRequests\ServiceSingleEdgeUpdateDefinition.cs" />
<Compile Include="StubExtensions\ServiceRequests\ServiceUniquePredefinition.cs" />
+ <Compile Include="StubExtensions\ServiceRequests\ServiceUnknownAttributePredefinition.cs" />
<Compile Include="StubExtensions\ServiceRequests\ServiceVertexTypePredefinition.cs" />
<Compile Include="StubExtensions\ServiceTypeManagement\ServiceBaseType.cs" />
<Compile Include="StubExtensions\ServiceTypeManagement\ServiceEdgeType.cs" />

Large diffs are not rendered by default.

Oops, something went wrong.

Large diffs are not rendered by default.

Oops, something went wrong.
@@ -36,6 +36,10 @@ internal ServiceAlterVertexChangeset(RequestAlterVertexType myRequestAlterVertex
this.ToBeRemovedMandatories = (myRequestAlterVertexType.ToBeRemovedMandatories == null)
? null : myRequestAlterVertexType.ToBeRemovedMandatories.ToList();
this.ToBeRenamedProperties = myRequestAlterVertexType.ToBeRenamedProperties;
+ this.ToBeDefinedAttributes = (myRequestAlterVertexType.ToBeDefinedAttributes == null)
+ ? null : myRequestAlterVertexType.ToBeDefinedAttributes.Select(x => new ServiceUnknownAttributePredefinition(x)).ToList();
+ this.ToBeUndefinedAttributes = (myRequestAlterVertexType.ToBeUndefinedAttributes == null)
+ ? null : myRequestAlterVertexType.ToBeUndefinedAttributes.ToList();
}
}
}
@@ -11,7 +11,7 @@ public partial class ServiceIndexPredefinition
internal ServiceIndexPredefinition(IndexPredefinition myIndexPredefinition)
{
this.Edition = myIndexPredefinition.Edition;
- this.TypeName = myIndexPredefinition.TypeName;
+ this.IndexTypeName = myIndexPredefinition.TypeName;
this.Name = myIndexPredefinition.Name;
this.IndexOptions = myIndexPredefinition.IndexOptions;
this.Properties = myIndexPredefinition.Properties.ToList();
@@ -0,0 +1,22 @@
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Text;
+using sones.GraphDB.TypeSystem;
+
+namespace sones.GraphDS.GraphDSRemoteClient.sonesGraphDSRemoteAPI
+{
+ public partial class ServiceUnknownAttributePredefinition
+ {
+ internal ServiceUnknownAttributePredefinition(UnknownAttributePredefinition myPredef)
+ : base(myPredef)
+ {
+ DefaultValue = myPredef.DefaultValue;
+ EdgeType = myPredef.EdgeType;
+ InnerEdgeType = myPredef.InnerEdgeType;
+ IsMandatory = myPredef.IsMandatory;
+ IsUnique = myPredef.IsUnique;
+ Multiplicity = myPredef.Multiplicity;
+ }
+ }
+}
@@ -74,5 +74,11 @@ public class ServiceAlterVertexChangeset
[DataMember]
public Dictionary<String, String> ToBeRenamedProperties;
+
+ [DataMember]
+ public List<ServiceUnknownAttributePredefinition> ToBeDefinedAttributes;
+
+ [DataMember]
+ public List<String> ToBeUndefinedAttributes;
}
}
@@ -40,7 +40,7 @@ public class ServiceIndexPredefinition
/// The name of the index type.
/// </summary>
[DataMember]
- public string TypeName;
+ public string IndexTypeName;
/// <summary>
/// The name of the index
@@ -54,14 +54,6 @@ public class ServiceIndexPredefinition
[DataMember]
public Dictionary<String, Object> IndexOptions;
- /// <summary>
- /// The options that will be passed to the index instance
- /// </summary>
- [DataMember]
- public String IndexType;
-
-
-
/// <summary>
/// The set of properties that will be indexed.
/// </summary>
@@ -81,10 +73,9 @@ public class ServiceIndexPredefinition
public IndexPredefinition ToIndexPredefinition()
{
IndexPredefinition IndexPreDef = new IndexPredefinition(this.Name, this.VertexTypeName);
-
IndexPreDef.SetComment(this.Comment);
IndexPreDef.SetEdition(this.Edition);
- IndexPreDef.SetIndexType(this.IndexType);
+ IndexPreDef.SetIndexType(this.IndexTypeName);
if (this.IndexOptions != null)
{
IndexPreDef.AddOptions(this.IndexOptions);
@@ -32,7 +32,6 @@ namespace sones.GraphDS.Services.RemoteAPIService.DataContracts.ServiceRequests
[DataContract(Namespace = sonesRPCServer.Namespace)]
public class ServiceUniquePredefinition
{
-
/// <summary>
/// The set of properties that will be unique together.
/// </summary>
@@ -47,8 +46,6 @@ public UniquePredefinition ToUniquePredefinition()
uniquepredefinition.AddPropery(Property);
}
return uniquepredefinition;
-
}
-
}
}
@@ -0,0 +1,69 @@
+/*
+* sones GraphDB - Community Edition - http://www.sones.com
+* Copyright (C) 2007-2011 sones GmbH
+*
+* This file is part of sones GraphDB Community Edition.
+*
+* sones GraphDB is free software: you can redistribute it and/or modify
+* it under the terms of the GNU Affero General Public License as published by
+* the Free Software Foundation, version 3 of the License.
+*
+* sones GraphDB is distributed in the hope that it will be useful,
+* but WITHOUT ANY WARRANTY; without even the implied warranty of
+* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+* GNU Affero General Public License for more details.
+*
+* You should have received a copy of the GNU Affero General Public License
+* along with sones GraphDB. If not, see <http://www.gnu.org/licenses/>.
+*
+*/
+
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Text;
+using System.Runtime.Serialization;
+using sones.GraphDB.TypeSystem;
+
+namespace sones.GraphDS.Services.RemoteAPIService.DataContracts.ServiceRequests
+{
+ [DataContract(Namespace = sonesRPCServer.Namespace)]
+ public class ServiceUnknownAttributePredefinition : ServiceAttributePredefinition
+ {
+ [DataMember]
+ public String Multiplicity;
+
+ [DataMember]
+ public String DefaultValue;
+
+ [DataMember]
+ public String EdgeType;
+
+ [DataMember]
+ public String InnerEdgeType;
+
+ [DataMember]
+ public bool IsMandatory;
+
+ [DataMember]
+ public bool IsUnique;
+
+ public UnknownAttributePredefinition ToUnknownAttributePredefinition()
+ {
+ var attributePredef = new UnknownAttributePredefinition(this.AttributeName, this.AttributeType);
+ attributePredef.SetMultiplicity(this.Multiplicity);
+ attributePredef.SetDefaultValue(this.DefaultValue);
+ attributePredef.SetEdgeType(this.EdgeType);
+ attributePredef.SetInnerEdgeType(this.InnerEdgeType);
+ if (this.IsMandatory == true)
+ {
+ attributePredef.SetAsMandatory();
+ }
+ if (this.IsUnique == true)
+ {
+ attributePredef.SetAsUnique();
+ }
+ return attributePredef;
+ }
+ }
+}
@@ -87,6 +87,7 @@
<Compile Include="DataContracts\ServiceRequests\ServiceOutgoingEdgePredefinition.cs" />
<Compile Include="DataContracts\ServiceRequests\ServicePropertyPredefinition.cs" />
<Compile Include="DataContracts\ServiceRequests\ServiceUniquePredefinition.cs" />
+ <Compile Include="DataContracts\ServiceRequests\ServiceUnknownAttributePredefinition.cs" />
<Compile Include="DataContracts\ServiceRequests\ServiceVertexTypePredefinition.cs" />
<Compile Include="DataContracts\ServiceTypeManagement\ServiceAttributeDefinition.cs" />
<Compile Include="DataContracts\ServiceTypeManagement\ServiceAttributeType.cs" />
Oops, something went wrong.

0 comments on commit d6e6d73

Please sign in to comment.