Including complexType from XSD into OWL ontology - xsd

Good day,
I use Protege 5.5 to create my ontology of my software. I found that a creation of some user type duplicate ones in xsd file. So I want to include my local xsd file into my ontology.
I have example here (2.3) but could not understand how to use it.
#prefix : <http://www.semanticweb.org/refresh/ontologies/2020/9/MYONTOLOGY#> .
#prefix owl: <http://www.w3.org/2002/07/owl#> .
#prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#> .
#prefix xml: <http://www.w3.org/XML/1998/namespace> .
#prefix xsd: <http://www.w3.org/2001/XMLSchema#> .
#prefix ANPA: <http://www.semanticweb.org/refresh/ontologies/2020/9/ANPA#> .
#prefix rdfs: <http://www.w3.org/2000/01/rdf-schema#> .
#prefix local: <file:/../xsd/local_file.xsd#> .
#base <http://www.semanticweb.org/refresh/ontologies/2020/9/MYONTOLOGY> .

Related

find command regex with optional subexpression

I have the following file list
file <-
file.2019041543764832 <-
file.2019041643764832 <-
file.2019041243764832
file.2019041143764832
I want to find all the marked files which are prefixed with file and optionally suffixed by the dates 20190415xxxxx or 20190416xxxxx
I have tried the following but it does not yield any output.
find . -regex 'file(\.2019041(5|6)[0-9].*)?' -regextype egrep
I need some help with the correct regex type and the correct synatx to achieve this.
find . -regex './file\(.2019041\(5\|6\)[0-9]*\)?' -regextype egrep
or just
find . -regex './file\(.2019041[56][0-9]*\)?'
(When using find ., my version of find prefixes the matches with ./, so I added that to the regexp.)

Find command inconsistent output , wild card not working correctly

I am using find command to create a list of files that I want to use for distribution bundle. but find is not able to get the list of all files
Below is my directory structure
.
├── 1.cpp
├── test
│   └── 1.cpp
└── test1
├── 1.cpp
└── test11
├── 1.h
└── 2.cpp
below is the command and its output ( note: it does not bring the ./test1/test11/2.cpp)
$ find . -name *.cpp
./test/1.cpp
./1.cpp
./test1/1.cpp
however when i am using the specific name it is able to locate the file
$ find . -name 2.cpp
./test1/test11/2.cpp
it's because *.cpp is expanded to 1.cpp because there is a match in current directory use quotes "*.cpp" or escape star \*.cpp to avoid expansion and pass star literaly as argument for find.
Add double quote in your search string find . -name "*.cpp"

The equivalent windows command to find macaddress

I use the following linux command to find the macaddress
"ifconfig | grep enp0s20f6 | awk '{print $5}'"
What should be the equivalent windows command to find the macaddress?
I linux, the result of ifconfig is filtered using grep and awk. Is there any way to modify the equivalent windows command to get only the macaddress?
For windows:
C:\>ipconfig /all
Windows IP Configuration
Host Name . . . . . . . . . . . . : PC-10234
Primary Dns Suffix . . . . . . . : mydomain.com
DNS Suffix Search List. . . . . . : mydomain.com
mydomain.com
Wireless LAN adapter Wireless Network Connection:
Connection-specific DNS Suffix . : mydomain.com
Description . . . . . . . . . . . : Intel(R) Centrino(R) Advanced-N 6205
Physical Address. . . . . . . . . : 3C-99-88-64-A1-F0
Ethernet adapter Local Area Connection:
Connection-specific DNS Suffix . : mydomain.com
Description . . . . . . . . . . . : Intel(R) 82579LM Gigabit Network Connection
Physical Address. . . . . . . . . : 73-2B-4F-D5-12-A0
C:\>
Or
C:\>getmac
Physical Address Transport Name
=============================================================================
2C-3F-45-02-1B-32 \Device\Tcpip_{7E49B486-120A-4BC2-2114-B345A4D5C5}
10-13-17-BC-12-48 Media disconnected
22-B3-C5-30-76-78 \Device\Tcpip_{213E8D2A-1DBE-4240-8301-BE6F3EACAF9D}
00-05-2A-3C-78-00 \Device\Tcpip_{F01E3FC2-A5A1-6940-D1A1-C7521AEC4296}
2C-23-45-14-23-AD Media disconnected
C:\>
For more details information visit here - get-mac-address-command-line
For getting only mac-address, you can do something like
for /f "usebackq tokens=3 delims=," %a in (`getmac /fo csv /v ^| find "Local Area Connection"`) do set MAC=%~a
Follow here - get only the Ethernet MAC address
To show macadresses
for /F "delims=: tokens=2" %a IN ('netsh lan show interfaces^|findstr /C:"Physical address"') do #echo %a
if you use that in batch file, you need double the %.
for /F "delims=: tokens=2" %%a IN ('netsh lan show interfaces^|findstr /C:"Physical address"') do #echo %%a
You can do same with ipconfig, but machine can have virtual\tunnel interfaces, and ipconfig will show them, which may result in extra zeroed lines.
for /F "delims=: tokens=2" %%a IN ('ipconfig /all^|findstr /C:"Physical address"') do #echo %%a
To look for you MAC, just change argument of findstr

difference between find . –name *.txt and find . –name "*.txt"

I want to know what is the difference between this two commands..
find . –name *.txt
find . –name "*.txt"
I run it in the system and cant find any difference,
what does the sign " " do?
When you don't use quotes around the glob pattern, i.e. when you say:
find . -name *.txt
then the shell would expand *.txt to the matching files in the current directory before passing those as an argument to find. If no file matching the pattern is found, then the behaviour is similar to the quoted variant.
When you use quotes, i.e. when you say:
find . -name "*.txt"
the shell passes *.txt as an argument to find.
Always use quotes when specifying a glob (esp. when used as an argument to find).
An example might help:
$ touch {1..5}.txt # Create a few .txt files
$ ls
1.txt 2.txt 3.txt 4.txt 5.txt
$ find . -name *.txt # find *.txt files
find: paths must precede expression: 2.txt
Usage: find [-H] [-L] [-P] [-Olevel] [-D help|tree|search|stat|rates|opt|exec] [path...] [expression]
$ find . -name "*.txt" # find "*.txt" files
./2.txt
./4.txt
./3.txt
./5.txt
./1.txt

Find -type f with restrictions

I have the following find command to find all files in a Volume:
find ./ -type f
How would I exclude all files that start with . ? Also, I do want to include folders that being with . For example:
Include .Trashes/file.php
Do not include folder/.hidden_file.php
What would be the correct find command for this?
To exclude all files whose names begin with . :
find ./ -type f ! -name '.*'
This will search in all directories (even if their names start with a dot), descending from the current directory, for regular files whose names do not begin with a dot (! -name '.*').

Resources