Hi Matthew,

    the attribute OID is unique to the actual attribute type, whereas the
Syntax is the structure of the data; e.g. 'jpegPhoto' is a type of data,
but you might have attributes 'userThumbnail', 'staffPhoto' or even
'jpegPhoto'(as an attribute).  It's a bit confusing that the attribute name
and the syntax name are so similar!

    If you're looking for some code to get you started, try
com.ca.commons.jndi.SchemaOps - you intialise a SchemaOps object with a
jndi context and you should be able to read out a whole lot of schema
info.

    Have a look at the expandAllAttributes() method in
com.ca.commons.naming.DXAttributes for example usage:

(schema is a schemaOps object)

                Attributes ocAttrs =
schema.getAttributes("ClassDefinition/" + objectClass);
                Attribute mustAtt = ocAttrs.get("MUST");  // get mandatory
attribute IDs
                Attribute mayAtt  = ocAttrs.get("MAY");   // get optional
attribute IDs

   cheers,

      - Chris

P.S. you should note that reading schema in general is a bit of a black
art; if you're using a 'normal' directory you should be able to read it off
from the 'subschema subentry', but some directories with an X.500 heritage
can actually have different schemas in different sub-trees!



On 8 November 2012 06:57, Matthew Abbott <dduck1...@gmail.com> wrote:

> Chris,
>
> I would like to do the full schema and cache it as well, but for now a
> particular entry would be good.
> In oracle my dn would be cn=matthew.abbott,cn=users,dc=rampod,dc=net
>
> I have a DirContext object and was looking in JX for some examples of
> how you were listing all the attributes.
>
> I know there is a MUST/MAY etc with attributes and such too.
>
> So, two things..
> 1.  if i pass in my DN to my user account, id like to get a list of
> all the attributes by looking at the schema for that entry.
> 2.  yes about your non-string attributes.   I can look at the syntax
> Strings you are right.
> (
> http://docs.oracle.com/cd/B28196_01/idmanage.1014/b15998/schema_overview.htm
> )
>
> Question..
> Syntax says 1.3.6.1.4.1.1466.115.121.1.28 for jpegPhoto, but it says
> on the Attribute page the Attribute OID is 0.9.2342.19200300.100.1.60
> What is the difference here?
>
> 1.3.6.1.4.1.1466.115.121.1.5 is binary, but there are other binary
> syntax like jpegPhoto.
>
> -Matthew
>
>
> On Wed, Nov 7, 2012 at 2:46 PM, Chris Betts <pega...@gmail.com> wrote:
> > Hi Matthew,
> >
> >     just to clarify, you're basically trying to download the full schema?
> > Or just the schema a particular entry?
> >
> >    If the latter, it's a multi-step process; read the entries object
> > classes, and then look each of those up in turn.
> >
> >    In general, finding 'non-string' attributes is a bit tricky, but not
> > conceptually hard:
> >    step 1: find object classes
> >    step 2: find all attributes (by looking up the schema)
> >    step 3: look up each attribute syntax (by looking up the schema)
> >    step 4: compare this syntax with the 'standard' string syntaxes (you
> can
> > hard code these, they don't usually change); if it isn't one of those
> it's
> > 'non-string'!
> >
> >    When you look at JX code it can be a little confusing, as we try to
> cache
> > a lot of this stuff so that we're not always interrogating the schema
> > (that's the reason for the slow initial connection; JX slurps down the
> > schema when we first connect).
> >
> >    Anyway, let me know if this is the sort of thing you're trying to do
> and
> > I'll chase down the exact code in JX
> >
> >     - Chris
> >
> >
> > On 8 November 2012 05:29, Matthew Abbott <dduck1...@gmail.com> wrote:
> >>
> >> Chris,
> >>
> >>
> >> I have emailed you before on my hotmail account (abbo...@hotmail.com)
> >> but I decided to send from my gmail account.
> >> Im back to working with the Oracle LDAP schema.
> >>
> >> I still have not been able to point it to a DN and get ALL the
> >> attributes available.  Everything I try is getting the attributes that
> >> have a value assigned to them.
> >> Also, I wondered if there was a way to go out and list the attributes
> >> that are binary.
> >>
> >> http://docs.oracle.com/javase/jndi/tutorial/ldap/misc/attrs.html
> >>
> >> If you scroll down it lists the binary attributes and it says there is
> >> not a programmatic way to determine if the syntax is nonstring.  It
> >> says The LDAP service provider has a built-in list of attribute names.
> >>  How does one get to this list using Java?
> >>
> >> I was looking at your SchemaOps java code, but haven't been successful
> >> yet.
> >>
> >> Also, as a side note..in the SchemaOps.java the comments for
> >> getSpecificName() and getTypeName() are the same.  Is this correct?
> >>
> >> Any help is appreciated, and I appreciate your past help greatly!!
> >>
> >> -Matthew
> >
> >
> >
> >
> > --
> > Dr Christopher Betts
> > Pegacat Software
> > Melbourne, Australia
> > m: 0408 533 456
>



-- 
Dr Christopher Betts
Pegacat Software
Melbourne, Australia
m: 0408 533 456
------------------------------------------------------------------------------
LogMeIn Central: Instant, anywhere, Remote PC access and management.
Stay in control, update software, and manage PCs from one command center
Diagnose problems and improve visibility into emerging IT issues
Automate, monitor and manage. Do more in less time with Central
http://p.sf.net/sfu/logmein12331_d2d
_______________________________________________
Jxplorer-users mailing list
Jxplorer-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/jxplorer-users

Reply via email to