├── .project ├── BuildingSMARTLibrary ├── .antlr-eclipse ├── .classpath ├── .gitignore ├── .project ├── .settings │ ├── org.eclipse.core.resources.prefs │ ├── org.eclipse.jdt.core.prefs │ └── org.eclipse.m2e.core.prefs ├── README.md ├── ifcnamespaces │ ├── ifc4_add2_namespaces.xml │ ├── org │ │ └── iai │ │ │ └── ifcNamespaces │ │ │ ├── Definedtypes$1.class │ │ │ ├── Definedtypes$Factory.class │ │ │ ├── Definedtypes.class │ │ │ ├── Entities$1.class │ │ │ ├── Entities$Factory.class │ │ │ ├── Entities.class │ │ │ ├── Enumerations$1.class │ │ │ ├── Enumerations$Factory.class │ │ │ ├── Enumerations.class │ │ │ ├── Functions$1.class │ │ │ ├── Functions$Factory.class │ │ │ ├── Functions.class │ │ │ ├── Namespace$1.class │ │ │ ├── Namespace$Factory.class │ │ │ ├── Namespace.class │ │ │ ├── NamespacesDocument$1.class │ │ │ ├── NamespacesDocument$Factory.class │ │ │ ├── NamespacesDocument$Namespaces$Factory.class │ │ │ ├── NamespacesDocument$Namespaces.class │ │ │ ├── NamespacesDocument.class │ │ │ ├── Rules$1.class │ │ │ ├── Rules$Factory.class │ │ │ ├── Rules.class │ │ │ ├── Selects$1.class │ │ │ ├── Selects$Factory.class │ │ │ ├── Selects.class │ │ │ ├── Types$1.class │ │ │ ├── Types$Factory.class │ │ │ ├── Types.class │ │ │ └── impl │ │ │ ├── DefinedtypesImpl.class │ │ │ ├── EntitiesImpl.class │ │ │ ├── EnumerationsImpl.class │ │ │ ├── FunctionsImpl.class │ │ │ ├── NamespaceImpl.class │ │ │ ├── NamespacesDocumentImpl$NamespacesImpl.class │ │ │ ├── NamespacesDocumentImpl.class │ │ │ ├── RulesImpl.class │ │ │ ├── SelectsImpl.class │ │ │ └── TypesImpl.class │ └── schemaorg_apache_xmlbeans │ │ ├── element │ │ └── http_3A_2F_2Fwww_2Eiai_2Eorg_2FifcNamespaces │ │ │ └── namespaces.xsb │ │ ├── javaname │ │ └── org │ │ │ └── iai │ │ │ └── ifcNamespaces │ │ │ ├── Definedtypes.xsb │ │ │ ├── Entities.xsb │ │ │ ├── Enumerations.xsb │ │ │ ├── Functions.xsb │ │ │ ├── Namespace.xsb │ │ │ ├── NamespacesDocument.xsb │ │ │ ├── NamespacesDocument │ │ │ └── Namespaces.xsb │ │ │ ├── Rules.xsb │ │ │ ├── Selects.xsb │ │ │ └── Types.xsb │ │ ├── namespace │ │ └── http_3A_2F_2Fwww_2Eiai_2Eorg_2FifcNamespaces │ │ │ └── xmlns.xsb │ │ ├── src │ │ └── ifcNamespaces.xsd │ │ ├── system │ │ └── sC80EE5D6F6928DF2668E60C652B57598 │ │ │ ├── TypeSystemHolder.class │ │ │ ├── definedtypesfb34type.xsb │ │ │ ├── entities3923type.xsb │ │ │ ├── enumerationse3b8type.xsb │ │ │ ├── functions53fbtype.xsb │ │ │ ├── index.xsb │ │ │ ├── namespacebe3btype.xsb │ │ │ ├── namespacesa190elemtype.xsb │ │ │ ├── namespacese37cdoctype.xsb │ │ │ ├── namespaceselement.xsb │ │ │ ├── rulesaa9ftype.xsb │ │ │ ├── selects825ftype.xsb │ │ │ └── types135dtype.xsb │ │ └── type │ │ └── http_3A_2F_2Fwww_2Eiai_2Eorg_2FifcNamespaces │ │ ├── definedtypes.xsb │ │ ├── entities.xsb │ │ ├── enumerations.xsb │ │ ├── functions.xsb │ │ ├── namespace.xsb │ │ ├── rules.xsb │ │ ├── selects.xsb │ │ └── types.xsb ├── license.txt ├── pom.xml └── src │ ├── net │ └── sourceforge │ │ └── osexpress │ │ └── parser │ │ ├── EasyParser.java │ │ ├── EnumerationType.java │ │ ├── ExpressLexer.java │ │ ├── ExpressLexer.smap │ │ ├── ExpressParser.java │ │ ├── ExpressParser.smap │ │ ├── ExpressParserTokenTypes.java │ │ ├── ExpressParserTokenTypes.txt │ │ ├── ExternalId.java │ │ ├── Scope.java │ │ └── express.g │ ├── nl │ └── tue │ │ └── buildingsmart │ │ ├── emf │ │ ├── DerivedReader.java │ │ └── SchemaLoader.java │ │ ├── express │ │ ├── dictionary │ │ │ └── Namespaces.java │ │ ├── parser │ │ │ ├── Express2DictWalker.java │ │ │ ├── Express2DictWalker.smap │ │ │ ├── Express2DictWalkerTokenTypes.java │ │ │ ├── Express2DictWalkerTokenTypes.txt │ │ │ ├── Express2SDAI.g │ │ │ ├── ExpressParserTokenTypes.txt │ │ │ ├── ExpressSchemaParser.java │ │ │ └── SchemaLoader.java │ │ └── population │ │ │ ├── AttributeInstance.java │ │ │ ├── EntityInstance.java │ │ │ ├── ModelPopulation.java │ │ │ ├── ParseException.java │ │ │ ├── Part21Parser.java │ │ │ ├── Part21ParserConstants.java │ │ │ ├── Part21ParserTokenManager.java │ │ │ ├── SimpleCharStream.java │ │ │ ├── Token.java │ │ │ ├── TokenMgrError.java │ │ │ ├── part21_parser.jj │ │ │ └── test │ │ │ ├── PopulationMetrics.java │ │ │ └── PopulationTest.java │ │ └── schema │ │ ├── AggregationType.java │ │ ├── ArrayType.java │ │ ├── Attribute.java │ │ ├── BagType.java │ │ ├── BaseType.java │ │ ├── BinaryType.java │ │ ├── BooleanType.java │ │ ├── Bound.java │ │ ├── ConstructedType.java │ │ ├── DefinedType.java │ │ ├── DerivedAttribute.java │ │ ├── DerivedAttribute2.java │ │ ├── EntityDefinition.java │ │ ├── EnumerationType.java │ │ ├── ExplicitAttribute.java │ │ ├── ExplicitOrDerived.java │ │ ├── IntegerBound.java │ │ ├── IntegerType.java │ │ ├── InverseAttribute.java │ │ ├── ListType.java │ │ ├── LogicalType.java │ │ ├── NamedType.java │ │ ├── NumberType.java │ │ ├── PopulationDependendBound.java │ │ ├── RealType.java │ │ ├── Schema.java │ │ ├── SchemaDefinition.java │ │ ├── SchemaException.java │ │ ├── SelectType.java │ │ ├── SetType.java │ │ ├── SimpleType.java │ │ ├── StringType.java │ │ ├── TypeOrRule.java │ │ ├── UnderlyingType.java │ │ ├── VariableSizeAggregationType.java │ │ └── WhereRule.java │ └── schema │ ├── IFC2X3_TC1.exp │ ├── IFC4X3_ADD2.exp │ └── IFC4_ADD2.exp └── README.md /.project: -------------------------------------------------------------------------------- 1 | 2 | 3 | BuildingSMARTLibrary 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | -------------------------------------------------------------------------------- /BuildingSMARTLibrary/.antlr-eclipse: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | -------------------------------------------------------------------------------- /BuildingSMARTLibrary/.classpath: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | -------------------------------------------------------------------------------- /BuildingSMARTLibrary/.gitignore: -------------------------------------------------------------------------------- 1 | /bin 2 | /target/ 3 | /BuildingSMARTLibrary/ 4 | -------------------------------------------------------------------------------- /BuildingSMARTLibrary/.project: -------------------------------------------------------------------------------- 1 | 2 | 3 | BuildingSMARTLibrary 4 | 5 | 6 | 7 | 8 | 9 | org.eclipse.dltk.core.scriptbuilder 10 | 11 | 12 | 13 | 14 | org.eclipse.jdt.core.javabuilder 15 | 16 | 17 | 18 | 19 | org.eclipse.m2e.core.maven2Builder 20 | 21 | 22 | 23 | 24 | 25 | org.eclipse.m2e.core.maven2Nature 26 | org.eclipse.jdt.core.javanature 27 | net.certiv.antlrdt.core.nature 28 | 29 | 30 | -------------------------------------------------------------------------------- /BuildingSMARTLibrary/.settings/org.eclipse.core.resources.prefs: -------------------------------------------------------------------------------- 1 | eclipse.preferences.version=1 2 | encoding//src/schema=UTF-8 3 | encoding/=UTF-8 4 | encoding/ifcnamespaces=UTF-8 5 | encoding/src=UTF-8 6 | -------------------------------------------------------------------------------- /BuildingSMARTLibrary/.settings/org.eclipse.jdt.core.prefs: -------------------------------------------------------------------------------- 1 | eclipse.preferences.version=1 2 | org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled 3 | org.eclipse.jdt.core.compiler.codegen.methodParameters=do not generate 4 | org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.8 5 | org.eclipse.jdt.core.compiler.codegen.unusedLocal=preserve 6 | org.eclipse.jdt.core.compiler.compliance=1.8 7 | org.eclipse.jdt.core.compiler.debug.lineNumber=generate 8 | org.eclipse.jdt.core.compiler.debug.localVariable=generate 9 | org.eclipse.jdt.core.compiler.debug.sourceFile=generate 10 | org.eclipse.jdt.core.compiler.problem.assertIdentifier=error 11 | org.eclipse.jdt.core.compiler.problem.enumIdentifier=error 12 | org.eclipse.jdt.core.compiler.problem.forbiddenReference=warning 13 | org.eclipse.jdt.core.compiler.source=1.8 14 | -------------------------------------------------------------------------------- /BuildingSMARTLibrary/.settings/org.eclipse.m2e.core.prefs: -------------------------------------------------------------------------------- 1 | activeProfiles= 2 | eclipse.preferences.version=1 3 | resolveWorkspaceProjects=true 4 | version=1 5 | -------------------------------------------------------------------------------- /BuildingSMARTLibrary/README.md: -------------------------------------------------------------------------------- 1 | Author: Jakob Beetz Eindhoven University of Technology 2 | This is the initial dump of some utility libraries to access STEP schemas and population files. 3 | 4 | Currently only a very limited amount of javadoc tags has been added to the packages 5 | and the sources. 6 | 7 | The library consists of 6 packages: 8 | 9 | - net.sourceforge.osexpress.parser 10 | a parser generator written by Josh Lubel et al in the context of the 11 | OSEXPRESS project. 12 | https://sourceforge.net/projects/osexpress/ 13 | modified and adapted slightly 14 | 15 | - nl.tue.buildingsmart.express.parser 16 | a modfied ANTLR grammar Express2SDAI.g 17 | it makes use of the dictionary package to store an in-memory meta-model of an 18 | ISO 10303 part 11 EXPRESS schema definition file. 19 | The main schemas that have been tested with it are different versions of the 20 | Industry Foundation Classes (IFC) model developed under the umbrella of the 21 | buildingSMART / IAI organization: 22 | http://www.iai-international.org/ 23 | http://www.iai-international.org/Model/IFC(ifcXML)Specs.html 24 | 25 | - nl.tue.buildingsmart.express.dictionary 26 | a meta model structure to capture some of the essential modeling constructs 27 | of the EXPRESS schema definition language. 28 | Many advanced features such as RULE, FUNCTION, QUERY etc. are not implemnted yet 29 | 30 | - nl.tue.buildingsmart.express.population 31 | a JavaCC based file-reader for ISO 10303 part 21 Step Physical File Format (SPFF) 32 | files. This primitive piece creates a large Hashmap of ENTITY and ATTRIBUTE instances 33 | and will quickly go through the memory roof of large population files. 34 | It has been particularly developed with reading in IFC files in mind 35 | The original JavaCC grammar has been developed by Singva Ma 36 | 37 | - nl.tue.buildingsmart.express.population.test 38 | a primitive test that reads in a SPFF (IFC) file given in argv and provided an .exp 39 | EXPRESS schema will spit out some statistics. 40 | 41 | - nl.tue.buildingsmart.emf 42 | a primitive generator that takes and EXPRESS .exp schema and converts it into an ecore 43 | model for the use in the Eclipse Modeling Framework (EMF) 44 | 45 | other highly experimental mappings to RDF(S) and OWL, graphical editors, network visualizers 46 | etc. are available upon request 47 | 48 | 49 | TODO: loads and loads of cleanup, refactoring and documentation. 50 | -------------------------------------------------------------------------------- /BuildingSMARTLibrary/ifcnamespaces/org/iai/ifcNamespaces/Definedtypes$1.class: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/opensourceBIM/BuildingSMARTLibrary/2c8a682488dd7cf6fdde40e938f1f6a3d950fa3f/BuildingSMARTLibrary/ifcnamespaces/org/iai/ifcNamespaces/Definedtypes$1.class -------------------------------------------------------------------------------- /BuildingSMARTLibrary/ifcnamespaces/org/iai/ifcNamespaces/Definedtypes$Factory.class: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/opensourceBIM/BuildingSMARTLibrary/2c8a682488dd7cf6fdde40e938f1f6a3d950fa3f/BuildingSMARTLibrary/ifcnamespaces/org/iai/ifcNamespaces/Definedtypes$Factory.class -------------------------------------------------------------------------------- /BuildingSMARTLibrary/ifcnamespaces/org/iai/ifcNamespaces/Definedtypes.class: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/opensourceBIM/BuildingSMARTLibrary/2c8a682488dd7cf6fdde40e938f1f6a3d950fa3f/BuildingSMARTLibrary/ifcnamespaces/org/iai/ifcNamespaces/Definedtypes.class -------------------------------------------------------------------------------- /BuildingSMARTLibrary/ifcnamespaces/org/iai/ifcNamespaces/Entities$1.class: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/opensourceBIM/BuildingSMARTLibrary/2c8a682488dd7cf6fdde40e938f1f6a3d950fa3f/BuildingSMARTLibrary/ifcnamespaces/org/iai/ifcNamespaces/Entities$1.class -------------------------------------------------------------------------------- /BuildingSMARTLibrary/ifcnamespaces/org/iai/ifcNamespaces/Entities$Factory.class: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/opensourceBIM/BuildingSMARTLibrary/2c8a682488dd7cf6fdde40e938f1f6a3d950fa3f/BuildingSMARTLibrary/ifcnamespaces/org/iai/ifcNamespaces/Entities$Factory.class -------------------------------------------------------------------------------- /BuildingSMARTLibrary/ifcnamespaces/org/iai/ifcNamespaces/Entities.class: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/opensourceBIM/BuildingSMARTLibrary/2c8a682488dd7cf6fdde40e938f1f6a3d950fa3f/BuildingSMARTLibrary/ifcnamespaces/org/iai/ifcNamespaces/Entities.class -------------------------------------------------------------------------------- /BuildingSMARTLibrary/ifcnamespaces/org/iai/ifcNamespaces/Enumerations$1.class: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/opensourceBIM/BuildingSMARTLibrary/2c8a682488dd7cf6fdde40e938f1f6a3d950fa3f/BuildingSMARTLibrary/ifcnamespaces/org/iai/ifcNamespaces/Enumerations$1.class -------------------------------------------------------------------------------- /BuildingSMARTLibrary/ifcnamespaces/org/iai/ifcNamespaces/Enumerations$Factory.class: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/opensourceBIM/BuildingSMARTLibrary/2c8a682488dd7cf6fdde40e938f1f6a3d950fa3f/BuildingSMARTLibrary/ifcnamespaces/org/iai/ifcNamespaces/Enumerations$Factory.class -------------------------------------------------------------------------------- /BuildingSMARTLibrary/ifcnamespaces/org/iai/ifcNamespaces/Enumerations.class: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/opensourceBIM/BuildingSMARTLibrary/2c8a682488dd7cf6fdde40e938f1f6a3d950fa3f/BuildingSMARTLibrary/ifcnamespaces/org/iai/ifcNamespaces/Enumerations.class -------------------------------------------------------------------------------- /BuildingSMARTLibrary/ifcnamespaces/org/iai/ifcNamespaces/Functions$1.class: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/opensourceBIM/BuildingSMARTLibrary/2c8a682488dd7cf6fdde40e938f1f6a3d950fa3f/BuildingSMARTLibrary/ifcnamespaces/org/iai/ifcNamespaces/Functions$1.class -------------------------------------------------------------------------------- /BuildingSMARTLibrary/ifcnamespaces/org/iai/ifcNamespaces/Functions$Factory.class: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/opensourceBIM/BuildingSMARTLibrary/2c8a682488dd7cf6fdde40e938f1f6a3d950fa3f/BuildingSMARTLibrary/ifcnamespaces/org/iai/ifcNamespaces/Functions$Factory.class -------------------------------------------------------------------------------- /BuildingSMARTLibrary/ifcnamespaces/org/iai/ifcNamespaces/Functions.class: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/opensourceBIM/BuildingSMARTLibrary/2c8a682488dd7cf6fdde40e938f1f6a3d950fa3f/BuildingSMARTLibrary/ifcnamespaces/org/iai/ifcNamespaces/Functions.class -------------------------------------------------------------------------------- /BuildingSMARTLibrary/ifcnamespaces/org/iai/ifcNamespaces/Namespace$1.class: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/opensourceBIM/BuildingSMARTLibrary/2c8a682488dd7cf6fdde40e938f1f6a3d950fa3f/BuildingSMARTLibrary/ifcnamespaces/org/iai/ifcNamespaces/Namespace$1.class -------------------------------------------------------------------------------- /BuildingSMARTLibrary/ifcnamespaces/org/iai/ifcNamespaces/Namespace$Factory.class: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/opensourceBIM/BuildingSMARTLibrary/2c8a682488dd7cf6fdde40e938f1f6a3d950fa3f/BuildingSMARTLibrary/ifcnamespaces/org/iai/ifcNamespaces/Namespace$Factory.class -------------------------------------------------------------------------------- /BuildingSMARTLibrary/ifcnamespaces/org/iai/ifcNamespaces/Namespace.class: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/opensourceBIM/BuildingSMARTLibrary/2c8a682488dd7cf6fdde40e938f1f6a3d950fa3f/BuildingSMARTLibrary/ifcnamespaces/org/iai/ifcNamespaces/Namespace.class -------------------------------------------------------------------------------- /BuildingSMARTLibrary/ifcnamespaces/org/iai/ifcNamespaces/NamespacesDocument$1.class: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/opensourceBIM/BuildingSMARTLibrary/2c8a682488dd7cf6fdde40e938f1f6a3d950fa3f/BuildingSMARTLibrary/ifcnamespaces/org/iai/ifcNamespaces/NamespacesDocument$1.class -------------------------------------------------------------------------------- /BuildingSMARTLibrary/ifcnamespaces/org/iai/ifcNamespaces/NamespacesDocument$Factory.class: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/opensourceBIM/BuildingSMARTLibrary/2c8a682488dd7cf6fdde40e938f1f6a3d950fa3f/BuildingSMARTLibrary/ifcnamespaces/org/iai/ifcNamespaces/NamespacesDocument$Factory.class -------------------------------------------------------------------------------- /BuildingSMARTLibrary/ifcnamespaces/org/iai/ifcNamespaces/NamespacesDocument$Namespaces$Factory.class: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/opensourceBIM/BuildingSMARTLibrary/2c8a682488dd7cf6fdde40e938f1f6a3d950fa3f/BuildingSMARTLibrary/ifcnamespaces/org/iai/ifcNamespaces/NamespacesDocument$Namespaces$Factory.class -------------------------------------------------------------------------------- /BuildingSMARTLibrary/ifcnamespaces/org/iai/ifcNamespaces/NamespacesDocument$Namespaces.class: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/opensourceBIM/BuildingSMARTLibrary/2c8a682488dd7cf6fdde40e938f1f6a3d950fa3f/BuildingSMARTLibrary/ifcnamespaces/org/iai/ifcNamespaces/NamespacesDocument$Namespaces.class -------------------------------------------------------------------------------- /BuildingSMARTLibrary/ifcnamespaces/org/iai/ifcNamespaces/NamespacesDocument.class: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/opensourceBIM/BuildingSMARTLibrary/2c8a682488dd7cf6fdde40e938f1f6a3d950fa3f/BuildingSMARTLibrary/ifcnamespaces/org/iai/ifcNamespaces/NamespacesDocument.class -------------------------------------------------------------------------------- /BuildingSMARTLibrary/ifcnamespaces/org/iai/ifcNamespaces/Rules$1.class: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/opensourceBIM/BuildingSMARTLibrary/2c8a682488dd7cf6fdde40e938f1f6a3d950fa3f/BuildingSMARTLibrary/ifcnamespaces/org/iai/ifcNamespaces/Rules$1.class -------------------------------------------------------------------------------- /BuildingSMARTLibrary/ifcnamespaces/org/iai/ifcNamespaces/Rules$Factory.class: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/opensourceBIM/BuildingSMARTLibrary/2c8a682488dd7cf6fdde40e938f1f6a3d950fa3f/BuildingSMARTLibrary/ifcnamespaces/org/iai/ifcNamespaces/Rules$Factory.class -------------------------------------------------------------------------------- /BuildingSMARTLibrary/ifcnamespaces/org/iai/ifcNamespaces/Rules.class: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/opensourceBIM/BuildingSMARTLibrary/2c8a682488dd7cf6fdde40e938f1f6a3d950fa3f/BuildingSMARTLibrary/ifcnamespaces/org/iai/ifcNamespaces/Rules.class -------------------------------------------------------------------------------- /BuildingSMARTLibrary/ifcnamespaces/org/iai/ifcNamespaces/Selects$1.class: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/opensourceBIM/BuildingSMARTLibrary/2c8a682488dd7cf6fdde40e938f1f6a3d950fa3f/BuildingSMARTLibrary/ifcnamespaces/org/iai/ifcNamespaces/Selects$1.class -------------------------------------------------------------------------------- /BuildingSMARTLibrary/ifcnamespaces/org/iai/ifcNamespaces/Selects$Factory.class: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/opensourceBIM/BuildingSMARTLibrary/2c8a682488dd7cf6fdde40e938f1f6a3d950fa3f/BuildingSMARTLibrary/ifcnamespaces/org/iai/ifcNamespaces/Selects$Factory.class -------------------------------------------------------------------------------- /BuildingSMARTLibrary/ifcnamespaces/org/iai/ifcNamespaces/Selects.class: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/opensourceBIM/BuildingSMARTLibrary/2c8a682488dd7cf6fdde40e938f1f6a3d950fa3f/BuildingSMARTLibrary/ifcnamespaces/org/iai/ifcNamespaces/Selects.class -------------------------------------------------------------------------------- /BuildingSMARTLibrary/ifcnamespaces/org/iai/ifcNamespaces/Types$1.class: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/opensourceBIM/BuildingSMARTLibrary/2c8a682488dd7cf6fdde40e938f1f6a3d950fa3f/BuildingSMARTLibrary/ifcnamespaces/org/iai/ifcNamespaces/Types$1.class -------------------------------------------------------------------------------- /BuildingSMARTLibrary/ifcnamespaces/org/iai/ifcNamespaces/Types$Factory.class: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/opensourceBIM/BuildingSMARTLibrary/2c8a682488dd7cf6fdde40e938f1f6a3d950fa3f/BuildingSMARTLibrary/ifcnamespaces/org/iai/ifcNamespaces/Types$Factory.class -------------------------------------------------------------------------------- /BuildingSMARTLibrary/ifcnamespaces/org/iai/ifcNamespaces/Types.class: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/opensourceBIM/BuildingSMARTLibrary/2c8a682488dd7cf6fdde40e938f1f6a3d950fa3f/BuildingSMARTLibrary/ifcnamespaces/org/iai/ifcNamespaces/Types.class -------------------------------------------------------------------------------- /BuildingSMARTLibrary/ifcnamespaces/org/iai/ifcNamespaces/impl/DefinedtypesImpl.class: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/opensourceBIM/BuildingSMARTLibrary/2c8a682488dd7cf6fdde40e938f1f6a3d950fa3f/BuildingSMARTLibrary/ifcnamespaces/org/iai/ifcNamespaces/impl/DefinedtypesImpl.class -------------------------------------------------------------------------------- /BuildingSMARTLibrary/ifcnamespaces/org/iai/ifcNamespaces/impl/EntitiesImpl.class: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/opensourceBIM/BuildingSMARTLibrary/2c8a682488dd7cf6fdde40e938f1f6a3d950fa3f/BuildingSMARTLibrary/ifcnamespaces/org/iai/ifcNamespaces/impl/EntitiesImpl.class -------------------------------------------------------------------------------- /BuildingSMARTLibrary/ifcnamespaces/org/iai/ifcNamespaces/impl/EnumerationsImpl.class: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/opensourceBIM/BuildingSMARTLibrary/2c8a682488dd7cf6fdde40e938f1f6a3d950fa3f/BuildingSMARTLibrary/ifcnamespaces/org/iai/ifcNamespaces/impl/EnumerationsImpl.class -------------------------------------------------------------------------------- /BuildingSMARTLibrary/ifcnamespaces/org/iai/ifcNamespaces/impl/FunctionsImpl.class: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/opensourceBIM/BuildingSMARTLibrary/2c8a682488dd7cf6fdde40e938f1f6a3d950fa3f/BuildingSMARTLibrary/ifcnamespaces/org/iai/ifcNamespaces/impl/FunctionsImpl.class -------------------------------------------------------------------------------- /BuildingSMARTLibrary/ifcnamespaces/org/iai/ifcNamespaces/impl/NamespaceImpl.class: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/opensourceBIM/BuildingSMARTLibrary/2c8a682488dd7cf6fdde40e938f1f6a3d950fa3f/BuildingSMARTLibrary/ifcnamespaces/org/iai/ifcNamespaces/impl/NamespaceImpl.class -------------------------------------------------------------------------------- /BuildingSMARTLibrary/ifcnamespaces/org/iai/ifcNamespaces/impl/NamespacesDocumentImpl$NamespacesImpl.class: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/opensourceBIM/BuildingSMARTLibrary/2c8a682488dd7cf6fdde40e938f1f6a3d950fa3f/BuildingSMARTLibrary/ifcnamespaces/org/iai/ifcNamespaces/impl/NamespacesDocumentImpl$NamespacesImpl.class -------------------------------------------------------------------------------- /BuildingSMARTLibrary/ifcnamespaces/org/iai/ifcNamespaces/impl/NamespacesDocumentImpl.class: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/opensourceBIM/BuildingSMARTLibrary/2c8a682488dd7cf6fdde40e938f1f6a3d950fa3f/BuildingSMARTLibrary/ifcnamespaces/org/iai/ifcNamespaces/impl/NamespacesDocumentImpl.class -------------------------------------------------------------------------------- /BuildingSMARTLibrary/ifcnamespaces/org/iai/ifcNamespaces/impl/RulesImpl.class: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/opensourceBIM/BuildingSMARTLibrary/2c8a682488dd7cf6fdde40e938f1f6a3d950fa3f/BuildingSMARTLibrary/ifcnamespaces/org/iai/ifcNamespaces/impl/RulesImpl.class -------------------------------------------------------------------------------- /BuildingSMARTLibrary/ifcnamespaces/org/iai/ifcNamespaces/impl/SelectsImpl.class: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/opensourceBIM/BuildingSMARTLibrary/2c8a682488dd7cf6fdde40e938f1f6a3d950fa3f/BuildingSMARTLibrary/ifcnamespaces/org/iai/ifcNamespaces/impl/SelectsImpl.class -------------------------------------------------------------------------------- /BuildingSMARTLibrary/ifcnamespaces/org/iai/ifcNamespaces/impl/TypesImpl.class: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/opensourceBIM/BuildingSMARTLibrary/2c8a682488dd7cf6fdde40e938f1f6a3d950fa3f/BuildingSMARTLibrary/ifcnamespaces/org/iai/ifcNamespaces/impl/TypesImpl.class -------------------------------------------------------------------------------- /BuildingSMARTLibrary/ifcnamespaces/schemaorg_apache_xmlbeans/element/http_3A_2F_2Fwww_2Eiai_2Eorg_2FifcNamespaces/namespaces.xsb: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/opensourceBIM/BuildingSMARTLibrary/2c8a682488dd7cf6fdde40e938f1f6a3d950fa3f/BuildingSMARTLibrary/ifcnamespaces/schemaorg_apache_xmlbeans/element/http_3A_2F_2Fwww_2Eiai_2Eorg_2FifcNamespaces/namespaces.xsb -------------------------------------------------------------------------------- /BuildingSMARTLibrary/ifcnamespaces/schemaorg_apache_xmlbeans/javaname/org/iai/ifcNamespaces/Definedtypes.xsb: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/opensourceBIM/BuildingSMARTLibrary/2c8a682488dd7cf6fdde40e938f1f6a3d950fa3f/BuildingSMARTLibrary/ifcnamespaces/schemaorg_apache_xmlbeans/javaname/org/iai/ifcNamespaces/Definedtypes.xsb -------------------------------------------------------------------------------- /BuildingSMARTLibrary/ifcnamespaces/schemaorg_apache_xmlbeans/javaname/org/iai/ifcNamespaces/Entities.xsb: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/opensourceBIM/BuildingSMARTLibrary/2c8a682488dd7cf6fdde40e938f1f6a3d950fa3f/BuildingSMARTLibrary/ifcnamespaces/schemaorg_apache_xmlbeans/javaname/org/iai/ifcNamespaces/Entities.xsb -------------------------------------------------------------------------------- /BuildingSMARTLibrary/ifcnamespaces/schemaorg_apache_xmlbeans/javaname/org/iai/ifcNamespaces/Enumerations.xsb: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/opensourceBIM/BuildingSMARTLibrary/2c8a682488dd7cf6fdde40e938f1f6a3d950fa3f/BuildingSMARTLibrary/ifcnamespaces/schemaorg_apache_xmlbeans/javaname/org/iai/ifcNamespaces/Enumerations.xsb -------------------------------------------------------------------------------- /BuildingSMARTLibrary/ifcnamespaces/schemaorg_apache_xmlbeans/javaname/org/iai/ifcNamespaces/Functions.xsb: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/opensourceBIM/BuildingSMARTLibrary/2c8a682488dd7cf6fdde40e938f1f6a3d950fa3f/BuildingSMARTLibrary/ifcnamespaces/schemaorg_apache_xmlbeans/javaname/org/iai/ifcNamespaces/Functions.xsb -------------------------------------------------------------------------------- /BuildingSMARTLibrary/ifcnamespaces/schemaorg_apache_xmlbeans/javaname/org/iai/ifcNamespaces/Namespace.xsb: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/opensourceBIM/BuildingSMARTLibrary/2c8a682488dd7cf6fdde40e938f1f6a3d950fa3f/BuildingSMARTLibrary/ifcnamespaces/schemaorg_apache_xmlbeans/javaname/org/iai/ifcNamespaces/Namespace.xsb -------------------------------------------------------------------------------- /BuildingSMARTLibrary/ifcnamespaces/schemaorg_apache_xmlbeans/javaname/org/iai/ifcNamespaces/NamespacesDocument.xsb: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/opensourceBIM/BuildingSMARTLibrary/2c8a682488dd7cf6fdde40e938f1f6a3d950fa3f/BuildingSMARTLibrary/ifcnamespaces/schemaorg_apache_xmlbeans/javaname/org/iai/ifcNamespaces/NamespacesDocument.xsb -------------------------------------------------------------------------------- /BuildingSMARTLibrary/ifcnamespaces/schemaorg_apache_xmlbeans/javaname/org/iai/ifcNamespaces/NamespacesDocument/Namespaces.xsb: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/opensourceBIM/BuildingSMARTLibrary/2c8a682488dd7cf6fdde40e938f1f6a3d950fa3f/BuildingSMARTLibrary/ifcnamespaces/schemaorg_apache_xmlbeans/javaname/org/iai/ifcNamespaces/NamespacesDocument/Namespaces.xsb -------------------------------------------------------------------------------- /BuildingSMARTLibrary/ifcnamespaces/schemaorg_apache_xmlbeans/javaname/org/iai/ifcNamespaces/Rules.xsb: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/opensourceBIM/BuildingSMARTLibrary/2c8a682488dd7cf6fdde40e938f1f6a3d950fa3f/BuildingSMARTLibrary/ifcnamespaces/schemaorg_apache_xmlbeans/javaname/org/iai/ifcNamespaces/Rules.xsb -------------------------------------------------------------------------------- /BuildingSMARTLibrary/ifcnamespaces/schemaorg_apache_xmlbeans/javaname/org/iai/ifcNamespaces/Selects.xsb: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/opensourceBIM/BuildingSMARTLibrary/2c8a682488dd7cf6fdde40e938f1f6a3d950fa3f/BuildingSMARTLibrary/ifcnamespaces/schemaorg_apache_xmlbeans/javaname/org/iai/ifcNamespaces/Selects.xsb -------------------------------------------------------------------------------- /BuildingSMARTLibrary/ifcnamespaces/schemaorg_apache_xmlbeans/javaname/org/iai/ifcNamespaces/Types.xsb: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/opensourceBIM/BuildingSMARTLibrary/2c8a682488dd7cf6fdde40e938f1f6a3d950fa3f/BuildingSMARTLibrary/ifcnamespaces/schemaorg_apache_xmlbeans/javaname/org/iai/ifcNamespaces/Types.xsb -------------------------------------------------------------------------------- /BuildingSMARTLibrary/ifcnamespaces/schemaorg_apache_xmlbeans/namespace/http_3A_2F_2Fwww_2Eiai_2Eorg_2FifcNamespaces/xmlns.xsb: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/opensourceBIM/BuildingSMARTLibrary/2c8a682488dd7cf6fdde40e938f1f6a3d950fa3f/BuildingSMARTLibrary/ifcnamespaces/schemaorg_apache_xmlbeans/namespace/http_3A_2F_2Fwww_2Eiai_2Eorg_2FifcNamespaces/xmlns.xsb -------------------------------------------------------------------------------- /BuildingSMARTLibrary/ifcnamespaces/schemaorg_apache_xmlbeans/src/ifcNamespaces.xsd: -------------------------------------------------------------------------------- 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 | -------------------------------------------------------------------------------- /BuildingSMARTLibrary/ifcnamespaces/schemaorg_apache_xmlbeans/system/sC80EE5D6F6928DF2668E60C652B57598/TypeSystemHolder.class: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/opensourceBIM/BuildingSMARTLibrary/2c8a682488dd7cf6fdde40e938f1f6a3d950fa3f/BuildingSMARTLibrary/ifcnamespaces/schemaorg_apache_xmlbeans/system/sC80EE5D6F6928DF2668E60C652B57598/TypeSystemHolder.class -------------------------------------------------------------------------------- /BuildingSMARTLibrary/ifcnamespaces/schemaorg_apache_xmlbeans/system/sC80EE5D6F6928DF2668E60C652B57598/definedtypesfb34type.xsb: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/opensourceBIM/BuildingSMARTLibrary/2c8a682488dd7cf6fdde40e938f1f6a3d950fa3f/BuildingSMARTLibrary/ifcnamespaces/schemaorg_apache_xmlbeans/system/sC80EE5D6F6928DF2668E60C652B57598/definedtypesfb34type.xsb -------------------------------------------------------------------------------- /BuildingSMARTLibrary/ifcnamespaces/schemaorg_apache_xmlbeans/system/sC80EE5D6F6928DF2668E60C652B57598/entities3923type.xsb: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/opensourceBIM/BuildingSMARTLibrary/2c8a682488dd7cf6fdde40e938f1f6a3d950fa3f/BuildingSMARTLibrary/ifcnamespaces/schemaorg_apache_xmlbeans/system/sC80EE5D6F6928DF2668E60C652B57598/entities3923type.xsb -------------------------------------------------------------------------------- /BuildingSMARTLibrary/ifcnamespaces/schemaorg_apache_xmlbeans/system/sC80EE5D6F6928DF2668E60C652B57598/enumerationse3b8type.xsb: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/opensourceBIM/BuildingSMARTLibrary/2c8a682488dd7cf6fdde40e938f1f6a3d950fa3f/BuildingSMARTLibrary/ifcnamespaces/schemaorg_apache_xmlbeans/system/sC80EE5D6F6928DF2668E60C652B57598/enumerationse3b8type.xsb -------------------------------------------------------------------------------- /BuildingSMARTLibrary/ifcnamespaces/schemaorg_apache_xmlbeans/system/sC80EE5D6F6928DF2668E60C652B57598/functions53fbtype.xsb: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/opensourceBIM/BuildingSMARTLibrary/2c8a682488dd7cf6fdde40e938f1f6a3d950fa3f/BuildingSMARTLibrary/ifcnamespaces/schemaorg_apache_xmlbeans/system/sC80EE5D6F6928DF2668E60C652B57598/functions53fbtype.xsb -------------------------------------------------------------------------------- /BuildingSMARTLibrary/ifcnamespaces/schemaorg_apache_xmlbeans/system/sC80EE5D6F6928DF2668E60C652B57598/index.xsb: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/opensourceBIM/BuildingSMARTLibrary/2c8a682488dd7cf6fdde40e938f1f6a3d950fa3f/BuildingSMARTLibrary/ifcnamespaces/schemaorg_apache_xmlbeans/system/sC80EE5D6F6928DF2668E60C652B57598/index.xsb -------------------------------------------------------------------------------- /BuildingSMARTLibrary/ifcnamespaces/schemaorg_apache_xmlbeans/system/sC80EE5D6F6928DF2668E60C652B57598/namespacebe3btype.xsb: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/opensourceBIM/BuildingSMARTLibrary/2c8a682488dd7cf6fdde40e938f1f6a3d950fa3f/BuildingSMARTLibrary/ifcnamespaces/schemaorg_apache_xmlbeans/system/sC80EE5D6F6928DF2668E60C652B57598/namespacebe3btype.xsb -------------------------------------------------------------------------------- /BuildingSMARTLibrary/ifcnamespaces/schemaorg_apache_xmlbeans/system/sC80EE5D6F6928DF2668E60C652B57598/namespacesa190elemtype.xsb: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/opensourceBIM/BuildingSMARTLibrary/2c8a682488dd7cf6fdde40e938f1f6a3d950fa3f/BuildingSMARTLibrary/ifcnamespaces/schemaorg_apache_xmlbeans/system/sC80EE5D6F6928DF2668E60C652B57598/namespacesa190elemtype.xsb -------------------------------------------------------------------------------- /BuildingSMARTLibrary/ifcnamespaces/schemaorg_apache_xmlbeans/system/sC80EE5D6F6928DF2668E60C652B57598/namespacese37cdoctype.xsb: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/opensourceBIM/BuildingSMARTLibrary/2c8a682488dd7cf6fdde40e938f1f6a3d950fa3f/BuildingSMARTLibrary/ifcnamespaces/schemaorg_apache_xmlbeans/system/sC80EE5D6F6928DF2668E60C652B57598/namespacese37cdoctype.xsb -------------------------------------------------------------------------------- /BuildingSMARTLibrary/ifcnamespaces/schemaorg_apache_xmlbeans/system/sC80EE5D6F6928DF2668E60C652B57598/namespaceselement.xsb: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/opensourceBIM/BuildingSMARTLibrary/2c8a682488dd7cf6fdde40e938f1f6a3d950fa3f/BuildingSMARTLibrary/ifcnamespaces/schemaorg_apache_xmlbeans/system/sC80EE5D6F6928DF2668E60C652B57598/namespaceselement.xsb -------------------------------------------------------------------------------- /BuildingSMARTLibrary/ifcnamespaces/schemaorg_apache_xmlbeans/system/sC80EE5D6F6928DF2668E60C652B57598/rulesaa9ftype.xsb: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/opensourceBIM/BuildingSMARTLibrary/2c8a682488dd7cf6fdde40e938f1f6a3d950fa3f/BuildingSMARTLibrary/ifcnamespaces/schemaorg_apache_xmlbeans/system/sC80EE5D6F6928DF2668E60C652B57598/rulesaa9ftype.xsb -------------------------------------------------------------------------------- /BuildingSMARTLibrary/ifcnamespaces/schemaorg_apache_xmlbeans/system/sC80EE5D6F6928DF2668E60C652B57598/selects825ftype.xsb: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/opensourceBIM/BuildingSMARTLibrary/2c8a682488dd7cf6fdde40e938f1f6a3d950fa3f/BuildingSMARTLibrary/ifcnamespaces/schemaorg_apache_xmlbeans/system/sC80EE5D6F6928DF2668E60C652B57598/selects825ftype.xsb -------------------------------------------------------------------------------- /BuildingSMARTLibrary/ifcnamespaces/schemaorg_apache_xmlbeans/system/sC80EE5D6F6928DF2668E60C652B57598/types135dtype.xsb: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/opensourceBIM/BuildingSMARTLibrary/2c8a682488dd7cf6fdde40e938f1f6a3d950fa3f/BuildingSMARTLibrary/ifcnamespaces/schemaorg_apache_xmlbeans/system/sC80EE5D6F6928DF2668E60C652B57598/types135dtype.xsb -------------------------------------------------------------------------------- /BuildingSMARTLibrary/ifcnamespaces/schemaorg_apache_xmlbeans/type/http_3A_2F_2Fwww_2Eiai_2Eorg_2FifcNamespaces/definedtypes.xsb: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/opensourceBIM/BuildingSMARTLibrary/2c8a682488dd7cf6fdde40e938f1f6a3d950fa3f/BuildingSMARTLibrary/ifcnamespaces/schemaorg_apache_xmlbeans/type/http_3A_2F_2Fwww_2Eiai_2Eorg_2FifcNamespaces/definedtypes.xsb -------------------------------------------------------------------------------- /BuildingSMARTLibrary/ifcnamespaces/schemaorg_apache_xmlbeans/type/http_3A_2F_2Fwww_2Eiai_2Eorg_2FifcNamespaces/entities.xsb: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/opensourceBIM/BuildingSMARTLibrary/2c8a682488dd7cf6fdde40e938f1f6a3d950fa3f/BuildingSMARTLibrary/ifcnamespaces/schemaorg_apache_xmlbeans/type/http_3A_2F_2Fwww_2Eiai_2Eorg_2FifcNamespaces/entities.xsb -------------------------------------------------------------------------------- /BuildingSMARTLibrary/ifcnamespaces/schemaorg_apache_xmlbeans/type/http_3A_2F_2Fwww_2Eiai_2Eorg_2FifcNamespaces/enumerations.xsb: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/opensourceBIM/BuildingSMARTLibrary/2c8a682488dd7cf6fdde40e938f1f6a3d950fa3f/BuildingSMARTLibrary/ifcnamespaces/schemaorg_apache_xmlbeans/type/http_3A_2F_2Fwww_2Eiai_2Eorg_2FifcNamespaces/enumerations.xsb -------------------------------------------------------------------------------- /BuildingSMARTLibrary/ifcnamespaces/schemaorg_apache_xmlbeans/type/http_3A_2F_2Fwww_2Eiai_2Eorg_2FifcNamespaces/functions.xsb: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/opensourceBIM/BuildingSMARTLibrary/2c8a682488dd7cf6fdde40e938f1f6a3d950fa3f/BuildingSMARTLibrary/ifcnamespaces/schemaorg_apache_xmlbeans/type/http_3A_2F_2Fwww_2Eiai_2Eorg_2FifcNamespaces/functions.xsb -------------------------------------------------------------------------------- /BuildingSMARTLibrary/ifcnamespaces/schemaorg_apache_xmlbeans/type/http_3A_2F_2Fwww_2Eiai_2Eorg_2FifcNamespaces/namespace.xsb: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/opensourceBIM/BuildingSMARTLibrary/2c8a682488dd7cf6fdde40e938f1f6a3d950fa3f/BuildingSMARTLibrary/ifcnamespaces/schemaorg_apache_xmlbeans/type/http_3A_2F_2Fwww_2Eiai_2Eorg_2FifcNamespaces/namespace.xsb -------------------------------------------------------------------------------- /BuildingSMARTLibrary/ifcnamespaces/schemaorg_apache_xmlbeans/type/http_3A_2F_2Fwww_2Eiai_2Eorg_2FifcNamespaces/rules.xsb: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/opensourceBIM/BuildingSMARTLibrary/2c8a682488dd7cf6fdde40e938f1f6a3d950fa3f/BuildingSMARTLibrary/ifcnamespaces/schemaorg_apache_xmlbeans/type/http_3A_2F_2Fwww_2Eiai_2Eorg_2FifcNamespaces/rules.xsb -------------------------------------------------------------------------------- /BuildingSMARTLibrary/ifcnamespaces/schemaorg_apache_xmlbeans/type/http_3A_2F_2Fwww_2Eiai_2Eorg_2FifcNamespaces/selects.xsb: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/opensourceBIM/BuildingSMARTLibrary/2c8a682488dd7cf6fdde40e938f1f6a3d950fa3f/BuildingSMARTLibrary/ifcnamespaces/schemaorg_apache_xmlbeans/type/http_3A_2F_2Fwww_2Eiai_2Eorg_2FifcNamespaces/selects.xsb -------------------------------------------------------------------------------- /BuildingSMARTLibrary/ifcnamespaces/schemaorg_apache_xmlbeans/type/http_3A_2F_2Fwww_2Eiai_2Eorg_2FifcNamespaces/types.xsb: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/opensourceBIM/BuildingSMARTLibrary/2c8a682488dd7cf6fdde40e938f1f6a3d950fa3f/BuildingSMARTLibrary/ifcnamespaces/schemaorg_apache_xmlbeans/type/http_3A_2F_2Fwww_2Eiai_2Eorg_2FifcNamespaces/types.xsb -------------------------------------------------------------------------------- /BuildingSMARTLibrary/license.txt: -------------------------------------------------------------------------------- 1 | Copyright (C) 2009-2016 BIMserver.org 2 | 3 | This program is free software: you can redistribute it and/or modify 4 | it under the terms of the GNU Affero General Public License as 5 | published by the Free Software Foundation, either version 3 of the 6 | License, or (at your option) any later version. 7 | 8 | This program is distributed in the hope that it will be useful, 9 | but WITHOUT ANY WARRANTY; without even the implied warranty of 10 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 11 | GNU Affero General Public License for more details. 12 | 13 | You should have received a copy of the GNU Affero General Public License 14 | along with this program. If not, see {@literal}. -------------------------------------------------------------------------------- /BuildingSMARTLibrary/pom.xml: -------------------------------------------------------------------------------- 1 | 2 | 4.0.0 3 | org.opensourcebim 4 | buildingsmartlibrary 5 | 1.0.16-SNAPSHOT 6 | jar 7 | 8 | UTF-8 9 | 10 | Java implementation for the BuildingSMART standards IFC2x3 TC1, IFC4 ADD2 TC1, IFC 4.3 ADD2 (ISO 16739) 11 | 12 | src 13 | 14 | 15 | ifcnamespaces 16 | 17 | 18 | schema 19 | src/schema 20 | 21 | 22 | 23 | 24 | maven-compiler-plugin 25 | 3.10.1 26 | 27 | 8 28 | 29 | 30 | 31 | org.sonatype.plugins 32 | nexus-staging-maven-plugin 33 | 1.6.3 34 | true 35 | 36 | ossrh 37 | https://oss.sonatype.org/ 38 | false 39 | 40 | 41 | 42 | org.apache.maven.plugins 43 | maven-release-plugin 44 | 2.5.3 45 | 46 | 47 | BuildingSMARTLibrary/pom.xml 48 | 49 | false 50 | release 51 | deploy 52 | 53 | 54 | 55 | 56 | 57 | 58 | release 59 | 60 | 61 | 62 | org.apache.maven.plugins 63 | maven-gpg-plugin 64 | 1.5 65 | 66 | 67 | sign-artifacts 68 | verify 69 | 70 | sign 71 | 72 | 73 | 74 | --pinentry-mode 75 | loopback 76 | 77 | ${gpg.keyname} 78 | 79 | 80 | 81 | 82 | 83 | org.apache.maven.plugins 84 | maven-javadoc-plugin 85 | 2.9.1 86 | 87 | 88 | attach-javadocs 89 | 90 | jar 91 | 92 | 93 | 94 | 95 | 96 | org.apache.maven.plugins 97 | maven-source-plugin 98 | 2.4 99 | 100 | 101 | attach-javadocs 102 | 103 | jar 104 | 105 | 106 | 107 | 108 | 109 | 110 | 111 | 112 | 113 | 114 | ossrh 115 | https://oss.sonatype.org/content/repositories/snapshots 116 | 117 | 118 | ossrh 119 | https://oss.sonatype.org/service/local/staging/deploy/maven2/ 120 | 121 | 122 | 123 | 124 | org.antlr 125 | antlr-complete 126 | 3.5.3 127 | 128 | 129 | org.apache.xmlbeans 130 | xmlbeans 131 | 3.1.0 132 | 133 | 134 | gnu.getopt 135 | java-getopt 136 | 1.0.13 137 | 138 | 139 | org.slf4j 140 | slf4j-api 141 | 1.7.13 142 | 143 | 144 | com.google.guava 145 | guava 146 | 33.3.1-jre 147 | 148 | 149 | commons-io 150 | commons-io 151 | 2.18.0 152 | 153 | 154 | 155 | https://github.com/opensourceBIM/BuildingSMARTLibrary.git 156 | scm:git:https://github.com/opensourceBIM/BuildingSMARTLibrary.git 157 | scm:git:https://github.com/opensourceBIM/BuildingSMARTLibrary.git 158 | HEAD 159 | 160 | 161 | OpenSource BIM 162 | opensourcebim.org 163 | 164 | 165 | GitHub 166 | https://github.com/opensourceBIM/BuildingSMARTLibrary/issues 167 | 168 | BuildingSMARTLibrary 169 | https://github.com/opensourceBIM/BuildingSMARTLibrary 170 | 171 | 172 | GNU Affero General Public License 173 | http://www.gnu.org/licenses/agpl-3.0.en.html 174 | repo 175 | 176 | 177 | 178 | 179 | ruben@logic-labs.nl 180 | Ruben de Laat 181 | 182 | 183 | -------------------------------------------------------------------------------- /BuildingSMARTLibrary/src/net/sourceforge/osexpress/parser/EasyParser.java: -------------------------------------------------------------------------------- 1 | package net.sourceforge.osexpress.parser; 2 | 3 | /****************************************************************************** 4 | * Copyright (C) 2009-2016 BIMserver.org 5 | * 6 | * This program is free software: you can redistribute it and/or modify 7 | * it under the terms of the GNU Affero General Public License as 8 | * published by the Free Software Foundation, either version 3 of the 9 | * License, or (at your option) any later version. 10 | * 11 | * This program is distributed in the hope that it will be useful, 12 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 13 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 14 | * GNU Affero General Public License for more details. 15 | * 16 | * You should have received a copy of the GNU Affero General Public License 17 | * along with this program. If not, see {@literal}. 18 | *****************************************************************************/ 19 | 20 | import java.io.BufferedInputStream; 21 | import java.io.ByteArrayInputStream; 22 | import java.io.File; 23 | import java.io.FileInputStream; 24 | import java.io.IOException; 25 | import java.io.InputStream; 26 | import java.util.Vector; 27 | 28 | import antlr.CommonAST; 29 | import antlr.RecognitionException; 30 | import antlr.TokenStreamException; 31 | import antlr.TokenStreamHiddenTokenFilter; 32 | 33 | public class EasyParser { 34 | 35 | /* 36 | * An easy way to parse Express by Stephane Lardet 37 | * (stephane.lardet@nist.gov) 38 | * 39 | * Development of this software was funded by the United States Government, 40 | * and is not subject to copyright. 41 | * 42 | * DISCLAIMER: Recipients of this software assume all responsibility 43 | * associated with its operation, modification, maintenance, and subsequent 44 | * re-distribution. 45 | */ 46 | 47 | private InputStream expin; 48 | 49 | private static final String TOKENOBJECTCLASS = "antlr.CommonHiddenStreamToken"; 50 | 51 | public EasyParser(String filename) throws IOException { 52 | File file; 53 | FileInputStream in = null; 54 | ByteArrayInputStream buff = null; 55 | byte[] fileContent; 56 | int length; 57 | 58 | file = new File(filename); 59 | length = (int) file.length(); 60 | fileContent = new byte[length]; 61 | 62 | in = new FileInputStream(file); 63 | in.read(fileContent); 64 | in.close(); 65 | 66 | buff = new ByteArrayInputStream(fileContent); 67 | buff.mark(length); 68 | expin = buff; 69 | } 70 | 71 | public EasyParser(BufferedInputStream bis) throws IOException { 72 | bis.mark(Integer.MAX_VALUE); 73 | expin = bis; 74 | } 75 | 76 | public EasyParser(Vector filenames) throws IOException { 77 | /* 78 | * put all files in a single buffer and parse them as a file with 79 | * multiple schemas 80 | */ 81 | 82 | FileInputStream in = null; 83 | ByteArrayInputStream buff = null; 84 | byte[] filesContent; 85 | int wlength = 0; 86 | int tlength, length; 87 | int sz = filenames.size(); 88 | File[] fs = new File[sz]; 89 | int[] flength = new int[sz]; 90 | 91 | for (int i = 0; i < sz; i++) { 92 | fs[i] = new File(filenames.elementAt(i)); 93 | flength[i] = (int) fs[i].length(); 94 | wlength += flength[i]; 95 | } 96 | 97 | filesContent = new byte[wlength]; 98 | tlength = 0; 99 | for (int i = 0; i < sz; i++) { 100 | length = flength[i]; 101 | in = new FileInputStream(fs[i]); 102 | in.read(filesContent, tlength, length); 103 | in.close(); 104 | tlength += length; 105 | } 106 | 107 | buff = new ByteArrayInputStream(filesContent); 108 | buff.mark(wlength); 109 | expin = buff; 110 | } 111 | 112 | public CommonAST parse() throws IOException, RecognitionException, TokenStreamException { 113 | ExpressParser parser; 114 | // Scope rootScope; 115 | 116 | parser = createFirstPassParser(); 117 | 118 | /* First pass */ 119 | parser.syntax(); 120 | 121 | /* manage reference and use clauses */ 122 | parser.processExternals(); 123 | 124 | Scope rootScope = parser.rootScope; 125 | 126 | /* second pass initialization */ 127 | parser = createSecondPassParser(rootScope); 128 | 129 | /* second pass */ 130 | parser.syntax(); 131 | 132 | this.expin.close(); 133 | 134 | /* AST returning */ 135 | CommonAST cast = (CommonAST) parser.getAST(); 136 | 137 | return cast; 138 | } 139 | 140 | private ExpressParser createFirstPassParser() { 141 | ExpressLexer lexer = new ExpressLexer(this.expin); 142 | 143 | ExpressParser parser = new ExpressParser(lexer); 144 | 145 | lexer.setParser(parser); 146 | 147 | return parser; 148 | } 149 | 150 | private ExpressParser createSecondPassParser(Scope rootScope) throws IOException { 151 | this.expin.reset(); 152 | 153 | ExpressLexer lexer = new ExpressLexer(this.expin); 154 | lexer.setTokenObjectClass(TOKENOBJECTCLASS); 155 | 156 | TokenStreamHiddenTokenFilter filter = createFilter(lexer); 157 | 158 | ExpressParser parser = new ExpressParser(filter); 159 | lexer.setParser(parser); 160 | 161 | parser.setRootScope(rootScope); 162 | return parser; 163 | } 164 | 165 | private TokenStreamHiddenTokenFilter createFilter(ExpressLexer lexer) { 166 | TokenStreamHiddenTokenFilter filter = new TokenStreamHiddenTokenFilter(lexer); 167 | filter.discard(ExpressParserTokenTypes.COMMENT.getIndex()); 168 | filter.discard(ExpressParserTokenTypes.LINECOMMENT.getIndex()); 169 | filter.discard(ExpressParserTokenTypes.WHERE_CLAUSE.getIndex()); 170 | return filter; 171 | } 172 | } 173 | -------------------------------------------------------------------------------- /BuildingSMARTLibrary/src/net/sourceforge/osexpress/parser/EnumerationType.java: -------------------------------------------------------------------------------- 1 | package net.sourceforge.osexpress.parser; 2 | 3 | /****************************************************************************** 4 | * Copyright (C) 2009-2016 BIMserver.org 5 | * 6 | * This program is free software: you can redistribute it and/or modify 7 | * it under the terms of the GNU Affero General Public License as 8 | * published by the Free Software Foundation, either version 3 of the 9 | * License, or (at your option) any later version. 10 | * 11 | * This program is distributed in the hope that it will be useful, 12 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 13 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 14 | * GNU Affero General Public License for more details. 15 | * 16 | * You should have received a copy of the GNU Affero General Public License 17 | * along with this program. If not, see {@literal}. 18 | *****************************************************************************/ 19 | 20 | import java.util.Vector; 21 | 22 | @SuppressWarnings("all") 23 | class EnumerationType { 24 | 25 | private Vector ids; 26 | public boolean extensible; 27 | public String typename; 28 | public String basedOnName; 29 | 30 | public EnumerationType() { 31 | ids = new Vector(); 32 | } 33 | 34 | public void setTypeName(String name) { 35 | typename = name; 36 | } 37 | 38 | public void setExtensible(boolean ext) { 39 | extensible = ext; 40 | } 41 | 42 | public void setBasedOn(String bo) { 43 | basedOnName = bo; 44 | } 45 | 46 | public void add(String eid) { 47 | ids.add(eid); 48 | } 49 | 50 | public void extendWith(EnumerationType et) { 51 | ids.addAll(et.ids); 52 | } 53 | 54 | public int getCount() { 55 | return ids.size(); 56 | } 57 | 58 | public String getEnumerationId(int index) { 59 | return (String) ids.elementAt(index); 60 | } 61 | } 62 | -------------------------------------------------------------------------------- /BuildingSMARTLibrary/src/net/sourceforge/osexpress/parser/ExpressParserTokenTypes.txt: -------------------------------------------------------------------------------- 1 | // $ANTLR : express.g -> ExpressParserTokenTypes.txt$ 2 | ExpressParser // output token vocab name 3 | CONSTANT_IDENT=4 4 | ENTITY_IDENT=5 5 | FUNCTION_IDENT=6 6 | PROCEDURE_IDENT=7 7 | PARAMETER_IDENT=8 8 | SCHEMA_IDENT=9 9 | TYPE_IDENT=10 10 | VARIABLE_IDENT=11 11 | ENUMERATION_IDENT=12 12 | ATTRIBUTE_IDENT=13 13 | ENTITY_ATTR_IDENT=14 14 | TYPE_ATTR_IDENT=15 15 | ENTITY_VAR_IDENT=16 16 | TYPE_VAR_IDENT=17 17 | ENTITY_PARAM_IDENT=18 18 | TYPE_PARAM_IDENT=19 19 | SUBTYPE_CONSTRAINT_ID=20 20 | ACTUAL_PARAMETER_LIST=21 21 | ADD_LIKE_OP=22 22 | AGGREGATE_INITIALIZER=23 23 | AGGREGATE_SOURCE=24 24 | AGGREGATE_TYPE=25 25 | AGGREGATION_TYPES=26 26 | ALGORITHM_HEAD=27 27 | ALIAS_STMT=28 28 | ARRAY_TYPE=29 29 | ASSIGNMENT_STMT=30 30 | BAG_TYPE=31 31 | BASE_TYPE=32 32 | BINARY_TYPE=33 33 | BOOLEAN_TYPE=34 34 | BOUND_1=35 35 | BOUND_2=36 36 | BOUND_SPEC=37 37 | BUILT_IN_CONSTANT=38 38 | BUILT_IN_FUNCTION=39 39 | BUILT_IN_PROCEDURE=40 40 | CASE_ACTION=41 41 | CASE_LABEL=42 42 | CASE_STMT=43 43 | COMPOUND_STMT=44 44 | CONSTANT_BODY=45 45 | CONSTANT_DECL=46 46 | CONSTANT_FACTOR=47 47 | CONSTANT_ID=48 48 | DECLARATION=49 49 | DOMAIN_RULE=50 50 | ELEMENT=51 51 | ENTITY_HEAD=52 52 | ENTITY_DECL=53 53 | ENTITY_BODY=54 54 | SUBSUPER=55 55 | SUPERTYPE_CONSTRAINT=56 56 | ABSTRACT_SUPERTYPE_DECLARATION=57 57 | SUBTYPE_DECLARATION=58 58 | EXPLICIT_ATTR=59 59 | ATTRIBUTE_DECL=60 60 | ATTRIBUTE_ID=61 61 | QUALIFIED_ATTRIBUTE=62 62 | DERIVE_CLAUSE=63 63 | DERIVED_ATTR=64 64 | INVERSE_CLAUSE=65 65 | INVERSE_ATTR=66 66 | UNIQUE_CLAUSE=67 67 | UNIQUE_RULE=68 68 | REFERENCED_ATTRIBUTE=69 69 | ENTITY_CONSTRUCTOR=70 70 | ENTITY_ID=71 71 | ENUMERATION_REFERENCE=72 72 | ESCAPE_STMT=73 73 | EXPRESSION=74 74 | FACTOR=75 75 | FORMAL_PARAMETER=76 76 | ATTRIBUTE_QUALIFIER=77 77 | FUNCTION_CALL=78 78 | FUNCTION_DECL=79 79 | FUNCTION_HEAD=80 80 | FUNCTION_ID=81 81 | GENERALIZED_TYPES=82 82 | GENERAL_AGGREGATION_TYPES=83 83 | GENERAL_ARRAY_TYPE=84 84 | GENERAL_BAG_TYPE=85 85 | GENERAL_LIST_TYPE=86 86 | GENERAL_REF=87 87 | GENERAL_SET_TYPE=88 88 | GENERIC_TYPE=89 89 | GROUP_QUALIFIER=90 90 | IF_STMT=91 91 | INCREMENT=92 92 | INCREMENT_CONTROL=93 93 | INDEX=94 94 | INDEX_1=95 95 | INDEX_2=96 96 | INDEX_QUALIFIER=97 97 | INTEGER_TYPE=98 98 | INTERVAL=99 99 | INTERVAL_HIGH=100 100 | INTERVAL_ITEM=101 101 | INTERVAL_LOW=102 102 | INTERVAL_OP=103 103 | LABEL=104 104 | LIST_TYPE=105 105 | LITERAL=106 106 | REAL_LITERAL=107 107 | INTEGER_LITERAL=108 108 | STRING_LITERAL=109 109 | LOCAL_DECL=110 110 | LOCAL_VARIABLE=111 111 | LOGICAL_EXPRESSION=112 112 | LOGICAL_LITERAL=113 113 | LOGICAL_TYPE=114 114 | MULTIPLICATION_LIKE_OP=115 115 | NAMED_TYPES=116 116 | NULL_STMT=117 117 | NUMBER_TYPE=118 118 | NUMERIC_EXPRESSION=119 119 | ONE_OF=120 120 | PARAMETER=121 121 | PARAMETER_ID=122 122 | PARAMETER_TYPE=123 123 | POPULATION=124 124 | PRECISION_SPEC=125 125 | PRIMARY=126 126 | PROCEDURE_CALL_STMT=127 127 | PROCEDURE_DECL=128 128 | PROCEDURE_HEAD=129 129 | PROCEDURE_ID=130 130 | QUALIFIABLE_FACTOR=131 131 | QUALIFIER=132 132 | QUERY_EXPRESSION=133 133 | REAL_TYPE=134 134 | REFERENCE_CLAUSE=135 135 | REL_OP=136 136 | REL_OP_EXTENDED=137 137 | REPEAT_CONTROL=138 138 | REPEAT_STMT=139 139 | REPETITION=140 140 | RESOURCE_OR_RENAME=141 141 | RESOURCE_REF=142 142 | RETURN_STMT=143 143 | RULE_DECL=144 144 | RULE_HEAD=145 145 | RULE_ID=146 146 | SCHEMA_ID=147 147 | SCHEMA_BODY=148 148 | SCHEMA_DECL=149 149 | INTERFACE_SPECIFICATION=150 150 | USE_CLAUSE=151 151 | NAMED_TYPE_OR_RENAME=152 152 | SELECTOR=153 153 | SET_TYPE=154 154 | SIMPLE_EXPRESSION=155 155 | SIMPLE_FACTOR=156 156 | SIMPLE_TYPES=157 157 | SKIP_STMT=158 158 | STMT=159 159 | STRING_TYPE=160 160 | SUBTYPE_CONSTRAINT=161 161 | SUPERTYPE_EXPRESSION=162 162 | SUPERTYPE_FACTOR=163 163 | SUPERTYPE_RULE=164 164 | SUPERTYPE_TERM=165 165 | SYNTAX=166 166 | TERM=167 167 | TYPE_DECL=168 168 | UNDERLYING_TYPE=169 169 | CONSTRUCTED_TYPES=170 170 | ENUMERATION_TYPE=171 171 | ENUMERATION_ID=172 172 | SELECT_TYPE=173 173 | TYPE_ID=174 174 | TYPE_LABEL=175 175 | TYPE_LABEL_ID=176 176 | UNARY_OP=177 177 | UNTIL_CONTROL=178 178 | VARIABLE_ID=179 179 | WHERE_CLAUSE=180 180 | WHILE_CONTROL=181 181 | WIDTH=182 182 | WIDTH_SPEC=183 183 | ENTITY_REF=184 184 | TYPE_REF=185 185 | ENUMERATION_REF=186 186 | ATTRIBUTE_REF=187 187 | CONSTANT_REF=188 188 | FUNCTION_REF=189 189 | PARAMETER_REF=190 190 | VARIABLE_REF=191 191 | SCHEMA_REF=192 192 | TYPE_LABEL_REF=193 193 | PROCEDURE_REF=194 194 | SIMPLE_ID=195 195 | ELSE_CLAUSE=196 196 | RENAME_ID=197 197 | ENUMERATION_ITEMS=198 198 | ENUMERATION_EXTENSION=199 199 | SELECT_LIST=200 200 | SELECT_EXTENSION=201 201 | REDECLARED_ATTRIBUTE=202 202 | SUBTYPE_CONSTRAINT_DECL=203 203 | SUBTYPE_CONSTRAINT_HEAD=204 204 | SUBTYPE_CONSTRAINT_BODY=205 205 | ABSTRACT_SUPERTYPE=206 206 | TOTAL_OVER=207 207 | CONCRETE_TYPES=208 208 | GENERIC_ENTITY_TYPE=209 209 | SCHEMA_VERSION_ID=210 210 | LANGUAGE_VERSION_ID=211 211 | LPAREN("(")=212 212 | COMMA(",")=213 213 | RPAREN(")")=214 214 | PLUS("+")=215 215 | MINUS("-")=216 216 | LITERAL_or="or"=217 217 | LITERAL_xor="xor"=218 218 | LBRACK("[")=219 219 | RBRACK("]")=220 220 | LITERAL_aggregate="aggregate"=221 221 | COLON(":")=222 222 | LITERAL_of="of"=223 223 | LITERAL_alias="alias"=224 224 | LITERAL_for="for"=225 225 | IDENT("an identifer")=226 226 | SEMI(";")=227 227 | LITERAL_end_alias="end_alias"=228 228 | LITERAL_array="array"=229 229 | LITERAL_optional="optional"=230 230 | LITERAL_unique="unique"=231 231 | COLEQ(":=")=232 232 | LITERAL_bag="bag"=233 233 | LITERAL_binary="binary"=234 234 | LITERAL_boolean="boolean"=235 235 | LITERAL_const_e="const_e"=236 236 | LITERAL_pi="pi"=237 237 | LITERAL_self="self"=238 238 | QUESTION("?")=239 239 | STAR("*")=240 240 | LITERAL_abs="abs"=241 241 | LITERAL_acos="acos"=242 242 | LITERAL_asin="asin"=243 243 | LITERAL_atan="atan"=244 244 | LITERAL_blength="blength"=245 245 | LITERAL_cos="cos"=246 246 | LITERAL_exists="exists"=247 247 | LITERAL_exp="exp"=248 248 | LITERAL_format="format"=249 249 | LITERAL_hibound="hibound"=250 250 | LITERAL_hiindex="hiindex"=251 251 | LITERAL_length="length"=252 252 | LITERAL_lobound="lobound"=253 253 | LITERAL_loindex="loindex"=254 254 | LITERAL_log="log"=255 255 | "log2"=256 256 | "log10"=257 257 | LITERAL_nvl="nvl"=258 258 | LITERAL_odd="odd"=259 259 | LITERAL_rolesof="rolesof"=260 260 | LITERAL_sin="sin"=261 261 | LITERAL_sizeof="sizeof"=262 262 | LITERAL_sqrt="sqrt"=263 263 | LITERAL_tan="tan"=264 264 | LITERAL_typeof="typeof"=265 265 | LITERAL_usedin="usedin"=266 266 | LITERAL_value="value"=267 267 | LITERAL_value_in="value_in"=268 268 | LITERAL_value_unique="value_unique"=269 269 | LITERAL_insert="insert"=270 270 | LITERAL_remove="remove"=271 271 | LITERAL_case="case"=272 272 | LITERAL_otherwise="otherwise"=273 273 | LITERAL_end_case="end_case"=274 274 | LITERAL_begin="begin"=275 275 | LITERAL_end="end"=276 276 | LITERAL_constant="constant"=277 277 | LITERAL_end_constant="end_constant"=278 278 | LITERAL_entity="entity"=279 279 | LITERAL_abstract="abstract"=280 280 | LITERAL_end_entity="end_entity"=281 281 | LITERAL_supertype="supertype"=282 282 | LITERAL_subtype="subtype"=283 283 | LITERAL_end_subtype_constraint="end_subtype_constraint"=284 284 | LITERAL_subtype_constraint="subtype_constraint"=285 285 | LITERAL_total_over="total_over"=286 286 | LITERAL_renamed="renamed"=287 287 | LITERAL_derive="derive"=288 288 | LITERAL_inverse="inverse"=289 289 | LITERAL_set="set"=290 290 | DOT(".")=291 291 | LITERAL_escape="escape"=292 292 | DOUBLESTAR("double star")=293 293 | LITERAL_end_function="end_function"=294 294 | LITERAL_function="function"=295 295 | LITERAL_list="list"=296 296 | LITERAL_generic="generic"=297 297 | LITERAL_generic_entity="generic_entity"=298 298 | BACKSLASH("backslash")=299 299 | LITERAL_if="if"=300 300 | LITERAL_then="then"=301 301 | LITERAL_end_if="end_if"=302 302 | LITERAL_else="else"=303 303 | LITERAL_to="to"=304 304 | LITERAL_by="by"=305 305 | LITERAL_integer="integer"=306 306 | LCURLY("{")=307 307 | RCURLY("}")=308 308 | LT("<")=309 309 | LE("<=")=310 310 | INT("an integer value")=311 311 | FLOAT("an floating point value")=312 312 | STRING("a string literal")=313 313 | LITERAL_local="local"=314 314 | LITERAL_end_local="end_local"=315 315 | LITERAL_false="false"=316 316 | LITERAL_true="true"=317 317 | LITERAL_unknown="unknown"=318 318 | LITERAL_logical="logical"=319 319 | DIVSIGN("/")=320 320 | LITERAL_div="div"=321 321 | LITERAL_mod="mod"=322 322 | LITERAL_and="and"=323 323 | DOUBLEBAR("double bar")=324 324 | LITERAL_number="number"=325 325 | LITERAL_oneof="oneof"=326 326 | LITERAL_end_procedure="end_procedure"=327 327 | LITERAL_procedure="procedure"=328 328 | LITERAL_var="var"=329 329 | LITERAL_query="query"=330 330 | LTSTAR("less than star")=331 331 | BAR("|")=332 332 | LITERAL_real="real"=333 333 | LITERAL_reference="reference"=334 334 | LITERAL_from="from"=335 335 | GT(">")=336 336 | GE(">=")=337 337 | LTGT("less-than/greater-than thing")=338 338 | ASSIGN("=")=339 339 | COLLTGT(":<>:")=340 340 | COLEQCOL(":=:")=341 341 | LITERAL_in="in"=342 342 | LITERAL_like="like"=343 343 | LITERAL_repeat="repeat"=344 344 | LITERAL_end_repeat="end_repeat"=345 345 | LITERAL_as="as"=346 346 | LITERAL_return="return"=347 347 | LITERAL_end_rule="end_rule"=348 348 | LITERAL_rule="rule"=349 349 | LITERAL_schema="schema"=350 350 | LITERAL_end_schema="end_schema"=351 351 | LITERAL_use="use"=352 352 | LITERAL_skip="skip"=353 353 | LITERAL_string="string"=354 354 | LITERAL_andor="andor"=355 355 | LANG_VERSION("language version id")=356 356 | LITERAL_type="type"=357 357 | LITERAL_end_type="end_type"=358 358 | LITERAL_extensible="extensible"=359 359 | LITERAL_enumeration="enumeration"=360 360 | LITERAL_based_on="based_on"=361 361 | LITERAL_with="with"=362 362 | LITERAL_select="select"=363 363 | LITERAL_not="not"=364 364 | LITERAL_until="until"=365 365 | LITERAL_where="where"=366 366 | LITERAL_while="while"=367 367 | LITERAL_fixed="fixed"=368 368 | COMMENT("a comment")=369 369 | LINECOMMENT("a EXPRESS one line comment")=370 370 | AMPERSAND("&")=371 371 | AT("@")=372 372 | WS("white space")=373 373 | DIGIT("a digit")=374 374 | -------------------------------------------------------------------------------- /BuildingSMARTLibrary/src/net/sourceforge/osexpress/parser/ExternalId.java: -------------------------------------------------------------------------------- 1 | package net.sourceforge.osexpress.parser; 2 | 3 | /****************************************************************************** 4 | * Copyright (C) 2009-2016 BIMserver.org 5 | * 6 | * This program is free software: you can redistribute it and/or modify 7 | * it under the terms of the GNU Affero General Public License as 8 | * published by the Free Software Foundation, either version 3 of the 9 | * License, or (at your option) any later version. 10 | * 11 | * This program is distributed in the hope that it will be useful, 12 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 13 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 14 | * GNU Affero General Public License for more details. 15 | * 16 | * You should have received a copy of the GNU Affero General Public License 17 | * along with this program. If not, see {@literal}. 18 | *****************************************************************************/ 19 | 20 | public class ExternalId { 21 | 22 | /* 23 | * may represent an id of a schema referenced or used by another schema with 24 | * its new name if it exists/ may also represent a couple id-type 25 | */ 26 | 27 | public String schema; /* schema from which this element is referenced/used */ 28 | public String id; 29 | public String rename; 30 | public ExpressParserTokenTypes type; 31 | 32 | public ExternalId(String id) { 33 | this.id = id; 34 | } 35 | 36 | public ExternalId(String id, ExpressParserTokenTypes type) { 37 | this.id = id; 38 | this.type = type; 39 | } 40 | 41 | public void setSchema(String s) { 42 | schema = s; 43 | } 44 | 45 | public void setRename(String rename) { 46 | this.rename = rename; 47 | } 48 | } 49 | -------------------------------------------------------------------------------- /BuildingSMARTLibrary/src/nl/tue/buildingsmart/emf/DerivedReader.java: -------------------------------------------------------------------------------- 1 | package nl.tue.buildingsmart.emf; 2 | 3 | /****************************************************************************** 4 | * Copyright (C) 2009-2016 BIMserver.org 5 | * 6 | * This program is free software: you can redistribute it and/or modify 7 | * it under the terms of the GNU Affero General Public License as 8 | * published by the Free Software Foundation, either version 3 of the 9 | * License, or (at your option) any later version. 10 | * 11 | * This program is distributed in the hope that it will be useful, 12 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 13 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 14 | * GNU Affero General Public License for more details. 15 | * 16 | * You should have received a copy of the GNU Affero General Public License 17 | * along with this program. If not, see {@literal}. 18 | *****************************************************************************/ 19 | 20 | import java.io.BufferedReader; 21 | import java.io.File; 22 | import java.io.FileInputStream; 23 | import java.io.FileNotFoundException; 24 | import java.io.IOException; 25 | import java.io.InputStream; 26 | import java.io.InputStreamReader; 27 | 28 | import org.slf4j.Logger; 29 | import org.slf4j.LoggerFactory; 30 | 31 | import nl.tue.buildingsmart.schema.BaseType; 32 | import nl.tue.buildingsmart.schema.DerivedAttribute2; 33 | import nl.tue.buildingsmart.schema.EntityDefinition; 34 | import nl.tue.buildingsmart.schema.SchemaDefinition; 35 | 36 | public class DerivedReader { 37 | private static final Logger LOGGER = LoggerFactory.getLogger(DerivedReader.class); 38 | 39 | public DerivedReader(InputStream inputStream, SchemaDefinition schema) { 40 | try { 41 | BufferedReader reader = new BufferedReader(new InputStreamReader(inputStream)); 42 | String line = reader.readLine(); 43 | String entityName = null; 44 | boolean derive = false; 45 | while (line != null) { 46 | if (line.startsWith("ENTITY ")) { 47 | entityName = line.substring(7); 48 | if (entityName.endsWith(";")) { 49 | entityName = entityName.substring(0, entityName.length() - 1); 50 | } 51 | derive = false; 52 | } else if (line.startsWith(" DERIVE")) { 53 | if (entityName != null) { 54 | derive = true; 55 | } 56 | } else if (line.startsWith("END_ENTITY")) { 57 | entityName = null; 58 | derive = false; 59 | } else if (line.startsWith(" WHERE")) { 60 | derive = false; 61 | } else if (line.startsWith(" INVERSE")) { 62 | derive = false; 63 | } else if (derive == true) { 64 | if (line.indexOf(":") != -1) { 65 | String derivedName = line.substring(0, line.indexOf(":")).trim(); 66 | if (derivedName.indexOf("SELF\\") != -1) { 67 | derivedName = derivedName.substring(derivedName.indexOf(".") + 1); 68 | } 69 | String expressCode = line.substring(line.indexOf(":=") + 2); 70 | if (line.trim().endsWith(",")) { 71 | expressCode += reader.readLine(); 72 | } 73 | String type = line.substring(line.indexOf(":") + 1); 74 | type = type.substring(0, type.indexOf(":=")).trim(); 75 | BaseType entityBN2 = null; 76 | boolean collection = false; 77 | if (type.startsWith("LIST") || type.startsWith("ARRAY") || type.startsWith("SET")) { 78 | type = type.substring(type.indexOf(" OF ") + 4).trim(); 79 | if (type.startsWith("LIST") || type.startsWith("ARRAY") || type.startsWith("SET")) { 80 | type = type.substring(type.indexOf(" OF ") + 4).trim(); 81 | } 82 | collection = true; 83 | } 84 | entityBN2 = schema.getEntityBN(type); 85 | if (entityBN2 == null) { 86 | entityBN2 = schema.getBaseTypeBN(type); 87 | } 88 | if (entityBN2 == null) { 89 | System.out.println("Not found: " + type); 90 | } 91 | DerivedAttribute2 derivedAttribute2 = new DerivedAttribute2(derivedName, entityBN2, expressCode, collection, false); 92 | EntityDefinition entityBN = schema.getEntityBN(entityName); 93 | if (entityBN == null) { 94 | System.out.println("unknown entity " + entityName); 95 | } else { 96 | entityBN.addDerived(derivedAttribute2, true); 97 | } 98 | } 99 | } 100 | line = reader.readLine(); 101 | } 102 | } catch (FileNotFoundException e) { 103 | LOGGER.error("", e); 104 | } catch (IOException e) { 105 | LOGGER.error("", e); 106 | } 107 | } 108 | 109 | public DerivedReader(File schemaFile, SchemaDefinition schemaDefinition) throws FileNotFoundException { 110 | this(new FileInputStream(schemaFile), schemaDefinition); 111 | } 112 | } -------------------------------------------------------------------------------- /BuildingSMARTLibrary/src/nl/tue/buildingsmart/emf/SchemaLoader.java: -------------------------------------------------------------------------------- 1 | package nl.tue.buildingsmart.emf; 2 | 3 | /****************************************************************************** 4 | * Copyright (C) 2009-2016 BIMserver.org 5 | * 6 | * This program is free software: you can redistribute it and/or modify 7 | * it under the terms of the GNU Affero General Public License as 8 | * published by the Free Software Foundation, either version 3 of the 9 | * License, or (at your option) any later version. 10 | * 11 | * This program is distributed in the hope that it will be useful, 12 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 13 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 14 | * GNU Affero General Public License for more details. 15 | * 16 | * You should have received a copy of the GNU Affero General Public License 17 | * along with this program. If not, see {@literal}. 18 | *****************************************************************************/ 19 | 20 | import java.io.ByteArrayInputStream; 21 | import java.io.ByteArrayOutputStream; 22 | 23 | import java.io.File; 24 | import java.io.IOException; 25 | import java.io.InputStream; 26 | 27 | import org.apache.commons.io.IOUtils; 28 | import org.slf4j.Logger; 29 | import org.slf4j.LoggerFactory; 30 | 31 | import nl.tue.buildingsmart.express.parser.ExpressSchemaParser; 32 | import nl.tue.buildingsmart.schema.SchemaDefinition; 33 | 34 | public class SchemaLoader { 35 | private static final Logger LOGGER = LoggerFactory.getLogger(SchemaLoader.class); 36 | public static final File DEFAULT_SCHEMA_FILE = new File("../buildingSMARTLibrary/schema" + File.separator + "IFC2X3_TC1.exp"); 37 | 38 | // public static void main(String[] args) { 39 | // Thread.setDefaultUncaughtExceptionHandler(new UncaughtExceptionHandler() { 40 | // @Override 41 | // public void uncaughtException(Thread arg0, Throwable arg1) { 42 | // arg1.printStackTrace(); 43 | // } 44 | // }); 45 | // loadDefaultSchema(); 46 | // } 47 | 48 | private SchemaLoader() { 49 | } 50 | 51 | public static SchemaDefinition loadIfc2x3tc1() throws IOException { 52 | return load("IFC2X3_TC1.exp"); 53 | } 54 | 55 | public static SchemaDefinition loadIfc4() throws IOException { 56 | return load("IFC4_ADD2.exp"); 57 | } 58 | 59 | public static SchemaDefinition loadIfc4x3add2() throws IOException { 60 | return load("IFC4X3_ADD2.exp"); 61 | } 62 | 63 | private static SchemaDefinition load(String name) throws IOException { 64 | InputStream inputStream = SchemaLoader.class.getResourceAsStream("/schema/" + name); 65 | if (inputStream != null) { 66 | ByteArrayOutputStream baos = new ByteArrayOutputStream(); 67 | IOUtils.copy(inputStream, baos); 68 | 69 | SchemaDefinition schema = null; 70 | 71 | ExpressSchemaParser schemaParser = new ExpressSchemaParser(new ByteArrayInputStream(baos.toByteArray())); 72 | schemaParser.parse(); 73 | schema = schemaParser.getSchema(); 74 | schema.setSchemaData(baos.toByteArray()); 75 | 76 | new DerivedReader(new ByteArrayInputStream(baos.toByteArray()), schema); 77 | if (schema != null) { 78 | LOGGER.info("IFC-Schema successfully loaded from " + name); 79 | } 80 | return schema; 81 | } else { 82 | LOGGER.error("Schema not found: " + name); 83 | } 84 | return null; 85 | } 86 | 87 | // public static SchemaDefinition loadDefaultSchema() { 88 | // return loadSchema(DEFAULT_SCHEMA_FILE); 89 | // } 90 | // 91 | // public static SchemaDefinition loadSchema(InputStream inputStream) { 92 | // ExpressSchemaParser schemaParser = new ExpressSchemaParser(inputStream); 93 | // schemaParser.parse(); 94 | // SchemaDefinition schema = schemaParser.getSchema(); 95 | // try { 96 | // new DerivedReader(schemaFile, schema); 97 | // } catch (FileNotFoundException e) { 98 | // LOGGER.error("", e); 99 | // } 100 | // return schema; 101 | // } 102 | } 103 | -------------------------------------------------------------------------------- /BuildingSMARTLibrary/src/nl/tue/buildingsmart/express/dictionary/Namespaces.java: -------------------------------------------------------------------------------- 1 | package nl.tue.buildingsmart.express.dictionary; 2 | 3 | /****************************************************************************** 4 | * Copyright (C) 2009-2016 BIMserver.org 5 | * 6 | * This program is free software: you can redistribute it and/or modify 7 | * it under the terms of the GNU Affero General Public License as 8 | * published by the Free Software Foundation, either version 3 of the 9 | * License, or (at your option) any later version. 10 | * 11 | * This program is distributed in the hope that it will be useful, 12 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 13 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 14 | * GNU Affero General Public License for more details. 15 | * 16 | * You should have received a copy of the GNU Affero General Public License 17 | * along with this program. If not, see {@literal}. 18 | *****************************************************************************/ 19 | 20 | import java.io.File; 21 | import java.io.IOException; 22 | import java.util.ArrayList; 23 | import java.util.HashMap; 24 | import java.util.Iterator; 25 | import java.util.List; 26 | import java.util.Set; 27 | 28 | import org.apache.xmlbeans.XmlException; 29 | import org.iai.ifcNamespaces.Namespace; 30 | import org.iai.ifcNamespaces.NamespacesDocument; 31 | import org.slf4j.Logger; 32 | import org.slf4j.LoggerFactory; 33 | 34 | @SuppressWarnings("all") 35 | public class Namespaces { 36 | private static final Logger LOGGER = LoggerFactory.getLogger(Namespaces.class); 37 | 38 | // XML file for where the Namespaces are stored 39 | private File nsConfFile; 40 | // XMLBeans instance of reader/writer for config file 41 | private NamespacesDocument ifcNamespaces; 42 | 43 | // whether or not only on namespace for all entries exist 44 | private boolean singleNamespace = false; 45 | 46 | // a list of namespaces with a list of Strings that 47 | // belong to the namespace 48 | private HashMap> namespaces; 49 | 50 | // Hashmap EXPRESS name, namespace 51 | private HashMap EXPRESSnames; 52 | 53 | private String defaultNS = ""; 54 | 55 | public Namespaces(String filename) { 56 | EXPRESSnames = new HashMap(); 57 | nsConfFile = new File(filename); 58 | 59 | namespaces = new HashMap>(); 60 | if (!nsConfFile.exists()) { 61 | System.out.println("no existing file provided, using '" + filename + "' as namespace"); 62 | singleNamespace = true; 63 | defaultNS = filename; 64 | namespaces.put(filename, new ArrayList()); 65 | } 66 | 67 | } 68 | 69 | public boolean readNSConfig() { 70 | if (nsConfFile.canRead() && !singleNamespace) { 71 | try { 72 | ifcNamespaces = NamespacesDocument.Factory.parse(nsConfFile); 73 | Namespace[] nsArray = ifcNamespaces.getNamespaces().getNamespaceArray(); 74 | for (int i = 0; i < nsArray.length; i++) { 75 | Namespace ns = nsArray[i]; 76 | List objects = new ArrayList(); 77 | if (ns.getDefinedtypes() != null) 78 | objects.addAll(toStringList(ns.getDefinedtypes().getDefinedtypeArray())); 79 | if (ns.getEntites() != null) 80 | objects.addAll(toStringList(ns.getEntites().getEntityArray())); 81 | if (ns.getEnumerations() != null) 82 | objects.addAll(toStringList(ns.getEnumerations().getEnumerationArray())); 83 | if (ns.getSelects() != null) 84 | objects.addAll(toStringList(ns.getSelects().getSelectArray())); 85 | 86 | // add all objects to HashMap for easy retrieval 87 | String nsName = ns.getName(); 88 | Iterator iter = objects.iterator(); 89 | while (iter.hasNext()) { 90 | addNamespaceEntry((String) iter.next(), nsName); 91 | } 92 | 93 | // store the namespace with all its contents in an 94 | // convinient structure 95 | namespaces.put(nsName, objects); 96 | } 97 | 98 | return true; 99 | } catch (XmlException e) { 100 | LOGGER.error("", e); 101 | } catch (IOException e) { 102 | LOGGER.error("", e); 103 | } 104 | } 105 | return false; 106 | } 107 | 108 | /** 109 | * gets the namespace for an EXPRESS object such as an ENTITY, TYPE, SELECT 110 | * etc. 111 | * 112 | * @param objName 113 | * name of the ENTITY/TYPE/SELECT 114 | * @return name of the namespace 115 | */ 116 | public String getNS(String objName) { 117 | if (singleNamespace) 118 | return defaultNS; 119 | return EXPRESSnames.get(objName); 120 | } 121 | 122 | private List toStringList(String[] inArray) { 123 | List sl = new ArrayList(); 124 | for (int i = 0; i < inArray.length; i++) { 125 | sl.add(inArray[i]); 126 | } 127 | return sl; 128 | } 129 | 130 | public void addNamespaceEntry(String EXPRESSname, String namespace) { 131 | EXPRESSnames.put(EXPRESSname, namespace); 132 | 133 | } 134 | 135 | public List getNamespaceMembers(String namespace){ 136 | return namespaces.get(namespace); 137 | } 138 | 139 | public Set getNamespaces() { 140 | return namespaces.keySet(); 141 | } 142 | 143 | } -------------------------------------------------------------------------------- /BuildingSMARTLibrary/src/nl/tue/buildingsmart/express/parser/Express2DictWalkerTokenTypes.txt: -------------------------------------------------------------------------------- 1 | // $ANTLR 2.7.7 (20060930): Express2SDAI.g -> Express2DictWalkerTokenTypes.txt$ 2 | Express2DictWalker // output token vocab name 3 | CONSTANT_IDENT=4 4 | ENTITY_IDENT=5 5 | FUNCTION_IDENT=6 6 | PROCEDURE_IDENT=7 7 | PARAMETER_IDENT=8 8 | SCHEMA_IDENT=9 9 | TYPE_IDENT=10 10 | VARIABLE_IDENT=11 11 | ENUMERATION_IDENT=12 12 | ATTRIBUTE_IDENT=13 13 | ENTITY_ATTR_IDENT=14 14 | TYPE_ATTR_IDENT=15 15 | ENTITY_VAR_IDENT=16 16 | TYPE_VAR_IDENT=17 17 | ENTITY_PARAM_IDENT=18 18 | TYPE_PARAM_IDENT=19 19 | SUBTYPE_CONSTRAINT_ID=20 20 | ACTUAL_PARAMETER_LIST=21 21 | ADD_LIKE_OP=22 22 | AGGREGATE_INITIALIZER=23 23 | AGGREGATE_SOURCE=24 24 | AGGREGATE_TYPE=25 25 | AGGREGATION_TYPES=26 26 | ALGORITHM_HEAD=27 27 | ALIAS_STMT=28 28 | ARRAY_TYPE=29 29 | ASSIGNMENT_STMT=30 30 | BAG_TYPE=31 31 | BASE_TYPE=32 32 | BINARY_TYPE=33 33 | BOOLEAN_TYPE=34 34 | BOUND_1=35 35 | BOUND_2=36 36 | BOUND_SPEC=37 37 | BUILT_IN_CONSTANT=38 38 | BUILT_IN_FUNCTION=39 39 | BUILT_IN_PROCEDURE=40 40 | CASE_ACTION=41 41 | CASE_LABEL=42 42 | CASE_STMT=43 43 | COMPOUND_STMT=44 44 | CONSTANT_BODY=45 45 | CONSTANT_DECL=46 46 | CONSTANT_FACTOR=47 47 | CONSTANT_ID=48 48 | DECLARATION=49 49 | DOMAIN_RULE=50 50 | ELEMENT=51 51 | ENTITY_HEAD=52 52 | ENTITY_DECL=53 53 | ENTITY_BODY=54 54 | SUBSUPER=55 55 | SUPERTYPE_CONSTRAINT=56 56 | ABSTRACT_SUPERTYPE_DECLARATION=57 57 | SUBTYPE_DECLARATION=58 58 | EXPLICIT_ATTR=59 59 | ATTRIBUTE_DECL=60 60 | ATTRIBUTE_ID=61 61 | QUALIFIED_ATTRIBUTE=62 62 | DERIVE_CLAUSE=63 63 | DERIVED_ATTR=64 64 | INVERSE_CLAUSE=65 65 | INVERSE_ATTR=66 66 | UNIQUE_CLAUSE=67 67 | UNIQUE_RULE=68 68 | REFERENCED_ATTRIBUTE=69 69 | ENTITY_CONSTRUCTOR=70 70 | ENTITY_ID=71 71 | ENUMERATION_REFERENCE=72 72 | ESCAPE_STMT=73 73 | EXPRESSION=74 74 | FACTOR=75 75 | FORMAL_PARAMETER=76 76 | ATTRIBUTE_QUALIFIER=77 77 | FUNCTION_CALL=78 78 | FUNCTION_DECL=79 79 | FUNCTION_HEAD=80 80 | FUNCTION_ID=81 81 | GENERALIZED_TYPES=82 82 | GENERAL_AGGREGATION_TYPES=83 83 | GENERAL_ARRAY_TYPE=84 84 | GENERAL_BAG_TYPE=85 85 | GENERAL_LIST_TYPE=86 86 | GENERAL_REF=87 87 | GENERAL_SET_TYPE=88 88 | GENERIC_TYPE=89 89 | GROUP_QUALIFIER=90 90 | IF_STMT=91 91 | INCREMENT=92 92 | INCREMENT_CONTROL=93 93 | INDEX=94 94 | INDEX_1=95 95 | INDEX_2=96 96 | INDEX_QUALIFIER=97 97 | INTEGER_TYPE=98 98 | INTERVAL=99 99 | INTERVAL_HIGH=100 100 | INTERVAL_ITEM=101 101 | INTERVAL_LOW=102 102 | INTERVAL_OP=103 103 | LABEL=104 104 | LIST_TYPE=105 105 | LITERAL=106 106 | REAL_LITERAL=107 107 | INTEGER_LITERAL=108 108 | STRING_LITERAL=109 109 | LOCAL_DECL=110 110 | LOCAL_VARIABLE=111 111 | LOGICAL_EXPRESSION=112 112 | LOGICAL_LITERAL=113 113 | LOGICAL_TYPE=114 114 | MULTIPLICATION_LIKE_OP=115 115 | NAMED_TYPES=116 116 | NULL_STMT=117 117 | NUMBER_TYPE=118 118 | NUMERIC_EXPRESSION=119 119 | ONE_OF=120 120 | PARAMETER=121 121 | PARAMETER_ID=122 122 | PARAMETER_TYPE=123 123 | POPULATION=124 124 | PRECISION_SPEC=125 125 | PRIMARY=126 126 | PROCEDURE_CALL_STMT=127 127 | PROCEDURE_DECL=128 128 | PROCEDURE_HEAD=129 129 | PROCEDURE_ID=130 130 | QUALIFIABLE_FACTOR=131 131 | QUALIFIER=132 132 | QUERY_EXPRESSION=133 133 | REAL_TYPE=134 134 | REFERENCE_CLAUSE=135 135 | REL_OP=136 136 | REL_OP_EXTENDED=137 137 | REPEAT_CONTROL=138 138 | REPEAT_STMT=139 139 | REPETITION=140 140 | RESOURCE_OR_RENAME=141 141 | RESOURCE_REF=142 142 | RETURN_STMT=143 143 | RULE_DECL=144 144 | RULE_HEAD=145 145 | RULE_ID=146 146 | SCHEMA_ID=147 147 | SCHEMA_BODY=148 148 | SCHEMA_DECL=149 149 | INTERFACE_SPECIFICATION=150 150 | USE_CLAUSE=151 151 | NAMED_TYPE_OR_RENAME=152 152 | SELECTOR=153 153 | SET_TYPE=154 154 | SIMPLE_EXPRESSION=155 155 | SIMPLE_FACTOR=156 156 | SIMPLE_TYPES=157 157 | SKIP_STMT=158 158 | STMT=159 159 | STRING_TYPE=160 160 | SUBTYPE_CONSTRAINT=161 161 | SUPERTYPE_EXPRESSION=162 162 | SUPERTYPE_FACTOR=163 163 | SUPERTYPE_RULE=164 164 | SUPERTYPE_TERM=165 165 | SYNTAX=166 166 | TERM=167 167 | TYPE_DECL=168 168 | UNDERLYING_TYPE=169 169 | CONSTRUCTED_TYPES=170 170 | ENUMERATION_TYPE=171 171 | ENUMERATION_ID=172 172 | SELECT_TYPE=173 173 | TYPE_ID=174 174 | TYPE_LABEL=175 175 | TYPE_LABEL_ID=176 176 | UNARY_OP=177 177 | UNTIL_CONTROL=178 178 | VARIABLE_ID=179 179 | WHERE_CLAUSE=180 180 | WHILE_CONTROL=181 181 | WIDTH=182 182 | WIDTH_SPEC=183 183 | ENTITY_REF=184 184 | TYPE_REF=185 185 | ENUMERATION_REF=186 186 | ATTRIBUTE_REF=187 187 | CONSTANT_REF=188 188 | FUNCTION_REF=189 189 | PARAMETER_REF=190 190 | VARIABLE_REF=191 191 | SCHEMA_REF=192 192 | TYPE_LABEL_REF=193 193 | PROCEDURE_REF=194 194 | SIMPLE_ID=195 195 | ELSE_CLAUSE=196 196 | RENAME_ID=197 197 | ENUMERATION_ITEMS=198 198 | ENUMERATION_EXTENSION=199 199 | SELECT_LIST=200 200 | SELECT_EXTENSION=201 201 | REDECLARED_ATTRIBUTE=202 202 | SUBTYPE_CONSTRAINT_DECL=203 203 | SUBTYPE_CONSTRAINT_HEAD=204 204 | SUBTYPE_CONSTRAINT_BODY=205 205 | ABSTRACT_SUPERTYPE=206 206 | TOTAL_OVER=207 207 | CONCRETE_TYPES=208 208 | GENERIC_ENTITY_TYPE=209 209 | SCHEMA_VERSION_ID=210 210 | LANGUAGE_VERSION_ID=211 211 | LPAREN("(")=212 212 | COMMA(",")=213 213 | RPAREN(")")=214 214 | PLUS("+")=215 215 | MINUS("-")=216 216 | LITERAL_or="or"=217 217 | LITERAL_xor="xor"=218 218 | LBRACK("[")=219 219 | RBRACK("]")=220 220 | LITERAL_aggregate="aggregate"=221 221 | COLON(":")=222 222 | LITERAL_of="of"=223 223 | LITERAL_alias="alias"=224 224 | LITERAL_for="for"=225 225 | IDENT("an identifer")=226 226 | SEMI(";")=227 227 | LITERAL_end_alias="end_alias"=228 228 | LITERAL_array="array"=229 229 | LITERAL_optional="optional"=230 230 | LITERAL_unique="unique"=231 231 | COLEQ(":=")=232 232 | LITERAL_bag="bag"=233 233 | LITERAL_binary="binary"=234 234 | LITERAL_boolean="boolean"=235 235 | LITERAL_const_e="const_e"=236 236 | LITERAL_pi="pi"=237 237 | LITERAL_self="self"=238 238 | QUESTION("?")=239 239 | STAR("*")=240 240 | LITERAL_abs="abs"=241 241 | LITERAL_acos="acos"=242 242 | LITERAL_asin="asin"=243 243 | LITERAL_atan="atan"=244 244 | LITERAL_blength="blength"=245 245 | LITERAL_cos="cos"=246 246 | LITERAL_exists="exists"=247 247 | LITERAL_exp="exp"=248 248 | LITERAL_format="format"=249 249 | LITERAL_hibound="hibound"=250 250 | LITERAL_hiindex="hiindex"=251 251 | LITERAL_length="length"=252 252 | LITERAL_lobound="lobound"=253 253 | LITERAL_loindex="loindex"=254 254 | LITERAL_log="log"=255 255 | "log2"=256 256 | "log10"=257 257 | LITERAL_nvl="nvl"=258 258 | LITERAL_odd="odd"=259 259 | LITERAL_rolesof="rolesof"=260 260 | LITERAL_sin="sin"=261 261 | LITERAL_sizeof="sizeof"=262 262 | LITERAL_sqrt="sqrt"=263 263 | LITERAL_tan="tan"=264 264 | LITERAL_typeof="typeof"=265 265 | LITERAL_usedin="usedin"=266 266 | LITERAL_value="value"=267 267 | LITERAL_value_in="value_in"=268 268 | LITERAL_value_unique="value_unique"=269 269 | LITERAL_insert="insert"=270 270 | LITERAL_remove="remove"=271 271 | LITERAL_case="case"=272 272 | LITERAL_otherwise="otherwise"=273 273 | LITERAL_end_case="end_case"=274 274 | LITERAL_begin="begin"=275 275 | LITERAL_end="end"=276 276 | LITERAL_constant="constant"=277 277 | LITERAL_end_constant="end_constant"=278 278 | LITERAL_entity="entity"=279 279 | LITERAL_abstract="abstract"=280 280 | LITERAL_end_entity="end_entity"=281 281 | LITERAL_supertype="supertype"=282 282 | LITERAL_subtype="subtype"=283 283 | LITERAL_end_subtype_constraint="end_subtype_constraint"=284 284 | LITERAL_subtype_constraint="subtype_constraint"=285 285 | LITERAL_total_over="total_over"=286 286 | LITERAL_renamed="renamed"=287 287 | LITERAL_derive="derive"=288 288 | LITERAL_inverse="inverse"=289 289 | LITERAL_set="set"=290 290 | DOT(".")=291 291 | LITERAL_escape="escape"=292 292 | DOUBLESTAR("double star")=293 293 | LITERAL_end_function="end_function"=294 294 | LITERAL_function="function"=295 295 | LITERAL_list="list"=296 296 | LITERAL_generic="generic"=297 297 | LITERAL_generic_entity="generic_entity"=298 298 | BACKSLASH("backslash")=299 299 | LITERAL_if="if"=300 300 | LITERAL_then="then"=301 301 | LITERAL_end_if="end_if"=302 302 | LITERAL_else="else"=303 303 | LITERAL_to="to"=304 304 | LITERAL_by="by"=305 305 | LITERAL_integer="integer"=306 306 | LCURLY("{")=307 307 | RCURLY("}")=308 308 | LT("<")=309 309 | LE("<=")=310 310 | INT("an integer value")=311 311 | FLOAT("an floating point value")=312 312 | STRING("a string literal")=313 313 | LITERAL_local="local"=314 314 | LITERAL_end_local="end_local"=315 315 | LITERAL_false="false"=316 316 | LITERAL_true="true"=317 317 | LITERAL_unknown="unknown"=318 318 | LITERAL_logical="logical"=319 319 | DIVSIGN("/")=320 320 | LITERAL_div="div"=321 321 | LITERAL_mod="mod"=322 322 | LITERAL_and="and"=323 323 | DOUBLEBAR("double bar")=324 324 | LITERAL_number="number"=325 325 | LITERAL_oneof="oneof"=326 326 | LITERAL_end_procedure="end_procedure"=327 327 | LITERAL_procedure="procedure"=328 328 | LITERAL_var="var"=329 329 | LITERAL_query="query"=330 330 | LTSTAR("less than star")=331 331 | BAR("|")=332 332 | LITERAL_real="real"=333 333 | LITERAL_reference="reference"=334 334 | LITERAL_from="from"=335 335 | GT(">")=336 336 | GE(">=")=337 337 | LTGT("less-than/greater-than thing")=338 338 | ASSIGN("=")=339 339 | COLLTGT(":<>:")=340 340 | COLEQCOL(":=:")=341 341 | LITERAL_in="in"=342 342 | LITERAL_like="like"=343 343 | LITERAL_repeat="repeat"=344 344 | LITERAL_end_repeat="end_repeat"=345 345 | LITERAL_as="as"=346 346 | LITERAL_return="return"=347 347 | LITERAL_end_rule="end_rule"=348 348 | LITERAL_rule="rule"=349 349 | LITERAL_schema="schema"=350 350 | LITERAL_end_schema="end_schema"=351 351 | LITERAL_use="use"=352 352 | LITERAL_skip="skip"=353 353 | LITERAL_string="string"=354 354 | LITERAL_andor="andor"=355 355 | LANG_VERSION("language version id")=356 356 | LITERAL_type="type"=357 357 | LITERAL_end_type="end_type"=358 358 | LITERAL_extensible="extensible"=359 359 | LITERAL_enumeration="enumeration"=360 360 | LITERAL_based_on="based_on"=361 361 | LITERAL_with="with"=362 362 | LITERAL_select="select"=363 363 | LITERAL_not="not"=364 364 | LITERAL_until="until"=365 365 | LITERAL_where="where"=366 366 | LITERAL_while="while"=367 367 | LITERAL_fixed="fixed"=368 368 | COMMENT("a comment")=369 369 | LINECOMMENT("a EXPRESS one line comment")=370 370 | AMPERSAND("&")=371 371 | AT("@")=372 372 | WS("white space")=373 373 | DIGIT("a digit")=374 374 | "SELF\\"=375 375 | "."=376 376 | LITERAL_=""=377 377 | -------------------------------------------------------------------------------- /BuildingSMARTLibrary/src/nl/tue/buildingsmart/express/parser/ExpressParserTokenTypes.txt: -------------------------------------------------------------------------------- 1 | // $ANTLR 2.7.2: express.g -> ExpressParserTokenTypes.txt$ 2 | ExpressParser // output token vocab name 3 | CONSTANT_IDENT=4 4 | ENTITY_IDENT=5 5 | FUNCTION_IDENT=6 6 | PROCEDURE_IDENT=7 7 | PARAMETER_IDENT=8 8 | SCHEMA_IDENT=9 9 | TYPE_IDENT=10 10 | VARIABLE_IDENT=11 11 | ENUMERATION_IDENT=12 12 | ATTRIBUTE_IDENT=13 13 | ENTITY_ATTR_IDENT=14 14 | TYPE_ATTR_IDENT=15 15 | ENTITY_VAR_IDENT=16 16 | TYPE_VAR_IDENT=17 17 | ENTITY_PARAM_IDENT=18 18 | TYPE_PARAM_IDENT=19 19 | SUBTYPE_CONSTRAINT_ID=20 20 | ACTUAL_PARAMETER_LIST=21 21 | ADD_LIKE_OP=22 22 | AGGREGATE_INITIALIZER=23 23 | AGGREGATE_SOURCE=24 24 | AGGREGATE_TYPE=25 25 | AGGREGATION_TYPES=26 26 | ALGORITHM_HEAD=27 27 | ALIAS_STMT=28 28 | ARRAY_TYPE=29 29 | ASSIGNMENT_STMT=30 30 | BAG_TYPE=31 31 | BASE_TYPE=32 32 | BINARY_TYPE=33 33 | BOOLEAN_TYPE=34 34 | BOUND_1=35 35 | BOUND_2=36 36 | BOUND_SPEC=37 37 | BUILT_IN_CONSTANT=38 38 | BUILT_IN_FUNCTION=39 39 | BUILT_IN_PROCEDURE=40 40 | CASE_ACTION=41 41 | CASE_LABEL=42 42 | CASE_STMT=43 43 | COMPOUND_STMT=44 44 | CONSTANT_BODY=45 45 | CONSTANT_DECL=46 46 | CONSTANT_FACTOR=47 47 | CONSTANT_ID=48 48 | DECLARATION=49 49 | DOMAIN_RULE=50 50 | ELEMENT=51 51 | ENTITY_HEAD=52 52 | ENTITY_DECL=53 53 | ENTITY_BODY=54 54 | SUBSUPER=55 55 | SUPERTYPE_CONSTRAINT=56 56 | ABSTRACT_SUPERTYPE_DECLARATION=57 57 | SUBTYPE_DECLARATION=58 58 | EXPLICIT_ATTR=59 59 | ATTRIBUTE_DECL=60 60 | ATTRIBUTE_ID=61 61 | QUALIFIED_ATTRIBUTE=62 62 | DERIVE_CLAUSE=63 63 | DERIVED_ATTR=64 64 | INVERSE_CLAUSE=65 65 | INVERSE_ATTR=66 66 | UNIQUE_CLAUSE=67 67 | UNIQUE_RULE=68 68 | REFERENCED_ATTRIBUTE=69 69 | ENTITY_CONSTRUCTOR=70 70 | ENTITY_ID=71 71 | ENUMERATION_REFERENCE=72 72 | ESCAPE_STMT=73 73 | EXPRESSION=74 74 | FACTOR=75 75 | FORMAL_PARAMETER=76 76 | ATTRIBUTE_QUALIFIER=77 77 | FUNCTION_CALL=78 78 | FUNCTION_DECL=79 79 | FUNCTION_HEAD=80 80 | FUNCTION_ID=81 81 | GENERALIZED_TYPES=82 82 | GENERAL_AGGREGATION_TYPES=83 83 | GENERAL_ARRAY_TYPE=84 84 | GENERAL_BAG_TYPE=85 85 | GENERAL_LIST_TYPE=86 86 | GENERAL_REF=87 87 | GENERAL_SET_TYPE=88 88 | GENERIC_TYPE=89 89 | GROUP_QUALIFIER=90 90 | IF_STMT=91 91 | INCREMENT=92 92 | INCREMENT_CONTROL=93 93 | INDEX=94 94 | INDEX_1=95 95 | INDEX_2=96 96 | INDEX_QUALIFIER=97 97 | INTEGER_TYPE=98 98 | INTERVAL=99 99 | INTERVAL_HIGH=100 100 | INTERVAL_ITEM=101 101 | INTERVAL_LOW=102 102 | INTERVAL_OP=103 103 | LABEL=104 104 | LIST_TYPE=105 105 | LITERAL=106 106 | REAL_LITERAL=107 107 | INTEGER_LITERAL=108 108 | STRING_LITERAL=109 109 | LOCAL_DECL=110 110 | LOCAL_VARIABLE=111 111 | LOGICAL_EXPRESSION=112 112 | LOGICAL_LITERAL=113 113 | LOGICAL_TYPE=114 114 | MULTIPLICATION_LIKE_OP=115 115 | NAMED_TYPES=116 116 | NULL_STMT=117 117 | NUMBER_TYPE=118 118 | NUMERIC_EXPRESSION=119 119 | ONE_OF=120 120 | PARAMETER=121 121 | PARAMETER_ID=122 122 | PARAMETER_TYPE=123 123 | POPULATION=124 124 | PRECISION_SPEC=125 125 | PRIMARY=126 126 | PROCEDURE_CALL_STMT=127 127 | PROCEDURE_DECL=128 128 | PROCEDURE_HEAD=129 129 | PROCEDURE_ID=130 130 | QUALIFIABLE_FACTOR=131 131 | QUALIFIER=132 132 | QUERY_EXPRESSION=133 133 | REAL_TYPE=134 134 | REFERENCE_CLAUSE=135 135 | REL_OP=136 136 | REL_OP_EXTENDED=137 137 | REPEAT_CONTROL=138 138 | REPEAT_STMT=139 139 | REPETITION=140 140 | RESOURCE_OR_RENAME=141 141 | RESOURCE_REF=142 142 | RETURN_STMT=143 143 | RULE_DECL=144 144 | RULE_HEAD=145 145 | RULE_ID=146 146 | SCHEMA_ID=147 147 | SCHEMA_BODY=148 148 | SCHEMA_DECL=149 149 | INTERFACE_SPECIFICATION=150 150 | USE_CLAUSE=151 151 | NAMED_TYPE_OR_RENAME=152 152 | SELECTOR=153 153 | SET_TYPE=154 154 | SIMPLE_EXPRESSION=155 155 | SIMPLE_FACTOR=156 156 | SIMPLE_TYPES=157 157 | SKIP_STMT=158 158 | STMT=159 159 | STRING_TYPE=160 160 | SUBTYPE_CONSTRAINT=161 161 | SUPERTYPE_EXPRESSION=162 162 | SUPERTYPE_FACTOR=163 163 | SUPERTYPE_RULE=164 164 | SUPERTYPE_TERM=165 165 | SYNTAX=166 166 | TERM=167 167 | TYPE_DECL=168 168 | UNDERLYING_TYPE=169 169 | CONSTRUCTED_TYPES=170 170 | ENUMERATION_TYPE=171 171 | ENUMERATION_ID=172 172 | SELECT_TYPE=173 173 | TYPE_ID=174 174 | TYPE_LABEL=175 175 | TYPE_LABEL_ID=176 176 | UNARY_OP=177 177 | UNTIL_CONTROL=178 178 | VARIABLE_ID=179 179 | WHERE_CLAUSE=180 180 | WHILE_CONTROL=181 181 | WIDTH=182 182 | WIDTH_SPEC=183 183 | ENTITY_REF=184 184 | TYPE_REF=185 185 | ENUMERATION_REF=186 186 | ATTRIBUTE_REF=187 187 | CONSTANT_REF=188 188 | FUNCTION_REF=189 189 | PARAMETER_REF=190 190 | VARIABLE_REF=191 191 | SCHEMA_REF=192 192 | TYPE_LABEL_REF=193 193 | PROCEDURE_REF=194 194 | SIMPLE_ID=195 195 | ELSE_CLAUSE=196 196 | RENAME_ID=197 197 | ENUMERATION_ITEMS=198 198 | ENUMERATION_EXTENSION=199 199 | SELECT_LIST=200 200 | SELECT_EXTENSION=201 201 | REDECLARED_ATTRIBUTE=202 202 | SUBTYPE_CONSTRAINT_DECL=203 203 | SUBTYPE_CONSTRAINT_HEAD=204 204 | SUBTYPE_CONSTRAINT_BODY=205 205 | ABSTRACT_SUPERTYPE=206 206 | TOTAL_OVER=207 207 | CONCRETE_TYPES=208 208 | GENERIC_ENTITY_TYPE=209 209 | SCHEMA_VERSION_ID=210 210 | LANGUAGE_VERSION_ID=211 211 | LPAREN("(")=212 212 | COMMA(",")=213 213 | RPAREN(")")=214 214 | PLUS("+")=215 215 | MINUS("-")=216 216 | LITERAL_or="or"=217 217 | LITERAL_xor="xor"=218 218 | LBRACK("[")=219 219 | RBRACK("]")=220 220 | LITERAL_aggregate="aggregate"=221 221 | COLON(":")=222 222 | LITERAL_of="of"=223 223 | LITERAL_alias="alias"=224 224 | LITERAL_for="for"=225 225 | IDENT("an identifer")=226 226 | SEMI(";")=227 227 | LITERAL_end_alias="end_alias"=228 228 | LITERAL_array="array"=229 229 | LITERAL_optional="optional"=230 230 | LITERAL_unique="unique"=231 231 | COLEQ(":=")=232 232 | LITERAL_bag="bag"=233 233 | LITERAL_binary="binary"=234 234 | LITERAL_boolean="boolean"=235 235 | LITERAL_const_e="const_e"=236 236 | LITERAL_pi="pi"=237 237 | LITERAL_self="self"=238 238 | QUESTION("?")=239 239 | STAR("*")=240 240 | LITERAL_abs="abs"=241 241 | LITERAL_acos="acos"=242 242 | LITERAL_asin="asin"=243 243 | LITERAL_atan="atan"=244 244 | LITERAL_blength="blength"=245 245 | LITERAL_cos="cos"=246 246 | LITERAL_exists="exists"=247 247 | LITERAL_exp="exp"=248 248 | LITERAL_format="format"=249 249 | LITERAL_hibound="hibound"=250 250 | LITERAL_hiindex="hiindex"=251 251 | LITERAL_length="length"=252 252 | LITERAL_lobound="lobound"=253 253 | LITERAL_loindex="loindex"=254 254 | LITERAL_log="log"=255 255 | "log2"=256 256 | "log10"=257 257 | LITERAL_nvl="nvl"=258 258 | LITERAL_odd="odd"=259 259 | LITERAL_rolesof="rolesof"=260 260 | LITERAL_sin="sin"=261 261 | LITERAL_sizeof="sizeof"=262 262 | LITERAL_sqrt="sqrt"=263 263 | LITERAL_tan="tan"=264 264 | LITERAL_typeof="typeof"=265 265 | LITERAL_usedin="usedin"=266 266 | LITERAL_value="value"=267 267 | LITERAL_value_in="value_in"=268 268 | LITERAL_value_unique="value_unique"=269 269 | LITERAL_insert="insert"=270 270 | LITERAL_remove="remove"=271 271 | LITERAL_case="case"=272 272 | LITERAL_otherwise="otherwise"=273 273 | LITERAL_end_case="end_case"=274 274 | LITERAL_begin="begin"=275 275 | LITERAL_end="end"=276 276 | LITERAL_constant="constant"=277 277 | LITERAL_end_constant="end_constant"=278 278 | LITERAL_entity="entity"=279 279 | LITERAL_abstract="abstract"=280 280 | LITERAL_end_entity="end_entity"=281 281 | LITERAL_supertype="supertype"=282 282 | LITERAL_subtype="subtype"=283 283 | LITERAL_end_subtype_constraint="end_subtype_constraint"=284 284 | LITERAL_subtype_constraint="subtype_constraint"=285 285 | LITERAL_total_over="total_over"=286 286 | LITERAL_renamed="renamed"=287 287 | LITERAL_derive="derive"=288 288 | LITERAL_inverse="inverse"=289 289 | LITERAL_set="set"=290 290 | DOT(".")=291 291 | LITERAL_escape="escape"=292 292 | DOUBLESTAR("double star")=293 293 | LITERAL_end_function="end_function"=294 294 | LITERAL_function="function"=295 295 | LITERAL_list="list"=296 296 | LITERAL_generic="generic"=297 297 | LITERAL_generic_entity="generic_entity"=298 298 | BACKSLASH("backslash")=299 299 | LITERAL_if="if"=300 300 | LITERAL_then="then"=301 301 | LITERAL_end_if="end_if"=302 302 | LITERAL_else="else"=303 303 | LITERAL_to="to"=304 304 | LITERAL_by="by"=305 305 | LITERAL_integer="integer"=306 306 | LCURLY("{")=307 307 | RCURLY("}")=308 308 | LT("<")=309 309 | LE("<=")=310 310 | INT("an integer value")=311 311 | FLOAT("an floating point value")=312 312 | STRING("a string literal")=313 313 | LITERAL_local="local"=314 314 | LITERAL_end_local="end_local"=315 315 | LITERAL_false="false"=316 316 | LITERAL_true="true"=317 317 | LITERAL_unknown="unknown"=318 318 | LITERAL_logical="logical"=319 319 | DIVSIGN("/")=320 320 | LITERAL_div="div"=321 321 | LITERAL_mod="mod"=322 322 | LITERAL_and="and"=323 323 | DOUBLEBAR("double bar")=324 324 | LITERAL_number="number"=325 325 | LITERAL_oneof="oneof"=326 326 | LITERAL_end_procedure="end_procedure"=327 327 | LITERAL_procedure="procedure"=328 328 | LITERAL_var="var"=329 329 | LITERAL_query="query"=330 330 | LTSTAR("less than star")=331 331 | BAR("|")=332 332 | LITERAL_real="real"=333 333 | LITERAL_reference="reference"=334 334 | LITERAL_from="from"=335 335 | GT(">")=336 336 | GE(">=")=337 337 | LTGT("less-than/greater-than thing")=338 338 | ASSIGN("=")=339 339 | COLLTGT(":<>:")=340 340 | COLEQCOL(":=:")=341 341 | LITERAL_in="in"=342 342 | LITERAL_like="like"=343 343 | LITERAL_repeat="repeat"=344 344 | LITERAL_end_repeat="end_repeat"=345 345 | LITERAL_as="as"=346 346 | LITERAL_return="return"=347 347 | LITERAL_end_rule="end_rule"=348 348 | LITERAL_rule="rule"=349 349 | LITERAL_schema="schema"=350 350 | LITERAL_end_schema="end_schema"=351 351 | LITERAL_use="use"=352 352 | LITERAL_skip="skip"=353 353 | LITERAL_string="string"=354 354 | LITERAL_andor="andor"=355 355 | LANG_VERSION("language version id")=356 356 | LITERAL_type="type"=357 357 | LITERAL_end_type="end_type"=358 358 | LITERAL_extensible="extensible"=359 359 | LITERAL_enumeration="enumeration"=360 360 | LITERAL_based_on="based_on"=361 361 | LITERAL_with="with"=362 362 | LITERAL_select="select"=363 363 | LITERAL_not="not"=364 364 | LITERAL_until="until"=365 365 | LITERAL_where="where"=366 366 | LITERAL_while="while"=367 367 | LITERAL_fixed="fixed"=368 368 | COMMENT("a comment")=369 369 | LINECOMMENT("a EXPRESS one line comment")=370 370 | AMPERSAND("&")=371 371 | AT("@")=372 372 | WS("white space")=373 373 | DIGIT("a digit")=374 374 | -------------------------------------------------------------------------------- /BuildingSMARTLibrary/src/nl/tue/buildingsmart/express/parser/ExpressSchemaParser.java: -------------------------------------------------------------------------------- 1 | package nl.tue.buildingsmart.express.parser; 2 | 3 | /****************************************************************************** 4 | * Copyright (C) 2009-2016 BIMserver.org 5 | * 6 | * This program is free software: you can redistribute it and/or modify 7 | * it under the terms of the GNU Affero General Public License as 8 | * published by the Free Software Foundation, either version 3 of the 9 | * License, or (at your option) any later version. 10 | * 11 | * This program is distributed in the hope that it will be useful, 12 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 13 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 14 | * GNU Affero General Public License for more details. 15 | * 16 | * You should have received a copy of the GNU Affero General Public License 17 | * along with this program. If not, see {@literal}. 18 | *****************************************************************************/ 19 | 20 | import java.io.BufferedInputStream; 21 | import java.io.ByteArrayOutputStream; 22 | import java.io.File; 23 | import java.io.FileOutputStream; 24 | import java.io.IOException; 25 | import java.io.InputStream; 26 | import java.io.PrintStream; 27 | import java.net.URL; 28 | import java.util.Iterator; 29 | 30 | import org.slf4j.Logger; 31 | import org.slf4j.LoggerFactory; 32 | 33 | import com.google.common.base.Charsets; 34 | 35 | import antlr.CommonAST; 36 | 37 | import gnu.getopt.Getopt; 38 | import net.sourceforge.osexpress.parser.EasyParser; 39 | import nl.tue.buildingsmart.schema.AggregationType; 40 | import nl.tue.buildingsmart.schema.Attribute; 41 | import nl.tue.buildingsmart.schema.BaseType; 42 | import nl.tue.buildingsmart.schema.DefinedType; 43 | import nl.tue.buildingsmart.schema.EntityDefinition; 44 | import nl.tue.buildingsmart.schema.EnumerationType; 45 | import nl.tue.buildingsmart.schema.ExplicitAttribute; 46 | import nl.tue.buildingsmart.schema.InverseAttribute; 47 | import nl.tue.buildingsmart.schema.NamedType; 48 | import nl.tue.buildingsmart.schema.SchemaDefinition; 49 | import nl.tue.buildingsmart.schema.SelectType; 50 | import nl.tue.buildingsmart.schema.UnderlyingType; 51 | 52 | /** 53 | * @author bwjakob 54 | * 55 | */ 56 | @SuppressWarnings("all") 57 | public class ExpressSchemaParser { 58 | 59 | /** 60 | * @param args 61 | */ 62 | 63 | private static final Logger LOGGER = LoggerFactory.getLogger(ExpressSchemaParser.class); 64 | EasyParser parser; 65 | Express2DictWalker walker; 66 | private InputStream inputStream; 67 | 68 | public ExpressSchemaParser(InputStream inputStream) { 69 | this.inputStream = inputStream; 70 | } 71 | 72 | public ExpressSchemaParser(URL url) { 73 | try { 74 | this.inputStream = url.openConnection().getInputStream(); 75 | } catch (IOException e) { 76 | LOGGER.error("", e); 77 | } 78 | } 79 | 80 | public void parse() { 81 | ByteArrayOutputStream log = new ByteArrayOutputStream(); 82 | try { 83 | PrintStream stdErrOld = System.err; 84 | PrintStream stdOutOld = System.out; 85 | PrintStream myErr = new PrintStream(log); 86 | System.setErr(myErr); 87 | System.setOut(myErr); 88 | parser = new EasyParser(new BufferedInputStream(inputStream)); 89 | 90 | walker = new Express2DictWalker(); 91 | // walker.methods.setModel(owlModel); 92 | 93 | /* result = */ 94 | CommonAST t = parser.parse(); 95 | 96 | walker.setPass(1); 97 | walker.syntax(t); 98 | walker.setPass(2); 99 | 100 | walker.syntax_pass2(t); 101 | walker.setPass(3); 102 | walker.syntax_pass2(t); 103 | walker.setPass(4); 104 | walker.syntax_pass2(t); 105 | System.setErr(stdErrOld); 106 | System.setOut(stdOutOld); 107 | walker.getSchema().constructHirarchyMap(); 108 | } catch (Exception e) { 109 | LOGGER.error("", e); 110 | LOGGER.error(new String(log.toByteArray(), Charsets.UTF_8)); 111 | } 112 | } 113 | 114 | public SchemaDefinition getSchema() { 115 | if (walker != null) { 116 | return walker.getSchema(); 117 | } 118 | return null; 119 | } 120 | 121 | public static void main(String[] argv) { 122 | EasyParser parser; 123 | Express2DictWalker walker; 124 | 125 | FileOutputStream out; 126 | String commonSchemaFile = null, fileIn = null, fileOut = null; 127 | long startTime, endTime; 128 | startTime = System.currentTimeMillis(); 129 | int currentCommandLineOption; 130 | 131 | /* arguments management */ 132 | Getopt g = new Getopt("Express2Dict", argv, "o:s:"); 133 | while ((currentCommandLineOption = g.getopt()) != -1) { 134 | switch (currentCommandLineOption) { 135 | case 'o': 136 | fileOut = g.getOptarg(); 137 | break; 138 | case 's': 139 | commonSchemaFile = g.getOptarg(); 140 | break; 141 | case '?': 142 | System.err.println("exiting"); 143 | System.exit(1); 144 | break; 145 | default: 146 | break; 147 | } 148 | } 149 | 150 | fileIn = getFileIn(argv, g); 151 | checkInputFile(fileIn); 152 | 153 | try { 154 | parser = new EasyParser(fileIn); 155 | walker = new Express2DictWalker(); 156 | 157 | /* result = */ 158 | CommonAST parsedTree = parser.parse(); 159 | 160 | walker.setPass(1); 161 | walker.syntax(parsedTree); 162 | 163 | walker.setPass(2); 164 | walker.syntax_pass2(parsedTree); 165 | 166 | walker.setPass(3); 167 | walker.syntax_pass2(parsedTree); 168 | 169 | SchemaDefinition schema = walker.getSchema(); 170 | printSchemaToConsole(schema); 171 | } catch (Exception e) { 172 | LOGGER.error("", e); 173 | } 174 | LOGGER.info("execution time: " + getStringTime(System.currentTimeMillis() - startTime)); 175 | } 176 | 177 | private static String getFileIn(String[] argv, Getopt g) { 178 | try { 179 | return argv[g.getOptind()]; 180 | 181 | } catch (Exception e) { 182 | System.err.println("E2OWL: Input file not specified"); 183 | System.exit(1); 184 | } 185 | System.err.println("E2OWL: Error in parsing input file"); 186 | System.exit(1); 187 | 188 | return null; 189 | } 190 | 191 | private static void checkInputFile(String fileIn) { 192 | File file = new File(fileIn); 193 | if (!file.canRead()) { 194 | System.err.println("E2OWL: Unable to read file " + fileIn); 195 | System.exit(1); 196 | } 197 | } 198 | 199 | private static void printSchemaToConsole(SchemaDefinition schema) { 200 | printEntities(schema); 201 | 202 | printTypes(schema); 203 | } 204 | 205 | private static void printEntities(SchemaDefinition schema) { 206 | Iterator entityIterator = schema.getEntities().iterator(); 207 | while (entityIterator.hasNext()) { 208 | EntityDefinition ent = (EntityDefinition) entityIterator.next(); 209 | LOGGER.info(ent.getName()); 210 | Iterator at = ent.getAttributes().iterator(); 211 | while (at.hasNext()) { 212 | Attribute attr = (Attribute) at.next(); 213 | System.out.print(ent.getName() + ":" + attr.getName()); 214 | if (attr instanceof ExplicitAttribute) { 215 | BaseType bt = (BaseType) ((ExplicitAttribute) attr).getDomain(); 216 | if (bt instanceof NamedType) { 217 | if (bt != null) { 218 | System.out.print(" is-a " + ((NamedType) bt).getName()); 219 | } 220 | } else if (bt instanceof AggregationType) { 221 | if (bt != null && ((AggregationType) bt).getElement_type() != null) { 222 | System.out.print(" is-a " + ((AggregationType) bt).getElement_type().getClass()); 223 | } 224 | } 225 | 226 | } 227 | if (attr instanceof InverseAttribute) { 228 | InverseAttribute inv = (InverseAttribute) attr; 229 | EntityDefinition forEnt = inv.getDomain(); 230 | ExplicitAttribute invertedAttr = inv.getInverted_attr(); 231 | System.out.print(inv.getName() + " inverse of "); 232 | System.out.print(invertedAttr.getName() + " for " + forEnt.getName()); 233 | 234 | } 235 | LOGGER.info(""); 236 | } 237 | } 238 | } 239 | 240 | private static void printTypes(SchemaDefinition schema) { 241 | Iterator typeIterator = schema.getTypes().iterator(); 242 | while (typeIterator.hasNext()) { 243 | DefinedType type = (DefinedType) typeIterator.next(); 244 | UnderlyingType ut = type.getDomain(); 245 | if (ut != null) 246 | LOGGER.info(type.getName() + ":" + ut.getClass()); 247 | else if (type instanceof SelectType) { 248 | LOGGER.info(type.getName() + ((SelectType) type).getSelections().toString()); 249 | } else if (type instanceof EnumerationType) { 250 | LOGGER.info(type.getName() + ((EnumerationType) type).getElements().toString()); 251 | } else if (ut == null && !(type instanceof SelectType)) 252 | LOGGER.error(type.getName() + " has no underlying_type"); 253 | } 254 | } 255 | 256 | private static final String getStringTime(long millis) { 257 | int seconds = (int) (millis / 1000); 258 | int minutes = (seconds / 60); 259 | int hours = (minutes / 60); 260 | minutes -= hours * 60; 261 | seconds -= (hours * 3600) + (minutes * 60); 262 | return (((hours < 10) ? "0" + hours : "" + hours) + ":" + ((minutes < 10) ? "0" + minutes : "" + minutes) + ":" + ((seconds < 10) ? "0" + seconds : "" + seconds)); 263 | } 264 | 265 | public void close() { 266 | try { 267 | inputStream.close(); 268 | } catch (IOException e) { 269 | LOGGER.error("", e); 270 | } 271 | } 272 | } -------------------------------------------------------------------------------- /BuildingSMARTLibrary/src/nl/tue/buildingsmart/express/parser/SchemaLoader.java: -------------------------------------------------------------------------------- 1 | package nl.tue.buildingsmart.express.parser; 2 | 3 | /****************************************************************************** 4 | * Copyright (C) 2009-2016 BIMserver.org 5 | * 6 | * This program is free software: you can redistribute it and/or modify 7 | * it under the terms of the GNU Affero General Public License as 8 | * published by the Free Software Foundation, either version 3 of the 9 | * License, or (at your option) any later version. 10 | * 11 | * This program is distributed in the hope that it will be useful, 12 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 13 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 14 | * GNU Affero General Public License for more details. 15 | * 16 | * You should have received a copy of the GNU Affero General Public License 17 | * along with this program. If not, see {@literal}. 18 | *****************************************************************************/ 19 | 20 | import java.io.FileOutputStream; 21 | import java.io.PrintStream; 22 | 23 | import org.slf4j.Logger; 24 | import org.slf4j.LoggerFactory; 25 | 26 | import antlr.CommonAST; 27 | import net.sourceforge.osexpress.parser.EasyParser; 28 | import nl.tue.buildingsmart.schema.SchemaDefinition; 29 | 30 | public class SchemaLoader { 31 | private SchemaDefinition schema = null; 32 | private static final Logger LOGGER = LoggerFactory.getLogger(SchemaLoader.class); 33 | 34 | public SchemaLoader(String fileName) { 35 | try { 36 | EasyParser parser = new EasyParser(fileName); 37 | Express2DictWalker walker = new Express2DictWalker(); 38 | // walker.methods.setModel(owlModel); 39 | 40 | /* result = */ 41 | CommonAST t = parser.parse(); 42 | PrintStream stdErrOld = System.err; 43 | PrintStream stdOutOld = System.out; 44 | FileOutputStream log = new FileOutputStream("parser.log"); 45 | PrintStream myErr = new PrintStream(log); 46 | System.setErr(myErr); 47 | System.setOut(myErr); 48 | walker.setPass(1); 49 | walker.syntax(t); 50 | walker.setPass(2); 51 | 52 | walker.syntax_pass2(t); 53 | walker.setPass(3); 54 | walker.syntax_pass2(t); 55 | 56 | schema = walker.getSchema(); 57 | schema.constructHirarchyMap(); 58 | System.setErr(stdErrOld); 59 | System.setOut(stdOutOld); 60 | myErr.close(); 61 | } catch (Exception e) { 62 | LOGGER.error("", e); 63 | } 64 | } 65 | 66 | public SchemaDefinition getSchema() { 67 | return schema; 68 | } 69 | 70 | } 71 | -------------------------------------------------------------------------------- /BuildingSMARTLibrary/src/nl/tue/buildingsmart/express/population/AttributeInstance.java: -------------------------------------------------------------------------------- 1 | package nl.tue.buildingsmart.express.population; 2 | 3 | /****************************************************************************** 4 | * Copyright (C) 2009-2016 BIMserver.org 5 | * 6 | * This program is free software: you can redistribute it and/or modify 7 | * it under the terms of the GNU Affero General Public License as 8 | * published by the Free Software Foundation, either version 3 of the 9 | * License, or (at your option) any later version. 10 | * 11 | * This program is distributed in the hope that it will be useful, 12 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 13 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 14 | * GNU Affero General Public License for more details. 15 | * 16 | * You should have received a copy of the GNU Affero General Public License 17 | * along with this program. If not, see {@literal}. 18 | *****************************************************************************/ 19 | 20 | import java.util.ArrayList; 21 | import java.util.Vector; 22 | 23 | import nl.tue.buildingsmart.schema.ExplicitAttribute; 24 | 25 | @SuppressWarnings("all") 26 | public class AttributeInstance { 27 | private EntityInstance attributeOf; 28 | private ExplicitAttribute attributeType; 29 | private Object value; 30 | private String p21Header = ""; 31 | 32 | public final static String REAL = "REAL"; 33 | public final static String ENTITY_INSTANCE_NAME = "ENTITY_INSTANCE_NAME"; 34 | public final static String STRING = "STRING"; 35 | 36 | public AttributeInstance() { 37 | 38 | } 39 | 40 | /* 41 | * (non-Javadoc) 42 | * 43 | * @see java.lang.Object#toString() 44 | */ 45 | public String toString() { 46 | return attributeType.getName() + ":" + this.getStringValue(); 47 | } 48 | 49 | public EntityInstance getAttributeOf() { 50 | return attributeOf; 51 | } 52 | 53 | public void setAttributeOf(EntityInstance attributeOf) { 54 | this.attributeOf = attributeOf; 55 | } 56 | 57 | public ExplicitAttribute getAttributeType() { 58 | return attributeType; 59 | } 60 | 61 | public void setAttributeType(ExplicitAttribute attributeType) { 62 | this.attributeType = attributeType; 63 | } 64 | 65 | public Object getValue() { 66 | return value; 67 | } 68 | 69 | public void setValue(Object value) { 70 | 71 | this.value = value; 72 | } 73 | 74 | public String getStringValue() { 75 | return this.value.toString(); 76 | } 77 | 78 | /** 79 | * @return whether or not this points to one or more entity instances 80 | */ 81 | public boolean hasEntityInstanceValue() { 82 | if (this.value instanceof String) { 83 | String stringVal = (String) value; 84 | if (stringVal.startsWith("#")) 85 | return true; 86 | } 87 | if (this.getValue() instanceof Vector) { 88 | Vector values = (Vector) getValue(); 89 | for (int i = 0; i < values.size(); i++) { 90 | String stringVal = (String) values.get(i); 91 | if (stringVal.startsWith("#")) { 92 | return true; 93 | } 94 | } 95 | } 96 | return false; 97 | } 98 | 99 | /** 100 | * @return returns the Instance value of this attribute, null if no Entity 101 | * Instance if found 102 | */ 103 | public EntityInstance getEntityInstanceValue() { 104 | if (this.value instanceof String) { 105 | String stringVal = (String) value; 106 | if (stringVal.startsWith("#")) { 107 | ModelPopulation pop = this.getAttributeOf().getModel(); 108 | return pop.getEntity(new Integer(stringVal.substring(1, stringVal.length()))); 109 | } 110 | 111 | } 112 | return null; 113 | } 114 | 115 | public ArrayList getEntityList() { 116 | ArrayList list = new ArrayList(); 117 | if (this.getValue() instanceof Vector) { 118 | Vector values = (Vector) getValue(); 119 | for (int i = 0; i < values.size(); i++) { 120 | String stringVal = (String) values.get(i); 121 | if (stringVal.startsWith("#")) { 122 | ModelPopulation pop = this.getAttributeOf().getModel(); 123 | list.add(pop.getEntity(new Integer(stringVal.substring(1, stringVal.length())))); 124 | } 125 | } 126 | } else if (this.value instanceof String) { 127 | String stringVal = (String) value; 128 | if (stringVal.startsWith("#")) { 129 | ModelPopulation pop = this.getAttributeOf().getModel(); 130 | list.add(pop.getEntity(new Integer(stringVal.substring(1, stringVal.length())))); 131 | } 132 | 133 | } 134 | return list; 135 | } 136 | 137 | /** 138 | * gets the type information of this attribute such as 139 | * "ENTITY_INSTANCE_NAME", "REAL" etc 140 | * 141 | * @return the String value of an instance name 142 | */ 143 | public String getP21Header() { 144 | return p21Header; 145 | } 146 | 147 | public void setP21Header(String header) { 148 | p21Header = header; 149 | } 150 | } 151 | -------------------------------------------------------------------------------- /BuildingSMARTLibrary/src/nl/tue/buildingsmart/express/population/EntityInstance.java: -------------------------------------------------------------------------------- 1 | package nl.tue.buildingsmart.express.population; 2 | 3 | /****************************************************************************** 4 | * Copyright (C) 2009-2016 BIMserver.org 5 | * 6 | * This program is free software: you can redistribute it and/or modify 7 | * it under the terms of the GNU Affero General Public License as 8 | * published by the Free Software Foundation, either version 3 of the 9 | * License, or (at your option) any later version. 10 | * 11 | * This program is distributed in the hope that it will be useful, 12 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 13 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 14 | * GNU Affero General Public License for more details. 15 | * 16 | * You should have received a copy of the GNU Affero General Public License 17 | * along with this program. If not, see {@literal}. 18 | *****************************************************************************/ 19 | 20 | import java.util.ArrayList; 21 | import java.util.HashMap; 22 | 23 | import nl.tue.buildingsmart.schema.EntityDefinition; 24 | 25 | /** 26 | * @author Jakob Beetz j.beetz@tue.nl 27 | *

28 | * The EntityInstance gives access to an EXPRESS entity instance 29 | * generated i.e. by reading in a SPFF / p21 file. 30 | *

31 | *

32 | * Depending on the type of the EntityInstance that can be retrieved 33 | * with the getEntityDefinition() function, the attributes can be 34 | * retrieved as an ArrayList or by their name. 35 | *

36 | * 37 | *

38 | * Member functions that have a "BN" in their name, e.g. 39 | * "getAttributeValueBN" take a string argument to get a certain 40 | * attribute value by its name according to the schema definition. 41 | * (Roughly oriented at SDAI) 42 | *

43 | */ 44 | public class EntityInstance { 45 | private int id; // the #number of the part 21 file this instance is 46 | // identified with 47 | private EntityDefinition entDef; 48 | private ArrayList attributes; 49 | private ArrayList references; 50 | private HashMap attributeMap; 51 | private int numAttribues = 0; 52 | private ModelPopulation model; 53 | 54 | public EntityInstance(ModelPopulation model, int id) { 55 | this.setId(id); 56 | setModel(model); 57 | attributes = new ArrayList(); 58 | references = new ArrayList(); 59 | attributeMap = new HashMap(); 60 | } 61 | 62 | /** 63 | * disscuraged to call this and operate on the attributes 64 | * directly 65 | * 66 | * @return the list of attributes for this EntityInstance 67 | */ 68 | public ArrayList getAttributes() { 69 | return attributes; 70 | } 71 | 72 | public void addAttribute(AttributeInstance attribute) { 73 | attributes.add(attribute); 74 | attribute.setAttributeOf(this); 75 | attributeMap.put(attribute.getAttributeType().getName(), attribute); 76 | numAttribues = attributes.size(); 77 | } 78 | 79 | public void setAttributes(ArrayList attributes) { 80 | this.attributes = attributes; 81 | for (int i = 0; i < attributes.size(); i++) { 82 | attributeMap.put(attributes.get(i).getAttributeType().getName(), attributes.get(i)); 83 | } 84 | 85 | } 86 | 87 | public EntityDefinition getEntityDefinition() { 88 | return entDef; 89 | } 90 | 91 | public void setEntityDefinition(EntityDefinition entDef) { 92 | this.entDef = entDef; 93 | } 94 | 95 | public int getId() { 96 | return id; 97 | } 98 | 99 | public void setId(int id) { 100 | this.id = id; 101 | } 102 | 103 | public ArrayList getReferneces() { 104 | return references; 105 | } 106 | 107 | public void addReference(EntityInstance instance) { 108 | references.add(instance); 109 | } 110 | 111 | public void setReferneces(ArrayList referneces) { 112 | this.references = referneces; 113 | } 114 | 115 | /** 116 | * get an attribute of this EntityInstance by its name an return its value 117 | * as an Object. Possible object types include EntityInstance, literal 118 | * values or aggregate types. 119 | * 120 | * @param attributeName 121 | * @return the value of the attribute as an object 122 | */ 123 | public Object getAttributeValueBN(String attributeName) { 124 | /* 125 | * boolean found = false; AttributeInstance attrib = null; 126 | * Iterator attribIter=attributes.iterator(); while 127 | * (!found && attribIter.hasNext()){ attrib = attribIter.next(); if 128 | * (attrib.getAttributeType().getName().equals(attributeName)) found = 129 | * true; 130 | * 131 | * } 132 | */ 133 | 134 | AttributeInstance attrib = attributeMap.get(attributeName); 135 | if (attrib != null) 136 | return attrib.getValue(); 137 | else 138 | return null; 139 | 140 | } 141 | 142 | /** 143 | * get an attribute value by its name and return the value as a string 144 | * 145 | * @param attributeName 146 | * @return a string representation of the Value of the attribute 147 | */ 148 | public String getAttributeValueBNasString(String attributeName) { 149 | return (String) getAttributeValueBN(attributeName); 150 | 151 | } 152 | 153 | /** 154 | * get the number of attributes of this instance 155 | * 156 | * @return the number of attributes 157 | */ 158 | public int getNumAttribues() { 159 | return numAttribues; 160 | } 161 | 162 | /** 163 | * Try to get the attribute by its name and return it as an EntityInstance 164 | * 165 | * @param attributeName 166 | * @return the EntityInstance or null if its not an EntityInstance but a 167 | * e.g. a literal or an Aggregate 168 | */ 169 | public EntityInstance getAttributeValueBNasEntityInstance(String attributeName) { 170 | AttributeInstance attr = attributeMap.get(attributeName); 171 | // if (attr.hasEntityInstanceValue()) 172 | if (attr != null) 173 | return attr.getEntityInstanceValue(); 174 | else 175 | return null; 176 | } 177 | 178 | /** 179 | * @param attributeName 180 | * the case-sensitive name of the AttributeInstance to retrieve 181 | * @return 182 | */ 183 | public ArrayList getAttributeValueBNasEntityInstanceList(String attributeName) { 184 | AttributeInstance attr = attributeMap.get(attributeName); 185 | if (attr != null) 186 | return attr.getEntityList(); 187 | else 188 | return null; 189 | } 190 | 191 | public ModelPopulation getModel() { 192 | return model; 193 | } 194 | 195 | public void setModel(ModelPopulation model) { 196 | this.model = model; 197 | } 198 | } 199 | -------------------------------------------------------------------------------- /BuildingSMARTLibrary/src/nl/tue/buildingsmart/express/population/ModelPopulation.java: -------------------------------------------------------------------------------- 1 | package nl.tue.buildingsmart.express.population; 2 | 3 | /****************************************************************************** 4 | * Copyright (C) 2009-2016 BIMserver.org 5 | * 6 | * This program is free software: you can redistribute it and/or modify 7 | * it under the terms of the GNU Affero General Public License as 8 | * published by the Free Software Foundation, either version 3 of the 9 | * License, or (at your option) any later version. 10 | * 11 | * This program is distributed in the hope that it will be useful, 12 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 13 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 14 | * GNU Affero General Public License for more details. 15 | * 16 | * You should have received a copy of the GNU Affero General Public License 17 | * along with this program. If not, see {@literal}. 18 | *****************************************************************************/ 19 | 20 | import java.io.FileInputStream; 21 | import java.nio.file.Path; 22 | import java.util.HashMap; 23 | import java.util.Iterator; 24 | import java.util.Vector; 25 | 26 | import org.slf4j.Logger; 27 | import org.slf4j.LoggerFactory; 28 | 29 | import nl.tue.buildingsmart.schema.EntityDefinition; 30 | import nl.tue.buildingsmart.schema.SchemaDefinition; 31 | 32 | @SuppressWarnings("all") 33 | public class ModelPopulation { 34 | 35 | private static final Logger LOGGER = LoggerFactory.getLogger(ModelPopulation.class); 36 | private HashMap instances; 37 | // hashmap of all instances sorted by type name; 38 | private HashMap> typeNameMap; 39 | private SchemaDefinition schema; 40 | private Part21Parser parser; 41 | private Path schemaFile; 42 | private String entityPrefixString = "ENTITY_"; 43 | 44 | public ModelPopulation(FileInputStream input) { 45 | 46 | parser = new Part21Parser(input); 47 | 48 | } 49 | 50 | public SchemaDefinition getSchema() { 51 | return schema; 52 | } 53 | 54 | public void setSchema(SchemaDefinition schema) { 55 | this.schema = schema; 56 | if (this.parser != null) 57 | this.parser.setSchema(schema); 58 | } 59 | 60 | public Path getSchemaFile() { 61 | return schemaFile; 62 | } 63 | 64 | public void setSchemaFile(Path schemaFile) { 65 | this.schemaFile = schemaFile; 66 | parser.setSchemaFile(schemaFile); 67 | } 68 | 69 | public void load() { 70 | try { 71 | parser.setModel(this); 72 | parser.init(); 73 | parser.syntax(); 74 | this.setInstances(parser.getInstances()); 75 | buildTypeNameMap(); 76 | 77 | } catch (ParseException e) { 78 | // TODO Auto-generated catch block 79 | LOGGER.error("", e); 80 | } 81 | } 82 | 83 | public HashMap getInstances() { 84 | return instances; 85 | } 86 | 87 | public void setInstances(HashMap instances) { 88 | this.instances = instances; 89 | } 90 | 91 | public EntityInstance getEntity(Integer id) { 92 | return instances.get(id); 93 | } 94 | 95 | private void buildTypeNameMap() { 96 | typeNameMap = new HashMap>(); 97 | for (Iterator instKeyIter = instances.keySet().iterator(); instKeyIter.hasNext();) { 98 | EntityInstance inst = instances.get(instKeyIter.next()); 99 | 100 | String typeName = inst.getEntityDefinition().getName(); 101 | if (!typeNameMap.containsKey(typeName)) { 102 | typeNameMap.put(typeName, new Vector()); 103 | } 104 | typeNameMap.get(typeName).add(inst); 105 | } 106 | } 107 | 108 | public Vector getInstancesOfType(String typeName) { 109 | return getInstancesOfType(typeName, false); 110 | } 111 | 112 | /** 113 | * Given an (abstract) supertype recursively descends down the subtype axis 114 | * until the first layer first layer of concrete types is found and returns 115 | * all instances 116 | * 117 | * @param typeName 118 | * the (abstract) type name 119 | * @return a vector of EntityInstances of possible various (concrete) types 120 | */ 121 | public Vector getInstancesOfFirstNonAbstractTypes(String typeName) { 122 | Vector instances = new Vector(); 123 | EntityDefinition ent = schema.getEnitiesBN().get(typeName.toUpperCase()); 124 | if (!ent.isInstantiable()) { 125 | for (EntityDefinition subEnt : ent.getSubtypes()) { 126 | Vector tmp = getInstancesOfFirstNonAbstractTypes(subEnt.getName()); 127 | instances.addAll(tmp); 128 | } 129 | 130 | } else { 131 | Vector tmp = getInstancesOfType(ent.getName()); 132 | instances.addAll(tmp); 133 | 134 | } 135 | 136 | return instances; 137 | } 138 | 139 | public Vector getInstancesOfType(String typeName, boolean includeSubClasses) { 140 | // get the direct instances 141 | System.out.println("checking:" + typeName); 142 | // typeName=typeName.toUpperCase(); 143 | Vector instances = typeNameMap.get(typeName); 144 | if (includeSubClasses) { 145 | // recurse into subtypes and get respective instances 146 | EntityDefinition ent = schema.getEnitiesBN().get(typeName.toUpperCase()); 147 | for (EntityDefinition subClass : ent.getSubtypes()) { 148 | Vector subClassInstances = getInstancesOfType(subClass.getName(), includeSubClasses); 149 | if (subClassInstances != null) { 150 | if (instances == null) 151 | instances = new Vector(); 152 | instances.addAll(subClassInstances); 153 | } 154 | } 155 | } 156 | 157 | if (instances == null) 158 | instances = new Vector(); 159 | return instances; 160 | } 161 | 162 | public String getEntityPrefix() { 163 | // TODO Auto-generated method stub 164 | return entityPrefixString; 165 | } 166 | } 167 | -------------------------------------------------------------------------------- /BuildingSMARTLibrary/src/nl/tue/buildingsmart/express/population/ParseException.java: -------------------------------------------------------------------------------- 1 | package nl.tue.buildingsmart.express.population; 2 | 3 | /****************************************************************************** 4 | * Copyright (C) 2009-2016 BIMserver.org 5 | * 6 | * This program is free software: you can redistribute it and/or modify 7 | * it under the terms of the GNU Affero General Public License as 8 | * published by the Free Software Foundation, either version 3 of the 9 | * License, or (at your option) any later version. 10 | * 11 | * This program is distributed in the hope that it will be useful, 12 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 13 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 14 | * GNU Affero General Public License for more details. 15 | * 16 | * You should have received a copy of the GNU Affero General Public License 17 | * along with this program. If not, see {@literal}. 18 | *****************************************************************************/ 19 | 20 | public class ParseException extends Exception { 21 | 22 | private static final long serialVersionUID = 1835959973347942267L; 23 | 24 | /** 25 | * This constructor is used by the method "generateParseException" in the 26 | * generated parser. Calling this constructor generates a new object of this 27 | * type with the fields "currentToken", "expectedTokenSequences", and 28 | * "tokenImage" set. The boolean flag "specialConstructor" is also set to 29 | * true to indicate that this constructor was used to create this object. 30 | * This constructor calls its super class with the empty string to force the 31 | * "toString" method of parent class "Throwable" to print the error message 32 | * in the form: ParseException: {@literal} 33 | */ 34 | public ParseException(Token currentTokenVal, int[][] expectedTokenSequencesVal, String[] tokenImageVal) { 35 | super(""); 36 | specialConstructor = true; 37 | currentToken = currentTokenVal; 38 | expectedTokenSequences = expectedTokenSequencesVal; 39 | tokenImage = tokenImageVal; 40 | } 41 | 42 | /** 43 | * The following constructors are for use by you for whatever purpose you 44 | * can think of. Constructing the exception in this manner makes the 45 | * exception behave in the normal way - i.e., as documented in the class 46 | * "Throwable". The fields "errorToken", "expectedTokenSequences", and 47 | * "tokenImage" do not contain relevant information. The JavaCC generated 48 | * code does not use these constructors. 49 | */ 50 | 51 | public ParseException() { 52 | super(); 53 | specialConstructor = false; 54 | } 55 | 56 | public ParseException(String message) { 57 | super(message); 58 | specialConstructor = false; 59 | } 60 | 61 | /** 62 | * This variable determines which constructor was used to create this object 63 | * and thereby affects the semantics of the "getMessage" method (see below). 64 | */ 65 | protected boolean specialConstructor; 66 | 67 | /** 68 | * This is the last token that has been consumed successfully. If this 69 | * object has been created due to a parse error, the token followng this 70 | * token will (therefore) be the first error token. 71 | */ 72 | public Token currentToken; 73 | 74 | /** 75 | * Each entry in this array is an array of integers. Each array of integers 76 | * represents a sequence of tokens (by their ordinal values) that is 77 | * expected at this point of the parse. 78 | */ 79 | public int[][] expectedTokenSequences; 80 | 81 | /** 82 | * This is a reference to the "tokenImage" array of the generated parser 83 | * within which the parse error occurred. This array is defined in the 84 | * generated ...Constants interface. 85 | */ 86 | public String[] tokenImage; 87 | 88 | /** 89 | * This method has the standard behavior when this object has been created 90 | * using the standard constructors. Otherwise, it uses "currentToken" and 91 | * "expectedTokenSequences" to generate a parse error message and returns 92 | * it. If this object has been created due to a parse error, and you do not 93 | * catch it (it gets thrown from the parser), then this method is called 94 | * during the printing of the final stack trace, and hence the correct error 95 | * message gets displayed. 96 | */ 97 | public String getMessage() { 98 | if (!specialConstructor) { 99 | return super.getMessage(); 100 | } 101 | String expected = ""; 102 | int maxSize = 0; 103 | for (int i = 0; i < expectedTokenSequences.length; i++) { 104 | if (maxSize < expectedTokenSequences[i].length) { 105 | maxSize = expectedTokenSequences[i].length; 106 | } 107 | for (int j = 0; j < expectedTokenSequences[i].length; j++) { 108 | expected += tokenImage[expectedTokenSequences[i][j]] + " "; 109 | } 110 | if (expectedTokenSequences[i][expectedTokenSequences[i].length - 1] != 0) { 111 | expected += "..."; 112 | } 113 | expected += eol + " "; 114 | } 115 | String retval = "Encountered \""; 116 | Token tok = currentToken.next; 117 | for (int i = 0; i < maxSize; i++) { 118 | if (i != 0) 119 | retval += " "; 120 | if (tok.kind == 0) { 121 | retval += tokenImage[0]; 122 | break; 123 | } 124 | retval += add_escapes(tok.image); 125 | tok = tok.next; 126 | } 127 | retval += "\" at line " + currentToken.next.beginLine + ", column " + currentToken.next.beginColumn; 128 | retval += "." + eol; 129 | if (expectedTokenSequences.length == 1) { 130 | retval += "Was expecting:" + eol + " "; 131 | } else { 132 | retval += "Was expecting one of:" + eol + " "; 133 | } 134 | retval += expected; 135 | return retval; 136 | } 137 | 138 | /** 139 | * The end of line string for this machine. 140 | */ 141 | protected String eol = System.getProperty("line.separator", "\n"); 142 | 143 | /** 144 | * Used to convert raw characters to their escaped version when these raw 145 | * version cannot be used as part of an ASCII string literal. 146 | */ 147 | protected String add_escapes(String str) { 148 | StringBuffer retval = new StringBuffer(); 149 | char ch; 150 | for (int i = 0; i < str.length(); i++) { 151 | switch (str.charAt(i)) { 152 | case 0: 153 | continue; 154 | case '\b': 155 | retval.append("\\b"); 156 | continue; 157 | case '\t': 158 | retval.append("\\t"); 159 | continue; 160 | case '\n': 161 | retval.append("\\n"); 162 | continue; 163 | case '\f': 164 | retval.append("\\f"); 165 | continue; 166 | case '\r': 167 | retval.append("\\r"); 168 | continue; 169 | case '\"': 170 | retval.append("\\\""); 171 | continue; 172 | case '\'': 173 | retval.append("\\\'"); 174 | continue; 175 | case '\\': 176 | retval.append("\\\\"); 177 | continue; 178 | default: 179 | if ((ch = str.charAt(i)) < 0x20 || ch > 0x7e) { 180 | String s = "0000" + Integer.toString(ch, 16); 181 | retval.append("\\u" + s.substring(s.length() - 4, s.length())); 182 | } else { 183 | retval.append(ch); 184 | } 185 | continue; 186 | } 187 | } 188 | return retval.toString(); 189 | } 190 | 191 | } 192 | -------------------------------------------------------------------------------- /BuildingSMARTLibrary/src/nl/tue/buildingsmart/express/population/Part21ParserConstants.java: -------------------------------------------------------------------------------- 1 | /* Generated By:JavaCC: Do not edit this line. Part21ParserConstants.java */ 2 | package nl.tue.buildingsmart.express.population; 3 | 4 | /****************************************************************************** 5 | * Copyright (C) 2009-2016 BIMserver.org 6 | * 7 | * This program is free software: you can redistribute it and/or modify 8 | * it under the terms of the GNU Affero General Public License as 9 | * published by the Free Software Foundation, either version 3 of the 10 | * License, or (at your option) any later version. 11 | * 12 | * This program is distributed in the hope that it will be useful, 13 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 14 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 15 | * GNU Affero General Public License for more details. 16 | * 17 | * You should have received a copy of the GNU Affero General Public License 18 | * along with this program. If not, see {@literal}. 19 | *****************************************************************************/ 20 | 21 | public interface Part21ParserConstants { 22 | 23 | /** End of File. */ 24 | int EOF = 0; 25 | /** RegularExpression Id. */ 26 | int EMBEDDED_REMARK = 6; 27 | /** RegularExpression Id. */ 28 | int LPAREN = 7; 29 | /** RegularExpression Id. */ 30 | int RPAREN = 8; 31 | /** RegularExpression Id. */ 32 | int LBRACE = 9; 33 | /** RegularExpression Id. */ 34 | int RBRACE = 10; 35 | /** RegularExpression Id. */ 36 | int LBRACKET = 11; 37 | /** RegularExpression Id. */ 38 | int RBRACKET = 12; 39 | /** RegularExpression Id. */ 40 | int SEMICOLON = 13; 41 | /** RegularExpression Id. */ 42 | int COLON = 14; 43 | /** RegularExpression Id. */ 44 | int COMMA = 15; 45 | /** RegularExpression Id. */ 46 | int DOT = 16; 47 | /** RegularExpression Id. */ 48 | int EQ = 17; 49 | /** RegularExpression Id. */ 50 | int DOLLAR = 18; 51 | /** RegularExpression Id. */ 52 | int STAR = 19; 53 | /** RegularExpression Id. */ 54 | int SLASH = 20; 55 | /** RegularExpression Id. */ 56 | int INTEGER = 21; 57 | /** RegularExpression Id. */ 58 | int KEYWORD = 22; 59 | /** RegularExpression Id. */ 60 | int USER_DEFINED_KEYWORD = 23; 61 | /** RegularExpression Id. */ 62 | int STANDARD_KEYWORD = 24; 63 | /** RegularExpression Id. */ 64 | int SIGN = 25; 65 | /** RegularExpression Id. */ 66 | int REAL = 26; 67 | /** RegularExpression Id. */ 68 | int NON_Q_CHAR = 27; 69 | /** RegularExpression Id. */ 70 | int STRING = 28; 71 | /** RegularExpression Id. */ 72 | int ENTITY_INSTANCE_NAME = 29; 73 | /** RegularExpression Id. */ 74 | int ENUMERATION = 30; 75 | /** RegularExpression Id. */ 76 | int HEX = 31; 77 | /** RegularExpression Id. */ 78 | int BINARY = 32; 79 | /** RegularExpression Id. */ 80 | int DIGIT = 33; 81 | /** RegularExpression Id. */ 82 | int LOWER = 34; 83 | /** RegularExpression Id. */ 84 | int UPPER = 35; 85 | /** RegularExpression Id. */ 86 | int SPECIAL = 36; 87 | /** RegularExpression Id. */ 88 | int REVERSE_SOLIDUS = 37; 89 | /** RegularExpression Id. */ 90 | int APOSTROPHE = 38; 91 | /** RegularExpression Id. */ 92 | int CHARACTER = 39; 93 | /** RegularExpression Id. */ 94 | int CONTROL_DIRECTIVE = 40; 95 | /** RegularExpression Id. */ 96 | int PAGE = 41; 97 | /** RegularExpression Id. */ 98 | int ALPHABET = 42; 99 | /** RegularExpression Id. */ 100 | int EXTENDED2 = 43; 101 | /** RegularExpression Id. */ 102 | int EXTENDED4 = 44; 103 | /** RegularExpression Id. */ 104 | int END_EXTENDED = 45; 105 | /** RegularExpression Id. */ 106 | int ARBITRARY = 46; 107 | /** RegularExpression Id. */ 108 | int HEX_ONE = 47; 109 | /** RegularExpression Id. */ 110 | int HEX_TWO = 48; 111 | /** RegularExpression Id. */ 112 | int HEX_FOUR = 49; 113 | 114 | /** Lexical state. */ 115 | int DEFAULT = 0; 116 | 117 | /** Literal token values. */ 118 | String[] tokenImage = { "", "\" \"", "\"\\t\"", "\"\\n\"", "\"\\r\"", "\"\\f\"", "", "\"(\"", "\")\"", "\"{\"", "\"}\"", "\"[\"", "\"]\"", "\";\"", 119 | "\":\"", "\",\"", "\".\"", "\"=\"", "\"$\"", "\"*\"", "\"/\"", "", "", "", "", "", "", 120 | "", "", "", "", "", "", "", "", "", "", "\"\\\\\"", "\"\\\'\"", 121 | "", "", "", "", "", "", "", "", "", "", "", 122 | "\"ISO-10303-21;\"", "\"END-ISO-10303-21\"", "\"HEADER;\"", "\"ENDSEC;\"", "\"DATA;\"", "\"&SCOPE\"", "\"ENDSCOPE\"", }; 123 | 124 | } 125 | -------------------------------------------------------------------------------- /BuildingSMARTLibrary/src/nl/tue/buildingsmart/express/population/Token.java: -------------------------------------------------------------------------------- 1 | package nl.tue.buildingsmart.express.population; 2 | 3 | /****************************************************************************** 4 | * Copyright (C) 2009-2016 BIMserver.org 5 | * 6 | * This program is free software: you can redistribute it and/or modify 7 | * it under the terms of the GNU Affero General Public License as 8 | * published by the Free Software Foundation, either version 3 of the 9 | * License, or (at your option) any later version. 10 | * 11 | * This program is distributed in the hope that it will be useful, 12 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 13 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 14 | * GNU Affero General Public License for more details. 15 | * 16 | * You should have received a copy of the GNU Affero General Public License 17 | * along with this program. If not, see {@literal}. 18 | *****************************************************************************/ 19 | 20 | public class Token { 21 | 22 | /** 23 | * An integer that describes the kind of this token. This numbering system 24 | * is determined by JavaCCParser, and a table of these numbers is stored in 25 | * the file ...Constants.java. 26 | */ 27 | public int kind; 28 | 29 | /** 30 | * beginLine and beginColumn describe the position of the first character of 31 | * this token; endLine and endColumn describe the position of the last 32 | * character of this token. 33 | */ 34 | public int beginLine, beginColumn, endLine, endColumn; 35 | 36 | /** 37 | * The string image of the token. 38 | */ 39 | public String image; 40 | 41 | /** 42 | * A reference to the next regular (non-special) token from the input 43 | * stream. If this is the last token from the input stream, or if the token 44 | * manager has not read tokens beyond this one, this field is set to null. 45 | * This is true only if this token is also a regular token. Otherwise, see 46 | * below for a description of the contents of this field. 47 | */ 48 | public Token next; 49 | 50 | /** 51 | * This field is used to access special tokens that occur prior to this 52 | * token, but after the immediately preceding regular (non-special) token. 53 | * If there are no such special tokens, this field is set to null. When 54 | * there are more than one such special token, this field refers to the last 55 | * of these special tokens, which in turn refers to the next previous 56 | * special token through its specialToken field, and so on until the first 57 | * special token (whose specialToken field is null). The next fields of 58 | * special tokens refer to other special tokens that immediately follow it 59 | * (without an intervening regular token). If there is no such token, this 60 | * field is null. 61 | */ 62 | public Token specialToken; 63 | 64 | /** 65 | * Returns the image. 66 | */ 67 | public String toString() { 68 | return image; 69 | } 70 | 71 | /** 72 | * Returns a new Token object, by default. However, if you want, you can 73 | * create and return subclass objects based on the value of ofKind. Simply 74 | * add the cases to the switch for all those special cases. For example, if 75 | * you have a subclass of Token called IDToken that you want to create if 76 | * ofKind is ID, simlpy add something like : 77 | * 78 | * case MyParserConstants.ID : return new IDToken(); 79 | * 80 | * to the following switch statement. Then you can cast matchedToken 81 | * variable to the appropriate type and use it in your lexical actions. 82 | */ 83 | public static final Token newToken(int ofKind) { 84 | switch (ofKind) { 85 | default: 86 | return new Token(); 87 | } 88 | } 89 | 90 | } 91 | -------------------------------------------------------------------------------- /BuildingSMARTLibrary/src/nl/tue/buildingsmart/express/population/TokenMgrError.java: -------------------------------------------------------------------------------- 1 | package nl.tue.buildingsmart.express.population; 2 | 3 | /****************************************************************************** 4 | * Copyright (C) 2009-2016 BIMserver.org 5 | * 6 | * This program is free software: you can redistribute it and/or modify 7 | * it under the terms of the GNU Affero General Public License as 8 | * published by the Free Software Foundation, either version 3 of the 9 | * License, or (at your option) any later version. 10 | * 11 | * This program is distributed in the hope that it will be useful, 12 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 13 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 14 | * GNU Affero General Public License for more details. 15 | * 16 | * You should have received a copy of the GNU Affero General Public License 17 | * along with this program. If not, see {@literal}. 18 | *****************************************************************************/ 19 | 20 | public class TokenMgrError extends Error { 21 | /* 22 | * Ordinals for various reasons why an Error of this type can be thrown. 23 | */ 24 | 25 | private static final long serialVersionUID = 835629989072666810L; 26 | 27 | /** 28 | * Lexical error occured. 29 | */ 30 | static final int LEXICAL_ERROR = 0; 31 | 32 | /** 33 | * An attempt wass made to create a second instance of a static token 34 | * manager. 35 | */ 36 | static final int STATIC_LEXER_ERROR = 1; 37 | 38 | /** 39 | * Tried to change to an invalid lexical state. 40 | */ 41 | static final int INVALID_LEXICAL_STATE = 2; 42 | 43 | /** 44 | * Detected (and bailed out of) an infinite loop in the token manager. 45 | */ 46 | static final int LOOP_DETECTED = 3; 47 | 48 | /** 49 | * Indicates the reason why the exception is thrown. It will have one of the 50 | * above 4 values. 51 | */ 52 | int errorCode; 53 | 54 | /** 55 | * Replaces unprintable characters by their espaced (or unicode escaped) 56 | * equivalents in the given string 57 | */ 58 | protected static final String addEscapes(String str) { 59 | StringBuffer retval = new StringBuffer(); 60 | char ch; 61 | for (int i = 0; i < str.length(); i++) { 62 | switch (str.charAt(i)) { 63 | case 0: 64 | continue; 65 | case '\b': 66 | retval.append("\\b"); 67 | continue; 68 | case '\t': 69 | retval.append("\\t"); 70 | continue; 71 | case '\n': 72 | retval.append("\\n"); 73 | continue; 74 | case '\f': 75 | retval.append("\\f"); 76 | continue; 77 | case '\r': 78 | retval.append("\\r"); 79 | continue; 80 | case '\"': 81 | retval.append("\\\""); 82 | continue; 83 | case '\'': 84 | retval.append("\\\'"); 85 | continue; 86 | case '\\': 87 | retval.append("\\\\"); 88 | continue; 89 | default: 90 | if ((ch = str.charAt(i)) < 0x20 || ch > 0x7e) { 91 | String s = "0000" + Integer.toString(ch, 16); 92 | retval.append("\\u" + s.substring(s.length() - 4, s.length())); 93 | } else { 94 | retval.append(ch); 95 | } 96 | continue; 97 | } 98 | } 99 | return retval.toString(); 100 | } 101 | 102 | /** 103 | * Returns a detailed message for the Error when it is thrown by the token 104 | * manager to indicate a lexical error. Parameters : EOFSeen : indicates if 105 | * EOF caused the lexicl error curLexState : lexical state in which this 106 | * error occured errorLine : line number when the error occured errorColumn 107 | * : column number when the error occured errorAfter : prefix that was seen 108 | * before this error occured curchar : the offending character Note: You can 109 | * customize the lexical error message by modifying this method. 110 | */ 111 | protected static String LexicalError(boolean EOFSeen, int lexState, int errorLine, int errorColumn, String errorAfter, char curChar) { 112 | return ("Lexical error at line " + errorLine + ", column " + errorColumn + ". Encountered: " 113 | + (EOFSeen ? " " : ("\"" + addEscapes(String.valueOf(curChar)) + "\"") + " (" + (int) curChar + "), ") + "after : \"" + addEscapes(errorAfter) + "\""); 114 | } 115 | 116 | /** 117 | * You can also modify the body of this method to customize your error 118 | * messages. For example, cases like LOOP_DETECTED and INVALID_LEXICAL_STATE 119 | * are not of end-users concern, so you can return something like : 120 | * 121 | * "Internal Error : Please file a bug report .... " 122 | * 123 | * from this method for such cases in the release version of your parser. 124 | */ 125 | public String getMessage() { 126 | return super.getMessage(); 127 | } 128 | 129 | /* 130 | * Constructors of various flavors follow. 131 | */ 132 | 133 | public TokenMgrError() { 134 | } 135 | 136 | public TokenMgrError(String message, int reason) { 137 | super(message); 138 | errorCode = reason; 139 | } 140 | 141 | public TokenMgrError(boolean EOFSeen, int lexState, int errorLine, int errorColumn, String errorAfter, char curChar, int reason) { 142 | this(LexicalError(EOFSeen, lexState, errorLine, errorColumn, errorAfter, curChar), reason); 143 | } 144 | } 145 | -------------------------------------------------------------------------------- /BuildingSMARTLibrary/src/nl/tue/buildingsmart/express/population/test/PopulationMetrics.java: -------------------------------------------------------------------------------- 1 | package nl.tue.buildingsmart.express.population.test; 2 | 3 | /****************************************************************************** 4 | * Copyright (C) 2009-2016 BIMserver.org 5 | * 6 | * This program is free software: you can redistribute it and/or modify 7 | * it under the terms of the GNU Affero General Public License as 8 | * published by the Free Software Foundation, either version 3 of the 9 | * License, or (at your option) any later version. 10 | * 11 | * This program is distributed in the hope that it will be useful, 12 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 13 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 14 | * GNU Affero General Public License for more details. 15 | * 16 | * You should have received a copy of the GNU Affero General Public License 17 | * along with this program. If not, see {@literal}. 18 | *****************************************************************************/ 19 | 20 | import java.io.File; 21 | import java.io.FileInputStream; 22 | import java.io.IOException; 23 | import java.nio.file.Paths; 24 | import java.util.HashMap; 25 | import java.util.TreeSet; 26 | 27 | import nl.tue.buildingsmart.express.dictionary.Namespaces; 28 | import nl.tue.buildingsmart.express.population.EntityInstance; 29 | import nl.tue.buildingsmart.express.population.ModelPopulation; 30 | 31 | @SuppressWarnings("all") 32 | public class PopulationMetrics { 33 | ModelPopulation pop; 34 | Namespaces nsConf; 35 | HashMap namespaceMembers = new HashMap(); 36 | 37 | public PopulationMetrics(ModelPopulation pop, Namespaces nsConf) { 38 | 39 | this.pop = pop; 40 | this.nsConf = nsConf; 41 | } 42 | 43 | public void countEntitiesPerNamespace() { 44 | for (String ns : nsConf.getNamespaces()) { 45 | namespaceMembers.put(ns, new Integer(0)); 46 | } 47 | for (EntityInstance entInst : pop.getInstances().values()) { 48 | String ns = nsConf.getNS(entInst.getEntityDefinition().getName()); 49 | if(ns==null){ 50 | System.out.println("Namespace for " + entInst.getEntityDefinition().getName() + " not found!"); 51 | } else { 52 | namespaceMembers.put(ns, namespaceMembers.get(ns) + 1); 53 | } 54 | } 55 | TreeSet ts = new TreeSet(namespaceMembers.keySet()); 56 | for (String ns : ts) { 57 | 58 | System.out.println(ns + ";" + namespaceMembers.get(ns)); 59 | } 60 | } 61 | 62 | public static void main(String[] args) throws IOException { 63 | if(args.length > 1 ){ 64 | try(FileInputStream spf = new FileInputStream(args[0])){ 65 | Namespaces namespaces = new Namespaces(args[1]); 66 | if(namespaces.readNSConfig()){ 67 | System.out.println("read ns config"); 68 | } else { 69 | System.out.println("failed to read ns config"); 70 | } 71 | for (String namespace: namespaces.getNamespaces()) { 72 | System.out.println(namespace); 73 | // System.out.println(String.join(", ", namespaces.getNamespaceMembers(namespace))); 74 | } 75 | ModelPopulation model = new ModelPopulation(spf); 76 | model.setSchemaFile(Paths.get("src", "schema", "IFC2X3_TC1.exp")); 77 | model.load(); 78 | new PopulationMetrics(model, namespaces).countEntitiesPerNamespace(); 79 | } 80 | } 81 | } 82 | } 83 | -------------------------------------------------------------------------------- /BuildingSMARTLibrary/src/nl/tue/buildingsmart/express/population/test/PopulationTest.java: -------------------------------------------------------------------------------- 1 | package nl.tue.buildingsmart.express.population.test; 2 | 3 | /****************************************************************************** 4 | * Copyright (C) 2009-2016 BIMserver.org 5 | * 6 | * This program is free software: you can redistribute it and/or modify 7 | * it under the terms of the GNU Affero General Public License as 8 | * published by the Free Software Foundation, either version 3 of the 9 | * License, or (at your option) any later version. 10 | * 11 | * This program is distributed in the hope that it will be useful, 12 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 13 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 14 | * GNU Affero General Public License for more details. 15 | * 16 | * You should have received a copy of the GNU Affero General Public License 17 | * along with this program. If not, see {@literal}. 18 | *****************************************************************************/ 19 | 20 | import java.io.File; 21 | import java.io.FileInputStream; 22 | import java.io.FileNotFoundException; 23 | import java.nio.file.Paths; 24 | 25 | import org.slf4j.Logger; 26 | import org.slf4j.LoggerFactory; 27 | 28 | import nl.tue.buildingsmart.express.population.ModelPopulation; 29 | 30 | public class PopulationTest { 31 | 32 | private static final Logger LOGGER = LoggerFactory.getLogger(PopulationTest.class); 33 | private ModelPopulation model; 34 | 35 | /** 36 | * @param args 37 | */ 38 | public static void main(String[] args) { 39 | new PopulationTest().start(new File(args[0])); 40 | } 41 | 42 | private void start(File file) { 43 | try { 44 | FileInputStream input = new FileInputStream(file); 45 | /* 46 | * byte[] contents= new byte[100]; try { 47 | * 48 | * input.read(contents); } catch (IOException e) { // TODO 49 | * Auto-generated catch block LOGGER.error("", e); } 50 | */ 51 | model = new ModelPopulation(input); 52 | model.setSchemaFile(Paths.get("src", "schema", "IFC2X3_TC1.exp")); 53 | model.load(); 54 | 55 | System.out.println(model.getInstancesOfType("IfcWall").size()); 56 | 57 | System.out.println("ready"); 58 | } catch (FileNotFoundException e) { 59 | // TODO Auto-generated catch block 60 | LOGGER.error("", e); 61 | 62 | } 63 | } 64 | } 65 | -------------------------------------------------------------------------------- /BuildingSMARTLibrary/src/nl/tue/buildingsmart/schema/AggregationType.java: -------------------------------------------------------------------------------- 1 | package nl.tue.buildingsmart.schema; 2 | 3 | /****************************************************************************** 4 | * Copyright (C) 2009-2016 BIMserver.org 5 | * 6 | * This program is free software: you can redistribute it and/or modify 7 | * it under the terms of the GNU Affero General Public License as 8 | * published by the Free Software Foundation, either version 3 of the 9 | * License, or (at your option) any later version. 10 | * 11 | * This program is distributed in the hope that it will be useful, 12 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 13 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 14 | * GNU Affero General Public License for more details. 15 | * 16 | * You should have received a copy of the GNU Affero General Public License 17 | * along with this program. If not, see {@literal}. 18 | *****************************************************************************/ 19 | 20 | public abstract class AggregationType implements BaseType, UnderlyingType{ 21 | /** 22 | * the base type this aggregation collects 23 | */ 24 | private BaseType element_type; 25 | 26 | 27 | /** Standard constructor 28 | * @param element_type a base element type this aggregation collects 29 | */ 30 | public AggregationType( BaseType element_type) { 31 | 32 | this.element_type = element_type; 33 | } 34 | 35 | /** 36 | * @return the element type this type aggregates 37 | */ 38 | public BaseType getElement_type() { 39 | return element_type; 40 | } 41 | 42 | /** 43 | * @param element_type set the base type this type aggregates 44 | */ 45 | public void setElement_type(BaseType element_type) { 46 | this.element_type = element_type; 47 | } 48 | } 49 | -------------------------------------------------------------------------------- /BuildingSMARTLibrary/src/nl/tue/buildingsmart/schema/ArrayType.java: -------------------------------------------------------------------------------- 1 | package nl.tue.buildingsmart.schema; 2 | 3 | /****************************************************************************** 4 | * Copyright (C) 2009-2016 BIMserver.org 5 | * 6 | * This program is free software: you can redistribute it and/or modify 7 | * it under the terms of the GNU Affero General Public License as 8 | * published by the Free Software Foundation, either version 3 of the 9 | * License, or (at your option) any later version. 10 | * 11 | * This program is distributed in the hope that it will be useful, 12 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 13 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 14 | * GNU Affero General Public License for more details. 15 | * 16 | * You should have received a copy of the GNU Affero General Public License 17 | * along with this program. If not, see {@literal}. 18 | *****************************************************************************/ 19 | 20 | public class ArrayType extends AggregationType { 21 | private Bound lower_index; 22 | private Bound upper_index; 23 | private boolean unique_flag; 24 | private boolean optional_flag; 25 | 26 | public ArrayType(BaseType element_type) { 27 | super(element_type); 28 | // TODO Auto-generated constructor stub 29 | } 30 | 31 | 32 | 33 | public Bound getLower_index() { 34 | return lower_index; 35 | } 36 | 37 | public void setLower_index(Bound lower_index) { 38 | this.lower_index = lower_index; 39 | } 40 | 41 | public boolean isOptional_flag() { 42 | return optional_flag; 43 | } 44 | 45 | public void setOptional_flag(boolean optional_flag) { 46 | this.optional_flag = optional_flag; 47 | } 48 | 49 | public boolean isUnique_flag() { 50 | return unique_flag; 51 | } 52 | 53 | public void setUnique_flag(boolean unique_flag) { 54 | this.unique_flag = unique_flag; 55 | } 56 | 57 | public Bound getUpper_index() { 58 | return upper_index; 59 | } 60 | 61 | public void setUpper_index(Bound upper_index) { 62 | this.upper_index = upper_index; 63 | } 64 | 65 | } 66 | -------------------------------------------------------------------------------- /BuildingSMARTLibrary/src/nl/tue/buildingsmart/schema/Attribute.java: -------------------------------------------------------------------------------- 1 | package nl.tue.buildingsmart.schema; 2 | 3 | /****************************************************************************** 4 | * Copyright (C) 2009-2016 BIMserver.org 5 | * 6 | * This program is free software: you can redistribute it and/or modify 7 | * it under the terms of the GNU Affero General Public License as 8 | * published by the Free Software Foundation, either version 3 of the 9 | * License, or (at your option) any later version. 10 | * 11 | * This program is distributed in the hope that it will be useful, 12 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 13 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 14 | * GNU Affero General Public License for more details. 15 | * 16 | * You should have received a copy of the GNU Affero General Public License 17 | * along with this program. If not, see {@literal}. 18 | *****************************************************************************/ 19 | 20 | public abstract class Attribute { 21 | private String name; 22 | private EntityDefinition parent_entity; 23 | private boolean derived; 24 | 25 | public Attribute(String name, EntityDefinition parent_entity) { 26 | 27 | this.name = name; 28 | this.parent_entity = parent_entity; 29 | } 30 | 31 | public String getName() { 32 | return name; 33 | } 34 | 35 | public void setName(String name) { 36 | this.name = name; 37 | } 38 | 39 | public EntityDefinition getParent_entity() { 40 | return parent_entity; 41 | } 42 | 43 | public void setParent_entity(EntityDefinition parent_entity) { 44 | this.parent_entity = parent_entity; 45 | } 46 | 47 | public void setDerived(boolean derived) { 48 | this.derived = derived; 49 | } 50 | 51 | public boolean isDerived() { 52 | return derived; 53 | } 54 | } 55 | -------------------------------------------------------------------------------- /BuildingSMARTLibrary/src/nl/tue/buildingsmart/schema/BagType.java: -------------------------------------------------------------------------------- 1 | package nl.tue.buildingsmart.schema; 2 | 3 | /****************************************************************************** 4 | * Copyright (C) 2009-2016 BIMserver.org 5 | * 6 | * This program is free software: you can redistribute it and/or modify 7 | * it under the terms of the GNU Affero General Public License as 8 | * published by the Free Software Foundation, either version 3 of the 9 | * License, or (at your option) any later version. 10 | * 11 | * This program is distributed in the hope that it will be useful, 12 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 13 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 14 | * GNU Affero General Public License for more details. 15 | * 16 | * You should have received a copy of the GNU Affero General Public License 17 | * along with this program. If not, see {@literal}. 18 | *****************************************************************************/ 19 | 20 | public class BagType extends VariableSizeAggregationType { 21 | 22 | public BagType(BaseType element_type) { 23 | super(element_type); 24 | // TODO Auto-generated constructor stub 25 | } 26 | 27 | 28 | } 29 | -------------------------------------------------------------------------------- /BuildingSMARTLibrary/src/nl/tue/buildingsmart/schema/BaseType.java: -------------------------------------------------------------------------------- 1 | package nl.tue.buildingsmart.schema; 2 | 3 | /****************************************************************************** 4 | * Copyright (C) 2009-2016 BIMserver.org 5 | * 6 | * This program is free software: you can redistribute it and/or modify 7 | * it under the terms of the GNU Affero General Public License as 8 | * published by the Free Software Foundation, either version 3 of the 9 | * License, or (at your option) any later version. 10 | * 11 | * This program is distributed in the hope that it will be useful, 12 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 13 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 14 | * GNU Affero General Public License for more details. 15 | * 16 | * You should have received a copy of the GNU Affero General Public License 17 | * along with this program. If not, see {@literal}. 18 | *****************************************************************************/ 19 | 20 | public interface BaseType { 21 | 22 | } 23 | -------------------------------------------------------------------------------- /BuildingSMARTLibrary/src/nl/tue/buildingsmart/schema/BinaryType.java: -------------------------------------------------------------------------------- 1 | package nl.tue.buildingsmart.schema; 2 | 3 | /****************************************************************************** 4 | * Copyright (C) 2009-2016 BIMserver.org 5 | * 6 | * This program is free software: you can redistribute it and/or modify 7 | * it under the terms of the GNU Affero General Public License as 8 | * published by the Free Software Foundation, either version 3 of the 9 | * License, or (at your option) any later version. 10 | * 11 | * This program is distributed in the hope that it will be useful, 12 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 13 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 14 | * GNU Affero General Public License for more details. 15 | * 16 | * You should have received a copy of the GNU Affero General Public License 17 | * along with this program. If not, see {@literal}. 18 | *****************************************************************************/ 19 | 20 | public class BinaryType extends SimpleType { 21 | 22 | public BinaryType() { 23 | super(); 24 | // TODO Auto-generated constructor stub 25 | } 26 | 27 | 28 | } 29 | -------------------------------------------------------------------------------- /BuildingSMARTLibrary/src/nl/tue/buildingsmart/schema/BooleanType.java: -------------------------------------------------------------------------------- 1 | package nl.tue.buildingsmart.schema; 2 | 3 | /****************************************************************************** 4 | * Copyright (C) 2009-2016 BIMserver.org 5 | * 6 | * This program is free software: you can redistribute it and/or modify 7 | * it under the terms of the GNU Affero General Public License as 8 | * published by the Free Software Foundation, either version 3 of the 9 | * License, or (at your option) any later version. 10 | * 11 | * This program is distributed in the hope that it will be useful, 12 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 13 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 14 | * GNU Affero General Public License for more details. 15 | * 16 | * You should have received a copy of the GNU Affero General Public License 17 | * along with this program. If not, see {@literal}. 18 | *****************************************************************************/ 19 | 20 | public class BooleanType extends SimpleType { 21 | 22 | public BooleanType() { 23 | super(); 24 | // TODO Auto-generated constructor stub 25 | } 26 | 27 | } 28 | -------------------------------------------------------------------------------- /BuildingSMARTLibrary/src/nl/tue/buildingsmart/schema/Bound.java: -------------------------------------------------------------------------------- 1 | package nl.tue.buildingsmart.schema; 2 | 3 | /****************************************************************************** 4 | * Copyright (C) 2009-2016 BIMserver.org 5 | * 6 | * This program is free software: you can redistribute it and/or modify 7 | * it under the terms of the GNU Affero General Public License as 8 | * published by the Free Software Foundation, either version 3 of the 9 | * License, or (at your option) any later version. 10 | * 11 | * This program is distributed in the hope that it will be useful, 12 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 13 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 14 | * GNU Affero General Public License for more details. 15 | * 16 | * You should have received a copy of the GNU Affero General Public License 17 | * along with this program. If not, see {@literal}. 18 | *****************************************************************************/ 19 | 20 | public abstract class Bound { 21 | 22 | } 23 | -------------------------------------------------------------------------------- /BuildingSMARTLibrary/src/nl/tue/buildingsmart/schema/ConstructedType.java: -------------------------------------------------------------------------------- 1 | package nl.tue.buildingsmart.schema; 2 | 3 | /****************************************************************************** 4 | * Copyright (C) 2009-2016 BIMserver.org 5 | * 6 | * This program is free software: you can redistribute it and/or modify 7 | * it under the terms of the GNU Affero General Public License as 8 | * published by the Free Software Foundation, either version 3 of the 9 | * License, or (at your option) any later version. 10 | * 11 | * This program is distributed in the hope that it will be useful, 12 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 13 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 14 | * GNU Affero General Public License for more details. 15 | * 16 | * You should have received a copy of the GNU Affero General Public License 17 | * along with this program. If not, see {@literal}. 18 | *****************************************************************************/ 19 | 20 | public interface ConstructedType extends UnderlyingType { 21 | 22 | } 23 | -------------------------------------------------------------------------------- /BuildingSMARTLibrary/src/nl/tue/buildingsmart/schema/DefinedType.java: -------------------------------------------------------------------------------- 1 | package nl.tue.buildingsmart.schema; 2 | 3 | /****************************************************************************** 4 | * Copyright (C) 2009-2016 BIMserver.org 5 | * 6 | * This program is free software: you can redistribute it and/or modify 7 | * it under the terms of the GNU Affero General Public License as 8 | * published by the Free Software Foundation, either version 3 of the 9 | * License, or (at your option) any later version. 10 | * 11 | * This program is distributed in the hope that it will be useful, 12 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 13 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 14 | * GNU Affero General Public License for more details. 15 | * 16 | * You should have received a copy of the GNU Affero General Public License 17 | * along with this program. If not, see {@literal}. 18 | *****************************************************************************/ 19 | 20 | public class DefinedType extends NamedType implements UnderlyingType{ 21 | private UnderlyingType domain; 22 | 23 | public UnderlyingType getDomain() { 24 | return domain; 25 | } 26 | 27 | public void setDomain(UnderlyingType domain) { 28 | this.domain = domain; 29 | } 30 | 31 | public DefinedType(String name, UnderlyingType domain) { 32 | super(name); 33 | this.domain = domain; 34 | } 35 | 36 | public DefinedType(String name) { 37 | super(name); 38 | // TODO Auto-generated constructor stub 39 | } 40 | public UnderlyingType getDomain(boolean includeSubtypes){ 41 | UnderlyingType ut = this.domain; 42 | if (ut instanceof DefinedType ){ 43 | ut = ((DefinedType)domain).getDomain(includeSubtypes); 44 | } 45 | return ut; 46 | } 47 | 48 | 49 | } 50 | -------------------------------------------------------------------------------- /BuildingSMARTLibrary/src/nl/tue/buildingsmart/schema/DerivedAttribute.java: -------------------------------------------------------------------------------- 1 | package nl.tue.buildingsmart.schema; 2 | 3 | /****************************************************************************** 4 | * Copyright (C) 2009-2016 BIMserver.org 5 | * 6 | * This program is free software: you can redistribute it and/or modify 7 | * it under the terms of the GNU Affero General Public License as 8 | * published by the Free Software Foundation, either version 3 of the 9 | * License, or (at your option) any later version. 10 | * 11 | * This program is distributed in the hope that it will be useful, 12 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 13 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 14 | * GNU Affero General Public License for more details. 15 | * 16 | * You should have received a copy of the GNU Affero General Public License 17 | * along with this program. If not, see {@literal}. 18 | *****************************************************************************/ 19 | 20 | public class DerivedAttribute extends Attribute implements UnderlyingType { 21 | 22 | public DerivedAttribute(String name, EntityDefinition parent_entity) { 23 | super(name, parent_entity); 24 | // TODO Auto-generated constructor stub 25 | } 26 | 27 | } 28 | -------------------------------------------------------------------------------- /BuildingSMARTLibrary/src/nl/tue/buildingsmart/schema/DerivedAttribute2.java: -------------------------------------------------------------------------------- 1 | package nl.tue.buildingsmart.schema; 2 | 3 | /****************************************************************************** 4 | * Copyright (C) 2009-2016 BIMserver.org 5 | * 6 | * This program is free software: you can redistribute it and/or modify 7 | * it under the terms of the GNU Affero General Public License as 8 | * published by the Free Software Foundation, either version 3 of the 9 | * License, or (at your option) any later version. 10 | * 11 | * This program is distributed in the hope that it will be useful, 12 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 13 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 14 | * GNU Affero General Public License for more details. 15 | * 16 | * You should have received a copy of the GNU Affero General Public License 17 | * along with this program. If not, see {@literal}. 18 | *****************************************************************************/ 19 | 20 | public class DerivedAttribute2 { 21 | private String name; 22 | private BaseType type; 23 | private String expressCode; 24 | private final boolean collection; 25 | private boolean hasSuper; 26 | 27 | public DerivedAttribute2 (String name, BaseType type, String expressCode, boolean collection, boolean hasSuper) { 28 | this.name = name; 29 | this.type = type; 30 | this.expressCode = expressCode; 31 | this.collection = collection; 32 | this.hasSuper = hasSuper; 33 | } 34 | 35 | public String getName() { 36 | return name; 37 | } 38 | 39 | public BaseType getType() { 40 | return type; 41 | } 42 | 43 | public String getExpressCode() { 44 | return expressCode; 45 | } 46 | 47 | public boolean isCollection() { 48 | return collection; 49 | } 50 | 51 | public boolean hasSuper() { 52 | return hasSuper; 53 | } 54 | } -------------------------------------------------------------------------------- /BuildingSMARTLibrary/src/nl/tue/buildingsmart/schema/EntityDefinition.java: -------------------------------------------------------------------------------- 1 | package nl.tue.buildingsmart.schema; 2 | 3 | /****************************************************************************** 4 | * Copyright (C) 2009-2016 BIMserver.org 5 | * 6 | * This program is free software: you can redistribute it and/or modify 7 | * it under the terms of the GNU Affero General Public License as 8 | * published by the Free Software Foundation, either version 3 of the 9 | * License, or (at your option) any later version. 10 | * 11 | * This program is distributed in the hope that it will be useful, 12 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 13 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 14 | * GNU Affero General Public License for more details. 15 | * 16 | * You should have received a copy of the GNU Affero General Public License 17 | * along with this program. If not, see {@literal}. 18 | *****************************************************************************/ 19 | 20 | import java.util.ArrayList; 21 | import java.util.HashMap; 22 | import java.util.HashSet; 23 | import java.util.Iterator; 24 | import java.util.Map; 25 | import java.util.Set; 26 | 27 | public class EntityDefinition extends NamedType { 28 | // store each supertype in both a list and a hashtable for convenience 29 | private ArrayList supertypes = new ArrayList(); 30 | private HashMap supertypesBN = new HashMap(); 31 | // store each attribute in both a list and a hashtable for convenience 32 | private ArrayList attributes = new ArrayList(); 33 | private HashMap attributesBN = new HashMap(); 34 | 35 | private HashMap attributesPlusSuperBN; 36 | private ArrayList attributesPlusSuper; 37 | 38 | private ArrayList subtypes = new ArrayList(); 39 | private final Map derivedAttributes = new HashMap(); 40 | private final Set derivedAttributesOverride = new HashSet(); 41 | boolean complex; 42 | boolean instantiable; 43 | boolean independent; 44 | 45 | public EntityDefinition(String name) { 46 | super(name); 47 | } 48 | 49 | public boolean isDerived(String name) { 50 | return derivedAttributes.containsKey(name); 51 | } 52 | 53 | public String toString() { 54 | return this.getName(); 55 | } 56 | 57 | public boolean addAttribute(Attribute a) { 58 | a.setParent_entity(this); 59 | attributes.add(a); 60 | attributesBN.put(a.getName(), a); 61 | return true; 62 | } 63 | 64 | public void addDerived(DerivedAttribute2 attribute, boolean firstOccurance) { 65 | if (!derivedAttributes.containsKey(attribute.getName())) { 66 | derivedAttributes.put(attribute.getName(), attribute); 67 | } else { 68 | if (firstOccurance) { 69 | derivedAttributes.put(attribute.getName(), attribute); 70 | } 71 | } 72 | for (EntityDefinition entityDefinition : supertypes) { 73 | if (entityDefinition.getAttributeBNWithSuper(attribute.getName()) != null) { 74 | derivedAttributesOverride.add(attribute.getName()); 75 | } 76 | } 77 | doSubtypes(attribute); 78 | } 79 | 80 | private void doSubtypes(DerivedAttribute2 attribute) { 81 | for (EntityDefinition entityDefinition : subtypes) { 82 | entityDefinition.addDerived(new DerivedAttribute2(attribute.getName(), attribute.getType(), attribute.getExpressCode(), attribute.isCollection(), true), false); 83 | entityDefinition.doSubtypes(attribute); 84 | } 85 | } 86 | 87 | public Attribute getAttributeBN(String name) { 88 | return attributesBN.get(name); 89 | } 90 | 91 | public Attribute getAttributeBNWithSuper(String name) { 92 | if (attributesBN.containsKey(name)) { 93 | return attributesBN.get(name); 94 | } 95 | if (attributesPlusSuperBN == null) { 96 | getAttributesCached(true); 97 | } 98 | if (attributesPlusSuperBN.containsKey(name)) { 99 | return attributesPlusSuperBN.get(name); 100 | } 101 | return null; 102 | } 103 | 104 | public boolean addSupertype(EntityDefinition parent) { 105 | supertypes.add(parent); 106 | supertypesBN.put(parent.getName(), parent); 107 | return true; 108 | } 109 | 110 | public ArrayList getAttributes() { 111 | return attributes; 112 | } 113 | 114 | /** 115 | * returns all Attirbutes of this ENTITY. Optionally also returns all 116 | * inherited Attributes from the parents 117 | * 118 | * @param returnInherited 119 | * if true also returns inherited attributs 120 | * @return 121 | */ 122 | public ArrayList getAttributes(boolean returnInherited) { 123 | if (!returnInherited) 124 | return this.getAttributes(); 125 | else { 126 | ArrayList tempAttribs = new ArrayList(); 127 | Iterator parentIter = this.getSupertypes().iterator(); 128 | while (parentIter.hasNext()) { 129 | tempAttribs = parentIter.next().getAttributes(true); 130 | } 131 | Iterator attribIter = this.getAttributes().iterator(); 132 | while (attribIter.hasNext()) 133 | tempAttribs.add(attribIter.next()); 134 | return tempAttribs; 135 | } 136 | } 137 | 138 | public ArrayList getAttributesCached(boolean returnInherited) { 139 | if (!returnInherited) 140 | return this.getAttributes(); 141 | else { 142 | if (attributesPlusSuper == null) { 143 | attributesPlusSuper = getAttributes(true); 144 | attributesPlusSuperBN = new HashMap(); 145 | for (Attribute attribute : attributesPlusSuper) { 146 | attributesPlusSuperBN.put(attribute.getName(), attribute); 147 | } 148 | } 149 | return attributesPlusSuper; 150 | } 151 | } 152 | 153 | public void setAttributes(ArrayList attributes) { 154 | this.attributes = attributes; 155 | } 156 | 157 | public HashMap getAttributesBN() { 158 | return attributesBN; 159 | } 160 | 161 | public void setAttributesBN(HashMap attributesBN) { 162 | this.attributesBN = attributesBN; 163 | } 164 | 165 | public ArrayList getSupertypes() { 166 | return supertypes; 167 | } 168 | 169 | public void setSupertypes(ArrayList supertypes) { 170 | this.supertypes = supertypes; 171 | } 172 | 173 | public HashMap getSupertypesBN() { 174 | return supertypesBN; 175 | } 176 | 177 | public void setSupertypesBN(HashMap supertypesBN) { 178 | this.supertypesBN = supertypesBN; 179 | } 180 | 181 | public ArrayList getSubtypes() { 182 | if (this.subtypes == null) 183 | this.subtypes = new ArrayList(); 184 | return subtypes; 185 | } 186 | 187 | public void setSubtypes(ArrayList subtypes) { 188 | this.subtypes = subtypes; 189 | } 190 | 191 | public void addSubtype(EntityDefinition subClass) { 192 | this.subtypes.add(subClass); 193 | } 194 | 195 | public boolean isInstantiable() { 196 | return instantiable; 197 | } 198 | 199 | public void setInstantiable(boolean instantiable) { 200 | this.instantiable = instantiable; 201 | } 202 | 203 | public Map getDerivedAttributes() { 204 | return derivedAttributes; 205 | } 206 | 207 | public boolean isDerivedOverride(String name) { 208 | return derivedAttributesOverride.contains(name); 209 | } 210 | } -------------------------------------------------------------------------------- /BuildingSMARTLibrary/src/nl/tue/buildingsmart/schema/EnumerationType.java: -------------------------------------------------------------------------------- 1 | package nl.tue.buildingsmart.schema; 2 | 3 | /****************************************************************************** 4 | * Copyright (C) 2009-2016 BIMserver.org 5 | * 6 | * This program is free software: you can redistribute it and/or modify 7 | * it under the terms of the GNU Affero General Public License as 8 | * published by the Free Software Foundation, either version 3 of the 9 | * License, or (at your option) any later version. 10 | * 11 | * This program is distributed in the hope that it will be useful, 12 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 13 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 14 | * GNU Affero General Public License for more details. 15 | * 16 | * You should have received a copy of the GNU Affero General Public License 17 | * along with this program. If not, see {@literal}. 18 | *****************************************************************************/ 19 | 20 | import java.util.HashSet; 21 | 22 | 23 | public class EnumerationType extends DefinedType implements ConstructedType { 24 | 25 | private HashSet elements = new HashSet(); 26 | 27 | public EnumerationType(String name, UnderlyingType domain) { 28 | super(name, domain); 29 | // TODO Auto-generated constructor stub 30 | } 31 | 32 | public EnumerationType(String name) { 33 | super(name); 34 | // TODO Auto-generated constructor stub 35 | } 36 | 37 | public void addElement(String e){ 38 | elements.add(e); 39 | } 40 | 41 | public HashSet getElements() { 42 | return elements; 43 | } 44 | 45 | public void setElements(HashSet elements) { 46 | this.elements = elements; 47 | } 48 | } 49 | -------------------------------------------------------------------------------- /BuildingSMARTLibrary/src/nl/tue/buildingsmart/schema/ExplicitAttribute.java: -------------------------------------------------------------------------------- 1 | package nl.tue.buildingsmart.schema; 2 | 3 | /****************************************************************************** 4 | * Copyright (C) 2009-2016 BIMserver.org 5 | * 6 | * This program is free software: you can redistribute it and/or modify 7 | * it under the terms of the GNU Affero General Public License as 8 | * published by the Free Software Foundation, either version 3 of the 9 | * License, or (at your option) any later version. 10 | * 11 | * This program is distributed in the hope that it will be useful, 12 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 13 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 14 | * GNU Affero General Public License for more details. 15 | * 16 | * You should have received a copy of the GNU Affero General Public License 17 | * along with this program. If not, see {@literal}. 18 | *****************************************************************************/ 19 | 20 | public class ExplicitAttribute extends Attribute implements UnderlyingType, 21 | ExplicitOrDerived { 22 | 23 | private BaseType domain; 24 | private ExplicitOrDerived redeclares; 25 | private boolean optional = false; 26 | private boolean derived = false; 27 | 28 | public ExplicitAttribute(String name, EntityDefinition parent_entity) { 29 | super(name, parent_entity); 30 | } 31 | 32 | public BaseType getDomain() { 33 | return domain; 34 | } 35 | 36 | public BaseType getDomain(boolean includeSubtypes) { 37 | BaseType bt = this.domain; 38 | if (bt instanceof DefinedType) 39 | bt = (BaseType) ((DefinedType) bt).getDomain(true); 40 | return bt; 41 | } 42 | 43 | public void setDomain(BaseType domain) { 44 | this.domain = domain; 45 | 46 | } 47 | 48 | public ExplicitOrDerived getRedeclares() { 49 | return redeclares; 50 | } 51 | 52 | public void setRedeclares(ExplicitOrDerived redeclares) { 53 | this.redeclares = redeclares; 54 | } 55 | 56 | public boolean isDerived() { 57 | return derived; 58 | } 59 | 60 | public void setDerived(boolean derived) { 61 | // LOGGER.info("derived: " + derived); 62 | this.derived = derived; 63 | } 64 | 65 | public boolean isOptional() { 66 | return optional; 67 | } 68 | 69 | public void setOptional(boolean optional_flag) { 70 | this.optional = optional_flag; 71 | } 72 | } 73 | -------------------------------------------------------------------------------- /BuildingSMARTLibrary/src/nl/tue/buildingsmart/schema/ExplicitOrDerived.java: -------------------------------------------------------------------------------- 1 | package nl.tue.buildingsmart.schema; 2 | 3 | /****************************************************************************** 4 | * Copyright (C) 2009-2016 BIMserver.org 5 | * 6 | * This program is free software: you can redistribute it and/or modify 7 | * it under the terms of the GNU Affero General Public License as 8 | * published by the Free Software Foundation, either version 3 of the 9 | * License, or (at your option) any later version. 10 | * 11 | * This program is distributed in the hope that it will be useful, 12 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 13 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 14 | * GNU Affero General Public License for more details. 15 | * 16 | * You should have received a copy of the GNU Affero General Public License 17 | * along with this program. If not, see {@literal}. 18 | *****************************************************************************/ 19 | 20 | public interface ExplicitOrDerived { 21 | 22 | } 23 | -------------------------------------------------------------------------------- /BuildingSMARTLibrary/src/nl/tue/buildingsmart/schema/IntegerBound.java: -------------------------------------------------------------------------------- 1 | package nl.tue.buildingsmart.schema; 2 | 3 | /****************************************************************************** 4 | * Copyright (C) 2009-2016 BIMserver.org 5 | * 6 | * This program is free software: you can redistribute it and/or modify 7 | * it under the terms of the GNU Affero General Public License as 8 | * published by the Free Software Foundation, either version 3 of the 9 | * License, or (at your option) any later version. 10 | * 11 | * This program is distributed in the hope that it will be useful, 12 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 13 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 14 | * GNU Affero General Public License for more details. 15 | * 16 | * You should have received a copy of the GNU Affero General Public License 17 | * along with this program. If not, see {@literal}. 18 | *****************************************************************************/ 19 | 20 | public class IntegerBound extends Bound { 21 | //-1 == unbounded 22 | private int bound_value = -1; 23 | 24 | public int getBound_value() { 25 | return bound_value; 26 | } 27 | 28 | public void setBound_value(int bound_value) { 29 | this.bound_value = bound_value; 30 | } 31 | 32 | public IntegerBound() { 33 | super(); 34 | // TODO Auto-generated constructor stub 35 | } 36 | 37 | public IntegerBound(int bound_value) { 38 | super(); 39 | this.bound_value = bound_value; 40 | } 41 | 42 | } 43 | -------------------------------------------------------------------------------- /BuildingSMARTLibrary/src/nl/tue/buildingsmart/schema/IntegerType.java: -------------------------------------------------------------------------------- 1 | package nl.tue.buildingsmart.schema; 2 | 3 | /****************************************************************************** 4 | * Copyright (C) 2009-2016 BIMserver.org 5 | * 6 | * This program is free software: you can redistribute it and/or modify 7 | * it under the terms of the GNU Affero General Public License as 8 | * published by the Free Software Foundation, either version 3 of the 9 | * License, or (at your option) any later version. 10 | * 11 | * This program is distributed in the hope that it will be useful, 12 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 13 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 14 | * GNU Affero General Public License for more details. 15 | * 16 | * You should have received a copy of the GNU Affero General Public License 17 | * along with this program. If not, see {@literal}. 18 | *****************************************************************************/ 19 | 20 | public class IntegerType extends SimpleType { 21 | 22 | public IntegerType() { 23 | super(); 24 | // TODO Auto-generated constructor stub 25 | } 26 | 27 | } 28 | -------------------------------------------------------------------------------- /BuildingSMARTLibrary/src/nl/tue/buildingsmart/schema/InverseAttribute.java: -------------------------------------------------------------------------------- 1 | package nl.tue.buildingsmart.schema; 2 | 3 | /****************************************************************************** 4 | * Copyright (C) 2009-2016 BIMserver.org 5 | * 6 | * This program is free software: you can redistribute it and/or modify 7 | * it under the terms of the GNU Affero General Public License as 8 | * published by the Free Software Foundation, either version 3 of the 9 | * License, or (at your option) any later version. 10 | * 11 | * This program is distributed in the hope that it will be useful, 12 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 13 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 14 | * GNU Affero General Public License for more details. 15 | * 16 | * You should have received a copy of the GNU Affero General Public License 17 | * along with this program. If not, see {@literal}. 18 | *****************************************************************************/ 19 | 20 | public class InverseAttribute extends 21 | Attribute implements 22 | UnderlyingType { 23 | 24 | private EntityDefinition domain = null; 25 | private ExplicitAttribute inverted_attr = null; 26 | private Bound min_cardinality, max_cardinality; 27 | 28 | public InverseAttribute(String name, EntityDefinition parent_entity) { 29 | super(name, parent_entity); 30 | } 31 | 32 | public EntityDefinition getDomain() { 33 | return domain; 34 | } 35 | 36 | public void setDomain(EntityDefinition domain) { 37 | this.domain = domain; 38 | } 39 | 40 | public ExplicitAttribute getInverted_attr() { 41 | return inverted_attr; 42 | } 43 | 44 | public void setInverted_attr(ExplicitAttribute inverted_attr) { 45 | this.inverted_attr = inverted_attr; 46 | } 47 | 48 | public Bound getMax_cardinality() { 49 | return max_cardinality; 50 | } 51 | 52 | public void setMax_cardinality(Bound max_cardinality) { 53 | this.max_cardinality = max_cardinality; 54 | } 55 | 56 | public Bound getMin_cardinality() { 57 | return min_cardinality; 58 | } 59 | 60 | public void setMin_cardinality(Bound min_cardinality) { 61 | this.min_cardinality = min_cardinality; 62 | } 63 | } 64 | -------------------------------------------------------------------------------- /BuildingSMARTLibrary/src/nl/tue/buildingsmart/schema/ListType.java: -------------------------------------------------------------------------------- 1 | package nl.tue.buildingsmart.schema; 2 | 3 | /****************************************************************************** 4 | * Copyright (C) 2009-2016 BIMserver.org 5 | * 6 | * This program is free software: you can redistribute it and/or modify 7 | * it under the terms of the GNU Affero General Public License as 8 | * published by the Free Software Foundation, either version 3 of the 9 | * License, or (at your option) any later version. 10 | * 11 | * This program is distributed in the hope that it will be useful, 12 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 13 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 14 | * GNU Affero General Public License for more details. 15 | * 16 | * You should have received a copy of the GNU Affero General Public License 17 | * along with this program. If not, see {@literal}. 18 | *****************************************************************************/ 19 | 20 | public class ListType extends VariableSizeAggregationType { 21 | 22 | public ListType(BaseType element_type) { 23 | super(element_type); 24 | // TODO Auto-generated constructor stub 25 | } 26 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | } 34 | -------------------------------------------------------------------------------- /BuildingSMARTLibrary/src/nl/tue/buildingsmart/schema/LogicalType.java: -------------------------------------------------------------------------------- 1 | package nl.tue.buildingsmart.schema; 2 | 3 | /****************************************************************************** 4 | * Copyright (C) 2009-2016 BIMserver.org 5 | * 6 | * This program is free software: you can redistribute it and/or modify 7 | * it under the terms of the GNU Affero General Public License as 8 | * published by the Free Software Foundation, either version 3 of the 9 | * License, or (at your option) any later version. 10 | * 11 | * This program is distributed in the hope that it will be useful, 12 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 13 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 14 | * GNU Affero General Public License for more details. 15 | * 16 | * You should have received a copy of the GNU Affero General Public License 17 | * along with this program. If not, see {@literal}. 18 | *****************************************************************************/ 19 | 20 | public class LogicalType extends SimpleType { 21 | 22 | public LogicalType() { 23 | super(); 24 | // TODO Auto-generated constructor stub 25 | } 26 | 27 | } 28 | -------------------------------------------------------------------------------- /BuildingSMARTLibrary/src/nl/tue/buildingsmart/schema/NamedType.java: -------------------------------------------------------------------------------- 1 | package nl.tue.buildingsmart.schema; 2 | 3 | /****************************************************************************** 4 | * Copyright (C) 2009-2016 BIMserver.org 5 | * 6 | * This program is free software: you can redistribute it and/or modify 7 | * it under the terms of the GNU Affero General Public License as 8 | * published by the Free Software Foundation, either version 3 of the 9 | * License, or (at your option) any later version. 10 | * 11 | * This program is distributed in the hope that it will be useful, 12 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 13 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 14 | * GNU Affero General Public License for more details. 15 | * 16 | * You should have received a copy of the GNU Affero General Public License 17 | * along with this program. If not, see {@literal}. 18 | *****************************************************************************/ 19 | 20 | public abstract class NamedType implements BaseType, TypeOrRule { 21 | private String name = ""; 22 | //TODO Where Rules 23 | 24 | public NamedType(String name) { 25 | super(); 26 | this.name = name; 27 | } 28 | 29 | public String getName() { 30 | return name; 31 | } 32 | 33 | public void setName(String name) { 34 | this.name = name; 35 | } 36 | 37 | } 38 | -------------------------------------------------------------------------------- /BuildingSMARTLibrary/src/nl/tue/buildingsmart/schema/NumberType.java: -------------------------------------------------------------------------------- 1 | package nl.tue.buildingsmart.schema; 2 | 3 | /****************************************************************************** 4 | * Copyright (C) 2009-2016 BIMserver.org 5 | * 6 | * This program is free software: you can redistribute it and/or modify 7 | * it under the terms of the GNU Affero General Public License as 8 | * published by the Free Software Foundation, either version 3 of the 9 | * License, or (at your option) any later version. 10 | * 11 | * This program is distributed in the hope that it will be useful, 12 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 13 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 14 | * GNU Affero General Public License for more details. 15 | * 16 | * You should have received a copy of the GNU Affero General Public License 17 | * along with this program. If not, see {@literal}. 18 | *****************************************************************************/ 19 | 20 | public class NumberType extends SimpleType { 21 | 22 | public NumberType() { 23 | super(); 24 | // TODO Auto-generated constructor stub 25 | } 26 | 27 | } 28 | -------------------------------------------------------------------------------- /BuildingSMARTLibrary/src/nl/tue/buildingsmart/schema/PopulationDependendBound.java: -------------------------------------------------------------------------------- 1 | package nl.tue.buildingsmart.schema; 2 | 3 | /****************************************************************************** 4 | * Copyright (C) 2009-2016 BIMserver.org 5 | * 6 | * This program is free software: you can redistribute it and/or modify 7 | * it under the terms of the GNU Affero General Public License as 8 | * published by the Free Software Foundation, either version 3 of the 9 | * License, or (at your option) any later version. 10 | * 11 | * This program is distributed in the hope that it will be useful, 12 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 13 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 14 | * GNU Affero General Public License for more details. 15 | * 16 | * You should have received a copy of the GNU Affero General Public License 17 | * along with this program. If not, see {@literal}. 18 | *****************************************************************************/ 19 | 20 | public class PopulationDependendBound extends Bound { 21 | 22 | } 23 | -------------------------------------------------------------------------------- /BuildingSMARTLibrary/src/nl/tue/buildingsmart/schema/RealType.java: -------------------------------------------------------------------------------- 1 | package nl.tue.buildingsmart.schema; 2 | 3 | /****************************************************************************** 4 | * Copyright (C) 2009-2016 BIMserver.org 5 | * 6 | * This program is free software: you can redistribute it and/or modify 7 | * it under the terms of the GNU Affero General Public License as 8 | * published by the Free Software Foundation, either version 3 of the 9 | * License, or (at your option) any later version. 10 | * 11 | * This program is distributed in the hope that it will be useful, 12 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 13 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 14 | * GNU Affero General Public License for more details. 15 | * 16 | * You should have received a copy of the GNU Affero General Public License 17 | * along with this program. If not, see {@literal}. 18 | *****************************************************************************/ 19 | 20 | public class RealType extends SimpleType { 21 | 22 | public RealType() { 23 | super(); 24 | // TODO Auto-generated constructor stub 25 | } 26 | 27 | } 28 | -------------------------------------------------------------------------------- /BuildingSMARTLibrary/src/nl/tue/buildingsmart/schema/Schema.java: -------------------------------------------------------------------------------- 1 | package nl.tue.buildingsmart.schema; 2 | 3 | /****************************************************************************** 4 | * Copyright (C) 2009-2016 BIMserver.org 5 | * 6 | * This program is free software: you can redistribute it and/or modify 7 | * it under the terms of the GNU Affero General Public License as 8 | * published by the Free Software Foundation, either version 3 of the 9 | * License, or (at your option) any later version. 10 | * 11 | * This program is distributed in the hope that it will be useful, 12 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 13 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 14 | * GNU Affero General Public License for more details. 15 | * 16 | * You should have received a copy of the GNU Affero General Public License 17 | * along with this program. If not, see {@literal}. 18 | *****************************************************************************/ 19 | 20 | public interface Schema { 21 | 22 | EntityDefinition getEntityBNNoCaseConvert(String string); 23 | 24 | EntityDefinition getEntityBN(String name); 25 | } -------------------------------------------------------------------------------- /BuildingSMARTLibrary/src/nl/tue/buildingsmart/schema/SchemaDefinition.java: -------------------------------------------------------------------------------- 1 | package nl.tue.buildingsmart.schema; 2 | 3 | /****************************************************************************** 4 | * Copyright (C) 2009-2016 BIMserver.org 5 | * 6 | * This program is free software: you can redistribute it and/or modify 7 | * it under the terms of the GNU Affero General Public License as 8 | * published by the Free Software Foundation, either version 3 of the 9 | * License, or (at your option) any later version. 10 | * 11 | * This program is distributed in the hope that it will be useful, 12 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 13 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 14 | * GNU Affero General Public License for more details. 15 | * 16 | * You should have received a copy of the GNU Affero General Public License 17 | * along with this program. If not, see {@literal}. 18 | *****************************************************************************/ 19 | 20 | import java.util.ArrayList; 21 | import java.util.HashMap; 22 | import java.util.Iterator; 23 | 24 | /** 25 | * Holds the definitions of TYPEs(see {@link BaseType} and its 26 | * implementations), ENTITYs (see {@link EntityDefinition}) and 27 | * their ATTRIBUTEs (see {@link Attribute} as defined in a ISO 28 | * 10303 EXPRESS schema. 29 | * 30 | * @author Jakob Beetz 31 | * 32 | */ 33 | @SuppressWarnings("all") 34 | public class SchemaDefinition implements Schema { 35 | 36 | /** 37 | * the name of the schema 38 | */ 39 | private String name; 40 | 41 | /** 42 | * a map of all {@link EntityDefinition}s by their UPPERCASE names as keys 43 | * in this schema 44 | */ 45 | private HashMap entitiesBN = new HashMap(); 46 | /** 47 | * a list of all {@link EntityDefinition}s in this schema 48 | */ 49 | private ArrayList entities = new ArrayList(); 50 | 51 | /** 52 | * a hash map of all EXPRESS TYPE definitions in this schema 53 | * with the UPPERCASE name of the type as its keys 54 | */ 55 | private HashMap typesBN = new HashMap(); 56 | 57 | /** 58 | * a List of all EXPRESS TYPE definitions in this schema 59 | */ 60 | 61 | private ArrayList types = new ArrayList(); 62 | 63 | /** 64 | * hash map of an ordered list of all parents of an ENTITY 65 | * definition. First element is the direct supertype, last the root 66 | * supertype 67 | */ 68 | private HashMap> parents = new HashMap>(); 69 | 70 | /** 71 | * hash map of all relations that are defined in the EXPRESS 72 | * ATTRIBUTEs defined locally to a given 73 | * {@link EntityDefinition}.
Note:ArrayList does not include 74 | * relations to other entities defined in supertypes 75 | */ 76 | private HashMap> entityRelations = new HashMap>(); 77 | 78 | private byte[] schemaData; 79 | 80 | /** 81 | * @param ent 82 | * the {@link EntityDefinition} to be added to the schema 83 | * @return true if adding the definition to the schema succeeded 84 | * 85 | */ 86 | public boolean addEntity(EntityDefinition ent) { 87 | // TODO exception handling 88 | String entName = ent.getName(); 89 | entities.add(ent); 90 | entitiesBN.put(entName.toUpperCase(), ent); 91 | 92 | return true; 93 | } 94 | 95 | /** 96 | * @param type 97 | * the {@link DefinedType} to be added to the total list of types 98 | * defined in this schema 99 | * @return true if successfully added the type definition 100 | */ 101 | public boolean addType(DefinedType type) { 102 | types.add(type); 103 | typesBN.put(type.getName().toUpperCase(), type); 104 | return true; 105 | } 106 | 107 | public DefinedType getTypeBN(String name) { 108 | return typesBN.get(name.toUpperCase()); 109 | } 110 | 111 | public void constructEntityRelationsMap() { 112 | entityRelations.clear(); 113 | Iterator ei = entities.iterator(); 114 | while (ei.hasNext()) { 115 | EntityDefinition ent = (EntityDefinition) ei.next(); 116 | if (!ent.getAttributes().isEmpty()) { 117 | Iterator ai = ent.getAttributes().iterator(); 118 | while (ai.hasNext()) { 119 | Attribute at = (Attribute) ai.next(); 120 | if (at instanceof ExplicitAttribute) { 121 | BaseType bt = ((ExplicitAttribute) at).getDomain(); 122 | if (bt instanceof EntityDefinition) { 123 | ArrayList rels = entityRelations.get(ent); 124 | if (rels == null) { 125 | entityRelations.put(ent, new ArrayList()); 126 | rels = entityRelations.get(ent); 127 | } 128 | rels.add((EntityDefinition) bt); 129 | } 130 | 131 | } 132 | } 133 | } 134 | } 135 | } 136 | 137 | public void constructHirarchyMap() { 138 | parents.clear(); 139 | this.parents = new HashMap>(); 140 | Iterator ei = entities.iterator(); 141 | while (ei.hasNext()) { 142 | EntityDefinition ent = (EntityDefinition) ei.next(); 143 | if (!ent.getSupertypes().isEmpty()) { 144 | Iterator iter = ent.getSupertypes().iterator(); 145 | 146 | while (iter.hasNext()) { 147 | EntityDefinition parent = (EntityDefinition) iter.next(); 148 | if (parents.get(parent) == null) 149 | parents.put(parent, new ArrayList()); 150 | ArrayList children = parents.get(parent); 151 | children.add(ent); 152 | parent.addSubtype(ent); 153 | // System.out.println("adding "+ent.getName()+ " to "+ 154 | // parent.getName()); 155 | } 156 | 157 | } 158 | } 159 | 160 | } 161 | 162 | /** 163 | * 164 | * @param name 165 | * @return a BaseType with the given Name (can be a TYPE or an ENTITY) 166 | */ 167 | public BaseType getBaseTypeBN(String name) { 168 | BaseType bt; 169 | bt = typesBN.get(name.toUpperCase()); 170 | if (bt == null) 171 | bt = entitiesBN.get(name.toUpperCase()); 172 | if (bt == null && name.equalsIgnoreCase("real")) 173 | return new RealType(); 174 | if (bt == null && name.equalsIgnoreCase("integer")) 175 | return new IntegerType(); 176 | if (bt == null && name.equalsIgnoreCase("binary")) 177 | return new BinaryType(); 178 | if (bt == null && name.equalsIgnoreCase("string")) 179 | return new StringType(); 180 | if (bt == null && name.equalsIgnoreCase("logical")) 181 | return new LogicalType(); 182 | 183 | return bt; 184 | } 185 | 186 | public EntityDefinition getEntityBN(String name) { 187 | return entitiesBN.get(name.toUpperCase()); 188 | } 189 | 190 | public EntityDefinition getEntityBNNoCaseConvert(String name) { 191 | return entitiesBN.get(name); 192 | } 193 | 194 | public HashMap getEnitiesBN() { 195 | return entitiesBN; 196 | } 197 | 198 | public void setEnitiesBN(HashMap enitiesBN) { 199 | this.entitiesBN = enitiesBN; 200 | } 201 | 202 | public ArrayList getEntities() { 203 | return entities; 204 | } 205 | 206 | public void setEntities(ArrayList entities) { 207 | this.entities = entities; 208 | } 209 | 210 | public String getName() { 211 | return name; 212 | } 213 | 214 | public void setName(String name) { 215 | this.name = name; 216 | } 217 | 218 | public HashMap getTypesBN() { 219 | return typesBN; 220 | } 221 | 222 | public void setTypesBN(HashMap types) { 223 | this.typesBN = types; 224 | } 225 | 226 | public ArrayList getTypes() { 227 | return types; 228 | } 229 | 230 | public void setTypes(ArrayList typesBN) { 231 | this.types = typesBN; 232 | } 233 | 234 | public SchemaDefinition(String name) throws Exception { 235 | super(); 236 | this.name = name; 237 | 238 | } 239 | 240 | public SchemaDefinition() { 241 | super(); 242 | } 243 | 244 | public HashMap> getParents() { 245 | return parents; 246 | } 247 | 248 | public ArrayList getEntityChildren(EntityDefinition ent) { 249 | return parents.get(ent); 250 | } 251 | 252 | public ArrayList getEntityRelations(EntityDefinition ent) { 253 | 254 | if (entityRelations.get(ent) == null) 255 | return new ArrayList(); 256 | else 257 | return entityRelations.get(ent); 258 | } 259 | 260 | public byte[] getSchemaData() { 261 | return schemaData; 262 | } 263 | 264 | public void setSchemaData(byte[] schemaData) { 265 | this.schemaData = schemaData; 266 | } 267 | 268 | // TODO add rules and external schemas 269 | } -------------------------------------------------------------------------------- /BuildingSMARTLibrary/src/nl/tue/buildingsmart/schema/SchemaException.java: -------------------------------------------------------------------------------- 1 | package nl.tue.buildingsmart.schema; 2 | 3 | /****************************************************************************** 4 | * Copyright (C) 2009-2016 BIMserver.org 5 | * 6 | * This program is free software: you can redistribute it and/or modify 7 | * it under the terms of the GNU Affero General Public License as 8 | * published by the Free Software Foundation, either version 3 of the 9 | * License, or (at your option) any later version. 10 | * 11 | * This program is distributed in the hope that it will be useful, 12 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 13 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 14 | * GNU Affero General Public License for more details. 15 | * 16 | * You should have received a copy of the GNU Affero General Public License 17 | * along with this program. If not, see {@literal}. 18 | *****************************************************************************/ 19 | 20 | public class SchemaException extends Exception { 21 | 22 | private static final long serialVersionUID = 4627067690205941773L; 23 | 24 | public SchemaException(String message) { 25 | super(message); 26 | } 27 | } 28 | -------------------------------------------------------------------------------- /BuildingSMARTLibrary/src/nl/tue/buildingsmart/schema/SelectType.java: -------------------------------------------------------------------------------- 1 | package nl.tue.buildingsmart.schema; 2 | 3 | /****************************************************************************** 4 | * Copyright (C) 2009-2016 BIMserver.org 5 | * 6 | * This program is free software: you can redistribute it and/or modify 7 | * it under the terms of the GNU Affero General Public License as 8 | * published by the Free Software Foundation, either version 3 of the 9 | * License, or (at your option) any later version. 10 | * 11 | * This program is distributed in the hope that it will be useful, 12 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 13 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 14 | * GNU Affero General Public License for more details. 15 | * 16 | * You should have received a copy of the GNU Affero General Public License 17 | * along with this program. If not, see {@literal}. 18 | *****************************************************************************/ 19 | 20 | import java.util.ArrayList; 21 | import java.util.HashMap; 22 | 23 | public class SelectType extends DefinedType implements ConstructedType { 24 | 25 | 26 | private HashMap selectionsBN = new HashMap(); 27 | private ArrayList selections = new ArrayList(); 28 | 29 | 30 | public SelectType(String name, UnderlyingType domain) { 31 | super(name, domain); 32 | // TODO Auto-generated constructor stub 33 | } 34 | 35 | /** Copy constructor (shallow copy) 36 | * @param old 37 | */ 38 | public SelectType (SelectType old){ 39 | super(old.getName(),old.getDomain() ); 40 | this.setSelections(old.getSelections()); 41 | this.setSelectionsBN(old.getSelectionsBN()); 42 | } 43 | 44 | public SelectType(String name){ 45 | 46 | super(name); 47 | 48 | super.setDomain(new StringType()); 49 | 50 | } 51 | 52 | 53 | 54 | public boolean addSelection(NamedType type){ 55 | selectionsBN.put(type.getName(), type); 56 | selections.add(type); 57 | return true; 58 | } 59 | 60 | public NamedType getSelectionBN(String name){ 61 | return selectionsBN.get(name); 62 | } 63 | 64 | public ArrayList getSelections() { 65 | return selections; 66 | } 67 | 68 | public void setSelections(ArrayList selections) { 69 | this.selections = selections; 70 | } 71 | 72 | public HashMap getSelectionsBN() { 73 | return selectionsBN; 74 | } 75 | 76 | public void setSelectionsBN(HashMap selectionsBN) { 77 | this.selectionsBN = selectionsBN; 78 | } 79 | 80 | } 81 | -------------------------------------------------------------------------------- /BuildingSMARTLibrary/src/nl/tue/buildingsmart/schema/SetType.java: -------------------------------------------------------------------------------- 1 | package nl.tue.buildingsmart.schema; 2 | 3 | /****************************************************************************** 4 | * Copyright (C) 2009-2016 BIMserver.org 5 | * 6 | * This program is free software: you can redistribute it and/or modify 7 | * it under the terms of the GNU Affero General Public License as 8 | * published by the Free Software Foundation, either version 3 of the 9 | * License, or (at your option) any later version. 10 | * 11 | * This program is distributed in the hope that it will be useful, 12 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 13 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 14 | * GNU Affero General Public License for more details. 15 | * 16 | * You should have received a copy of the GNU Affero General Public License 17 | * along with this program. If not, see {@literal}. 18 | *****************************************************************************/ 19 | 20 | public class SetType extends VariableSizeAggregationType { 21 | 22 | public SetType(BaseType element_type) { 23 | super(element_type); 24 | // TODO Auto-generated constructor stub 25 | } 26 | 27 | 28 | 29 | 30 | } 31 | -------------------------------------------------------------------------------- /BuildingSMARTLibrary/src/nl/tue/buildingsmart/schema/SimpleType.java: -------------------------------------------------------------------------------- 1 | package nl.tue.buildingsmart.schema; 2 | 3 | /****************************************************************************** 4 | * Copyright (C) 2009-2016 BIMserver.org 5 | * 6 | * This program is free software: you can redistribute it and/or modify 7 | * it under the terms of the GNU Affero General Public License as 8 | * published by the Free Software Foundation, either version 3 of the 9 | * License, or (at your option) any later version. 10 | * 11 | * This program is distributed in the hope that it will be useful, 12 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 13 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 14 | * GNU Affero General Public License for more details. 15 | * 16 | * You should have received a copy of the GNU Affero General Public License 17 | * along with this program. If not, see {@literal}. 18 | *****************************************************************************/ 19 | 20 | public abstract class SimpleType implements BaseType, UnderlyingType { 21 | 22 | 23 | 24 | public SimpleType() { 25 | 26 | 27 | } 28 | 29 | 30 | } 31 | -------------------------------------------------------------------------------- /BuildingSMARTLibrary/src/nl/tue/buildingsmart/schema/StringType.java: -------------------------------------------------------------------------------- 1 | package nl.tue.buildingsmart.schema; 2 | 3 | /****************************************************************************** 4 | * Copyright (C) 2009-2016 BIMserver.org 5 | * 6 | * This program is free software: you can redistribute it and/or modify 7 | * it under the terms of the GNU Affero General Public License as 8 | * published by the Free Software Foundation, either version 3 of the 9 | * License, or (at your option) any later version. 10 | * 11 | * This program is distributed in the hope that it will be useful, 12 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 13 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 14 | * GNU Affero General Public License for more details. 15 | * 16 | * You should have received a copy of the GNU Affero General Public License 17 | * along with this program. If not, see {@literal}. 18 | *****************************************************************************/ 19 | 20 | public class StringType extends SimpleType { 21 | 22 | public StringType() { 23 | super(); 24 | // TODO Auto-generated constructor stub 25 | } 26 | 27 | 28 | 29 | } 30 | -------------------------------------------------------------------------------- /BuildingSMARTLibrary/src/nl/tue/buildingsmart/schema/TypeOrRule.java: -------------------------------------------------------------------------------- 1 | package nl.tue.buildingsmart.schema; 2 | 3 | /****************************************************************************** 4 | * Copyright (C) 2009-2016 BIMserver.org 5 | * 6 | * This program is free software: you can redistribute it and/or modify 7 | * it under the terms of the GNU Affero General Public License as 8 | * published by the Free Software Foundation, either version 3 of the 9 | * License, or (at your option) any later version. 10 | * 11 | * This program is distributed in the hope that it will be useful, 12 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 13 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 14 | * GNU Affero General Public License for more details. 15 | * 16 | * You should have received a copy of the GNU Affero General Public License 17 | * along with this program. If not, see {@literal}. 18 | *****************************************************************************/ 19 | 20 | public interface TypeOrRule { 21 | 22 | } 23 | -------------------------------------------------------------------------------- /BuildingSMARTLibrary/src/nl/tue/buildingsmart/schema/UnderlyingType.java: -------------------------------------------------------------------------------- 1 | package nl.tue.buildingsmart.schema; 2 | 3 | /****************************************************************************** 4 | * Copyright (C) 2009-2016 BIMserver.org 5 | * 6 | * This program is free software: you can redistribute it and/or modify 7 | * it under the terms of the GNU Affero General Public License as 8 | * published by the Free Software Foundation, either version 3 of the 9 | * License, or (at your option) any later version. 10 | * 11 | * This program is distributed in the hope that it will be useful, 12 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 13 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 14 | * GNU Affero General Public License for more details. 15 | * 16 | * You should have received a copy of the GNU Affero General Public License 17 | * along with this program. If not, see {@literal}. 18 | *****************************************************************************/ 19 | 20 | public interface UnderlyingType { 21 | 22 | } 23 | -------------------------------------------------------------------------------- /BuildingSMARTLibrary/src/nl/tue/buildingsmart/schema/VariableSizeAggregationType.java: -------------------------------------------------------------------------------- 1 | package nl.tue.buildingsmart.schema; 2 | 3 | /****************************************************************************** 4 | * Copyright (C) 2009-2016 BIMserver.org 5 | * 6 | * This program is free software: you can redistribute it and/or modify 7 | * it under the terms of the GNU Affero General Public License as 8 | * published by the Free Software Foundation, either version 3 of the 9 | * License, or (at your option) any later version. 10 | * 11 | * This program is distributed in the hope that it will be useful, 12 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 13 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 14 | * GNU Affero General Public License for more details. 15 | * 16 | * You should have received a copy of the GNU Affero General Public License 17 | * along with this program. If not, see {@literal}. 18 | *****************************************************************************/ 19 | 20 | public abstract class VariableSizeAggregationType extends AggregationType { 21 | 22 | private Bound lower_bound; 23 | private Bound upper_bound; 24 | 25 | 26 | 27 | public VariableSizeAggregationType(BaseType element_type) { 28 | super(element_type); 29 | // TODO Auto-generated constructor stub 30 | } 31 | 32 | public Bound getLower_bound() { 33 | return lower_bound; 34 | } 35 | 36 | public void setLower_bound(Bound lower_bound) { 37 | this.lower_bound = lower_bound; 38 | } 39 | 40 | public Bound getUpper_bound() { 41 | return upper_bound; 42 | } 43 | 44 | public void setUpper_bound(Bound upper_bound) { 45 | this.upper_bound = upper_bound; 46 | } 47 | 48 | } 49 | -------------------------------------------------------------------------------- /BuildingSMARTLibrary/src/nl/tue/buildingsmart/schema/WhereRule.java: -------------------------------------------------------------------------------- 1 | package nl.tue.buildingsmart.schema; 2 | 3 | /****************************************************************************** 4 | * Copyright (C) 2009-2016 BIMserver.org 5 | * 6 | * This program is free software: you can redistribute it and/or modify 7 | * it under the terms of the GNU Affero General Public License as 8 | * published by the Free Software Foundation, either version 3 of the 9 | * License, or (at your option) any later version. 10 | * 11 | * This program is distributed in the hope that it will be useful, 12 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 13 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 14 | * GNU Affero General Public License for more details. 15 | * 16 | * You should have received a copy of the GNU Affero General Public License 17 | * along with this program. If not, see {@literal}. 18 | *****************************************************************************/ 19 | 20 | public class WhereRule implements TypeOrRule { 21 | String label =""; 22 | TypeOrRule parentItem; 23 | } 24 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | Author: Jakob Beetz Eindhoven University of Technology 2 | This is the initial dump of some utility libraries to access STEP schemas and population files. 3 | 4 | Currently only a very limited amount of javadoc tags has been added to the packages 5 | and the sources. 6 | 7 | The library consists of 6 packages: 8 | 9 | - net.sourceforge.osexpress.parser 10 | a parser generator written by Josh Lubel et al in the context of the 11 | OSEXPRESS project. 12 | https://sourceforge.net/projects/osexpress/ 13 | modified and adapted slightly 14 | 15 | - nl.tue.buildingsmart.express.parser 16 | a modfied ANTLR grammar Express2SDAI.g 17 | it makes use of the dictionary package to store an in-memory meta-model of an 18 | ISO 10303 part 11 EXPRESS schema definition file. 19 | The main schemas that have been tested with it are different versions of the 20 | Industry Foundation Classes (IFC) model developed under the umbrella of the 21 | buildingSMART / IAI organization: 22 | http://www.iai-international.org/ 23 | http://www.iai-international.org/Model/IFC(ifcXML)Specs.html 24 | 25 | - nl.tue.buildingsmart.express.dictionary 26 | a meta model structure to capture some of the essential modeling constructs 27 | of the EXPRESS schema definition language. 28 | Many advanced features such as RULE, FUNCTION, QUERY etc. are not implemnted yet 29 | 30 | - nl.tue.buildingsmart.express.population 31 | a JavaCC based file-reader for ISO 10303 part 21 Step Physical File Format (SPFF) 32 | files. This primitive piece creates a large Hashmap of ENTITY and ATTRIBUTE instances 33 | and will quickly go through the memory roof of large population files. 34 | It has been particularly developed with reading in IFC files in mind 35 | The original JavaCC grammar has been developed by Singva Ma 36 | 37 | - nl.tue.buildingsmart.express.population.test 38 | a primitive test that reads in a SPFF (IFC) file given in argv and provided an .exp 39 | EXPRESS schema will spit out some statistics. 40 | 41 | - nl.tue.buildingsmart.emf 42 | a primitive generator that takes and EXPRESS .exp schema and converts it into an ecore 43 | model for the use in the Eclipse Modeling Framework (EMF) 44 | 45 | other highly experimental mappings to RDF(S) and OWL, graphical editors, network visualizers 46 | etc. are available upon request 47 | 48 | 49 | TODO: loads and loads of cleanup, refactoring and documentation. 50 | --------------------------------------------------------------------------------