示例#1
0
        public string getServiceUrl(string name)
        {
            serviceInfo s = new serviceInfo();
            UDDIInquiryService juddi = new UDDIInquiryService();
            find_service fs = new find_service();
            fs.findQualifiers = new []{"approximateMatch"};
            name n = new name();
            n.Value = name;
            n.lang = "en";
            fs.name = new []{n};
            serviceList services = juddi.find_service(fs);

            for(int i = 0; i<services.serviceInfos.Count(); i++){
                s = services.serviceInfos[i];
            }

            get_serviceDetail sd= new get_serviceDetail();
            sd.serviceKey = new string[]{s.serviceKey};
            serviceDetail service = juddi.get_serviceDetail(sd);
            string url = service.businessService[0].bindingTemplates[0].accessPoint.Value;

            if(checkUrl(url)){
                url = url;
            }else{
                url =url;
            }

            return url;
        }
示例#2
0
 public spouse(name n, int i, date d, location m)
 {
     name = n;
     id = i;
     marriageDate = d;
     marriageLocation = m;
 }
        public ColorfulRestProperty(object json)
        {
            var colorData = (ColorfulJsonParser)json;

            HexValue = new hexvalue(colorData.Hex);
            RGB = new rgb(colorData.RGB);
            HSL = new hsl(colorData.HSL);
            HSV = new hsv(colorData.HSV);
            CMYK = new cmyk(colorData.CMYK);
            XYZ = new xyz(colorData.XYZ);
            Name = new name(colorData.Name);
            Image = new image(colorData.Image);
            Contrast = colorData.Contrast.value;
        }
示例#4
0
 public static void Main(string[] args)
 {
   string cometstr=Console.ReadLine();
   string groudstr=Console.ReadLine();
   name comet=new name(cometstr);
   name groud=new name(groudstr);
   Console.WriteLine(comet.count());
   Console.WriteLine(groud.count());
   if (groud.count()==comet.count()) {
     Console.WriteLine("GO");
   }
   else{
     Console.WriteLine("STAY");
   }
   System.Console.ReadKey();
 }
示例#5
0
 yield return(name, SourceFileFromMustachePath(name, template, hash));
示例#6
0
 static Literal GetLiteral(name.levering.ryan.sparql.common.Literal literal)
 {
     return new Literal(literal.getLabel(), literal.getLanguage(),
         literal.getDatatype() == null ? null
             : literal.getDatatype().getURI());
 }
示例#7
0
            protected override RdfBindingSet runTripleConstraints(java.util.List tripleConstraints, 
		    	name.levering.ryan.sparql.model.logic.ConstraintLogic.CallParams p)
            {
                if (DisableQuery)
                    return null;

                RdfSourceWrapper s = (RdfSourceWrapper)p.source;

                if (s.source is QueryableSource) {
                    QueryableSource qs = (QueryableSource)s.source;
                    QueryOptions opts = new QueryOptions();

                    opts.Limit = p.limit;

                    VariableList distinguishedVars = new VariableList();
                    VariableList undistinguishedVars = new VariableList();

                   opts.VariableKnownValues = new VarKnownValuesType();

                    Statement[] graph = new Statement[tripleConstraints.size()];
                    Hashtable varMap1 = new Hashtable();
                    Hashtable varMap2 = new Hashtable();

                    Entity metaField;
                    // In this case, we want to treat the meta fields of all of the statements
                    // in this group as bound by a single variable.
                    if (p.graphVariable != null) {
                        metaField = ToRes(p.graphVariable, p.knownValues, true, varMap1, varMap2, s, opts, distinguishedVars, undistinguishedVars, p.distinguishedVariables) as Entity;

                    // Otherwise, we are told what graph to use. If sourceDatasets is null,
                    // we are looking in the default graph.
                    } else if (p.sourceDatasets == null) {
                        /*if (p.defaultDatasets.size() == 0) {
                            metaField = Statement.DefaultMeta;
                        } else if (p.defaultDatasets.size() == 1) {
                            metaField = s.ToEntity((Value)p.defaultDatasets.iterator().next());
                        } else {
                            metaField = new SemWebVariable();
                            opts.VariableKnownValues[(Variable)metaField] = s.ToEntities((Value[])p.defaultDatasets.toArray(new Value[0]));
                        }*/

                        // For the default Graph, we always pass DefaultMeta.
                        metaField = Statement.DefaultMeta;

                    // Otherwise, we are looking in the indicated graphs.
                    } else {
                        if (p.sourceDatasets.size() == 0) {
                            metaField = new SemWebVariable();
                        } else if (p.sourceDatasets.size() == 1) {
                            metaField = s.ToEntity((Value)p.sourceDatasets.iterator().next());
                        } else {
                            metaField = new SemWebVariable();
                            opts.VariableKnownValues[(Variable)metaField] = s.ToEntities((Value[])p.sourceDatasets.toArray(new Value[0]));
                        }
                    }

                    for (int i = 0; i < tripleConstraints.size(); i++) {
                        TripleConstraintData triple = tripleConstraints.get(i) as TripleConstraintData;
                        if (triple == null) return null;

                        graph[i] = new Statement(null, null, null, null); // I don't understand why this should be necessary for a struct, but I get a null reference exception otherwise (yet, that didn't happen initially)
                        graph[i].Subject = ToRes(triple.getSubjectExpression(), p.knownValues, true, varMap1, varMap2, s, opts, distinguishedVars, undistinguishedVars, p.distinguishedVariables) as Entity;
                        graph[i].Predicate = ToRes(triple.getPredicateExpression(), p.knownValues, true, varMap1, varMap2, s, opts, distinguishedVars, undistinguishedVars, p.distinguishedVariables) as Entity;
                        graph[i].Object = ToRes(triple.getObjectExpression(), p.knownValues, false, varMap1, varMap2, s, opts, distinguishedVars, undistinguishedVars, p.distinguishedVariables);
                        graph[i].Meta = metaField;
                        if (graph[i].AnyNull) return new RdfBindingSetImpl();
                        if (!(graph[i].Subject is Variable) && !(graph[i].Predicate is Variable) && !(graph[i].Object is Variable) && !(graph[i].Meta is Variable))
                            return null; // we could use Contains(), but we'll just abandon the Query() path altogether
                    }

                    if (p.distinguishedVariables == null) {
                        opts.DistinguishedVariables = null;
                    } else if (distinguishedVars.Count > 0) {
                        opts.DistinguishedVariables = distinguishedVars;
                    } else if (undistinguishedVars.Count > 0) {
                        // we don't mean to make it distinguished, but we need at least one,
                        // and for now we'll just take the first
                        opts.DistinguishedVariables = new VariableList();
                        ((VariableList)opts.DistinguishedVariables).Add(undistinguishedVars[0]);
                    } else {
                        // no variables!
                        return null;
                    }

                    opts.VariableLiteralFilters = new LitFilterMap();
                    foreach (DictionaryEntry kv in varMap1) {
                        if (p.knownFilters != null && p.knownFilters.containsKey(kv.Key)) {
                            LitFilterList filters = new LitFilterList();
                            for (java.util.Iterator iter = ((java.util.List)p.knownFilters.get(kv.Key)).iterator(); iter.hasNext(); )
                                filters.Add((LiteralFilter)iter.next());
                            opts.VariableLiteralFilters[(Variable)kv.Value] = filters;
                        }
                    }

                    // too expensive to do...
                    //if (!qs.MetaQuery(graph, opts).QuerySupported)
                    //	return null; // TODO: We could also check if any part has NoData, we can abandon the query entirely

                    QueryResultBuilder builder = new QueryResultBuilder();
                    builder.varMap = varMap2;
                    builder.source = s;
                    qs.Query(graph, opts, builder);
                    return builder.bindings;
                }

                return null;
            }
示例#8
0
 public Entity[] ToEntities(name.levering.ryan.sparql.common.Value[] ents)
 {
     if (ents == null) return null;
     ArrayList ret = new ArrayList();
     for (int i = 0; i < ents.Length; i++)
         if (!(ents[i] is name.levering.ryan.sparql.common.Literal))
             ret.Add( ToEntity(ents[i]) );
     return (Entity[])ret.ToArray(typeof(Entity));
 }
示例#9
0
 public Resource[] ToResources(name.levering.ryan.sparql.model.logic.ExpressionLogic[] ents, name.levering.ryan.sparql.common.RdfBindingRow binding)
 {
     if (ents == null) return null;
     Resource[] ret = new Resource[ents.Length];
     for (int i = 0; i < ents.Length; i++) {
         if (ents[i] is SparqlVariable)
             ret[i] = ToResource(binding.getValue((SparqlVariable)ents[i]));
         else
             ret[i] = ToResource((name.levering.ryan.sparql.common.Value)ents[i]);
     }
     return ret;
 }
示例#10
0
 foreach (var(name, value) in values)
示例#11
0
 /**
  * Gets all statements with a specific subject, predicate and/or object, within
  * a certain set of graphs. The graphs might be from FROM or FROM NAMED clauses.
  * subj, pred, and obj, and graph may be null. If graph is null, both FROM and
  * FROM NAMED graphs may match.
  *
  * @param subj subject of pattern
  * @param pred predicate of pattern
  * @param obj object of pattern
  * @param graph the context with which to match the statements against
  * @return iterator over statements
  */
 public java.util.Iterator getStatements(name.levering.ryan.sparql.common.Value subject, name.levering.ryan.sparql.common.URI predicate, name.levering.ryan.sparql.common.Value @object, name.levering.ryan.sparql.common.URI[] graphs)
 {
     return GetIterator( new Statement(ToEntity(subject), ToEntity(predicate), ToResource(@object)), ToEntities(graphs), -1 );
 }
示例#12
0
 ? AddParameter(name, String.Join(ListSeparator, values.Select(converter)))
示例#13
0
 get => GetName(name, isEntity);
 string.CompareOrdinal(name, result.name) == 0 &&
示例#15
0
 foreach (var(name, value) in paramValues)
示例#16
0
 set => SetProperty(ref name, value);
示例#17
0
 public static ObjectNode Object(string name, params (string key, string value)[] children) => new ObjectNode(name, children.Select(e => new ValueNode(e.key, e.value) as ISettingsNode).ToArray());
示例#18
0
 Add(name, value);
示例#19
0
 /**
  * Gets all statements with a specific subject, predicate and/or object in
  * the default graph of the repository. All three parameters may be null to
  * indicate wildcards. This is only used in SPARQL queries when no graph
  * names are indicated.
  *
  * @param subj subject of pattern
  * @param pred predicate of pattern
  * @param obj object of pattern
  * @return iterator over statements
  */
 public java.util.Iterator getDefaultGraphStatements(name.levering.ryan.sparql.common.Value subject, name.levering.ryan.sparql.common.URI predicate, name.levering.ryan.sparql.common.Value @object)
 {
     return GetIterator( new Statement(ToEntity(subject), ToEntity(predicate), ToResource(@object), Statement.DefaultMeta), -1 );
 }
 => UnderlyingObject = new IncrementalAnalyzerProviderMetadata(name, highPriorityForActiveFile, workspaceKinds);
示例#21
0
 public bool hasNamedGraphStatement(name.levering.ryan.sparql.common.Value subject, name.levering.ryan.sparql.common.URI @predicate, name.levering.ryan.sparql.common.Value @object)
 {
     return has(new Statement(ToEntity(subject), ToEntity(predicate), ToResource(@object), null));
 }
示例#22
0
 set => name = SetParent(name, value ?? throw new NullReferenceException());
示例#23
0
 public Resource ToResource(name.levering.ryan.sparql.common.Value value)
 {
     if (value == null) return null;
     if (value is LiteralWrapper) return ((LiteralWrapper)value).r;
     if (value is name.levering.ryan.sparql.common.Literal) {
         name.levering.ryan.sparql.common.Literal literal = (name.levering.ryan.sparql.common.Literal)value;
         return new Literal(literal.getLabel(), literal.getLanguage(), literal.getDatatype() == null ? null : literal.getDatatype().getURI());
     } else {
         return ToEntity(value);
     }
 }
        /// <summary>
        /// Initializes a new instance of the <see cref="AzureNamedKeyCredential"/> class.
        /// </summary>
        /// <param name="name">The name of the <paramref name="key"/>.</param>
        /// <param name="key">The key to use for authenticating with the Azure service.</param>
        /// <exception cref="System.ArgumentNullException">
        /// Thrown when the <paramref name="name"/> or <paramref name="key"/> is null.
        /// </exception>
        /// <exception cref="System.ArgumentException">
        /// Thrown when the <paramref name="name"/> or <paramref name="key"/> is empty.
        /// </exception>
#pragma warning disable CS8618 // Non-nullable field is uninitialized. Consider declaring as nullable.
        public AzureNamedKeyCredential(string name, string key) => Update(name, key);
示例#25
0
 public name.levering.ryan.sparql.logic.function.ExternalFunction create(name.levering.ryan.sparql.model.logic.LogicFactory logicfactory, name.levering.ryan.sparql.common.SPARQLValueFactory valuefactory)
 {
     return this;
 }
示例#26
0
 => type.GetField(name, flags) is FieldInfo fld && fld.FieldType == fieldType ? fld : (type.BaseType?.GetFieldOfType(name, fieldType, flags));
示例#27
0
 public RdfGroupLogic(name.levering.ryan.sparql.model.data.GroupConstraintData data, name.levering.ryan.sparql.model.logic.helper.SetIntersectLogic logic)
     : base(data, logic)
 {
 }
示例#28
0
 set => Add(name, value);
示例#29
0
文件: funcs.cs 项目: zjmit/go2cs
 foreach (var (name, fn) in in)
 {
     if (!goodName(name))
示例#30
0
 public name.levering.ryan.sparql.common.Literal createLiteral(string value, name.levering.ryan.sparql.common.URI datatype)
 {
     return new LiteralWrapper(new Literal(value, null, datatype.getURI()));
 }
示例#31
0
 _ => ToSnakeCase(name, upper: true),
示例#32
0
 public name.levering.ryan.sparql.common.URI createURI(name.levering.ryan.sparql.common.URI value)
 {
     return (name.levering.ryan.sparql.common.URI)createValue(value);
 }
示例#33
0
 public name.levering.ryan.sparql.common.Literal createLiteral(name.levering.ryan.sparql.common.Literal value)
 {
     return (name.levering.ryan.sparql.common.Literal)createValue(value);
 }
示例#34
0
 if (!TryGetAssemblyFileInfo(name, includeManifestModule: true, out AssemblyFileInfo afi))
示例#35
0
 public name.levering.ryan.sparql.common.Statement createStatement(name.levering.ryan.sparql.common.Resource subject, name.levering.ryan.sparql.common.URI @predicate, name.levering.ryan.sparql.common.Value @object)
 {
     return new Stmt(subject, predicate, @object);
 }
示例#36
0
 addParameter(name, value, _ => _.ToString(CultureInfo.InvariantCulture));
示例#37
0
 public name.levering.ryan.sparql.common.Value createValue(name.levering.ryan.sparql.common.Value value)
 {
     if (value is BNodeWrapper) return value;
     if (value is LiteralWrapper) return value;
     if (value is URIWrapper) return value;
     return Wrap(ToResource(value));
 }
示例#38
0
 (Slug, Name, Paths) = (slug, name, new SolutionPaths(name, directory));
示例#39
0
 public java.util.Iterator getDefaultGraphStatements(name.levering.ryan.sparql.common.Value[] subject, name.levering.ryan.sparql.common.Value[] predicate, name.levering.ryan.sparql.common.Value[] @object, object[] litFilters, int limit)
 {
     return GetIterator( ToEntities(subject), ToEntities(predicate), ToResources(@object), new Entity[] { Statement.DefaultMeta }, litFilters, limit );
 }
示例#40
0
 new CouchbaseBucket(name, _clusterContext, _scopeFactory, _retryOrchestrator, _vBucketKeyMapperFactory, _couchbaseLogger, _redactor, _bootstrapperFactory, _tracer, _operationConfigurator, _retryStrategy),
示例#41
0
 public java.util.Iterator getStatements(name.levering.ryan.sparql.common.Value[] subject, name.levering.ryan.sparql.common.Value[] predicate, name.levering.ryan.sparql.common.Value[] @object, name.levering.ryan.sparql.common.URI[] graphs, object[] litFilters, int limit)
 {
     return GetIterator( ToEntities(subject), ToEntities(predicate), ToResources(@object), ToEntities(graphs), litFilters, limit );
 }
示例#42
0
 new MemcachedBucket(name, _clusterContext, _scopeFactory, _retryOrchestrator, _ketamaKeyMapperFactory, _memcachedLogger, _redactor, _bootstrapperFactory, _tracer, _operationConfigurator, _retryStrategy),
示例#43
0
 public bool hasStatement(name.levering.ryan.sparql.common.Value subject, name.levering.ryan.sparql.common.URI @predicate, name.levering.ryan.sparql.common.Value @object, name.levering.ryan.sparql.common.URI[] graphs)
 {
     return has(new Statement(ToEntity(subject), ToEntity(predicate), ToResource(@object)), ToEntities(graphs));
 }
示例#44
0
 foreach (var(name, data) in attrs)
示例#45
0
 public Entity ToEntity(name.levering.ryan.sparql.common.Value ent)
 {
     if (ent == null) return null;
     if (ent is BNodeWrapper) return ((BNodeWrapper)ent).r;
     if (ent is URIWrapper) return ((URIWrapper)ent).r;
     if (ent is name.levering.ryan.sparql.common.BNode) {
         name.levering.ryan.sparql.common.BNode bnode = (name.levering.ryan.sparql.common.BNode)ent;
         Entity r = (Entity)bnodes[bnode.getID()];
         if (r == null) {
             r = new BNode();
             bnodes[bnode.getID()] = r;
         }
         return r;
     } else if (ent is name.levering.ryan.sparql.common.URI) {
         name.levering.ryan.sparql.common.URI uri = (name.levering.ryan.sparql.common.URI)ent;
         return new Entity(uri.getURI());
     } else {
         return null;
     }
 }
示例#46
0
 foreach (var(name, value) in parameters)
示例#47
0
 public Resource[] ToResources(name.levering.ryan.sparql.common.Value[] ents)
 {
     if (ents == null) return null;
     Resource[] ret = new Resource[ents.Length];
     for (int i = 0; i < ents.Length; i++)
         ret[i] = ToResource(ents[i]);
     return ret;
 }
示例#48
0
 set => TrySetMember(name, value);
示例#49
0
 public Stmt(name.levering.ryan.sparql.common.Resource subject, name.levering.ryan.sparql.common.URI @predicate, name.levering.ryan.sparql.common.Value @object)
 {
     this.subject = subject;
     this.predicate = predicate;
     this.@object = @object;
 }
示例#50
0
 get => GetParameter(name); set => SetParameter(name, value);
示例#51
0
 public name.levering.ryan.sparql.common.Value evaluate(name.levering.ryan.sparql.model.logic.ExpressionLogic[] arguments, name.levering.ryan.sparql.common.RdfBindingRow binding)
 {
     try {
         Resource ret = func.Evaluate(source.ToResources(arguments, binding));
         return RdfSourceWrapper.Wrap(ret);
     } catch (Exception e) {
         throw new name.levering.ryan.sparql.logic.function.ExternalFunctionException(e);
     }
 }
示例#52
0
 new CouchbaseBucket(name, _clusterContext, _scopeFactory, _retryOrchestrator, _vBucketKeyMapperFactory, _couchbaseLogger, _redactor, _bootstrapperFactory),
示例#53
0
 public override name.levering.ryan.sparql.model.logic.ConstraintLogic getGroupConstraintLogic(name.levering.ryan.sparql.model.data.GroupConstraintData data)
 {
     return new RdfGroupLogic(data, new name.levering.ryan.sparql.logic.streamed.IndexedSetIntersectLogic());
 }
示例#54
0
 new MemcachedBucket(name, _clusterContext, _scopeFactory, _retryOrchestrator, _ketamaKeyMapperFactory, _memcachedLogger, _redactor, _bootstrapperFactory),
示例#55
0
            protected override void extractLiteralFilters(name.levering.ryan.sparql.model.logic.ExpressionLogic node, java.util.Map literalFilters)
            {
                //Console.Error.WriteLine(node + " " + node.GetType());
                base.extractLiteralFilters(node, literalFilters);

                if (node is BinaryExpressionNode) {
                    BinaryExpressionNode b = (BinaryExpressionNode)node;

                    LiteralFilter.CompType comp;
                    if (node is ASTEqualsNode)
                        comp = LiteralFilter.CompType.EQ;
                    else if (node is ASTNotEqualsNode)
                        comp = LiteralFilter.CompType.NE;
                    else if (node is ASTGreaterThanNode)
                        comp = LiteralFilter.CompType.GT;
                    else if (node is ASTGreaterThanEqualsNode)
                        comp = LiteralFilter.CompType.GE;
                    else if (node is ASTLessThanNode)
                        comp = LiteralFilter.CompType.LT;
                    else if (node is ASTLessThanEqualsNode)
                        comp = LiteralFilter.CompType.LE;
                    else
                        return;

                    SparqlVariable var;
                    name.levering.ryan.sparql.common.Literal val;

                    object left = RemoveCast(b.getLeftExpression());
                    object right = RemoveCast(b.getRightExpression());

                    if (left is ASTVar && right is name.levering.ryan.sparql.common.Literal) {
                        var = (SparqlVariable)left;
                        val = (name.levering.ryan.sparql.common.Literal)right;
                    } else if (right is ASTVar && left is name.levering.ryan.sparql.common.Literal) {
                        var = (SparqlVariable)right;
                        val = (name.levering.ryan.sparql.common.Literal)left;
                        switch (comp) {
                        case LiteralFilter.CompType.LT: comp = LiteralFilter.CompType.GE; break;
                        case LiteralFilter.CompType.LE: comp = LiteralFilter.CompType.GT; break;
                        case LiteralFilter.CompType.GT: comp = LiteralFilter.CompType.LE; break;
                        case LiteralFilter.CompType.GE: comp = LiteralFilter.CompType.LT; break;
                        }
                    } else {
                        return;
                    }

                    object parsedvalue = new Literal(val.getLabel(), null, val.getDatatype() == null ? null : val.getDatatype().getURI()).ParseValue();

                    LiteralFilter filter = LiteralFilter.Create(comp, parsedvalue);
                    addLiteralFilter(var, filter, literalFilters);

                } else if (node is ASTRegexFuncNode) {
                    ASTRegexFuncNode renode = (ASTRegexFuncNode)node;

                    SparqlVariable var = RemoveCast(renode.getArguments().get(0)) as ASTVar;
                    name.levering.ryan.sparql.common.Literal relit = RemoveCast(renode.getArguments().get(1)) as name.levering.ryan.sparql.common.Literal;

                    if (var == null || relit == null) return;

                    string re = relit.getLabel();
                    if (re.Length == 0) return;

                    bool startsW = removeChar(ref re, '^', 0); // chop of ^ from start, return whether it was there
                    bool endsW = removeChar(ref re, '$', 1); // chop of $ from end, return whether it was there

                    // make sure the re that's left has no special re characters
                    foreach (char c in re)
                        if (c == '(' || c == '[' || c == '{' || c == '*' || c == '?' || c == '+' || c == '\\' || c == '|' || c == '.')
                            return;

                    LiteralFilter filter;
                    if (startsW && endsW) {
                        filter = LiteralFilter.Create(LiteralFilter.CompType.EQ, re);
                    } else if (startsW) {
                        filter = new SemWeb.Filters.StringStartsWithFilter(re);
                    } else if (endsW) {
                        filter = new SemWeb.Filters.StringEndsWithFilter(re);
                    } else {
                        filter = new SemWeb.Filters.StringContainsFilter(re);
                    }
                    addLiteralFilter(var, filter, literalFilters);
                }
            }
示例#56
0
 /// <summary>
 /// Initializes a new instance of the <see cref='FontFamily'/> class in the specified
 /// <see cref='FontCollection'/> and with the specified name.
 /// </summary>
 public FontFamily(string name, FontCollection?fontCollection) => CreateFontFamily(name, fontCollection);
 // -- foreach name, description in [('RightOf', 'right of'), ('LeftOf', 'left of'), ('Above', 'above'), ('Below', 'below')] --
 /// <summary>
 /// Position the control to the {{{description}}} the other control
 /// </summary>
 /// <param name="parent">The parent user control</param>
 /// <param name="d">The distance between the parent's border and the control</param>
 public void Position{{{name}}}(Control other, int d = -1) {
示例#58
0
 (R)(GetFunction(name, staticMethods)?.Invoke(null, parameters) ?? default);
 public void Override(AutoMapping<<%= _.capitalize(name) %>> mapping)
示例#60
0
 await NavigateAsync(name, ConvertToINavigationParameters(parameters));