Results 1 to 7 of 7
Like Tree1Likes
  • 1 Post By Tolls

Thread: Semantic data structure

  1. #1
    dacoolest is offline Member
    Join Date
    Nov 2011
    Posts
    13
    Rep Power
    0

    Default Semantic data structure

    Hi, I need an opinion on how to implement a semantic network type data structure for the following example.

    http://upload.wikimedia.org/wikipedi...mantic_Net.svg

    I thought of creating classes for both relationship types and entity types and then to include two pointers in relationship types class, where entity types can be linked

    eg:

    Java Code:
    class relationshipType {
       String relationshipName;
       entity left;
       entity right;
    }
    
    class entity {
       String entityName;
    }


    But I'm not sure whether this will lead to a successful data structure.

    Please I need your help on this.
    Last edited by dacoolest; 01-11-2012 at 11:49 AM.

  2. #2
    DarrylBurke's Avatar
    DarrylBurke is offline Member
    Join Date
    Sep 2008
    Location
    Madgaon, Goa, India
    Posts
    11,189
    Rep Power
    19

    Default Re: Semantic data structure

    Whether it does or doesn't, you need to learn to follow Java coding conventions. Class names start with an uppercase letter.
    Code Conventions for the Java(TM) Programming Language: Contents

    db
    If you're forever cleaning cobwebs, it's time to get rid of the spiders.

  3. #3
    dacoolest is offline Member
    Join Date
    Nov 2011
    Posts
    13
    Rep Power
    0

    Default Re: Semantic data structure

    Quote Originally Posted by DarrylBurke View Post
    Whether it does or doesn't, you need to learn to follow Java coding conventions. Class names start with an uppercase letter.
    Code Conventions for the Java(TM) Programming Language: Contents

    db
    Wrong answer.
    Thats not the answer for the question asked.
    Thank you anyway.

  4. #4
    Tolls is offline Moderator
    Join Date
    Apr 2009
    Posts
    11,442
    Rep Power
    18

    Default Re: Semantic data structure

    Nope.
    It's a post pointing out that your above code is incorrect as far as naming standards go.
    Standards are important as they reduce confusion when reading code (eg, is that a class name or variable name?).
    But nice to see you're open to constructive criticism.
    You'll go far.
    DarrylBurke likes this.

  5. #5
    dacoolest is offline Member
    Join Date
    Nov 2011
    Posts
    13
    Rep Power
    0

    Default Re: Semantic data structure

    Nope.
    constructive criticism is not expected here. Only the answer is expected.
    constructive criticism dosen't do anything. This is a good example as there is still no proper answer for the question I asked here.

    your constructive criticism in online forums are basically more like "hey I don't know anything about the question you asked but I know how to write names of classes properly...." type answer which can be posted in any thread in this forum. Which doesn't help anyone.

    So. in this thread I expected the answer. If you want to talk about class names and constructive criticism, I'll open a another thread for that.

  6. #6
    Tolls is offline Moderator
    Join Date
    Apr 2009
    Posts
    11,442
    Rep Power
    18

    Default Re: Semantic data structure

    Good bye...

  7. #7
    JosAH's Avatar
    JosAH is offline Moderator
    Join Date
    Sep 2008
    Location
    Voorschoten, the Netherlands
    Posts
    12,998
    Blog Entries
    7
    Rep Power
    19

    Default Re: Semantic data structure

    @dacoolest: your attitude isn't so cool and I'm afraid that not many people are willing to answer your question. Tolls' tip does have value although it is not a boilerplate answer to your question.

    Jos
    cenosillicaphobia: the fear for an empty beer glass

Similar Threads

  1. Which data structure to use?
    By malaguena in forum New To Java
    Replies: 4
    Last Post: 04-05-2011, 04:41 PM
  2. Which data structure to choose ?
    By lumpy in forum New To Java
    Replies: 2
    Last Post: 02-20-2010, 04:43 AM
  3. data structure and data base??
    By ahmed13 in forum Advanced Java
    Replies: 8
    Last Post: 03-27-2009, 05:48 AM
  4. Queue data structure
    By Java Tip in forum java.lang
    Replies: 0
    Last Post: 04-14-2008, 08:35 PM
  5. data structure code
    By vgvt in forum New To Java
    Replies: 1
    Last Post: 01-17-2008, 02:49 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •