1. GeometryAttribute complex or not?
  2. AssociationType
  3. Super and extention/restrictions vs Override

jgarnett but geometry is something you want to have an ID on right? Two features can literally share the same geometry (say for a line end point?)...
groldan Feature has attributes. dealing with them is what Feature inherits from Complex
groldan that's the only conflict(question)
jgarnett Understood, and that is my question? Does Geometry have attribtues? Does it have ID?
groldan attributes no, ID may be
brentowens a geometry is sort of the base idea of waht a feature has
darkfrog Anyone here use Oracle Spatial with GeoTools?
jgarnett gabriel you may be right, I am just trying to set limits on what we are doing here....
jgarnett Hi darkfrog, (I looked at my schedule and I can sit down with oracle debugging on monday)
jgarnett We are bashing out a new FeatureModel on a timeline right ... now.
jgarnett Gabriel where were/are we?
groldan is geometryattribute complex?
darkfrog For some reason the problem is occuring in Oracle's driver....when resultSet.getObject() is called on a Spatial column.
groldan Gabriel: no, Jody: yes(question)
jgarnett We can remove GeometryAttribute if it is only going to be simple.
jgarnett brent?
groldan at least it is used for utility methods, yes, we can
brentowens geometry seems to be too much of a part of a feature
brentowens that is should be smunched over to feature
jgarnett geometry is the only thing that makes feature a features.
jgarnett If not it would just be complex ?
brentowens yeh
groldan have it as a marker interface has more sense than javadocing that set/getAttribute should not be used?
groldan hi Chris
cholmes Hi guys! Just wanted to give you some encouragement on the feature type stuff.
jgarnett Thanks, it hurt my mind.
cholmes I still have yet to even attempt to wrap my brain around it.
groldan thanks, I need it!
cholmes I'll try to check it all out soon though.
jgarnett We are trying to figure out of Geometry has structure that is worth XPathing into.
jgarnett IE is it Complex or Simple.
jgarnett however cholmes here is the other oracle module maintainer.
brentowens cholmes, can I get access to GS svn?
jgarnett Chris Holmes used to run the geoserver show, now he just shuffles around offering encouragement (wink)
cholmes (wink)
brentowens people are putting many dimentions onto geometries
brentowens yesterday they were talking about 5d and wahtnot
cholmes Sure brentowens. But I have no idea how to do it.
cholmes I don't know that I even have access these days, after the codehaus move.
brentowens hehe, ok. No hurry
cholmes dblasby knows.
brentowens he sent me to ask you (wink)
cholmes I for permission?
cholmes Yeah, you totally have permission, you had commit rights before I think...
brentowens to set up my svn account
brentowens yes
cholmes or at least earned them with the validation stuff.
jgarnett chris anythought on Geometry: complex or not ?
jgarnett It is like hot or not - but with consequences....
brentowens geometry: not complex
brentowens if geometries are allowed to have attributes, and be complex, it could get scary
groldan note geometries was always simple, since we only had simple?
jgarnett Okay - I am happy for them to remain simple, I just want it to be a choice we make...
jgarnett note that the XML land geometry is not simple and the can xpath right the way in ...
jgarnett I am still not sure, James may need access to some of the geometry stuff via xpath to make his SLD documents work.
cholmes Depends on if others are using this channel.
jgarnett Trying to figure out how.
jgarnett I am just known for being crazy and writing documentation/apis that nobody understands.
jgarnett And on that note shall we make Geometry simple ?
jgarnett And indeed remove it from the picture? (Or make it a marker interface with a restriction on <T> <T extends Geometry> getBinding() ?
brentowens yes jody
groldan yes, and provide the utility methods you need for xpathing, like getBounds
cholmes though I often work later, to catch up with people.
groldan getCRS, getId, that shuld be all?
jgarnett Thing is if the utility methods are there then we should reveal it through the type system as well ...
jgarnett utility methods only work for programmers
jgarnett not xpath programmers ...
darkfrog XPath est good. :-p
jgarnett So lets change it to be simple and see how far we get when it comes time to support xpath.
jgarnett If we need to change it, we can change it.
groldan agreed
jgarnett (Note Complex is allowed to have a binding class still - the two are not separate)
jgarnett complex really just describes what xpath is allowed to reflect into ...)
groldan you mean ComplexType?
jgarnett Yeah.
jgarnett 2 - Need for association type
jgarnett (I will make the change while we wait, brent please let us know when you have the code)
groldan wait, we can move the binding to SimpleType
jgarnett I don't have simple type.
groldan actually I think simple type has its place for getRestrictions
groldan since restrictions (in the facet sense) only applies to simple?
brentowens yes, setting up the code
brentowens start hacking away
jgarnett That is a good question, gabriel - do our restrictions only apply to simple?
groldan look at
groldan hey, we can extend the concept but... just out of scope
jgarnett huh?
groldan and how do you will encode to gml then?
jgarnett If it lets me remove a class it is worth it ...
jgarnett Gabriel - can I ask that we work from my picture? I went to a lot of trouble to code up the best compromise between our two pictures.
groldan ok, so complextype returns Restriction.NONE?
jgarnett aka can we work from the code base.
jgarnett For a GML based Feature that would be a same assumption.
jgarnett For an Oracle based Feature they may actually have some limitiations (think of table triggers).
groldan Jody, we can, I just can't use omondo, it is complaining about not sharing the project, and I disabled svn, etc
jgarnett That is fine, I can draw the picture.
jgarnett (I think you need to disable subclipse for Omondo to work)
jgarnett Guys I need a GeometryType if I am to make GeometryAttribtue extend Simple.
groldan so, restriction and binding (I disabled it, it says only the project owner can use it)
brentowens what does simple extend?
jgarnett I think you were going to talk about 2- Association Types ?
jgarnett I don't have them
jgarnett and don't understand enough to implement them.
groldan yeah, let me explain it, since my english is nifty:
groldan as from the GML spec, whenever you have to refer to an externally defined type through a property, you shuold use an association type, not the type directly
groldan that's not the only rationale:
groldan suppose you have a nested feature
groldan FeatureType is a Type now, right? but: you don't have the feature directly, you have a level of indirection: your attribute wich holds a feature of a given type
groldan don't know if I'm being clear
jgarnett I think you are
jgarnett but isn't that a side effect of XML
jgarnett In object land we can just have the Object there.
jgarnett It is a pointer after all.
jgarnett It is only when writing out that you will need to break down things with associations (because you cannot have the same Geometry ID twice in the same document)
jgarnett Is that right? Or do I understand XML wrong ....
jgarnett We "could" set up the idea of a ProxyComplex that just holds the ID / Type of the real complex.
jgarnett But then we would need to define the lookup service where people could stick in IDs and get back the real thing ...
jgarnett In XML this would be the "Application" and the type of it would be the "ApplicationSchema"
jgarnett (I could be way off base, judging from your silience I might be)
groldan just thinking...
groldan (it isn't so easy to think in english (sad)
jgarnett I do like the idea of ApplicationSchema as a first class object in our system, it would save poor old GeoServer a lot of trouble (it gives them something to hold the Types in)
groldan yes, that would be good
jgarnett Question - (for Geometry)
jgarnett We have ID at the Complex level.
jgarnett But we know that Geometry gets IDs in GML docs.
jgarnett What am I to do?
jgarnett Does the role of an Application make sense?
brentowens geometry subclasses attribute?
jgarnett It is really the GMLDocument that geotools tride to implement before ...
jgarnett GeometryAttribtue subclasses Attribute (it is what you guys asked me to do)
jgarnett It worked, but we lost our ID.
groldan you have a Feature property, named "myFeature". You assign it multiplicity. you have to do that through the association type "myFeature", so you can reuse the FeatureType definition
jgarnett whoe have to think that through ...
groldan that goes for any kind of complex you want to reuse
jgarnett We don't have "Feature property", I assume you mean type? If so we don't assign it multiplicity.
brentowens a geometry attribute will be part of a feature, can the geometry just grab the feature's id? Or does it need a unique one?
jgarnett It is used by a Schema node with multiplicity.
brentowens pull out an Identifiable interface from complex
brentowens have complex extend it and geometryAttribute extend it
jgarnett Okay - I will move it up to Type.
jgarnett oh - multiple inheirtence?
brentowens yes =)
jgarnett remember that it appears twice, we also need it in the Type information, the isIdentifiable() boolean
jgarnett so we know if the value has to be non null.
groldan that should work
jgarnett brent + gabriel about to commit with the Geometry change, ID moved up to attribtue ...
brentowens ok
groldan cool
groldan so you moved isIdentified to Type?
CIA-6 jgarnett * r15566 geotools/spike/opengis/ (7 files in 4 dirs): Geometry switched over to Attribtue with consequences
jgarnett Yes
jgarnett Please update and have a look, I will try and post a new picture.
groldan ok
jgarnett Gabriel do you want to think about AssociationTypes vs "ProxyComplex and ApplicationSchem"
groldan yes
jgarnett WHile I draw a picture can I ask you guys to look at the extention and restriction methods in the class "Schemas"
jgarnett This is important as it represents acutally using this model of ours.
groldan doing it
jgarnett Aka it is what client code has to do, you can see it answer questions like what is the actual schema of this Type (and walking up all the super types to generate the answer).
cholmes Well, it allows us to catch compilation errors in GeoTools. Like if someone were to change the jdbc base class, and it caused a compile error, then the person who did the change would know, instead of just seeing a continually not building oracle module.
cholmes But I do understand your point. Maybe not including it in the bin release is the answer? Is it included in the bin release now?
CIA-6 jgarnett * r15567 geotools/spike/opengis/test/org/geotools/feature/impl/ oops missed one
jgarnett sorry guys had a compile error in an implementation ....
groldan I guess restriction works like this: if you have the parent's childs to appear, you HAVE to duplicate them, if not, you're saying that that element is not allowed in your subtype
darkfrog cholmes, oracle module will build so long as you have the Oracle jar in your need to just have an entry for where the jar SHOULD be and make sure they put it there before trying to compile.
groldan is that what's intended to do in the code?
jgarnett groldan right?
jgarnett But it suxs for usability.
groldan seems it is adding all the super childs?
jgarnett I like the java way of just having overrides better.
jgarnett I was thinking an override with multiplicity 0:0 would let you encode a "removal"
jgarnett brentowens do you understand XML extention and restriction?
cholmes Yeah, but the point of the dummy jar is to not force any and everyone who uses geotools to go and download oracle jars, when they just want to build it...
jgarnett extention just tacks the new stuff on the end - of the sequence, choice, or set.
jgarnett restriction is just dumb.
brentowens sort of
darkfrog cholmes, I thought that problem was solved by having this as a plugin? I mean, it's the oracle-spacial plugin where this is....
brentowens ok
jgarnett It lets you completly overwrite your parent, so most times people exactly echo every last thing their parent does
jgarnett and just change a few of the multiplicity values ...
jgarnett gabriel is my description of the XML way accurate?
groldan if we implement restriction that way, wouldn't it be like extending a java class just for throw an UnsupportingOperationException?
groldan I mean, obligating the user to replicate the parent when it is wanting to restrict it?
jgarnett now that we don't use SDOAPI, it may be possible.
darkfrog cholmes, if they don't have the Oracle jar, then I can't imagine any reason why they would be building the plugin for Oracle Spatial....
cholmes Yeah jgarnett, that may be the way to go.
jgarnett gabriel what do you think of my idea?
darkfrog jgarnett++
jgarnett I was thinking of my idea for making Complex.getSuper() consistent?
jgarnett brentowens + gabriel still here?
brentowens yes
groldan yes
jgarnett Agenda: 1) done 2) thinking 3) thinking
jgarnett Is that about right?
brentowens =)
jgarnett What I would like you to think about for 3 is this
jgarnett can we use getSuper to provide "override"
jgarnett rather then "extention" or "restriction"
jgarnett we would need to define "override" carefully so gabriel can still acomplish what he needs to.
jgarnett So here is a definition of override:
jgarnett 1. Will combine schema of child with schema of parent
jgarnett 2. parent schema will be used as a starting point
jgarnett 3. Child schema will be mixed in at level 0 of the schema (that may be a choice, sequence or set)
jgarnett For every schema in the child sequence it will have a chance to "override" an entry in the parent.
jgarnett For extention: use a single Schema.Sequence it will be tacked on the end.
brentowens override: makes sense
jgarnett For restriction: override each and every Schema from the parent.
jgarnett if you need to remove, override with multiplicity 0:0
jgarnett brentowens - it "may" make sense, I just made it up after all. We need to see if it solves the problem, not if I can make something up on the fly...
groldan is 0:0 valid?
jgarnett It is if we say it is, it would indicate you are not allowed to have even a single one of the indicated thing.
jgarnett A good definition of remove ...
groldan yeah, I know.. just thinking if its the best way... and I think it is
groldan It's clear. People often is now very used to the XML way, and they shouldn't to be able to use our API
groldan (is now --> is not)
jgarnett It will take some work to document "override" and the way to translate extention and restriction into "override".
groldan about 2), its covered by a single Type with a Node schema
jgarnett It will also take work to code it up.
jgarnett 2 is Assoication?
groldan yes
jgarnett Don't I need to know the type of the associated thing?
jgarnett And this really only works if we provide a way for them to cash in their assoication for the real thing ...
groldan the type is its name and the associated type
jgarnett We can't have a standard data structure with proxy/assoication and not provide a way to get at the real content.
groldan wait, Node.getType returns its own type? if so, we do need AssociationType
jgarnett Otherwise we could not write code against just these interfaces ...
jgarnett Node.getType() returns the type of the thing allowed at that position in the schema.
jgarnett Schema just serves to order the Types.
groldan right, was getting confused, so I think we need the association
jgarnett okay but for me to agree to an assoication I need more stuff
jgarnett If not lets leave it out.
jgarnett either we don't have association, and the model is "resolved" when people walk around it.
jgarnett Or we do have associations and we have a place to look them up.
jgarnett If we don't have a place to look them up, then people cannot walk around the data.
jgarnett Even so it will hurt, we would not be able to pass a Feature into a method and be able to understand it.
jgarnett We would need to pass in the "Context" the feature is in, on the off chance it contains an assoication - if we didn't the Feature may prove useless.
jgarnett Is the tradeoff making sense gabriel/brent ?
jgarnett I will add cholmes to my ? list ...
brentowens kinda, let me absorb
jgarnett brentowens - I think it is kind of like having a proxy object.
jgarnett it has an ID that client code is supposed to understand.
jgarnett and be able to use to look up the real data.
brentowens ok
jgarnett For a GML document the ID is clear, find the thing in the DOM that matches.
brentowens seems indirect, will people like that?
jgarnett For a database you would go off with another SQL request ...
jgarnett But it means you cannot write generic code unless we find a way to let
jgarnett the generic code make that lookup by ID>
jgarnett Complex Contenxt.assoication( String ID )
jgarnett where every Complext should have a getContext() entry?
jgarnett A GML Doc can have a Context based on its DOM. A Database can do lookup via an SQL query.
jgarnett At least ID is opaque, so the SQL query could be used as the ID (wink)
brentowens nasty
groldan he, except it'll roughly complain with the ID restrictions
jgarnett In GML the Context is called the Document (or Application) and the schema of the Document is called the ApplicationSchema.
jgarnett not sure I understood about ID restrictions? It is a string is it not?
groldan a string with some restrictions, like starting with a letter or underscore, containing only letters or numbers or another well defined characters
groldan that if we want to produce valid GML
groldan ids have to be of XML type ID
lavila Hi, I am triying to write SLDs using classes from org.geotools.styling, does anybody has examples of writing SLD? or should I produce the xml by hand as text?
jgarnett so we woudl have ID = "postgis://134.456.23.32//hiway/31A"
jgarnett lavila - there are examples in the tutorial pages. You can also find examples in udig where we make the default styles based on the feature type.
lavila thanks jody
jgarnett groldan - ID for our system have to be a string that means something
jgarnett and is unique to the physical thing being modeled.
jgarnett We did not say anything about restrictions.
jgarnett It is opaque, so GML can produce IDs that match its needs ...
jgarnett Still we are making progress. When is your document going out Gabriel, is this our last kick at the can. Or can you still have some open issues?
groldan I'm not trying to complicate things more. Suppose geoserver produces a GetFeature response whose fids are not valid, and it is being consumed by a validating parser...
groldan I guess it makes sense to let people take care of creating a valid FID if they care?
jgarnett I do think the ID model used for features simplistic. We are supposed to hold the value as unique - in the entire universe.
jgarnett irrespective of version.
groldan I'm closing it today with a proposal, which does not means that we still can make more progress, of cuorse
jgarnett And for GML it needs to be unique within one document.
brentowens as long as ID is unique, it shouldn't matter
groldan that's another matter from validity
jgarnett I am gone this afternoon, can I ask you to write up the concept of "override", and ask brent to code it up ...
brentowens I won't have time today
jgarnett gabriel we could place Association into the mix, but I don't think we should until we have an idea how it is used.
jgarnett Otherwise we risk making a model that people cannot use.
groldan yes, just one question needs to be answered:
jgarnett You can valigate the model with out association and still produce valid GML with references.
jgarnett (uploading new picture)
groldan suppose you have a table with a field named myFeature, with complete Features as values, in a related table. So myFeature is a relational field. when producing GML, you can chose to use the association pattern or not, though the recommendation is to do it
groldan with association: <Feature1><myFeature><Feature2></Feature2></myFeatyure></Feature1>
groldan without: <Feature1><Feature2/></Feature1>
groldan you should be able of doing the thing in the first example with any complex type defined externally, not just features
groldan ideas?
jgarnett sorry having connection problems ...
jgarnett I don't see the problem ...
groldan did you got my previous line?
jgarnett yes but your example did not make sense to me.
jgarnett brentownes did you get it?
groldan thats the difference between this:
groldan <xs:complexType name="NoAssociationType">
groldan <xs:complexContent>
groldan <xs:extension base="gml:AbstractFeatureType">
groldan <xs:sequence>
groldan <xs:element ref="test:SampleFeature" minOccurs="0" maxOccurs="unbounded" />
groldan </xs:sequence>
groldan </xs:extension>
groldan </xs:complexContent>
groldan </xs:complexType>
groldan and this:
groldan <xs:complexType name="UsingAssociationType">
groldan <xs:complexContent>
groldan <xs:extension base="gml:AbstractFeatureType">
groldan <xs:sequence>
groldan <xs:element name="myFeature" minOccurs="0" maxOccurs="unbounded">
groldan <xs:complexType>
groldan <xs:sequence>
groldan <xs:element ref="test:SampleFeature"/>
groldan </xs:sequence>
groldan </xs:complexType>
groldan </xs:element>
groldan </xs:sequence>
groldan </xs:extension>
groldan </xs:complexContent>
groldan </xs:complexType>
jgarnett Okay we are having a misunderstanding:
jgarnett Gabriel I don't understand what you are trying to do.
groldan in the old days, FeatureType was not a Type by itself, and we used FeatureAttributeType to represent the association
jgarnett are you trying to rename a SampleFeature to be myfeature?
jgarnett we are both lots.
jgarnett lots = lost.
jgarnett And we got the same thing, only this time Node is the association.
jgarnett are you wanting to name the nodes?
groldan its not a rename, myFeature is a container of SampleFeatures, as well as featureMember is on FeatureCollection
groldan does it makes sense now?
jgarnett Not yet.
jgarnett I keep having to scroll back to your example
jgarnett with association: <Feature1><myFeature><Feature2></Feature2></myFeatyure></Feature1>
without: <Feature1><Feature2/></Feature1>
jgarnett <Feature1>Feature2/></Feature1> is wrong?
groldan myFeature is an attribute, following the AssociationType GML pattern, the recommended way of refering to an externally defined object instance.
jgarnett okay so the thing it refers to
jgarnett how does it do that?
jgarnett with an ID?
groldan one of both ways, through an id, or through direct content
groldan but not both
jgarnett I though you were wanting:
<feature1:#1><myfeature assoication=#2/></feature1>
jgarnett <featurecollection>
<feature1:#1><myfeature assoication=#3/></feature1>
jgarnett Something like that?
groldan I don't completely get it, #1 and #2 seems repeated
jgarnett I thought I was writing up what you said.
groldan is <feature:#1> equal to <feature gml:id="1">?
jgarnett sure
jgarnett I think I see your problem
jgarnett the question is this; does the "name" need to move to the Node.
groldan ok. despite #1 and #2 are repeated, thats the idea, just that now that we go complex, we need to extend the concept to any complex type
jgarnett Is it a separate name from that used for the Types?
groldan yes
groldan like the_geom is different from LineString
jgarnett thinking ...
jgarnett _geom is what we use for xpath. So it is what is important.
groldan in your postgis you have a field "the_geom", think on it as an association to a complex attribute of type LineString
groldan that's what actually what we're doing! only that "hardcoded"
jgarnett gabriel I am out of time, you seem to have found a trade off (one I mentioned in javadocs).
jgarnett Consider what the sysem would look like if you move "name" to Node.
groldan since we already knew that we needed to enclose features inside featureMember, and geometries inside its attribute name
groldan I don't want to move name to Node
jgarnett Then I don't get it ...
groldan but adding AssociationType extends ComplexType
jgarnett We all ready have three bits, I don't want/need a forth.
jgarnett And I don't want that because of the other issues AssoicationType opens up, how to resolve
jgarnett Or rather I don't want it until we have a system to deal with it...
groldan so you prefer adding name to Node?
jgarnett question in the above example myfeature always has a sequence of a single Feature2 ?
groldan like in
groldan look for FeaturePropertyType
jgarnett Basically I would like to deal with the containment problem you present, and leave off resolving IDs until we got something more.
groldan note that my concern is not about resolving ids
jgarnett Okay so for you Assoication means a Complex that has a single child element that could be either the real thing or an assoication thing.
jgarnett We can do the AssoicationThing, and put a comment in the javadoc that this is where ProxyComplex would occur if and when we invent it?
groldan exactly
jgarnett Question: Why does this have to be done? Can't we do this already with Complex?
jgarnett Other what to phrase this ... if I made a Assoication how would it be different from a Complex with a schema of a single Node?
jgarnett (or later a sequence of a single Choice)
brentowens I have to go, this was a useful discussion, thanks guys
jgarnett I so have to go as well.
groldan me too, thanks to all
jgarnett I am a bit concerned that we don't have idea of who is doing what.
groldan (thinking on your question jody)
jgarnett I keep asking gabriel for plan, and then keep doing the work myself ;-O
jgarnett Question gabriel are these discussion helping, or slowing you down?
groldan it is intended that the final work is able to make through PMC acceptance, Jody. So its helping
jgarnett Well I am just one PMC, and we need to go simple or we are not going to get anywhere.
jgarnett It would be worth leaving out the ID lookup for the first round just on that alone...
groldan yeah, I need to model a complex type, not to resolve all the issues right now
jgarnett If you can model your Assoication as Complex then we may be very close.
jgarnett We still have a problem with restriction (it is a closed box right now, and that does not work for a standard)
jgarnett But I am into much lunch break, and I am taking the afternoon off ...


Specialists say that <a href="">personal loans</a> help a lot of people to live their own way, just because they are able to feel free to buy needed stuff. Furthermore, some banks present short term loan for young and old people.

Posted by coffey22kathryn at Jul 16, 2010 12:36