X-Git-Url: https://gerrit.simantics.org/r/gitweb?a=blobdiff_plain;f=bundles%2Forg.simantics.graph%2Fsrc%2Forg%2Fsimantics%2Fgraph%2Fquery%2FPaths.java;h=3d580e92fd9d7033c87f4cecd09e8a4ae235d7f8;hb=aab6399f20c07b61a0dbf9614614f44a2e0ea325;hp=9c267847ad4e0c39c742b173774649f235d24cc6;hpb=969bd23cab98a79ca9101af33334000879fb60c5;p=simantics%2Fplatform.git diff --git a/bundles/org.simantics.graph/src/org/simantics/graph/query/Paths.java b/bundles/org.simantics.graph/src/org/simantics/graph/query/Paths.java index 9c267847a..3d580e92f 100644 --- a/bundles/org.simantics.graph/src/org/simantics/graph/query/Paths.java +++ b/bundles/org.simantics.graph/src/org/simantics/graph/query/Paths.java @@ -1,153 +1,153 @@ -package org.simantics.graph.query; - - - -public class Paths { - public static PathRoot Root = new PathRoot(""); - public static Path SimanticsDomain = Root.child("www.simantics.org"); - - public Path Layer0; - - public Path InstanceOf; - public Path Inherits; - public Path SupertypeOf; - public Path SubrelationOf; - public Path SuperrelationOf; - public Path InverseOf; - public Path HasDatatype; - public Path Asserts; - public Path Assertion; - public Path HasPredicate; - public Path HasObject; - public Path Equals; - public Path ConsistsOf; - public Path PartOf; - public Path HasNext; - public Path HasPrevious; - public Path Template; - public Path HasTemplate; - public Path HasTemplateParameters; - public Path HasCardinality; - public Path PropertyDefinition; - public Path HasPropertyDefinition; - public Path ConcernsRelation; - public Path HasDomain; - public Path HasRange; - public Path Tag; - public Path Entity; - public Path IsWeaklyRelatedTo; - public Path IsRelatedTo; - - public Path HasResourceClass; - public Path Deprecated; - - public Path Library; - - // Literal types - public Path Literal; - public Path Boolean; - public Path Byte; - public Path Integer; - public Path Long; - public Path Float; - public Path Double; - public Path String; - public Path Variant; - - public Path BooleanArray; - public Path ByteArray; - public Path IntegerArray; - public Path LongArray; - public Path FloatArray; - public Path DoubleArray; - public Path StringArray; - - public Path Graph; - public Path Datatype; - public Path IntegerRange; - - public Path List; - public Path List_Entry; - public Path List_Next; - public Path List_Previous; - public Path List_Element; - - public Paths(String layer0Version) { - Layer0 = SimanticsDomain.child("Layer0-" + layer0Version); - - InstanceOf = Layer0.child("InstanceOf"); - Inherits = Layer0.child("Inherits"); - SupertypeOf = Layer0.child("SupertypeOf"); - SubrelationOf = Layer0.child("SubrelationOf"); - SuperrelationOf = Layer0.child("SuperrelationOf"); - InverseOf = Layer0.child("InverseOf"); - HasDatatype = Layer0.child("HasDataType"); - Asserts = Layer0.child("Asserts"); - Assertion = Layer0.child("Assertion"); - HasPredicate = Layer0.child("HasPredicate"); - HasObject = Layer0.child("HasObject"); - Equals = Layer0.child("Equals"); - ConsistsOf = Layer0.child("ConsistsOf"); - PartOf = Layer0.child("PartOf"); - HasNext = Layer0.child("HasNext"); - HasPrevious = Layer0.child("HasPrevious"); - Template = Layer0.child("Template"); - HasTemplate = Layer0.child("HasTemplate"); - HasTemplateParameters = Layer0.child("HasTemplateParameters"); - HasCardinality = Layer0.child("HasCardinality"); - PropertyDefinition = Layer0.child("PropertyDefinition"); - HasPropertyDefinition = Layer0.child("HasPropertyDefinition"); - ConcernsRelation = Layer0.child("ConcernsRelation"); - HasDomain = Layer0.child("HasDomain"); - HasRange = Layer0.child("HasRange"); - Tag = Layer0.child("Tag"); - Entity = Layer0.child("Entity"); - IsWeaklyRelatedTo = Layer0.child("IsWeaklyRelatedTo"); - IsRelatedTo = Layer0.child("IsRelatedTo"); - - HasResourceClass = Layer0.child("HasResourceClass"); - Deprecated = Layer0.child("Deprecated"); - - Library = Layer0.child("Library"); - - // Literal types - Literal = Layer0.child("Literal"); - Boolean = Layer0.child("Boolean"); - Byte = Layer0.child("Byte"); - Integer = Layer0.child("Integer"); - Long = Layer0.child("Long"); - Float = Layer0.child("Float"); - Double = Layer0.child("Double"); - String = Layer0.child("String"); - Variant = Layer0.child("Variant"); - - BooleanArray = Layer0.child("BooleanArray"); - ByteArray = Layer0.child("ByteArray"); - IntegerArray = Layer0.child("IntegerArray"); - LongArray = Layer0.child("LongArray"); - FloatArray = Layer0.child("FloatArray"); - DoubleArray = Layer0.child("DoubleArray"); - StringArray = Layer0.child("StringArray"); - - Graph = Layer0.child("Graph"); - Datatype = Layer0.child("DataType"); - IntegerRange = Layer0.child("IntegerRange"); - - List = Layer0.child("List"); - List_Entry = List.child("Entry"); - List_Next = List.child("Next"); - List_Previous = List.child("Previous"); - List_Element = List.child("Element"); - } - - public Path getPath(String url) { - String[] parts = url.split("/{1,2}"); - if ( parts.length == 0 ) return null; - Path path = parts[0].equals("http:") ? Root : new PathRoot(parts[0]); - for (int i=1; i